@alfalab/core-components-typography 6.0.14 → 6.0.15

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 (99) hide show
  1. package/colors.css +20 -20
  2. package/colors.js.map +1 -1
  3. package/colors.module.css.js +1 -1
  4. package/colors.module.css.js.map +1 -1
  5. package/component.js +8 -8
  6. package/component.js.map +1 -1
  7. package/cssm/colors.js.map +1 -1
  8. package/cssm/component.js +8 -8
  9. package/cssm/component.js.map +1 -1
  10. package/cssm/index.js +8 -8
  11. package/cssm/presets.js.map +1 -1
  12. package/cssm/text/component.js.map +1 -1
  13. package/cssm/title/component.js.map +1 -1
  14. package/cssm/title/index.js.map +1 -1
  15. package/cssm/title/utils.js.map +1 -1
  16. package/cssm/title-mobile/component.js.map +1 -1
  17. package/cssm/title-responsive/component.js.map +1 -1
  18. package/esm/colors.css +20 -20
  19. package/esm/colors.js.map +1 -1
  20. package/esm/colors.module.css.js +1 -1
  21. package/esm/colors.module.css.js.map +1 -1
  22. package/esm/component.js.map +1 -1
  23. package/esm/index.js +1 -1
  24. package/esm/presets.js.map +1 -1
  25. package/esm/text/component.js.map +1 -1
  26. package/esm/text/index.css +42 -42
  27. package/esm/text/index.module.css.js +1 -1
  28. package/esm/text/index.module.css.js.map +1 -1
  29. package/esm/title/common.css +7 -7
  30. package/esm/title/common.module.css.js +1 -1
  31. package/esm/title/common.module.css.js.map +1 -1
  32. package/esm/title/component.js.map +1 -1
  33. package/esm/title/index.css +25 -25
  34. package/esm/title/index.js.map +1 -1
  35. package/esm/title/index.module.css.js +1 -1
  36. package/esm/title/index.module.css.js.map +1 -1
  37. package/esm/title/utils.js.map +1 -1
  38. package/esm/title-mobile/component.js.map +1 -1
  39. package/esm/title-mobile/index.css +25 -25
  40. package/esm/title-mobile/index.module.css.js +1 -1
  41. package/esm/title-mobile/index.module.css.js.map +1 -1
  42. package/esm/title-responsive/component.js.map +1 -1
  43. package/index.js +8 -8
  44. package/modern/colors.css +20 -20
  45. package/modern/colors.js.map +1 -1
  46. package/modern/colors.module.css.js +1 -1
  47. package/modern/colors.module.css.js.map +1 -1
  48. package/modern/component.js.map +1 -1
  49. package/modern/index.js +1 -1
  50. package/modern/presets.js.map +1 -1
  51. package/modern/text/component.js.map +1 -1
  52. package/modern/text/index.css +42 -42
  53. package/modern/text/index.module.css.js +1 -1
  54. package/modern/text/index.module.css.js.map +1 -1
  55. package/modern/title/common.css +7 -7
  56. package/modern/title/common.module.css.js +1 -1
  57. package/modern/title/common.module.css.js.map +1 -1
  58. package/modern/title/component.js.map +1 -1
  59. package/modern/title/index.css +25 -25
  60. package/modern/title/index.js.map +1 -1
  61. package/modern/title/index.module.css.js +1 -1
  62. package/modern/title/index.module.css.js.map +1 -1
  63. package/modern/title/utils.js.map +1 -1
  64. package/modern/title-mobile/component.js.map +1 -1
  65. package/modern/title-mobile/index.css +25 -25
  66. package/modern/title-mobile/index.module.css.js +1 -1
  67. package/modern/title-mobile/index.module.css.js.map +1 -1
  68. package/modern/title-responsive/component.js.map +1 -1
  69. package/moderncssm/colors.js.map +1 -1
  70. package/moderncssm/component.js.map +1 -1
  71. package/moderncssm/index.js +1 -1
  72. package/moderncssm/presets.js.map +1 -1
  73. package/moderncssm/text/component.js.map +1 -1
  74. package/moderncssm/title/component.js.map +1 -1
  75. package/moderncssm/title/index.js.map +1 -1
  76. package/moderncssm/title/utils.js.map +1 -1
  77. package/moderncssm/title-mobile/component.js.map +1 -1
  78. package/moderncssm/title-responsive/component.js.map +1 -1
  79. package/package.json +3 -3
  80. package/presets.js.map +1 -1
  81. package/src/text/index.module.css +5 -4
  82. package/text/component.js.map +1 -1
  83. package/text/index.css +42 -42
  84. package/text/index.module.css.js +1 -1
  85. package/text/index.module.css.js.map +1 -1
  86. package/title/common.css +7 -7
  87. package/title/common.module.css.js +1 -1
  88. package/title/common.module.css.js.map +1 -1
  89. package/title/component.js.map +1 -1
  90. package/title/index.css +25 -25
  91. package/title/index.js.map +1 -1
  92. package/title/index.module.css.js +1 -1
  93. package/title/index.module.css.js.map +1 -1
  94. package/title/utils.js.map +1 -1
  95. package/title-mobile/component.js.map +1 -1
  96. package/title-mobile/index.css +25 -25
  97. package/title-mobile/index.module.css.js +1 -1
  98. package/title-mobile/index.module.css.js.map +1 -1
  99. package/title-responsive/component.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../src/text/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../common.module.css';\n\n:root {\n --text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);\n}\n\n.paragraph {\n margin: var(--gap-0);\n padding: var(--gap-0);\n}\n\n.paragraphWithMargins {\n padding: var(--gap-0);\n margin: var(--text-paragraph-margin-bottom);\n}\n\n@each $view in component, caps, tagline {\n .$(view) {\n @mixin paragraph_$(view);\n }\n\n .$(view).bold {\n @subtract-mixin accent_$(view), paragraph_$(view);\n }\n\n .$(view).medium {\n @subtract-mixin action_$(view), paragraph_$(view);\n }\n}\n\n@each $kind in primary, secondary {\n @each $size in large, medium, small {\n .$(kind)-$(size) {\n /* prettier-ignore */\n @mixin paragraph_$(kind)_$(size);\n }\n\n .$(kind)-$(size).bold {\n @subtract-mixin accent_$(kind)_$(size), paragraph_$(kind)_$(size);\n }\n\n .$(kind)-$(size).medium {\n @subtract-mixin action_$(kind)_$(size), paragraph_$(kind)_$(size);\n }\n }\n\n .component-$(kind) {\n @mixin paragraph_component_$(kind);\n\n &.bold {\n @subtract-mixin accent_component_$(kind), paragraph_component_$(kind);\n }\n\n &.medium {\n @subtract-mixin action_component_$(kind), paragraph_component_$(kind);\n }\n }\n}\n\n.rowLimit1 {\n @mixin row_limit 1;\n word-break: break-all;\n}\n\n.rowLimit2 {\n @mixin row_limit 2;\n}\n\n.rowLimit3 {\n @mixin row_limit 3;\n}\n\n.monospace {\n font-variant-numeric: tabular-nums;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,aAAa,CAAC,+BAA+B,CAAC,UAAU,CAAC,4BAA4B,CAAC,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,6BAA6B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,WAAW,CAAC,6BAA6B,CAAC,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,SAAS,CAAC,2BAA2B,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../src/text/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../common.module.css';\n\n:root {\n --text-paragraph-margin-bottom: var(--gap-0) var(--gap-0) var(--gap-12);\n}\n\n.paragraph {\n margin: var(--gap-0);\n padding: var(--gap-0);\n}\n\n.paragraphWithMargins {\n padding: var(--gap-0);\n margin: var(--text-paragraph-margin-bottom);\n}\n\n/* prettier-ignore */\n@each $view, $token in (component, component_primary), (caps, caps), (tagline, tagline) {\n .$(view) {\n @mixin paragraph_$(token);\n }\n\n .$(view).bold {\n @subtract-mixin accent_$(token), paragraph_$(token);\n }\n\n .$(view).medium {\n @subtract-mixin action_$(token), paragraph_$(token);\n }\n}\n\n@each $kind in primary, secondary {\n @each $size in large, medium, small {\n .$(kind)-$(size) {\n /* prettier-ignore */\n @mixin paragraph_$(kind)_$(size);\n }\n\n .$(kind)-$(size).bold {\n @subtract-mixin accent_$(kind)_$(size), paragraph_$(kind)_$(size);\n }\n\n .$(kind)-$(size).medium {\n @subtract-mixin action_$(kind)_$(size), paragraph_$(kind)_$(size);\n }\n }\n\n .component-$(kind) {\n @mixin paragraph_component_$(kind);\n\n &.bold {\n @subtract-mixin accent_component_$(kind), paragraph_component_$(kind);\n }\n\n &.medium {\n @subtract-mixin action_component_$(kind), paragraph_component_$(kind);\n }\n }\n}\n\n.rowLimit1 {\n @mixin row_limit 1;\n word-break: break-all;\n}\n\n.rowLimit2 {\n @mixin row_limit 2;\n}\n\n.rowLimit3 {\n @mixin row_limit 3;\n}\n\n.monospace {\n font-variant-numeric: tabular-nums;\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,aAAa,CAAC,+BAA+B,CAAC,UAAU,CAAC,4BAA4B,CAAC,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,6BAA6B,CAAC,sBAAsB,CAAC,wCAAwC,CAAC,WAAW,CAAC,6BAA6B,CAAC,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,SAAS,CAAC,2BAA2B,CAAC,eAAe,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,eAAe,CAAC,iCAAiC,CAAC,mBAAmB,CAAC,qCAAqC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,kBAAkB,CAAC,oCAAoC,CAAC,iBAAiB,CAAC,mCAAmC,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC;;"}
@@ -1,34 +1,34 @@
1
1
  :root {
2
2
  --gap-0: 0px;
3
3
  }
4
- .typography__transparent_3kstk {
4
+ .typography__transparent_t1ev6 {
5
5
  visibility: hidden;
6
6
  }
7
- .typography__skeleton_3kstk {
7
+ .typography__skeleton_t1ev6 {
8
8
  position: absolute;
9
9
  inset: 0;
10
10
  }
11
- .typography__root_3kstk {
11
+ .typography__root_t1ev6 {
12
12
  position: relative;
13
13
  }
14
- .typography__component_3kstk {
14
+ .typography__component_t1ev6 {
15
15
  margin: var(--gap-0);
16
16
  padding: var(--gap-0);
17
17
  }
18
- .typography__rowLimit1_3kstk {
18
+ .typography__rowLimit1_t1ev6 {
19
19
  -webkit-line-clamp: 1;
20
20
  display: -webkit-box;
21
21
  -webkit-box-orient: vertical;
22
22
  overflow: hidden;
23
23
  word-break: break-all;
24
24
  }
25
- .typography__rowLimit2_3kstk {
25
+ .typography__rowLimit2_t1ev6 {
26
26
  -webkit-line-clamp: 2;
27
27
  display: -webkit-box;
28
28
  -webkit-box-orient: vertical;
29
29
  overflow: hidden;
30
30
  }
31
- .typography__rowLimit3_3kstk {
31
+ .typography__rowLimit3_t1ev6 {
32
32
  -webkit-line-clamp: 3;
33
33
  display: -webkit-box;
34
34
  -webkit-box-orient: vertical;
@@ -1,6 +1,6 @@
1
1
  import './common.css';
2
2
 
3
- const commonStyles = {"transparent":"typography__transparent_3kstk","skeleton":"typography__skeleton_3kstk","root":"typography__root_3kstk","component":"typography__component_3kstk","rowLimit1":"typography__rowLimit1_3kstk","rowLimit2":"typography__rowLimit2_3kstk","rowLimit3":"typography__rowLimit3_3kstk"};
3
+ const commonStyles = {"transparent":"typography__transparent_t1ev6","skeleton":"typography__skeleton_t1ev6","root":"typography__root_t1ev6","component":"typography__component_t1ev6","rowLimit1":"typography__rowLimit1_t1ev6","rowLimit2":"typography__rowLimit2_t1ev6","rowLimit3":"typography__rowLimit3_t1ev6"};
4
4
 
5
5
  export { commonStyles as default };
6
6
  //# sourceMappingURL=common.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.module.css.js","sources":["../src/title/common.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../common.module.css';\n\n.component {\n margin: var(--gap-0);\n padding: var(--gap-0);\n}\n\n.rowLimit1 {\n @mixin row_limit 1;\n word-break: break-all;\n}\n\n.rowLimit2 {\n @mixin row_limit 2;\n}\n\n.rowLimit3 {\n @mixin row_limit 3;\n}\n"],"names":[],"mappings":";;AAEgB,qBAAe,CAAC,aAAa,CAAC,+BAA+B,CAAC,UAAU,CAAC,4BAA4B,CAAC,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC;;;;"}
1
+ {"version":3,"file":"common.module.css.js","sources":["../src/title/common.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../common.module.css';\n\n.component {\n margin: var(--gap-0);\n padding: var(--gap-0);\n}\n\n.rowLimit1 {\n @mixin row_limit 1;\n word-break: break-all;\n}\n\n.rowLimit2 {\n @mixin row_limit 2;\n}\n\n.rowLimit3 {\n @mixin row_limit 3;\n}\n"],"names":[],"mappings":";;AAEgB,qBAAe,CAAC,aAAa,CAAC,+BAA+B,CAAC,UAAU,CAAC,4BAA4B,CAAC,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC,WAAW,CAAC,6BAA6B,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA4FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,EACtE,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAC,CAAA,aAAA,CAAA,SAAS,EACN,EAAA,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;gBACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAChC,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA4FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,EACtE,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAA,QAAA,EAAW,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;gBACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAAA,EAChC,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -12,137 +12,137 @@
12
12
  'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
13
13
  sans-serif;
14
14
  }
15
- .typography__xlarge_xd7yh {
15
+ .typography__xlarge_lswbl {
16
16
  font-size: 48px;
17
17
  line-height: 52px;
18
18
  font-weight: 700;
19
19
  font-family: var(--font-family-system);
20
20
  }
21
- .typography__xlarge_xd7yh.typography__font_xd7yh {
21
+ .typography__xlarge_lswbl.typography__font_lswbl {
22
22
  line-height: 64px;
23
23
  font-weight: 500;
24
24
  font-feature-settings: 'ss01';
25
25
  font-family: var(--font-family-styrene);
26
26
  }
27
- .typography__regular-xlarge_xd7yh {
27
+ .typography__regular-xlarge_lswbl {
28
28
  font-size: 48px;
29
29
  line-height: 52px;
30
30
  font-weight: 400;
31
31
  font-family: var(--font-family-system);
32
32
  }
33
- .typography__regular-xlarge_xd7yh.typography__font_xd7yh {
33
+ .typography__regular-xlarge_lswbl.typography__font_lswbl {
34
34
  line-height: 64px;
35
35
  font-feature-settings: 'ss01';
36
36
  font-family: var(--font-family-styrene);
37
37
  }
38
- .typography__large_xd7yh {
38
+ .typography__large_lswbl {
39
39
  font-size: 40px;
40
40
  line-height: 48px;
41
41
  font-weight: 700;
42
42
  font-family: var(--font-family-system);
43
43
  }
44
- .typography__large_xd7yh.typography__font_xd7yh {
44
+ .typography__large_lswbl.typography__font_lswbl {
45
45
  font-weight: 500;
46
46
  font-feature-settings: 'ss01';
47
47
  font-family: var(--font-family-styrene);
48
48
  }
49
- .typography__regular-large_xd7yh {
49
+ .typography__regular-large_lswbl {
50
50
  font-size: 40px;
51
51
  line-height: 48px;
52
52
  font-weight: 400;
53
53
  font-family: var(--font-family-system);
54
54
  }
55
- .typography__regular-large_xd7yh.typography__font_xd7yh {
55
+ .typography__regular-large_lswbl.typography__font_lswbl {
56
56
  font-feature-settings: 'ss01';
57
57
  font-family: var(--font-family-styrene);
58
58
  }
59
- .typography__medium_xd7yh {
59
+ .typography__medium_lswbl {
60
60
  font-size: 30px;
61
61
  line-height: 36px;
62
62
  font-weight: 700;
63
63
  font-family: var(--font-family-system);
64
64
  }
65
- .typography__medium_xd7yh.typography__font_xd7yh {
65
+ .typography__medium_lswbl.typography__font_lswbl {
66
66
  font-size: 32px;
67
67
  line-height: 40px;
68
68
  font-weight: 500;
69
69
  font-feature-settings: 'ss01';
70
70
  font-family: var(--font-family-styrene);
71
71
  }
72
- .typography__regular-medium_xd7yh {
72
+ .typography__regular-medium_lswbl {
73
73
  font-size: 30px;
74
74
  line-height: 36px;
75
75
  font-weight: 400;
76
76
  font-family: var(--font-family-system);
77
77
  }
78
- .typography__regular-medium_xd7yh.typography__font_xd7yh {
78
+ .typography__regular-medium_lswbl.typography__font_lswbl {
79
79
  font-size: 32px;
80
80
  line-height: 40px;
81
81
  font-feature-settings: 'ss01';
82
82
  font-family: var(--font-family-styrene);
83
83
  }
84
- .typography__small_xd7yh {
84
+ .typography__small_lswbl {
85
85
  font-size: 22px;
86
86
  line-height: 26px;
87
87
  font-weight: 700;
88
88
  font-family: var(--font-family-system);
89
89
  }
90
- .typography__small_xd7yh.typography__font_xd7yh {
90
+ .typography__small_lswbl.typography__font_lswbl {
91
91
  font-size: 24px;
92
92
  line-height: 32px;
93
93
  font-weight: 500;
94
94
  font-feature-settings: 'ss01';
95
95
  font-family: var(--font-family-styrene);
96
96
  }
97
- .typography__regular-small_xd7yh {
97
+ .typography__regular-small_lswbl {
98
98
  font-size: 22px;
99
99
  line-height: 26px;
100
100
  font-weight: 400;
101
101
  font-family: var(--font-family-system);
102
102
  }
103
- .typography__regular-small_xd7yh.typography__font_xd7yh {
103
+ .typography__regular-small_lswbl.typography__font_lswbl {
104
104
  font-size: 24px;
105
105
  line-height: 32px;
106
106
  font-feature-settings: 'ss01';
107
107
  font-family: var(--font-family-styrene);
108
108
  }
109
- .typography__xsmall_xd7yh {
109
+ .typography__xsmall_lswbl {
110
110
  font-size: 18px;
111
111
  line-height: 22px;
112
112
  font-weight: 700;
113
113
  font-family: var(--font-family-system);
114
114
  }
115
- .typography__xsmall_xd7yh.typography__font_xd7yh {
115
+ .typography__xsmall_lswbl.typography__font_lswbl {
116
116
  font-size: 20px;
117
117
  line-height: 24px;
118
118
  font-weight: 500;
119
119
  font-feature-settings: 'ss01';
120
120
  font-family: var(--font-family-styrene);
121
121
  }
122
- .typography__regular-xsmall_xd7yh {
122
+ .typography__regular-xsmall_lswbl {
123
123
  font-size: 18px;
124
124
  line-height: 22px;
125
125
  font-weight: 400;
126
126
  font-family: var(--font-family-system);
127
127
  }
128
- .typography__regular-xsmall_xd7yh.typography__font_xd7yh {
128
+ .typography__regular-xsmall_lswbl.typography__font_lswbl {
129
129
  font-size: 20px;
130
130
  line-height: 24px;
131
131
  font-feature-settings: 'ss01';
132
132
  font-family: var(--font-family-styrene);
133
133
  }
134
- .typography__component_xd7yh.typography__margins-xlarge_xd7yh {
134
+ .typography__component_lswbl.typography__margins-xlarge_lswbl {
135
135
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
136
136
  }
137
- .typography__component_xd7yh.typography__margins-large_xd7yh {
137
+ .typography__component_lswbl.typography__margins-large_lswbl {
138
138
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
139
139
  }
140
- .typography__component_xd7yh.typography__margins-medium_xd7yh {
140
+ .typography__component_lswbl.typography__margins-medium_lswbl {
141
141
  margin: var(--gap-48) var(--gap-0) var(--gap-24);
142
142
  }
143
- .typography__component_xd7yh.typography__margins-small_xd7yh {
143
+ .typography__component_lswbl.typography__margins-small_lswbl {
144
144
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
145
145
  }
146
- .typography__component_xd7yh.typography__margins-xsmall_xd7yh {
146
+ .typography__component_lswbl.typography__margins-xsmall_lswbl {
147
147
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
148
148
  }
@@ -1 +1 @@
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 styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CACxE;;;;"}
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 styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAA,CAAG,CACxE;;"}
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"xlarge":"typography__xlarge_xd7yh","font":"typography__font_xd7yh","regular-xlarge":"typography__regular-xlarge_xd7yh","large":"typography__large_xd7yh","regular-large":"typography__regular-large_xd7yh","medium":"typography__medium_xd7yh","regular-medium":"typography__regular-medium_xd7yh","small":"typography__small_xd7yh","regular-small":"typography__regular-small_xd7yh","xsmall":"typography__xsmall_xd7yh","regular-xsmall":"typography__regular-xsmall_xd7yh","component":"typography__component_xd7yh","margins-xlarge":"typography__margins-xlarge_xd7yh","margins-large":"typography__margins-large_xd7yh","margins-medium":"typography__margins-medium_xd7yh","margins-small":"typography__margins-small_xd7yh","margins-xsmall":"typography__margins-xsmall_xd7yh"};
3
+ const styles = {"xlarge":"typography__xlarge_lswbl","font":"typography__font_lswbl","regular-xlarge":"typography__regular-xlarge_lswbl","large":"typography__large_lswbl","regular-large":"typography__regular-large_lswbl","medium":"typography__medium_lswbl","regular-medium":"typography__regular-medium_lswbl","small":"typography__small_lswbl","regular-small":"typography__regular-small_lswbl","xsmall":"typography__xsmall_lswbl","regular-xsmall":"typography__regular-xsmall_lswbl","component":"typography__component_lswbl","margins-xlarge":"typography__margins-xlarge_lswbl","margins-large":"typography__margins-large_lswbl","margins-medium":"typography__margins-medium_lswbl","margins-small":"typography__margins-small_lswbl","margins-xsmall":"typography__margins-xsmall_lswbl"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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 &.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,eAAe,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;;;;"}
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,eAAe,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;;"}
@@ -1 +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;;;;"}
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":"AAAM,SAAU,gBAAgB,CAC5B,IAAuC,EACvC,QAA8B,EAAA;IAE9B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,EAAE;AAC3C,QAAA,OAAO,QAAQ;IACnB;AAEA,IAAA,IAAI,QAAQ,KAAK,SAAS,EAAE;AACxB,QAAA,OAAO,MAAM;IACjB;AAEA,IAAA,OAAO,UAAU;AACrB;;"}
@@ -1 +1 @@
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 styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":[],"mappings":";;;;AAMO,MAAM,WAAW,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,GAAG,KAAK,KAAC,CAAA,aAAA,CAAA,SAAS,EAAK,EAAA,GAAA,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAG;;;;"}
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 styles from './index.module.css';\n\nexport const TitleMobile = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>(\n (props, ref) => <TitleBase {...props} styles={styles} ref={ref} platform='mobile' />,\n);\n"],"names":[],"mappings":";;;;AAMO,MAAM,WAAW,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,GAAG,KAAK,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,QAAQ,EAAA,CAAG;;"}
@@ -11,123 +11,123 @@
11
11
  'Styrene UI', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
12
12
  sans-serif;
13
13
  }
14
- .typography__xlarge_k7ygb {
14
+ .typography__xlarge_vsa37 {
15
15
  font-size: 34px;
16
16
  line-height: 40px;
17
17
  font-weight: 600;
18
18
  font-family: var(--font-family-system);
19
19
  }
20
- .typography__xlarge_k7ygb.typography__font_k7ygb {
20
+ .typography__xlarge_vsa37.typography__font_vsa37 {
21
21
  font-weight: 500;
22
22
  font-feature-settings: 'ss01';
23
23
  font-family: var(--font-family-styrene);
24
24
  }
25
- .typography__regular-xlarge_k7ygb {
25
+ .typography__regular-xlarge_vsa37 {
26
26
  font-size: 34px;
27
27
  line-height: 40px;
28
28
  font-weight: 400;
29
29
  font-family: var(--font-family-system);
30
30
  }
31
- .typography__regular-xlarge_k7ygb.typography__system_k7ygb {
31
+ .typography__regular-xlarge_vsa37.typography__system_vsa37 {
32
32
  font-feature-settings: 'ss01';
33
33
  font-family: var(--font-family-styrene);
34
34
  }
35
- .typography__large_k7ygb {
35
+ .typography__large_vsa37 {
36
36
  font-size: 30px;
37
37
  line-height: 36px;
38
38
  font-weight: 600;
39
39
  font-family: var(--font-family-system);
40
40
  }
41
- .typography__large_k7ygb.typography__font_k7ygb {
41
+ .typography__large_vsa37.typography__font_vsa37 {
42
42
  font-weight: 500;
43
43
  font-feature-settings: 'ss01';
44
44
  font-family: var(--font-family-styrene);
45
45
  }
46
- .typography__regular-large_k7ygb {
46
+ .typography__regular-large_vsa37 {
47
47
  font-size: 30px;
48
48
  line-height: 36px;
49
49
  font-weight: 400;
50
50
  font-family: var(--font-family-system);
51
51
  }
52
- .typography__regular-large_k7ygb.typography__system_k7ygb {
52
+ .typography__regular-large_vsa37.typography__system_vsa37 {
53
53
  font-feature-settings: 'ss01';
54
54
  font-family: var(--font-family-styrene);
55
55
  }
56
- .typography__medium_k7ygb {
56
+ .typography__medium_vsa37 {
57
57
  font-size: 26px;
58
58
  line-height: 32px;
59
59
  font-weight: 600;
60
60
  font-family: var(--font-family-system);
61
61
  }
62
- .typography__medium_k7ygb.typography__font_k7ygb {
62
+ .typography__medium_vsa37.typography__font_vsa37 {
63
63
  font-weight: 500;
64
64
  font-feature-settings: 'ss01';
65
65
  font-family: var(--font-family-styrene);
66
66
  }
67
- .typography__regular-medium_k7ygb {
67
+ .typography__regular-medium_vsa37 {
68
68
  font-size: 26px;
69
69
  line-height: 32px;
70
70
  font-weight: 400;
71
71
  font-family: var(--font-family-system);
72
72
  }
73
- .typography__regular-medium_k7ygb.typography__system_k7ygb {
73
+ .typography__regular-medium_vsa37.typography__system_vsa37 {
74
74
  font-feature-settings: 'ss01';
75
75
  font-family: var(--font-family-styrene);
76
76
  }
77
- .typography__small_k7ygb {
77
+ .typography__small_vsa37 {
78
78
  font-size: 20px;
79
79
  line-height: 28px;
80
80
  font-weight: 600;
81
81
  font-family: var(--font-family-system);
82
82
  }
83
- .typography__small_k7ygb.typography__font_k7ygb {
83
+ .typography__small_vsa37.typography__font_vsa37 {
84
84
  font-weight: 500;
85
85
  font-feature-settings: 'ss01';
86
86
  font-family: var(--font-family-styrene);
87
87
  }
88
- .typography__regular-small_k7ygb {
88
+ .typography__regular-small_vsa37 {
89
89
  font-size: 20px;
90
90
  line-height: 28px;
91
91
  font-weight: 400;
92
92
  font-family: var(--font-family-system);
93
93
  }
94
- .typography__regular-small_k7ygb.typography__system_k7ygb {
94
+ .typography__regular-small_vsa37.typography__system_vsa37 {
95
95
  font-feature-settings: 'ss01';
96
96
  font-family: var(--font-family-styrene);
97
97
  }
98
- .typography__xsmall_k7ygb {
98
+ .typography__xsmall_vsa37 {
99
99
  font-size: 16px;
100
100
  line-height: 20px;
101
101
  font-weight: 600;
102
102
  font-family: var(--font-family-system);
103
103
  }
104
- .typography__xsmall_k7ygb.typography__font_k7ygb {
104
+ .typography__xsmall_vsa37.typography__font_vsa37 {
105
105
  font-weight: 500;
106
106
  font-feature-settings: 'ss01';
107
107
  font-family: var(--font-family-styrene);
108
108
  }
109
- .typography__regular-xsmall_k7ygb {
109
+ .typography__regular-xsmall_vsa37 {
110
110
  font-size: 16px;
111
111
  line-height: 20px;
112
112
  font-weight: 400;
113
113
  font-family: var(--font-family-system);
114
114
  }
115
- .typography__regular-xsmall_k7ygb.typography__system_k7ygb {
115
+ .typography__regular-xsmall_vsa37.typography__system_vsa37 {
116
116
  font-feature-settings: 'ss01';
117
117
  font-family: var(--font-family-styrene);
118
118
  }
119
- .typography__component_k7ygb.typography__margins-xlarge_k7ygb {
119
+ .typography__component_vsa37.typography__margins-xlarge_vsa37 {
120
120
  margin: var(--gap-0) var(--gap-0) var(--gap-24);
121
121
  }
122
- .typography__component_k7ygb.typography__margins-large_k7ygb {
122
+ .typography__component_vsa37.typography__margins-large_vsa37 {
123
123
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
124
124
  }
125
- .typography__component_k7ygb.typography__margins-medium_k7ygb {
125
+ .typography__component_vsa37.typography__margins-medium_vsa37 {
126
126
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
127
127
  }
128
- .typography__component_k7ygb.typography__margins-small_k7ygb {
128
+ .typography__component_vsa37.typography__margins-small_vsa37 {
129
129
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
130
130
  }
131
- .typography__component_k7ygb .typography__margins-xsmall_k7ygb {
131
+ .typography__component_vsa37 .typography__margins-xsmall_vsa37 {
132
132
  margin: var(--gap-40) var(--gap-0) var(--gap-16);
133
133
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"xlarge":"typography__xlarge_k7ygb","font":"typography__font_k7ygb","regular-xlarge":"typography__regular-xlarge_k7ygb","system":"typography__system_k7ygb","large":"typography__large_k7ygb","regular-large":"typography__regular-large_k7ygb","medium":"typography__medium_k7ygb","regular-medium":"typography__regular-medium_k7ygb","small":"typography__small_k7ygb","regular-small":"typography__regular-small_k7ygb","xsmall":"typography__xsmall_k7ygb","regular-xsmall":"typography__regular-xsmall_k7ygb","component":"typography__component_k7ygb","margins-xlarge":"typography__margins-xlarge_k7ygb","margins-large":"typography__margins-large_k7ygb","margins-medium":"typography__margins-medium_k7ygb","margins-small":"typography__margins-small_k7ygb","margins-xsmall":"typography__margins-xsmall_k7ygb"};
3
+ const styles = {"xlarge":"typography__xlarge_vsa37","font":"typography__font_vsa37","regular-xlarge":"typography__regular-xlarge_vsa37","system":"typography__system_vsa37","large":"typography__large_vsa37","regular-large":"typography__regular-large_vsa37","medium":"typography__medium_vsa37","regular-medium":"typography__regular-medium_vsa37","small":"typography__small_vsa37","regular-small":"typography__regular-small_vsa37","xsmall":"typography__xsmall_vsa37","regular-xsmall":"typography__regular-xsmall_vsa37","component":"typography__component_vsa37","margins-xlarge":"typography__margins-xlarge_vsa37","margins-large":"typography__margins-large_vsa37","margins-medium":"typography__margins-medium_vsa37","margins-small":"typography__margins-small_vsa37","margins-xsmall":"typography__margins-xsmall_vsa37"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../src/title-mobile/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n@import '../margins.module.css';\n\n@each $view in xlarge, large, medium, small, xsmall {\n .$(view) {\n @mixin headline-system-mobile_$(view);\n\n &.font {\n @subtract-mixin headline-mobile_$(view), headline-system-mobile_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system-mobile_$(view);\n\n &.system {\n @subtract-mixin promo-mobile_$(view), promo-system-mobile_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-small;\n }\n\n &.margins-medium {\n @mixin margin-small;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n & .margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,QAAQ,CAAC,0BAA0B,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-mobile/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-mobile_$(view);\n\n &.font {\n @subtract-mixin headline-mobile_$(view), headline-system-mobile_$(view);\n }\n }\n\n .regular-$(view) {\n @mixin promo-system-mobile_$(view);\n\n &.system {\n @subtract-mixin promo-mobile_$(view), promo-system-mobile_$(view);\n }\n }\n}\n\n.component {\n &.margins-xlarge {\n @mixin margin-large;\n }\n\n &.margins-large {\n @mixin margin-small;\n }\n\n &.margins-medium {\n @mixin margin-small;\n }\n\n &.margins-small {\n @mixin margin-small;\n }\n\n & .margins-xsmall {\n @mixin margin-small;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,QAAQ,CAAC,0BAA0B,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 +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, 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":[],"mappings":";;;;;AAoBa,MAAA,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW;IAEjD,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI;AACjD,CAAC;;;;"}
1
+ {"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":[],"mappings":";;;;;AAoBO,MAAM,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,GAAG,KAAI;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IAEhE,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW;IAEjD,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GAAK,SAAS,EAAE,GAAG,EAAE,GAAG,EAAA,CAAI;AACjD,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAa,MAAA,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;;;"}
1
+ {"version":3,"file":"colors.js","sources":["../src/colors.ts"],"sourcesContent":["export const colors = [\n 'tertiary',\n 'disabled',\n 'accent',\n 'primary',\n 'attention',\n 'positive',\n 'secondary',\n 'tertiary-inverted',\n 'primary-inverted',\n 'secondary-inverted',\n 'link',\n 'negative',\n 'static-primary-light',\n 'static-secondary-light',\n 'static-tertiary-light',\n 'static-primary-dark',\n 'static-secondary-dark',\n 'static-tertiary-dark',\n 'static-accent',\n 'static-positive',\n] as const;\n\nexport type Color = (typeof colors)[number];\n"],"names":[],"mappings":"AAAO,MAAM,MAAM,GAAG;IAClB,UAAU;IACV,UAAU;IACV,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;;;"}
@@ -1 +1 @@
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 {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQa,MAAA,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;;;"}
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 {\n Text as TypographyText,\n Title as TypographyTitle,\n TitleResponsive as TypographyTitleResponsive,\n TitleMobile as TypographyTitleMobile,\n};\nexport { Text, Title as TitleDesktop, TitleResponsive, TitleMobile };\n"],"names":[],"mappings":";;;;;AAQO,MAAM,UAAU,GAKnB;IACA,KAAK;IACL,IAAI;IACJ,eAAe;IACf,WAAW;;;"}
@@ -2,6 +2,6 @@ export { Typography } from './component.js';
2
2
  export { typographyPresets } from './presets.js';
3
3
  export { Text, Text as TypographyText } from './text/component.js';
4
4
  export { Title as TitleDesktop, Title as TypographyTitle } from './title/index.js';
5
- export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
6
5
  export { TitleMobile, TitleMobile as TypographyTitleMobile } from './title-mobile/component.js';
6
+ export { TitleResponsive, TitleResponsive as TypographyTitleResponsive } from './title-responsive/component.js';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAa,MAAA,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;;;"}
1
+ {"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const typographyPresets = {\n mobile: {\n list: {\n text: {\n primary: {\n tag: 'div',\n view: 'primary-medium',\n },\n secondary: {\n tag: 'div',\n color: 'secondary',\n view: 'primary-small',\n },\n },\n },\n },\n};\n"],"names":[],"mappings":"AAAO,MAAM,iBAAiB,GAAG;AAC7B,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE;AACF,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE;AACL,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,GAAG,EAAE,KAAK;AACV,oBAAA,KAAK,EAAE,WAAW;AAClB,oBAAA,IAAI,EAAE,eAAe;AACxB,iBAAA;AACJ,aAAA;AACJ,SAAA;AACJ,KAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 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-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 * @deprecated\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\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 const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\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 },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;MAoGa,IAAI,GAAG,UAAU,CAC1B,CACI,EACI,IAAI,GAAG,gBAAgB,EACvB,GAAG,EAAE,SAAS,GAAG,MAAM,EACvB,MAAM,EACN,gBAAgB,GAAG,KAAK,EACxB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;UACvC,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;AACf,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT;gBACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;gBACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,gBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;gBACpC,CAAC,MAAM,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,gBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AACrC,aAAA,EACD,CAAC,YAAY,IAAI,SAAS,EAC1B,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,MAAM,CAAC,IAAI,CAAC,EACZ,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAC3B,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC;gBACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;aACrE,CAAC;YACF,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/text/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 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-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 * @deprecated\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\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 const { renderSkeleton, textRef } = useSkeleton(showSkeleton, skeletonProps);\n const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(styles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\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 },\n !showSkeleton && className,\n color && colors[color],\n styles[view],\n weight && styles[weight],\n )}\n data-test-id={dataTestId}\n ref={mergeRefs([ref, textRef])}\n {...restProps}\n >\n {children}\n </Component>\n {showSkeleton && (\n <div className={styles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn({\n [styles.paragraphWithMargins]: Component === 'p' && defaultMargins,\n }),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;MAoGa,IAAI,GAAG,UAAU,CAC1B,CACI,EACI,IAAI,GAAG,gBAAgB,EACvB,GAAG,EAAE,SAAS,GAAG,MAAM,EACvB,MAAM,EACN,gBAAgB,GAAG,KAAK,EACxB,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;UACvC,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;AACf,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT;gBACI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,KAAK,GAAG,IAAI,CAAC,cAAc;gBACxD,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;AAClE,gBAAA,CAAC,MAAM,CAAC,SAAS,GAAG,gBAAgB;gBACpC,CAAC,MAAM,CAAC,CAAA,QAAA,EAAW,QAAQ,EAAE,CAAC,GAAG,QAAQ;AACzC,gBAAA,CAAC,MAAM,CAAC,WAAW,GAAG,YAAY;AACrC,aAAA,EACD,CAAC,YAAY,IAAI,SAAS,EAC1B,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB,MAAM,CAAC,IAAI,CAAC,EACZ,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAC3B,EAAA,cAAA,EACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAA,EAC1B,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC;gBACjB,CAAC,MAAM,CAAC,oBAAoB,GAAG,SAAS,KAAK,GAAG,IAAI,cAAc;aACrE,CAAC;YACF,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA4FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,EACtE,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAC,CAAA,aAAA,CAAA,SAAS,EACN,EAAA,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAW,QAAA,EAAA,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;gBACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAChC,EAAA,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAW,QAAA,EAAA,IAAI,CAAE,CAAA,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../src/title/component.tsx"],"sourcesContent":["import React, { type ComponentProps, forwardRef, Fragment, 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 const Root = showSkeleton ? 'div' : Fragment;\n const rootProps: ComponentProps<typeof Root> = showSkeleton\n ? { className: cn(commonStyles.root, className) }\n : {};\n\n return (\n <Root {...rootProps}>\n <Component\n className={cn(\n commonStyles.component,\n styles.component,\n !showSkeleton && 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 {showSkeleton && (\n <div className={commonStyles.skeleton}>\n {renderSkeleton({\n wrapperClassName: cn(defaultMargins && styles[`margins-${view}`]),\n dataTestId,\n })}\n </div>\n )}\n </Root>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;AA4FO,MAAM,SAAS,GAAG,UAAU,CAC/B,CACI,EACI,GAAG,EAAE,SAAS,GAAG,KAAK,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,GAAG,SAAS,EAChB,QAAQ,EACR,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,QAAQ,CAAC,EACtE,cAAc,GAAG,KAAK,EACtB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,YAAY,EACZ,GAAG,SAAS,EACf,EACD,GAAG,KACH;AACA,IAAA,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,aAAa,CAAC;IAC5E,MAAM,IAAI,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ;IAC5C,MAAM,SAAS,GAAgC;AAC3C,UAAE,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;UAC7C,EAAE;AAER,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAA,GAAK,SAAS,EAAA;QACf,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACN,SAAS,EAAE,EAAE,CACT,YAAY,CAAC,SAAS,EACtB,MAAM,CAAC,SAAS,EAChB,CAAC,YAAY,IAAI,SAAS,EAC1B,MAAM,CAAC,CAAA,EAAG,MAAM,KAAK,SAAS,GAAG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAA,CAAE,CAAC,EAC1D,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,EAC3C,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,EACtB;gBACI,CAAC,YAAY,CAAC,CAAA,QAAA,EAAW,QAAQ,EAAE,CAAC,GAAG,QAAQ;AAC/C,gBAAA,CAAC,YAAY,CAAC,WAAW,GAAG,YAAY;gBACxC,CAAC,MAAM,CAAC,IAAI,GACR,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC;AACrE,aAAA,CACJ,kBACa,UAAU,EACxB,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,KAC1B,SAAS,EAAA,EAEZ,QAAQ,CACD;QACX,YAAY,KACT,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,YAAY,CAAC,QAAQ,EAAA,EAChC,cAAc,CAAC;YACZ,gBAAgB,EAAE,EAAE,CAAC,cAAc,IAAI,MAAM,CAAC,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE,CAAC,CAAC;YACjE,UAAU;AACb,SAAA,CAAC,CACA,CACT,CACE;AAEf,CAAC;;"}
@@ -1 +1 @@
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 styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAG,CAAA,CACxE;;;;"}
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 styles from './index.module.css';\n\nconst Title = forwardRef<HTMLHeadingElement | HTMLDivElement, TitleProps>((props, ref) => (\n <TitleBase {...props} styles={styles} ref={ref} platform='desktop' />\n));\n\nexport { Title };\nexport type { TitleProps };\n"],"names":[],"mappings":";;;;AAMA,MAAM,KAAK,GAAG,UAAU,CAAkD,CAAC,KAAK,EAAE,GAAG,MACjF,oBAAC,SAAS,EAAA,EAAA,GAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAC,SAAS,EAAA,CAAG,CACxE;;"}