@alfalab/core-components-typography 6.0.7-alfasans → 6.0.8-alfasans
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/colors.css +20 -20
- package/colors.module.css.js +1 -1
- package/cssm/title/component.d.ts +0 -4
- package/cssm/title/component.js.map +1 -1
- package/esm/colors.css +20 -20
- package/esm/colors.module.css.js +1 -1
- package/esm/text/index.css +40 -40
- package/esm/text/index.module.css.js +1 -1
- package/esm/title/common.css +5 -5
- package/esm/title/common.module.css.js +1 -1
- package/esm/title/component.d.ts +0 -4
- package/esm/title/component.js.map +1 -1
- package/esm/title/index.css +15 -15
- package/esm/title/index.module.css.js +1 -1
- package/esm/title-mobile/index.css +25 -25
- package/esm/title-mobile/index.module.css.js +1 -1
- package/modern/colors.css +20 -20
- package/modern/colors.module.css.js +1 -1
- package/modern/text/index.css +40 -40
- package/modern/text/index.module.css.js +1 -1
- package/modern/title/common.css +5 -5
- package/modern/title/common.module.css.js +1 -1
- package/modern/title/component.d.ts +0 -4
- package/modern/title/component.js.map +1 -1
- package/modern/title/index.css +15 -15
- package/modern/title/index.module.css.js +1 -1
- package/modern/title-mobile/index.css +25 -25
- package/modern/title-mobile/index.module.css.js +1 -1
- package/moderncssm/title/component.d.ts +0 -4
- package/moderncssm/title/component.js.map +1 -1
- package/package.json +1 -1
- package/src/title/component.tsx +0 -2
- package/text/index.css +40 -40
- package/text/index.module.css.js +1 -1
- package/title/common.css +5 -5
- package/title/common.module.css.js +1 -1
- package/title/component.d.ts +0 -4
- package/title/component.js.map +1 -1
- package/title/index.css +15 -15
- package/title/index.module.css.js +1 -1
- package/title-mobile/index.css +25 -25
- package/title-mobile/index.module.css.js +1 -1
package/colors.css
CHANGED
|
@@ -20,63 +20,63 @@
|
|
|
20
20
|
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
21
21
|
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.typography__tertiary_1w1vx {
|
|
24
24
|
color: var(--color-light-text-tertiary);
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.typography__disabled_1w1vx {
|
|
27
27
|
color: var(--color-light-text-quaternary);
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.typography__accent_1w1vx {
|
|
30
30
|
color: var(--color-light-accent-primary);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.typography__primary_1w1vx {
|
|
33
33
|
color: var(--color-light-text-primary);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.typography__attention_1w1vx {
|
|
36
36
|
color: var(--color-light-text-attention);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.typography__positive_1w1vx {
|
|
39
39
|
color: var(--color-light-text-positive);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.typography__secondary_1w1vx {
|
|
42
42
|
color: var(--color-light-text-secondary);
|
|
43
43
|
}
|
|
44
|
-
.typography__tertiary-
|
|
44
|
+
.typography__tertiary-inverted_1w1vx {
|
|
45
45
|
color: var(--color-light-text-tertiary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.typography__primary-
|
|
47
|
+
.typography__primary-inverted_1w1vx {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.typography__secondary-
|
|
50
|
+
.typography__secondary-inverted_1w1vx {
|
|
51
51
|
color: var(--color-light-text-secondary-inverted);
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.typography__link_1w1vx {
|
|
54
54
|
color: var(--color-light-text-info);
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.typography__negative_1w1vx {
|
|
57
57
|
color: var(--color-light-text-negative);
|
|
58
58
|
}
|
|
59
|
-
.typography__static-primary-
|
|
59
|
+
.typography__static-primary-light_1w1vx {
|
|
60
60
|
color: var(--color-static-text-primary-light);
|
|
61
61
|
}
|
|
62
|
-
.typography__static-secondary-
|
|
62
|
+
.typography__static-secondary-light_1w1vx {
|
|
63
63
|
color: var(--color-static-text-secondary-light);
|
|
64
64
|
}
|
|
65
|
-
.typography__static-tertiary-
|
|
65
|
+
.typography__static-tertiary-light_1w1vx {
|
|
66
66
|
color: var(--color-static-text-tertiary-light);
|
|
67
67
|
}
|
|
68
|
-
.typography__static-primary-
|
|
68
|
+
.typography__static-primary-dark_1w1vx {
|
|
69
69
|
color: var(--color-static-text-primary-dark);
|
|
70
70
|
}
|
|
71
|
-
.typography__static-secondary-
|
|
71
|
+
.typography__static-secondary-dark_1w1vx {
|
|
72
72
|
color: var(--color-static-text-secondary-dark);
|
|
73
73
|
}
|
|
74
|
-
.typography__static-tertiary-
|
|
74
|
+
.typography__static-tertiary-dark_1w1vx {
|
|
75
75
|
color: var(--color-static-text-tertiary-dark);
|
|
76
76
|
}
|
|
77
|
-
.typography__static-
|
|
77
|
+
.typography__static-accent_1w1vx {
|
|
78
78
|
color: var(--color-static-accent-primary);
|
|
79
79
|
}
|
|
80
|
-
.typography__static-
|
|
80
|
+
.typography__static-positive_1w1vx {
|
|
81
81
|
color: var(--color-static-text-positive);
|
|
82
82
|
}
|
package/colors.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./colors.css');
|
|
4
4
|
|
|
5
|
-
var colors = {"tertiary":"
|
|
5
|
+
var colors = {"tertiary":"typography__tertiary_1w1vx","disabled":"typography__disabled_1w1vx","accent":"typography__accent_1w1vx","primary":"typography__primary_1w1vx","attention":"typography__attention_1w1vx","positive":"typography__positive_1w1vx","secondary":"typography__secondary_1w1vx","tertiary-inverted":"typography__tertiary-inverted_1w1vx","primary-inverted":"typography__primary-inverted_1w1vx","secondary-inverted":"typography__secondary-inverted_1w1vx","link":"typography__link_1w1vx","negative":"typography__negative_1w1vx","static-primary-light":"typography__static-primary-light_1w1vx","static-secondary-light":"typography__static-secondary-light_1w1vx","static-tertiary-light":"typography__static-tertiary-light_1w1vx","static-primary-dark":"typography__static-primary-dark_1w1vx","static-secondary-dark":"typography__static-secondary-dark_1w1vx","static-tertiary-dark":"typography__static-tertiary-dark_1w1vx","static-accent":"typography__static-accent_1w1vx","static-positive":"typography__static-positive_1w1vx"};
|
|
6
6
|
|
|
7
7
|
module.exports = colors;
|
|
8
8
|
//# sourceMappingURL=colors.module.css.js.map
|
|
@@ -21,8 +21,6 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
21
21
|
weight?: 'regular' | 'medium' | 'bold' | 'semibold';
|
|
22
22
|
/**
|
|
23
23
|
* Шрифт текста
|
|
24
|
-
*
|
|
25
|
-
* @deprecated
|
|
26
24
|
*/
|
|
27
25
|
font?: 'styrene' | 'system';
|
|
28
26
|
/**
|
|
@@ -84,8 +82,6 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
|
|
|
84
82
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
85
83
|
/**
|
|
86
84
|
* Шрифт текста
|
|
87
|
-
*
|
|
88
|
-
* @deprecated
|
|
89
85
|
*/
|
|
90
86
|
font?: "styrene" | "system";
|
|
91
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system';\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font,\n platform,\n weight = 'bold',\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","cn","React","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IAyFa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,EAAsB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAjB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACtB,CAAA,EAAA,GAAA,EAAA,CAAA,IAAe,CAAf,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,GAAA,EAAA,CAAA,CACX,EAAA,CAAA,IAAA,CACJ,CAAQ,EAAA,CAAA,QAAA,CAAA,KACR,EAAe,GAAA,EAAA,CAAA,MAAA,CAAA,CAAf,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACf,CAAA,EAAA,GAAA,EAAA,CAAA,cAAsB,CAAtB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,CAAA,CACtB,KAAK,GAAA,EAAA,CAAA,KAAA,CACL,CAAA,SAAS,GAAA,EAAA,CAAA,SAAA,CAAA,CACT,UAAU,GAAA,EAAA,CAAA,UAAA,CACV,CAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACR,QAAQ,GAAA,EAAA,CAAA,QAAA,CACR,CAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,aAAa,GAAA,EAAA,CAAA,aAAA,CACb,CAAA,YAAY,GAAA,EAAA,CAAA,YAAA,CAAA,CACT,SAAS,GAAAC,YAAA,CAAA,EAAA,EAfhB,sKAgBC;AAGK,IAAA,IAAA,EAA8B,GAAAC,gBAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,OAAO,aAA6C;IAE5E,IAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAEC,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACIC,qCAAC,SAAS,EAAAC,cAAA,CAAA,EACN,SAAS,EAAEF,mBAAE,CACTG,6BAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,EAAA,CAAA,MAAA,CAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,SAAG,IAAI,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,EAC3C,KAAK,IAAIC,uBAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAACD,6BAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAACA,6BAAY,CAAC,WAAW,CAAA,GAAG,YAAY;AAE/C,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEE,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
package/esm/colors.css
CHANGED
|
@@ -20,63 +20,63 @@
|
|
|
20
20
|
--color-static-text-tertiary-dark: rgba(5, 8, 29, 0.38);
|
|
21
21
|
--color-static-text-tertiary-light: rgba(233, 233, 250, 0.37);
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.typography__tertiary_1w1vx {
|
|
24
24
|
color: var(--color-light-text-tertiary);
|
|
25
25
|
}
|
|
26
|
-
.
|
|
26
|
+
.typography__disabled_1w1vx {
|
|
27
27
|
color: var(--color-light-text-quaternary);
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.typography__accent_1w1vx {
|
|
30
30
|
color: var(--color-light-accent-primary);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.typography__primary_1w1vx {
|
|
33
33
|
color: var(--color-light-text-primary);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.typography__attention_1w1vx {
|
|
36
36
|
color: var(--color-light-text-attention);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.typography__positive_1w1vx {
|
|
39
39
|
color: var(--color-light-text-positive);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.typography__secondary_1w1vx {
|
|
42
42
|
color: var(--color-light-text-secondary);
|
|
43
43
|
}
|
|
44
|
-
.typography__tertiary-
|
|
44
|
+
.typography__tertiary-inverted_1w1vx {
|
|
45
45
|
color: var(--color-light-text-tertiary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.typography__primary-
|
|
47
|
+
.typography__primary-inverted_1w1vx {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.typography__secondary-
|
|
50
|
+
.typography__secondary-inverted_1w1vx {
|
|
51
51
|
color: var(--color-light-text-secondary-inverted);
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.typography__link_1w1vx {
|
|
54
54
|
color: var(--color-light-text-info);
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.typography__negative_1w1vx {
|
|
57
57
|
color: var(--color-light-text-negative);
|
|
58
58
|
}
|
|
59
|
-
.typography__static-primary-
|
|
59
|
+
.typography__static-primary-light_1w1vx {
|
|
60
60
|
color: var(--color-static-text-primary-light);
|
|
61
61
|
}
|
|
62
|
-
.typography__static-secondary-
|
|
62
|
+
.typography__static-secondary-light_1w1vx {
|
|
63
63
|
color: var(--color-static-text-secondary-light);
|
|
64
64
|
}
|
|
65
|
-
.typography__static-tertiary-
|
|
65
|
+
.typography__static-tertiary-light_1w1vx {
|
|
66
66
|
color: var(--color-static-text-tertiary-light);
|
|
67
67
|
}
|
|
68
|
-
.typography__static-primary-
|
|
68
|
+
.typography__static-primary-dark_1w1vx {
|
|
69
69
|
color: var(--color-static-text-primary-dark);
|
|
70
70
|
}
|
|
71
|
-
.typography__static-secondary-
|
|
71
|
+
.typography__static-secondary-dark_1w1vx {
|
|
72
72
|
color: var(--color-static-text-secondary-dark);
|
|
73
73
|
}
|
|
74
|
-
.typography__static-tertiary-
|
|
74
|
+
.typography__static-tertiary-dark_1w1vx {
|
|
75
75
|
color: var(--color-static-text-tertiary-dark);
|
|
76
76
|
}
|
|
77
|
-
.typography__static-
|
|
77
|
+
.typography__static-accent_1w1vx {
|
|
78
78
|
color: var(--color-static-accent-primary);
|
|
79
79
|
}
|
|
80
|
-
.typography__static-
|
|
80
|
+
.typography__static-positive_1w1vx {
|
|
81
81
|
color: var(--color-static-text-positive);
|
|
82
82
|
}
|
package/esm/colors.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './colors.css';
|
|
2
2
|
|
|
3
|
-
var colors = {"tertiary":"
|
|
3
|
+
var colors = {"tertiary":"typography__tertiary_1w1vx","disabled":"typography__disabled_1w1vx","accent":"typography__accent_1w1vx","primary":"typography__primary_1w1vx","attention":"typography__attention_1w1vx","positive":"typography__positive_1w1vx","secondary":"typography__secondary_1w1vx","tertiary-inverted":"typography__tertiary-inverted_1w1vx","primary-inverted":"typography__primary-inverted_1w1vx","secondary-inverted":"typography__secondary-inverted_1w1vx","link":"typography__link_1w1vx","negative":"typography__negative_1w1vx","static-primary-light":"typography__static-primary-light_1w1vx","static-secondary-light":"typography__static-secondary-light_1w1vx","static-tertiary-light":"typography__static-tertiary-light_1w1vx","static-primary-dark":"typography__static-primary-dark_1w1vx","static-secondary-dark":"typography__static-secondary-dark_1w1vx","static-tertiary-dark":"typography__static-tertiary-dark_1w1vx","static-accent":"typography__static-accent_1w1vx","static-positive":"typography__static-positive_1w1vx"};
|
|
4
4
|
|
|
5
5
|
export { colors as default };
|
|
6
6
|
//# sourceMappingURL=colors.module.css.js.map
|
package/esm/text/index.css
CHANGED
|
@@ -8,36 +8,36 @@
|
|
|
8
8
|
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
9
|
Helvetica, sans-serif;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.typography__transparent_1chmc {
|
|
12
12
|
opacity: 0;
|
|
13
13
|
}
|
|
14
14
|
:root {
|
|
15
15
|
--text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
.typography__paragraph_1chmc {
|
|
18
18
|
margin: var(--gap-0);
|
|
19
19
|
padding: var(--gap-0);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.typography__paragraphWithMargins_1chmc {
|
|
22
22
|
padding: var(--gap-0);
|
|
23
23
|
margin: var(--text-paragraph-margin-bottom);
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
.typography__component_1chmc {
|
|
26
26
|
font-size: 16px;
|
|
27
27
|
line-height: 20px;
|
|
28
28
|
font-weight: 400;
|
|
29
29
|
letter-spacing: -0.24px;
|
|
30
30
|
font-family: var(--font-family-alfasans);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.typography__component_1chmc.typography__bold_1chmc {
|
|
33
33
|
font-weight: 700;
|
|
34
34
|
letter-spacing: 0.43px;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.typography__component_1chmc.typography__medium_1chmc {
|
|
37
37
|
font-weight: 500;
|
|
38
38
|
letter-spacing: -0.05px;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
.typography__caps_1chmc {
|
|
41
41
|
font-size: 12px;
|
|
42
42
|
line-height: 16px;
|
|
43
43
|
font-weight: 400;
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
text-transform: uppercase;
|
|
46
46
|
font-family: var(--font-family-alfasans);
|
|
47
47
|
}
|
|
48
|
-
.
|
|
48
|
+
.typography__caps_1chmc.typography__bold_1chmc {
|
|
49
49
|
font-weight: 700;
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
.typography__caps_1chmc.typography__medium_1chmc {
|
|
52
52
|
font-weight: 500;
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
.typography__tagline_1chmc {
|
|
55
55
|
font-size: 12px;
|
|
56
56
|
line-height: 16px;
|
|
57
57
|
font-weight: 400;
|
|
@@ -59,151 +59,151 @@
|
|
|
59
59
|
text-transform: uppercase;
|
|
60
60
|
font-family: var(--font-family-alfasans);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.typography__tagline_1chmc.typography__bold_1chmc {
|
|
63
63
|
font-weight: 700;
|
|
64
64
|
}
|
|
65
|
-
.
|
|
65
|
+
.typography__tagline_1chmc.typography__medium_1chmc {
|
|
66
66
|
font-weight: 500;
|
|
67
67
|
}
|
|
68
|
-
.typography__primary-
|
|
68
|
+
.typography__primary-large_1chmc {
|
|
69
69
|
font-size: 18px;
|
|
70
70
|
line-height: 24px;
|
|
71
71
|
font-weight: 400;
|
|
72
72
|
letter-spacing: -0.36px;
|
|
73
73
|
font-family: var(--font-family-alfasans);
|
|
74
74
|
}
|
|
75
|
-
.typography__primary-
|
|
75
|
+
.typography__primary-large_1chmc.typography__bold_1chmc {
|
|
76
76
|
font-weight: 700;
|
|
77
77
|
letter-spacing: 0.38px;
|
|
78
78
|
}
|
|
79
|
-
.typography__primary-
|
|
79
|
+
.typography__primary-large_1chmc.typography__medium_1chmc {
|
|
80
80
|
font-weight: 500;
|
|
81
81
|
letter-spacing: -0.17px;
|
|
82
82
|
}
|
|
83
|
-
.typography__primary-
|
|
83
|
+
.typography__primary-medium_1chmc {
|
|
84
84
|
font-size: 16px;
|
|
85
85
|
line-height: 24px;
|
|
86
86
|
font-weight: 400;
|
|
87
87
|
letter-spacing: -0.24px;
|
|
88
88
|
font-family: var(--font-family-alfasans);
|
|
89
89
|
}
|
|
90
|
-
.typography__primary-
|
|
90
|
+
.typography__primary-medium_1chmc.typography__bold_1chmc {
|
|
91
91
|
font-weight: 700;
|
|
92
92
|
letter-spacing: 0.43px;
|
|
93
93
|
}
|
|
94
|
-
.typography__primary-
|
|
94
|
+
.typography__primary-medium_1chmc.typography__medium_1chmc {
|
|
95
95
|
font-weight: 500;
|
|
96
96
|
letter-spacing: -0.05px;
|
|
97
97
|
}
|
|
98
|
-
.typography__primary-
|
|
98
|
+
.typography__primary-small_1chmc {
|
|
99
99
|
font-size: 14px;
|
|
100
100
|
line-height: 20px;
|
|
101
101
|
font-weight: 400;
|
|
102
102
|
letter-spacing: -0.08px;
|
|
103
103
|
font-family: var(--font-family-alfasans);
|
|
104
104
|
}
|
|
105
|
-
.typography__primary-
|
|
105
|
+
.typography__primary-small_1chmc.typography__bold_1chmc {
|
|
106
106
|
font-weight: 700;
|
|
107
107
|
letter-spacing: 0.47px;
|
|
108
108
|
}
|
|
109
|
-
.typography__primary-
|
|
109
|
+
.typography__primary-small_1chmc.typography__medium_1chmc {
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
letter-spacing: 0.07px;
|
|
112
112
|
}
|
|
113
|
-
.typography__component-
|
|
113
|
+
.typography__component-primary_1chmc {
|
|
114
114
|
font-size: 16px;
|
|
115
115
|
line-height: 20px;
|
|
116
116
|
font-weight: 400;
|
|
117
117
|
letter-spacing: -0.24px;
|
|
118
118
|
font-family: var(--font-family-alfasans);
|
|
119
119
|
}
|
|
120
|
-
.typography__component-
|
|
120
|
+
.typography__component-primary_1chmc.typography__bold_1chmc {
|
|
121
121
|
font-weight: 700;
|
|
122
122
|
letter-spacing: 0.43px;
|
|
123
123
|
}
|
|
124
|
-
.typography__component-
|
|
124
|
+
.typography__component-primary_1chmc.typography__medium_1chmc {
|
|
125
125
|
font-weight: 500;
|
|
126
126
|
letter-spacing: -0.05px;
|
|
127
127
|
}
|
|
128
|
-
.typography__secondary-
|
|
128
|
+
.typography__secondary-large_1chmc {
|
|
129
129
|
font-size: 13px;
|
|
130
130
|
line-height: 16px;
|
|
131
131
|
font-weight: 400;
|
|
132
132
|
font-family: var(--font-family-alfasans);
|
|
133
133
|
}
|
|
134
|
-
.typography__secondary-
|
|
134
|
+
.typography__secondary-large_1chmc.typography__bold_1chmc {
|
|
135
135
|
font-weight: 700;
|
|
136
136
|
letter-spacing: 0.54px;
|
|
137
137
|
}
|
|
138
|
-
.typography__secondary-
|
|
138
|
+
.typography__secondary-large_1chmc.typography__medium_1chmc {
|
|
139
139
|
font-weight: 500;
|
|
140
140
|
letter-spacing: 0.13px;
|
|
141
141
|
}
|
|
142
|
-
.typography__secondary-
|
|
142
|
+
.typography__secondary-medium_1chmc {
|
|
143
143
|
font-size: 12px;
|
|
144
144
|
line-height: 16px;
|
|
145
145
|
font-weight: 400;
|
|
146
146
|
letter-spacing: 0.06px;
|
|
147
147
|
font-family: var(--font-family-alfasans);
|
|
148
148
|
}
|
|
149
|
-
.typography__secondary-
|
|
149
|
+
.typography__secondary-medium_1chmc.typography__bold_1chmc {
|
|
150
150
|
font-weight: 700;
|
|
151
151
|
letter-spacing: 0.57px;
|
|
152
152
|
}
|
|
153
|
-
.typography__secondary-
|
|
153
|
+
.typography__secondary-medium_1chmc.typography__medium_1chmc {
|
|
154
154
|
font-weight: 500;
|
|
155
155
|
letter-spacing: 0.19px;
|
|
156
156
|
}
|
|
157
|
-
.typography__secondary-
|
|
157
|
+
.typography__secondary-small_1chmc {
|
|
158
158
|
font-size: 11px;
|
|
159
159
|
line-height: 16px;
|
|
160
160
|
font-weight: 400;
|
|
161
161
|
letter-spacing: 0.15px;
|
|
162
162
|
font-family: var(--font-family-alfasans);
|
|
163
163
|
}
|
|
164
|
-
.typography__secondary-
|
|
164
|
+
.typography__secondary-small_1chmc.typography__bold_1chmc {
|
|
165
165
|
font-weight: 700;
|
|
166
166
|
letter-spacing: 0.54px;
|
|
167
167
|
}
|
|
168
|
-
.typography__secondary-
|
|
168
|
+
.typography__secondary-small_1chmc.typography__medium_1chmc {
|
|
169
169
|
font-weight: 500;
|
|
170
170
|
letter-spacing: 0.24px;
|
|
171
171
|
}
|
|
172
|
-
.typography__component-
|
|
172
|
+
.typography__component-secondary_1chmc {
|
|
173
173
|
font-size: 14px;
|
|
174
174
|
line-height: 18px;
|
|
175
175
|
font-weight: 400;
|
|
176
176
|
letter-spacing: -0.08px;
|
|
177
177
|
font-family: var(--font-family-alfasans);
|
|
178
178
|
}
|
|
179
|
-
.typography__component-
|
|
179
|
+
.typography__component-secondary_1chmc.typography__bold_1chmc {
|
|
180
180
|
font-weight: 700;
|
|
181
181
|
letter-spacing: 0.47px;
|
|
182
182
|
}
|
|
183
|
-
.typography__component-
|
|
183
|
+
.typography__component-secondary_1chmc.typography__medium_1chmc {
|
|
184
184
|
font-weight: 500;
|
|
185
185
|
letter-spacing: 0.07px;
|
|
186
186
|
}
|
|
187
|
-
.
|
|
187
|
+
.typography__rowLimit1_1chmc {
|
|
188
188
|
-webkit-line-clamp: 1;
|
|
189
189
|
display: -webkit-box;
|
|
190
190
|
-webkit-box-orient: vertical;
|
|
191
191
|
overflow: hidden;
|
|
192
192
|
word-break: break-all;
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.typography__rowLimit2_1chmc {
|
|
195
195
|
-webkit-line-clamp: 2;
|
|
196
196
|
display: -webkit-box;
|
|
197
197
|
-webkit-box-orient: vertical;
|
|
198
198
|
overflow: hidden;
|
|
199
199
|
}
|
|
200
|
-
.
|
|
200
|
+
.typography__rowLimit3_1chmc {
|
|
201
201
|
-webkit-line-clamp: 3;
|
|
202
202
|
display: -webkit-box;
|
|
203
203
|
-webkit-box-orient: vertical;
|
|
204
204
|
overflow: hidden;
|
|
205
205
|
}
|
|
206
|
-
.
|
|
206
|
+
.typography__monospace_1chmc {
|
|
207
207
|
font-feature-settings: "tnum";
|
|
208
208
|
font-variant-numeric: tabular-nums;
|
|
209
209
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"transparent":"
|
|
3
|
+
var styles = {"transparent":"typography__transparent_1chmc","paragraph":"typography__paragraph_1chmc","paragraphWithMargins":"typography__paragraphWithMargins_1chmc","component":"typography__component_1chmc","bold":"typography__bold_1chmc","medium":"typography__medium_1chmc","caps":"typography__caps_1chmc","tagline":"typography__tagline_1chmc","primary-large":"typography__primary-large_1chmc","primary-medium":"typography__primary-medium_1chmc","primary-small":"typography__primary-small_1chmc","component-primary":"typography__component-primary_1chmc","secondary-large":"typography__secondary-large_1chmc","secondary-medium":"typography__secondary-medium_1chmc","secondary-small":"typography__secondary-small_1chmc","component-secondary":"typography__component-secondary_1chmc","rowLimit1":"typography__rowLimit1_1chmc","rowLimit2":"typography__rowLimit2_1chmc","rowLimit3":"typography__rowLimit3_1chmc","monospace":"typography__monospace_1chmc"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/esm/title/common.css
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-0: 0px;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
.typography__transparent_plvpy {
|
|
5
5
|
opacity: 0;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
.typography__component_plvpy {
|
|
8
8
|
margin: var(--gap-0);
|
|
9
9
|
padding: var(--gap-0);
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.typography__rowLimit1_plvpy {
|
|
12
12
|
-webkit-line-clamp: 1;
|
|
13
13
|
display: -webkit-box;
|
|
14
14
|
-webkit-box-orient: vertical;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
word-break: break-all;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.typography__rowLimit2_plvpy {
|
|
19
19
|
-webkit-line-clamp: 2;
|
|
20
20
|
display: -webkit-box;
|
|
21
21
|
-webkit-box-orient: vertical;
|
|
22
22
|
overflow: hidden;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.typography__rowLimit3_plvpy {
|
|
25
25
|
-webkit-line-clamp: 3;
|
|
26
26
|
display: -webkit-box;
|
|
27
27
|
-webkit-box-orient: vertical;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './common.css';
|
|
2
2
|
|
|
3
|
-
var commonStyles = {"transparent":"
|
|
3
|
+
var commonStyles = {"transparent":"typography__transparent_plvpy","component":"typography__component_plvpy","rowLimit1":"typography__rowLimit1_plvpy","rowLimit2":"typography__rowLimit2_plvpy","rowLimit3":"typography__rowLimit3_plvpy"};
|
|
4
4
|
|
|
5
5
|
export { commonStyles as default };
|
|
6
6
|
//# sourceMappingURL=common.module.css.js.map
|
package/esm/title/component.d.ts
CHANGED
|
@@ -21,8 +21,6 @@ export type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
21
21
|
weight?: 'regular' | 'medium' | 'bold' | 'semibold';
|
|
22
22
|
/**
|
|
23
23
|
* Шрифт текста
|
|
24
|
-
*
|
|
25
|
-
* @deprecated
|
|
26
24
|
*/
|
|
27
25
|
font?: 'styrene' | 'system';
|
|
28
26
|
/**
|
|
@@ -84,8 +82,6 @@ export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps
|
|
|
84
82
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
85
83
|
/**
|
|
86
84
|
* Шрифт текста
|
|
87
|
-
*
|
|
88
|
-
* @deprecated
|
|
89
85
|
*/
|
|
90
86
|
font?: "styrene" | "system";
|
|
91
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system';\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font,\n platform,\n weight = 'bold',\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;IAyFa,SAAS,GAAG,UAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,EAAsB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAjB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACtB,CAAA,EAAA,GAAA,EAAA,CAAA,IAAe,CAAf,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,GAAA,EAAA,CAAA,CACX,EAAA,CAAA,IAAA,CACJ,CAAQ,EAAA,CAAA,QAAA,CAAA,KACR,EAAe,GAAA,EAAA,CAAA,MAAA,CAAA,CAAf,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACf,CAAA,EAAA,GAAA,EAAA,CAAA,cAAsB,CAAtB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,CAAA,CACtB,KAAK,GAAA,EAAA,CAAA,KAAA,CACL,CAAA,SAAS,GAAA,EAAA,CAAA,SAAA,CAAA,CACT,UAAU,GAAA,EAAA,CAAA,UAAA,CACV,CAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,CAAA,CACR,QAAQ,GAAA,EAAA,CAAA,QAAA,CACR,CAAA,MAAM,GAAA,EAAA,CAAA,MAAA,CAAA,CACN,aAAa,GAAA,EAAA,CAAA,aAAA,CACb,CAAA,YAAY,GAAA,EAAA,CAAA,YAAA,CAAA,CACT,SAAS,GAAA,MAAA,CAAA,EAAA,EAfhB,sKAgBC;AAGK,IAAA,IAAA,EAA8B,GAAA,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,OAAO,aAA6C;IAE5E,IAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACI,oBAAC,SAAS,EAAA,QAAA,CAAA,EACN,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,EAAA,CAAA,MAAA,CAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,SAAG,IAAI,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAAC,YAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAAC,YAAY,CAAC,WAAW,CAAA,GAAG,YAAY;AAE/C,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|