@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.
- package/CHANGELOG.md +32 -9
- package/dist/colors.css +13 -13
- package/dist/{colors.module-9d3e0282.d.ts → colors.module-35c48cf7.d.ts} +0 -0
- package/dist/{colors.module-9d3e0282.js → colors.module-35c48cf7.js} +1 -1
- package/dist/common.module-8f8baeca.js +6 -0
- package/dist/component.js +2 -2
- package/dist/cssm/index.d.ts +2 -0
- package/dist/cssm/text/component.d.ts +40 -2
- package/dist/cssm/text/component.js +4 -4
- package/dist/cssm/text/index.module.css +4 -0
- package/dist/cssm/title/component.d.ts +39 -1
- package/dist/cssm/title/component.js +3 -3
- package/dist/esm/colors.css +13 -13
- package/dist/esm/{colors.module-afa89fff.d.ts → colors.module-2c206829.d.ts} +0 -0
- package/dist/esm/{colors.module-afa89fff.js → colors.module-2c206829.js} +1 -1
- package/dist/esm/common.module-c6bc7a27.js +4 -0
- package/dist/esm/component.js +2 -2
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/text/component.d.ts +40 -2
- package/dist/esm/text/component.js +7 -7
- package/dist/esm/text/index.css +17 -13
- package/dist/esm/text/index.js +1 -1
- package/dist/esm/title/common.css +5 -5
- package/dist/esm/title/component.d.ts +39 -1
- package/dist/esm/title/component.js +5 -5
- package/dist/esm/title/index.css +19 -19
- package/dist/esm/title/index.js +3 -3
- package/dist/esm/title-responsive/component.js +3 -3
- package/dist/esm/title-responsive/index.css +46 -46
- package/dist/esm/title-responsive/index.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/modern/colors.css +13 -13
- package/dist/modern/colors.module-148ba739.js +4 -0
- package/dist/modern/common.module-c6bc7a27.js +4 -0
- package/dist/modern/component.js +2 -2
- package/dist/modern/index.d.ts +2 -0
- package/dist/modern/index.js +2 -2
- package/dist/modern/text/component.d.ts +40 -2
- package/dist/modern/text/component.js +4 -4
- package/dist/modern/text/index.css +17 -13
- package/dist/modern/text/index.js +1 -1
- package/dist/modern/title/common.css +5 -5
- package/dist/modern/title/component.d.ts +39 -1
- package/dist/modern/title/component.js +3 -3
- package/dist/modern/title/index.css +19 -19
- package/dist/modern/title/index.js +3 -3
- package/dist/modern/title-responsive/component.js +3 -3
- package/dist/modern/title-responsive/index.css +46 -46
- package/dist/modern/title-responsive/index.js +2 -2
- package/dist/text/component.d.ts +40 -2
- package/dist/text/component.js +6 -6
- package/dist/text/index.css +17 -13
- package/dist/text/index.js +1 -1
- package/dist/title/common.css +5 -5
- package/dist/title/component.d.ts +39 -1
- package/dist/title/component.js +4 -4
- package/dist/title/index.css +19 -19
- package/dist/title/index.js +3 -3
- package/dist/title-responsive/component.js +3 -3
- package/dist/title-responsive/index.css +46 -46
- package/dist/title-responsive/index.js +2 -2
- package/package.json +2 -2
- package/dist/common.module-d3c5fce9.js +0 -6
- package/dist/esm/common.module-a42136b2.js +0 -4
- package/dist/modern/colors.module-8212a0a2.js +0 -4
- package/dist/modern/common.module-a42136b2.js +0 -4
package/dist/modern/colors.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
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
|
-
.
|
|
25
|
+
.typography__tertiary_1t8fi {
|
|
26
26
|
color: var(--color-light-text-tertiary);
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.typography__disabled_1t8fi {
|
|
29
29
|
color: var(--color-light-text-disabled);
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.typography__accent_1t8fi {
|
|
32
32
|
color: var(--color-light-text-accent);
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.typography__primary_1t8fi {
|
|
35
35
|
color: var(--color-light-text-primary);
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.typography__attention_1t8fi {
|
|
38
38
|
color: var(--color-light-text-attention);
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.typography__positive_1t8fi {
|
|
41
41
|
color: var(--color-light-text-positive);
|
|
42
42
|
}
|
|
43
|
-
.
|
|
43
|
+
.typography__secondary_1t8fi {
|
|
44
44
|
color: var(--color-light-text-secondary);
|
|
45
45
|
}
|
|
46
|
-
.typography__tertiary-
|
|
46
|
+
.typography__tertiary-inverted_1t8fi {
|
|
47
47
|
color: var(--color-light-text-tertiary-inverted);
|
|
48
48
|
}
|
|
49
|
-
.typography__primary-
|
|
49
|
+
.typography__primary-inverted_1t8fi {
|
|
50
50
|
color: var(--color-light-text-primary-inverted);
|
|
51
51
|
}
|
|
52
|
-
.typography__secondary-
|
|
52
|
+
.typography__secondary-inverted_1t8fi {
|
|
53
53
|
color: var(--color-light-text-secondary-inverted);
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
.typography__link_1t8fi {
|
|
56
56
|
color: var(--color-light-text-link);
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
.typography__negative_1t8fi {
|
|
59
59
|
color: var(--color-light-text-negative);
|
|
60
60
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
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"};
|
|
2
|
+
require('./colors.css')
|
|
3
|
+
|
|
4
|
+
export { colors as c };
|
package/dist/modern/component.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import './colors.module-
|
|
3
|
+
import './colors.module-148ba739.js';
|
|
4
4
|
import './title/component.js';
|
|
5
|
-
import './common.module-
|
|
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';
|
package/dist/modern/index.d.ts
CHANGED
package/dist/modern/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import './colors.module-
|
|
3
|
+
import './colors.module-148ba739.js';
|
|
4
4
|
import './title/component.js';
|
|
5
|
-
import './common.module-
|
|
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
|
|
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
|
-
|
|
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,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { c as colors } from '../colors.module-
|
|
3
|
+
import { c as colors } from '../colors.module-148ba739.js';
|
|
4
4
|
|
|
5
|
-
var styles = {"paragraph":"
|
|
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
|
-
const Text = ({ view = 'primary-medium', tag: Component = 'span', weight = 'regular', color, className, dataTestId, children, ...restProps }) => (React.createElement(Component, Object.assign({ className: cn({ [styles.paragraph]: Component === 'p' }, className, color && colors[color], styles[view], styles[weight]), "data-test-id": dataTestId }, restProps), children));
|
|
8
|
+
const Text = forwardRef(({ view = 'primary-medium', tag: Component = 'span', weight = 'regular', monospaceNumbers = false, color, className, dataTestId, children, ...restProps }, ref) => (React.createElement(Component, Object.assign({ className: cn({ [styles.paragraph]: Component === 'p', [styles.monospace]: monospaceNumbers }, className, color && colors[color], styles[view], styles[weight]), "data-test-id": dataTestId, ref: ref }, restProps), children)));
|
|
9
9
|
|
|
10
10
|
export { Text };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1o3ta */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -13,58 +13,62 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--text-paragraph-margin-bottom: 0 0 var(--gap-s);
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.typography__paragraph_15q31 {
|
|
17
17
|
margin: var(--text-paragraph-margin-bottom);
|
|
18
18
|
padding: 0;
|
|
19
19
|
}
|
|
20
|
-
.typography__primary-
|
|
20
|
+
.typography__primary-large_15q31 {
|
|
21
21
|
font-size: 18px;
|
|
22
22
|
line-height: 24px;
|
|
23
23
|
font-weight: 400;
|
|
24
24
|
}
|
|
25
|
-
.typography__primary-
|
|
25
|
+
.typography__primary-medium_15q31 {
|
|
26
26
|
font-size: 16px;
|
|
27
27
|
line-height: 24px;
|
|
28
28
|
font-weight: 400;
|
|
29
29
|
}
|
|
30
|
-
.typography__primary-
|
|
30
|
+
.typography__primary-small_15q31 {
|
|
31
31
|
font-size: 14px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
34
34
|
}
|
|
35
|
-
.typography__secondary-
|
|
35
|
+
.typography__secondary-large_15q31 {
|
|
36
36
|
font-size: 13px;
|
|
37
37
|
line-height: 16px;
|
|
38
38
|
font-weight: 400;
|
|
39
39
|
}
|
|
40
|
-
.typography__secondary-
|
|
40
|
+
.typography__secondary-medium_15q31 {
|
|
41
41
|
font-size: 12px;
|
|
42
42
|
line-height: 16px;
|
|
43
43
|
font-weight: 400;
|
|
44
44
|
}
|
|
45
|
-
.typography__secondary-
|
|
45
|
+
.typography__secondary-small_15q31 {
|
|
46
46
|
font-size: 11px;
|
|
47
47
|
line-height: 16px;
|
|
48
48
|
font-weight: 400;
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.typography__component_15q31 {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 20px;
|
|
53
53
|
font-weight: 400;
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
.typography__caps_15q31 {
|
|
56
56
|
font-size: 12px;
|
|
57
57
|
line-height: 16px;
|
|
58
58
|
font-weight: 500;
|
|
59
59
|
letter-spacing: 1.25px;
|
|
60
60
|
text-transform: uppercase;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.typography__bold_15q31 {
|
|
63
63
|
font-weight: bold;
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
.typography__medium_15q31 {
|
|
66
66
|
font-weight: 500;
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
.typography__regular_15q31 {
|
|
69
69
|
font-weight: normal;
|
|
70
70
|
}
|
|
71
|
+
.typography__monospace_15q31 {
|
|
72
|
+
font-feature-settings: "tnum";
|
|
73
|
+
font-variant-numeric: tabular-nums;
|
|
74
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: t6jlg */
|
|
2
|
+
.typography__component_1mh7d {
|
|
3
3
|
margin: 0;
|
|
4
4
|
padding: 0;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
.typography__bold_1mh7d {
|
|
8
8
|
font-weight: bold;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.
|
|
11
|
+
.typography__medium_1mh7d {
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.typography__regular_1mh7d {
|
|
16
16
|
font-weight: normal;
|
|
17
17
|
}
|
|
@@ -46,5 +46,43 @@ type Styles = {
|
|
|
46
46
|
[key: string]: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
|
|
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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { c as colors } from '../colors.module-
|
|
3
|
+
import { c as colors } from '../colors.module-148ba739.js';
|
|
4
4
|
|
|
5
|
-
const Title = ({ tag: Component = 'div', view = 'medium', font = 'styrene', weight = font === 'styrene' ? 'medium' : 'bold', defaultMargins = false, color, className, dataTestId, children, styles, ...restProps }) => (React.createElement(Component, Object.assign({ className: cn(styles.component, className, styles[`${font}-${view}`], defaultMargins && styles[`margins-${view}`], styles[weight], color && colors[color]), "data-test-id": dataTestId }, restProps), children));
|
|
5
|
+
const Title = forwardRef(({ tag: Component = 'div', view = 'medium', font = 'styrene', weight = font === 'styrene' ? 'medium' : 'bold', defaultMargins = false, color, className, dataTestId, children, styles, ...restProps }, ref) => (React.createElement(Component, Object.assign({ className: cn(styles.component, className, styles[`${font}-${view}`], defaultMargins && styles[`margins-${view}`], styles[weight], color && colors[color]), "data-test-id": dataTestId, ref: ref }, restProps), children)));
|
|
6
6
|
|
|
7
7
|
export { Title };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 19kun */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -17,87 +17,87 @@
|
|
|
17
17
|
--font-family-styrene: 'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
18
18
|
'Helvetica Neue', Helvetica, sans-serif;
|
|
19
19
|
}
|
|
20
|
-
.typography__styrene-
|
|
20
|
+
.typography__styrene-xlarge_27e0j {
|
|
21
21
|
font-size: 48px;
|
|
22
22
|
line-height: 64px;
|
|
23
23
|
font-weight: 500;
|
|
24
24
|
font-feature-settings: 'ss01';
|
|
25
25
|
font-family: var(--font-family-styrene);
|
|
26
26
|
}
|
|
27
|
-
.typography__styrene-
|
|
27
|
+
.typography__styrene-large_27e0j {
|
|
28
28
|
font-size: 40px;
|
|
29
29
|
line-height: 48px;
|
|
30
30
|
font-weight: 500;
|
|
31
31
|
font-feature-settings: 'ss01';
|
|
32
32
|
font-family: var(--font-family-styrene);
|
|
33
33
|
}
|
|
34
|
-
.typography__styrene-
|
|
34
|
+
.typography__styrene-medium_27e0j {
|
|
35
35
|
font-size: 32px;
|
|
36
36
|
line-height: 40px;
|
|
37
37
|
font-weight: 500;
|
|
38
38
|
font-feature-settings: 'ss01';
|
|
39
39
|
font-family: var(--font-family-styrene);
|
|
40
40
|
}
|
|
41
|
-
.typography__styrene-
|
|
41
|
+
.typography__styrene-small_27e0j {
|
|
42
42
|
font-size: 24px;
|
|
43
43
|
line-height: 32px;
|
|
44
44
|
font-weight: 500;
|
|
45
45
|
font-feature-settings: 'ss01';
|
|
46
46
|
font-family: var(--font-family-styrene);
|
|
47
47
|
}
|
|
48
|
-
.typography__styrene-
|
|
48
|
+
.typography__styrene-xsmall_27e0j {
|
|
49
49
|
font-size: 20px;
|
|
50
50
|
line-height: 24px;
|
|
51
51
|
font-weight: 500;
|
|
52
52
|
font-feature-settings: 'ss01';
|
|
53
53
|
font-family: var(--font-family-styrene);
|
|
54
54
|
}
|
|
55
|
-
.typography__system-
|
|
55
|
+
.typography__system-xlarge_27e0j {
|
|
56
56
|
font-size: 48px;
|
|
57
57
|
line-height: 52px;
|
|
58
58
|
font-weight: 700;
|
|
59
59
|
}
|
|
60
|
-
.typography__system-
|
|
60
|
+
.typography__system-large_27e0j {
|
|
61
61
|
font-size: 40px;
|
|
62
62
|
line-height: 48px;
|
|
63
63
|
font-weight: 700;
|
|
64
64
|
}
|
|
65
|
-
.typography__system-
|
|
65
|
+
.typography__system-medium_27e0j {
|
|
66
66
|
font-size: 30px;
|
|
67
67
|
line-height: 36px;
|
|
68
68
|
font-weight: 700;
|
|
69
69
|
}
|
|
70
|
-
.typography__system-
|
|
70
|
+
.typography__system-small_27e0j {
|
|
71
71
|
font-size: 22px;
|
|
72
72
|
line-height: 26px;
|
|
73
73
|
font-weight: 700;
|
|
74
74
|
}
|
|
75
|
-
.typography__system-
|
|
75
|
+
.typography__system-xsmall_27e0j {
|
|
76
76
|
font-size: 18px;
|
|
77
77
|
line-height: 22px;
|
|
78
78
|
font-weight: 700;
|
|
79
79
|
}
|
|
80
|
-
.typography__margins-
|
|
80
|
+
.typography__margins-xlarge_27e0j {
|
|
81
81
|
margin: 0 0 var(--gap-xl);
|
|
82
82
|
}
|
|
83
|
-
.typography__margins-
|
|
83
|
+
.typography__margins-large_27e0j {
|
|
84
84
|
margin: var(--gap-4xl) 0 var(--gap-xl);
|
|
85
85
|
}
|
|
86
|
-
.typography__margins-
|
|
86
|
+
.typography__margins-medium_27e0j {
|
|
87
87
|
margin: var(--gap-4xl) 0 var(--gap-xl);
|
|
88
88
|
}
|
|
89
|
-
.typography__margins-
|
|
89
|
+
.typography__margins-small_27e0j {
|
|
90
90
|
margin: var(--gap-3xl) 0 var(--gap-m);
|
|
91
91
|
}
|
|
92
|
-
.typography__margins-
|
|
92
|
+
.typography__margins-xsmall_27e0j {
|
|
93
93
|
margin: var(--gap-3xl) 0 var(--gap-m);
|
|
94
94
|
}
|
|
95
|
-
.
|
|
95
|
+
.typography__bold_27e0j {
|
|
96
96
|
font-weight: bold;
|
|
97
97
|
}
|
|
98
|
-
.
|
|
98
|
+
.typography__medium_27e0j {
|
|
99
99
|
font-weight: 500;
|
|
100
100
|
}
|
|
101
|
-
.
|
|
101
|
+
.typography__regular_27e0j {
|
|
102
102
|
font-weight: normal;
|
|
103
103
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '../colors.module-
|
|
3
|
+
import '../colors.module-148ba739.js';
|
|
4
4
|
import { Title as Title$1 } from './component.js';
|
|
5
|
-
import { c as commonStyles } from '../common.module-
|
|
5
|
+
import { c as commonStyles } from '../common.module-c6bc7a27.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"styrene-xlarge":"typography__styrene-
|
|
7
|
+
var styles = {"styrene-xlarge":"typography__styrene-xlarge_27e0j","styrene-large":"typography__styrene-large_27e0j","styrene-medium":"typography__styrene-medium_27e0j","styrene-small":"typography__styrene-small_27e0j","styrene-xsmall":"typography__styrene-xsmall_27e0j","system-xlarge":"typography__system-xlarge_27e0j","system-large":"typography__system-large_27e0j","system-medium":"typography__system-medium_27e0j","system-small":"typography__system-small_27e0j","system-xsmall":"typography__system-xsmall_27e0j","margins-xlarge":"typography__margins-xlarge_27e0j","margins-large":"typography__margins-large_27e0j","margins-medium":"typography__margins-medium_27e0j","margins-small":"typography__margins-small_27e0j","margins-xsmall":"typography__margins-xsmall_27e0j","bold":"typography__bold_27e0j","medium":"typography__medium_27e0j","regular":"typography__regular_27e0j"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const Title = props => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '../colors.module-
|
|
3
|
+
import '../colors.module-148ba739.js';
|
|
4
4
|
import { Title } from '../title/component.js';
|
|
5
|
-
import { c as commonStyles } from '../common.module-
|
|
5
|
+
import { c as commonStyles } from '../common.module-c6bc7a27.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"styrene-xlarge":"typography__styrene-
|
|
7
|
+
var styles = {"styrene-xlarge":"typography__styrene-xlarge_1467o","styrene-large":"typography__styrene-large_1467o","styrene-medium":"typography__styrene-medium_1467o","styrene-small":"typography__styrene-small_1467o","styrene-xsmall":"typography__styrene-xsmall_1467o","system-xlarge":"typography__system-xlarge_1467o","system-large":"typography__system-large_1467o","system-medium":"typography__system-medium_1467o","system-small":"typography__system-small_1467o","system-xsmall":"typography__system-xsmall_1467o","margins-xlarge":"typography__margins-xlarge_1467o","margins-large":"typography__margins-large_1467o","margins-medium":"typography__margins-medium_1467o","margins-small":"typography__margins-small_1467o","margins-xsmall":"typography__margins-xsmall_1467o"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const TitleResponsive = props => {
|