@shmidko61/lc-ui-kit 0.0.1

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 (128) hide show
  1. package/README.md +38 -0
  2. package/dist/accordion/accordion-context.d.ts +3 -0
  3. package/dist/accordion/accordion-item.d.ts +48 -0
  4. package/dist/accordion/accordion-root.d.ts +5 -0
  5. package/dist/accordion/accordion.d.ts +8 -0
  6. package/dist/accordion.cjs +1 -0
  7. package/dist/accordion.js +206 -0
  8. package/dist/arrow-CS6d64Y4.cjs +1 -0
  9. package/dist/arrow-DBc2opRL.js +5 -0
  10. package/dist/box/box.d.ts +7 -0
  11. package/dist/box/box.helpers.d.ts +11 -0
  12. package/dist/box/box.types.d.ts +62 -0
  13. package/dist/box.cjs +1 -0
  14. package/dist/box.js +342 -0
  15. package/dist/button/button.d.ts +22 -0
  16. package/dist/button/button.helpers.d.ts +119 -0
  17. package/dist/button.cjs +1 -0
  18. package/dist/button.js +438 -0
  19. package/dist/design-tokens/color.tokens.d.ts +6 -0
  20. package/dist/design-tokens/typography.tokens.d.ts +9 -0
  21. package/dist/drop-down-CdIuWbLC.cjs +1 -0
  22. package/dist/drop-down-DH2_3qXq.js +5 -0
  23. package/dist/eye-open-5zYaeyLp.cjs +1 -0
  24. package/dist/eye-open-CoTSj5cT.js +5 -0
  25. package/dist/flex/flex.d.ts +5 -0
  26. package/dist/flex/flex.helpers.d.ts +9 -0
  27. package/dist/flex/flex.types.d.ts +12 -0
  28. package/dist/flex.cjs +1 -0
  29. package/dist/flex.js +128 -0
  30. package/dist/grid/grid.d.ts +25 -0
  31. package/dist/grid/grid.helpers.d.ts +13 -0
  32. package/dist/grid/grid.types.d.ts +49 -0
  33. package/dist/grid.cjs +1 -0
  34. package/dist/grid.js +103 -0
  35. package/dist/icons/icons.d.ts +30 -0
  36. package/dist/icons.cjs +1 -0
  37. package/dist/icons.js +38 -0
  38. package/dist/index.cjs +1 -0
  39. package/dist/index.d.ts +22 -0
  40. package/dist/index.js +97 -0
  41. package/dist/input/input.d.ts +49 -0
  42. package/dist/input/input.helpers.d.ts +9 -0
  43. package/dist/input.cjs +1 -0
  44. package/dist/input.js +85 -0
  45. package/dist/media-card/components/media-card-pick-indicator.d.ts +6 -0
  46. package/dist/media-card/components/media-card-preview.d.ts +7 -0
  47. package/dist/media-card/components/media-card-upload-footer.d.ts +7 -0
  48. package/dist/media-card/components/media-card-upload.d.ts +5 -0
  49. package/dist/media-card/media-card-pick.d.ts +5 -0
  50. package/dist/media-card/media-card.d.ts +4 -0
  51. package/dist/media-card/media-card.types.d.ts +10 -0
  52. package/dist/media-card.cjs +1 -0
  53. package/dist/media-card.js +104 -0
  54. package/dist/media-gallery/media-gallery.d.ts +12 -0
  55. package/dist/media-gallery/media-gallery.helpers.d.ts +27 -0
  56. package/dist/media-gallery/media-gallery.types.d.ts +59 -0
  57. package/dist/media-gallery.cjs +1 -0
  58. package/dist/media-gallery.js +100 -0
  59. package/dist/media-picture-BN4saEVT.js +6 -0
  60. package/dist/media-picture-BmERSmsd.cjs +1 -0
  61. package/dist/modal/modal.d.ts +50 -0
  62. package/dist/modal.cjs +1 -0
  63. package/dist/modal.js +143 -0
  64. package/dist/pagination/pagination.d.ts +22 -0
  65. package/dist/pagination.cjs +1 -0
  66. package/dist/pagination.js +155 -0
  67. package/dist/picture/picture.d.ts +12 -0
  68. package/dist/picture/picture.helpers.d.ts +9 -0
  69. package/dist/picture/picture.types.d.ts +56 -0
  70. package/dist/picture.cjs +1 -0
  71. package/dist/picture.js +55 -0
  72. package/dist/responsive-style.config-B2m9jVlX.cjs +1 -0
  73. package/dist/responsive-style.config-DFuATrIM.js +19 -0
  74. package/dist/responsive-style.utils-BdyoDkKg.cjs +1 -0
  75. package/dist/responsive-style.utils-D10sC561.js +25 -0
  76. package/dist/select/select.d.ts +55 -0
  77. package/dist/select/select.helpers.d.ts +14 -0
  78. package/dist/select/select.types.d.ts +12 -0
  79. package/dist/select.cjs +1 -0
  80. package/dist/select.js +179 -0
  81. package/dist/shared/lib/cn.d.ts +2 -0
  82. package/dist/shared/responsive-style/responsive-style.config.d.ts +20 -0
  83. package/dist/shared/responsive-style/responsive-style.types.d.ts +52 -0
  84. package/dist/shared/responsive-style/responsive-style.utils.d.ts +17 -0
  85. package/dist/status-badge/status-badge.d.ts +11 -0
  86. package/dist/status-badge.cjs +1 -0
  87. package/dist/status-badge.js +39 -0
  88. package/dist/styles.css +1 -0
  89. package/dist/switch/switch.d.ts +34 -0
  90. package/dist/switch.cjs +1 -0
  91. package/dist/switch.js +127 -0
  92. package/dist/table/data-table.d.ts +3 -0
  93. package/dist/table/table-container.d.ts +8 -0
  94. package/dist/table/table-primitives.d.ts +40 -0
  95. package/dist/table/table-status.d.ts +12 -0
  96. package/dist/table/table.d.ts +8 -0
  97. package/dist/table/table.types.d.ts +48 -0
  98. package/dist/table-container-BsE-uIE1.js +242 -0
  99. package/dist/table-container-DqqqkChm.cjs +1 -0
  100. package/dist/table.cjs +1 -0
  101. package/dist/table.js +16 -0
  102. package/dist/telephone-DVftjRG9.cjs +1 -0
  103. package/dist/telephone-DvXakgBQ.js +26 -0
  104. package/dist/time-clock-DOwPzcx7.cjs +1 -0
  105. package/dist/time-clock-DjqcZ8tI.js +5 -0
  106. package/dist/types/flex.types.d.ts +25 -0
  107. package/dist/types/index.d.ts +7 -0
  108. package/dist/types/interaction.types.d.ts +8 -0
  109. package/dist/types/layout.types.d.ts +52 -0
  110. package/dist/types/shared.types.d.ts +8 -0
  111. package/dist/types/spacing.types.d.ts +123 -0
  112. package/dist/types/typography.types.d.ts +75 -0
  113. package/dist/types/visual.types.d.ts +82 -0
  114. package/dist/types.cjs +1 -0
  115. package/dist/types.js +1 -0
  116. package/dist/typography/typography.d.ts +39 -0
  117. package/dist/typography/typography.helpers.d.ts +237 -0
  118. package/dist/typography.cjs +1 -0
  119. package/dist/typography.js +469 -0
  120. package/dist/ui-kit-provider/ui-kit-provider.d.ts +53 -0
  121. package/dist/ui-kit-provider-C6Mk5g_7.js +167 -0
  122. package/dist/ui-kit-provider-raEFsUm0.cjs +1 -0
  123. package/dist/ui-kit-provider.cjs +1 -0
  124. package/dist/ui-kit-provider.js +8 -0
  125. package/dist/vite.config.d.ts +2 -0
  126. package/dist/x-mark-DId-ylR6.cjs +1 -0
  127. package/dist/x-mark-WU1eT82T.js +5 -0
  128. package/package.json +219 -0
@@ -0,0 +1,123 @@
1
+ import { AtLeastOne } from './shared.types';
2
+ /**
3
+ * Значение внутреннего/внешнего отступа из рекомендованной шкалы.
4
+ *
5
+ * Пример: `16` сериализуется в `16px`. Тип также допускает любое число,
6
+ * поэтому шкала является рекомендованной, а не строгой.
7
+ */
8
+ export type UiKitIndentations = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 80 | 96 | number;
9
+ /**
10
+ * Значение внешнего отступа. `auto` полезен для центрирования через `mx`.
11
+ */
12
+ export type UiKitMarginIndentation = UiKitIndentations | 'auto';
13
+ /**
14
+ * CSS shorthand для padding: `[top, right, bottom, left]`.
15
+ *
16
+ * Пример: `p={[8, 16, 24, 16]}`.
17
+ */
18
+ export type UiKitArrayIndentation = [
19
+ UiKitIndentations,
20
+ UiKitIndentations,
21
+ UiKitIndentations,
22
+ UiKitIndentations
23
+ ];
24
+ /**
25
+ * CSS shorthand для margin: `[top, right, bottom, left]`.
26
+ *
27
+ * Пример: `m={[8, 'auto', 24, 'auto']}`.
28
+ */
29
+ export type UiKitMarginArrayIndentation = [
30
+ UiKitMarginIndentation,
31
+ UiKitMarginIndentation,
32
+ UiKitMarginIndentation,
33
+ UiKitMarginIndentation
34
+ ];
35
+ /**
36
+ * Padding по осям.
37
+ *
38
+ * Пример: `p={{ px: 24, py: 16 }}`.
39
+ */
40
+ export type UiKitAxisIndentationPadding = AtLeastOne<{
41
+ px?: UiKitIndentations;
42
+ py?: UiKitIndentations;
43
+ }>;
44
+ /**
45
+ * Горизонтальный padding с точечным переопределением top/bottom.
46
+ *
47
+ * Пример: `p={{ px: 24, pt: 12, pb: 40 }}`.
48
+ */
49
+ export type UiKitMixedXAxisIndentationPadding = {
50
+ px: UiKitMarginIndentation;
51
+ pt?: UiKitMarginIndentation;
52
+ pb?: UiKitMarginIndentation;
53
+ };
54
+ /**
55
+ * Вертикальный padding с точечным переопределением left/right.
56
+ *
57
+ * Пример: `p={{ py: 16, pl: 24 }}`.
58
+ */
59
+ export type UiKitMixedYAxisIndentationPadding = {
60
+ py: UiKitMarginIndentation;
61
+ pl?: UiKitMarginIndentation;
62
+ pr?: UiKitMarginIndentation;
63
+ };
64
+ /**
65
+ * Горизонтальный margin с точечным переопределением top/bottom.
66
+ *
67
+ * Пример: `m={{ mx: 'auto', mt: 24 }}`.
68
+ */
69
+ export type UiKitMixedXAxisIndentationMargin = {
70
+ mx: UiKitMarginIndentation;
71
+ mt?: UiKitMarginIndentation;
72
+ mb?: UiKitMarginIndentation;
73
+ };
74
+ /**
75
+ * Вертикальный margin с точечным переопределением left/right.
76
+ *
77
+ * Пример: `m={{ my: 16, ml: 24 }}`.
78
+ */
79
+ export type UiKitMixedYAxisIndentationMargin = {
80
+ my: UiKitMarginIndentation;
81
+ ml?: UiKitMarginIndentation;
82
+ mr?: UiKitMarginIndentation;
83
+ };
84
+ /**
85
+ * Margin по осям.
86
+ *
87
+ * Пример: `m={{ mx: 'auto', my: 24 }}`.
88
+ */
89
+ export type UiKitAxisIndentationMargin = AtLeastOne<{
90
+ mx?: UiKitMarginIndentation;
91
+ my?: UiKitMarginIndentation;
92
+ }>;
93
+ /**
94
+ * Padding по отдельным сторонам.
95
+ *
96
+ * Пример: `p={{ pt: 8, pr: 16, pb: 24, pl: 16 }}`.
97
+ */
98
+ export type UiKitAnyIndentationPadding = AtLeastOne<{
99
+ pt?: UiKitIndentations;
100
+ pb?: UiKitIndentations;
101
+ pr?: UiKitIndentations;
102
+ pl?: UiKitIndentations;
103
+ }>;
104
+ /**
105
+ * Margin по отдельным сторонам.
106
+ *
107
+ * Пример: `m={{ mt: 8, mb: 24 }}`.
108
+ */
109
+ export type UiKitAnyIndentationMargin = AtLeastOne<{
110
+ mt?: UiKitMarginIndentation;
111
+ mb?: UiKitMarginIndentation;
112
+ mr?: UiKitMarginIndentation;
113
+ ml?: UiKitMarginIndentation;
114
+ }>;
115
+ /**
116
+ * Интерфейс описывает внешние и внутренние отступы.
117
+ *
118
+ * Пример: `<Box p={{ px: 24, py: 16 }} m={{ mx: 'auto' }} />`.
119
+ */
120
+ export type UiKitIndentationsProps = {
121
+ p?: UiKitIndentations | UiKitArrayIndentation | UiKitAxisIndentationPadding | UiKitAnyIndentationPadding | UiKitMixedXAxisIndentationPadding | UiKitMixedYAxisIndentationPadding;
122
+ m?: UiKitMarginIndentation | UiKitMarginArrayIndentation | UiKitAxisIndentationMargin | UiKitAnyIndentationMargin | UiKitMixedXAxisIndentationMargin | UiKitMixedYAxisIndentationMargin;
123
+ };
@@ -0,0 +1,75 @@
1
+ import { TypographyFontSizeToken, TypographyFontWeightToken, TypographyLineHeightToken } from '../typography/typography.helpers';
2
+ import { UiKitDimensionProps } from './layout.types';
3
+ import { UiKitIndentationsProps } from './spacing.types';
4
+ import { UiKitColorToken } from './visual.types';
5
+ /**
6
+ * Значение размера шрифта для props `fontSize`.
7
+ *
8
+ * Пример: `fontSize="--typo-fs-b2-md"` или `fontSize={16}`.
9
+ */
10
+ export type TypographyFontSizeValue = TypographyFontSizeToken | (string & {}) | number;
11
+ /**
12
+ * Значение насыщенности шрифта для props `fontWeight`.
13
+ *
14
+ * Пример: `fontWeight="--typo-fw-b2-md"` или `fontWeight={600}`.
15
+ */
16
+ export type TypographyFontWeightValue = TypographyFontWeightToken | (string & {}) | number;
17
+ /**
18
+ * Значение высоты строки для props `lineHeight`.
19
+ *
20
+ * Пример: `lineHeight="--typo-lh-b2-md"` или `lineHeight="140%"`.
21
+ */
22
+ export type TypographyLineHeightValue = TypographyLineHeightToken | (string & {}) | number;
23
+ /**
24
+ * Значение цвета для props `color`.
25
+ *
26
+ * Пример: `color="--color-text-primary"` или `color="#152237"`.
27
+ */
28
+ export type TypographyColorValue = UiKitColorToken | (string & {});
29
+ export type FontSizeKeys = TypographyFontSizeToken;
30
+ export type FontWeightKeys = TypographyFontWeightToken;
31
+ export type LineHeightKeys = TypographyLineHeightToken;
32
+ export type FontFamilyToken = '--font-family-primary' | '--font-family-secondary';
33
+ export type FontFamilyKeys = FontFamilyToken | (string & {});
34
+ export type TypographyVerticalAlignValue = 'top' | 'middle' | 'bottom';
35
+ export type TypographyHorizontalAlignValue = 'left' | 'center' | 'right';
36
+ export type TypographyTextTransformValue = 'uppercase' | 'lowercase' | 'capitalize' | 'normal-case';
37
+ export type TypographyTextDecorationValue = 'underline' | 'line-through' | 'overline' | 'no-underline';
38
+ export type TypographyTextOverflowValue = 'ellipsis' | 'clip';
39
+ export type TypographyWhiteSpaceValue = 'nowrap' | 'pre' | 'pre-line' | 'pre-wrap' | 'break-spaces';
40
+ export type TypographyWordBreakValue = 'all' | 'word' | 'keep' | 'normal';
41
+ export type TypographyFontFamilyValue = FontFamilyKeys;
42
+ /**
43
+ * Типографические props, которые настраивают Typography без ручной работы
44
+ * с внутренними CSS-переменными.
45
+ *
46
+ * Пример: `<Typography fontSize={16} fontWeight={600} color="--color-text-primary" />`.
47
+ */
48
+ export type UiKitTypographyProps = UiKitDimensionProps & UiKitIndentationsProps & {
49
+ /** Color: токен `--color-*` или конкретное CSS-значение. */
50
+ color?: TypographyColorValue;
51
+ /** Font-size: токен `--typo-fs-*` или конкретное CSS-значение. */
52
+ fontSize?: TypographyFontSizeValue;
53
+ /** Font-weight: токен `--typo-fw-*` или конкретное CSS-значение. */
54
+ fontWeight?: TypographyFontWeightValue;
55
+ /** Line-height: токен `--typo-lh-*` или конкретное CSS-значение. */
56
+ lineHeight?: TypographyLineHeightValue;
57
+ /** Вертикальное выравнивание inline/inline-block текста. */
58
+ verticalAlign?: TypographyVerticalAlignValue;
59
+ /** Горизонтальное выравнивание текста. */
60
+ horizontalAlign?: TypographyHorizontalAlignValue;
61
+ /** Трансформация регистра текста. */
62
+ textTransform?: TypographyTextTransformValue;
63
+ /** Декоративная линия текста. */
64
+ textDecoration?: TypographyTextDecorationValue;
65
+ /** Поведение переполнения текста. */
66
+ textOverflow?: TypographyTextOverflowValue;
67
+ /** Управление пробелами и переносами. */
68
+ whiteSpace?: TypographyWhiteSpaceValue;
69
+ /** Правила разрыва слов. */
70
+ wordBreak?: TypographyWordBreakValue;
71
+ /** Курсивное начертание. */
72
+ italic?: boolean;
73
+ /** Font-family: CSS-значение или токен/переменная проекта. */
74
+ fontFamily?: TypographyFontFamilyValue;
75
+ };
@@ -0,0 +1,82 @@
1
+ import { uiKitColorTokens } from '../design-tokens/color.tokens';
2
+ /**
3
+ * Цветовой токен дизайн-системы.
4
+ *
5
+ * Пример: `--color-primary-accent`.
6
+ */
7
+ export type UiKitColorToken = (typeof uiKitColorTokens)[number];
8
+ /**
9
+ * Карта переопределений цветовых токенов.
10
+ *
11
+ * Пример: `{ '--color-primary-accent': '#0070f3' }`.
12
+ */
13
+ export type UiKitColors = Partial<Record<UiKitColorToken, string>>;
14
+ export type ColorKeys = UiKitColorToken;
15
+ /**
16
+ * CSS background/color value: токен `--color-*` или конкретное CSS-значение.
17
+ *
18
+ * Пример: `--color-background-subtle`, `#fff`, `linear-gradient(...)`.
19
+ */
20
+ export type UiKitBackgroundValue = ColorKeys | (string & {});
21
+ export type UiKitBackgroundSizeValue = 'cover' | 'contain' | 'auto' | number | string;
22
+ export type UiKitBackgroundRepeatValue = 'no-repeat' | 'repeat' | 'repeat-x' | 'repeat-y' | 'repeat-round' | 'repeat-space';
23
+ export type UiKitBackgroundPositionValue = 'bottom' | 'center' | 'left' | 'right' | 'top' | 'left-bottom' | 'left-top' | 'right-bottom' | 'right-top';
24
+ /**
25
+ * Управляет background-свойствами элемента.
26
+ *
27
+ * Пример: `<Box bg="--color-background-subtle" bgSize="cover" />`.
28
+ */
29
+ export type UiKitBackgroundProps = {
30
+ /** Background shorthand или цвет: токен `--color-*` или конкретное CSS-значение. */
31
+ bg?: UiKitBackgroundValue;
32
+ /** Background-size. Число приводится к пикселям. */
33
+ bgSize?: UiKitBackgroundSizeValue;
34
+ /** Background-repeat. */
35
+ bgRepeat?: UiKitBackgroundRepeatValue;
36
+ /** Background при hover ближайшего `groupParent`. */
37
+ bgGroup?: UiKitBackgroundValue;
38
+ /** Background-position. */
39
+ bgPosition?: UiKitBackgroundPositionValue;
40
+ /** Делает элемент parent-группой для `bgGroup` дочерних Box. */
41
+ groupParent?: boolean;
42
+ };
43
+ export type BorderWidthItem = string;
44
+ export type BorderRadiusKeys = `--radius-${string}` | `--border-radius-${string}`;
45
+ export type BorderRadiusItem = string | BorderRadiusKeys;
46
+ export type BorderRadiusSides = {
47
+ topLeft?: BorderRadiusItem;
48
+ topRight?: BorderRadiusItem;
49
+ bottomLeft?: BorderRadiusItem;
50
+ bottomRight?: BorderRadiusItem;
51
+ };
52
+ export type BorderWidthSides = {
53
+ top?: BorderWidthItem;
54
+ bottom?: BorderWidthItem;
55
+ left?: BorderWidthItem;
56
+ right?: BorderWidthItem;
57
+ };
58
+ export type UiKitBorderRadius = BorderRadiusItem | BorderRadiusSides;
59
+ export type UiKitBorderColor = ColorKeys | (string & {});
60
+ export type UiKitBorderWidth = BorderWidthItem | BorderWidthSides;
61
+ /**
62
+ * Управляет border элемента.
63
+ *
64
+ * Пример: `<Box border={{ width: '1px', style: 'solid', color: '--color-primary-accent' }} />`.
65
+ */
66
+ export type UiKitBorderProps = {
67
+ radius?: UiKitBorderRadius;
68
+ color?: UiKitBorderColor;
69
+ width?: UiKitBorderWidth;
70
+ style?: 'solid' | 'dashed' | 'dotted' | 'double' | 'hidden' | 'none';
71
+ };
72
+ /**
73
+ * Управляет outline элемента.
74
+ *
75
+ * Пример: `<Box outlineStyle="solid" outlineWidth="2px" outlineColor="--color-primary-accent" />`.
76
+ */
77
+ export type UiKitOutlineProps = {
78
+ outlineColor?: ColorKeys | string;
79
+ outlineWidth?: string;
80
+ outlineOffset?: string;
81
+ outlineStyle?: 'none' | 'solid' | 'dashed' | 'dotted' | 'double';
82
+ };
package/dist/types.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,39 @@
1
+ import { ComponentPropsWithoutRef, ElementType, JSX, ReactNode } from 'react';
2
+ import { typographyVariants, ResponsiveTypographyStyleProps, TypographyVariant } from './typography.helpers';
3
+ /**
4
+ * Собственные props Typography поверх props выбранного HTML-элемента.
5
+
6
+ * Помимо обычного `className` и `style`, компонент принимает короткие типографические props
7
+ * (`color`, `fontSize`, `fontWeight`, `lineHeight` и другие)
8
+ * и их responsive overrides (`md`, `lg`, `xl`).
9
+ *
10
+ * Важно для разработчика и ИИ: Typography не принимает карты токенов `colors`,
11
+ * `typography`, `vars`. Для переопределения токенов дизайн-системы используйте
12
+ * UiKitProvider, а здесь передавайте только значение конкретного текстового свойства
13
+ * или ссылку на токен.
14
+ */
15
+ type TypographyOwnProps<TElement extends ElementType> = {
16
+ /** HTML-тег или React-компонент, которым будет отрендерен текст. */
17
+ as?: TElement;
18
+ /** Содержимое текстового элемента. */
19
+ children?: ReactNode;
20
+ /** Дополнительные классы поверх классов варианта. */
21
+ className?: string;
22
+ /** Типографический вариант, который задает font-size, font-weight и line-height токенами. */
23
+ variant?: TypographyVariant;
24
+ } & ResponsiveTypographyStyleProps;
25
+ /**
26
+ * Полный тип props Typography.
27
+ * Тип сохраняет props конкретного элемента из `as`, но исключает поля, которыми
28
+ * Typography управляет самостоятельно.
29
+ */
30
+ export type TypographyProps<TElement extends ElementType = 'p'> = TypographyOwnProps<TElement> & Omit<ComponentPropsWithoutRef<TElement>, keyof TypographyOwnProps<TElement>>;
31
+ /**
32
+ * Типографический компонент ui-kit.
33
+ *
34
+ * Компонент выбирает набор токенов по `variant`, сливает его с пользовательскими
35
+ * responsive props и формирует Tailwind-классы с inline CSS variables. Такой подход
36
+ * сохраняет типизацию props и позволяет переопределять токены на SSR/runtime-данных.
37
+ */
38
+ export declare function Typography<TElement extends ElementType = 'p'>({ as, children, className, color, fontSize, fontWeight, lineHeight, verticalAlign, horizontalAlign, textTransform, textDecoration, textOverflow, whiteSpace, wordBreak, italic, fontFamily, width, minWidth, maxWidth, height, minHeight, maxHeight, p, m, md, lg, xl, style, variant, ...props }: TypographyProps<TElement>): JSX.Element;
39
+ export { typographyVariants };
@@ -0,0 +1,237 @@
1
+ import { CSSProperties } from 'react';
2
+ import { UiKitTypographyToken } from '../design-tokens/typography.tokens';
3
+ import { UiKitTypographyProps } from '../types';
4
+ import { CssVariableMap, ResponsiveStyleBreakpoint, ResponsiveUiKitStyleProps } from '../shared/responsive-style/responsive-style.types';
5
+ /**
6
+ * Токены размера шрифта, которые Typography может подключить к внутренним CSS-переменным.
7
+ */
8
+ export type TypographyFontSizeToken = Extract<UiKitTypographyToken, `--typo-fs-${string}`>;
9
+ /**
10
+ * Токены насыщенности шрифта, которые Typography может подключить к внутренним CSS-переменным.
11
+ */
12
+ export type TypographyFontWeightToken = Extract<UiKitTypographyToken, `--typo-fw-${string}`>;
13
+ /**
14
+ * Токены высоты строки, которые Typography может подключить к внутренним CSS-переменным.
15
+ */
16
+ export type TypographyLineHeightToken = Extract<UiKitTypographyToken, `--typo-lh-${string}`>;
17
+ /**
18
+ * Responsive-набор props для Typography на конкретном брейкпоинте.
19
+ *
20
+ * Важно для разработчика и ИИ: намеренно не расширяем этот тип через UiKitStyleProps.
21
+ * Typography отвечает только за настройки конкретного текстового элемента.
22
+ * Переопределением карт токенов (`colors`, `typography`, `vars`) должен заниматься
23
+ * отдельный UiKitProvider, чтобы ответственность не расползалась по UI-компонентам.
24
+ */
25
+ export type TypographyBreakpointStyleProps = UiKitTypographyProps;
26
+ /**
27
+ * Responsive style API Typography.
28
+ *
29
+ * На верхнем уровне задаётся base/sm состояние, в `md`, `lg`, `xl` передаются
30
+ * overrides только для конкретного текстового элемента.
31
+ *
32
+ * Важно для разработчика и ИИ: не добавлять сюда `colors`, `typography`, `vars`.
33
+ * Если нужно переопределить токены дизайн-системы для группы компонентов, используйте
34
+ * UiKitProvider. Typography может только сослаться на токен или raw CSS-значение
35
+ * через `color`, `fontSize`, `fontWeight`, `lineHeight` и остальные typography props.
36
+ */
37
+ export type ResponsiveTypographyStyleProps = UiKitTypographyProps & Partial<Record<ResponsiveStyleBreakpoint, TypographyBreakpointStyleProps>>;
38
+ /**
39
+ * Набор типографических токенов для одного брейкпоинта.
40
+ *
41
+ * Компонент не хранит конкретные px/% значения внутри варианта, а ссылается на токены
42
+ * дизайн-системы. Благодаря этому значения можно переопределять через UiKitProvider,
43
+ * SSR-пропсы или локальные responsive props.
44
+ */
45
+ interface TypographyTokenSet {
46
+ fontSize: TypographyFontSizeToken;
47
+ fontWeight: TypographyFontWeightToken;
48
+ lineHeight: TypographyLineHeightToken;
49
+ }
50
+ /**
51
+ * Описание варианта Typography.
52
+ *
53
+ * `base` применяется с мобильного/дефолтного разрешения, `md` и `lg` добавляют
54
+ * responsive-переопределения через CSS-переменные. `className` нужен для поведения,
55
+ * которое нельзя выразить токенами, например uppercase у caption-caps.
56
+ */
57
+ export interface TypographyVariantDefinition {
58
+ base: TypographyTokenSet;
59
+ className?: string;
60
+ lg?: TypographyTokenSet;
61
+ md?: TypographyTokenSet;
62
+ }
63
+ /**
64
+ * Базовый набор классов Typography.
65
+ *
66
+ * Здесь описана только механика рендера текста: значения берутся из внутренних
67
+ * переменных `--typography-*`, а сами переменные подставляются из выбранного
68
+ * варианта и пользовательских responsive props.
69
+ */
70
+ export declare const TYPOGRAPHY_BASE_CLASS_NAME = "text-[length:var(--typography-font-size)] font-[var(--typography-font-weight)] leading-[var(--typography-line-height)] text-[var(--typography-color,var(--color-text-primary))] tracking-[var(--typography-letter-spacing)] [font-family:var(--typography-font-family,var(--font-family))] [font-style:var(--typography-font-style)] [height:var(--typography-height)] [margin-bottom:var(--typography-margin-bottom,0)] [margin-left:var(--typography-margin-left,0)] [margin-right:var(--typography-margin-right,0)] [margin-top:var(--typography-margin-top,0)] [max-height:var(--typography-max-height)] [max-width:var(--typography-max-width)] [min-height:var(--typography-min-height)] [min-width:var(--typography-min-width)] [padding-bottom:var(--typography-padding-bottom,0)] [padding-left:var(--typography-padding-left,0)] [padding-right:var(--typography-padding-right,0)] [padding-top:var(--typography-padding-top,0)] [text-align:var(--typography-text-align)] [text-decoration:var(--typography-text-decoration)] [text-overflow:var(--typography-text-overflow)] [text-transform:var(--typography-text-transform)] [vertical-align:var(--typography-vertical-align)] [white-space:var(--typography-white-space)] [width:var(--typography-width)] [word-break:var(--typography-word-break)]";
71
+ export type TypographyTailwindClassNamePlan = {
72
+ className: string;
73
+ style: CSSProperties | undefined;
74
+ };
75
+ /** Формирует responsive Tailwind utilities и inline-переменные без runtime CSS. */
76
+ export declare function buildTypographyTailwindClassNamePlan(props: ResponsiveUiKitStyleProps): TypographyTailwindClassNamePlan;
77
+ /**
78
+ * Карта вариантов Typography и их связка с токенами дизайн-системы.
79
+ *
80
+ * Алиасы `sh` и `caption-caps` сохранены для обратной совместимости с текущими
81
+ * компонентами и stories. Новые места лучше привязывать к семантическим вариантам
82
+ * `h1`, `h2`, `h3`, `h4`, `b1`, `b2`, `b3`, `caption`.
83
+ */
84
+ export declare const typographyVariantTokens: {
85
+ readonly h1: {
86
+ readonly base: {
87
+ readonly fontSize: "--typo-fs-h1-sm";
88
+ readonly fontWeight: "--typo-fw-h1-sm";
89
+ readonly lineHeight: "--typo-lh-h1-sm";
90
+ };
91
+ readonly md: {
92
+ readonly fontSize: "--typo-fs-h1-md";
93
+ readonly fontWeight: "--typo-fw-h1-md";
94
+ readonly lineHeight: "--typo-lh-h1-md";
95
+ };
96
+ readonly lg: {
97
+ readonly fontSize: "--typo-fs-h1-lg";
98
+ readonly fontWeight: "--typo-fw-h1-lg";
99
+ readonly lineHeight: "--typo-lh-h1-lg";
100
+ };
101
+ };
102
+ readonly h2: {
103
+ readonly base: {
104
+ readonly fontSize: "--typo-fs-h2-md";
105
+ readonly fontWeight: "--typo-fw-h2-md";
106
+ readonly lineHeight: "--typo-lh-h2-md";
107
+ };
108
+ readonly lg: {
109
+ readonly fontSize: "--typo-fs-h2-lg";
110
+ readonly fontWeight: "--typo-fw-h2-lg";
111
+ readonly lineHeight: "--typo-lh-h2-lg";
112
+ };
113
+ };
114
+ readonly h3: {
115
+ readonly base: {
116
+ readonly fontSize: "--typo-fs-h3-md";
117
+ readonly fontWeight: "--typo-fw-h3-md";
118
+ readonly lineHeight: "--typo-lh-h3-md";
119
+ };
120
+ readonly md: {
121
+ readonly fontSize: "--typo-fs-h3-lg";
122
+ readonly fontWeight: "--typo-fw-h3-lg";
123
+ readonly lineHeight: "--typo-lh-h3-lg";
124
+ };
125
+ };
126
+ readonly h4: {
127
+ readonly base: {
128
+ readonly fontSize: "--typo-fs-h4-md";
129
+ readonly fontWeight: "--typo-fw-h4-md";
130
+ readonly lineHeight: "--typo-lh-h4-md";
131
+ };
132
+ readonly lg: {
133
+ readonly fontSize: "--typo-fs-h4-lg";
134
+ readonly fontWeight: "--typo-fw-h4-lg";
135
+ readonly lineHeight: "--typo-lh-h4-lg";
136
+ };
137
+ };
138
+ readonly sh: {
139
+ readonly base: {
140
+ readonly fontSize: "--typo-fs-h4-lg";
141
+ readonly fontWeight: "--typo-fw-h4-lg";
142
+ readonly lineHeight: "--typo-lh-h4-lg";
143
+ };
144
+ };
145
+ readonly b1: {
146
+ readonly base: {
147
+ readonly fontSize: "--typo-fs-b1-md";
148
+ readonly fontWeight: "--typo-fw-b1-md";
149
+ readonly lineHeight: "--typo-lh-b1-md";
150
+ };
151
+ readonly lg: {
152
+ readonly fontSize: "--typo-fs-b1-lg";
153
+ readonly fontWeight: "--typo-fw-b1-lg";
154
+ readonly lineHeight: "--typo-lh-b1-lg";
155
+ };
156
+ };
157
+ readonly b2: {
158
+ readonly base: {
159
+ readonly fontSize: "--typo-fs-b2-md";
160
+ readonly fontWeight: "--typo-fw-b2-md";
161
+ readonly lineHeight: "--typo-lh-b2-md";
162
+ };
163
+ readonly lg: {
164
+ readonly fontSize: "--typo-fs-b2-lg";
165
+ readonly fontWeight: "--typo-fw-b2-lg";
166
+ readonly lineHeight: "--typo-lh-b2-lg";
167
+ };
168
+ };
169
+ readonly b3: {
170
+ readonly base: {
171
+ readonly fontSize: "--typo-fs-b3-md";
172
+ readonly fontWeight: "--typo-fw-b3-md";
173
+ readonly lineHeight: "--typo-lh-b3-md";
174
+ };
175
+ readonly lg: {
176
+ readonly fontSize: "--typo-fs-b3-lg";
177
+ readonly fontWeight: "--typo-fw-b3-lg";
178
+ readonly lineHeight: "--typo-lh-b3-lg";
179
+ };
180
+ };
181
+ readonly caption: {
182
+ readonly base: {
183
+ readonly fontSize: "--typo-fs-caption-lg";
184
+ readonly fontWeight: "--typo-fw-caption-lg";
185
+ readonly lineHeight: "--typo-lh-caption-lg";
186
+ };
187
+ };
188
+ readonly 'caption-caps': {
189
+ readonly base: {
190
+ readonly fontSize: "--typo-fs-caption-lg";
191
+ readonly fontWeight: "--typo-fw-caption-lg";
192
+ readonly lineHeight: "--typo-lh-caption-lg";
193
+ };
194
+ readonly className: "uppercase";
195
+ };
196
+ };
197
+ /**
198
+ * Публичный список доступных вариантов Typography, полученный из карты токенов.
199
+ */
200
+ export type TypographyVariant = keyof typeof typographyVariantTokens;
201
+ /**
202
+ * Собирает классы Typography без рендера компонента.
203
+ *
204
+ * Удобно для случаев, когда нужен тот же визуальный стиль на составном или внешнем
205
+ * элементе, но сам компонент Typography использовать нельзя.
206
+ */
207
+ export declare function typographyVariants({ className, variant, }?: {
208
+ className?: string;
209
+ variant?: TypographyVariant;
210
+ }): string;
211
+ /**
212
+ * Преобразует описание варианта в responsive style props.
213
+ *
214
+ * На выходе получается тот же формат, который принимают UiKitProvider и UI-компоненты:
215
+ * base-значения попадают в `vars`, а брейкпоинты в `md`/`lg`. Затем эти props можно
216
+ * слить с пользовательскими overrides через `mergeResponsiveStyleProps`.
217
+ */
218
+ export declare function getTypographyVariantStyleProps(definition: TypographyVariantDefinition): ResponsiveUiKitStyleProps;
219
+ /**
220
+ * Преобразует typography props в responsive style props.
221
+ *
222
+ * Этот helper нужен, чтобы публичный API Typography оставался типизированным и
223
+ * удобным, но внутри продолжал работать через тот же механизм CSS-переменных,
224
+ * что и UiKitProvider.
225
+ */
226
+ export declare function getTypographyStyleOverrideProps({ color, fontSize, fontWeight, lineHeight, verticalAlign, horizontalAlign, textTransform, textDecoration, textOverflow, whiteSpace, wordBreak, italic, fontFamily, width, minWidth, maxWidth, height, minHeight, maxHeight, p, m, md, lg, xl, }: ResponsiveTypographyStyleProps): ResponsiveUiKitStyleProps;
227
+ /**
228
+ * Удаляет из responsive-слоёв варианта переменные, которые уже были заданы
229
+ * пользовательскими props. Иначе дефолтный `variant="b2"` может вернуть свои
230
+ * значения на `lg` и перебить ручной `fontSize`/`md.fontSize`.
231
+ */
232
+ export declare function omitVariantStylePropsOverriddenByUserProps(variantProps: ResponsiveUiKitStyleProps, userProps: ResponsiveUiKitStyleProps): ResponsiveUiKitStyleProps;
233
+ /**
234
+ * Мапит короткие props одного состояния в CSS-переменные Typography.
235
+ */
236
+ export declare function getTypographyStyleOverrideVars({ color, fontSize, fontWeight, lineHeight, verticalAlign, horizontalAlign, textTransform, textDecoration, textOverflow, whiteSpace, wordBreak, italic, fontFamily, width, minWidth, maxWidth, height, minHeight, maxHeight, p, m, }: UiKitTypographyProps): CssVariableMap | undefined;
237
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react/jsx-runtime"),O=require("./responsive-style.config-B2m9jVlX.cjs"),H=require("./responsive-style.utils-BdyoDkKg.cjs"),C="text-[length:var(--typography-font-size)] font-[var(--typography-font-weight)] leading-[var(--typography-line-height)] text-[var(--typography-color,var(--color-text-primary))] tracking-[var(--typography-letter-spacing)] [font-family:var(--typography-font-family,var(--font-family))] [font-style:var(--typography-font-style)] [height:var(--typography-height)] [margin-bottom:var(--typography-margin-bottom,0)] [margin-left:var(--typography-margin-left,0)] [margin-right:var(--typography-margin-right,0)] [margin-top:var(--typography-margin-top,0)] [max-height:var(--typography-max-height)] [max-width:var(--typography-max-width)] [min-height:var(--typography-min-height)] [min-width:var(--typography-min-width)] [padding-bottom:var(--typography-padding-bottom,0)] [padding-left:var(--typography-padding-left,0)] [padding-right:var(--typography-padding-right,0)] [padding-top:var(--typography-padding-top,0)] [text-align:var(--typography-text-align)] [text-decoration:var(--typography-text-decoration)] [text-overflow:var(--typography-text-overflow)] [text-transform:var(--typography-text-transform)] [vertical-align:var(--typography-vertical-align)] [white-space:var(--typography-white-space)] [width:var(--typography-width)] [word-break:var(--typography-word-break)]",o={color:"--typography-color",fontSize:"--typography-font-size",fontFamily:"--typography-font-family",fontStyle:"--typography-font-style",fontWeight:"--typography-font-weight",height:"--typography-height",letterSpacing:"--typography-letter-spacing",lineHeight:"--typography-line-height",marginBottom:"--typography-margin-bottom",marginLeft:"--typography-margin-left",marginRight:"--typography-margin-right",marginTop:"--typography-margin-top",maxHeight:"--typography-max-height",maxWidth:"--typography-max-width",minHeight:"--typography-min-height",minWidth:"--typography-min-width",paddingBottom:"--typography-padding-bottom",paddingLeft:"--typography-padding-left",paddingRight:"--typography-padding-right",paddingTop:"--typography-padding-top",textAlign:"--typography-text-align",textDecoration:"--typography-text-decoration",textOverflow:"--typography-text-overflow",textTransform:"--typography-text-transform",verticalAlign:"--typography-vertical-align",whiteSpace:"--typography-white-space",width:"--typography-width",wordBreak:"--typography-word-break"},U={[o.color]:"color",[o.fontSize]:"font-size",[o.fontFamily]:"font-family",[o.fontStyle]:"font-style",[o.fontWeight]:"font-weight",[o.height]:"height",[o.letterSpacing]:"letter-spacing",[o.lineHeight]:"line-height",[o.marginBottom]:"margin-bottom",[o.marginLeft]:"margin-left",[o.marginRight]:"margin-right",[o.marginTop]:"margin-top",[o.maxHeight]:"max-height",[o.maxWidth]:"max-width",[o.minHeight]:"min-height",[o.minWidth]:"min-width",[o.paddingBottom]:"padding-bottom",[o.paddingLeft]:"padding-left",[o.paddingRight]:"padding-right",[o.paddingTop]:"padding-top",[o.textAlign]:"text-align",[o.textDecoration]:"text-decoration",[o.textOverflow]:"text-overflow",[o.textTransform]:"text-transform",[o.verticalAlign]:"vertical-align",[o.whiteSpace]:"white-space",[o.width]:"width",[o.wordBreak]:"word-break"};function J(t){const e=[],i={...t.vars??{}};for(const a of O.responsiveBreakpoints)for(const[n,p]of Object.entries(t[a]?.vars??{})){const h=U[n];if(!h||p===void 0||p===null)continue;const g=`--${a}-${n.slice(2)}`;i[g]=p,e.push(`${a}:[${h}:var(${g})]`)}return{className:e.join(" "),style:Object.keys(i).length>0?i:void 0}}const _={h1:{base:{fontSize:"--typo-fs-h1-sm",fontWeight:"--typo-fw-h1-sm",lineHeight:"--typo-lh-h1-sm"},md:{fontSize:"--typo-fs-h1-md",fontWeight:"--typo-fw-h1-md",lineHeight:"--typo-lh-h1-md"},lg:{fontSize:"--typo-fs-h1-lg",fontWeight:"--typo-fw-h1-lg",lineHeight:"--typo-lh-h1-lg"}},h2:{base:{fontSize:"--typo-fs-h2-md",fontWeight:"--typo-fw-h2-md",lineHeight:"--typo-lh-h2-md"},lg:{fontSize:"--typo-fs-h2-lg",fontWeight:"--typo-fw-h2-lg",lineHeight:"--typo-lh-h2-lg"}},h3:{base:{fontSize:"--typo-fs-h3-md",fontWeight:"--typo-fw-h3-md",lineHeight:"--typo-lh-h3-md"},md:{fontSize:"--typo-fs-h3-lg",fontWeight:"--typo-fw-h3-lg",lineHeight:"--typo-lh-h3-lg"}},h4:{base:{fontSize:"--typo-fs-h4-md",fontWeight:"--typo-fw-h4-md",lineHeight:"--typo-lh-h4-md"},lg:{fontSize:"--typo-fs-h4-lg",fontWeight:"--typo-fw-h4-lg",lineHeight:"--typo-lh-h4-lg"}},sh:{base:{fontSize:"--typo-fs-h4-lg",fontWeight:"--typo-fw-h4-lg",lineHeight:"--typo-lh-h4-lg"}},b1:{base:{fontSize:"--typo-fs-b1-md",fontWeight:"--typo-fw-b1-md",lineHeight:"--typo-lh-b1-md"},lg:{fontSize:"--typo-fs-b1-lg",fontWeight:"--typo-fw-b1-lg",lineHeight:"--typo-lh-b1-lg"}},b2:{base:{fontSize:"--typo-fs-b2-md",fontWeight:"--typo-fw-b2-md",lineHeight:"--typo-lh-b2-md"},lg:{fontSize:"--typo-fs-b2-lg",fontWeight:"--typo-fw-b2-lg",lineHeight:"--typo-lh-b2-lg"}},b3:{base:{fontSize:"--typo-fs-b3-md",fontWeight:"--typo-fw-b3-md",lineHeight:"--typo-lh-b3-md"},lg:{fontSize:"--typo-fs-b3-lg",fontWeight:"--typo-fw-b3-lg",lineHeight:"--typo-lh-b3-lg"}},caption:{base:{fontSize:"--typo-fs-caption-lg",fontWeight:"--typo-fw-caption-lg",lineHeight:"--typo-lh-caption-lg"}},"caption-caps":{base:{fontSize:"--typo-fs-caption-lg",fontWeight:"--typo-fw-caption-lg",lineHeight:"--typo-lh-caption-lg"},className:"uppercase"}};function K({className:t,variant:e="b2"}={}){const i=_[e];return O.cn(C,i.className,t)}function Q(t){return{vars:A(t.base),md:t.md?{vars:A(t.md)}:void 0,lg:t.lg?{vars:A(t.lg)}:void 0}}function X({color:t,fontSize:e,fontWeight:i,lineHeight:a,verticalAlign:n,horizontalAlign:p,textTransform:h,textDecoration:g,textOverflow:y,whiteSpace:d,wordBreak:m,italic:c,fontFamily:v,width:b,minWidth:u,maxWidth:w,height:S,minHeight:x,maxHeight:z,p:W,m:k,md:r,lg:s,xl:f}){return{vars:P({color:t,fontSize:e,fontWeight:i,lineHeight:a,verticalAlign:n,horizontalAlign:p,textTransform:h,textDecoration:g,textOverflow:y,whiteSpace:d,wordBreak:m,italic:c,fontFamily:v,width:b,minWidth:u,maxWidth:w,height:S,minHeight:x,maxHeight:z,p:W,m:k}),md:r?{vars:P(r)}:void 0,lg:s?{vars:P(s)}:void 0,xl:f?{vars:P(f)}:void 0}}function Z(t,e){const i=new Set(Object.keys(e.vars??{})),a={colors:t.colors,typography:t.typography,vars:t.vars};for(const n of O.responsiveBreakpoints){for(const y of Object.keys(e[n]?.vars??{}))i.add(y);const p=t[n];if(!p)continue;const h=Object.fromEntries(Object.entries(p.vars??{}).filter(([y])=>!i.has(y))),g={colors:p.colors,typography:p.typography,vars:Object.keys(h).length>0?h:void 0};(g.colors||g.typography||g.vars)&&(a[n]=g)}return a}function A(t){return{[o.fontSize]:`var(${t.fontSize})`,[o.fontWeight]:`var(${t.fontWeight})`,[o.letterSpacing]:0,[o.lineHeight]:`var(${t.lineHeight})`}}function P({color:t,fontSize:e,fontWeight:i,lineHeight:a,verticalAlign:n,horizontalAlign:p,textTransform:h,textDecoration:g,textOverflow:y,whiteSpace:d,wordBreak:m,italic:c,fontFamily:v,width:b,minWidth:u,maxWidth:w,height:S,minHeight:x,maxHeight:z,p:W,m:k}){const r={},s=e,f=i,V=a;return t!==void 0&&(r[o.color]=H.normalizeCssTokenValue(t)),s!==void 0&&(r[o.fontSize]=H.normalizeCssTokenValue(s)),f!==void 0&&(r[o.fontWeight]=H.normalizeCssTokenValue(f)),V!==void 0&&(r[o.lineHeight]=H.normalizeCssTokenValue(V)),n!==void 0&&(r[o.verticalAlign]=n),p!==void 0&&(r[o.textAlign]=p),h!==void 0&&(r[o.textTransform]=it(h)),g!==void 0&&(r[o.textDecoration]=rt(g)),y!==void 0&&(r[o.textOverflow]=y),d!==void 0&&(r[o.whiteSpace]=d),m!==void 0&&(r[o.wordBreak]=nt(m)),c!==void 0&&(r[o.fontStyle]=c?"italic":"normal"),v!==void 0&&(r[o.fontFamily]=H.normalizeCssTokenValue(v)),b!==void 0&&(r[o.width]=T(b)),u!==void 0&&(r[o.minWidth]=T(u)),w!==void 0&&(r[o.maxWidth]=T(w)),S!==void 0&&(r[o.height]=T(S)),x!==void 0&&(r[o.minHeight]=T(x)),z!==void 0&&(r[o.maxHeight]=T(z)),Object.assign(r,tt({p:W,m:k})),Object.keys(r).length>0?r:void 0}function T(t){return typeof t=="number"?`${t}px`:t}function tt({p:t,m:e}){const i={},a=ot(t),n=et(e);return a.top!==void 0&&(i[o.paddingTop]=l(a.top)),a.right!==void 0&&(i[o.paddingRight]=l(a.right)),a.bottom!==void 0&&(i[o.paddingBottom]=l(a.bottom)),a.left!==void 0&&(i[o.paddingLeft]=l(a.left)),n.top!==void 0&&(i[o.marginTop]=l(n.top)),n.right!==void 0&&(i[o.marginRight]=l(n.right)),n.bottom!==void 0&&(i[o.marginBottom]=l(n.bottom)),n.left!==void 0&&(i[o.marginLeft]=l(n.left)),i}function ot(t){if(t===void 0)return{};if(Array.isArray(t)){const[i,a,n,p]=t;return{top:i,right:a,bottom:n,left:p}}if(typeof t!="object")return{top:t,right:t,bottom:t,left:t};const e=t;return{top:e.py??e.pt,right:e.px??e.pr,bottom:e.py??e.pb,left:e.px??e.pl}}function et(t){if(t===void 0)return{};if(Array.isArray(t)){const[i,a,n,p]=t;return{top:i,right:a,bottom:n,left:p}}if(typeof t!="object")return{top:t,right:t,bottom:t,left:t};const e=t;return{top:e.my??e.mt,right:e.mx??e.mr,bottom:e.my??e.mb,left:e.mx??e.ml}}function l(t){return typeof t=="number"?`${t}px`:t}function it(t){return t==="normal-case"?"none":t}function rt(t){return t==="no-underline"?"none":t}function nt(t){return{all:"break-all",keep:"keep-all",normal:"normal",word:"break-word"}[t]}function at({as:t,children:e,className:i,color:a,fontSize:n,fontWeight:p,lineHeight:h,verticalAlign:g,horizontalAlign:y,textTransform:d,textDecoration:m,textOverflow:c,whiteSpace:v,wordBreak:b,italic:u,fontFamily:w,width:S,minWidth:x,maxWidth:z,height:W,minHeight:k,maxHeight:r,p:s,m:f,md:V,lg:$,xl:L,style:B,variant:Y="b2",...D}){const E=t??"p",j=_[Y],F=Q(j),N=X({color:a,fontSize:n,fontWeight:p,lineHeight:h,verticalAlign:g,horizontalAlign:y,textTransform:d,textDecoration:m,textOverflow:c,whiteSpace:v,wordBreak:b,italic:u,fontFamily:w,width:S,minWidth:x,maxWidth:z,height:W,minHeight:k,maxHeight:r,p:s,m:f,md:V,lg:$,xl:L}),q=Z(F,N),G=H.mergeResponsiveStyleProps(q,N),R=J(G),I=R.style||B?{...R.style,...B}:void 0;return M.jsx(E,{className:O.cn(C,j.className,R.className,i),style:I,...D,children:e})}exports.Typography=at;exports.typographyVariants=K;