@alfalab/core-components-typography 6.0.6-alfasans → 6.0.7

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.
Files changed (88) hide show
  1. package/colors.css +20 -20
  2. package/colors.module.css.js +1 -1
  3. package/cssm/text/index.module.css +13 -40
  4. package/cssm/title/component.d.ts +8 -2
  5. package/cssm/title/component.js +6 -3
  6. package/cssm/title/component.js.map +1 -1
  7. package/cssm/title/index.d.ts +4 -1
  8. package/cssm/title/index.module.css +74 -23
  9. package/cssm/title/utils.d.ts +1 -0
  10. package/cssm/title/utils.js +16 -0
  11. package/cssm/title/utils.js.map +1 -0
  12. package/cssm/title-mobile/component.d.ts +4 -1
  13. package/cssm/title-mobile/index.module.css +45 -28
  14. package/cssm/title-responsive/component.d.ts +4 -1
  15. package/esm/colors.css +20 -20
  16. package/esm/colors.module.css.js +1 -1
  17. package/esm/text/index.css +53 -80
  18. package/esm/text/index.module.css.js +1 -1
  19. package/esm/title/common.css +5 -5
  20. package/esm/title/common.module.css.js +1 -1
  21. package/esm/title/component.d.ts +8 -2
  22. package/esm/title/component.js +5 -2
  23. package/esm/title/component.js.map +1 -1
  24. package/esm/title/index.css +89 -38
  25. package/esm/title/index.d.ts +4 -1
  26. package/esm/title/index.module.css.js +1 -1
  27. package/esm/title/index.module.css.js.map +1 -1
  28. package/esm/title/utils.d.ts +1 -0
  29. package/esm/title/utils.js +12 -0
  30. package/esm/title/utils.js.map +1 -0
  31. package/esm/title-mobile/component.d.ts +4 -1
  32. package/esm/title-mobile/index.css +70 -53
  33. package/esm/title-mobile/index.module.css.js +1 -1
  34. package/esm/title-responsive/component.d.ts +4 -1
  35. package/modern/colors.css +20 -20
  36. package/modern/colors.module.css.js +1 -1
  37. package/modern/text/index.css +53 -80
  38. package/modern/text/index.module.css.js +1 -1
  39. package/modern/title/common.css +5 -5
  40. package/modern/title/common.module.css.js +1 -1
  41. package/modern/title/component.d.ts +8 -2
  42. package/modern/title/component.js +4 -1
  43. package/modern/title/component.js.map +1 -1
  44. package/modern/title/index.css +89 -38
  45. package/modern/title/index.d.ts +4 -1
  46. package/modern/title/index.module.css.js +1 -1
  47. package/modern/title/index.module.css.js.map +1 -1
  48. package/modern/title/utils.d.ts +1 -0
  49. package/modern/title/utils.js +12 -0
  50. package/modern/title/utils.js.map +1 -0
  51. package/modern/title-mobile/component.d.ts +4 -1
  52. package/modern/title-mobile/index.css +70 -53
  53. package/modern/title-mobile/index.module.css.js +1 -1
  54. package/modern/title-responsive/component.d.ts +4 -1
  55. package/moderncssm/text/index.module.css +11 -37
  56. package/moderncssm/title/component.d.ts +8 -2
  57. package/moderncssm/title/component.js +4 -1
  58. package/moderncssm/title/component.js.map +1 -1
  59. package/moderncssm/title/index.d.ts +4 -1
  60. package/moderncssm/title/index.module.css +79 -20
  61. package/moderncssm/title/utils.d.ts +1 -0
  62. package/moderncssm/title/utils.js +12 -0
  63. package/moderncssm/title/utils.js.map +1 -0
  64. package/moderncssm/title-mobile/component.d.ts +4 -1
  65. package/moderncssm/title-mobile/index.module.css +40 -25
  66. package/moderncssm/title-responsive/component.d.ts +4 -1
  67. package/package.json +6 -6
  68. package/src/title/component.tsx +8 -3
  69. package/src/title/index.module.css +8 -0
  70. package/src/title/utils.ts +14 -0
  71. package/text/index.css +53 -80
  72. package/text/index.module.css.js +1 -1
  73. package/title/common.css +5 -5
  74. package/title/common.module.css.js +1 -1
  75. package/title/component.d.ts +8 -2
  76. package/title/component.js +5 -2
  77. package/title/component.js.map +1 -1
  78. package/title/index.css +89 -38
  79. package/title/index.d.ts +4 -1
  80. package/title/index.module.css.js +1 -1
  81. package/title/index.module.css.js.map +1 -1
  82. package/title/utils.d.ts +1 -0
  83. package/title/utils.js +16 -0
  84. package/title/utils.js.map +1 -0
  85. package/title-mobile/component.d.ts +4 -1
  86. package/title-mobile/index.css +70 -53
  87. package/title-mobile/index.module.css.js +1 -1
  88. package/title-responsive/component.d.ts +4 -1
@@ -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 * @deprecated\n */\n font?: 'styrene' | 'system';\n\n /**\n * Добавляет отступы\n */\n defaultMargins?: boolean;\n\n /**\n * Css-класс для стилизации (native prop)\n */\n className?: string;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Контент (native prop)\n */\n children?: React.ReactNode;\n\n /**\n * Количество строк\n */\n rowLimit?: 1 | 2 | 3;\n\n /**\n * Показать скелетон\n */\n showSkeleton?: boolean;\n\n /**\n * Пропы для скелетона\n */\n skeletonProps?: TextSkeletonProps;\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\ntype PrivateProps = {\n styles: {\n [key: string]: string;\n };\n platform: 'mobile' | 'desktop';\n};\n\ntype TitleElementType = HTMLHeadingElement | HTMLDivElement;\n\nexport const TitleBase = forwardRef<TitleElementType, TitleProps & PrivateProps>(\n (\n {\n tag: Component = 'div',\n view = 'medium',\n font,\n platform,\n weight = 'bold',\n defaultMargins = false,\n color,\n className,\n dataTestId,\n children,\n rowLimit,\n styles,\n skeletonProps,\n showSkeleton,\n ...restProps\n },\n ref,\n ) => {\n const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n\n const skeleton = renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n });\n\n if (skeleton) {\n return skeleton;\n }\n\n return (\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n className,\n styles[`${weight === 'regular' ? 'regular-' : ''}${view}`],\n defaultMargins && styles[`margins-${view}`],\n color && colors[color],\n {\n [commonStyles[`rowLimit${rowLimit}`]]: rowLimit,\n [commonStyles.transparent]: showSkeleton,\n },\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n );\n },\n);\n"],"names":["forwardRef","__rest","useSkeleton","cn","React","__assign","commonStyles","colors","mergeRefs"],"mappings":";;;;;;;;;;;;;;;;;;IA2Fa,SAAS,GAAGA,gBAAU,CAC/B,UACI,EAgBC,EACD,GAAG,EAAA;;AAhBC,IAAA,IAAA,EAAsB,GAAA,EAAA,CAAA,GAAA,CAAA,CAAjB,SAAS,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,CACtB,CAAA,EAAA,GAAA,EAAA,CAAA,IAAe,CAAf,CAAA,IAAI,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,GAAA,EAAA,CAAA,CACX,EAAA,CAAA,IAAA,CACJ,CAAQ,EAAA,CAAA,QAAA,CAAA,KACR,EAAe,GAAA,EAAA,CAAA,MAAA,CAAA,CAAf,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,GAAA,EAAA,CACf,CAAA,EAAA,GAAA,EAAA,CAAA,cAAsB,CAAtB,CAAA,cAAc,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,CAAA,CACtB,KAAK,GAAA,EAAA,CAAA,KAAA,CACL,CAAA,SAAS,GAAA,EAAA,CAAA,SAAA,CAAA,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A,cAAA,EACa,UAAU,EACxB,GAAG,EAAEE,0BAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC1B,EAAA,SAAS,GAEZ,QAAQ,CACD;AAEpB,CAAC;;;;"}
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 * @deprecated\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":";;;;;;;;;;;;;;;;;;;;IA8Fa,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,EACh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C3C,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-alfasans:
14
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
15
- Helvetica, sans-serif;
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
- .typography__xlarge_1r5ea {
19
+ .typography__xlarge_9p1fl {
18
20
  font-size: 48px;
19
21
  line-height: 52px;
20
22
  font-weight: 700;
21
- letter-spacing: 0.1px;
22
- font-family: var(--font-family-alfasans);
23
+ font-family: var(--font-family-system);
23
24
  }
24
- .typography__regular-xlarge_1r5ea {
25
+ .typography__xlarge_9p1fl.typography__font_9p1fl {
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_9p1fl {
25
32
  font-size: 48px;
26
33
  line-height: 52px;
27
34
  font-weight: 400;
28
- letter-spacing: -2.1px;
29
- font-family: var(--font-family-alfasans);
35
+ font-family: var(--font-family-system);
30
36
  }
31
- .typography__large_1r5ea {
37
+ .typography__regular-xlarge_9p1fl.typography__font_9p1fl {
38
+ line-height: 64px;
39
+ font-feature-settings: 'ss01';
40
+ font-family: var(--font-family-styrene);
41
+ }
42
+ .typography__large_9p1fl {
32
43
  font-size: 40px;
33
44
  line-height: 48px;
34
45
  font-weight: 700;
35
- letter-spacing: 0.1px;
36
- font-family: var(--font-family-alfasans);
46
+ font-family: var(--font-family-system);
37
47
  }
38
- .typography__regular-large_1r5ea {
48
+ .typography__large_9p1fl.typography__font_9p1fl {
49
+ font-weight: 500;
50
+ font-feature-settings: 'ss01';
51
+ font-family: var(--font-family-styrene);
52
+ }
53
+ .typography__regular-large_9p1fl {
39
54
  font-size: 40px;
40
55
  line-height: 48px;
41
56
  font-weight: 400;
42
- letter-spacing: -1.7px;
43
- font-family: var(--font-family-alfasans);
57
+ font-family: var(--font-family-system);
44
58
  }
45
- .typography__medium_1r5ea {
59
+ .typography__regular-large_9p1fl.typography__font_9p1fl {
60
+ font-feature-settings: 'ss01';
61
+ font-family: var(--font-family-styrene);
62
+ }
63
+ .typography__medium_9p1fl {
46
64
  font-size: 30px;
47
65
  line-height: 36px;
48
66
  font-weight: 700;
49
- letter-spacing: 0.1px;
50
- font-family: var(--font-family-alfasans);
67
+ font-family: var(--font-family-system);
51
68
  }
52
- .typography__regular-medium_1r5ea {
69
+ .typography__medium_9p1fl.typography__font_9p1fl {
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_9p1fl {
53
77
  font-size: 30px;
54
78
  line-height: 36px;
55
79
  font-weight: 400;
56
- letter-spacing: -1.25px;
57
- font-family: var(--font-family-alfasans);
80
+ font-family: var(--font-family-system);
58
81
  }
59
- .typography__small_1r5ea {
82
+ .typography__regular-medium_9p1fl.typography__font_9p1fl {
83
+ font-size: 32px;
84
+ line-height: 40px;
85
+ font-feature-settings: 'ss01';
86
+ font-family: var(--font-family-styrene);
87
+ }
88
+ .typography__small_9p1fl {
60
89
  font-size: 22px;
61
90
  line-height: 26px;
62
91
  font-weight: 700;
63
- letter-spacing: 0.2px;
64
- font-family: var(--font-family-alfasans);
92
+ font-family: var(--font-family-system);
65
93
  }
66
- .typography__regular-small_1r5ea {
94
+ .typography__small_9p1fl.typography__font_9p1fl {
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_9p1fl {
67
102
  font-size: 22px;
68
103
  line-height: 26px;
69
104
  font-weight: 400;
70
- letter-spacing: -0.8px;
71
- font-family: var(--font-family-alfasans);
105
+ font-family: var(--font-family-system);
72
106
  }
73
- .typography__xsmall_1r5ea {
107
+ .typography__regular-small_9p1fl.typography__font_9p1fl {
108
+ font-size: 24px;
109
+ line-height: 32px;
110
+ font-feature-settings: 'ss01';
111
+ font-family: var(--font-family-styrene);
112
+ }
113
+ .typography__xsmall_9p1fl {
74
114
  font-size: 18px;
75
115
  line-height: 22px;
76
116
  font-weight: 700;
77
- letter-spacing: 0.38px;
78
- font-family: var(--font-family-alfasans);
117
+ font-family: var(--font-family-system);
79
118
  }
80
- .typography__regular-xsmall_1r5ea {
119
+ .typography__xsmall_9p1fl.typography__font_9p1fl {
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_9p1fl {
81
127
  font-size: 18px;
82
128
  line-height: 22px;
83
129
  font-weight: 400;
84
- letter-spacing: -0.36px;
85
- font-family: var(--font-family-alfasans);
130
+ font-family: var(--font-family-system);
86
131
  }
87
- .typography__component_1r5ea.typography__margins-xlarge_1r5ea {
132
+ .typography__regular-xsmall_9p1fl.typography__font_9p1fl {
133
+ font-size: 20px;
134
+ line-height: 24px;
135
+ font-feature-settings: 'ss01';
136
+ font-family: var(--font-family-styrene);
137
+ }
138
+ .typography__component_9p1fl.typography__margins-xlarge_9p1fl {
88
139
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
89
140
  }
90
- .typography__component_1r5ea.typography__margins-large_1r5ea {
141
+ .typography__component_9p1fl.typography__margins-large_9p1fl {
91
142
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
92
143
  }
93
- .typography__component_1r5ea.typography__margins-medium_1r5ea {
144
+ .typography__component_9p1fl.typography__margins-medium_9p1fl {
94
145
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
95
146
  }
96
- .typography__component_1r5ea.typography__margins-small_1r5ea {
147
+ .typography__component_9p1fl.typography__margins-small_9p1fl {
97
148
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
98
149
  }
99
- .typography__component_1r5ea.typography__margins-xsmall_1r5ea {
150
+ .typography__component_9p1fl.typography__margins-xsmall_9p1fl {
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":"typography__xlarge_1r5ea","regular-xlarge":"typography__regular-xlarge_1r5ea","large":"typography__large_1r5ea","regular-large":"typography__regular-large_1r5ea","medium":"typography__medium_1r5ea","regular-medium":"typography__regular-medium_1r5ea","small":"typography__small_1r5ea","regular-small":"typography__regular-small_1r5ea","xsmall":"typography__xsmall_1r5ea","regular-xsmall":"typography__regular-xsmall_1r5ea","component":"typography__component_1r5ea","margins-xlarge":"typography__margins-xlarge_1r5ea","margins-large":"typography__margins-large_1r5ea","margins-medium":"typography__margins-medium_1r5ea","margins-small":"typography__margins-small_1r5ea","margins-xsmall":"typography__margins-xsmall_1r5ea"};
5
+ var styles = {"xlarge":"typography__xlarge_9p1fl","font":"typography__font_9p1fl","regular-xlarge":"typography__regular-xlarge_9p1fl","large":"typography__large_9p1fl","regular-large":"typography__regular-large_9p1fl","medium":"typography__medium_9p1fl","regular-medium":"typography__regular-medium_9p1fl","small":"typography__small_9p1fl","regular-small":"typography__regular-small_9p1fl","xsmall":"typography__xsmall_9p1fl","regular-xsmall":"typography__regular-xsmall_9p1fl","component":"typography__component_9p1fl","margins-xlarge":"typography__margins-xlarge_9p1fl","margins-large":"typography__margins-large_9p1fl","margins-medium":"typography__margins-medium_9p1fl","margins-small":"typography__margins-small_9p1fl","margins-xsmall":"typography__margins-xsmall_9p1fl"};
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;;;;"}
@@ -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;
@@ -8,112 +8,129 @@
8
8
  --gap-40: var(--gap-3xl);
9
9
  }
10
10
  :root {
11
- --font-family-alfasans:
12
- 'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
13
- Helvetica, sans-serif;
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
- .typography__xlarge_jyyka {
17
+ .typography__xlarge_13n6g {
16
18
  font-size: 34px;
17
19
  line-height: 40px;
18
- font-weight: 500;
19
- letter-spacing: -0.32px;
20
- font-family: var(--font-family-alfasans);
20
+ font-weight: 600;
21
+ font-family: var(--font-family-system);
21
22
  }
22
- .typography__xlarge_jyyka.typography__font_jyyka {
23
+ .typography__xlarge_13n6g.typography__font_13n6g {
24
+ font-weight: 500;
25
+ font-feature-settings: 'ss01';
26
+ font-family: var(--font-family-styrene);
23
27
  }
24
- .typography__regular-xlarge_jyyka {
28
+ .typography__regular-xlarge_13n6g {
25
29
  font-size: 34px;
26
30
  line-height: 40px;
27
31
  font-weight: 400;
28
- letter-spacing: -1.36px;
29
- font-family: var(--font-family-alfasans);
32
+ font-family: var(--font-family-system);
30
33
  }
31
- .typography__regular-xlarge_jyyka.typography__system_jyyka {
34
+ .typography__regular-xlarge_13n6g.typography__system_13n6g {
35
+ font-feature-settings: 'ss01';
36
+ font-family: var(--font-family-styrene);
32
37
  }
33
- .typography__large_jyyka {
38
+ .typography__large_13n6g {
34
39
  font-size: 30px;
35
40
  line-height: 36px;
36
- font-weight: 500;
37
- letter-spacing: -0.25px;
38
- font-family: var(--font-family-alfasans);
41
+ font-weight: 600;
42
+ font-family: var(--font-family-system);
39
43
  }
40
- .typography__large_jyyka.typography__font_jyyka {
44
+ .typography__large_13n6g.typography__font_13n6g {
45
+ font-weight: 500;
46
+ font-feature-settings: 'ss01';
47
+ font-family: var(--font-family-styrene);
41
48
  }
42
- .typography__regular-large_jyyka {
49
+ .typography__regular-large_13n6g {
43
50
  font-size: 30px;
44
51
  line-height: 36px;
45
52
  font-weight: 400;
46
- letter-spacing: -1.25px;
47
- font-family: var(--font-family-alfasans);
53
+ font-family: var(--font-family-system);
48
54
  }
49
- .typography__regular-large_jyyka.typography__system_jyyka {
55
+ .typography__regular-large_13n6g.typography__system_13n6g {
56
+ font-feature-settings: 'ss01';
57
+ font-family: var(--font-family-styrene);
50
58
  }
51
- .typography__medium_jyyka {
59
+ .typography__medium_13n6g {
52
60
  font-size: 26px;
53
61
  line-height: 32px;
54
- font-weight: 500;
55
- letter-spacing: -0.25px;
56
- font-family: var(--font-family-alfasans);
62
+ font-weight: 600;
63
+ font-family: var(--font-family-system);
57
64
  }
58
- .typography__medium_jyyka.typography__font_jyyka {
65
+ .typography__medium_13n6g.typography__font_13n6g {
66
+ font-weight: 500;
67
+ font-feature-settings: 'ss01';
68
+ font-family: var(--font-family-styrene);
59
69
  }
60
- .typography__regular-medium_jyyka {
70
+ .typography__regular-medium_13n6g {
61
71
  font-size: 26px;
62
72
  line-height: 32px;
63
73
  font-weight: 400;
64
- letter-spacing: -1px;
65
- font-family: var(--font-family-alfasans);
74
+ font-family: var(--font-family-system);
66
75
  }
67
- .typography__regular-medium_jyyka.typography__system_jyyka {
76
+ .typography__regular-medium_13n6g.typography__system_13n6g {
77
+ font-feature-settings: 'ss01';
78
+ font-family: var(--font-family-styrene);
68
79
  }
69
- .typography__small_jyyka {
80
+ .typography__small_13n6g {
70
81
  font-size: 20px;
71
82
  line-height: 28px;
72
- font-weight: 500;
73
- letter-spacing: -0.15px;
74
- font-family: var(--font-family-alfasans);
83
+ font-weight: 600;
84
+ font-family: var(--font-family-system);
75
85
  }
76
- .typography__small_jyyka.typography__font_jyyka {
86
+ .typography__small_13n6g.typography__font_13n6g {
87
+ font-weight: 500;
88
+ font-feature-settings: 'ss01';
89
+ font-family: var(--font-family-styrene);
77
90
  }
78
- .typography__regular-small_jyyka {
91
+ .typography__regular-small_13n6g {
79
92
  font-size: 20px;
80
93
  line-height: 28px;
81
94
  font-weight: 400;
82
- letter-spacing: -0.68px;
83
- font-family: var(--font-family-alfasans);
95
+ font-family: var(--font-family-system);
84
96
  }
85
- .typography__regular-small_jyyka.typography__system_jyyka {
97
+ .typography__regular-small_13n6g.typography__system_13n6g {
98
+ font-feature-settings: 'ss01';
99
+ font-family: var(--font-family-styrene);
86
100
  }
87
- .typography__xsmall_jyyka {
101
+ .typography__xsmall_13n6g {
88
102
  font-size: 16px;
89
103
  line-height: 20px;
90
- font-weight: 500;
91
- letter-spacing: 0.17px;
92
- font-family: var(--font-family-alfasans);
104
+ font-weight: 600;
105
+ font-family: var(--font-family-system);
93
106
  }
94
- .typography__xsmall_jyyka.typography__font_jyyka {
107
+ .typography__xsmall_13n6g.typography__font_13n6g {
108
+ font-weight: 500;
109
+ font-feature-settings: 'ss01';
110
+ font-family: var(--font-family-styrene);
95
111
  }
96
- .typography__regular-xsmall_jyyka {
112
+ .typography__regular-xsmall_13n6g {
97
113
  font-size: 16px;
98
114
  line-height: 20px;
99
115
  font-weight: 400;
100
- letter-spacing: -0.24px;
101
- font-family: var(--font-family-alfasans);
116
+ font-family: var(--font-family-system);
102
117
  }
103
- .typography__regular-xsmall_jyyka.typography__system_jyyka {
118
+ .typography__regular-xsmall_13n6g.typography__system_13n6g {
119
+ font-feature-settings: 'ss01';
120
+ font-family: var(--font-family-styrene);
104
121
  }
105
- .typography__component_jyyka.typography__margins-xlarge_jyyka {
122
+ .typography__component_13n6g.typography__margins-xlarge_13n6g {
106
123
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
107
124
  }
108
- .typography__component_jyyka.typography__margins-large_jyyka {
125
+ .typography__component_13n6g.typography__margins-large_13n6g {
109
126
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
110
127
  }
111
- .typography__component_jyyka.typography__margins-medium_jyyka {
128
+ .typography__component_13n6g.typography__margins-medium_13n6g {
112
129
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
113
130
  }
114
- .typography__component_jyyka.typography__margins-small_jyyka {
131
+ .typography__component_13n6g.typography__margins-small_13n6g {
115
132
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
116
133
  }
117
- .typography__component_jyyka .typography__margins-xsmall_jyyka {
134
+ .typography__component_13n6g .typography__margins-xsmall_13n6g {
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":"typography__xlarge_jyyka","font":"typography__font_jyyka","regular-xlarge":"typography__regular-xlarge_jyyka","system":"typography__system_jyyka","large":"typography__large_jyyka","regular-large":"typography__regular-large_jyyka","medium":"typography__medium_jyyka","regular-medium":"typography__regular-medium_jyyka","small":"typography__small_jyyka","regular-small":"typography__regular-small_jyyka","xsmall":"typography__xsmall_jyyka","regular-xsmall":"typography__regular-xsmall_jyyka","component":"typography__component_jyyka","margins-xlarge":"typography__margins-xlarge_jyyka","margins-large":"typography__margins-large_jyyka","margins-medium":"typography__margins-medium_jyyka","margins-small":"typography__margins-small_jyyka","margins-xsmall":"typography__margins-xsmall_jyyka"};
5
+ var styles = {"xlarge":"typography__xlarge_13n6g","font":"typography__font_13n6g","regular-xlarge":"typography__regular-xlarge_13n6g","system":"typography__system_13n6g","large":"typography__large_13n6g","regular-large":"typography__regular-large_13n6g","medium":"typography__medium_13n6g","regular-medium":"typography__regular-medium_13n6g","small":"typography__small_13n6g","regular-small":"typography__regular-small_13n6g","xsmall":"typography__xsmall_13n6g","regular-xsmall":"typography__regular-xsmall_13n6g","component":"typography__component_13n6g","margins-xlarge":"typography__margins-xlarge_13n6g","margins-large":"typography__margins-large_13n6g","margins-medium":"typography__margins-medium_13n6g","margins-small":"typography__margins-small_13n6g","margins-xsmall":"typography__margins-xsmall_13n6g"};
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;