@alfalab/core-components-typography 2.1.0 → 2.4.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 (93) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/colors.css +13 -13
  3. package/dist/{colors.module-2e934386.d.ts → colors.module-b49595f3.d.ts} +0 -0
  4. package/dist/{colors.module-2e934386.js → colors.module-b49595f3.js} +1 -1
  5. package/dist/common.module-f1e23ebf.js +6 -0
  6. package/dist/component.d.ts +2 -0
  7. package/dist/component.js +4 -2
  8. package/dist/cssm/component.d.ts +2 -0
  9. package/dist/cssm/component.js +3 -0
  10. package/dist/cssm/index.d.ts +2 -0
  11. package/dist/cssm/index.js +2 -0
  12. package/dist/cssm/text/component.d.ts +36 -2
  13. package/dist/cssm/text/component.js +3 -3
  14. package/dist/cssm/title/component.d.ts +39 -1
  15. package/dist/cssm/title/component.js +3 -3
  16. package/dist/cssm/title-mobile/component.d.ts +5 -0
  17. package/dist/cssm/title-mobile/component.js +27 -0
  18. package/dist/cssm/title-mobile/index.d.ts +1 -0
  19. package/dist/cssm/title-mobile/index.js +16 -0
  20. package/dist/cssm/title-mobile/index.module.css +81 -0
  21. package/dist/esm/colors.css +13 -13
  22. package/dist/esm/{colors.module-e2ff93e4.d.ts → colors.module-7fc54cb2.d.ts} +0 -0
  23. package/dist/esm/{colors.module-e2ff93e4.js → colors.module-7fc54cb2.js} +1 -1
  24. package/dist/esm/common.module-6a3ec549.js +4 -0
  25. package/dist/esm/component.d.ts +2 -0
  26. package/dist/esm/component.js +4 -2
  27. package/dist/esm/index.d.ts +2 -0
  28. package/dist/esm/index.js +3 -2
  29. package/dist/esm/text/component.d.ts +36 -2
  30. package/dist/esm/text/component.js +6 -6
  31. package/dist/esm/text/index.css +14 -14
  32. package/dist/esm/text/index.js +1 -1
  33. package/dist/esm/title/common.css +5 -5
  34. package/dist/esm/title/component.d.ts +39 -1
  35. package/dist/esm/title/component.js +5 -5
  36. package/dist/esm/title/index.css +19 -19
  37. package/dist/esm/title/index.js +3 -3
  38. package/dist/esm/title-mobile/component.d.ts +5 -0
  39. package/dist/esm/title-mobile/component.js +18 -0
  40. package/dist/esm/title-mobile/index.css +82 -0
  41. package/dist/esm/title-mobile/index.d.ts +1 -0
  42. package/dist/esm/title-mobile/index.js +6 -0
  43. package/dist/esm/title-responsive/component.js +3 -3
  44. package/dist/esm/title-responsive/index.css +46 -46
  45. package/dist/esm/title-responsive/index.js +2 -2
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +3 -2
  48. package/dist/modern/colors.css +13 -13
  49. package/dist/modern/colors.module-63a7d62a.js +4 -0
  50. package/dist/modern/common.module-6a3ec549.js +4 -0
  51. package/dist/modern/component.d.ts +2 -0
  52. package/dist/modern/component.js +4 -2
  53. package/dist/modern/index.d.ts +2 -0
  54. package/dist/modern/index.js +3 -2
  55. package/dist/modern/text/component.d.ts +36 -2
  56. package/dist/modern/text/component.js +4 -4
  57. package/dist/modern/text/index.css +14 -14
  58. package/dist/modern/text/index.js +1 -1
  59. package/dist/modern/title/common.css +5 -5
  60. package/dist/modern/title/component.d.ts +39 -1
  61. package/dist/modern/title/component.js +3 -3
  62. package/dist/modern/title/index.css +19 -19
  63. package/dist/modern/title/index.js +3 -3
  64. package/dist/modern/title-mobile/component.d.ts +5 -0
  65. package/dist/modern/title-mobile/component.js +18 -0
  66. package/dist/modern/title-mobile/index.css +82 -0
  67. package/dist/modern/title-mobile/index.d.ts +1 -0
  68. package/dist/modern/title-mobile/index.js +6 -0
  69. package/dist/modern/title-responsive/component.js +3 -3
  70. package/dist/modern/title-responsive/index.css +46 -46
  71. package/dist/modern/title-responsive/index.js +2 -2
  72. package/dist/text/component.d.ts +36 -2
  73. package/dist/text/component.js +5 -5
  74. package/dist/text/index.css +14 -14
  75. package/dist/text/index.js +1 -1
  76. package/dist/title/common.css +5 -5
  77. package/dist/title/component.d.ts +39 -1
  78. package/dist/title/component.js +4 -4
  79. package/dist/title/index.css +19 -19
  80. package/dist/title/index.js +3 -3
  81. package/dist/title-mobile/component.d.ts +5 -0
  82. package/dist/title-mobile/component.js +26 -0
  83. package/dist/title-mobile/index.css +82 -0
  84. package/dist/title-mobile/index.d.ts +1 -0
  85. package/dist/title-mobile/index.js +14 -0
  86. package/dist/title-responsive/component.js +3 -3
  87. package/dist/title-responsive/index.css +46 -46
  88. package/dist/title-responsive/index.js +2 -2
  89. package/package.json +2 -2
  90. package/dist/common.module-f8ab3069.js +0 -6
  91. package/dist/esm/common.module-0ea0b53f.js +0 -4
  92. package/dist/modern/colors.module-549e4d5e.js +0 -4
  93. package/dist/modern/common.module-0ea0b53f.js +0 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,40 @@
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.4.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-typography@2.3.0...@alfalab/core-components-typography@2.4.0) (2022-03-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * **typography:** новый компонент Typography.TitleMobile ([#1003](https://github.com/alfa-laboratory/core-components/issues/1003)) ([9b03cf9](https://github.com/alfa-laboratory/core-components/commit/9b03cf90422b05cc927ed98959708430812d1a50))
12
+ * Исправить импорты в сторях. ([#998](https://github.com/alfa-laboratory/core-components/issues/998)) ([e6a654a](https://github.com/alfa-laboratory/core-components/commit/e6a654a0599451c7d149484cb61d8067eed083b7))
13
+
14
+
15
+
16
+
17
+
18
+ # [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)
19
+
20
+
21
+ ### Features
22
+
23
+ * **typography:** export types ([#940](https://github.com/alfa-laboratory/core-components/issues/940)) ([498227c](https://github.com/alfa-laboratory/core-components/commit/498227c272659a1ebf890eee61c6fecdd110faee))
24
+
25
+
26
+
27
+
28
+
29
+ # [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)
30
+
31
+
32
+ ### Features
33
+
34
+ * **typography:** add ref ([#834](https://github.com/alfa-laboratory/core-components/issues/834)) ([976b16d](https://github.com/alfa-laboratory/core-components/commit/976b16dd9ae68c31999bffb3506623db05033ad4))
35
+
36
+
37
+
38
+
39
+
6
40
  # [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)
7
41
 
8
42
 
package/dist/colors.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: nyhvb */
1
+ /* hash: 1yiw4 */
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_nyhvb {
25
+ .typography__tertiary_zoxuj {
26
26
  color: var(--color-light-text-tertiary);
27
27
  }
28
- .typography__disabled_nyhvb {
28
+ .typography__disabled_zoxuj {
29
29
  color: var(--color-light-text-disabled);
30
30
  }
31
- .typography__accent_nyhvb {
31
+ .typography__accent_zoxuj {
32
32
  color: var(--color-light-text-accent);
33
33
  }
34
- .typography__primary_nyhvb {
34
+ .typography__primary_zoxuj {
35
35
  color: var(--color-light-text-primary);
36
36
  }
37
- .typography__attention_nyhvb {
37
+ .typography__attention_zoxuj {
38
38
  color: var(--color-light-text-attention);
39
39
  }
40
- .typography__positive_nyhvb {
40
+ .typography__positive_zoxuj {
41
41
  color: var(--color-light-text-positive);
42
42
  }
43
- .typography__secondary_nyhvb {
43
+ .typography__secondary_zoxuj {
44
44
  color: var(--color-light-text-secondary);
45
45
  }
46
- .typography__tertiary-inverted_nyhvb {
46
+ .typography__tertiary-inverted_zoxuj {
47
47
  color: var(--color-light-text-tertiary-inverted);
48
48
  }
49
- .typography__primary-inverted_nyhvb {
49
+ .typography__primary-inverted_zoxuj {
50
50
  color: var(--color-light-text-primary-inverted);
51
51
  }
52
- .typography__secondary-inverted_nyhvb {
52
+ .typography__secondary-inverted_zoxuj {
53
53
  color: var(--color-light-text-secondary-inverted);
54
54
  }
55
- .typography__link_nyhvb {
55
+ .typography__link_zoxuj {
56
56
  color: var(--color-light-text-link);
57
57
  }
58
- .typography__negative_nyhvb {
58
+ .typography__negative_zoxuj {
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_nyhvb","disabled":"typography__disabled_nyhvb","accent":"typography__accent_nyhvb","primary":"typography__primary_nyhvb","attention":"typography__attention_nyhvb","positive":"typography__positive_nyhvb","secondary":"typography__secondary_nyhvb","tertiary-inverted":"typography__tertiary-inverted_nyhvb","primary-inverted":"typography__primary-inverted_nyhvb","secondary-inverted":"typography__secondary-inverted_nyhvb","link":"typography__link_nyhvb","negative":"typography__negative_nyhvb"};
42
+ var colors = {"tertiary":"typography__tertiary_zoxuj","disabled":"typography__disabled_zoxuj","accent":"typography__accent_zoxuj","primary":"typography__primary_zoxuj","attention":"typography__attention_zoxuj","positive":"typography__positive_zoxuj","secondary":"typography__secondary_zoxuj","tertiary-inverted":"typography__tertiary-inverted_zoxuj","primary-inverted":"typography__primary-inverted_zoxuj","secondary-inverted":"typography__secondary-inverted_zoxuj","link":"typography__link_zoxuj","negative":"typography__negative_zoxuj"};
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_1fjjn","bold":"typography__bold_1fjjn","medium":"typography__medium_1fjjn","regular":"typography__regular_1fjjn"};
4
+ require('./title/common.css')
5
+
6
+ exports.commonStyles = commonStyles;
@@ -1,9 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { TitleProps } from "./title/index";
3
3
  import { TextProps } from "./text/index";
4
+ import { TitleMobileProps } from "./title-mobile/index";
4
5
  declare const Typography: {
5
6
  Title: FC<TitleProps>;
6
7
  Text: FC<TextProps>;
7
8
  TitleResponsive: FC<TitleProps>;
9
+ TitleMobile: FC<TitleMobileProps>;
8
10
  };
9
11
  export { Typography };
package/dist/component.js CHANGED
@@ -2,19 +2,21 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./colors.module-2e934386.js');
5
+ require('./colors.module-b49595f3.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('./title/component.js');
9
- require('./common.module-f8ab3069.js');
9
+ require('./common.module-f1e23ebf.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');
13
+ var titleMobile_component = require('./title-mobile/component.js');
13
14
 
14
15
  var Typography = {
15
16
  Title: title_index.Title,
16
17
  Text: text_component.Text,
17
18
  TitleResponsive: titleResponsive_component.TitleResponsive,
19
+ TitleMobile: titleMobile_component.TitleMobile,
18
20
  };
19
21
 
20
22
  exports.Typography = Typography;
@@ -1,9 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { TitleProps } from "./title/index";
3
3
  import { TextProps } from "./text/index";
4
+ import { TitleMobileProps } from "./title-mobile/index";
4
5
  declare const Typography: {
5
6
  Title: FC<TitleProps>;
6
7
  Text: FC<TextProps>;
7
8
  TitleResponsive: FC<TitleProps>;
9
+ TitleMobile: FC<TitleMobileProps>;
8
10
  };
9
11
  export { Typography };
@@ -14,11 +14,14 @@ require('./text/index.module.css');
14
14
  var text_component = require('./text/component.js');
15
15
  require('./title-responsive/index.module.css');
16
16
  var titleResponsive_component = require('./title-responsive/component.js');
17
+ require('./title-mobile/index.module.css');
18
+ var titleMobile_component = require('./title-mobile/component.js');
17
19
 
18
20
  var Typography = {
19
21
  Title: title_index.Title,
20
22
  Text: text_component.Text,
21
23
  TitleResponsive: titleResponsive_component.TitleResponsive,
24
+ TitleMobile: titleMobile_component.TitleMobile,
22
25
  };
23
26
 
24
27
  exports.Typography = Typography;
@@ -1 +1,3 @@
1
1
  export * from "./component";
2
+ export { TitleProps } from "./title/index";
3
+ export { TextProps } from "./text/index";
@@ -14,6 +14,8 @@ require('./text/index.module.css');
14
14
  require('./text/component.js');
15
15
  require('./title-responsive/index.module.css');
16
16
  require('./title-responsive/component.js');
17
+ require('./title-mobile/index.module.css');
18
+ require('./title-mobile/component.js');
17
19
  var component = require('./component.js');
18
20
 
19
21
 
@@ -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'> & {
@@ -37,5 +37,39 @@ type TextProps = Omit<NativeProps, 'color'> & {
37
37
  */
38
38
  children?: React.ReactNode;
39
39
  };
40
- 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>>;
41
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
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 }, restProps), children));
22
- };
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;
@@ -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;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { TitleProps } from "../title/component";
3
+ type TitleMobileProps = Omit<TitleProps, 'defaultMargins'>;
4
+ declare const TitleMobile: FC<TitleMobileProps>;
5
+ export { TitleMobileProps, TitleMobile };
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib_es6 = require('../tslib.es6-ce870b46.js');
6
+ var React = require('react');
7
+ require('classnames');
8
+ require('../colors.module.css');
9
+ var title_component = require('../title/component.js');
10
+ var commonStyles = require('../title/common.module.css');
11
+ var styles = require('./index.module.css');
12
+
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
+
15
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
+ var commonStyles__default = /*#__PURE__*/_interopDefaultLegacy(commonStyles);
17
+ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
18
+
19
+ var TitleMobile = function (props) {
20
+ /**
21
+ * Если поменять Object.assign на деструктуризацию, то упадут тесты.
22
+ * Видимо, это особенность работы jest и css-modules.
23
+ */
24
+ return React__default['default'].createElement(title_component.Title, tslib_es6.__assign({}, props, { styles: Object.assign(commonStyles__default['default'], styles__default['default']) }));
25
+ };
26
+
27
+ exports.TitleMobile = TitleMobile;
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ require('../tslib.es6-ce870b46.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('../colors.module.css');
9
+ require('../title/component.js');
10
+ require('../title/common.module.css');
11
+ require('./index.module.css');
12
+ var titleMobile_component = require('./component.js');
13
+
14
+
15
+
16
+ exports.TitleMobile = titleMobile_component.TitleMobile;
@@ -0,0 +1,81 @@
1
+ :root {
2
+
3
+ /* Hard */
4
+
5
+ /* Up */
6
+
7
+ /* Hard up */
8
+ }
9
+ :root {
10
+ --font-family-styrene: 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto,
11
+ 'Helvetica Neue', Helvetica, sans-serif;
12
+ }
13
+ .styrene-xlarge {
14
+ font-size: 34px;
15
+ line-height: 40px;
16
+ font-weight: 500;
17
+ font-feature-settings: 'ss01';
18
+ font-family: var(--font-family-styrene);
19
+ }
20
+ .styrene-large {
21
+ font-size: 30px;
22
+ line-height: 36px;
23
+ font-weight: 500;
24
+ font-feature-settings: 'ss01';
25
+ font-family: var(--font-family-styrene);
26
+ }
27
+ .styrene-medium {
28
+ font-size: 26px;
29
+ line-height: 32px;
30
+ font-weight: 500;
31
+ font-feature-settings: 'ss01';
32
+ font-family: var(--font-family-styrene);
33
+ }
34
+ .styrene-small {
35
+ font-size: 20px;
36
+ line-height: 28px;
37
+ font-weight: 500;
38
+ font-feature-settings: 'ss01';
39
+ font-family: var(--font-family-styrene);
40
+ }
41
+ .styrene-xsmall {
42
+ font-size: 16px;
43
+ line-height: 24px;
44
+ font-weight: 500;
45
+ font-feature-settings: 'ss01';
46
+ font-family: var(--font-family-styrene);
47
+ }
48
+ .system-xlarge {
49
+ font-size: 34px;
50
+ line-height: 40px;
51
+ font-weight: 600;
52
+ }
53
+ .system-large {
54
+ font-size: 30px;
55
+ line-height: 36px;
56
+ font-weight: 600;
57
+ }
58
+ .system-medium {
59
+ font-size: 26px;
60
+ line-height: 32px;
61
+ font-weight: 600;
62
+ }
63
+ .system-small {
64
+ font-size: 20px;
65
+ line-height: 28px;
66
+ font-weight: 600;
67
+ }
68
+ .system-xsmall {
69
+ font-size: 16px;
70
+ line-height: 24px;
71
+ font-weight: 600;
72
+ }
73
+ .bold {
74
+ font-weight: bold;
75
+ }
76
+ .medium {
77
+ font-weight: 500;
78
+ }
79
+ .regular {
80
+ font-weight: normal;
81
+ }
@@ -1,4 +1,4 @@
1
- /* hash: nyhvb */
1
+ /* hash: 1yiw4 */
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_nyhvb {
25
+ .typography__tertiary_zoxuj {
26
26
  color: var(--color-light-text-tertiary);
27
27
  }
28
- .typography__disabled_nyhvb {
28
+ .typography__disabled_zoxuj {
29
29
  color: var(--color-light-text-disabled);
30
30
  }
31
- .typography__accent_nyhvb {
31
+ .typography__accent_zoxuj {
32
32
  color: var(--color-light-text-accent);
33
33
  }
34
- .typography__primary_nyhvb {
34
+ .typography__primary_zoxuj {
35
35
  color: var(--color-light-text-primary);
36
36
  }
37
- .typography__attention_nyhvb {
37
+ .typography__attention_zoxuj {
38
38
  color: var(--color-light-text-attention);
39
39
  }
40
- .typography__positive_nyhvb {
40
+ .typography__positive_zoxuj {
41
41
  color: var(--color-light-text-positive);
42
42
  }
43
- .typography__secondary_nyhvb {
43
+ .typography__secondary_zoxuj {
44
44
  color: var(--color-light-text-secondary);
45
45
  }
46
- .typography__tertiary-inverted_nyhvb {
46
+ .typography__tertiary-inverted_zoxuj {
47
47
  color: var(--color-light-text-tertiary-inverted);
48
48
  }
49
- .typography__primary-inverted_nyhvb {
49
+ .typography__primary-inverted_zoxuj {
50
50
  color: var(--color-light-text-primary-inverted);
51
51
  }
52
- .typography__secondary-inverted_nyhvb {
52
+ .typography__secondary-inverted_zoxuj {
53
53
  color: var(--color-light-text-secondary-inverted);
54
54
  }
55
- .typography__link_nyhvb {
55
+ .typography__link_zoxuj {
56
56
  color: var(--color-light-text-link);
57
57
  }
58
- .typography__negative_nyhvb {
58
+ .typography__negative_zoxuj {
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_nyhvb","disabled":"typography__disabled_nyhvb","accent":"typography__accent_nyhvb","primary":"typography__primary_nyhvb","attention":"typography__attention_nyhvb","positive":"typography__positive_nyhvb","secondary":"typography__secondary_nyhvb","tertiary-inverted":"typography__tertiary-inverted_nyhvb","primary-inverted":"typography__primary-inverted_nyhvb","secondary-inverted":"typography__secondary-inverted_nyhvb","link":"typography__link_nyhvb","negative":"typography__negative_nyhvb"};
40
+ var colors = {"tertiary":"typography__tertiary_zoxuj","disabled":"typography__disabled_zoxuj","accent":"typography__accent_zoxuj","primary":"typography__primary_zoxuj","attention":"typography__attention_zoxuj","positive":"typography__positive_zoxuj","secondary":"typography__secondary_zoxuj","tertiary-inverted":"typography__tertiary-inverted_zoxuj","primary-inverted":"typography__primary-inverted_zoxuj","secondary-inverted":"typography__secondary-inverted_zoxuj","link":"typography__link_zoxuj","negative":"typography__negative_zoxuj"};
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_1fjjn","bold":"typography__bold_1fjjn","medium":"typography__medium_1fjjn","regular":"typography__regular_1fjjn"};
2
+ require('./title/common.css')
3
+
4
+ export { commonStyles as c };
@@ -1,9 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  import { TitleProps } from "./title/index";
3
3
  import { TextProps } from "./text/index";
4
+ import { TitleMobileProps } from "./title-mobile/index";
4
5
  declare const Typography: {
5
6
  Title: FC<TitleProps>;
6
7
  Text: FC<TextProps>;
7
8
  TitleResponsive: FC<TitleProps>;
9
+ TitleMobile: FC<TitleMobileProps>;
8
10
  };
9
11
  export { Typography };
@@ -1,16 +1,18 @@
1
- import './colors.module-e2ff93e4.js';
1
+ import './colors.module-7fc54cb2.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import './title/component.js';
5
- import './common.module-0ea0b53f.js';
5
+ import './common.module-6a3ec549.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';
9
+ import { TitleMobile } from './title-mobile/component.js';
9
10
 
10
11
  var Typography = {
11
12
  Title: Title,
12
13
  Text: Text,
13
14
  TitleResponsive: TitleResponsive,
15
+ TitleMobile: TitleMobile,
14
16
  };
15
17
 
16
18
  export { Typography };
@@ -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,9 +1,10 @@
1
- import './colors.module-e2ff93e4.js';
1
+ import './colors.module-7fc54cb2.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import './title/component.js';
5
- import './common.module-0ea0b53f.js';
5
+ import './common.module-6a3ec549.js';
6
6
  import './title/index.js';
7
7
  import './text/component.js';
8
8
  import './title-responsive/component.js';
9
+ import './title-mobile/component.js';
9
10
  export { Typography } from './component.js';