@alfalab/core-components-typography 5.0.1 → 5.0.2
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/colors.module.css.js.map +1 -1
- package/component.d.ts +6 -6
- package/component.js.map +1 -1
- package/cssm/component.d.ts +6 -6
- package/cssm/component.js.map +1 -1
- package/cssm/text/alfasans-index.module.css +23 -22
- package/cssm/text/component.d.ts +3 -3
- package/cssm/text/component.js.map +1 -1
- package/cssm/title/alfasans-index.module.css +8 -7
- package/cssm/title/common.module.css +1 -1
- package/cssm/title/component.d.ts +2 -2
- package/cssm/title/component.js.map +1 -1
- package/cssm/title/index.d.ts +1 -1
- package/cssm/title/index.js.map +1 -1
- package/cssm/title/index.module.css +3 -2
- package/cssm/title-mobile/alfasans-index.module.css +8 -7
- package/cssm/title-mobile/component.js.map +1 -1
- package/cssm/title-mobile/index.module.css +3 -2
- package/cssm/title-responsive/component.d.ts +1 -1
- package/cssm/title-responsive/component.js.map +1 -1
- package/esm/colors.css +20 -20
- package/esm/colors.module.css.js +1 -1
- package/esm/colors.module.css.js.map +1 -1
- package/esm/component.d.ts +6 -6
- package/esm/component.js.map +1 -1
- package/esm/text/alfasans-index.css +40 -39
- package/esm/text/alfasans-index.module.css.js +1 -1
- package/esm/text/alfasans-index.module.css.js.map +1 -1
- package/esm/text/component.d.ts +3 -3
- package/esm/text/component.js.map +1 -1
- package/esm/text/index.css +21 -21
- package/esm/text/index.module.css.js +1 -1
- package/esm/text/index.module.css.js.map +1 -1
- package/esm/title/alfasans-index.css +18 -17
- package/esm/title/alfasans-index.module.css.js +1 -1
- package/esm/title/common.css +9 -9
- package/esm/title/common.module.css.js +1 -1
- package/esm/title/common.module.css.js.map +1 -1
- package/esm/title/component.d.ts +2 -2
- package/esm/title/component.js.map +1 -1
- package/esm/title/index.css +19 -18
- package/esm/title/index.d.ts +1 -1
- package/esm/title/index.js.map +1 -1
- package/esm/title/index.module.css.js +1 -1
- package/esm/title/index.module.css.js.map +1 -1
- package/esm/title-mobile/alfasans-index.css +18 -17
- package/esm/title-mobile/alfasans-index.module.css.js +1 -1
- package/esm/title-mobile/component.js.map +1 -1
- package/esm/title-mobile/index.css +18 -17
- package/esm/title-mobile/index.module.css.js +1 -1
- package/esm/title-mobile/index.module.css.js.map +1 -1
- package/esm/title-responsive/component.d.ts +1 -1
- package/esm/title-responsive/component.js.map +1 -1
- package/modern/colors.css +20 -20
- package/modern/colors.module.css.js +1 -1
- package/modern/colors.module.css.js.map +1 -1
- package/modern/component.d.ts +6 -6
- package/modern/component.js.map +1 -1
- package/modern/text/alfasans-index.css +40 -39
- package/modern/text/alfasans-index.module.css.js +1 -1
- package/modern/text/alfasans-index.module.css.js.map +1 -1
- package/modern/text/component.d.ts +3 -3
- package/modern/text/component.js.map +1 -1
- package/modern/text/index.css +21 -21
- package/modern/text/index.module.css.js +1 -1
- package/modern/text/index.module.css.js.map +1 -1
- package/modern/title/alfasans-index.css +18 -17
- package/modern/title/alfasans-index.module.css.js +1 -1
- package/modern/title/common.css +9 -9
- package/modern/title/common.module.css.js +1 -1
- package/modern/title/common.module.css.js.map +1 -1
- package/modern/title/component.d.ts +2 -2
- package/modern/title/component.js.map +1 -1
- package/modern/title/index.css +19 -18
- package/modern/title/index.d.ts +1 -1
- package/modern/title/index.js.map +1 -1
- package/modern/title/index.module.css.js +1 -1
- package/modern/title/index.module.css.js.map +1 -1
- package/modern/title-mobile/alfasans-index.css +18 -17
- package/modern/title-mobile/alfasans-index.module.css.js +1 -1
- package/modern/title-mobile/component.js.map +1 -1
- package/modern/title-mobile/index.css +18 -17
- package/modern/title-mobile/index.module.css.js +1 -1
- package/modern/title-mobile/index.module.css.js.map +1 -1
- package/modern/title-responsive/component.d.ts +1 -1
- package/modern/title-responsive/component.js.map +1 -1
- package/moderncssm/colors.module.css +2 -0
- package/moderncssm/component.d.ts +6 -6
- package/moderncssm/component.js.map +1 -1
- package/moderncssm/text/alfasans-index.module.css +66 -40
- package/moderncssm/text/component.d.ts +3 -3
- package/moderncssm/text/component.js.map +1 -1
- package/moderncssm/text/index.module.css +21 -0
- package/moderncssm/title/alfasans-index.module.css +25 -18
- package/moderncssm/title/common.module.css +3 -1
- package/moderncssm/title/component.d.ts +2 -2
- package/moderncssm/title/component.js.map +1 -1
- package/moderncssm/title/index.d.ts +1 -1
- package/moderncssm/title/index.js.map +1 -1
- package/moderncssm/title/index.module.css +15 -0
- package/moderncssm/title-mobile/alfasans-index.module.css +25 -18
- package/moderncssm/title-mobile/component.js.map +1 -1
- package/moderncssm/title-mobile/index.module.css +14 -0
- package/moderncssm/title-responsive/component.d.ts +1 -1
- package/moderncssm/title-responsive/component.js.map +1 -1
- package/package.json +3 -3
- package/src/colors.module.css +1 -1
- package/src/component.ts +21 -0
- package/src/text/component.tsx +3 -3
- package/src/text/index.module.css +1 -1
- package/src/title/common.module.css +1 -1
- package/src/title/component.tsx +2 -2
- package/src/title/index.module.css +1 -1
- package/src/title/index.tsx +1 -1
- package/src/title-mobile/component.tsx +1 -1
- package/src/title-mobile/index.module.css +1 -1
- package/src/title-responsive/component.tsx +1 -1
- package/text/alfasans-index.css +40 -39
- package/text/alfasans-index.module.css.js +1 -1
- package/text/alfasans-index.module.css.js.map +1 -1
- package/text/component.d.ts +3 -3
- package/text/component.js.map +1 -1
- package/text/index.css +21 -21
- package/text/index.module.css.js +1 -1
- package/text/index.module.css.js.map +1 -1
- package/title/alfasans-index.css +18 -17
- package/title/alfasans-index.module.css.js +1 -1
- package/title/common.css +9 -9
- package/title/common.module.css.js +1 -1
- package/title/common.module.css.js.map +1 -1
- package/title/component.d.ts +2 -2
- package/title/component.js.map +1 -1
- package/title/index.css +19 -18
- package/title/index.d.ts +1 -1
- package/title/index.js.map +1 -1
- package/title/index.module.css.js +1 -1
- package/title/index.module.css.js.map +1 -1
- package/title-mobile/alfasans-index.css +18 -17
- package/title-mobile/alfasans-index.module.css.js +1 -1
- package/title-mobile/component.js.map +1 -1
- package/title-mobile/index.css +18 -17
- package/title-mobile/index.module.css.js +1 -1
- package/title-mobile/index.module.css.js.map +1 -1
- package/title-responsive/component.d.ts +1 -1
- package/title-responsive/component.js.map +1 -1
- package/src/component.tsx +0 -21
- /package/src/title-mobile/{index.tsx → index.ts} +0 -0
- /package/src/title-responsive/{index.tsx → index.ts} +0 -0
package/colors.css
CHANGED
|
@@ -19,44 +19,44 @@
|
|
|
19
19
|
--color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
|
|
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
|
+
} .typography__tertiary_xzzbg {
|
|
23
23
|
color: var(--color-light-text-tertiary);
|
|
24
|
-
} .
|
|
24
|
+
} .typography__disabled_xzzbg {
|
|
25
25
|
color: var(--color-light-text-quaternary);
|
|
26
|
-
} .
|
|
26
|
+
} .typography__accent_xzzbg {
|
|
27
27
|
color: var(--color-light-accent-primary);
|
|
28
|
-
} .
|
|
28
|
+
} .typography__primary_xzzbg {
|
|
29
29
|
color: var(--color-light-text-primary);
|
|
30
|
-
} .
|
|
30
|
+
} .typography__attention_xzzbg {
|
|
31
31
|
color: var(--color-light-text-attention);
|
|
32
|
-
} .
|
|
32
|
+
} .typography__positive_xzzbg {
|
|
33
33
|
color: var(--color-light-text-positive);
|
|
34
|
-
} .
|
|
34
|
+
} .typography__secondary_xzzbg {
|
|
35
35
|
color: var(--color-light-text-secondary);
|
|
36
|
-
} .typography__tertiary-
|
|
36
|
+
} .typography__tertiary-inverted_xzzbg {
|
|
37
37
|
color: var(--color-light-text-tertiary-inverted);
|
|
38
|
-
} .typography__primary-
|
|
38
|
+
} .typography__primary-inverted_xzzbg {
|
|
39
39
|
color: var(--color-light-text-primary-inverted);
|
|
40
|
-
} .typography__secondary-
|
|
40
|
+
} .typography__secondary-inverted_xzzbg {
|
|
41
41
|
color: var(--color-light-text-secondary-inverted);
|
|
42
|
-
} .
|
|
42
|
+
} .typography__link_xzzbg {
|
|
43
43
|
color: var(--color-light-text-info);
|
|
44
|
-
} .
|
|
44
|
+
} .typography__negative_xzzbg {
|
|
45
45
|
color: var(--color-light-text-negative);
|
|
46
|
-
} .typography__static-primary-
|
|
46
|
+
} .typography__static-primary-light_xzzbg {
|
|
47
47
|
color: var(--color-static-text-primary-light);
|
|
48
|
-
} .typography__static-secondary-
|
|
48
|
+
} .typography__static-secondary-light_xzzbg {
|
|
49
49
|
color: var(--color-static-text-secondary-light);
|
|
50
|
-
} .typography__static-tertiary-
|
|
50
|
+
} .typography__static-tertiary-light_xzzbg {
|
|
51
51
|
color: var(--color-static-text-tertiary-light);
|
|
52
|
-
} .typography__static-primary-
|
|
52
|
+
} .typography__static-primary-dark_xzzbg {
|
|
53
53
|
color: var(--color-static-text-primary-dark);
|
|
54
|
-
} .typography__static-secondary-
|
|
54
|
+
} .typography__static-secondary-dark_xzzbg {
|
|
55
55
|
color: var(--color-static-text-secondary-dark);
|
|
56
|
-
} .typography__static-tertiary-
|
|
56
|
+
} .typography__static-tertiary-dark_xzzbg {
|
|
57
57
|
color: var(--color-static-text-tertiary-dark);
|
|
58
|
-
} .typography__static-
|
|
58
|
+
} .typography__static-accent_xzzbg {
|
|
59
59
|
color: var(--color-static-accent-primary);
|
|
60
|
-
} .typography__static-
|
|
60
|
+
} .typography__static-positive_xzzbg {
|
|
61
61
|
color: var(--color-static-text-positive);
|
|
62
62
|
}
|
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_xzzbg","disabled":"typography__disabled_xzzbg","accent":"typography__accent_xzzbg","primary":"typography__primary_xzzbg","attention":"typography__attention_xzzbg","positive":"typography__positive_xzzbg","secondary":"typography__secondary_xzzbg","tertiary-inverted":"typography__tertiary-inverted_xzzbg","primary-inverted":"typography__primary-inverted_xzzbg","secondary-inverted":"typography__secondary-inverted_xzzbg","link":"typography__link_xzzbg","negative":"typography__negative_xzzbg","static-primary-light":"typography__static-primary-light_xzzbg","static-secondary-light":"typography__static-secondary-light_xzzbg","static-tertiary-light":"typography__static-tertiary-light_xzzbg","static-primary-dark":"typography__static-primary-dark_xzzbg","static-secondary-dark":"typography__static-secondary-dark_xzzbg","static-tertiary-dark":"typography__static-tertiary-dark_xzzbg","static-accent":"typography__static-accent_xzzbg","static-positive":"typography__static-positive_xzzbg"};
|
|
6
6
|
|
|
7
7
|
module.exports = colors;
|
|
8
8
|
//# sourceMappingURL=colors.module.css.js.map
|
package/colors.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"colors.module.css.js","sources":["src/colors.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n/* colors */\n\n.tertiary {\n color: var(--color-light-text-tertiary);\n}\n\n.disabled {\n color: var(--color-light-text-quaternary);\n}\n\n.accent {\n color: var(--color-light-accent-primary);\n}\n\n.primary {\n color: var(--color-light-text-primary);\n}\n\n.attention {\n color: var(--color-light-text-attention);\n}\n\n.positive {\n color: var(--color-light-text-positive);\n}\n\n.secondary {\n color: var(--color-light-text-secondary);\n}\n\n.tertiary-inverted {\n color: var(--color-light-text-tertiary-inverted);\n}\n\n.primary-inverted {\n color: var(--color-light-text-primary-inverted);\n}\n\n.secondary-inverted {\n color: var(--color-light-text-secondary-inverted);\n}\n\n.link {\n color: var(--color-light-text-info);\n}\n\n.negative {\n color: var(--color-light-text-negative);\n}\n\n.static-primary-light {\n color: var(--color-static-text-primary-light);\n}\n\n.static-secondary-light {\n color: var(--color-static-text-secondary-light);\n}\n\n.static-tertiary-light {\n color: var(--color-static-text-tertiary-light);\n}\n\n.static-primary-dark {\n color: var(--color-static-text-primary-dark);\n}\n\n.static-secondary-dark {\n color: var(--color-static-text-secondary-dark);\n}\n\n.static-tertiary-dark {\n color: var(--color-static-text-tertiary-dark);\n}\n\n.static-accent {\n color: var(--color-static-accent-primary);\n}\n\n.static-positive {\n color: var(--color-static-text-positive);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,UAAU,CAAC,4BAA4B,CAAC,UAAU,CAAC,4BAA4B,CAAC,QAAQ,CAAC,0BAA0B,CAAC,SAAS,CAAC,2BAA2B,CAAC,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,4BAA4B,CAAC,WAAW,CAAC,6BAA6B,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,oBAAoB,CAAC,sCAAsC,CAAC,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,wBAAwB,CAAC,0CAA0C,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,uBAAuB,CAAC,yCAAyC,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,eAAe,CAAC,iCAAiC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC;;;;"}
|
package/component.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
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';
|
|
1
|
+
import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
2
|
+
import { Text, type TextProps } from './text';
|
|
3
|
+
import { Title, type TitleProps } from './title';
|
|
4
|
+
import { TitleMobile, type TitleMobileProps } from './title-mobile';
|
|
5
|
+
import { TitleResponsive, type TitleResponsiveProps } from './title-responsive';
|
|
6
|
+
import { type TextElementType } from './types';
|
|
7
7
|
export declare const Typography: {
|
|
8
8
|
Title: FC<TitleProps>;
|
|
9
9
|
Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
|
package/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["src/component.
|
|
1
|
+
{"version":3,"file":"component.js","sources":["src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type 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":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQa,IAAA,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;"}
|
package/cssm/component.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
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';
|
|
1
|
+
import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
2
|
+
import { Text, type TextProps } from './text';
|
|
3
|
+
import { Title, type TitleProps } from './title';
|
|
4
|
+
import { TitleMobile, type TitleMobileProps } from './title-mobile';
|
|
5
|
+
import { TitleResponsive, type TitleResponsiveProps } from './title-responsive';
|
|
6
|
+
import { type TextElementType } from './types';
|
|
7
7
|
export declare const Typography: {
|
|
8
8
|
Title: FC<TitleProps>;
|
|
9
9
|
Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
|
package/cssm/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../src/component.
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import { type FC, type ForwardRefExoticComponent, type RefAttributes } from 'react';\n\nimport { Text, type TextProps } from './text';\nimport { Title, type TitleProps } from './title';\nimport { TitleMobile, type TitleMobileProps } from './title-mobile';\nimport { TitleResponsive, type TitleResponsiveProps } from './title-responsive';\nimport { type 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":["Title","Text","TitleResponsive","TitleMobile"],"mappings":";;;;;;;;;AAQa,IAAA,UAAU,GAKnB;AACA,IAAA,KAAK,EAAAA,WAAA;AACL,IAAA,IAAI,EAAAC,cAAA;AACJ,IAAA,eAAe,EAAAC,2BAAA;AACf,IAAA,WAAW,EAAAC,uBAAA;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-family-alfasans:
|
|
3
|
-
'
|
|
2
|
+
--font-family-alfasans:
|
|
3
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
4
|
+
Helvetica, sans-serif;
|
|
4
5
|
} .text.component {
|
|
5
6
|
font-size: 16px;
|
|
6
7
|
line-height: 20px;
|
|
@@ -26,37 +27,37 @@
|
|
|
26
27
|
line-height: 24px;
|
|
27
28
|
font-weight: 400;
|
|
28
29
|
letter-spacing: -0.36px;
|
|
29
|
-
font-family: var(--font-family-alfasans)
|
|
30
|
-
} .text.primary
|
|
30
|
+
font-family: var(--font-family-alfasans);
|
|
31
|
+
} -large.text.primary.bold {
|
|
31
32
|
letter-spacing: 0.38px;
|
|
32
|
-
} .text.primary
|
|
33
|
+
} -large.text.primary.medium {
|
|
33
34
|
letter-spacing: 0.17px;
|
|
34
35
|
} .text.primary-medium {
|
|
35
36
|
font-size: 16px;
|
|
36
37
|
line-height: 24px;
|
|
37
38
|
font-weight: 400;
|
|
38
39
|
letter-spacing: -0.24px;
|
|
39
|
-
font-family: var(--font-family-alfasans)
|
|
40
|
-
} .text.primary
|
|
40
|
+
font-family: var(--font-family-alfasans);
|
|
41
|
+
} -medium.text.primary.bold {
|
|
41
42
|
letter-spacing: 0.43px;
|
|
42
|
-
} .text.primary
|
|
43
|
+
} -medium.text.primary.medium {
|
|
43
44
|
letter-spacing: 0.17px;
|
|
44
45
|
} .text.primary-small {
|
|
45
46
|
font-size: 14px;
|
|
46
47
|
line-height: 20px;
|
|
47
48
|
font-weight: 400;
|
|
48
49
|
letter-spacing: -0.08px;
|
|
49
|
-
font-family: var(--font-family-alfasans)
|
|
50
|
-
} .text.primary
|
|
50
|
+
font-family: var(--font-family-alfasans);
|
|
51
|
+
} -small.text.primary.bold {
|
|
51
52
|
letter-spacing: 0.47px;
|
|
52
|
-
} .text.primary
|
|
53
|
+
} -small.text.primary.medium {
|
|
53
54
|
letter-spacing: 0.27px;
|
|
54
55
|
} .text.component-primary {
|
|
55
56
|
font-size: 16px;
|
|
56
57
|
line-height: 20px;
|
|
57
58
|
font-weight: 400;
|
|
58
59
|
letter-spacing: -0.24px;
|
|
59
|
-
font-family: var(--font-family-alfasans)
|
|
60
|
+
font-family: var(--font-family-alfasans);
|
|
60
61
|
} .text.component-primary.bold {
|
|
61
62
|
letter-spacing: 0.43px;
|
|
62
63
|
} .text.component-primary.medium {
|
|
@@ -66,37 +67,37 @@
|
|
|
66
67
|
line-height: 16px;
|
|
67
68
|
font-weight: 400;
|
|
68
69
|
letter-spacing: 0;
|
|
69
|
-
font-family: var(--font-family-alfasans)
|
|
70
|
-
} .text.secondary
|
|
70
|
+
font-family: var(--font-family-alfasans);
|
|
71
|
+
} -large.text.secondary.bold {
|
|
71
72
|
letter-spacing: 0.54px;
|
|
72
|
-
} .text.secondary
|
|
73
|
+
} -large.text.secondary.medium {
|
|
73
74
|
letter-spacing: 0.33px;
|
|
74
75
|
} .text.secondary-medium {
|
|
75
76
|
font-size: 12px;
|
|
76
77
|
line-height: 16px;
|
|
77
78
|
font-weight: 400;
|
|
78
79
|
letter-spacing: 0.06px;
|
|
79
|
-
font-family: var(--font-family-alfasans)
|
|
80
|
-
} .text.secondary
|
|
80
|
+
font-family: var(--font-family-alfasans);
|
|
81
|
+
} -medium.text.secondary.bold {
|
|
81
82
|
letter-spacing: 0.57px;
|
|
82
|
-
} .text.secondary
|
|
83
|
+
} -medium.text.secondary.medium {
|
|
83
84
|
letter-spacing: 0.38px;
|
|
84
85
|
} .text.secondary-small {
|
|
85
86
|
font-size: 11px;
|
|
86
87
|
line-height: 16px;
|
|
87
88
|
font-weight: 400;
|
|
88
89
|
letter-spacing: 0.15px;
|
|
89
|
-
font-family: var(--font-family-alfasans)
|
|
90
|
-
} .text.secondary
|
|
90
|
+
font-family: var(--font-family-alfasans);
|
|
91
|
+
} -small.text.secondary.bold {
|
|
91
92
|
letter-spacing: 0.54px;
|
|
92
|
-
} .text.secondary
|
|
93
|
+
} -small.text.secondary.medium {
|
|
93
94
|
letter-spacing: 0.41px;
|
|
94
95
|
} .text.component-secondary {
|
|
95
96
|
font-size: 14px;
|
|
96
97
|
line-height: 18px;
|
|
97
98
|
font-weight: 400;
|
|
98
99
|
letter-spacing: -0.08px;
|
|
99
|
-
font-family: var(--font-family-alfasans)
|
|
100
|
+
font-family: var(--font-family-alfasans);
|
|
100
101
|
} .text.component-secondary.bold {
|
|
101
102
|
letter-spacing: 0.47px;
|
|
102
103
|
} .text.component-secondary.medium {
|
package/cssm/text/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type TextSkeletonProps } from '@alfalab/core-components-skeleton/cssm';
|
|
3
|
-
import { Color } from '../colors';
|
|
4
|
-
import { TextElementType } from '../types';
|
|
3
|
+
import { type Color } from '../colors';
|
|
4
|
+
import { type TextElementType } from '../types';
|
|
5
5
|
declare type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
6
6
|
declare type TextBaseProps = {
|
|
7
7
|
/**
|
|
@@ -1 +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":["forwardRef","__rest","useSkeleton","cn","styles","React","__assign","alfasansStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoGA,IAAM,UAAU,GAAG,UAAC,IAAqC,EAAA;AACrD,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC;AACH;AAED,IAAA,IAAM,QAAQ,GAA8B;AACxC,QAAA,SAAS,EAAE,mBAAmB;KACjC;;AAGD,IAAA,OAAO,CAAC,IAAI;;AAER,IAAA,6CAAA,CAAA,MAAA,CAA8C,IAAI,EAA+C,mOAAA,CAAA;AAC7F,QAAA,2EAAA,CAAA,MAAA,CAAqB,QAAQ,CAAC,IAAI,CAAC,EAAA,IAAA,CAAI,CAC9C;AACL,CAAC;IAEY,IAAI,GAAGA,gBAAU,CAC1B,UACI,EAeC,EACD,GAAG,EAAA;;IAfC,IAAA,EAAA,GAAA,EAAA,CAAA,IAAuB,EAAvB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,gBAAgB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AA,EAAA;AACF,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;AAEF,IAAA,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;AAClB;AAED,IAAA,QACIC,sBAAC,CAAA,aAAA,CAAA,SAAS,EACNC,cAAA,CAAA,EAAA,SAAS,EAAEH,mBAAE,EAAA,EAAA,GAAA,EAAA;YAEL,EAAC,CAAAC,uBAAM,CAAC,SAAS,CAAA,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;YACxD,EAAC,CAAAA,uBAAM,CAAC,oBAAoB,CAAA,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,YAAA,EAAA,CAACA,uBAAM,CAAC,SAAS,CAAA,GAAG,gBAAgB;AACpC,YAAA,EAAA,CAACA,uBAAM,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AACzC,YAAA,EAAA,CAACA,uBAAM,CAAC,WAAW,CAAA,GAAG,YAAY;AAClC,YAAA,EAAA,CAACG,+BAAc,CAAC,IAAI,CAAG,GAAA,IAAI,KAAK,UAAU;AAE9C,YAAA,EAAA,GAAA,SAAS,EACT,KAAK,IAAIC,uBAAM,CAAC,KAAK,CAAC,EACtB,CAAC,IAAI,KAAK,UAAU,GAAGD,+BAAc,GAAGH,uBAAM,EAAE,IAAI,CAAC,EACrD,MAAM,IAAI,CAAC,IAAI,KAAK,UAAU,GAAGG,+BAAc,GAAGH,uBAAM,EAAE,MAAM,CAAC,CACpE,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEK,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,EAC1B,SAAS,CAAA,EAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/text/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';\nimport { type 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":["forwardRef","__rest","useSkeleton","cn","styles","React","__assign","alfasansStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoGA,IAAM,UAAU,GAAG,UAAC,IAAqC,EAAA;AACrD,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QACxC;AACH;AAED,IAAA,IAAM,QAAQ,GAA8B;AACxC,QAAA,SAAS,EAAE,mBAAmB;KACjC;;AAGD,IAAA,OAAO,CAAC,IAAI;;AAER,IAAA,6CAAA,CAAA,MAAA,CAA8C,IAA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A,EACa,UAAU,EACxB,GAAG,EAAEK,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAAA,EAC1B,SAAS,CAAA,EAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-family-alfasans:
|
|
3
|
-
'
|
|
2
|
+
--font-family-alfasans:
|
|
3
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
4
|
+
Helvetica, sans-serif;
|
|
4
5
|
} .alfasans-xlarge {
|
|
5
6
|
font-size: 48px;
|
|
6
7
|
line-height: 64px;
|
|
7
8
|
font-weight: 700;
|
|
8
9
|
letter-spacing: 0.1px;
|
|
9
|
-
font-family: var(--font-family-alfasans)
|
|
10
|
+
font-family: var(--font-family-alfasans);
|
|
10
11
|
} .alfasans-xlarge.systemCompat {
|
|
11
12
|
line-height: 52px;
|
|
12
13
|
} .alfasans-large {
|
|
@@ -14,14 +15,14 @@
|
|
|
14
15
|
line-height: 48px;
|
|
15
16
|
font-weight: 700;
|
|
16
17
|
letter-spacing: 0.1px;
|
|
17
|
-
font-family: var(--font-family-alfasans)
|
|
18
|
+
font-family: var(--font-family-alfasans);
|
|
18
19
|
} .alfasans-large.systemCompat {
|
|
19
20
|
} .alfasans-medium {
|
|
20
21
|
font-size: 32px;
|
|
21
22
|
line-height: 40px;
|
|
22
23
|
font-weight: 700;
|
|
23
24
|
letter-spacing: 0.3px;
|
|
24
|
-
font-family: var(--font-family-alfasans)
|
|
25
|
+
font-family: var(--font-family-alfasans);
|
|
25
26
|
} .alfasans-medium.systemCompat {
|
|
26
27
|
font-size: 30px;
|
|
27
28
|
line-height: 36px;
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
line-height: 32px;
|
|
32
33
|
font-weight: 700;
|
|
33
34
|
letter-spacing: 0.39px;
|
|
34
|
-
font-family: var(--font-family-alfasans)
|
|
35
|
+
font-family: var(--font-family-alfasans);
|
|
35
36
|
} .alfasans-small.systemCompat {
|
|
36
37
|
font-size: 22px;
|
|
37
38
|
line-height: 26px;
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
line-height: 24px;
|
|
42
43
|
font-weight: 700;
|
|
43
44
|
letter-spacing: 0.33px;
|
|
44
|
-
font-family: var(--font-family-alfasans)
|
|
45
|
+
font-family: var(--font-family-alfasans);
|
|
45
46
|
} .alfasans-xsmall.systemCompat {
|
|
46
47
|
font-size: 18px;
|
|
47
48
|
line-height: 22px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type TextSkeletonProps } from '@alfalab/core-components-skeleton/cssm';
|
|
3
|
-
import { Color } from '../colors';
|
|
3
|
+
import { type Color } from '../colors';
|
|
4
4
|
declare type NativeProps = HTMLAttributes<HTMLHeadingElement>;
|
|
5
5
|
export declare type TitleProps = Omit<NativeProps, 'color'> & {
|
|
6
6
|
/**
|
|
@@ -1 +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":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","cn","React","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IA2Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAA0B,GAAA,EAAA,CAAA,IAAA,EAApB,QAAQ,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAC1B,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAkF,EAAlF,MAAM,mBAAGC,sBAAgB,CAACC,aAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,QAAQ,EAAE,QAAQ,CAAC,GAAA,EAAA,EAClF,sBAAsB,EAAtB,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,KAAK,WAAA,EACL,SAAS,eAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,YAAY,GAAA,EAAA,CAAA,YAAA,EACT,SAAS,GAAAC,YAAA,CAAA,EAAA,EAfhB,sKAgBC,CADe;AAIV,IAAA,IAAA,EAA8B,GAAAC,kBAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAA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AC;;;;"}
|
|
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 { isObject } from '@alfalab/core-components-shared';\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type 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":["forwardRef","getDefaultWeight","isObject","__rest","useSkeleton","cn","React","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IA2Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,WAAsB,EAAjB,SAAS,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACtB,EAAA,GAAA,EAAA,CAAA,IAAe,EAAf,IAAI,mBAAG,QAAQ,GAAA,EAAA,EACf,EAA0B,GAAA,EAAA,CAAA,IAAA,EAApB,QAAQ,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAC1B,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAkF,EAAlF,MAAM,mBAAGC,sBAAgB,CAACC,aAAQ,CAAC,QAAQ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CAAE,CAAC,EACzB,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,EAC3C,MAAM,CAAC,MAAM,CAAC,EACd,KAAK,IAAIE,uBAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAAC,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AACzC,YAAA,EAAA,CAAC,MAAM,CAAC,WAAW,CAAA,GAAG,YAAY;AAClC,YAAA,EAAA,CAAC,MAAM,CAAC,YAAY,CAAA,GAAG,YAAY;AAE1C,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEC,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
package/cssm/title/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TitleProps } from './component';
|
|
2
|
+
import { type TitleProps } from './component';
|
|
3
3
|
declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
4
4
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
5
|
view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
|
package/cssm/title/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, TitleProps } from './component';\n\nimport alfasansStyles from './alfasans-index.module.css';\nimport commonStyles from './common.module.css';\nimport styles from './index.module.css';\n\nconst allStyles =\n process.env.CORE_COMPONENTS_ENV === 'test'\n ? commonStyles\n : { ...commonStyles, ...styles, ...alfasansStyles };\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={allStyles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":["commonStyles","styles","alfasansStyles","forwardRef","React","TitleBase"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAM,SAAS,oDAGAA,6BAAY,CAAA,EAAKC,uBAAM,CAAK,EAAAC,+BAAc,CAAE;AAE3D,IAAM,KAAK,GAAGC,gBAAU,CAAkD,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,QACtFC,sBAAC,CAAA,aAAA,CAAAC,mBAAS,qBAAK,KAAK,EAAA,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CAAA,EADc,EAEzF;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/title/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from './component';\n\nimport alfasansStyles from './alfasans-index.module.css';\nimport commonStyles from './common.module.css';\nimport styles from './index.module.css';\n\nconst allStyles =\n process.env.CORE_COMPONENTS_ENV === 'test'\n ? commonStyles\n : { ...commonStyles, ...styles, ...alfasansStyles };\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={allStyles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":["commonStyles","styles","alfasansStyles","forwardRef","React","TitleBase"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAM,SAAS,oDAGAA,6BAAY,CAAA,EAAKC,uBAAM,CAAK,EAAAC,+BAAc,CAAE;AAE3D,IAAM,KAAK,GAAGC,gBAAU,CAAkD,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,QACtFC,sBAAC,CAAA,aAAA,CAAAC,mBAAS,qBAAK,KAAK,EAAA,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CAAA,EADc,EAEzF;;;;"}
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
--gap-40: var(--gap-3xl);
|
|
10
10
|
--gap-48: var(--gap-4xl);
|
|
11
11
|
} :root {
|
|
12
|
-
--font-family-styrene:
|
|
13
|
-
'Helvetica Neue', Helvetica,
|
|
12
|
+
--font-family-styrene:
|
|
13
|
+
'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
14
|
+
sans-serif;
|
|
14
15
|
} .transparent {
|
|
15
16
|
opacity: 0;
|
|
16
17
|
} .styrene-xlarge {
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--font-family-alfasans:
|
|
3
|
-
'
|
|
2
|
+
--font-family-alfasans:
|
|
3
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
4
|
+
Helvetica, sans-serif;
|
|
4
5
|
} .alfasans-xlarge {
|
|
5
6
|
font-size: 34px;
|
|
6
7
|
line-height: 40px;
|
|
7
8
|
font-weight: 500;
|
|
8
9
|
letter-spacing: -0.32px;
|
|
9
|
-
font-family: var(--font-family-alfasans)
|
|
10
|
+
font-family: var(--font-family-alfasans);
|
|
10
11
|
} .alfasans-xlarge.systemCompat {
|
|
11
12
|
} .alfasans-large {
|
|
12
13
|
font-size: 30px;
|
|
13
14
|
line-height: 36px;
|
|
14
15
|
font-weight: 500;
|
|
15
16
|
letter-spacing: -0.25px;
|
|
16
|
-
font-family: var(--font-family-alfasans)
|
|
17
|
+
font-family: var(--font-family-alfasans);
|
|
17
18
|
} .alfasans-large.systemCompat {
|
|
18
19
|
} .alfasans-medium {
|
|
19
20
|
font-size: 26px;
|
|
20
21
|
line-height: 32px;
|
|
21
22
|
font-weight: 500;
|
|
22
23
|
letter-spacing: -0.25px;
|
|
23
|
-
font-family: var(--font-family-alfasans)
|
|
24
|
+
font-family: var(--font-family-alfasans);
|
|
24
25
|
} .alfasans-medium.systemCompat {
|
|
25
26
|
} .alfasans-small {
|
|
26
27
|
font-size: 20px;
|
|
27
28
|
line-height: 28px;
|
|
28
29
|
font-weight: 500;
|
|
29
30
|
letter-spacing: -0.15px;
|
|
30
|
-
font-family: var(--font-family-alfasans)
|
|
31
|
+
font-family: var(--font-family-alfasans);
|
|
31
32
|
} .alfasans-small.systemCompat {
|
|
32
33
|
} .alfasans-xsmall {
|
|
33
34
|
font-size: 16px;
|
|
34
35
|
line-height: 20px;
|
|
35
36
|
font-weight: 500;
|
|
36
37
|
letter-spacing: 0.17px;
|
|
37
|
-
font-family: var(--font-family-alfasans)
|
|
38
|
+
font-family: var(--font-family-alfasans);
|
|
38
39
|
} .alfasans-xsmall.systemCompat {
|
|
39
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, TitleProps } from '../title/component';\n\nimport commonStyles from '../title/common.module.css';\nimport alfasansStyles from './alfasans-index.module.css';\nimport styles from './index.module.css';\n\nconst allStyles =\n process.env.CORE_COMPONENTS_ENV === 'test'\n ? commonStyles\n : { ...commonStyles, ...styles, ...alfasansStyles };\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={allStyles} ref={ref} platform='mobile' />,\n);\n"],"names":["commonStyles","styles","alfasansStyles","forwardRef","React","TitleBase","__assign"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAM,SAAS,oDAGAA,6BAAY,CAAA,EAAKC,uBAAM,CAAK,EAAAC,+BAAc,CAAE;AAEpD,IAAM,WAAW,GAAGC,gBAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAA,CAAG,CAAvE,EAAuE;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/title-mobile/component.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { TitleBase, type TitleProps } from '../title/component';\n\nimport commonStyles from '../title/common.module.css';\nimport alfasansStyles from './alfasans-index.module.css';\nimport styles from './index.module.css';\n\nconst allStyles =\n process.env.CORE_COMPONENTS_ENV === 'test'\n ? commonStyles\n : { ...commonStyles, ...styles, ...alfasansStyles };\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={allStyles} ref={ref} platform='mobile' />,\n);\n"],"names":["commonStyles","styles","alfasansStyles","forwardRef","React","TitleBase","__assign"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAM,SAAS,oDAGAA,6BAAY,CAAA,EAAKC,uBAAM,CAAK,EAAAC,+BAAc,CAAE;AAEpD,IAAM,WAAW,GAAGC,gBAAU,CACjC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAA,CAAG,CAAvE,EAAuE;;;;"}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
--gap-24: var(--gap-xl);
|
|
8
8
|
--gap-40: var(--gap-3xl);
|
|
9
9
|
} :root {
|
|
10
|
-
--font-family-styrene:
|
|
11
|
-
'Helvetica Neue', Helvetica,
|
|
10
|
+
--font-family-styrene:
|
|
11
|
+
'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
12
|
+
sans-serif;
|
|
12
13
|
} .styrene-xlarge {
|
|
13
14
|
font-size: 34px;
|
|
14
15
|
line-height: 40px;
|
|
@@ -1 +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":["forwardRef","__rest","useIsDesktop","Title","TitleMobile","React","__assign"],"mappings":";;;;;;;;;;;;;;IAoBa,eAAe,GAAGA,gBAAU,CAGvC,UAAC,EAAoC,EAAE,GAAG,EAAA;IAAvC,IAAA,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAK,SAAS,GAAlCC,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,CAAoC,CAAF;IACjC,IAAM,SAAS,GAAGC,iBAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,IAAM,SAAS,GAAG,SAAS,GAAGC,WAAK,GAAGC,qBAAW;IAEjD,OAAOC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,SAAS,IAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI;AACjD,CAAC;;;;"}
|
|
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, type 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":["forwardRef","__rest","useIsDesktop","Title","TitleMobile","React","__assign"],"mappings":";;;;;;;;;;;;;;IAoBa,eAAe,GAAGA,gBAAU,CAGvC,UAAC,EAAoC,EAAE,GAAG,EAAA;IAAvC,IAAA,UAAU,gBAAA,EAAE,MAAM,YAAA,EAAK,SAAS,GAAlCC,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,CAAoC,CAAF;IACjC,IAAM,SAAS,GAAGC,iBAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,IAAM,SAAS,GAAG,SAAS,GAAGC,WAAK,GAAGC,qBAAW;IAEjD,OAAOC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAKC,cAAA,CAAA,EAAA,EAAA,SAAS,IAAE,GAAG,EAAE,GAAG,EAAA,CAAA,CAAI;AACjD,CAAC;;;;"}
|
package/esm/colors.css
CHANGED
|
@@ -19,44 +19,44 @@
|
|
|
19
19
|
--color-static-text-secondary-light: rgba(238, 238, 251, 0.55);
|
|
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
|
+
} .typography__tertiary_xzzbg {
|
|
23
23
|
color: var(--color-light-text-tertiary);
|
|
24
|
-
} .
|
|
24
|
+
} .typography__disabled_xzzbg {
|
|
25
25
|
color: var(--color-light-text-quaternary);
|
|
26
|
-
} .
|
|
26
|
+
} .typography__accent_xzzbg {
|
|
27
27
|
color: var(--color-light-accent-primary);
|
|
28
|
-
} .
|
|
28
|
+
} .typography__primary_xzzbg {
|
|
29
29
|
color: var(--color-light-text-primary);
|
|
30
|
-
} .
|
|
30
|
+
} .typography__attention_xzzbg {
|
|
31
31
|
color: var(--color-light-text-attention);
|
|
32
|
-
} .
|
|
32
|
+
} .typography__positive_xzzbg {
|
|
33
33
|
color: var(--color-light-text-positive);
|
|
34
|
-
} .
|
|
34
|
+
} .typography__secondary_xzzbg {
|
|
35
35
|
color: var(--color-light-text-secondary);
|
|
36
|
-
} .typography__tertiary-
|
|
36
|
+
} .typography__tertiary-inverted_xzzbg {
|
|
37
37
|
color: var(--color-light-text-tertiary-inverted);
|
|
38
|
-
} .typography__primary-
|
|
38
|
+
} .typography__primary-inverted_xzzbg {
|
|
39
39
|
color: var(--color-light-text-primary-inverted);
|
|
40
|
-
} .typography__secondary-
|
|
40
|
+
} .typography__secondary-inverted_xzzbg {
|
|
41
41
|
color: var(--color-light-text-secondary-inverted);
|
|
42
|
-
} .
|
|
42
|
+
} .typography__link_xzzbg {
|
|
43
43
|
color: var(--color-light-text-info);
|
|
44
|
-
} .
|
|
44
|
+
} .typography__negative_xzzbg {
|
|
45
45
|
color: var(--color-light-text-negative);
|
|
46
|
-
} .typography__static-primary-
|
|
46
|
+
} .typography__static-primary-light_xzzbg {
|
|
47
47
|
color: var(--color-static-text-primary-light);
|
|
48
|
-
} .typography__static-secondary-
|
|
48
|
+
} .typography__static-secondary-light_xzzbg {
|
|
49
49
|
color: var(--color-static-text-secondary-light);
|
|
50
|
-
} .typography__static-tertiary-
|
|
50
|
+
} .typography__static-tertiary-light_xzzbg {
|
|
51
51
|
color: var(--color-static-text-tertiary-light);
|
|
52
|
-
} .typography__static-primary-
|
|
52
|
+
} .typography__static-primary-dark_xzzbg {
|
|
53
53
|
color: var(--color-static-text-primary-dark);
|
|
54
|
-
} .typography__static-secondary-
|
|
54
|
+
} .typography__static-secondary-dark_xzzbg {
|
|
55
55
|
color: var(--color-static-text-secondary-dark);
|
|
56
|
-
} .typography__static-tertiary-
|
|
56
|
+
} .typography__static-tertiary-dark_xzzbg {
|
|
57
57
|
color: var(--color-static-text-tertiary-dark);
|
|
58
|
-
} .typography__static-
|
|
58
|
+
} .typography__static-accent_xzzbg {
|
|
59
59
|
color: var(--color-static-accent-primary);
|
|
60
|
-
} .typography__static-
|
|
60
|
+
} .typography__static-positive_xzzbg {
|
|
61
61
|
color: var(--color-static-text-positive);
|
|
62
62
|
}
|
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_xzzbg","disabled":"typography__disabled_xzzbg","accent":"typography__accent_xzzbg","primary":"typography__primary_xzzbg","attention":"typography__attention_xzzbg","positive":"typography__positive_xzzbg","secondary":"typography__secondary_xzzbg","tertiary-inverted":"typography__tertiary-inverted_xzzbg","primary-inverted":"typography__primary-inverted_xzzbg","secondary-inverted":"typography__secondary-inverted_xzzbg","link":"typography__link_xzzbg","negative":"typography__negative_xzzbg","static-primary-light":"typography__static-primary-light_xzzbg","static-secondary-light":"typography__static-secondary-light_xzzbg","static-tertiary-light":"typography__static-tertiary-light_xzzbg","static-primary-dark":"typography__static-primary-dark_xzzbg","static-secondary-dark":"typography__static-secondary-dark_xzzbg","static-tertiary-dark":"typography__static-tertiary-dark_xzzbg","static-accent":"typography__static-accent_xzzbg","static-positive":"typography__static-positive_xzzbg"};
|
|
4
4
|
|
|
5
5
|
export { colors as default };
|
|
6
6
|
//# sourceMappingURL=colors.module.css.js.map
|