@alfalab/core-components-typography 6.0.14 → 6.0.15

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 (99) hide show
  1. package/colors.css +20 -20
  2. package/colors.js.map +1 -1
  3. package/colors.module.css.js +1 -1
  4. package/colors.module.css.js.map +1 -1
  5. package/component.js +8 -8
  6. package/component.js.map +1 -1
  7. package/cssm/colors.js.map +1 -1
  8. package/cssm/component.js +8 -8
  9. package/cssm/component.js.map +1 -1
  10. package/cssm/index.js +8 -8
  11. package/cssm/presets.js.map +1 -1
  12. package/cssm/text/component.js.map +1 -1
  13. package/cssm/title/component.js.map +1 -1
  14. package/cssm/title/index.js.map +1 -1
  15. package/cssm/title/utils.js.map +1 -1
  16. package/cssm/title-mobile/component.js.map +1 -1
  17. package/cssm/title-responsive/component.js.map +1 -1
  18. package/esm/colors.css +20 -20
  19. package/esm/colors.js.map +1 -1
  20. package/esm/colors.module.css.js +1 -1
  21. package/esm/colors.module.css.js.map +1 -1
  22. package/esm/component.js.map +1 -1
  23. package/esm/index.js +1 -1
  24. package/esm/presets.js.map +1 -1
  25. package/esm/text/component.js.map +1 -1
  26. package/esm/text/index.css +42 -42
  27. package/esm/text/index.module.css.js +1 -1
  28. package/esm/text/index.module.css.js.map +1 -1
  29. package/esm/title/common.css +7 -7
  30. package/esm/title/common.module.css.js +1 -1
  31. package/esm/title/common.module.css.js.map +1 -1
  32. package/esm/title/component.js.map +1 -1
  33. package/esm/title/index.css +25 -25
  34. package/esm/title/index.js.map +1 -1
  35. package/esm/title/index.module.css.js +1 -1
  36. package/esm/title/index.module.css.js.map +1 -1
  37. package/esm/title/utils.js.map +1 -1
  38. package/esm/title-mobile/component.js.map +1 -1
  39. package/esm/title-mobile/index.css +25 -25
  40. package/esm/title-mobile/index.module.css.js +1 -1
  41. package/esm/title-mobile/index.module.css.js.map +1 -1
  42. package/esm/title-responsive/component.js.map +1 -1
  43. package/index.js +8 -8
  44. package/modern/colors.css +20 -20
  45. package/modern/colors.js.map +1 -1
  46. package/modern/colors.module.css.js +1 -1
  47. package/modern/colors.module.css.js.map +1 -1
  48. package/modern/component.js.map +1 -1
  49. package/modern/index.js +1 -1
  50. package/modern/presets.js.map +1 -1
  51. package/modern/text/component.js.map +1 -1
  52. package/modern/text/index.css +42 -42
  53. package/modern/text/index.module.css.js +1 -1
  54. package/modern/text/index.module.css.js.map +1 -1
  55. package/modern/title/common.css +7 -7
  56. package/modern/title/common.module.css.js +1 -1
  57. package/modern/title/common.module.css.js.map +1 -1
  58. package/modern/title/component.js.map +1 -1
  59. package/modern/title/index.css +25 -25
  60. package/modern/title/index.js.map +1 -1
  61. package/modern/title/index.module.css.js +1 -1
  62. package/modern/title/index.module.css.js.map +1 -1
  63. package/modern/title/utils.js.map +1 -1
  64. package/modern/title-mobile/component.js.map +1 -1
  65. package/modern/title-mobile/index.css +25 -25
  66. package/modern/title-mobile/index.module.css.js +1 -1
  67. package/modern/title-mobile/index.module.css.js.map +1 -1
  68. package/modern/title-responsive/component.js.map +1 -1
  69. package/moderncssm/colors.js.map +1 -1
  70. package/moderncssm/component.js.map +1 -1
  71. package/moderncssm/index.js +1 -1
  72. package/moderncssm/presets.js.map +1 -1
  73. package/moderncssm/text/component.js.map +1 -1
  74. package/moderncssm/title/component.js.map +1 -1
  75. package/moderncssm/title/index.js.map +1 -1
  76. package/moderncssm/title/utils.js.map +1 -1
  77. package/moderncssm/title-mobile/component.js.map +1 -1
  78. package/moderncssm/title-responsive/component.js.map +1 -1
  79. package/package.json +3 -3
  80. package/presets.js.map +1 -1
  81. package/src/text/index.module.css +5 -4
  82. package/text/component.js.map +1 -1
  83. package/text/index.css +42 -42
  84. package/text/index.module.css.js +1 -1
  85. package/text/index.module.css.js.map +1 -1
  86. package/title/common.css +7 -7
  87. package/title/common.module.css.js +1 -1
  88. package/title/common.module.css.js.map +1 -1
  89. package/title/component.js.map +1 -1
  90. package/title/index.css +25 -25
  91. package/title/index.js.map +1 -1
  92. package/title/index.module.css.js +1 -1
  93. package/title/index.module.css.js.map +1 -1
  94. package/title/utils.js.map +1 -1
  95. package/title-mobile/component.js.map +1 -1
  96. package/title-mobile/index.css +25 -25
  97. package/title-mobile/index.module.css.js +1 -1
  98. package/title-mobile/index.module.css.js.map +1 -1
  99. package/title-responsive/component.js.map +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_8qhut {
23
+ .typography__tertiary_1ocx5 {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_8qhut {
26
+ .typography__disabled_1ocx5 {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_8qhut {
29
+ .typography__accent_1ocx5 {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_8qhut {
32
+ .typography__primary_1ocx5 {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_8qhut {
35
+ .typography__attention_1ocx5 {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_8qhut {
38
+ .typography__positive_1ocx5 {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_8qhut {
41
+ .typography__secondary_1ocx5 {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_8qhut {
44
+ .typography__tertiary-inverted_1ocx5 {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_8qhut {
47
+ .typography__primary-inverted_1ocx5 {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_8qhut {
50
+ .typography__secondary-inverted_1ocx5 {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_8qhut {
53
+ .typography__link_1ocx5 {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_8qhut {
56
+ .typography__negative_1ocx5 {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_8qhut {
59
+ .typography__static-primary-light_1ocx5 {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_8qhut {
62
+ .typography__static-secondary-light_1ocx5 {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_8qhut {
65
+ .typography__static-tertiary-light_1ocx5 {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_8qhut {
68
+ .typography__static-primary-dark_1ocx5 {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_8qhut {
71
+ .typography__static-secondary-dark_1ocx5 {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_8qhut {
74
+ .typography__static-tertiary-dark_1ocx5 {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_8qhut {
77
+ .typography__static-accent_1ocx5 {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_8qhut {
80
+ .typography__static-positive_1ocx5 {
81
81
  color: var(--color-static-text-positive);
82
82
  }
package/colors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":";;;;AAAa,IAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":";;;;AAAO,IAAM,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./colors.css');
4
4
 
5
- var colors = {"tertiary":"typography__tertiary_8qhut","disabled":"typography__disabled_8qhut","accent":"typography__accent_8qhut","primary":"typography__primary_8qhut","attention":"typography__attention_8qhut","positive":"typography__positive_8qhut","secondary":"typography__secondary_8qhut","tertiary-inverted":"typography__tertiary-inverted_8qhut","primary-inverted":"typography__primary-inverted_8qhut","secondary-inverted":"typography__secondary-inverted_8qhut","link":"typography__link_8qhut","negative":"typography__negative_8qhut","static-primary-light":"typography__static-primary-light_8qhut","static-secondary-light":"typography__static-secondary-light_8qhut","static-tertiary-light":"typography__static-tertiary-light_8qhut","static-primary-dark":"typography__static-primary-dark_8qhut","static-secondary-dark":"typography__static-secondary-dark_8qhut","static-tertiary-dark":"typography__static-tertiary-dark_8qhut","static-accent":"typography__static-accent_8qhut","static-positive":"typography__static-positive_8qhut"};
5
+ var colors = {"tertiary":"typography__tertiary_1ocx5","disabled":"typography__disabled_1ocx5","accent":"typography__accent_1ocx5","primary":"typography__primary_1ocx5","attention":"typography__attention_1ocx5","positive":"typography__positive_1ocx5","secondary":"typography__secondary_1ocx5","tertiary-inverted":"typography__tertiary-inverted_1ocx5","primary-inverted":"typography__primary-inverted_1ocx5","secondary-inverted":"typography__secondary-inverted_1ocx5","link":"typography__link_1ocx5","negative":"typography__negative_1ocx5","static-primary-light":"typography__static-primary-light_1ocx5","static-secondary-light":"typography__static-secondary-light_1ocx5","static-tertiary-light":"typography__static-tertiary-light_1ocx5","static-primary-dark":"typography__static-primary-dark_1ocx5","static-secondary-dark":"typography__static-secondary-dark_1ocx5","static-tertiary-dark":"typography__static-tertiary-dark_1ocx5","static-accent":"typography__static-accent_1ocx5","static-positive":"typography__static-positive_1ocx5"};
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/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/component.js CHANGED
@@ -4,23 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var component = require('./text/component.js');
6
6
  var index = require('./title/index.js');
7
- var component$2 = require('./title-mobile/component.js');
8
- var component$1 = require('./title-responsive/component.js');
7
+ var component$1 = require('./title-mobile/component.js');
8
+ var component$2 = require('./title-responsive/component.js');
9
9
 
10
10
  var Typography = {
11
11
  Title: index.Title,
12
12
  Text: component.Text,
13
- TitleResponsive: component$1.TitleResponsive,
14
- TitleMobile: component$2.TitleMobile,
13
+ TitleResponsive: component$2.TitleResponsive,
14
+ TitleMobile: component$1.TitleMobile,
15
15
  };
16
16
 
17
17
  exports.Text = component.Text;
18
18
  exports.TypographyText = component.Text;
19
19
  exports.TitleDesktop = index.Title;
20
20
  exports.TypographyTitle = index.Title;
21
- exports.TitleMobile = component$2.TitleMobile;
22
- exports.TypographyTitleMobile = component$2.TitleMobile;
23
- exports.TitleResponsive = component$1.TitleResponsive;
24
- exports.TypographyTitleResponsive = component$1.TitleResponsive;
21
+ exports.TitleMobile = component$1.TitleMobile;
22
+ exports.TypographyTitleMobile = component$1.TitleMobile;
23
+ exports.TitleResponsive = component$2.TitleResponsive;
24
+ exports.TypographyTitleResponsive = component$2.TitleResponsive;
25
25
  exports.Typography = Typography;
26
26
  //# sourceMappingURL=component.js.map
package/component.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQa,IAAA,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"component.js","sources":["src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQO,IAAM,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":";;;;AAAa,IAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":";;;;AAAO,IAAM,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;"}
package/cssm/component.js CHANGED
@@ -4,23 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var component = require('./text/component.js');
6
6
  var index = require('./title/index.js');
7
- var component$2 = require('./title-mobile/component.js');
8
- var component$1 = require('./title-responsive/component.js');
7
+ var component$1 = require('./title-mobile/component.js');
8
+ var component$2 = require('./title-responsive/component.js');
9
9
 
10
10
  var Typography = {
11
11
  Title: index.Title,
12
12
  Text: component.Text,
13
- TitleResponsive: component$1.TitleResponsive,
14
- TitleMobile: component$2.TitleMobile,
13
+ TitleResponsive: component$2.TitleResponsive,
14
+ TitleMobile: component$1.TitleMobile,
15
15
  };
16
16
 
17
17
  exports.Text = component.Text;
18
18
  exports.TypographyText = component.Text;
19
19
  exports.TitleDesktop = index.Title;
20
20
  exports.TypographyTitle = index.Title;
21
- exports.TitleMobile = component$2.TitleMobile;
22
- exports.TypographyTitleMobile = component$2.TitleMobile;
23
- exports.TitleResponsive = component$1.TitleResponsive;
24
- exports.TypographyTitleResponsive = component$1.TitleResponsive;
21
+ exports.TitleMobile = component$1.TitleMobile;
22
+ exports.TypographyTitleMobile = component$1.TitleMobile;
23
+ exports.TitleResponsive = component$2.TitleResponsive;
24
+ exports.TypographyTitleResponsive = component$2.TitleResponsive;
25
25
  exports.Typography = Typography;
26
26
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQa,IAAA,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQO,IAAM,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;;;"}
package/cssm/index.js CHANGED
@@ -2,23 +2,23 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var component = require('./component.js');
5
+ var component$3 = require('./component.js');
6
6
  var presets = require('./presets.js');
7
- var component$1 = require('./text/component.js');
7
+ var component = require('./text/component.js');
8
8
  var index = require('./title/index.js');
9
+ var component$1 = require('./title-mobile/component.js');
9
10
  var component$2 = require('./title-responsive/component.js');
10
- var component$3 = require('./title-mobile/component.js');
11
11
 
12
12
 
13
13
 
14
- exports.Typography = component.Typography;
14
+ exports.Typography = component$3.Typography;
15
15
  exports.typographyPresets = presets.typographyPresets;
16
- exports.Text = component$1.Text;
17
- exports.TypographyText = component$1.Text;
16
+ exports.Text = component.Text;
17
+ exports.TypographyText = component.Text;
18
18
  exports.TitleDesktop = index.Title;
19
19
  exports.TypographyTitle = index.Title;
20
+ exports.TitleMobile = component$1.TitleMobile;
21
+ exports.TypographyTitleMobile = component$1.TitleMobile;
20
22
  exports.TitleResponsive = component$2.TitleResponsive;
21
23
  exports.TypographyTitleResponsive = component$2.TitleResponsive;
22
- exports.TitleMobile = component$3.TitleMobile;
23
- exports.TypographyTitleMobile = component$3.TitleMobile;
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":";;;;AAAa,IAAA,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;;;"}
1
+ {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":";;;;AAAO,IAAM,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","Fragment","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,EAAA,GAAA,EAAA,CAAA,cAAqB,CAArB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,KAAA,CACrB,CAAA,KAAK,GAAA,EAAA,CAAA,KAAA,CAAA,CACL,SAAS,GAAA,EAAA,CAAA,SAAA,CACT,CAAA,UAAU,GAAA,EAAA,CAAA,UAAA,CAAA,CACV,QAAQ,GAAA,EAAA,CAAA,QAAA,CACR,CAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACR,YAAY,GAAA,EAAA,CAAA,YAAA,CACZ,CAAA,aAAa,GAAA,EAAA,CAAA,aAAA,CAAA,CACT,EAAA,CAAA,IAAA,CACD,KAAA,SAAS,GAdhBC,YAAA,CAAA,EAAA,EAAA,CAAA,MAAA,EAAA,KAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,OAAA,EAAA,WAAA,EAAA,YAAA,EAAA,UAAA,EAAA,UAAA,EAAA,cAAA,EA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Q,CACD;QACX,YAAY,KACTH,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAED,uBAAM,CAAC,QAAQ,EAC1B,EAAA,cAAc,CAAC;AACZ,YAAA,gBAAgB,EAAED,mBAAE,EAAA,EAAA,GAAA,EAAA;gBAChB,EAAC,CAAAC,uBAAM,CAAC,oBAAoB,CAAA,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AACpE,gBAAA,EAAA,EAAA;AACF,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","Fragment","cn","styles","React","__assign","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IAoGa,IAA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AAA,CAACC,uBAAM,CAAC,oBAAoB,CAAA,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AACpE,gBAAA,EAAA,EAAA;AACF,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","Fragment","cn","commonStyles","React","__assign","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IA4Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,G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CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,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,IAAIG,uBAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,gBAAA,EAAA,CAACH,6BAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,gBAAA,EAAA,CAACA,6BAAY,CAAC,WAAW,CAAA,GAAG,YAAY;gBACxC,EAAC,CAAA,MAAM,CAAC,IAAI,CAAA,GACR,CAACL,aAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,gBAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAES,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,EAC1B,SAAS,CAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACTH,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAED,6BAAY,CAAC,QAAQ,EAChC,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAED,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","Fragment","cn","commonStyles","React","__assign","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IA4Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAAA,GAAA,EAAA,CAAA,IAAgB,EAAhB,IAAI,GAAA,EAAA,KAAA,MAAA,GAAG,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,IAA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AAA,CAACH,6BAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,gBAAA,EAAA,CAACA,6BAAY,CAAC,WAAW,CAAA,GAAG,YAAY;gBACxC,EAAA,CAAC,MAAM,CAAC,IAAI,CAAA,GACR,CAACL,aAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,gBAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAES,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,EAC1B,SAAS,CAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACTH,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAED,6BAAY,CAAC,QAAQ,EAAA,EAChC,cAAc,CAAC;YACZ,gBAAgB,EAAED,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,CAAC;AACjE,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from './component';\n\nimport styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":["forwardRef","React","TitleBase","styles"],"mappings":";;;;;;;;;;;;;;AAMA,IAAM,KAAK,GAAGA,gBAAU,CAAkD,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,QACtFC,sBAAC,CAAA,aAAA,CAAAC,mBAAS,qBAAK,KAAK,EAAA,EAAE,MAAM,EAAEC,uBAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CAAA,EADiB,EAEzF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from './component';\n\nimport styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":["forwardRef","React","TitleBase","styles"],"mappings":";;;;;;;;;;;;;;AAMA,IAAM,KAAK,GAAGA,gBAAU,CAAkD,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,QACtFC,sBAAA,CAAA,aAAA,CAACC,mBAAS,qBAAK,KAAK,EAAA,EAAE,MAAM,EAAEC,uBAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAA,CAAA,CAAG,EACxE,CAFyF,CAEzF;;"}
@@ -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;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
+ {"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":";;;;AAAM,SAAU,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;IAE9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;IACnB;AAEA,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;IACjB;AAEA,IAAA,OAAO,UAAU;AACrB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from '../title/component';\n\nimport styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":["forwardRef","React","TitleBase","__assign","styles"],"mappings":";;;;;;;;;;;;;;AAMO,IAAM,WAAW,GAAGA,gBAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,MAAM,EAAEC,uBAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAA,CAAG,CAApE,EAAoE;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from '../title/component';\n\nimport styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":["forwardRef","React","TitleBase","__assign","styles"],"mappings":";;;;;;;;;;;;;;AAMO,IAAM,WAAW,GAAGA,gBAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAAC,cAAA,CAAA,EAAA,EAAK,KAAK,EAAA,EAAE,MAAM,EAAEC,uBAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAA,CAAG,CAAA,CAApE,CAAoE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title-responsive/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { Title, type TitleProps } from '../title';\nimport { TitleMobile } from '../title-mobile';\n\nexport type TitleResponsiveProps = TitleProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n};\n\nexport const TitleResponsive = forwardRef<\n HTMLHeadingElement | HTMLDivElement,\n TitleResponsiveProps\n>(({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n const Component = isDesktop ? Title : TitleMobile;\n\n return <Component {...restProps} ref={ref} />;\n});\n"],"names":["forwardRef","__rest","useIsDesktop","Title","TitleMobile","React","__assign"],"mappings":";;;;;;;;;;;;;;IAoBa,eAAe,GAAGA,gBAAU,CAGvC,UAAC,EAAoC,EAAE,GAAG,EAAA;IAAvC,IAAA,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAK,SAAS,GAAlCC,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,CAAoC,CAAF;IACjC,IAAM,SAAS,GAAGC,iBAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,IAAM,SAAS,GAAG,SAAS,GAAGC,WAAK,GAAGC,qBAAW;IAEjD,OAAOC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,SAAS,IAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI;AACjD,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title-responsive/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { Title, type TitleProps } from '../title';\nimport { TitleMobile } from '../title-mobile';\n\nexport type TitleResponsiveProps = TitleProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n};\n\nexport const TitleResponsive = forwardRef<\n HTMLHeadingElement | HTMLDivElement,\n TitleResponsiveProps\n>(({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n const Component = isDesktop ? Title : TitleMobile;\n\n return <Component {...restProps} ref={ref} />;\n});\n"],"names":["forwardRef","__rest","useIsDesktop","Title","TitleMobile","React","__assign"],"mappings":";;;;;;;;;;;;;;IAoBa,eAAe,GAAGA,gBAAU,CAGvC,UAAC,EAAoC,EAAE,GAAG,EAAA;IAAvC,IAAA,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAK,SAAS,GAAAC,YAAA,CAAA,EAAA,EAAlC,CAAA,YAAA,EAAA,QAAA,CAAoC,CAAF;IACjC,IAAM,SAAS,GAAGC,iBAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,IAAM,SAAS,GAAG,SAAS,GAAGC,WAAK,GAAGC,qBAAW;IAEjD,OAAOC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAAC,cAAA,CAAA,EAAA,EAAK,SAAS,IAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI;AACjD,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_8qhut {
23
+ .typography__tertiary_1ocx5 {
24
24
  color: var(--color-light-text-tertiary);
25
25
  }
26
- .typography__disabled_8qhut {
26
+ .typography__disabled_1ocx5 {
27
27
  color: var(--color-light-text-quaternary);
28
28
  }
29
- .typography__accent_8qhut {
29
+ .typography__accent_1ocx5 {
30
30
  color: var(--color-light-accent-primary);
31
31
  }
32
- .typography__primary_8qhut {
32
+ .typography__primary_1ocx5 {
33
33
  color: var(--color-light-text-primary);
34
34
  }
35
- .typography__attention_8qhut {
35
+ .typography__attention_1ocx5 {
36
36
  color: var(--color-light-text-attention);
37
37
  }
38
- .typography__positive_8qhut {
38
+ .typography__positive_1ocx5 {
39
39
  color: var(--color-light-text-positive);
40
40
  }
41
- .typography__secondary_8qhut {
41
+ .typography__secondary_1ocx5 {
42
42
  color: var(--color-light-text-secondary);
43
43
  }
44
- .typography__tertiary-inverted_8qhut {
44
+ .typography__tertiary-inverted_1ocx5 {
45
45
  color: var(--color-light-text-tertiary-inverted);
46
46
  }
47
- .typography__primary-inverted_8qhut {
47
+ .typography__primary-inverted_1ocx5 {
48
48
  color: var(--color-light-text-primary-inverted);
49
49
  }
50
- .typography__secondary-inverted_8qhut {
50
+ .typography__secondary-inverted_1ocx5 {
51
51
  color: var(--color-light-text-secondary-inverted);
52
52
  }
53
- .typography__link_8qhut {
53
+ .typography__link_1ocx5 {
54
54
  color: var(--color-light-text-info);
55
55
  }
56
- .typography__negative_8qhut {
56
+ .typography__negative_1ocx5 {
57
57
  color: var(--color-light-text-negative);
58
58
  }
59
- .typography__static-primary-light_8qhut {
59
+ .typography__static-primary-light_1ocx5 {
60
60
  color: var(--color-static-text-primary-light);
61
61
  }
62
- .typography__static-secondary-light_8qhut {
62
+ .typography__static-secondary-light_1ocx5 {
63
63
  color: var(--color-static-text-secondary-light);
64
64
  }
65
- .typography__static-tertiary-light_8qhut {
65
+ .typography__static-tertiary-light_1ocx5 {
66
66
  color: var(--color-static-text-tertiary-light);
67
67
  }
68
- .typography__static-primary-dark_8qhut {
68
+ .typography__static-primary-dark_1ocx5 {
69
69
  color: var(--color-static-text-primary-dark);
70
70
  }
71
- .typography__static-secondary-dark_8qhut {
71
+ .typography__static-secondary-dark_1ocx5 {
72
72
  color: var(--color-static-text-secondary-dark);
73
73
  }
74
- .typography__static-tertiary-dark_8qhut {
74
+ .typography__static-tertiary-dark_1ocx5 {
75
75
  color: var(--color-static-text-tertiary-dark);
76
76
  }
77
- .typography__static-accent_8qhut {
77
+ .typography__static-accent_1ocx5 {
78
78
  color: var(--color-static-accent-primary);
79
79
  }
80
- .typography__static-positive_8qhut {
80
+ .typography__static-positive_1ocx5 {
81
81
  color: var(--color-static-text-positive);
82
82
  }
package/esm/colors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAa,IAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAO,IAAM,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;"}
@@ -1,6 +1,6 @@
1
1
  import './colors.css';
2
2
 
3
- var colors = {"tertiary":"typography__tertiary_8qhut","disabled":"typography__disabled_8qhut","accent":"typography__accent_8qhut","primary":"typography__primary_8qhut","attention":"typography__attention_8qhut","positive":"typography__positive_8qhut","secondary":"typography__secondary_8qhut","tertiary-inverted":"typography__tertiary-inverted_8qhut","primary-inverted":"typography__primary-inverted_8qhut","secondary-inverted":"typography__secondary-inverted_8qhut","link":"typography__link_8qhut","negative":"typography__negative_8qhut","static-primary-light":"typography__static-primary-light_8qhut","static-secondary-light":"typography__static-secondary-light_8qhut","static-tertiary-light":"typography__static-tertiary-light_8qhut","static-primary-dark":"typography__static-primary-dark_8qhut","static-secondary-dark":"typography__static-secondary-dark_8qhut","static-tertiary-dark":"typography__static-tertiary-dark_8qhut","static-accent":"typography__static-accent_8qhut","static-positive":"typography__static-positive_8qhut"};
3
+ var colors = {"tertiary":"typography__tertiary_1ocx5","disabled":"typography__disabled_1ocx5","accent":"typography__accent_1ocx5","primary":"typography__primary_1ocx5","attention":"typography__attention_1ocx5","positive":"typography__positive_1ocx5","secondary":"typography__secondary_1ocx5","tertiary-inverted":"typography__tertiary-inverted_1ocx5","primary-inverted":"typography__primary-inverted_1ocx5","secondary-inverted":"typography__secondary-inverted_1ocx5","link":"typography__link_1ocx5","negative":"typography__negative_1ocx5","static-primary-light":"typography__static-primary-light_1ocx5","static-secondary-light":"typography__static-secondary-light_1ocx5","static-tertiary-light":"typography__static-tertiary-light_1ocx5","static-primary-dark":"typography__static-primary-dark_1ocx5","static-secondary-dark":"typography__static-secondary-dark_1ocx5","static-tertiary-dark":"typography__static-tertiary-dark_1ocx5","static-accent":"typography__static-accent_1ocx5","static-positive":"typography__static-positive_1ocx5"};
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/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;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQa,IAAA,UAAU,GAKnB;AACA,IAAA,KAAK,EAAA,KAAA;AACL,IAAA,IAAI,EAAA,IAAA;AACJ,IAAA,eAAe,EAAA,eAAA;AACf,IAAA,WAAW,EAAA,WAAA;;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQO,IAAM,UAAU,GAKnB;AACA,IAAA,KAAK,EAAA,KAAA;AACL,IAAA,IAAI,EAAA,IAAA;AACJ,IAAA,eAAe,EAAA,eAAA;AACf,IAAA,WAAW,EAAA,WAAA;;;"}
package/esm/index.js CHANGED
@@ -2,6 +2,6 @@ export { Typography } from './component.js';
2
2
  export { typographyPresets } from './presets.js';
3
3
  export { Text, Text as TypographyText } from './text/component.js';
4
4
  export { Title as TitleDesktop, Title as TypographyTitle } from './title/index.js';
5
- export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
6
5
  export { TitleMobile, TitleMobile as TypographyTitleMobile } from './title-mobile/component.js';
6
+ export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAa,IAAA,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;;;"}
1
+ {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAO,IAAM,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;IAoGa,IAAI,GAAG,UAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,CAAvB,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,gBAAgB,GAAA,EAAA,CAAA,CACvB,EAAuB,GAAA,EAAA,CAA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ponentProps, forwardRef, Fragment, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\nimport { type TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n *\n * @deprecated\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;IAoGa,IAAI,GAAG,UAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,CAAA,CAAvB,IAAI,GAAA,EAAA,KAAA,MAAA,GAAG,gBAAgB,GAAA,EAAA,CAAA,CACvB,EAAA,GAAA,EAAA,CAAA,GAAuB,CAAA,CAAlB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CAAA,CACvB,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,EAAA,GAAA,EAAA,CAAA,gBAAwB,CAAA,CAAxB,gBAAgB,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CAAA,CACxB,EAAA,GAAA,EAAA,CAAA,cAAqB,CAAA,CAArB,cAAc,GAAA,EAAA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