@alfalab/core-components-typography 6.0.9-alfasans → 6.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/colors.css +20 -20
- package/colors.module.css.js +1 -1
- package/cssm/text/index.module.css +13 -40
- package/cssm/title/component.d.ts +8 -2
- package/cssm/title/component.js +6 -3
- package/cssm/title/component.js.map +1 -1
- package/cssm/title/index.d.ts +4 -1
- package/cssm/title/index.module.css +74 -23
- package/cssm/title/utils.d.ts +1 -0
- package/cssm/title/utils.js +16 -0
- package/cssm/title/utils.js.map +1 -0
- package/cssm/title-mobile/component.d.ts +4 -1
- package/cssm/title-mobile/index.module.css +45 -28
- package/cssm/title-responsive/component.d.ts +4 -1
- package/esm/colors.css +20 -20
- package/esm/colors.module.css.js +1 -1
- package/esm/text/index.css +53 -80
- package/esm/text/index.module.css.js +1 -1
- package/esm/title/common.css +5 -5
- package/esm/title/common.module.css.js +1 -1
- package/esm/title/component.d.ts +8 -2
- package/esm/title/component.js +5 -2
- package/esm/title/component.js.map +1 -1
- package/esm/title/index.css +89 -38
- package/esm/title/index.d.ts +4 -1
- package/esm/title/index.module.css.js +1 -1
- package/esm/title/index.module.css.js.map +1 -1
- package/esm/title/utils.d.ts +1 -0
- package/esm/title/utils.js +12 -0
- package/esm/title/utils.js.map +1 -0
- package/esm/title-mobile/component.d.ts +4 -1
- package/esm/title-mobile/index.css +70 -53
- package/esm/title-mobile/index.module.css.js +1 -1
- package/esm/title-responsive/component.d.ts +4 -1
- package/modern/colors.css +20 -20
- package/modern/colors.module.css.js +1 -1
- package/modern/text/index.css +53 -80
- package/modern/text/index.module.css.js +1 -1
- package/modern/title/common.css +5 -5
- package/modern/title/common.module.css.js +1 -1
- package/modern/title/component.d.ts +8 -2
- package/modern/title/component.js +4 -1
- package/modern/title/component.js.map +1 -1
- package/modern/title/index.css +89 -38
- package/modern/title/index.d.ts +4 -1
- package/modern/title/index.module.css.js +1 -1
- package/modern/title/index.module.css.js.map +1 -1
- package/modern/title/utils.d.ts +1 -0
- package/modern/title/utils.js +12 -0
- package/modern/title/utils.js.map +1 -0
- package/modern/title-mobile/component.d.ts +4 -1
- package/modern/title-mobile/index.css +70 -53
- package/modern/title-mobile/index.module.css.js +1 -1
- package/modern/title-responsive/component.d.ts +4 -1
- package/moderncssm/text/index.module.css +11 -37
- package/moderncssm/title/component.d.ts +8 -2
- package/moderncssm/title/component.js +4 -1
- package/moderncssm/title/component.js.map +1 -1
- package/moderncssm/title/index.d.ts +4 -1
- package/moderncssm/title/index.module.css +79 -20
- package/moderncssm/title/utils.d.ts +1 -0
- package/moderncssm/title/utils.js +12 -0
- package/moderncssm/title/utils.js.map +1 -0
- package/moderncssm/title-mobile/component.d.ts +4 -1
- package/moderncssm/title-mobile/index.module.css +40 -25
- package/moderncssm/title-responsive/component.d.ts +4 -1
- package/package.json +6 -6
- package/src/title/component.tsx +8 -3
- package/src/title/index.module.css +8 -0
- package/src/title/utils.ts +14 -0
- package/text/index.css +53 -80
- package/text/index.module.css.js +1 -1
- package/title/common.css +5 -5
- package/title/common.module.css.js +1 -1
- package/title/component.d.ts +8 -2
- package/title/component.js +5 -2
- package/title/component.js.map +1 -1
- package/title/index.css +89 -38
- package/title/index.d.ts +4 -1
- package/title/index.module.css.js +1 -1
- package/title/index.module.css.js.map +1 -1
- package/title/utils.d.ts +1 -0
- package/title/utils.js +16 -0
- package/title/utils.js.map +1 -0
- package/title-mobile/component.d.ts +4 -1
- package/title-mobile/index.css +70 -53
- package/title-mobile/index.module.css.js +1 -1
- package/title-responsive/component.d.ts +4 -1
package/title/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../src/title/component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport cn from 'classnames';\n\nimport { type TextSkeletonProps, useSkeleton } from '@alfalab/core-components-skeleton';\n\nimport { type Color } from '../colors';\n\nimport colors from '../colors.module.css';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system';\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font,\n platform,\n weight =
|
|
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';\nimport commonStyles from './common.module.css';\n\ntype NativeProps = HTMLAttributes<HTMLHeadingElement>;\n\nexport type TitleProps = Omit<NativeProps, 'color'> & {\n /**\n * HTML тег\n */\n tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';\n\n /**\n * [Вариант начертания](?path=/docs/guidelines-typography--page)\n */\n view?: 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';\n\n /**\n * Цвет текста\n */\n color?: Color;\n\n /**\n * Толщина шрифта\n */\n weight?: 'regular' | 'medium' | 'bold' | 'semibold';\n\n /**\n * Шрифт текста\n */\n font?: 'styrene' | 'system' | '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 = 'styrene',\n platform,\n weight = getDefaultWeight(isObject(font) ? font.font : font, 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 return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n [styles.font]:\n (isObject(font) && !font.systemCompat) || !(font === 'system'),\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","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;;;IA4Fa,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,EAAgB,GAAA,EAAA,CAAA,IAAA,EAAhB,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,cAAsE,EAAtE,MAAM,mBAAGC,sBAAgB,CAACC,6BAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,GAAA,EAAA,EACtE,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,kCAAW,CAAC,YAAY,EAAE,aAAa,CAAC,EAApE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,OAAO,aAA6C;IAE5E,IAAM,QAAQ,GAAG,cAAc,CAAC;QAC5B,gBAAgB,EAAEC,mBAAE,CAAC,cAAc,IAAI,MAAM,CAAC,UAAW,CAAA,MAAA,CAAA,IAAI,CAAE,CAAC,CAAC;AACjE,QAAA,UAAU,EAAA,UAAA;AACb,KAAA,CAAC;IAEF,IAAI,QAAQ,EAAE;AACV,QAAA,OAAO,QAAQ;;IAGnB,QACIC,qCAAC,SAAS,EAAAC,cAAA,CAAA,EACN,SAAS,EAAEF,mBAAE,CACTG,aAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,SAAS,EACT,MAAM,CAAC,EAAA,CAAA,MAAA,CAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,SAAG,IAAI,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,UAAA,CAAA,MAAA,CAAW,IAAI,CAAE,CAAC,EAC3C,KAAK,IAAIC,aAAM,CAAC,KAAK,CAAC,GAAA,EAAA,GAAA,EAAA;AAElB,YAAA,EAAA,CAACD,aAAY,CAAC,UAAA,CAAA,MAAA,CAAW,QAAQ,CAAE,CAAC,IAAG,QAAQ;AAC/C,YAAA,EAAA,CAACA,aAAY,CAAC,WAAW,CAAA,GAAG,YAAY;YACxC,EAAC,CAAA,MAAM,CAAC,IAAI,CAAA,GACR,CAACN,6BAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AAEzE,YAAA,EAAA,EAAA,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAEQ,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
|
package/title/index.css
CHANGED
|
@@ -10,92 +10,143 @@
|
|
|
10
10
|
--gap-48: var(--gap-4xl);
|
|
11
11
|
}
|
|
12
12
|
:root {
|
|
13
|
-
--font-family-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
--font-family-system:
|
|
14
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
15
|
+
--font-family-styrene:
|
|
16
|
+
'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
17
|
+
sans-serif;
|
|
16
18
|
}
|
|
17
|
-
.
|
|
19
|
+
.typography__xlarge_15yxw {
|
|
18
20
|
font-size: 48px;
|
|
19
21
|
line-height: 52px;
|
|
20
22
|
font-weight: 700;
|
|
21
|
-
|
|
22
|
-
font-family: var(--font-family-alfasans);
|
|
23
|
+
font-family: var(--font-family-system);
|
|
23
24
|
}
|
|
24
|
-
.
|
|
25
|
+
.typography__xlarge_15yxw.typography__font_15yxw {
|
|
26
|
+
line-height: 64px;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
font-feature-settings: 'ss01';
|
|
29
|
+
font-family: var(--font-family-styrene);
|
|
30
|
+
}
|
|
31
|
+
.typography__regular-xlarge_15yxw {
|
|
25
32
|
font-size: 48px;
|
|
26
33
|
line-height: 52px;
|
|
27
34
|
font-weight: 400;
|
|
28
|
-
|
|
29
|
-
font-family: var(--font-family-alfasans);
|
|
35
|
+
font-family: var(--font-family-system);
|
|
30
36
|
}
|
|
31
|
-
.
|
|
37
|
+
.typography__regular-xlarge_15yxw.typography__font_15yxw {
|
|
38
|
+
line-height: 64px;
|
|
39
|
+
font-feature-settings: 'ss01';
|
|
40
|
+
font-family: var(--font-family-styrene);
|
|
41
|
+
}
|
|
42
|
+
.typography__large_15yxw {
|
|
32
43
|
font-size: 40px;
|
|
33
44
|
line-height: 48px;
|
|
34
45
|
font-weight: 700;
|
|
35
|
-
|
|
36
|
-
font-family: var(--font-family-alfasans);
|
|
46
|
+
font-family: var(--font-family-system);
|
|
37
47
|
}
|
|
38
|
-
.
|
|
48
|
+
.typography__large_15yxw.typography__font_15yxw {
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
font-feature-settings: 'ss01';
|
|
51
|
+
font-family: var(--font-family-styrene);
|
|
52
|
+
}
|
|
53
|
+
.typography__regular-large_15yxw {
|
|
39
54
|
font-size: 40px;
|
|
40
55
|
line-height: 48px;
|
|
41
56
|
font-weight: 400;
|
|
42
|
-
|
|
43
|
-
font-family: var(--font-family-alfasans);
|
|
57
|
+
font-family: var(--font-family-system);
|
|
44
58
|
}
|
|
45
|
-
.
|
|
59
|
+
.typography__regular-large_15yxw.typography__font_15yxw {
|
|
60
|
+
font-feature-settings: 'ss01';
|
|
61
|
+
font-family: var(--font-family-styrene);
|
|
62
|
+
}
|
|
63
|
+
.typography__medium_15yxw {
|
|
46
64
|
font-size: 30px;
|
|
47
65
|
line-height: 36px;
|
|
48
66
|
font-weight: 700;
|
|
49
|
-
|
|
50
|
-
font-family: var(--font-family-alfasans);
|
|
67
|
+
font-family: var(--font-family-system);
|
|
51
68
|
}
|
|
52
|
-
.
|
|
69
|
+
.typography__medium_15yxw.typography__font_15yxw {
|
|
70
|
+
font-size: 32px;
|
|
71
|
+
line-height: 40px;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
font-feature-settings: 'ss01';
|
|
74
|
+
font-family: var(--font-family-styrene);
|
|
75
|
+
}
|
|
76
|
+
.typography__regular-medium_15yxw {
|
|
53
77
|
font-size: 30px;
|
|
54
78
|
line-height: 36px;
|
|
55
79
|
font-weight: 400;
|
|
56
|
-
|
|
57
|
-
font-family: var(--font-family-alfasans);
|
|
80
|
+
font-family: var(--font-family-system);
|
|
58
81
|
}
|
|
59
|
-
.
|
|
82
|
+
.typography__regular-medium_15yxw.typography__font_15yxw {
|
|
83
|
+
font-size: 32px;
|
|
84
|
+
line-height: 40px;
|
|
85
|
+
font-feature-settings: 'ss01';
|
|
86
|
+
font-family: var(--font-family-styrene);
|
|
87
|
+
}
|
|
88
|
+
.typography__small_15yxw {
|
|
60
89
|
font-size: 22px;
|
|
61
90
|
line-height: 26px;
|
|
62
91
|
font-weight: 700;
|
|
63
|
-
|
|
64
|
-
font-family: var(--font-family-alfasans);
|
|
92
|
+
font-family: var(--font-family-system);
|
|
65
93
|
}
|
|
66
|
-
.
|
|
94
|
+
.typography__small_15yxw.typography__font_15yxw {
|
|
95
|
+
font-size: 24px;
|
|
96
|
+
line-height: 32px;
|
|
97
|
+
font-weight: 500;
|
|
98
|
+
font-feature-settings: 'ss01';
|
|
99
|
+
font-family: var(--font-family-styrene);
|
|
100
|
+
}
|
|
101
|
+
.typography__regular-small_15yxw {
|
|
67
102
|
font-size: 22px;
|
|
68
103
|
line-height: 26px;
|
|
69
104
|
font-weight: 400;
|
|
70
|
-
|
|
71
|
-
font-family: var(--font-family-alfasans);
|
|
105
|
+
font-family: var(--font-family-system);
|
|
72
106
|
}
|
|
73
|
-
.
|
|
107
|
+
.typography__regular-small_15yxw.typography__font_15yxw {
|
|
108
|
+
font-size: 24px;
|
|
109
|
+
line-height: 32px;
|
|
110
|
+
font-feature-settings: 'ss01';
|
|
111
|
+
font-family: var(--font-family-styrene);
|
|
112
|
+
}
|
|
113
|
+
.typography__xsmall_15yxw {
|
|
74
114
|
font-size: 18px;
|
|
75
115
|
line-height: 22px;
|
|
76
116
|
font-weight: 700;
|
|
77
|
-
|
|
78
|
-
font-family: var(--font-family-alfasans);
|
|
117
|
+
font-family: var(--font-family-system);
|
|
79
118
|
}
|
|
80
|
-
.
|
|
119
|
+
.typography__xsmall_15yxw.typography__font_15yxw {
|
|
120
|
+
font-size: 20px;
|
|
121
|
+
line-height: 24px;
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
font-feature-settings: 'ss01';
|
|
124
|
+
font-family: var(--font-family-styrene);
|
|
125
|
+
}
|
|
126
|
+
.typography__regular-xsmall_15yxw {
|
|
81
127
|
font-size: 18px;
|
|
82
128
|
line-height: 22px;
|
|
83
129
|
font-weight: 400;
|
|
84
|
-
|
|
85
|
-
font-family: var(--font-family-alfasans);
|
|
130
|
+
font-family: var(--font-family-system);
|
|
86
131
|
}
|
|
87
|
-
.
|
|
132
|
+
.typography__regular-xsmall_15yxw.typography__font_15yxw {
|
|
133
|
+
font-size: 20px;
|
|
134
|
+
line-height: 24px;
|
|
135
|
+
font-feature-settings: 'ss01';
|
|
136
|
+
font-family: var(--font-family-styrene);
|
|
137
|
+
}
|
|
138
|
+
.typography__component_15yxw.typography__margins-xlarge_15yxw {
|
|
88
139
|
margin: var(--gap-0) var(--gap-0) var(--gap-24);
|
|
89
140
|
}
|
|
90
|
-
.
|
|
141
|
+
.typography__component_15yxw.typography__margins-large_15yxw {
|
|
91
142
|
margin: var(--gap-48) var(--gap-0) var(--gap-24);
|
|
92
143
|
}
|
|
93
|
-
.
|
|
144
|
+
.typography__component_15yxw.typography__margins-medium_15yxw {
|
|
94
145
|
margin: var(--gap-48) var(--gap-0) var(--gap-24);
|
|
95
146
|
}
|
|
96
|
-
.
|
|
147
|
+
.typography__component_15yxw.typography__margins-small_15yxw {
|
|
97
148
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
98
149
|
}
|
|
99
|
-
.
|
|
150
|
+
.typography__component_15yxw.typography__margins-xsmall_15yxw {
|
|
100
151
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
101
152
|
}
|
package/title/index.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<H
|
|
|
5
5
|
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
6
6
|
color?: import("..").Color;
|
|
7
7
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
8
|
-
font?: "styrene" | "system"
|
|
8
|
+
font?: "styrene" | "system" | "alfasans" | {
|
|
9
|
+
font: "alfasans";
|
|
10
|
+
systemCompat: boolean;
|
|
11
|
+
};
|
|
9
12
|
defaultMargins?: boolean;
|
|
10
13
|
className?: string;
|
|
11
14
|
dataTestId?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"xlarge":"
|
|
5
|
+
var styles = {"xlarge":"typography__xlarge_15yxw","font":"typography__font_15yxw","regular-xlarge":"typography__regular-xlarge_15yxw","large":"typography__large_15yxw","regular-large":"typography__regular-large_15yxw","medium":"typography__medium_15yxw","regular-medium":"typography__regular-medium_15yxw","small":"typography__small_15yxw","regular-small":"typography__regular-small_15yxw","xsmall":"typography__xsmall_15yxw","regular-xsmall":"typography__regular-xsmall_15yxw","component":"typography__component_15yxw","margins-xlarge":"typography__margins-xlarge_15yxw","margins-large":"typography__margins-large_15yxw","margins-medium":"typography__margins-medium_15yxw","margins-small":"typography__margins-small_15yxw","margins-xsmall":"typography__margins-xsmall_15yxw"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../src/title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n@each $view in xlarge, large, medium, small, xsmall {\n .$(view) {\n @mixin headline-system_$(view);\n }\n\n .regular-$(view) {\n @mixin promo-system_$(view);\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-medium;\n }\n\n &.margins-medium {\n @mixin margin-medium;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n &.margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../src/title/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n@each $view in xlarge, large, medium, small, xsmall {\n .$(view) {\n @mixin headline-system_$(view);\n\n &.font {\n @subtract-mixin headline_$(view), headline-system_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system_$(view);\n\n &.font {\n @subtract-mixin promo_$(view), promo-system_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-medium;\n }\n\n &.margins-medium {\n @mixin margin-medium;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n &.margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,OAAO,CAAC,yBAAyB,CAAC,eAAe,CAAC,iCAAiC,CAAC,QAAQ,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,WAAW,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC;;;;"}
|
package/title/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDefaultWeight(font: 'styrene' | 'system' | 'alfasans', platform: 'mobile' | 'desktop'): "medium" | "bold" | "semibold";
|
package/title/utils.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function getDefaultWeight(font, platform) {
|
|
6
|
+
if (font === 'styrene' || font === 'alfasans') {
|
|
7
|
+
return 'medium';
|
|
8
|
+
}
|
|
9
|
+
if (platform === 'desktop') {
|
|
10
|
+
return 'bold';
|
|
11
|
+
}
|
|
12
|
+
return 'semibold';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.getDefaultWeight = getDefaultWeight;
|
|
16
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/title/utils.ts"],"sourcesContent":["export function getDefaultWeight(\n font: 'styrene' | 'system' | 'alfasans',\n platform: 'mobile' | 'desktop',\n) {\n if (font === 'styrene' || font === 'alfasans') {\n return 'medium';\n }\n\n if (platform === 'desktop') {\n return 'bold';\n }\n\n return 'semibold';\n}\n"],"names":[],"mappings":";;;;AAAgB,SAAA,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;IAE9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;;AAGnB,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;;AAGjB,IAAA,OAAO,UAAU;AACrB;;;;"}
|
|
@@ -4,7 +4,10 @@ export declare const TitleMobile: React.ForwardRefExoticComponent<Omit<React.HTM
|
|
|
4
4
|
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
5
5
|
color?: import("..").Color;
|
|
6
6
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
7
|
-
font?: "styrene" | "system"
|
|
7
|
+
font?: "styrene" | "system" | "alfasans" | {
|
|
8
|
+
font: "alfasans";
|
|
9
|
+
systemCompat: boolean;
|
|
10
|
+
};
|
|
8
11
|
defaultMargins?: boolean;
|
|
9
12
|
className?: string;
|
|
10
13
|
dataTestId?: string;
|
package/title-mobile/index.css
CHANGED
|
@@ -8,112 +8,129 @@
|
|
|
8
8
|
--gap-40: var(--gap-3xl);
|
|
9
9
|
}
|
|
10
10
|
:root {
|
|
11
|
-
--font-family-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
--font-family-system:
|
|
12
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
13
|
+
--font-family-styrene:
|
|
14
|
+
'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
15
|
+
sans-serif;
|
|
14
16
|
}
|
|
15
|
-
.
|
|
17
|
+
.typography__xlarge_1c4by {
|
|
16
18
|
font-size: 34px;
|
|
17
19
|
line-height: 40px;
|
|
18
|
-
font-weight:
|
|
19
|
-
|
|
20
|
-
font-family: var(--font-family-alfasans);
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
font-family: var(--font-family-system);
|
|
21
22
|
}
|
|
22
|
-
.
|
|
23
|
+
.typography__xlarge_1c4by.typography__font_1c4by {
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
font-feature-settings: 'ss01';
|
|
26
|
+
font-family: var(--font-family-styrene);
|
|
23
27
|
}
|
|
24
|
-
.typography__regular-
|
|
28
|
+
.typography__regular-xlarge_1c4by {
|
|
25
29
|
font-size: 34px;
|
|
26
30
|
line-height: 40px;
|
|
27
31
|
font-weight: 400;
|
|
28
|
-
|
|
29
|
-
font-family: var(--font-family-alfasans);
|
|
32
|
+
font-family: var(--font-family-system);
|
|
30
33
|
}
|
|
31
|
-
.typography__regular-
|
|
34
|
+
.typography__regular-xlarge_1c4by.typography__system_1c4by {
|
|
35
|
+
font-feature-settings: 'ss01';
|
|
36
|
+
font-family: var(--font-family-styrene);
|
|
32
37
|
}
|
|
33
|
-
.
|
|
38
|
+
.typography__large_1c4by {
|
|
34
39
|
font-size: 30px;
|
|
35
40
|
line-height: 36px;
|
|
36
|
-
font-weight:
|
|
37
|
-
|
|
38
|
-
font-family: var(--font-family-alfasans);
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
font-family: var(--font-family-system);
|
|
39
43
|
}
|
|
40
|
-
.
|
|
44
|
+
.typography__large_1c4by.typography__font_1c4by {
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
font-feature-settings: 'ss01';
|
|
47
|
+
font-family: var(--font-family-styrene);
|
|
41
48
|
}
|
|
42
|
-
.typography__regular-
|
|
49
|
+
.typography__regular-large_1c4by {
|
|
43
50
|
font-size: 30px;
|
|
44
51
|
line-height: 36px;
|
|
45
52
|
font-weight: 400;
|
|
46
|
-
|
|
47
|
-
font-family: var(--font-family-alfasans);
|
|
53
|
+
font-family: var(--font-family-system);
|
|
48
54
|
}
|
|
49
|
-
.typography__regular-
|
|
55
|
+
.typography__regular-large_1c4by.typography__system_1c4by {
|
|
56
|
+
font-feature-settings: 'ss01';
|
|
57
|
+
font-family: var(--font-family-styrene);
|
|
50
58
|
}
|
|
51
|
-
.
|
|
59
|
+
.typography__medium_1c4by {
|
|
52
60
|
font-size: 26px;
|
|
53
61
|
line-height: 32px;
|
|
54
|
-
font-weight:
|
|
55
|
-
|
|
56
|
-
font-family: var(--font-family-alfasans);
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
font-family: var(--font-family-system);
|
|
57
64
|
}
|
|
58
|
-
.
|
|
65
|
+
.typography__medium_1c4by.typography__font_1c4by {
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
font-feature-settings: 'ss01';
|
|
68
|
+
font-family: var(--font-family-styrene);
|
|
59
69
|
}
|
|
60
|
-
.typography__regular-
|
|
70
|
+
.typography__regular-medium_1c4by {
|
|
61
71
|
font-size: 26px;
|
|
62
72
|
line-height: 32px;
|
|
63
73
|
font-weight: 400;
|
|
64
|
-
|
|
65
|
-
font-family: var(--font-family-alfasans);
|
|
74
|
+
font-family: var(--font-family-system);
|
|
66
75
|
}
|
|
67
|
-
.typography__regular-
|
|
76
|
+
.typography__regular-medium_1c4by.typography__system_1c4by {
|
|
77
|
+
font-feature-settings: 'ss01';
|
|
78
|
+
font-family: var(--font-family-styrene);
|
|
68
79
|
}
|
|
69
|
-
.
|
|
80
|
+
.typography__small_1c4by {
|
|
70
81
|
font-size: 20px;
|
|
71
82
|
line-height: 28px;
|
|
72
|
-
font-weight:
|
|
73
|
-
|
|
74
|
-
font-family: var(--font-family-alfasans);
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
font-family: var(--font-family-system);
|
|
75
85
|
}
|
|
76
|
-
.
|
|
86
|
+
.typography__small_1c4by.typography__font_1c4by {
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
font-feature-settings: 'ss01';
|
|
89
|
+
font-family: var(--font-family-styrene);
|
|
77
90
|
}
|
|
78
|
-
.typography__regular-
|
|
91
|
+
.typography__regular-small_1c4by {
|
|
79
92
|
font-size: 20px;
|
|
80
93
|
line-height: 28px;
|
|
81
94
|
font-weight: 400;
|
|
82
|
-
|
|
83
|
-
font-family: var(--font-family-alfasans);
|
|
95
|
+
font-family: var(--font-family-system);
|
|
84
96
|
}
|
|
85
|
-
.typography__regular-
|
|
97
|
+
.typography__regular-small_1c4by.typography__system_1c4by {
|
|
98
|
+
font-feature-settings: 'ss01';
|
|
99
|
+
font-family: var(--font-family-styrene);
|
|
86
100
|
}
|
|
87
|
-
.
|
|
101
|
+
.typography__xsmall_1c4by {
|
|
88
102
|
font-size: 16px;
|
|
89
103
|
line-height: 20px;
|
|
90
|
-
font-weight:
|
|
91
|
-
|
|
92
|
-
font-family: var(--font-family-alfasans);
|
|
104
|
+
font-weight: 600;
|
|
105
|
+
font-family: var(--font-family-system);
|
|
93
106
|
}
|
|
94
|
-
.
|
|
107
|
+
.typography__xsmall_1c4by.typography__font_1c4by {
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
font-feature-settings: 'ss01';
|
|
110
|
+
font-family: var(--font-family-styrene);
|
|
95
111
|
}
|
|
96
|
-
.typography__regular-
|
|
112
|
+
.typography__regular-xsmall_1c4by {
|
|
97
113
|
font-size: 16px;
|
|
98
114
|
line-height: 20px;
|
|
99
115
|
font-weight: 400;
|
|
100
|
-
|
|
101
|
-
font-family: var(--font-family-alfasans);
|
|
116
|
+
font-family: var(--font-family-system);
|
|
102
117
|
}
|
|
103
|
-
.typography__regular-
|
|
118
|
+
.typography__regular-xsmall_1c4by.typography__system_1c4by {
|
|
119
|
+
font-feature-settings: 'ss01';
|
|
120
|
+
font-family: var(--font-family-styrene);
|
|
104
121
|
}
|
|
105
|
-
.
|
|
122
|
+
.typography__component_1c4by.typography__margins-xlarge_1c4by {
|
|
106
123
|
margin: var(--gap-0) var(--gap-0) var(--gap-24);
|
|
107
124
|
}
|
|
108
|
-
.
|
|
125
|
+
.typography__component_1c4by.typography__margins-large_1c4by {
|
|
109
126
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
110
127
|
}
|
|
111
|
-
.
|
|
128
|
+
.typography__component_1c4by.typography__margins-medium_1c4by {
|
|
112
129
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
113
130
|
}
|
|
114
|
-
.
|
|
131
|
+
.typography__component_1c4by.typography__margins-small_1c4by {
|
|
115
132
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
116
133
|
}
|
|
117
|
-
.
|
|
134
|
+
.typography__component_1c4by .typography__margins-xsmall_1c4by {
|
|
118
135
|
margin: var(--gap-40) var(--gap-0) var(--gap-16);
|
|
119
136
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"xlarge":"
|
|
5
|
+
var styles = {"xlarge":"typography__xlarge_1c4by","font":"typography__font_1c4by","regular-xlarge":"typography__regular-xlarge_1c4by","system":"typography__system_1c4by","large":"typography__large_1c4by","regular-large":"typography__regular-large_1c4by","medium":"typography__medium_1c4by","regular-medium":"typography__regular-medium_1c4by","small":"typography__small_1c4by","regular-small":"typography__regular-small_1c4by","xsmall":"typography__xsmall_1c4by","regular-xsmall":"typography__regular-xsmall_1c4by","component":"typography__component_1c4by","margins-xlarge":"typography__margins-xlarge_1c4by","margins-large":"typography__margins-large_1c4by","margins-medium":"typography__margins-medium_1c4by","margins-small":"typography__margins-small_1c4by","margins-xsmall":"typography__margins-xsmall_1c4by"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -16,7 +16,10 @@ export declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React
|
|
|
16
16
|
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
17
17
|
color?: import("..").Color;
|
|
18
18
|
weight?: "regular" | "medium" | "bold" | "semibold";
|
|
19
|
-
font?: "styrene" | "system"
|
|
19
|
+
font?: "styrene" | "system" | "alfasans" | {
|
|
20
|
+
font: "alfasans";
|
|
21
|
+
systemCompat: boolean;
|
|
22
|
+
};
|
|
20
23
|
defaultMargins?: boolean;
|
|
21
24
|
className?: string;
|
|
22
25
|
dataTestId?: string;
|