@alfalab/core-components-typography 5.0.0 → 5.1.0-snapshot-92b8690

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 (143) hide show
  1. package/colors.css +20 -20
  2. package/colors.module.css.js +1 -1
  3. package/colors.module.css.js.map +1 -1
  4. package/dynamic-mixins/colors.css +62 -0
  5. package/dynamic-mixins/colors.d.ts +2 -0
  6. package/dynamic-mixins/colors.js +29 -0
  7. package/dynamic-mixins/colors.js.map +1 -0
  8. package/dynamic-mixins/colors.module.css.js +8 -0
  9. package/dynamic-mixins/colors.module.css.js.map +1 -0
  10. package/dynamic-mixins/component.d.ts +13 -0
  11. package/dynamic-mixins/component.js +22 -0
  12. package/dynamic-mixins/component.js.map +1 -0
  13. package/dynamic-mixins/index.d.ts +5 -0
  14. package/dynamic-mixins/index.js +20 -0
  15. package/dynamic-mixins/index.js.map +1 -0
  16. package/dynamic-mixins/presets.d.ts +17 -0
  17. package/dynamic-mixins/presets.js +24 -0
  18. package/dynamic-mixins/presets.js.map +1 -0
  19. package/dynamic-mixins/text/alfasans-index.css +108 -0
  20. package/dynamic-mixins/text/alfasans-index.module.css.js +8 -0
  21. package/dynamic-mixins/text/alfasans-index.module.css.js.map +1 -0
  22. package/dynamic-mixins/text/component.d.ts +66 -0
  23. package/dynamic-mixins/text/component.js +60 -0
  24. package/dynamic-mixins/text/component.js.map +1 -0
  25. package/dynamic-mixins/text/index.css +88 -0
  26. package/dynamic-mixins/text/index.d.ts +1 -0
  27. package/dynamic-mixins/text/index.js +10 -0
  28. package/dynamic-mixins/text/index.js.map +1 -0
  29. package/dynamic-mixins/text/index.module.css.js +8 -0
  30. package/dynamic-mixins/text/index.module.css.js.map +1 -0
  31. package/dynamic-mixins/title/alfasans-index.css +49 -0
  32. package/dynamic-mixins/title/alfasans-index.module.css.js +8 -0
  33. package/dynamic-mixins/title/alfasans-index.module.css.js.map +1 -0
  34. package/dynamic-mixins/title/common.css +30 -0
  35. package/dynamic-mixins/title/common.module.css.js +8 -0
  36. package/dynamic-mixins/title/common.module.css.js.map +1 -0
  37. package/dynamic-mixins/title/component.d.ts +126 -0
  38. package/dynamic-mixins/title/component.js +48 -0
  39. package/dynamic-mixins/title/component.js.map +1 -0
  40. package/dynamic-mixins/title/index.css +76 -0
  41. package/dynamic-mixins/title/index.d.ts +22 -0
  42. package/dynamic-mixins/title/index.js +20 -0
  43. package/dynamic-mixins/title/index.js.map +1 -0
  44. package/dynamic-mixins/title/index.module.css.js +8 -0
  45. package/dynamic-mixins/title/index.module.css.js.map +1 -0
  46. package/dynamic-mixins/title/utils.d.ts +1 -0
  47. package/dynamic-mixins/title/utils.js +16 -0
  48. package/dynamic-mixins/title/utils.js.map +1 -0
  49. package/dynamic-mixins/title-mobile/alfasans-index.css +39 -0
  50. package/dynamic-mixins/title-mobile/alfasans-index.module.css.js +8 -0
  51. package/dynamic-mixins/title-mobile/alfasans-index.module.css.js.map +1 -0
  52. package/dynamic-mixins/title-mobile/component.d.ts +19 -0
  53. package/dynamic-mixins/title-mobile/component.js +20 -0
  54. package/dynamic-mixins/title-mobile/component.js.map +1 -0
  55. package/dynamic-mixins/title-mobile/index.css +72 -0
  56. package/dynamic-mixins/title-mobile/index.d.ts +2 -0
  57. package/dynamic-mixins/title-mobile/index.js +10 -0
  58. package/dynamic-mixins/title-mobile/index.js.map +1 -0
  59. package/dynamic-mixins/title-mobile/index.module.css.js +8 -0
  60. package/dynamic-mixins/title-mobile/index.module.css.js.map +1 -0
  61. package/dynamic-mixins/title-responsive/component.d.ts +41 -0
  62. package/dynamic-mixins/title-responsive/component.js +23 -0
  63. package/dynamic-mixins/title-responsive/component.js.map +1 -0
  64. package/dynamic-mixins/title-responsive/index.d.ts +1 -0
  65. package/dynamic-mixins/title-responsive/index.js +10 -0
  66. package/dynamic-mixins/title-responsive/index.js.map +1 -0
  67. package/dynamic-mixins/types.d.ts +1 -0
  68. package/dynamic-mixins/types.js +3 -0
  69. package/dynamic-mixins/types.js.map +1 -0
  70. package/esm/colors.css +20 -20
  71. package/esm/colors.module.css.js +1 -1
  72. package/esm/colors.module.css.js.map +1 -1
  73. package/esm/text/alfasans-index.css +29 -29
  74. package/esm/text/alfasans-index.module.css.js +1 -1
  75. package/esm/text/index.css +21 -21
  76. package/esm/text/index.module.css.js +1 -1
  77. package/esm/text/index.module.css.js.map +1 -1
  78. package/esm/title/alfasans-index.css +10 -10
  79. package/esm/title/alfasans-index.module.css.js +1 -1
  80. package/esm/title/common.css +8 -8
  81. package/esm/title/common.module.css.js +1 -1
  82. package/esm/title/common.module.css.js.map +1 -1
  83. package/esm/title/index.css +16 -16
  84. package/esm/title/index.module.css.js +1 -1
  85. package/esm/title/index.module.css.js.map +1 -1
  86. package/esm/title-mobile/alfasans-index.css +10 -10
  87. package/esm/title-mobile/alfasans-index.module.css.js +1 -1
  88. package/esm/title-mobile/index.css +15 -15
  89. package/esm/title-mobile/index.module.css.js +1 -1
  90. package/esm/title-mobile/index.module.css.js.map +1 -1
  91. package/modern/colors.css +20 -20
  92. package/modern/colors.module.css.js +1 -1
  93. package/modern/colors.module.css.js.map +1 -1
  94. package/modern/text/alfasans-index.css +29 -29
  95. package/modern/text/alfasans-index.module.css.js +1 -1
  96. package/modern/text/index.css +21 -21
  97. package/modern/text/index.module.css.js +1 -1
  98. package/modern/text/index.module.css.js.map +1 -1
  99. package/modern/title/alfasans-index.css +10 -10
  100. package/modern/title/alfasans-index.module.css.js +1 -1
  101. package/modern/title/common.css +8 -8
  102. package/modern/title/common.module.css.js +1 -1
  103. package/modern/title/common.module.css.js.map +1 -1
  104. package/modern/title/index.css +16 -16
  105. package/modern/title/index.module.css.js +1 -1
  106. package/modern/title/index.module.css.js.map +1 -1
  107. package/modern/title-mobile/alfasans-index.css +10 -10
  108. package/modern/title-mobile/alfasans-index.module.css.js +1 -1
  109. package/modern/title-mobile/index.css +15 -15
  110. package/modern/title-mobile/index.module.css.js +1 -1
  111. package/modern/title-mobile/index.module.css.js.map +1 -1
  112. package/moderncssm/colors.module.css +2 -0
  113. package/moderncssm/text/alfasans-index.module.css +87 -32
  114. package/moderncssm/text/index.module.css +21 -0
  115. package/moderncssm/title/alfasans-index.module.css +20 -13
  116. package/moderncssm/title/common.module.css +2 -0
  117. package/moderncssm/title/index.module.css +15 -0
  118. package/moderncssm/title-mobile/alfasans-index.module.css +20 -13
  119. package/moderncssm/title-mobile/index.module.css +14 -0
  120. package/package.json +6 -6
  121. package/src/colors.module.css +1 -1
  122. package/src/text/index.module.css +1 -1
  123. package/src/title/common.module.css +1 -1
  124. package/src/title/index.module.css +1 -1
  125. package/src/title-mobile/index.module.css +1 -1
  126. package/text/alfasans-index.css +29 -29
  127. package/text/alfasans-index.module.css.js +1 -1
  128. package/text/index.css +21 -21
  129. package/text/index.module.css.js +1 -1
  130. package/text/index.module.css.js.map +1 -1
  131. package/title/alfasans-index.css +10 -10
  132. package/title/alfasans-index.module.css.js +1 -1
  133. package/title/common.css +8 -8
  134. package/title/common.module.css.js +1 -1
  135. package/title/common.module.css.js.map +1 -1
  136. package/title/index.css +16 -16
  137. package/title/index.module.css.js +1 -1
  138. package/title/index.module.css.js.map +1 -1
  139. package/title-mobile/alfasans-index.css +10 -10
  140. package/title-mobile/alfasans-index.module.css.js +1 -1
  141. package/title-mobile/index.css +15 -15
  142. package/title-mobile/index.module.css.js +1 -1
  143. package/title-mobile/index.module.css.js.map +1 -1
package/colors.css CHANGED
@@ -19,44 +19,44 @@
19
19
  --color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
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
- } .typography__tertiary_15n0e {
22
+ } .typography__tertiary_1avym {
23
23
  color: var(--color-light-text-tertiary);
24
- } .typography__disabled_15n0e {
24
+ } .typography__disabled_1avym {
25
25
  color: var(--color-light-text-quaternary);
26
- } .typography__accent_15n0e {
26
+ } .typography__accent_1avym {
27
27
  color: var(--color-light-accent-primary);
28
- } .typography__primary_15n0e {
28
+ } .typography__primary_1avym {
29
29
  color: var(--color-light-text-primary);
30
- } .typography__attention_15n0e {
30
+ } .typography__attention_1avym {
31
31
  color: var(--color-light-text-attention);
32
- } .typography__positive_15n0e {
32
+ } .typography__positive_1avym {
33
33
  color: var(--color-light-text-positive);
34
- } .typography__secondary_15n0e {
34
+ } .typography__secondary_1avym {
35
35
  color: var(--color-light-text-secondary);
36
- } .typography__tertiary-inverted_15n0e {
36
+ } .typography__tertiary-inverted_1avym {
37
37
  color: var(--color-light-text-tertiary-inverted);
38
- } .typography__primary-inverted_15n0e {
38
+ } .typography__primary-inverted_1avym {
39
39
  color: var(--color-light-text-primary-inverted);
40
- } .typography__secondary-inverted_15n0e {
40
+ } .typography__secondary-inverted_1avym {
41
41
  color: var(--color-light-text-secondary-inverted);
42
- } .typography__link_15n0e {
42
+ } .typography__link_1avym {
43
43
  color: var(--color-light-text-info);
44
- } .typography__negative_15n0e {
44
+ } .typography__negative_1avym {
45
45
  color: var(--color-light-text-negative);
46
- } .typography__static-primary-light_15n0e {
46
+ } .typography__static-primary-light_1avym {
47
47
  color: var(--color-static-text-primary-light);
48
- } .typography__static-secondary-light_15n0e {
48
+ } .typography__static-secondary-light_1avym {
49
49
  color: var(--color-static-text-secondary-light);
50
- } .typography__static-tertiary-light_15n0e {
50
+ } .typography__static-tertiary-light_1avym {
51
51
  color: var(--color-static-text-tertiary-light);
52
- } .typography__static-primary-dark_15n0e {
52
+ } .typography__static-primary-dark_1avym {
53
53
  color: var(--color-static-text-primary-dark);
54
- } .typography__static-secondary-dark_15n0e {
54
+ } .typography__static-secondary-dark_1avym {
55
55
  color: var(--color-static-text-secondary-dark);
56
- } .typography__static-tertiary-dark_15n0e {
56
+ } .typography__static-tertiary-dark_1avym {
57
57
  color: var(--color-static-text-tertiary-dark);
58
- } .typography__static-accent_15n0e {
58
+ } .typography__static-accent_1avym {
59
59
  color: var(--color-static-accent-primary);
60
- } .typography__static-positive_15n0e {
60
+ } .typography__static-positive_1avym {
61
61
  color: var(--color-static-text-positive);
62
62
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./colors.css');
4
4
 
5
- var colors = {"tertiary":"typography__tertiary_15n0e","disabled":"typography__disabled_15n0e","accent":"typography__accent_15n0e","primary":"typography__primary_15n0e","attention":"typography__attention_15n0e","positive":"typography__positive_15n0e","secondary":"typography__secondary_15n0e","tertiary-inverted":"typography__tertiary-inverted_15n0e","primary-inverted":"typography__primary-inverted_15n0e","secondary-inverted":"typography__secondary-inverted_15n0e","link":"typography__link_15n0e","negative":"typography__negative_15n0e","static-primary-light":"typography__static-primary-light_15n0e","static-secondary-light":"typography__static-secondary-light_15n0e","static-tertiary-light":"typography__static-tertiary-light_15n0e","static-primary-dark":"typography__static-primary-dark_15n0e","static-secondary-dark":"typography__static-secondary-dark_15n0e","static-tertiary-dark":"typography__static-tertiary-dark_15n0e","static-accent":"typography__static-accent_15n0e","static-positive":"typography__static-positive_15n0e"};
5
+ var colors = {"tertiary":"typography__tertiary_1avym","disabled":"typography__disabled_1avym","accent":"typography__accent_1avym","primary":"typography__primary_1avym","attention":"typography__attention_1avym","positive":"typography__positive_1avym","secondary":"typography__secondary_1avym","tertiary-inverted":"typography__tertiary-inverted_1avym","primary-inverted":"typography__primary-inverted_1avym","secondary-inverted":"typography__secondary-inverted_1avym","link":"typography__link_1avym","negative":"typography__negative_1avym","static-primary-light":"typography__static-primary-light_1avym","static-secondary-light":"typography__static-secondary-light_1avym","static-tertiary-light":"typography__static-tertiary-light_1avym","static-primary-dark":"typography__static-primary-dark_1avym","static-secondary-dark":"typography__static-secondary-dark_1avym","static-tertiary-dark":"typography__static-tertiary-dark_1avym","static-accent":"typography__static-accent_1avym","static-positive":"typography__static-positive_1avym"};
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/no-dynamic-mixins-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;;;;"}
@@ -0,0 +1,62 @@
1
+ :root {
2
+ --color-light-accent-primary: #ef3124;
3
+ --color-light-text-attention: #ea8313;
4
+ --color-light-text-info: #2a77ef;
5
+ --color-light-text-negative: #ec2d20;
6
+ --color-light-text-positive: #0d9336;
7
+ --color-light-text-primary: rgba(3, 3, 6, 0.88);
8
+ --color-light-text-primary-inverted: rgba(255, 255, 255, 0.94);
9
+ --color-light-text-quaternary: rgba(5, 11, 44, 0.18);
10
+ --color-light-text-secondary: rgba(4, 4, 19, 0.55);
11
+ --color-light-text-secondary-inverted: rgba(238, 238, 251, 0.55);
12
+ --color-light-text-tertiary: rgba(5, 8, 29, 0.38);
13
+ --color-light-text-tertiary-inverted: rgba(233, 233, 250, 0.37);
14
+ --color-static-accent-primary: #ef3124;
15
+ --color-static-text-positive: #0d9336;
16
+ --color-static-text-primary-dark: #0e0e0e;
17
+ --color-static-text-primary-light: #fff;
18
+ --color-static-text-secondary-dark: rgba(4, 4, 19, 0.55);
19
+ --color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
20
+ --color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
21
+ --color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
22
+ } .typography__tertiary_1avym {
23
+ color: var(--color-light-text-tertiary);
24
+ } .typography__disabled_1avym {
25
+ color: var(--color-light-text-quaternary);
26
+ } .typography__accent_1avym {
27
+ color: var(--color-light-accent-primary);
28
+ } .typography__primary_1avym {
29
+ color: var(--color-light-text-primary);
30
+ } .typography__attention_1avym {
31
+ color: var(--color-light-text-attention);
32
+ } .typography__positive_1avym {
33
+ color: var(--color-light-text-positive);
34
+ } .typography__secondary_1avym {
35
+ color: var(--color-light-text-secondary);
36
+ } .typography__tertiary-inverted_1avym {
37
+ color: var(--color-light-text-tertiary-inverted);
38
+ } .typography__primary-inverted_1avym {
39
+ color: var(--color-light-text-primary-inverted);
40
+ } .typography__secondary-inverted_1avym {
41
+ color: var(--color-light-text-secondary-inverted);
42
+ } .typography__link_1avym {
43
+ color: var(--color-light-text-info);
44
+ } .typography__negative_1avym {
45
+ color: var(--color-light-text-negative);
46
+ } .typography__static-primary-light_1avym {
47
+ color: var(--color-static-text-primary-light);
48
+ } .typography__static-secondary-light_1avym {
49
+ color: var(--color-static-text-secondary-light);
50
+ } .typography__static-tertiary-light_1avym {
51
+ color: var(--color-static-text-tertiary-light);
52
+ } .typography__static-primary-dark_1avym {
53
+ color: var(--color-static-text-primary-dark);
54
+ } .typography__static-secondary-dark_1avym {
55
+ color: var(--color-static-text-secondary-dark);
56
+ } .typography__static-tertiary-dark_1avym {
57
+ color: var(--color-static-text-tertiary-dark);
58
+ } .typography__static-accent_1avym {
59
+ color: var(--color-static-accent-primary);
60
+ } .typography__static-positive_1avym {
61
+ color: var(--color-static-text-positive);
62
+ }
@@ -0,0 +1,2 @@
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];
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var colors = [
6
+ 'tertiary',
7
+ 'disabled',
8
+ 'accent',
9
+ 'primary',
10
+ 'attention',
11
+ 'positive',
12
+ 'secondary',
13
+ 'tertiary-inverted',
14
+ 'primary-inverted',
15
+ 'secondary-inverted',
16
+ 'link',
17
+ 'negative',
18
+ 'static-primary-light',
19
+ 'static-secondary-light',
20
+ 'static-tertiary-light',
21
+ 'static-primary-dark',
22
+ 'static-secondary-dark',
23
+ 'static-tertiary-dark',
24
+ 'static-accent',
25
+ 'static-positive',
26
+ ];
27
+
28
+ exports.colors = colors;
29
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":";;;;AAAa,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;;;;;"}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ require('./colors.css');
4
+
5
+ var colors = {"tertiary":"typography__tertiary_1avym","disabled":"typography__disabled_1avym","accent":"typography__accent_1avym","primary":"typography__primary_1avym","attention":"typography__attention_1avym","positive":"typography__positive_1avym","secondary":"typography__secondary_1avym","tertiary-inverted":"typography__tertiary-inverted_1avym","primary-inverted":"typography__primary-inverted_1avym","secondary-inverted":"typography__secondary-inverted_1avym","link":"typography__link_1avym","negative":"typography__negative_1avym","static-primary-light":"typography__static-primary-light_1avym","static-secondary-light":"typography__static-secondary-light_1avym","static-tertiary-light":"typography__static-tertiary-light_1avym","static-primary-dark":"typography__static-primary-dark_1avym","static-secondary-dark":"typography__static-secondary-dark_1avym","static-tertiary-dark":"typography__static-tertiary-dark_1avym","static-accent":"typography__static-accent_1avym","static-positive":"typography__static-positive_1avym"};
6
+
7
+ module.exports = colors;
8
+ //# sourceMappingURL=colors.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-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;;;;"}
@@ -0,0 +1,13 @@
1
+ import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { Text, TextProps } from './text';
3
+ import { Title, TitleProps } from './title';
4
+ import { TitleMobile, TitleMobileProps } from './title-mobile';
5
+ import { TitleResponsive, TitleResponsiveProps } from './title-responsive';
6
+ import { TextElementType } from './types';
7
+ export declare const Typography: {
8
+ Title: FC<TitleProps>;
9
+ Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
10
+ TitleResponsive: FC<TitleResponsiveProps>;
11
+ TitleMobile: FC<TitleMobileProps>;
12
+ };
13
+ export { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var component = require('./text/component.js');
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');
9
+
10
+ var Typography = {
11
+ Title: index.Title,
12
+ Text: component.Text,
13
+ TitleResponsive: component$1.TitleResponsive,
14
+ TitleMobile: component$2.TitleMobile,
15
+ };
16
+
17
+ exports.Text = component.Text;
18
+ exports.TitleDesktop = index.Title;
19
+ exports.TitleMobile = component$2.TitleMobile;
20
+ exports.TitleResponsive = component$1.TitleResponsive;
21
+ exports.Typography = Typography;
22
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';\n\nimport { Text, TextProps } from './text';\nimport { Title, TitleProps } from './title';\nimport { TitleMobile, TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, TitleResponsiveProps } from './title-responsive';\nimport { TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":["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;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ export * from './component';
2
+ export * from './presets';
3
+ export type { TitleProps } from './title';
4
+ export type { TextProps } from './text';
5
+ export type { Color } from './colors';
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var component = require('./component.js');
6
+ var presets = require('./presets.js');
7
+ var component$1 = require('./text/component.js');
8
+ var index = require('./title/index.js');
9
+ var component$2 = require('./title-responsive/component.js');
10
+ var component$3 = require('./title-mobile/component.js');
11
+
12
+
13
+
14
+ exports.Typography = component.Typography;
15
+ exports.typographyPresets = presets.typographyPresets;
16
+ exports.Text = component$1.Text;
17
+ exports.TitleDesktop = index.Title;
18
+ exports.TitleResponsive = component$2.TitleResponsive;
19
+ exports.TitleMobile = component$3.TitleMobile;
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,17 @@
1
+ export declare const typographyPresets: {
2
+ mobile: {
3
+ list: {
4
+ text: {
5
+ primary: {
6
+ tag: string;
7
+ view: string;
8
+ };
9
+ secondary: {
10
+ tag: string;
11
+ color: string;
12
+ view: string;
13
+ };
14
+ };
15
+ };
16
+ };
17
+ };
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var typographyPresets = {
6
+ mobile: {
7
+ list: {
8
+ text: {
9
+ primary: {
10
+ tag: 'div',
11
+ view: 'primary-medium',
12
+ },
13
+ secondary: {
14
+ tag: 'div',
15
+ color: 'secondary',
16
+ view: 'primary-small',
17
+ },
18
+ },
19
+ },
20
+ },
21
+ };
22
+
23
+ exports.typographyPresets = typographyPresets;
24
+ //# sourceMappingURL=presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":";;;;AAAa,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;;;;;"}
@@ -0,0 +1,108 @@
1
+ :root {
2
+ --font-family-alfasans: 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
3
+ 'Helvetica Neue', Helvetica, sans-serif;
4
+ } .typography__text_2jg1w.typography__component_2jg1w {
5
+ font-size: 16px;
6
+ line-height: 20px;
7
+ font-weight: 400;
8
+ letter-spacing: -0.24px;
9
+ font-family: var(--font-family-alfasans);
10
+ } .typography__text_2jg1w.typography__caps_2jg1w {
11
+ font-size: 12px;
12
+ line-height: 16px;
13
+ font-weight: 400;
14
+ letter-spacing: 1.25px;
15
+ text-transform: uppercase;
16
+ font-family: var(--font-family-alfasans);
17
+ } .typography__text_2jg1w.typography__tagline_2jg1w {
18
+ font-size: 12px;
19
+ line-height: 16px;
20
+ font-weight: 400;
21
+ letter-spacing: 1.25px;
22
+ text-transform: uppercase;
23
+ font-family: var(--font-family-alfasans);
24
+ } .typography__text_2jg1w.typography__primary-large_2jg1w {
25
+ font-size: 18px;
26
+ line-height: 24px;
27
+ font-weight: 400;
28
+ letter-spacing: -0.36px;
29
+ font-family: var(--font-family-alfasans)
30
+ } .typography__text_2jg1w.typography__primary-large_2jg1w.typography__bold_2jg1w {
31
+ letter-spacing: 0.38px;
32
+ } .typography__text_2jg1w.typography__primary-large_2jg1w.typography__medium_2jg1w {
33
+ letter-spacing: 0.17px;
34
+ } .typography__text_2jg1w.typography__primary-medium_2jg1w {
35
+ font-size: 16px;
36
+ line-height: 24px;
37
+ font-weight: 400;
38
+ letter-spacing: -0.24px;
39
+ font-family: var(--font-family-alfasans)
40
+ } .typography__text_2jg1w.typography__primary-medium_2jg1w.typography__bold_2jg1w {
41
+ letter-spacing: 0.43px;
42
+ } .typography__text_2jg1w.typography__primary-medium_2jg1w.typography__medium_2jg1w {
43
+ letter-spacing: 0.17px;
44
+ } .typography__text_2jg1w.typography__primary-small_2jg1w {
45
+ font-size: 14px;
46
+ line-height: 20px;
47
+ font-weight: 400;
48
+ letter-spacing: -0.08px;
49
+ font-family: var(--font-family-alfasans)
50
+ } .typography__text_2jg1w.typography__primary-small_2jg1w.typography__bold_2jg1w {
51
+ letter-spacing: 0.47px;
52
+ } .typography__text_2jg1w.typography__primary-small_2jg1w.typography__medium_2jg1w {
53
+ letter-spacing: 0.27px;
54
+ } .typography__text_2jg1w.typography__component-primary_2jg1w {
55
+ font-size: 16px;
56
+ line-height: 20px;
57
+ font-weight: 400;
58
+ letter-spacing: -0.24px;
59
+ font-family: var(--font-family-alfasans)
60
+ } .typography__text_2jg1w.typography__component-primary_2jg1w.typography__bold_2jg1w {
61
+ letter-spacing: 0.43px;
62
+ } .typography__text_2jg1w.typography__component-primary_2jg1w.typography__medium_2jg1w {
63
+ letter-spacing: 0.17px;
64
+ } .typography__text_2jg1w.typography__secondary-large_2jg1w {
65
+ font-size: 13px;
66
+ line-height: 16px;
67
+ font-weight: 400;
68
+ letter-spacing: 0;
69
+ font-family: var(--font-family-alfasans)
70
+ } .typography__text_2jg1w.typography__secondary-large_2jg1w.typography__bold_2jg1w {
71
+ letter-spacing: 0.54px;
72
+ } .typography__text_2jg1w.typography__secondary-large_2jg1w.typography__medium_2jg1w {
73
+ letter-spacing: 0.33px;
74
+ } .typography__text_2jg1w.typography__secondary-medium_2jg1w {
75
+ font-size: 12px;
76
+ line-height: 16px;
77
+ font-weight: 400;
78
+ letter-spacing: 0.06px;
79
+ font-family: var(--font-family-alfasans)
80
+ } .typography__text_2jg1w.typography__secondary-medium_2jg1w.typography__bold_2jg1w {
81
+ letter-spacing: 0.57px;
82
+ } .typography__text_2jg1w.typography__secondary-medium_2jg1w.typography__medium_2jg1w {
83
+ letter-spacing: 0.38px;
84
+ } .typography__text_2jg1w.typography__secondary-small_2jg1w {
85
+ font-size: 11px;
86
+ line-height: 16px;
87
+ font-weight: 400;
88
+ letter-spacing: 0.15px;
89
+ font-family: var(--font-family-alfasans)
90
+ } .typography__text_2jg1w.typography__secondary-small_2jg1w.typography__bold_2jg1w {
91
+ letter-spacing: 0.54px;
92
+ } .typography__text_2jg1w.typography__secondary-small_2jg1w.typography__medium_2jg1w {
93
+ letter-spacing: 0.41px;
94
+ } .typography__text_2jg1w.typography__component-secondary_2jg1w {
95
+ font-size: 14px;
96
+ line-height: 18px;
97
+ font-weight: 400;
98
+ letter-spacing: -0.08px;
99
+ font-family: var(--font-family-alfasans)
100
+ } .typography__text_2jg1w.typography__component-secondary_2jg1w.typography__bold_2jg1w {
101
+ letter-spacing: 0.47px;
102
+ } .typography__text_2jg1w.typography__component-secondary_2jg1w.typography__medium_2jg1w {
103
+ letter-spacing: 0.27px;
104
+ } .typography__text_2jg1w.typography__bold_2jg1w {
105
+ font-weight: 700;
106
+ } .typography__text_2jg1w.typography__medium_2jg1w {
107
+ font-weight: 500;
108
+ }
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ require('./alfasans-index.css');
4
+
5
+ var alfasansStyles = {"text":"typography__text_2jg1w","component":"typography__component_2jg1w","caps":"typography__caps_2jg1w","tagline":"typography__tagline_2jg1w","primary-large":"typography__primary-large_2jg1w","bold":"typography__bold_2jg1w","medium":"typography__medium_2jg1w","primary-medium":"typography__primary-medium_2jg1w","primary-small":"typography__primary-small_2jg1w","component-primary":"typography__component-primary_2jg1w","secondary-large":"typography__secondary-large_2jg1w","secondary-medium":"typography__secondary-medium_2jg1w","secondary-small":"typography__secondary-small_2jg1w","component-secondary":"typography__component-secondary_2jg1w"};
6
+
7
+ module.exports = alfasansStyles;
8
+ //# sourceMappingURL=alfasans-index.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alfasans-index.module.css.js","sources":["../src/text/alfasans-index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/alfasans-index.css';\n\n@define-mixin bold {\n font-weight: 700;\n}\n\n@define-mixin medium {\n font-weight: 500;\n}\n\n.text {\n @each $view in component, caps, tagline {\n &.$(view) {\n @mixin paragraph_$(view);\n }\n }\n\n @each $kind in primary, secondary {\n @each $size in large, medium, small {\n &.$(kind)-$(size) {\n /* prettier-ignore */\n @mixin paragraph_$(kind)_$(size);\n\n &.bold {\n @subtract-mixin accent_$(kind)_$(size), paragraph_$(kind)_$(size), bold;\n }\n\n &.medium {\n @subtract-mixin action_$(kind)_$(size), paragraph_$(kind)_$(size), medium;\n }\n }\n }\n\n &.component-$(kind) {\n @mixin paragraph_component_$(kind);\n\n &.bold {\n @subtract-mixin accent_component_$(kind), paragraph_component_$(kind), bold;\n }\n\n &.medium {\n @subtract-mixin action_component_$(kind), paragraph_component_$(kind), medium;\n }\n }\n }\n\n @each $weight in bold, medium {\n &.$(weight) {\n @mixin $(weight);\n }\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,qBAAe,CAAC,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,6BAA6B,CAAC,MAAM,CAAC,wBAAwB,CAAC,SAAS,CAAC,2BAA2B,CAAC,eAAe,CAAC,iCAAiC,CAAC,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC;;;;"}
@@ -0,0 +1,66 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { type TextSkeletonProps } from '@alfalab/core-components-skeleton';
3
+ import { Color } from '../colors';
4
+ import { TextElementType } from '../types';
5
+ declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
+ declare type TextBaseProps = {
7
+ /**
8
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
9
+ */
10
+ view?: 'primary-large' | 'primary-medium' | 'primary-small' | 'secondary-large' | 'secondary-medium' | 'secondary-small' | 'component' | 'component-primary' | 'component-secondary' | 'caps' | 'tagline';
11
+ /**
12
+ * Цвет текста
13
+ */
14
+ color?: Color;
15
+ /**
16
+ * Толщина шрифта
17
+ */
18
+ weight?: 'regular' | 'medium' | 'bold';
19
+ /**
20
+ * Делает цифры моноширинными
21
+ */
22
+ monospaceNumbers?: boolean;
23
+ /**
24
+ * HTML тег
25
+ */
26
+ tag?: 'span' | 'div';
27
+ /**
28
+ * Css-класс для стилизации (native prop)
29
+ */
30
+ className?: string;
31
+ /**
32
+ * Id компонента для тестов
33
+ */
34
+ dataTestId?: string;
35
+ /**
36
+ * Контент (native prop)
37
+ */
38
+ children?: React.ReactNode;
39
+ /**
40
+ * Добавляет отступы к тэгу 'p'
41
+ */
42
+ defaultMargins?: never;
43
+ /**
44
+ * Количество строк
45
+ */
46
+ rowLimit?: 1 | 2 | 3;
47
+ /**
48
+ * Показать скелетон
49
+ */
50
+ showSkeleton?: boolean;
51
+ /**
52
+ * Пропы для скелетона
53
+ */
54
+ skeletonProps?: TextSkeletonProps;
55
+ /**
56
+ * Шрифт текста
57
+ */
58
+ font?: 'alfasans' | undefined | null;
59
+ };
60
+ declare type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
61
+ tag?: 'p';
62
+ defaultMargins?: boolean;
63
+ };
64
+ export declare type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
65
+ export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
66
+ export {};
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var React = require('react');
7
+ var mergeRefs = require('react-merge-refs');
8
+ var cn = require('classnames');
9
+ var dynamicMixins = require('@alfalab/core-components-skeleton/dynamic-mixins');
10
+ var colors_module = require('../colors.module.css.js');
11
+ var alfasansIndex_module = require('./alfasans-index.module.css.js');
12
+ var index_module = require('./index.module.css.js');
13
+
14
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
+
16
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
17
+ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
18
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
19
+
20
+ var logWarning = function (view) {
21
+ if (process.env.NODE_ENV !== 'development') {
22
+ return;
23
+ }
24
+ var viewsMap = {
25
+ component: 'component-primary',
26
+ };
27
+ // eslint-disable-next-line no-console
28
+ console.warn(
29
+ // eslint-disable-next-line prefer-template
30
+ "@alfalab/core-components/typography: view='".concat(view, "' \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u043C\u0430\u0436\u043E\u0440\u043D\u044B\u0445 \u0432\u0435\u0440\u0441\u0438\u044F\u0445. ") +
31
+ "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 view='".concat(viewsMap[view], "'."));
32
+ };
33
+ var Text = React.forwardRef(function (_a, ref) {
34
+ var _b, _c;
35
+ var _d = _a.view, view = _d === void 0 ? 'primary-medium' : _d, _e = _a.tag, Component = _e === void 0 ? 'span' : _e, weight = _a.weight, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, _g = _a.defaultMargins, defaultMargins = _g === void 0 ? true : _g, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, rowLimit = _a.rowLimit, showSkeleton = _a.showSkeleton, skeletonProps = _a.skeletonProps, font = _a.font, restProps = tslib.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "defaultMargins", "color", "className", "dataTestId", "children", "rowLimit", "showSkeleton", "skeletonProps", "font"]);
36
+ if (view === 'component') {
37
+ logWarning(view);
38
+ }
39
+ var _h = dynamicMixins.useSkeleton(showSkeleton, skeletonProps), renderSkeleton = _h.renderSkeleton, textRef = _h.textRef;
40
+ var skeleton = renderSkeleton({
41
+ wrapperClassName: cn__default.default((_b = {},
42
+ _b[index_module.paragraphWithMargins] = Component === 'p' && defaultMargins,
43
+ _b)),
44
+ dataTestId: dataTestId,
45
+ });
46
+ if (skeleton) {
47
+ return skeleton;
48
+ }
49
+ return (React__default.default.createElement(Component, tslib.__assign({ className: cn__default.default((_c = {},
50
+ _c[index_module.paragraph] = Component === 'p' && !defaultMargins,
51
+ _c[index_module.paragraphWithMargins] = Component === 'p' && defaultMargins,
52
+ _c[index_module.monospace] = monospaceNumbers,
53
+ _c[index_module["rowLimit".concat(rowLimit)]] = rowLimit,
54
+ _c[index_module.transparent] = showSkeleton,
55
+ _c[alfasansIndex_module.text] = font === 'alfasans',
56
+ _c), className, color && colors_module[color], (font === 'alfasans' ? alfasansIndex_module : index_module)[view], weight && (font === 'alfasans' ? alfasansIndex_module : index_module)[weight]), "data-test-id": dataTestId, ref: mergeRefs__default.default([ref, textRef]) }, restProps), children));
57
+ });
58
+
59
+ exports.Text = Text;
60
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { Color } from '../colors';\nimport { TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport alfasansStyles from './alfasans-index.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nconst logWarning = (view: Required<TextBaseProps>['view']) => {\n if (process.env.NODE_ENV !== 'development') {\n return;\n }\n\n const viewsMap: { [key: string]: string } = {\n component: 'component-primary',\n };\n\n // eslint-disable-next-line no-console\n console.warn(\n // eslint-disable-next-line prefer-template\n `@alfalab/core-components/typography: view='${view}' будет удален в следующих мажорных версиях. ` +\n `Используйте view='${viewsMap[view]}'.`,\n );\n};\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n if (view === 'component') {\n logWarning(view);\n }\n\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n [alfasansStyles.text]: font === 'alfasans',\n },\n className,\n color && colors[color],\n (font === 'alfasans' ? alfasansStyles : styles)[view],\n weight && (font === 'alfasans' ? alfasansStyles : styles)[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","cn","styles","React","__assign","alfasansStyles","colors","mergeRefs"],"mappings":"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"}