@alfalab/core-components-typography 2.0.0 → 2.3.0

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 (68) hide show
  1. package/CHANGELOG.md +32 -9
  2. package/dist/colors.css +13 -13
  3. package/dist/{colors.module-9d3e0282.d.ts → colors.module-35c48cf7.d.ts} +0 -0
  4. package/dist/{colors.module-9d3e0282.js → colors.module-35c48cf7.js} +1 -1
  5. package/dist/common.module-8f8baeca.js +6 -0
  6. package/dist/component.js +2 -2
  7. package/dist/cssm/index.d.ts +2 -0
  8. package/dist/cssm/text/component.d.ts +40 -2
  9. package/dist/cssm/text/component.js +4 -4
  10. package/dist/cssm/text/index.module.css +4 -0
  11. package/dist/cssm/title/component.d.ts +39 -1
  12. package/dist/cssm/title/component.js +3 -3
  13. package/dist/esm/colors.css +13 -13
  14. package/dist/esm/{colors.module-afa89fff.d.ts → colors.module-2c206829.d.ts} +0 -0
  15. package/dist/esm/{colors.module-afa89fff.js → colors.module-2c206829.js} +1 -1
  16. package/dist/esm/common.module-c6bc7a27.js +4 -0
  17. package/dist/esm/component.js +2 -2
  18. package/dist/esm/index.d.ts +2 -0
  19. package/dist/esm/index.js +2 -2
  20. package/dist/esm/text/component.d.ts +40 -2
  21. package/dist/esm/text/component.js +7 -7
  22. package/dist/esm/text/index.css +17 -13
  23. package/dist/esm/text/index.js +1 -1
  24. package/dist/esm/title/common.css +5 -5
  25. package/dist/esm/title/component.d.ts +39 -1
  26. package/dist/esm/title/component.js +5 -5
  27. package/dist/esm/title/index.css +19 -19
  28. package/dist/esm/title/index.js +3 -3
  29. package/dist/esm/title-responsive/component.js +3 -3
  30. package/dist/esm/title-responsive/index.css +46 -46
  31. package/dist/esm/title-responsive/index.js +2 -2
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +2 -2
  34. package/dist/modern/colors.css +13 -13
  35. package/dist/modern/colors.module-148ba739.js +4 -0
  36. package/dist/modern/common.module-c6bc7a27.js +4 -0
  37. package/dist/modern/component.js +2 -2
  38. package/dist/modern/index.d.ts +2 -0
  39. package/dist/modern/index.js +2 -2
  40. package/dist/modern/text/component.d.ts +40 -2
  41. package/dist/modern/text/component.js +4 -4
  42. package/dist/modern/text/index.css +17 -13
  43. package/dist/modern/text/index.js +1 -1
  44. package/dist/modern/title/common.css +5 -5
  45. package/dist/modern/title/component.d.ts +39 -1
  46. package/dist/modern/title/component.js +3 -3
  47. package/dist/modern/title/index.css +19 -19
  48. package/dist/modern/title/index.js +3 -3
  49. package/dist/modern/title-responsive/component.js +3 -3
  50. package/dist/modern/title-responsive/index.css +46 -46
  51. package/dist/modern/title-responsive/index.js +2 -2
  52. package/dist/text/component.d.ts +40 -2
  53. package/dist/text/component.js +6 -6
  54. package/dist/text/index.css +17 -13
  55. package/dist/text/index.js +1 -1
  56. package/dist/title/common.css +5 -5
  57. package/dist/title/component.d.ts +39 -1
  58. package/dist/title/component.js +4 -4
  59. package/dist/title/index.css +19 -19
  60. package/dist/title/index.js +3 -3
  61. package/dist/title-responsive/component.js +3 -3
  62. package/dist/title-responsive/index.css +46 -46
  63. package/dist/title-responsive/index.js +2 -2
  64. package/package.json +2 -2
  65. package/dist/common.module-d3c5fce9.js +0 -6
  66. package/dist/esm/common.module-a42136b2.js +0 -4
  67. package/dist/modern/colors.module-8212a0a2.js +0 -4
  68. package/dist/modern/common.module-a42136b2.js +0 -4
package/CHANGELOG.md CHANGED
@@ -3,31 +3,54 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [2.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@1.5.1...@alfalab/core-components-typography@2.0.0) (2021-07-08)
6
+ # [2.3.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@2.2.0...@alfalab/core-components-typography@2.3.0) (2022-01-17)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
- * upgrade storybook ([#696](https://github.com/alfa-laboratory/core-components/issues/696)) ([bf8350e](https://github.com/alfa-laboratory/core-components/commit/bf8350ebfd238b6c63ac30545ac32ca933f498d6)), closes [#708](https://github.com/alfa-laboratory/core-components/issues/708) [#707](https://github.com/alfa-laboratory/core-components/issues/707) [#714](https://github.com/alfa-laboratory/core-components/issues/714) [#716](https://github.com/alfa-laboratory/core-components/issues/716) [#690](https://github.com/alfa-laboratory/core-components/issues/690) [#701](https://github.com/alfa-laboratory/core-components/issues/701) [#699](https://github.com/alfa-laboratory/core-components/issues/699) [#698](https://github.com/alfa-laboratory/core-components/issues/698) [#693](https://github.com/alfa-laboratory/core-components/issues/693) [#699](https://github.com/alfa-laboratory/core-components/issues/699) [#698](https://github.com/alfa-laboratory/core-components/issues/698) [#693](https://github.com/alfa-laboratory/core-components/issues/693) [#705](https://github.com/alfa-laboratory/core-components/issues/705) [#705](https://github.com/alfa-laboratory/core-components/issues/705) [#709](https://github.com/alfa-laboratory/core-components/issues/709) [#703](https://github.com/alfa-laboratory/core-components/issues/703) [#695](https://github.com/alfa-laboratory/core-components/issues/695) [#673](https://github.com/alfa-laboratory/core-components/issues/673) [#703](https://github.com/alfa-laboratory/core-components/issues/703) [#709](https://github.com/alfa-laboratory/core-components/issues/709) [#673](https://github.com/alfa-laboratory/core-components/issues/673) [#695](https://github.com/alfa-laboratory/core-components/issues/695) [#645](https://github.com/alfa-laboratory/core-components/issues/645) [#642](https://github.com/alfa-laboratory/core-components/issues/642) [#642](https://github.com/alfa-laboratory/core-components/issues/642) [#646](https://github.com/alfa-laboratory/core-components/issues/646) [#646](https://github.com/alfa-laboratory/core-components/issues/646) [#634](https://github.com/alfa-laboratory/core-components/issues/634) [#635](https://github.com/alfa-laboratory/core-components/issues/635) [#634](https://github.com/alfa-laboratory/core-components/issues/634) [#635](https://github.com/alfa-laboratory/core-components/issues/635) [#648](https://github.com/alfa-laboratory/core-components/issues/648) [#647](https://github.com/alfa-laboratory/core-components/issues/647) [#630](https://github.com/alfa-laboratory/core-components/issues/630) [#648](https://github.com/alfa-laboratory/core-components/issues/648) [#630](https://github.com/alfa-laboratory/core-components/issues/630) [#669](https://github.com/alfa-laboratory/core-components/issues/669) [#712](https://github.com/alfa-laboratory/core-components/issues/712) [#713](https://github.com/alfa-laboratory/core-components/issues/713) [#719](https://github.com/alfa-laboratory/core-components/issues/719) [#720](https://github.com/alfa-laboratory/core-components/issues/720) [#718](https://github.com/alfa-laboratory/core-components/issues/718) [#712](https://github.com/alfa-laboratory/core-components/issues/712) [#713](https://github.com/alfa-laboratory/core-components/issues/713) [#719](https://github.com/alfa-laboratory/core-components/issues/719) [#642](https://github.com/alfa-laboratory/core-components/issues/642) [#642](https://github.com/alfa-laboratory/core-components/issues/642) [#646](https://github.com/alfa-laboratory/core-components/issues/646) [#646](https://github.com/alfa-laboratory/core-components/issues/646) [#634](https://github.com/alfa-laboratory/core-components/issues/634) [#635](https://github.com/alfa-laboratory/core-components/issues/635) [#634](https://github.com/alfa-laboratory/core-components/issues/634) [#635](https://github.com/alfa-laboratory/core-components/issues/635) [#648](https://github.com/alfa-laboratory/core-components/issues/648) [#647](https://github.com/alfa-laboratory/core-components/issues/647) [#630](https://github.com/alfa-laboratory/core-components/issues/630) [#648](https://github.com/alfa-laboratory/core-components/issues/648) [#630](https://github.com/alfa-laboratory/core-components/issues/630) [#669](https://github.com/alfa-laboratory/core-components/issues/669) [#720](https://github.com/alfa-laboratory/core-components/issues/720) [#718](https://github.com/alfa-laboratory/core-components/issues/718) [#691](https://github.com/alfa-laboratory/core-components/issues/691) [#691](https://github.com/alfa-laboratory/core-components/issues/691) [#723](https://github.com/alfa-laboratory/core-components/issues/723) [#702](https://github.com/alfa-laboratory/core-components/issues/702) [#723](https://github.com/alfa-laboratory/core-components/issues/723) [#702](https://github.com/alfa-laboratory/core-components/issues/702) [#708](https://github.com/alfa-laboratory/core-components/issues/708) [#707](https://github.com/alfa-laboratory/core-components/issues/707) [#714](https://github.com/alfa-laboratory/core-components/issues/714) [#722](https://github.com/alfa-laboratory/core-components/issues/722)
11
+ * **typography:** export types ([#940](https://github.com/alfa-laboratory/core-components/issues/940)) ([498227c](https://github.com/alfa-laboratory/core-components/commit/498227c272659a1ebf890eee61c6fecdd110faee))
12
12
 
13
13
 
14
- ### BREAKING CHANGES
15
14
 
16
- * buttonRetryText renamed to buttonReturnText
17
15
 
18
- Co-authored-by: Alexander Soldatov <aesoldatov@alfabank.ru>
19
- * inline-block changes to block
20
16
 
21
- * chore(release): 18.0.0 [skip ci]
17
+ # [2.2.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@2.1.0...@alfalab/core-components-typography@2.2.0) (2021-09-14)
22
18
 
23
- # [18.0.0](https://github.com/alfa-laboratory/core-components/compare/v17.6.0...v18.0.0) (2021-06-28)
24
19
 
25
- ### Bug Fixes
20
+ ### Features
21
+
22
+ * **typography:** add ref ([#834](https://github.com/alfa-laboratory/core-components/issues/834)) ([976b16d](https://github.com/alfa-laboratory/core-components/commit/976b16dd9ae68c31999bffb3506623db05033ad4))
23
+
24
+
25
+
26
+
27
+
28
+ # [2.1.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@2.0.1...@alfalab/core-components-typography@2.1.0) (2021-07-19)
29
+
30
+
31
+ ### Features
32
+
33
+ * **typography:** monospaceNumbers prop (PDS-255) ([#697](https://github.com/alfa-laboratory/core-components/issues/697)) ([42d16a6](https://github.com/alfa-laboratory/core-components/commit/42d16a62f6d0781eba44dc1e0b76b28cae37d89a))
26
34
 
27
35
 
28
36
 
29
37
 
30
38
 
39
+ ## [2.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@2.0.0...@alfalab/core-components-typography@2.0.1) (2021-07-09)
40
+
41
+ **Note:** Version bump only for package @alfalab/core-components-typography
42
+
43
+
44
+
45
+
46
+
47
+ # [2.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@1.5.1...@alfalab/core-components-typography@2.0.0) (2021-07-08)
48
+
49
+
50
+ ### Features
51
+
52
+ * upgrade storybook ([#696](https://github.com/alfa-laboratory/core-components/issues/696))
53
+
31
54
  ## [1.5.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@1.5.0...@alfalab/core-components-typography@1.5.1) (2021-06-28)
32
55
 
33
56
 
package/dist/colors.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1penk */
1
+ /* hash: 7rmvg */
2
2
  :root {
3
3
  --color-light-text-accent: #ef3124;
4
4
  --color-light-text-attention: #de6a00;
@@ -22,39 +22,39 @@
22
22
  /* Hard up */
23
23
  }
24
24
  /* colors */
25
- .typography__tertiary_1penk {
25
+ .typography__tertiary_1t8fi {
26
26
  color: var(--color-light-text-tertiary);
27
27
  }
28
- .typography__disabled_1penk {
28
+ .typography__disabled_1t8fi {
29
29
  color: var(--color-light-text-disabled);
30
30
  }
31
- .typography__accent_1penk {
31
+ .typography__accent_1t8fi {
32
32
  color: var(--color-light-text-accent);
33
33
  }
34
- .typography__primary_1penk {
34
+ .typography__primary_1t8fi {
35
35
  color: var(--color-light-text-primary);
36
36
  }
37
- .typography__attention_1penk {
37
+ .typography__attention_1t8fi {
38
38
  color: var(--color-light-text-attention);
39
39
  }
40
- .typography__positive_1penk {
40
+ .typography__positive_1t8fi {
41
41
  color: var(--color-light-text-positive);
42
42
  }
43
- .typography__secondary_1penk {
43
+ .typography__secondary_1t8fi {
44
44
  color: var(--color-light-text-secondary);
45
45
  }
46
- .typography__tertiary-inverted_1penk {
46
+ .typography__tertiary-inverted_1t8fi {
47
47
  color: var(--color-light-text-tertiary-inverted);
48
48
  }
49
- .typography__primary-inverted_1penk {
49
+ .typography__primary-inverted_1t8fi {
50
50
  color: var(--color-light-text-primary-inverted);
51
51
  }
52
- .typography__secondary-inverted_1penk {
52
+ .typography__secondary-inverted_1t8fi {
53
53
  color: var(--color-light-text-secondary-inverted);
54
54
  }
55
- .typography__link_1penk {
55
+ .typography__link_1t8fi {
56
56
  color: var(--color-light-text-link);
57
57
  }
58
- .typography__negative_1penk {
58
+ .typography__negative_1t8fi {
59
59
  color: var(--color-light-text-negative);
60
60
  }
@@ -39,7 +39,7 @@ function __rest(s, e) {
39
39
  return t;
40
40
  }
41
41
 
42
- var colors = {"tertiary":"typography__tertiary_1penk","disabled":"typography__disabled_1penk","accent":"typography__accent_1penk","primary":"typography__primary_1penk","attention":"typography__attention_1penk","positive":"typography__positive_1penk","secondary":"typography__secondary_1penk","tertiary-inverted":"typography__tertiary-inverted_1penk","primary-inverted":"typography__primary-inverted_1penk","secondary-inverted":"typography__secondary-inverted_1penk","link":"typography__link_1penk","negative":"typography__negative_1penk"};
42
+ var colors = {"tertiary":"typography__tertiary_1t8fi","disabled":"typography__disabled_1t8fi","accent":"typography__accent_1t8fi","primary":"typography__primary_1t8fi","attention":"typography__attention_1t8fi","positive":"typography__positive_1t8fi","secondary":"typography__secondary_1t8fi","tertiary-inverted":"typography__tertiary-inverted_1t8fi","primary-inverted":"typography__primary-inverted_1t8fi","secondary-inverted":"typography__secondary-inverted_1t8fi","link":"typography__link_1t8fi","negative":"typography__negative_1t8fi"};
43
43
  require('./colors.css')
44
44
 
45
45
  exports.__rest = __rest;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var commonStyles = {"component":"typography__component_1mh7d","bold":"typography__bold_1mh7d","medium":"typography__medium_1mh7d","regular":"typography__regular_1mh7d"};
4
+ require('./title/common.css')
5
+
6
+ exports.commonStyles = commonStyles;
package/dist/component.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./colors.module-9d3e0282.js');
5
+ require('./colors.module-35c48cf7.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('./title/component.js');
9
- require('./common.module-d3c5fce9.js');
9
+ require('./common.module-8f8baeca.js');
10
10
  var title_index = require('./title/index.js');
11
11
  var text_component = require('./text/component.js');
12
12
  var titleResponsive_component = require('./title-responsive/component.js');
@@ -1 +1,3 @@
1
1
  export * from "./component";
2
+ export { TitleProps } from "./title/index";
3
+ export { TextProps } from "./text/index";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { HTMLAttributes, FC } from "react";
3
+ import { HTMLAttributes } from "react";
4
4
  import { Color } from "../colors";
5
5
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
6
  type TextProps = Omit<NativeProps, 'color'> & {
@@ -16,6 +16,10 @@ type TextProps = Omit<NativeProps, 'color'> & {
16
16
  * Толщина шрифта
17
17
  */
18
18
  weight?: 'regular' | 'medium' | 'bold';
19
+ /**
20
+ * Делает цифры моноширинными
21
+ */
22
+ monospaceNumbers?: boolean;
19
23
  /**
20
24
  * HTML тег
21
25
  */
@@ -33,5 +37,39 @@ type TextProps = Omit<NativeProps, 'color'> & {
33
37
  */
34
38
  children?: React.ReactNode;
35
39
  };
36
- declare const Text: FC<TextProps>;
40
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
41
+ declare const Text: React.ForwardRefExoticComponent<Pick<NativeProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
42
+ /**
43
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
44
+ */
45
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps" | undefined;
46
+ /**
47
+ * Цвет текста
48
+ */
49
+ color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
50
+ /**
51
+ * Толщина шрифта
52
+ */
53
+ weight?: "medium" | "regular" | "bold" | undefined;
54
+ /**
55
+ * Делает цифры моноширинными
56
+ */
57
+ monospaceNumbers?: boolean | undefined;
58
+ /**
59
+ * HTML тег
60
+ */
61
+ tag?: "div" | "p" | "span" | undefined;
62
+ /**
63
+ * Css-класс для стилизации (native prop)
64
+ */
65
+ className?: string | undefined;
66
+ /**
67
+ * Id компонента для тестов
68
+ */
69
+ dataTestId?: string | undefined;
70
+ /**
71
+ * Контент (native prop)
72
+ */
73
+ children?: React.ReactNode;
74
+ } & React.RefAttributes<TextElementType>>;
37
75
  export { TextProps, Text };
@@ -15,10 +15,10 @@ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
15
15
  var colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
16
16
  var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
17
17
 
18
- var Text = function (_a) {
18
+ var Text = React.forwardRef(function (_a, ref) {
19
19
  var _b;
20
- var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = tslib_es6.__rest(_a, ["view", "tag", "weight", "color", "className", "dataTestId", "children"]);
21
- return (React__default['default'].createElement(Component, tslib_es6.__assign({ className: cn__default['default']((_b = {}, _b[styles__default['default'].paragraph] = Component === 'p', _b), className, color && colors__default['default'][color], styles__default['default'][view], styles__default['default'][weight]), "data-test-id": dataTestId }, restProps), children));
22
- };
20
+ var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = tslib_es6.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "color", "className", "dataTestId", "children"]);
21
+ return (React__default['default'].createElement(Component, tslib_es6.__assign({ className: cn__default['default']((_b = {}, _b[styles__default['default'].paragraph] = Component === 'p', _b[styles__default['default'].monospace] = monospaceNumbers, _b), className, color && colors__default['default'][color], styles__default['default'][view], styles__default['default'][weight]), "data-test-id": dataTestId, ref: ref }, restProps), children));
22
+ });
23
23
 
24
24
  exports.Text = Text;
@@ -67,3 +67,7 @@
67
67
  .regular {
68
68
  font-weight: normal;
69
69
  }
70
+ .monospace {
71
+ font-feature-settings: "tnum";
72
+ font-variant-numeric: tabular-nums;
73
+ }
@@ -46,5 +46,43 @@ type Styles = {
46
46
  [key: string]: string;
47
47
  };
48
48
  };
49
- declare const Title: React.FC<TitleProps & Styles>;
49
+ type TitleElementType = HTMLHeadingElement | HTMLDivElement;
50
+ declare const Title: React.ForwardRefExoticComponent<Pick<NativeProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
51
+ /**
52
+ * HTML тег
53
+ */
54
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
55
+ /**
56
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
57
+ */
58
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall" | undefined;
59
+ /**
60
+ * Цвет текста
61
+ */
62
+ color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
63
+ /**
64
+ * Толщина шрифта
65
+ */
66
+ weight?: "medium" | "regular" | "bold" | undefined;
67
+ /**
68
+ * Шрифт текста
69
+ */
70
+ font?: "styrene" | "system" | undefined;
71
+ /**
72
+ * Добавляет отступы
73
+ */
74
+ defaultMargins?: boolean | undefined;
75
+ /**
76
+ * Css-класс для стилизации (native prop)
77
+ */
78
+ className?: string | undefined;
79
+ /**
80
+ * Id компонента для тестов
81
+ */
82
+ dataTestId?: string | undefined;
83
+ /**
84
+ * Контент (native prop)
85
+ */
86
+ children?: React.ReactNode;
87
+ } & Styles & React.RefAttributes<TitleElementType>>;
50
88
  export { TitleProps, Title };
@@ -13,9 +13,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
14
  var colors__default = /*#__PURE__*/_interopDefaultLegacy(colors);
15
15
 
16
- var Title = function (_a) {
16
+ var Title = React.forwardRef(function (_a, ref) {
17
17
  var _b = _a.tag, Component = _b === void 0 ? 'div' : _b, _c = _a.view, view = _c === void 0 ? 'medium' : _c, _d = _a.font, font = _d === void 0 ? 'styrene' : _d, _e = _a.weight, weight = _e === void 0 ? font === 'styrene' ? 'medium' : 'bold' : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, styles = _a.styles, restProps = tslib_es6.__rest(_a, ["tag", "view", "font", "weight", "defaultMargins", "color", "className", "dataTestId", "children", "styles"]);
18
- return (React__default['default'].createElement(Component, tslib_es6.__assign({ className: cn__default['default'](styles.component, className, styles[font + "-" + view], defaultMargins && styles["margins-" + view], styles[weight], color && colors__default['default'][color]), "data-test-id": dataTestId }, restProps), children));
19
- };
18
+ return (React__default['default'].createElement(Component, tslib_es6.__assign({ className: cn__default['default'](styles.component, className, styles[font + "-" + view], defaultMargins && styles["margins-" + view], styles[weight], color && colors__default['default'][color]), "data-test-id": dataTestId, ref: ref }, restProps), children));
19
+ });
20
20
 
21
21
  exports.Title = Title;
@@ -1,4 +1,4 @@
1
- /* hash: 1penk */
1
+ /* hash: 7rmvg */
2
2
  :root {
3
3
  --color-light-text-accent: #ef3124;
4
4
  --color-light-text-attention: #de6a00;
@@ -22,39 +22,39 @@
22
22
  /* Hard up */
23
23
  }
24
24
  /* colors */
25
- .typography__tertiary_1penk {
25
+ .typography__tertiary_1t8fi {
26
26
  color: var(--color-light-text-tertiary);
27
27
  }
28
- .typography__disabled_1penk {
28
+ .typography__disabled_1t8fi {
29
29
  color: var(--color-light-text-disabled);
30
30
  }
31
- .typography__accent_1penk {
31
+ .typography__accent_1t8fi {
32
32
  color: var(--color-light-text-accent);
33
33
  }
34
- .typography__primary_1penk {
34
+ .typography__primary_1t8fi {
35
35
  color: var(--color-light-text-primary);
36
36
  }
37
- .typography__attention_1penk {
37
+ .typography__attention_1t8fi {
38
38
  color: var(--color-light-text-attention);
39
39
  }
40
- .typography__positive_1penk {
40
+ .typography__positive_1t8fi {
41
41
  color: var(--color-light-text-positive);
42
42
  }
43
- .typography__secondary_1penk {
43
+ .typography__secondary_1t8fi {
44
44
  color: var(--color-light-text-secondary);
45
45
  }
46
- .typography__tertiary-inverted_1penk {
46
+ .typography__tertiary-inverted_1t8fi {
47
47
  color: var(--color-light-text-tertiary-inverted);
48
48
  }
49
- .typography__primary-inverted_1penk {
49
+ .typography__primary-inverted_1t8fi {
50
50
  color: var(--color-light-text-primary-inverted);
51
51
  }
52
- .typography__secondary-inverted_1penk {
52
+ .typography__secondary-inverted_1t8fi {
53
53
  color: var(--color-light-text-secondary-inverted);
54
54
  }
55
- .typography__link_1penk {
55
+ .typography__link_1t8fi {
56
56
  color: var(--color-light-text-link);
57
57
  }
58
- .typography__negative_1penk {
58
+ .typography__negative_1t8fi {
59
59
  color: var(--color-light-text-negative);
60
60
  }
@@ -37,7 +37,7 @@ function __rest(s, e) {
37
37
  return t;
38
38
  }
39
39
 
40
- var colors = {"tertiary":"typography__tertiary_1penk","disabled":"typography__disabled_1penk","accent":"typography__accent_1penk","primary":"typography__primary_1penk","attention":"typography__attention_1penk","positive":"typography__positive_1penk","secondary":"typography__secondary_1penk","tertiary-inverted":"typography__tertiary-inverted_1penk","primary-inverted":"typography__primary-inverted_1penk","secondary-inverted":"typography__secondary-inverted_1penk","link":"typography__link_1penk","negative":"typography__negative_1penk"};
40
+ var colors = {"tertiary":"typography__tertiary_1t8fi","disabled":"typography__disabled_1t8fi","accent":"typography__accent_1t8fi","primary":"typography__primary_1t8fi","attention":"typography__attention_1t8fi","positive":"typography__positive_1t8fi","secondary":"typography__secondary_1t8fi","tertiary-inverted":"typography__tertiary-inverted_1t8fi","primary-inverted":"typography__primary-inverted_1t8fi","secondary-inverted":"typography__secondary-inverted_1t8fi","link":"typography__link_1t8fi","negative":"typography__negative_1t8fi"};
41
41
  require('./colors.css')
42
42
 
43
43
  export { __assign as _, __rest as a, colors as c };
@@ -0,0 +1,4 @@
1
+ var commonStyles = {"component":"typography__component_1mh7d","bold":"typography__bold_1mh7d","medium":"typography__medium_1mh7d","regular":"typography__regular_1mh7d"};
2
+ require('./title/common.css')
3
+
4
+ export { commonStyles as c };
@@ -1,8 +1,8 @@
1
- import './colors.module-afa89fff.js';
1
+ import './colors.module-2c206829.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import './title/component.js';
5
- import './common.module-a42136b2.js';
5
+ import './common.module-c6bc7a27.js';
6
6
  import { Title } from './title/index.js';
7
7
  import { Text } from './text/component.js';
8
8
  import { TitleResponsive } from './title-responsive/component.js';
@@ -1 +1,3 @@
1
1
  export * from "./component";
2
+ export { TitleProps } from "./title/index";
3
+ export { TextProps } from "./text/index";
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import './colors.module-afa89fff.js';
1
+ import './colors.module-2c206829.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import './title/component.js';
5
- import './common.module-a42136b2.js';
5
+ import './common.module-c6bc7a27.js';
6
6
  import './title/index.js';
7
7
  import './text/component.js';
8
8
  import './title-responsive/component.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { HTMLAttributes, FC } from "react";
3
+ import { HTMLAttributes } from "react";
4
4
  import { Color } from "../colors";
5
5
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
6
  type TextProps = Omit<NativeProps, 'color'> & {
@@ -16,6 +16,10 @@ type TextProps = Omit<NativeProps, 'color'> & {
16
16
  * Толщина шрифта
17
17
  */
18
18
  weight?: 'regular' | 'medium' | 'bold';
19
+ /**
20
+ * Делает цифры моноширинными
21
+ */
22
+ monospaceNumbers?: boolean;
19
23
  /**
20
24
  * HTML тег
21
25
  */
@@ -33,5 +37,39 @@ type TextProps = Omit<NativeProps, 'color'> & {
33
37
  */
34
38
  children?: React.ReactNode;
35
39
  };
36
- declare const Text: FC<TextProps>;
40
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
41
+ declare const Text: React.ForwardRefExoticComponent<Pick<NativeProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
42
+ /**
43
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
44
+ */
45
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps" | undefined;
46
+ /**
47
+ * Цвет текста
48
+ */
49
+ color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
50
+ /**
51
+ * Толщина шрифта
52
+ */
53
+ weight?: "medium" | "regular" | "bold" | undefined;
54
+ /**
55
+ * Делает цифры моноширинными
56
+ */
57
+ monospaceNumbers?: boolean | undefined;
58
+ /**
59
+ * HTML тег
60
+ */
61
+ tag?: "div" | "p" | "span" | undefined;
62
+ /**
63
+ * Css-класс для стилизации (native prop)
64
+ */
65
+ className?: string | undefined;
66
+ /**
67
+ * Id компонента для тестов
68
+ */
69
+ dataTestId?: string | undefined;
70
+ /**
71
+ * Контент (native prop)
72
+ */
73
+ children?: React.ReactNode;
74
+ } & React.RefAttributes<TextElementType>>;
37
75
  export { TextProps, Text };
@@ -1,14 +1,14 @@
1
- import { a as __rest, _ as __assign, c as colors } from '../colors.module-afa89fff.js';
2
- import React from 'react';
1
+ import { a as __rest, _ as __assign, c as colors } from '../colors.module-2c206829.js';
2
+ import React, { forwardRef } from 'react';
3
3
  import cn from 'classnames';
4
4
 
5
- var styles = {"paragraph":"typography__paragraph_1ihwl","primary-large":"typography__primary-large_1ihwl","primary-medium":"typography__primary-medium_1ihwl","primary-small":"typography__primary-small_1ihwl","secondary-large":"typography__secondary-large_1ihwl","secondary-medium":"typography__secondary-medium_1ihwl","secondary-small":"typography__secondary-small_1ihwl","component":"typography__component_1ihwl","caps":"typography__caps_1ihwl","bold":"typography__bold_1ihwl","medium":"typography__medium_1ihwl","regular":"typography__regular_1ihwl"};
5
+ var styles = {"paragraph":"typography__paragraph_15q31","primary-large":"typography__primary-large_15q31","primary-medium":"typography__primary-medium_15q31","primary-small":"typography__primary-small_15q31","secondary-large":"typography__secondary-large_15q31","secondary-medium":"typography__secondary-medium_15q31","secondary-small":"typography__secondary-small_15q31","component":"typography__component_15q31","caps":"typography__caps_15q31","bold":"typography__bold_15q31","medium":"typography__medium_15q31","regular":"typography__regular_15q31","monospace":"typography__monospace_15q31"};
6
6
  require('./index.css')
7
7
 
8
- var Text = function (_a) {
8
+ var Text = forwardRef(function (_a, ref) {
9
9
  var _b;
10
- var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = __rest(_a, ["view", "tag", "weight", "color", "className", "dataTestId", "children"]);
11
- return (React.createElement(Component, __assign({ className: cn((_b = {}, _b[styles.paragraph] = Component === 'p', _b), className, color && colors[color], styles[view], styles[weight]), "data-test-id": dataTestId }, restProps), children));
12
- };
10
+ var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = __rest(_a, ["view", "tag", "weight", "monospaceNumbers", "color", "className", "dataTestId", "children"]);
11
+ return (React.createElement(Component, __assign({ className: cn((_b = {}, _b[styles.paragraph] = Component === 'p', _b[styles.monospace] = monospaceNumbers, _b), className, color && colors[color], styles[view], styles[weight]), "data-test-id": dataTestId, ref: ref }, restProps), children));
12
+ });
13
13
 
14
14
  export { Text };