@alfalab/core-components-typography 4.14.3 → 5.0.0-snapshot-6a9d3fc
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 +22 -44
- package/colors.d.ts +2 -3
- package/colors.js +1 -0
- package/colors.js.map +1 -0
- package/colors.module.css.js +8 -0
- package/colors.module.css.js.map +1 -0
- package/component.d.ts +7 -7
- package/component.js +13 -12
- package/component.js.map +1 -0
- package/cssm/colors.d.ts +2 -3
- package/cssm/colors.js +1 -0
- package/cssm/colors.js.map +1 -0
- package/cssm/colors.module.css +3 -24
- package/cssm/component.d.ts +7 -7
- package/cssm/component.js +13 -12
- package/cssm/component.js.map +1 -0
- package/cssm/index.d.ts +5 -5
- package/cssm/index.js +9 -8
- package/cssm/index.js.map +1 -0
- package/cssm/presets.d.ts +1 -2
- package/cssm/presets.js +1 -0
- package/cssm/presets.js.map +1 -0
- package/cssm/text/alfasans-index.module.css +18 -29
- package/cssm/text/component.d.ts +10 -12
- package/cssm/text/component.js +3 -2
- package/cssm/text/component.js.map +1 -0
- package/cssm/text/index.d.ts +1 -1
- package/cssm/text/index.js +3 -2
- package/cssm/text/index.js.map +1 -0
- package/cssm/text/index.module.css +3 -24
- package/cssm/title/alfasans-index.module.css +2 -23
- package/cssm/title/common.module.css +2 -23
- package/cssm/title/component.d.ts +13 -15
- package/cssm/title/component.js +7 -6
- package/cssm/title/component.js.map +1 -0
- package/cssm/title/index.d.ts +5 -6
- package/cssm/title/index.js +3 -2
- package/cssm/title/index.js.map +1 -0
- package/cssm/title/index.module.css +6 -26
- package/cssm/title/utils.d.ts +1 -2
- package/cssm/title/utils.js +1 -0
- package/cssm/title/utils.js.map +1 -0
- package/cssm/title-mobile/alfasans-index.module.css +2 -23
- package/cssm/title-mobile/component.d.ts +5 -7
- package/cssm/title-mobile/component.js +3 -2
- package/cssm/title-mobile/component.js.map +1 -0
- package/cssm/title-mobile/index.d.ts +2 -2
- package/cssm/title-mobile/index.js +3 -2
- package/cssm/title-mobile/index.js.map +1 -0
- package/cssm/title-mobile/index.module.css +5 -25
- package/cssm/title-responsive/component.d.ts +7 -9
- package/cssm/title-responsive/component.js +6 -5
- package/cssm/title-responsive/component.js.map +1 -0
- package/cssm/title-responsive/index.d.ts +1 -1
- package/cssm/title-responsive/index.js +3 -2
- package/cssm/title-responsive/index.js.map +1 -0
- package/cssm/types.d.ts +1 -2
- package/cssm/types.js +1 -0
- package/cssm/types.js.map +1 -0
- package/esm/colors.css +22 -44
- package/esm/colors.d.ts +2 -3
- package/esm/colors.js +1 -0
- package/esm/colors.js.map +1 -0
- package/esm/colors.module.css.js +6 -0
- package/esm/colors.module.css.js.map +1 -0
- package/esm/component.d.ts +7 -7
- package/esm/component.js +1 -0
- package/esm/component.js.map +1 -0
- package/esm/index.d.ts +5 -5
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/presets.d.ts +1 -2
- package/esm/presets.js +1 -0
- package/esm/presets.js.map +1 -0
- package/esm/text/alfasans-index.css +30 -58
- package/esm/text/alfasans-index.module.css.js +6 -0
- package/esm/text/alfasans-index.module.css.js.map +1 -0
- package/esm/text/component.d.ts +10 -12
- package/esm/text/component.js +4 -7
- package/esm/text/component.js.map +1 -0
- package/esm/text/index.css +24 -45
- package/esm/text/index.d.ts +1 -1
- package/esm/text/index.js +1 -0
- package/esm/text/index.js.map +1 -0
- package/esm/text/index.module.css.js +6 -0
- package/esm/text/index.module.css.js.map +1 -0
- package/esm/title/alfasans-index.css +11 -33
- package/esm/title/alfasans-index.module.css.js +6 -0
- package/esm/title/alfasans-index.module.css.js.map +1 -0
- package/esm/title/common.css +9 -31
- package/esm/title/common.module.css.js +6 -0
- package/esm/title/common.module.css.js.map +1 -0
- package/esm/title/component.d.ts +12 -14
- package/esm/title/component.js +2 -1
- package/esm/title/component.js.map +1 -0
- package/esm/title/index.css +21 -42
- package/esm/title/index.d.ts +4 -5
- package/esm/title/index.js +4 -7
- package/esm/title/index.js.map +1 -0
- package/esm/title/index.module.css.js +6 -0
- package/esm/title/index.module.css.js.map +1 -0
- package/esm/title/utils.d.ts +1 -2
- package/esm/title/utils.js +1 -0
- package/esm/title/utils.js.map +1 -0
- package/esm/title-mobile/alfasans-index.css +11 -33
- package/esm/title-mobile/alfasans-index.module.css.js +6 -0
- package/esm/title-mobile/alfasans-index.module.css.js.map +1 -0
- package/esm/title-mobile/component.d.ts +4 -6
- package/esm/title-mobile/component.js +4 -7
- package/esm/title-mobile/component.js.map +1 -0
- package/esm/title-mobile/index.css +19 -40
- package/esm/title-mobile/index.d.ts +2 -2
- package/esm/title-mobile/index.js +1 -0
- package/esm/title-mobile/index.js.map +1 -0
- package/esm/title-mobile/index.module.css.js +6 -0
- package/esm/title-mobile/index.module.css.js.map +1 -0
- package/esm/title-responsive/component.d.ts +6 -8
- package/esm/title-responsive/component.js +1 -0
- package/esm/title-responsive/component.js.map +1 -0
- package/esm/title-responsive/index.d.ts +1 -1
- package/esm/title-responsive/index.js +1 -0
- package/esm/title-responsive/index.js.map +1 -0
- package/esm/types.d.ts +1 -2
- package/esm/types.js +1 -0
- package/esm/types.js.map +1 -0
- package/index.d.ts +5 -5
- package/index.js +9 -8
- package/index.js.map +1 -0
- package/modern/colors.css +22 -44
- package/modern/colors.d.ts +2 -3
- package/modern/colors.js +1 -0
- package/modern/colors.js.map +1 -0
- package/modern/colors.module.css.js +6 -0
- package/modern/colors.module.css.js.map +1 -0
- package/modern/component.d.ts +7 -7
- package/modern/component.js +1 -0
- package/modern/component.js.map +1 -0
- package/modern/index.d.ts +5 -5
- package/modern/index.js +1 -0
- package/modern/index.js.map +1 -0
- package/modern/presets.d.ts +1 -2
- package/modern/presets.js +1 -0
- package/modern/presets.js.map +1 -0
- package/modern/text/alfasans-index.css +30 -58
- package/modern/text/alfasans-index.module.css.js +6 -0
- package/modern/text/alfasans-index.module.css.js.map +1 -0
- package/modern/text/component.d.ts +10 -12
- package/modern/text/component.js +4 -7
- package/modern/text/component.js.map +1 -0
- package/modern/text/index.css +24 -45
- package/modern/text/index.d.ts +1 -1
- package/modern/text/index.js +1 -0
- package/modern/text/index.js.map +1 -0
- package/modern/text/index.module.css.js +6 -0
- package/modern/text/index.module.css.js.map +1 -0
- package/modern/title/alfasans-index.css +11 -33
- package/modern/title/alfasans-index.module.css.js +6 -0
- package/modern/title/alfasans-index.module.css.js.map +1 -0
- package/modern/title/common.css +9 -31
- package/modern/title/common.module.css.js +6 -0
- package/modern/title/common.module.css.js.map +1 -0
- package/modern/title/component.d.ts +12 -14
- package/modern/title/component.js +2 -1
- package/modern/title/component.js.map +1 -0
- package/modern/title/index.css +21 -42
- package/modern/title/index.d.ts +4 -5
- package/modern/title/index.js +4 -7
- package/modern/title/index.js.map +1 -0
- package/modern/title/index.module.css.js +6 -0
- package/modern/title/index.module.css.js.map +1 -0
- package/modern/title/utils.d.ts +1 -2
- package/modern/title/utils.js +1 -0
- package/modern/title/utils.js.map +1 -0
- package/modern/title-mobile/alfasans-index.css +11 -33
- package/modern/title-mobile/alfasans-index.module.css.js +6 -0
- package/modern/title-mobile/alfasans-index.module.css.js.map +1 -0
- package/modern/title-mobile/component.d.ts +4 -6
- package/modern/title-mobile/component.js +4 -7
- package/modern/title-mobile/component.js.map +1 -0
- package/modern/title-mobile/index.css +19 -40
- package/modern/title-mobile/index.d.ts +2 -2
- package/modern/title-mobile/index.js +1 -0
- package/modern/title-mobile/index.js.map +1 -0
- package/modern/title-mobile/index.module.css.js +6 -0
- package/modern/title-mobile/index.module.css.js.map +1 -0
- package/modern/title-responsive/component.d.ts +6 -8
- package/modern/title-responsive/component.js +1 -0
- package/modern/title-responsive/component.js.map +1 -0
- package/modern/title-responsive/index.d.ts +1 -1
- package/modern/title-responsive/index.js +1 -0
- package/modern/title-responsive/index.js.map +1 -0
- package/modern/types.d.ts +1 -2
- package/modern/types.js +1 -0
- package/modern/types.js.map +1 -0
- package/moderncssm/colors.d.ts +2 -3
- package/moderncssm/colors.js +1 -0
- package/moderncssm/colors.js.map +1 -0
- package/moderncssm/colors.module.css +0 -4
- package/moderncssm/component.d.ts +7 -7
- package/moderncssm/component.js +1 -0
- package/moderncssm/component.js.map +1 -0
- package/moderncssm/index.d.ts +5 -5
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.js.map +1 -0
- package/moderncssm/presets.d.ts +1 -2
- package/moderncssm/presets.js +1 -0
- package/moderncssm/presets.js.map +1 -0
- package/moderncssm/text/alfasans-index.module.css +18 -29
- package/moderncssm/text/component.d.ts +10 -12
- package/moderncssm/text/component.js +1 -0
- package/moderncssm/text/component.js.map +1 -0
- package/moderncssm/text/index.d.ts +1 -1
- package/moderncssm/text/index.js +1 -0
- package/moderncssm/text/index.js.map +1 -0
- package/moderncssm/text/index.module.css +0 -1
- package/moderncssm/title/alfasans-index.module.css +2 -23
- package/moderncssm/title/common.module.css +0 -2
- package/moderncssm/title/component.d.ts +12 -14
- package/moderncssm/title/component.js +1 -0
- package/moderncssm/title/component.js.map +1 -0
- package/moderncssm/title/index.d.ts +4 -5
- package/moderncssm/title/index.js +1 -0
- package/moderncssm/title/index.js.map +1 -0
- package/moderncssm/title/index.module.css +0 -1
- package/moderncssm/title/utils.d.ts +1 -2
- package/moderncssm/title/utils.js +1 -0
- package/moderncssm/title/utils.js.map +1 -0
- package/moderncssm/title-mobile/alfasans-index.module.css +2 -23
- package/moderncssm/title-mobile/component.d.ts +4 -6
- package/moderncssm/title-mobile/component.js +1 -0
- package/moderncssm/title-mobile/component.js.map +1 -0
- package/moderncssm/title-mobile/index.d.ts +2 -2
- package/moderncssm/title-mobile/index.js +1 -0
- package/moderncssm/title-mobile/index.js.map +1 -0
- package/moderncssm/title-mobile/index.module.css +0 -1
- package/moderncssm/title-responsive/component.d.ts +6 -8
- package/moderncssm/title-responsive/component.js +1 -0
- package/moderncssm/title-responsive/component.js.map +1 -0
- package/moderncssm/title-responsive/index.d.ts +1 -1
- package/moderncssm/title-responsive/index.js +1 -0
- package/moderncssm/title-responsive/index.js.map +1 -0
- package/moderncssm/types.d.ts +1 -2
- package/moderncssm/types.js +1 -0
- package/moderncssm/types.js.map +1 -0
- package/package.json +8 -8
- package/presets.d.ts +1 -2
- package/presets.js +1 -0
- package/presets.js.map +1 -0
- package/text/alfasans-index.css +30 -58
- package/text/alfasans-index.module.css.js +8 -0
- package/text/alfasans-index.module.css.js.map +1 -0
- package/text/component.d.ts +10 -12
- package/text/component.js +12 -15
- package/text/component.js.map +1 -0
- package/text/index.css +24 -45
- package/text/index.d.ts +1 -1
- package/text/index.js +3 -2
- package/text/index.js.map +1 -0
- package/text/index.module.css.js +8 -0
- package/text/index.module.css.js.map +1 -0
- package/title/alfasans-index.css +11 -33
- package/title/alfasans-index.module.css.js +8 -0
- package/title/alfasans-index.module.css.js.map +1 -0
- package/title/common.css +9 -31
- package/title/common.module.css.js +8 -0
- package/title/common.module.css.js.map +1 -0
- package/title/component.d.ts +12 -14
- package/title/component.js +5 -4
- package/title/component.js.map +1 -0
- package/title/index.css +21 -42
- package/title/index.d.ts +4 -5
- package/title/index.js +7 -10
- package/title/index.js.map +1 -0
- package/title/index.module.css.js +8 -0
- package/title/index.module.css.js.map +1 -0
- package/title/utils.d.ts +1 -2
- package/title/utils.js +1 -0
- package/title/utils.js.map +1 -0
- package/title-mobile/alfasans-index.css +11 -33
- package/title-mobile/alfasans-index.module.css.js +8 -0
- package/title-mobile/alfasans-index.module.css.js.map +1 -0
- package/title-mobile/component.d.ts +4 -6
- package/title-mobile/component.js +7 -10
- package/title-mobile/component.js.map +1 -0
- package/title-mobile/index.css +19 -40
- package/title-mobile/index.d.ts +2 -2
- package/title-mobile/index.js +3 -2
- package/title-mobile/index.js.map +1 -0
- package/title-mobile/index.module.css.js +8 -0
- package/title-mobile/index.module.css.js.map +1 -0
- package/title-responsive/component.d.ts +6 -8
- package/title-responsive/component.js +4 -3
- package/title-responsive/component.js.map +1 -0
- package/title-responsive/index.d.ts +1 -1
- package/title-responsive/index.js +3 -2
- package/title-responsive/index.js.map +1 -0
- package/types.d.ts +1 -2
- package/types.js +1 -0
- package/types.js.map +1 -0
- package/colors.module-0ab37907.js +0 -6
- package/common.module-162cc30e.js +0 -6
- package/cssm/common.module.css +0 -3
- package/cssm/margins.module.css +0 -1
- package/esm/colors.module-719e5e74.js +0 -4
- package/esm/common.module-2fe7f697.js +0 -4
- package/modern/colors.module-8f6f35d9.js +0 -4
- package/modern/common.module-3e4facd7.js +0 -4
- package/moderncssm/common.module.css +0 -3
- package/moderncssm/margins.module.css +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
|
|
3
|
+
const styles = {"styrene-xlarge":"typography__styrene-xlarge_1tztz","styrene-large":"typography__styrene-large_1tztz","styrene-medium":"typography__styrene-medium_1tztz","styrene-small":"typography__styrene-small_1tztz","styrene-xsmall":"typography__styrene-xsmall_1tztz","system-xlarge":"typography__system-xlarge_1tztz","system-large":"typography__system-large_1tztz","system-medium":"typography__system-medium_1tztz","system-small":"typography__system-small_1tztz","system-xsmall":"typography__system-xsmall_1tztz","margins-xlarge":"typography__margins-xlarge_1tztz","margins-large":"typography__margins-large_1tztz","margins-medium":"typography__margins-medium_1tztz","margins-small":"typography__margins-small_1tztz","margins-xsmall":"typography__margins-xsmall_1tztz"};
|
|
4
|
+
|
|
5
|
+
export { styles as default };
|
|
6
|
+
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../src/title-mobile/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n.styrene-xlarge {\n @mixin headline-mobile_xlarge;\n}\n\n.styrene-large {\n @mixin headline-mobile_large;\n}\n\n.styrene-medium {\n @mixin headline-mobile_medium;\n}\n\n.styrene-small {\n @mixin headline-mobile_small;\n}\n\n.styrene-xsmall {\n @mixin headline-mobile_xsmall;\n}\n\n.system-xlarge {\n @mixin headline-system-mobile_xlarge;\n}\n\n.system-large {\n @mixin headline-system-mobile_large;\n}\n\n.system-medium {\n @mixin headline-system-mobile_medium;\n}\n\n.system-small {\n @mixin headline-system-mobile_small;\n}\n\n.system-xsmall {\n @mixin headline-system-mobile_xsmall;\n}\n\n.margins-xlarge {\n @mixin margin-large;\n}\n\n.margins-large {\n @mixin margin-small;\n}\n\n.margins-medium {\n @mixin margin-small;\n}\n\n.margins-small {\n @mixin margin-small;\n}\n\n.margins-xsmall {\n @mixin margin-small;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,cAAc,CAAC,gCAAgC,CAAC,eAAe,CAAC,iCAAiC,CAAC,cAAc,CAAC,gCAAgC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { TitleProps } from
|
|
4
|
-
type TitleResponsiveProps = TitleProps & {
|
|
2
|
+
import { TitleProps } from '../title';
|
|
3
|
+
export declare type TitleResponsiveProps = TitleProps & {
|
|
5
4
|
/**
|
|
6
5
|
* Контрольная точка, с нее начинается desktop версия
|
|
7
6
|
* @default 1024
|
|
@@ -12,11 +11,11 @@ type TitleResponsiveProps = TitleProps & {
|
|
|
12
11
|
*/
|
|
13
12
|
client?: 'desktop' | 'mobile';
|
|
14
13
|
};
|
|
15
|
-
declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
14
|
+
export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
16
15
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
17
|
-
view?: "
|
|
16
|
+
view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
|
|
18
17
|
color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | "static-accent" | "static-positive" | undefined;
|
|
19
|
-
weight?: "
|
|
18
|
+
weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
|
|
20
19
|
font?: "alfasans" | "styrene" | "system" | {
|
|
21
20
|
font: "alfasans";
|
|
22
21
|
systemCompat: boolean;
|
|
@@ -25,7 +24,7 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
|
|
|
25
24
|
className?: string | undefined;
|
|
26
25
|
dataTestId?: string | undefined;
|
|
27
26
|
children?: React.ReactNode;
|
|
28
|
-
rowLimit?:
|
|
27
|
+
rowLimit?: 1 | 2 | 3 | undefined;
|
|
29
28
|
showSkeleton?: boolean | undefined;
|
|
30
29
|
skeletonProps?: import("@alfalab/core-components-skeleton").TextSkeletonProps | undefined;
|
|
31
30
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
@@ -40,4 +39,3 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
|
|
|
40
39
|
*/
|
|
41
40
|
client?: "mobile" | "desktop" | undefined;
|
|
42
41
|
} & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
|
|
43
|
-
export { TitleResponsiveProps, TitleResponsive };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title-responsive/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { Title, TitleProps } from '../title';\nimport { TitleMobile } from '../title-mobile';\n\nexport type TitleResponsiveProps = TitleProps & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n};\n\nexport const TitleResponsive = forwardRef<\n HTMLHeadingElement | HTMLDivElement,\n TitleResponsiveProps\n>(({ breakpoint, client, ...restProps }, ref) => {\n const isDesktop = useIsDesktop(breakpoint, client === 'desktop');\n\n const Component = isDesktop ? Title : TitleMobile;\n\n return <Component {...restProps} ref={ref} />;\n});\n"],"names":[],"mappings":";;;;;AAoBa,MAAA,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW;IAEjD,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI;AACjD,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/modern/types.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
|
|
2
|
-
export { TextElementType };
|
|
1
|
+
export declare type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
|
package/modern/types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/moderncssm/colors.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative", "static-primary-light", "static-secondary-light", "static-tertiary-light", "static-primary-dark", "static-secondary-dark", "static-tertiary-dark", "static-accent", "static-positive"];
|
|
2
|
-
type Color = (typeof colors)[number];
|
|
3
|
-
export { colors, Color };
|
|
1
|
+
export declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative", "static-primary-light", "static-secondary-light", "static-tertiary-light", "static-primary-dark", "static-secondary-dark", "static-tertiary-dark", "static-accent", "static-positive"];
|
|
2
|
+
export declare type Color = (typeof colors)[number];
|
package/moderncssm/colors.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAa,MAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import { Text, TextProps } from
|
|
3
|
-
import { Title, TitleProps } from
|
|
4
|
-
import { TitleMobile, TitleMobileProps } from
|
|
5
|
-
import { TitleResponsive, TitleResponsiveProps } from
|
|
6
|
-
import { TextElementType } from
|
|
7
|
-
declare const Typography: {
|
|
2
|
+
import { Text, TextProps } from './text';
|
|
3
|
+
import { Title, TitleProps } from './title';
|
|
4
|
+
import { TitleMobile, TitleMobileProps } from './title-mobile';
|
|
5
|
+
import { TitleResponsive, TitleResponsiveProps } from './title-responsive';
|
|
6
|
+
import { TextElementType } from './types';
|
|
7
|
+
export declare const Typography: {
|
|
8
8
|
Title: FC<TitleProps>;
|
|
9
9
|
Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
|
|
10
10
|
TitleResponsive: FC<TitleResponsiveProps>;
|
|
11
11
|
TitleMobile: FC<TitleMobileProps>;
|
|
12
12
|
};
|
|
13
|
-
export {
|
|
13
|
+
export { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };
|
package/moderncssm/component.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';\n\nimport { Text, TextProps } from './text';\nimport { Title, TitleProps } from './title';\nimport { TitleMobile, TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, TitleResponsiveProps } from './title-responsive';\nimport { TextElementType } from './types';\n\nexport const Typography: {\n Title: FC<TitleProps>;\n Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;\n TitleResponsive: FC<TitleResponsiveProps>;\n TitleMobile: FC<TitleMobileProps>;\n} = {\n Title,\n Text,\n TitleResponsive,\n TitleMobile,\n};\n\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQa,MAAA,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;;;"}
|
package/moderncssm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export type { TitleProps } from
|
|
4
|
-
export type { TextProps } from
|
|
5
|
-
export type { Color } from
|
|
1
|
+
export * from './component';
|
|
2
|
+
export * from './presets';
|
|
3
|
+
export type { TitleProps } from './title';
|
|
4
|
+
export type { TextProps } from './text';
|
|
5
|
+
export type { Color } from './colors';
|
package/moderncssm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/moderncssm/presets.d.ts
CHANGED
package/moderncssm/presets.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAa,MAAA,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;;;"}
|
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
-
} :root {
|
|
6
|
-
|
|
7
|
-
/* Hard */
|
|
8
|
-
|
|
9
|
-
/* Up */
|
|
10
|
-
|
|
11
|
-
/* Hard up */
|
|
12
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
13
|
-
|
|
14
|
-
/* новые значения, используйте их */
|
|
15
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
|
-
|
|
17
|
-
/* новые значения, используйте их */
|
|
18
|
-
|
|
19
|
-
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
20
|
-
/* stylelint-disable-next-line length-zero-no-unit */
|
|
21
|
-
} :root {
|
|
1
|
+
:root {
|
|
22
2
|
--font-family-alfasans: 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
23
3
|
'Helvetica Neue', Helvetica, sans-serif;
|
|
24
|
-
}
|
|
25
|
-
} /* сбрасывает синюю подсветку при нажатии */ .text.component {
|
|
4
|
+
} .text.component {
|
|
26
5
|
font-size: 16px;
|
|
27
6
|
line-height: 20px;
|
|
28
7
|
font-weight: 400;
|
|
@@ -43,32 +22,35 @@
|
|
|
43
22
|
text-transform: uppercase;
|
|
44
23
|
font-family: var(--font-family-alfasans);
|
|
45
24
|
} .text.primary-large {
|
|
46
|
-
/* prettier-ignore */
|
|
47
25
|
font-size: 18px;
|
|
48
26
|
line-height: 24px;
|
|
49
27
|
font-weight: 400;
|
|
50
28
|
letter-spacing: -0.36px;
|
|
51
29
|
font-family: var(--font-family-alfasans)
|
|
52
30
|
} .text.primary-large.bold {
|
|
31
|
+
letter-spacing: 0.38px;
|
|
53
32
|
} .text.primary-large.medium {
|
|
33
|
+
letter-spacing: 0.17px;
|
|
54
34
|
} .text.primary-medium {
|
|
55
|
-
/* prettier-ignore */
|
|
56
35
|
font-size: 16px;
|
|
57
36
|
line-height: 24px;
|
|
58
37
|
font-weight: 400;
|
|
59
38
|
letter-spacing: -0.24px;
|
|
60
39
|
font-family: var(--font-family-alfasans)
|
|
61
40
|
} .text.primary-medium.bold {
|
|
41
|
+
letter-spacing: 0.43px;
|
|
62
42
|
} .text.primary-medium.medium {
|
|
43
|
+
letter-spacing: 0.17px;
|
|
63
44
|
} .text.primary-small {
|
|
64
|
-
/* prettier-ignore */
|
|
65
45
|
font-size: 14px;
|
|
66
46
|
line-height: 20px;
|
|
67
47
|
font-weight: 400;
|
|
68
48
|
letter-spacing: -0.08px;
|
|
69
49
|
font-family: var(--font-family-alfasans)
|
|
70
50
|
} .text.primary-small.bold {
|
|
51
|
+
letter-spacing: 0.47px;
|
|
71
52
|
} .text.primary-small.medium {
|
|
53
|
+
letter-spacing: 0.27px;
|
|
72
54
|
} .text.component-primary {
|
|
73
55
|
font-size: 16px;
|
|
74
56
|
line-height: 20px;
|
|
@@ -76,34 +58,39 @@
|
|
|
76
58
|
letter-spacing: -0.24px;
|
|
77
59
|
font-family: var(--font-family-alfasans)
|
|
78
60
|
} .text.component-primary.bold {
|
|
61
|
+
letter-spacing: 0.43px;
|
|
79
62
|
} .text.component-primary.medium {
|
|
63
|
+
letter-spacing: 0.17px;
|
|
80
64
|
} .text.secondary-large {
|
|
81
|
-
/* prettier-ignore */
|
|
82
65
|
font-size: 13px;
|
|
83
66
|
line-height: 16px;
|
|
84
67
|
font-weight: 400;
|
|
85
68
|
letter-spacing: 0;
|
|
86
69
|
font-family: var(--font-family-alfasans)
|
|
87
70
|
} .text.secondary-large.bold {
|
|
71
|
+
letter-spacing: 0.54px;
|
|
88
72
|
} .text.secondary-large.medium {
|
|
73
|
+
letter-spacing: 0.33px;
|
|
89
74
|
} .text.secondary-medium {
|
|
90
|
-
/* prettier-ignore */
|
|
91
75
|
font-size: 12px;
|
|
92
76
|
line-height: 16px;
|
|
93
77
|
font-weight: 400;
|
|
94
78
|
letter-spacing: 0.06px;
|
|
95
79
|
font-family: var(--font-family-alfasans)
|
|
96
80
|
} .text.secondary-medium.bold {
|
|
81
|
+
letter-spacing: 0.57px;
|
|
97
82
|
} .text.secondary-medium.medium {
|
|
83
|
+
letter-spacing: 0.38px;
|
|
98
84
|
} .text.secondary-small {
|
|
99
|
-
/* prettier-ignore */
|
|
100
85
|
font-size: 11px;
|
|
101
86
|
line-height: 16px;
|
|
102
87
|
font-weight: 400;
|
|
103
88
|
letter-spacing: 0.15px;
|
|
104
89
|
font-family: var(--font-family-alfasans)
|
|
105
90
|
} .text.secondary-small.bold {
|
|
91
|
+
letter-spacing: 0.54px;
|
|
106
92
|
} .text.secondary-small.medium {
|
|
93
|
+
letter-spacing: 0.41px;
|
|
107
94
|
} .text.component-secondary {
|
|
108
95
|
font-size: 14px;
|
|
109
96
|
line-height: 18px;
|
|
@@ -111,7 +98,9 @@
|
|
|
111
98
|
letter-spacing: -0.08px;
|
|
112
99
|
font-family: var(--font-family-alfasans)
|
|
113
100
|
} .text.component-secondary.bold {
|
|
101
|
+
letter-spacing: 0.47px;
|
|
114
102
|
} .text.component-secondary.medium {
|
|
103
|
+
letter-spacing: 0.27px;
|
|
115
104
|
} .text.bold {
|
|
116
105
|
font-weight: 700;
|
|
117
106
|
} .text.medium {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
8
|
-
type TextBaseProps = {
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { type TextSkeletonProps } from '@alfalab/core-components-skeleton';
|
|
3
|
+
import { Color } from '../colors';
|
|
4
|
+
import { TextElementType } from '../types';
|
|
5
|
+
declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
6
|
+
declare type TextBaseProps = {
|
|
9
7
|
/**
|
|
10
8
|
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
|
|
11
9
|
*/
|
|
@@ -59,10 +57,10 @@ type TextBaseProps = {
|
|
|
59
57
|
*/
|
|
60
58
|
font?: 'alfasans' | undefined | null;
|
|
61
59
|
};
|
|
62
|
-
type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
|
|
60
|
+
declare type TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {
|
|
63
61
|
tag?: 'p';
|
|
64
62
|
defaultMargins?: boolean;
|
|
65
63
|
};
|
|
66
|
-
type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
|
|
67
|
-
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
|
|
68
|
-
export {
|
|
64
|
+
export declare type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);
|
|
65
|
+
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElementType>>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { Color } from '../colors';\nimport { TextElementType } from '../types';\n\nimport colors from '../colors.module.css';\nimport alfasansStyles from './alfasans-index.module.css';\nimport styles from './index.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLSpanElement>;\n\ntype TextBaseProps = {\n /**\n * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)\n */\n view?:\n | 'primary-large'\n | 'primary-medium'\n | 'primary-small'\n | 'secondary-large'\n | 'secondary-medium'\n | 'secondary-small'\n | 'component'\n | 'component-primary'\n | 'component-secondary'\n | 'caps'\n | 'tagline';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold';\n\n /**\n * Делает цифры моноширинными\n */\n monospaceNumbers?: boolean;\n\n /**\n * HTML тег\n */\n tag?: 'span' | 'div';\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Добавляет отступы к тэгу 'p'\n */\n defaultMargins?: never;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Шрифт текста\n */\n font?: 'alfasans' | undefined | null;\n};\n\ntype TextPTagProps = Omit<TextBaseProps, 'tag' | 'defaultMargins'> & {\n tag?: 'p';\n defaultMargins?: boolean;\n};\n\nexport type TextProps = Omit<NativeProps, 'color'> & (TextBaseProps | TextPTagProps);\n\nconst logWarning = (view: Required<TextBaseProps>['view']) => {\n if (process.env.NODE_ENV !== 'development') {\n return;\n }\n\n const viewsMap: { [key: string]: string } = {\n component: 'component-primary',\n };\n\n // eslint-disable-next-line no-console\n console.warn(\n // eslint-disable-next-line prefer-template\n `@alfalab/core-components/typography: view='${view}' будет удален в следующих мажорных версиях. ` +\n `Используйте view='${viewsMap[view]}'.`,\n );\n};\n\nexport const Text = forwardRef<TextElementType, TextProps>(\n (\n {\n view = 'primary-medium',\n tag: Component = 'span',\n weight,\n monospaceNumbers = false,\n defaultMargins = true,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n showSkeleton,\n skeletonProps,\n font,\n ...restProps\n },\n ref,\n ) => {\n if (view === 'component') {\n logWarning(view);\n }\n\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n {\n [styles.paragraph]: Component === 'p' && !defaultMargins,\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n [styles.monospace]: monospaceNumbers,\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n [alfasansStyles.text]: font === 'alfasans',\n },\n className,\n color && colors[color],\n (font === 'alfasans' ? alfasansStyles : styles)[view],\n weight && (font === 'alfasans' ? alfasansStyles : styles)[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;AAoGA,MAAM,UAAU,GAAG,CAAC,IAAqC,KAAI;AACzD,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC;AACH;AAED,IAAA,MAAM,QAAQ,GAA8B;AACxC,QAAA,SAAS,EAAE,mBAAmB;KACjC;;AAGD,IAAA,OAAO,CAAC,IAAI;;AAER,IAAA,CAAA,2CAAA,EAA8C,IAAI,CAA+C,6CAAA,CAAA;AAC7F,QAAA,CAAA,kBAAA,EAAqB,QAAQ,CAAC,IAAI,CAAC,CAAA,EAAA,CAAI,CAC9C;AACL,CAAC;MAEY,IAAI,GAAG,UAAU,CAC1B,CACI,EACI,IAAI,GAAG,gBAAgB,EACvB,GAAG,EAAE,SAAS,GAAG,MAAM,EACvB,MAAM,EACN,gBAAgB,GAAG,KAAK,EACxB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,IAAI,IAAI,KAAK,WAAW,EAAE;QACtB,UAAU,CAAC,IAAI,CAAC;AACnB;AAED,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC;YACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;SACrE,CAAC;QACF,UAAU;AACb,KAAA,CAAC;AAEF,IAAA,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;AAClB;AAED,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,IACN,SAAS,EAAE,EAAE,CACT;YACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;YACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,YAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;YACpC,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,YAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AAClC,YAAA,CAAC,cAAc,CAAC,IAAI,GAAG,IAAI,KAAK,UAAU;AAC7C,SAAA,EACD,SAAS,EACT,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,CAAC,IAAI,KAAK,UAAU,GAAG,cAAc,GAAG,MAAM,EAAE,IAAI,CAAC,EACrD,MAAM,IAAI,CAAC,IAAI,KAAK,UAAU,GAAG,cAAc,GAAG,MAAM,EAAE,MAAM,CAAC,CACpE,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,GAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './component';
|
package/moderncssm/text/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
-
} :root {
|
|
6
|
-
|
|
7
|
-
/* Hard */
|
|
8
|
-
|
|
9
|
-
/* Up */
|
|
10
|
-
|
|
11
|
-
/* Hard up */
|
|
12
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
13
|
-
|
|
14
|
-
/* новые значения, используйте их */
|
|
15
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
|
-
|
|
17
|
-
/* новые значения, используйте их */
|
|
18
|
-
|
|
19
|
-
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
20
|
-
/* stylelint-disable-next-line length-zero-no-unit */
|
|
21
|
-
} :root {
|
|
1
|
+
:root {
|
|
22
2
|
--font-family-alfasans: 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
23
3
|
'Helvetica Neue', Helvetica, sans-serif;
|
|
24
|
-
}
|
|
25
|
-
} /* сбрасывает синюю подсветку при нажатии */ .alfasans-xlarge {
|
|
4
|
+
} .alfasans-xlarge {
|
|
26
5
|
font-size: 48px;
|
|
27
6
|
line-height: 64px;
|
|
28
7
|
font-weight: 700;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type NativeProps = HTMLAttributes<HTMLHeadingElement>;
|
|
7
|
-
type TitleProps = Omit<NativeProps, 'color'> & {
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { type TextSkeletonProps } from '@alfalab/core-components-skeleton';
|
|
3
|
+
import { Color } from '../colors';
|
|
4
|
+
declare type NativeProps = HTMLAttributes<HTMLHeadingElement>;
|
|
5
|
+
export declare type TitleProps = Omit<NativeProps, 'color'> & {
|
|
8
6
|
/**
|
|
9
7
|
* HTML тег
|
|
10
8
|
*/
|
|
@@ -61,14 +59,14 @@ type TitleProps = Omit<NativeProps, 'color'> & {
|
|
|
61
59
|
*/
|
|
62
60
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
63
61
|
};
|
|
64
|
-
type PrivateProps = {
|
|
62
|
+
declare type PrivateProps = {
|
|
65
63
|
styles: {
|
|
66
64
|
[key: string]: string;
|
|
67
65
|
};
|
|
68
66
|
platform: 'mobile' | 'desktop';
|
|
69
67
|
};
|
|
70
|
-
type TitleElementType = HTMLHeadingElement | HTMLDivElement;
|
|
71
|
-
declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "color"> & {
|
|
68
|
+
declare type TitleElementType = HTMLHeadingElement | HTMLDivElement;
|
|
69
|
+
export declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "color"> & {
|
|
72
70
|
/**
|
|
73
71
|
* HTML тег
|
|
74
72
|
*/
|
|
@@ -76,7 +74,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
76
74
|
/**
|
|
77
75
|
* [Вариант начертания](?path=/docs/guidelines-typography--page)
|
|
78
76
|
*/
|
|
79
|
-
view?: "
|
|
77
|
+
view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
|
|
80
78
|
/**
|
|
81
79
|
* Цвет текста
|
|
82
80
|
*/
|
|
@@ -84,7 +82,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
84
82
|
/**
|
|
85
83
|
* Толщина шрифта
|
|
86
84
|
*/
|
|
87
|
-
weight?: "
|
|
85
|
+
weight?: "regular" | "medium" | "bold" | "semibold" | undefined;
|
|
88
86
|
/**
|
|
89
87
|
* Шрифт текста
|
|
90
88
|
*/
|
|
@@ -111,7 +109,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
111
109
|
/**
|
|
112
110
|
* Количество строк
|
|
113
111
|
*/
|
|
114
|
-
rowLimit?:
|
|
112
|
+
rowLimit?: 1 | 2 | 3 | undefined;
|
|
115
113
|
/**
|
|
116
114
|
* Показать скелетон
|
|
117
115
|
*/
|
|
@@ -125,4 +123,4 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
125
123
|
*/
|
|
126
124
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
127
125
|
} & PrivateProps & React.RefAttributes<TitleElementType>>;
|
|
128
|
-
export {
|
|
126
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { Color } from '../colors';\n\nimport { getDefaultWeight } from './utils';\n\nimport colors from '../colors.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' | 'alfasans' | { font: 'alfasans'; systemCompat: boolean };\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: fontProp = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(fontProp) ? fontProp.font : fontProp, platform),\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 let font: string;\n let systemCompat: boolean | undefined;\n\n if (isObject(fontProp)) {\n font = fontProp.font;\n systemCompat = fontProp.systemCompat;\n } else {\n font = fontProp;\n }\n\n return (\n <Component\n className={cn(\n styles.component,\n className,\n styles[`${font}-${view}`],\n defaultMargins && styles[`margins-${view}`],\n styles[weight],\n color && colors[color],\n {\n [styles[`rowLimit${rowLimit}`]]: rowLimit,\n [styles.transparent]: showSkeleton,\n [styles.systemCompat]: systemCompat,\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":";;;;;;;;AA2FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EAAE,QAAQ,GAAG,SAAS,EAC1B,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,EAAE,QAAQ,CAAC,EAClF,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAE5E,MAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;QACjE,UAAU;AACb,KAAA,CAAC;AAEF,IAAA,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;AAClB;AAED,IAAA,IAAI,IAAY;AAChB,IAAA,IAAI,YAAiC;AAErC,IAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAAE;AACpB,QAAA,IAAI,GAAG,QAAQ,CAAC,IAAI;AACpB,QAAA,YAAY,GAAG,QAAQ,CAAC,YAAY;AACvC;AAAM,SAAA;QACH,IAAI,GAAG,QAAQ;AAClB;AAED,IAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,IACN,SAAS,EAAE,EAAE,CACT,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,CAAG,EAAA,IAAI,IAAI,IAAI,CAAA,CAAE,CAAC,EACzB,cAAc,IAAI,MAAM,CAAC,WAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,MAAM,CAAC,MAAM,CAAC,EACd,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;YACI,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,YAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AAClC,YAAA,CAAC,MAAM,CAAC,YAAY,GAAG,YAAY;AACtC,SAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,GAAA,SAAS,IAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|