@ozen-ui/kit 0.64.0 → 0.65.0

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 (187) hide show
  1. package/ChipGroup/package.json +5 -0
  2. package/Title/package.json +5 -0
  3. package/__inner__/cjs/components/ChipGroup/ChipGroup.css +16 -0
  4. package/__inner__/cjs/components/ChipGroup/ChipGroup.d.ts +4 -0
  5. package/__inner__/cjs/components/ChipGroup/ChipGroup.js +52 -0
  6. package/__inner__/cjs/components/ChipGroup/ChipGroupContext.d.ts +10 -0
  7. package/__inner__/cjs/components/ChipGroup/ChipGroupContext.js +5 -0
  8. package/__inner__/cjs/components/ChipGroup/constants.d.ts +5 -0
  9. package/__inner__/cjs/components/ChipGroup/constants.js +6 -0
  10. package/__inner__/cjs/components/ChipGroup/index.d.ts +2 -0
  11. package/__inner__/cjs/components/ChipGroup/index.js +5 -0
  12. package/__inner__/cjs/components/ChipGroup/types.d.ts +33 -0
  13. package/__inner__/cjs/components/ChipGroup/types.js +2 -0
  14. package/__inner__/cjs/components/ChipNext/Chip.css +50 -17
  15. package/__inner__/cjs/components/ChipNext/Chip.js +32 -5
  16. package/__inner__/cjs/components/ChipNext/types.d.ts +9 -5
  17. package/__inner__/cjs/components/ChipNext/types.js +9 -2
  18. package/__inner__/cjs/components/FormGroup/types.d.ts +2 -0
  19. package/__inner__/cjs/components/FormTitle/FormTitle.d.ts +1 -0
  20. package/__inner__/cjs/components/IconButtonNext/types.d.ts +4 -1
  21. package/__inner__/cjs/components/IconButtonNext/utils.d.ts +2 -2
  22. package/__inner__/cjs/components/InputOTP/constants.d.ts +1 -1
  23. package/__inner__/cjs/components/TagNext/types.d.ts +1 -1
  24. package/__inner__/cjs/components/TagNext/types.js +1 -0
  25. package/__inner__/cjs/components/ThemeProvider/types.d.ts +6 -2
  26. package/__inner__/cjs/components/Title/Title.d.ts +4 -0
  27. package/__inner__/cjs/components/Title/Title.js +27 -0
  28. package/__inner__/cjs/components/Title/TitleContext.d.ts +8 -0
  29. package/__inner__/cjs/components/Title/TitleContext.js +17 -0
  30. package/__inner__/cjs/components/Title/components/index.d.ts +1 -0
  31. package/__inner__/cjs/components/Title/components/index.js +4 -0
  32. package/__inner__/cjs/components/Title/components/variant/TitleVariant.d.ts +2 -0
  33. package/__inner__/cjs/components/Title/components/variant/TitleVariant.js +24 -0
  34. package/__inner__/cjs/components/Title/components/variant/index.d.ts +4 -0
  35. package/__inner__/cjs/components/Title/components/variant/index.js +7 -0
  36. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.css +38 -0
  37. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.d.ts +4 -0
  38. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.js +35 -0
  39. package/__inner__/cjs/components/Title/components/variant/main/config.d.ts +3 -0
  40. package/__inner__/cjs/components/Title/components/variant/main/config.js +7 -0
  41. package/__inner__/cjs/components/Title/components/variant/main/index.d.ts +2 -0
  42. package/__inner__/cjs/components/Title/components/variant/main/index.js +5 -0
  43. package/__inner__/cjs/components/Title/components/variant/main/types.d.ts +13 -0
  44. package/__inner__/cjs/components/Title/components/variant/main/types.js +2 -0
  45. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
  46. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
  47. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.js +15 -0
  48. package/__inner__/cjs/components/Title/components/variant/secondary/index.d.ts +2 -0
  49. package/__inner__/cjs/components/Title/components/variant/secondary/index.js +5 -0
  50. package/__inner__/cjs/components/Title/components/variant/secondary/types.d.ts +10 -0
  51. package/__inner__/cjs/components/Title/components/variant/secondary/types.js +2 -0
  52. package/__inner__/cjs/components/Title/components/variant/types.d.ts +8 -0
  53. package/__inner__/cjs/components/Title/components/variant/types.js +2 -0
  54. package/__inner__/cjs/components/Title/constants.d.ts +4 -0
  55. package/__inner__/cjs/components/Title/constants.js +6 -0
  56. package/__inner__/cjs/components/Title/entities/icon.d.ts +3 -0
  57. package/__inner__/cjs/components/Title/entities/icon.js +2 -0
  58. package/__inner__/cjs/components/Title/entities/index.d.ts +3 -0
  59. package/__inner__/cjs/components/Title/entities/index.js +6 -0
  60. package/__inner__/cjs/components/Title/entities/size.d.ts +2 -0
  61. package/__inner__/cjs/components/Title/entities/size.js +4 -0
  62. package/__inner__/cjs/components/Title/entities/variant.d.ts +7 -0
  63. package/__inner__/cjs/components/Title/entities/variant.js +4 -0
  64. package/__inner__/cjs/components/Title/index.d.ts +4 -0
  65. package/__inner__/cjs/components/Title/index.js +7 -0
  66. package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
  67. package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.js +16 -0
  68. package/__inner__/cjs/components/Title/modules/icon-button/constants.d.ts +1 -0
  69. package/__inner__/cjs/components/Title/modules/icon-button/constants.js +4 -0
  70. package/__inner__/cjs/components/Title/modules/icon-button/index.d.ts +2 -0
  71. package/__inner__/cjs/components/Title/modules/icon-button/index.js +5 -0
  72. package/__inner__/cjs/components/Title/modules/icon-button/types.d.ts +6 -0
  73. package/__inner__/cjs/components/Title/modules/icon-button/types.js +2 -0
  74. package/__inner__/cjs/components/Title/modules/index.d.ts +2 -0
  75. package/__inner__/cjs/components/Title/modules/index.js +5 -0
  76. package/__inner__/cjs/components/Title/modules/tag/TitleTag.css +4 -0
  77. package/__inner__/cjs/components/Title/modules/tag/TitleTag.d.ts +3 -0
  78. package/__inner__/cjs/components/Title/modules/tag/TitleTag.js +11 -0
  79. package/__inner__/cjs/components/Title/modules/tag/constants.d.ts +1 -0
  80. package/__inner__/cjs/components/Title/modules/tag/constants.js +4 -0
  81. package/__inner__/cjs/components/Title/modules/tag/index.d.ts +2 -0
  82. package/__inner__/cjs/components/Title/modules/tag/index.js +5 -0
  83. package/__inner__/cjs/components/Title/modules/tag/types.d.ts +6 -0
  84. package/__inner__/cjs/components/Title/modules/tag/types.js +2 -0
  85. package/__inner__/cjs/components/Title/types.d.ts +10 -0
  86. package/__inner__/cjs/components/Title/types.js +2 -0
  87. package/__inner__/cjs/constants/environment/index.d.ts +2 -0
  88. package/__inner__/cjs/constants/environment/index.js +5 -0
  89. package/__inner__/cjs/constants/environment/isDev.d.ts +1 -0
  90. package/__inner__/cjs/constants/environment/isDev.js +5 -0
  91. package/__inner__/cjs/constants/environment/isProduction.d.ts +1 -0
  92. package/__inner__/cjs/constants/environment/isProduction.js +4 -0
  93. package/__inner__/cjs/types/object/withPartial.d.ts +3 -0
  94. package/__inner__/cjs/types/object/withPartial.js +2 -0
  95. package/__inner__/esm/components/ChipGroup/ChipGroup.css +16 -0
  96. package/__inner__/esm/components/ChipGroup/ChipGroup.d.ts +4 -0
  97. package/__inner__/esm/components/ChipGroup/ChipGroup.js +49 -0
  98. package/__inner__/esm/components/ChipGroup/ChipGroupContext.d.ts +10 -0
  99. package/__inner__/esm/components/ChipGroup/ChipGroupContext.js +2 -0
  100. package/__inner__/esm/components/ChipGroup/constants.d.ts +5 -0
  101. package/__inner__/esm/components/ChipGroup/constants.js +3 -0
  102. package/__inner__/esm/components/ChipGroup/index.d.ts +2 -0
  103. package/__inner__/esm/components/ChipGroup/index.js +2 -0
  104. package/__inner__/esm/components/ChipGroup/types.d.ts +33 -0
  105. package/__inner__/esm/components/ChipGroup/types.js +1 -0
  106. package/__inner__/esm/components/ChipNext/Chip.css +50 -17
  107. package/__inner__/esm/components/ChipNext/Chip.js +32 -5
  108. package/__inner__/esm/components/ChipNext/types.d.ts +9 -5
  109. package/__inner__/esm/components/ChipNext/types.js +8 -1
  110. package/__inner__/esm/components/FormGroup/types.d.ts +2 -0
  111. package/__inner__/esm/components/FormTitle/FormTitle.d.ts +1 -0
  112. package/__inner__/esm/components/IconButtonNext/types.d.ts +4 -1
  113. package/__inner__/esm/components/IconButtonNext/utils.d.ts +2 -2
  114. package/__inner__/esm/components/InputOTP/constants.d.ts +1 -1
  115. package/__inner__/esm/components/TagNext/types.d.ts +1 -1
  116. package/__inner__/esm/components/TagNext/types.js +1 -0
  117. package/__inner__/esm/components/ThemeProvider/types.d.ts +6 -2
  118. package/__inner__/esm/components/Title/Title.d.ts +4 -0
  119. package/__inner__/esm/components/Title/Title.js +24 -0
  120. package/__inner__/esm/components/Title/TitleContext.d.ts +8 -0
  121. package/__inner__/esm/components/Title/TitleContext.js +12 -0
  122. package/__inner__/esm/components/Title/components/index.d.ts +1 -0
  123. package/__inner__/esm/components/Title/components/index.js +1 -0
  124. package/__inner__/esm/components/Title/components/variant/TitleVariant.d.ts +2 -0
  125. package/__inner__/esm/components/Title/components/variant/TitleVariant.js +21 -0
  126. package/__inner__/esm/components/Title/components/variant/index.d.ts +4 -0
  127. package/__inner__/esm/components/Title/components/variant/index.js +4 -0
  128. package/__inner__/esm/components/Title/components/variant/main/TitleMain.css +38 -0
  129. package/__inner__/esm/components/Title/components/variant/main/TitleMain.d.ts +4 -0
  130. package/__inner__/esm/components/Title/components/variant/main/TitleMain.js +32 -0
  131. package/__inner__/esm/components/Title/components/variant/main/config.d.ts +3 -0
  132. package/__inner__/esm/components/Title/components/variant/main/config.js +4 -0
  133. package/__inner__/esm/components/Title/components/variant/main/index.d.ts +2 -0
  134. package/__inner__/esm/components/Title/components/variant/main/index.js +2 -0
  135. package/__inner__/esm/components/Title/components/variant/main/types.d.ts +13 -0
  136. package/__inner__/esm/components/Title/components/variant/main/types.js +1 -0
  137. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
  138. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
  139. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.js +12 -0
  140. package/__inner__/esm/components/Title/components/variant/secondary/index.d.ts +2 -0
  141. package/__inner__/esm/components/Title/components/variant/secondary/index.js +2 -0
  142. package/__inner__/esm/components/Title/components/variant/secondary/types.d.ts +10 -0
  143. package/__inner__/esm/components/Title/components/variant/secondary/types.js +1 -0
  144. package/__inner__/esm/components/Title/components/variant/types.d.ts +8 -0
  145. package/__inner__/esm/components/Title/components/variant/types.js +1 -0
  146. package/__inner__/esm/components/Title/constants.d.ts +4 -0
  147. package/__inner__/esm/components/Title/constants.js +3 -0
  148. package/__inner__/esm/components/Title/entities/icon.d.ts +3 -0
  149. package/__inner__/esm/components/Title/entities/icon.js +1 -0
  150. package/__inner__/esm/components/Title/entities/index.d.ts +3 -0
  151. package/__inner__/esm/components/Title/entities/index.js +3 -0
  152. package/__inner__/esm/components/Title/entities/size.d.ts +2 -0
  153. package/__inner__/esm/components/Title/entities/size.js +1 -0
  154. package/__inner__/esm/components/Title/entities/variant.d.ts +7 -0
  155. package/__inner__/esm/components/Title/entities/variant.js +1 -0
  156. package/__inner__/esm/components/Title/index.d.ts +4 -0
  157. package/__inner__/esm/components/Title/index.js +4 -0
  158. package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
  159. package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.js +13 -0
  160. package/__inner__/esm/components/Title/modules/icon-button/constants.d.ts +1 -0
  161. package/__inner__/esm/components/Title/modules/icon-button/constants.js +1 -0
  162. package/__inner__/esm/components/Title/modules/icon-button/index.d.ts +2 -0
  163. package/__inner__/esm/components/Title/modules/icon-button/index.js +2 -0
  164. package/__inner__/esm/components/Title/modules/icon-button/types.d.ts +6 -0
  165. package/__inner__/esm/components/Title/modules/icon-button/types.js +1 -0
  166. package/__inner__/esm/components/Title/modules/index.d.ts +2 -0
  167. package/__inner__/esm/components/Title/modules/index.js +2 -0
  168. package/__inner__/esm/components/Title/modules/tag/TitleTag.css +4 -0
  169. package/__inner__/esm/components/Title/modules/tag/TitleTag.d.ts +3 -0
  170. package/__inner__/esm/components/Title/modules/tag/TitleTag.js +8 -0
  171. package/__inner__/esm/components/Title/modules/tag/constants.d.ts +1 -0
  172. package/__inner__/esm/components/Title/modules/tag/constants.js +1 -0
  173. package/__inner__/esm/components/Title/modules/tag/index.d.ts +2 -0
  174. package/__inner__/esm/components/Title/modules/tag/index.js +2 -0
  175. package/__inner__/esm/components/Title/modules/tag/types.d.ts +6 -0
  176. package/__inner__/esm/components/Title/modules/tag/types.js +1 -0
  177. package/__inner__/esm/components/Title/types.d.ts +10 -0
  178. package/__inner__/esm/components/Title/types.js +1 -0
  179. package/__inner__/esm/constants/environment/index.d.ts +2 -0
  180. package/__inner__/esm/constants/environment/index.js +2 -0
  181. package/__inner__/esm/constants/environment/isDev.d.ts +1 -0
  182. package/__inner__/esm/constants/environment/isDev.js +2 -0
  183. package/__inner__/esm/constants/environment/isProduction.d.ts +1 -0
  184. package/__inner__/esm/constants/environment/isProduction.js +1 -0
  185. package/__inner__/esm/types/object/withPartial.d.ts +3 -0
  186. package/__inner__/esm/types/object/withPartial.js +1 -0
  187. package/package.json +4 -4
@@ -0,0 +1,33 @@
1
+ import type { ElementType, MouseEvent, ReactNode } from 'react';
2
+ import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
3
+ import type { ChipColorVariant, ChipSizeVariant } from '../ChipNext';
4
+ import type { FormGroupDirectionVariant, FormGroupProps } from '../FormGroup';
5
+ import type { FormTitleProps } from '../FormTitle';
6
+ import type { CHIP_GROUP_DEFAULT_AS } from './constants';
7
+ export type ChipGroupValue = string[];
8
+ export type ChipGroupOnChange = (value: ChipGroupValue, event: MouseEvent<HTMLElement>) => void;
9
+ export type ChipGroupBaseProps = {
10
+ /** Значение по умолчанию (неконтролируемое состояние) */
11
+ defaultValue?: ChipGroupValue;
12
+ /** Текущее значение */
13
+ value?: ChipGroupValue;
14
+ /** Вариант представления компонента */
15
+ color?: ChipColorVariant;
16
+ /** Размер */
17
+ size?: ChipSizeVariant;
18
+ /** Содержимое компонента */
19
+ children?: ReactNode;
20
+ /** Направление */
21
+ direction?: FormGroupDirectionVariant;
22
+ /** Событие изменения состояния */
23
+ onChange?: ChipGroupOnChange;
24
+ /** Если `true` делает элементы неактивными */
25
+ disabled?: boolean;
26
+ /** Идентификатор компонента для тестов */
27
+ 'data-testid'?: string;
28
+ /** Свойства FormTitle */
29
+ titleProps?: FormTitleProps;
30
+ /** Свойства FormGroup */
31
+ groupProps?: FormGroupProps;
32
+ };
33
+ export type ChipGroupProps<As extends ElementType = typeof CHIP_GROUP_DEFAULT_AS> = PolymorphicComponentPropsWithoutRef<ChipGroupBaseProps, As>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  /* stylelint-disable */
2
2
  .ChipNext {
3
+ --chip-outline: var(--shadow-outline-focused);
3
4
  --chip-border-radius: 24px;
4
5
  --chip-text-wrap: nowrap;
5
6
  background-color: var(--chip-bg-color);
@@ -72,17 +73,53 @@
72
73
  --chip-padding-x: var(--spacing-m);
73
74
  }
74
75
  .ChipNext_color_primary {
75
- --chip-bg-color: var(--color-background-action-light);
76
- --chip-bg-color-hover: var(--color-background-action-light-hover);
77
- --chip-bg-color-active: var(--color-background-action-light-pressed);
78
- --chip-text-color: var(--color-content-action-dark);
79
- }
76
+ --chip-bg-color: var(--color-background-action-light);
77
+ --chip-bg-color-hover: var(--color-background-action-light-hover);
78
+ --chip-bg-color-active: var(--color-background-action-light-pressed);
79
+ --chip-text-color: var(--color-content-action-dark);
80
+ }
80
81
  .ChipNext_color_secondary {
81
- --chip-bg-color: var(--color-background-secondary);
82
- --chip-bg-color-hover: var(--color-background-secondary-hover);
83
- --chip-bg-color-active: var(--color-background-secondary-pressed);
84
- --chip-text-color: var(--color-content-primary);
85
- }
82
+ --chip-bg-color: var(--color-background-secondary);
83
+ --chip-bg-color-hover: var(--color-background-secondary-hover);
84
+ --chip-bg-color-active: var(--color-background-secondary-pressed);
85
+ --chip-text-color: var(--color-content-primary);
86
+ }
87
+ .ChipNext_color_main {
88
+ --chip-bg-color: var(--color-background-main);
89
+ --chip-bg-color-hover: var(--color-background-main-hover);
90
+ --chip-bg-color-active: var(--color-background-main-pressed);
91
+ --chip-text-color: var(--color-content-primary);
92
+ }
93
+ .ChipNext_color_overlay {
94
+ --chip-bg-color: var(--color-background-overlay);
95
+ --chip-bg-color-hover: var(--color-background-overlay);
96
+ --chip-bg-color-active: var(--color-background-overlay);
97
+ --chip-text-color: var(--color-content-action-on);
98
+ }
99
+ .ChipNext_color_primary.ChipNext_checked {
100
+ --chip-bg-color: var(--color-background-action);
101
+ --chip-bg-color-hover: var(--color-background-action);
102
+ --chip-bg-color-active: var(--color-background-action);
103
+ --chip-text-color: var(--color-content-action-on);
104
+ }
105
+ .ChipNext_color_primary.ChipNext_checked.ChipNext_disabled {
106
+ --chip-bg-color: var(--color-background-action-active-disabled);
107
+ --chip-bg-color-hover: var(--color-background-action-active-disabled);
108
+ --chip-bg-color-active: var(--color-background-action-active-disabled);
109
+ --chip-text-color: var(--color-content-primary-inverse);
110
+ }
111
+ .ChipNext_color_secondary.ChipNext_checked, .ChipNext_color_main.ChipNext_checked, .ChipNext_color_overlay.ChipNext_checked {
112
+ --chip-bg-color: var(--color-background-action-secondary);
113
+ --chip-bg-color-hover: var(--color-background-action-secondary);
114
+ --chip-bg-color-active: var(--color-background-action-secondary);
115
+ --chip-text-color: var(--color-content-action-on);
116
+ }
117
+ .ChipNext_color_secondary.ChipNext_checked.ChipNext_disabled, .ChipNext_color_main.ChipNext_checked.ChipNext_disabled, .ChipNext_color_overlay.ChipNext_checked.ChipNext_disabled {
118
+ --chip-bg-color: var(--color-background-action-secondary-active-disabled);
119
+ --chip-bg-color-hover: var(--color-background-action-secondary-active-disabled);
120
+ --chip-bg-color-active: var(--color-background-action-secondary-active-disabled);
121
+ --chip-text-color: var(--color-content-primary-inverse);
122
+ }
86
123
  .ChipNext:hover {
87
124
  --chip-bg-color: var(--chip-bg-color-hover);
88
125
  }
@@ -90,19 +127,15 @@
90
127
  --chip-bg-color: var(--chip-bg-color-active);
91
128
  }
92
129
  .ChipNext:focus {
93
- box-shadow: var(--shadow-outline-focused);
130
+ box-shadow: var(--chip-outline);
94
131
  }
95
132
  .ChipNext:focus:not(:focus-visible) {
96
133
  box-shadow: none;
97
134
  }
98
- .ChipNext_checked,
99
- .ChipNext_checked:hover,
100
- .ChipNext_checked:active {
101
- --chip-bg-color: var(--color-background-action);
102
- --chip-text-color: var(--color-content-action-on);
103
- }
104
135
  .ChipNext_disabled {
105
136
  --chip-bg-color: var(--color-background-disabled);
137
+ --chip-bg-color-hover: var(--color-background-disabled);
138
+ --chip-bg-color-active: var(--color-background-disabled);
106
139
  --chip-text-color: var(--color-content-disabled);
107
140
  pointer-events: none;
108
141
  }
@@ -1,18 +1,43 @@
1
1
  import { __assign, __read, __rest } from "tslib";
2
2
  import './Chip.css';
3
- import React from 'react';
3
+ import React, { useContext } from 'react';
4
+ import { logger } from '@ozen-ui/logger';
5
+ import { IS_DEV } from '../../constants/environment';
4
6
  import { useControlled } from '../../hooks/useControlled';
5
7
  import { useThemeProps } from '../../hooks/useThemeProps';
6
8
  import { cn } from '../../utils/classname';
7
9
  import { getIconSizeToFormElement } from '../../utils/getIconSizeToFormElement';
8
10
  import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
9
11
  import { renderContent } from '../../utils/renderContent';
12
+ import { ChipGroupContext } from '../ChipGroup/ChipGroupContext';
10
13
  import { CHIP_DEFAULT_TAG, CHIP_DEFAULT_SIZE, CHIP_DEFAULT_VARIANT, CHIP_DEFAULT_DISABLED, } from './constants';
11
14
  export var cnChip = cn('ChipNext');
12
15
  export var Chip = polymorphicComponentWithRef(function (inProps, ref) {
13
- var _a = useThemeProps({ name: 'ChipNext', props: inProps }), _b = _a.size, size = _b === void 0 ? CHIP_DEFAULT_SIZE : _b, _c = _a.color, color = _c === void 0 ? CHIP_DEFAULT_VARIANT : _c, _d = _a.disabled, disabled = _d === void 0 ? CHIP_DEFAULT_DISABLED : _d, iconLeft = _a.iconLeft, iconRight = _a.iconRight, multiline = _a.multiline, className = _a.className, children = _a.children, onClick = _a.onClick, checkedProp = _a.checked, _e = _a.as, Tag = _e === void 0 ? CHIP_DEFAULT_TAG : _e, dataTestId = _a["data-testid"], other = __rest(_a, ["size", "color", "disabled", "iconLeft", "iconRight", "multiline", "className", "children", "onClick", "checked", "as", 'data-testid']);
16
+ var _a = useThemeProps({ name: 'ChipNext', props: inProps }), _b = _a.size, sizeProp = _b === void 0 ? CHIP_DEFAULT_SIZE : _b, _c = _a.color, colorProp = _c === void 0 ? CHIP_DEFAULT_VARIANT : _c, _d = _a.disabled, disabledProp = _d === void 0 ? CHIP_DEFAULT_DISABLED : _d, iconLeft = _a.iconLeft, iconRight = _a.iconRight, multiline = _a.multiline, className = _a.className, children = _a.children, onClick = _a.onClick, checkedProp = _a.checked, _e = _a.as, Tag = _e === void 0 ? CHIP_DEFAULT_TAG : _e, value = _a.value, dataTestId = _a["data-testid"], other = __rest(_a, ["size", "color", "disabled", "iconLeft", "iconRight", "multiline", "className", "children", "onClick", "checked", "as", "value", 'data-testid']);
17
+ var checked = checkedProp;
18
+ var size = sizeProp;
19
+ var disabled = disabledProp;
20
+ var color = colorProp;
21
+ var chipGroup = useContext(ChipGroupContext);
22
+ if (chipGroup) {
23
+ if (IS_DEV && value === undefined) {
24
+ logger.error('Отсутствует параметр "value" для Chip, находящегося в ChipGroup.');
25
+ }
26
+ if (checked === undefined && chipGroup.value) {
27
+ checked = chipGroup === null || chipGroup === void 0 ? void 0 : chipGroup.value.includes(value);
28
+ }
29
+ if (inProps.size === undefined && chipGroup.size) {
30
+ size = chipGroup.size;
31
+ }
32
+ if (inProps.disabled === undefined && chipGroup.disabled !== undefined) {
33
+ disabled = chipGroup.disabled;
34
+ }
35
+ if (inProps.color === undefined && chipGroup.color) {
36
+ color = chipGroup.color;
37
+ }
38
+ }
14
39
  var _f = __read(useControlled({
15
- value: checkedProp,
40
+ value: checked,
16
41
  defaultValue: false,
17
42
  name: 'ChipNext',
18
43
  state: 'open',
@@ -21,8 +46,10 @@ export var Chip = polymorphicComponentWithRef(function (inProps, ref) {
21
46
  if (disabled) {
22
47
  return;
23
48
  }
24
- setCheckedState(!checkedState);
25
- onClick === null || onClick === void 0 ? void 0 : onClick(event, { checked: !checkedState });
49
+ var newCheckedState = !checkedState;
50
+ setCheckedState(newCheckedState);
51
+ onClick === null || onClick === void 0 ? void 0 : onClick(event, { checked: newCheckedState, value: value });
52
+ chipGroup === null || chipGroup === void 0 ? void 0 : chipGroup.onClick(event, { checked: newCheckedState, value: value });
26
53
  };
27
54
  var renderIcon = function (content) {
28
55
  return renderContent({
@@ -3,11 +3,15 @@ import type { IconProps } from '@ozen-ui/icons';
3
3
  import type { PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
4
4
  import type { RenderContentType } from '../../utils/renderContent';
5
5
  import type { CHIP_DEFAULT_TAG } from './constants';
6
+ export declare const chipColorVariant: readonly ["primary", "secondary", "main", "overlay"];
7
+ export type ChipColorVariant = (typeof chipColorVariant)[number];
6
8
  export declare const chipSizeVariant: readonly ["xs", "s", "m", "l"];
7
- export declare const chipColorVariant: readonly ["primary", "secondary"];
8
9
  export type ChipSizeVariant = (typeof chipSizeVariant)[number];
9
- export type ChipColorVariant = (typeof chipColorVariant)[number];
10
10
  export type ChipIcon = RenderContentType<IconProps>['content'];
11
+ export type ChipOnClick = (event: MouseEvent<HTMLElement>, payload: {
12
+ checked: boolean;
13
+ value: string | undefined;
14
+ }) => void;
11
15
  export type ChipBaseProps = {
12
16
  /** Размер компонента */
13
17
  size?: ChipSizeVariant;
@@ -18,9 +22,9 @@ export type ChipBaseProps = {
18
22
  /** Если `true` делает элемент выбранным */
19
23
  checked?: boolean;
20
24
  /** Обработчик нажатия */
21
- onClick?: (e: MouseEvent<HTMLElement>, payload: {
22
- checked: boolean;
23
- }) => void;
25
+ onClick?: ChipOnClick;
26
+ /** Значение chip */
27
+ value?: string;
24
28
  /** Иконка слева */
25
29
  iconLeft?: ChipIcon;
26
30
  /** Иконка справа */
@@ -1,2 +1,9 @@
1
+ // ---- COLOR ----
2
+ export var chipColorVariant = [
3
+ 'primary',
4
+ 'secondary',
5
+ 'main',
6
+ 'overlay',
7
+ ];
8
+ // ---- SIZE ----
1
9
  export var chipSizeVariant = ['xs', 's', 'm', 'l'];
2
- export var chipColorVariant = ['primary', 'secondary'];
@@ -13,5 +13,7 @@ export type FormGroupBaseProps = {
13
13
  children?: ReactNode;
14
14
  /** Направление */
15
15
  direction?: FormGroupDirectionVariant;
16
+ /** data-атрибут для тестирования */
17
+ 'data-testid'?: string;
16
18
  };
17
19
  export type FormGroupProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithoutRef<FormGroupBaseProps, As>;
@@ -5,6 +5,7 @@ import { type PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphi
5
5
  export type FormTitleBaseProps = {
6
6
  /** Размер — влияет на размер шрифта и отступы заголовка */
7
7
  size?: FormElementSizeVariant;
8
+ 'data-testid'?: string;
8
9
  };
9
10
  export type FormTitleProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithoutRef<FormTitleBaseProps, As>;
10
11
  export declare const cnFormTitle: import("@bem-react/classname").ClassNameFormatter;
@@ -8,6 +8,7 @@ export declare const iconButtonColorVariant: readonly ["primary", "secondary", "
8
8
  export declare const iconButtonVariant: readonly ["contained", "contained-additional", "ghost", "function", "floating"];
9
9
  export type IconButtonVariant = (typeof iconButtonVariant)[number];
10
10
  export type IconButtonColorVariant = (typeof iconButtonColorVariant)[number];
11
+ export type IconButtonSize = FormElementSizeVariant;
11
12
  export type IconButtonIcon = RenderContentType<IconProps>['content'];
12
13
  export type IconButtonBaseProps = {
13
14
  /** Иконка */
@@ -15,7 +16,7 @@ export type IconButtonBaseProps = {
15
16
  /** Вариант представления компонента */
16
17
  variant?: IconButtonVariant;
17
18
  /** Размер */
18
- size?: FormElementSizeVariant;
19
+ size?: IconButtonSize;
19
20
  /** Основной цвет компонента */
20
21
  color?: IconButtonColorVariant;
21
22
  /** Цвет иконки кнопки */
@@ -30,6 +31,8 @@ export type IconButtonBaseProps = {
30
31
  className?: string;
31
32
  /** Если `true` делает компонент круглым */
32
33
  rounded?: boolean;
34
+ /** Идентификатор компонента для тестов */
35
+ 'data-testid'?: string;
33
36
  children?: never;
34
37
  };
35
38
  export type IconButtonProps<As extends ElementType = typeof ICON_BUTTON_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<IconButtonBaseProps, As>;
@@ -1,5 +1,5 @@
1
- import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
2
1
  import type { LoaderSizeVariant } from '../Loader';
2
+ import type { IconButtonSize } from './types';
3
3
  export declare const loaderSizeMapper: {
4
- [key in FormElementSizeVariant]: LoaderSizeVariant;
4
+ [key in IconButtonSize]: LoaderSizeVariant;
5
5
  };
@@ -2,7 +2,7 @@ import type { StackGapVariant } from '../Stack';
2
2
  import type { InputOTPAutoCompleteMode, InputOTPSizeVariant } from './types';
3
3
  export declare const INPUT_OTP_DEFAULT_TAG = "div";
4
4
  export declare const INPUT_OTP_DEFAULT_AUTO_COMPLETE_MODE: InputOTPAutoCompleteMode;
5
- export declare const INPUT_OTP_DEFAULT_DISABLE_STROKE = false;
5
+ export declare const INPUT_OTP_DEFAULT_DISABLE_STROKE: boolean;
6
6
  export declare const INPUT_OTP_DEFAULT_SIZE: InputOTPSizeVariant;
7
7
  export declare const INPUT_OTP_SPACING_BY_SIZE: Readonly<Record<InputOTPSizeVariant, StackGapVariant>>;
8
8
  export declare const INPUT_OTP_DEFAULT_FINISH_BEHAVIOR: ({ isFullFilled }: import("./types").InputOTPFinishBehaviorContext) => boolean;
@@ -5,7 +5,7 @@ import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphi
5
5
  import type { RenderContentType } from '../../utils/renderContent';
6
6
  import type { TAG_DEFAULT_TAG } from './constants';
7
7
  export declare const tagVariant: readonly ["primary", "secondary"];
8
- export declare const tagColorVariant: readonly ["neutral", "action", "error", "warning", "success", "info"];
8
+ export declare const tagColorVariant: readonly ["neutral", "action", "error", "warning", "success", "info", "uncolored"];
9
9
  export type TagVariant = (typeof tagVariant)[number];
10
10
  export type TagColor = (typeof tagColorVariant)[number];
11
11
  export type TagIcon = RenderContentType<IconProps>['content'];
@@ -6,4 +6,5 @@ export var tagColorVariant = [
6
6
  'warning',
7
7
  'success',
8
8
  'info',
9
+ 'uncolored',
9
10
  ];
@@ -16,7 +16,8 @@ import type { CardProps } from '../Card';
16
16
  import type { CheckboxProps } from '../Checkbox';
17
17
  import type { CheckboxGroupProps } from '../CheckboxGroup';
18
18
  import type { ChipProps } from '../Chip';
19
- import type { ChipProps as ChiPropsNext } from '../ChipNext';
19
+ import type { ChipGroupProps } from '../ChipGroup';
20
+ import type { ChipProps as ChipNextProps } from '../ChipNext';
20
21
  import type { CollapseProps } from '../Collapse';
21
22
  import type { ContainerProps } from '../Container';
22
23
  import type { DataListProps } from '../DataList';
@@ -56,6 +57,7 @@ import type { TableContainerProps, TableProps, TableCaptionProps, TableCellProps
56
57
  import type { TagProps } from '../Tag';
57
58
  import type { TagProps as TagPropsNext } from '../TagNext';
58
59
  import type { TextareaProps } from '../Textarea';
60
+ import type { TitleProps } from '../Title';
59
61
  import type { ToggleProps } from '../Toggle';
60
62
  import type { TooltipProps } from '../Tooltip';
61
63
  import type { TypographyProps } from '../Typography';
@@ -91,7 +93,8 @@ export type Theme = {
91
93
  Checkbox?: Partial<CheckboxProps>;
92
94
  CheckboxGroup?: Partial<CheckboxGroupProps>;
93
95
  Chip?: Partial<ChipProps>;
94
- ChipNext?: Partial<ChiPropsNext>;
96
+ ChipNext?: Partial<ChipNextProps>;
97
+ ChipGroup?: Partial<ChipGroupProps>;
95
98
  Collapse?: Partial<CollapseProps>;
96
99
  Container?: Partial<ContainerProps>;
97
100
  DataList?: Partial<DataListProps>;
@@ -140,6 +143,7 @@ export type Theme = {
140
143
  Tag?: Partial<TagProps>;
141
144
  TagNext?: Partial<TagPropsNext>;
142
145
  Textarea?: Partial<TextareaProps>;
146
+ Title?: Partial<TitleProps>;
143
147
  Toggle?: Partial<ToggleProps>;
144
148
  Tooltip?: Partial<TooltipProps>;
145
149
  Typography?: Partial<TypographyProps>;
@@ -0,0 +1,4 @@
1
+ import './modules/tag/TitleTag.css';
2
+ import type { TitleBaseProps } from './types';
3
+ export declare const cnTitle: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare const Title: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleBaseProps, "div">;
@@ -0,0 +1,24 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './modules/tag/TitleTag.css';
3
+ import React from 'react';
4
+ import { useThemeProps } from '../../hooks/useThemeProps';
5
+ import { cn } from '../../utils/classname';
6
+ import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
7
+ import { TitleVariant } from './components';
8
+ import { TITLE_DEFAULT_SIZE, TITLE_DEFAULT_TAG, TITLE_DEFAULT_VARIANT, } from './constants';
9
+ import { TitleContext } from './TitleContext';
10
+ export var cnTitle = cn('Title');
11
+ export var Title = polymorphicComponentWithRef(function (inProps, ref) {
12
+ var props = useThemeProps({
13
+ props: inProps,
14
+ name: 'Title',
15
+ });
16
+ var _a = props.size, size = _a === void 0 ? TITLE_DEFAULT_SIZE : _a, classNameProp = props.className, _b = props.as, as = _b === void 0 ? TITLE_DEFAULT_TAG : _b, _c = props.variant, variant = _c === void 0 ? TITLE_DEFAULT_VARIANT : _c, other = __rest(props, ["size", "className", "as", "variant"]);
17
+ var className = cnTitle('', [classNameProp]);
18
+ return (React.createElement(TitleContext.Provider, { value: {
19
+ size: size,
20
+ variant: variant,
21
+ } },
22
+ React.createElement(TitleVariant, __assign({}, other, { ref: ref, as: as, className: className, size: size, variant: variant }))));
23
+ });
24
+ Title.displayName = 'Title';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { TitleVariant, TitleSizeVariant } from './entities';
3
+ export type TitleContextValue = {
4
+ variant: TitleVariant;
5
+ size: TitleSizeVariant;
6
+ };
7
+ export declare const TitleContext: React.Context<TitleContextValue>;
8
+ export declare const useTitleContext: () => TitleContextValue;
@@ -0,0 +1,12 @@
1
+ import React, { useContext } from 'react';
2
+ import { IS_DEV } from '../../constants/environment';
3
+ import { TITLE_DEFAULT_SIZE, TITLE_DEFAULT_VARIANT } from './constants';
4
+ export var TitleContext = React.createContext({
5
+ variant: TITLE_DEFAULT_VARIANT,
6
+ size: TITLE_DEFAULT_SIZE,
7
+ });
8
+ export var useTitleContext = function () { return useContext(TitleContext); };
9
+ // Именованный провайдер
10
+ if (IS_DEV) {
11
+ TitleContext.displayName = 'TitleContext';
12
+ }
@@ -0,0 +1 @@
1
+ export * from './variant';
@@ -0,0 +1 @@
1
+ export * from './variant';
@@ -0,0 +1,2 @@
1
+ import type { TitleVariantBaseProps } from './types';
2
+ export declare const TitleVariant: import("../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleVariantBaseProps, "div">;
@@ -0,0 +1,21 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import React from 'react';
3
+ import { logger } from '@ozen-ui/logger';
4
+ import { IS_DEV } from '../../../../constants/environment';
5
+ import { polymorphicComponentWithRef } from '../../../../utils/polymorphicComponentWithRef';
6
+ import { titleVariant } from '../../entities';
7
+ import { TitleMain } from './main';
8
+ import { TitleSecondary } from './secondary';
9
+ export var TitleVariant = polymorphicComponentWithRef(function (_a, ref) {
10
+ var variant = _a.variant, as = _a.as, other = __rest(_a, ["variant", "as"]);
11
+ if (variant === 'main') {
12
+ return React.createElement(TitleMain, __assign({}, other, { as: as, ref: ref }));
13
+ }
14
+ if (variant === 'secondary') {
15
+ return React.createElement(TitleSecondary, __assign({}, other, { as: as, ref: ref }));
16
+ }
17
+ if (IS_DEV) {
18
+ logger.error("\u0423 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430 'Title' \u043D\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u0430 '".concat(variant, "'. \u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B: [").concat(titleVariant.join(', '), "]'"));
19
+ }
20
+ return null;
21
+ });
@@ -0,0 +1,4 @@
1
+ export * from './main';
2
+ export * from './secondary';
3
+ export * from './TitleVariant';
4
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ export * from './main';
2
+ export * from './secondary';
3
+ export * from './TitleVariant';
4
+ export * from './types';
@@ -0,0 +1,38 @@
1
+ /* stylelint-disable */
2
+ .TitleMain {
3
+ display: inline-flex;
4
+ flex-direction: column;
5
+ align-items: flex-start;
6
+ gap: var(--space-xs);
7
+ }
8
+ .TitleMain_defaultMargin {
9
+ margin-block: var(--title-main-default-margin-block);
10
+ }
11
+ .TitleMain_defaultMargin .TitleMain-Label {
12
+ block-size: 1em;
13
+ }
14
+ .TitleMain_size_s {
15
+ --title-main-default-margin-block: 12px 16px;
16
+ }
17
+ .TitleMain_size_s .TitleMain-Content {
18
+ font: var(--typography-heading-xl-font);
19
+ letter-spacing: var(--typography-heading-xl-letter_spacing, 0);
20
+ text-transform: var(--typography-heading-xl-text_transform, none);
21
+ }
22
+ .TitleMain_size_m {
23
+ --title-main-default-margin-block: 16px 24px;
24
+ }
25
+ .TitleMain_size_m .TitleMain-Content {
26
+ font: var(--typography-heading-2xl-font);
27
+ letter-spacing: var(--typography-heading-2xl-letter_spacing, 0);
28
+ text-transform: var(--typography-heading-2xl-text_transform, none);
29
+ }
30
+ .TitleMain-ContentContainer {
31
+ color: var(--color-content-tertiary);
32
+ }
33
+ .TitleMain-Content {
34
+ color: var(--color-content-primary);
35
+ }
36
+ .TitleMain-Label {
37
+ cursor: default;
38
+ }
@@ -0,0 +1,4 @@
1
+ import './TitleMain.css';
2
+ import type { TitleMainBaseProps } from './types';
3
+ export declare const cnTitleMain: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare const TitleMain: import("../../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleMainBaseProps, "div">;
@@ -0,0 +1,32 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './TitleMain.css';
3
+ import React from 'react';
4
+ import { cn } from '../../../../../utils/classname';
5
+ import { getIconSizeToFormElement } from '../../../../../utils/getIconSizeToFormElement';
6
+ import { polymorphicComponentWithRef } from '../../../../../utils/polymorphicComponentWithRef';
7
+ import { renderContent } from '../../../../../utils/renderContent';
8
+ import { BreadcrumbItem, Breadcrumbs } from '../../../../Breadcrumbs';
9
+ import { Stack } from '../../../../Stack';
10
+ import { TITLE_DEFAULT_TAG } from '../../../constants';
11
+ import { TITLE_MAIN_LABEL_SIZE_MAP } from './config';
12
+ export var cnTitleMain = cn('TitleMain');
13
+ export var TitleMain = polymorphicComponentWithRef(function (_a, ref) {
14
+ var size = _a.size, className = _a.className, _b = _a.as, Tag = _b === void 0 ? TITLE_DEFAULT_TAG : _b, children = _a.children, renderLeft = _a.renderLeft, renderRight = _a.renderRight, label = _a.label, defaultMarginProp = _a.defaultMargin, other = __rest(_a, ["size", "className", "as", "children", "renderLeft", "renderRight", "label", "defaultMargin"]);
15
+ var defaultMargin = defaultMarginProp === undefined ? !!label : defaultMarginProp;
16
+ var renderIcon = function (content) {
17
+ return renderContent({
18
+ content: content,
19
+ props: {
20
+ size: getIconSizeToFormElement(size),
21
+ },
22
+ });
23
+ };
24
+ return (React.createElement(Tag, __assign({ className: cnTitleMain({ size: size, defaultMargin: defaultMargin }, [className]) }, other, { ref: ref }),
25
+ (label || defaultMargin) && (React.createElement(Breadcrumbs, { size: TITLE_MAIN_LABEL_SIZE_MAP[size], className: cnTitleMain('LabelContainer') },
26
+ React.createElement(BreadcrumbItem, { as: "span", className: cnTitleMain('Label') }, label))),
27
+ React.createElement(Stack, { gap: "s", align: "center", className: cnTitleMain('ContentContainer') },
28
+ renderIcon(renderLeft),
29
+ React.createElement("span", { className: cnTitleMain('Content') }, children),
30
+ renderIcon(renderRight))));
31
+ });
32
+ TitleMain.displayName = 'TitleMain';
@@ -0,0 +1,3 @@
1
+ import type { BreadcrumbsSizeVariant } from '../../../../Breadcrumbs';
2
+ import type { TitleSizeVariant } from '../../../entities';
3
+ export declare const TITLE_MAIN_LABEL_SIZE_MAP: Readonly<Record<TitleSizeVariant, BreadcrumbsSizeVariant>>;
@@ -0,0 +1,4 @@
1
+ export var TITLE_MAIN_LABEL_SIZE_MAP = {
2
+ s: 'xs',
3
+ m: 's',
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './TitleMain';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './TitleMain';
2
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ import type { ElementType } from 'react';
2
+ import type { PolymorphicComponentPropsWithoutRef } from '../../../../../utils/polymorphicComponentWithRef';
3
+ import type { TITLE_DEFAULT_TAG } from '../../../constants';
4
+ import type { TitleIcon, TitleSizeVariant } from '../../../entities';
5
+ export type TitleMainBaseProps = {
6
+ size: TitleSizeVariant;
7
+ label?: string;
8
+ renderLeft?: TitleIcon;
9
+ renderRight?: TitleIcon;
10
+ defaultMargin?: boolean;
11
+ 'data-testid'?: string;
12
+ };
13
+ export type TitleMainProps<As extends ElementType = typeof TITLE_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<TitleMainBaseProps, As>;
@@ -0,0 +1,26 @@
1
+ /* stylelint-disable */
2
+ .TitleSecondary {
3
+ display: inline-block;
4
+ color: var(--color-content-secondary);
5
+ }
6
+ .TitleSecondary_size_s {
7
+ --title-secondary-default-margin-block: 24px 12px;
8
+
9
+ font: var(--typography-text-s_1-font);
10
+
11
+ letter-spacing: var(--typography-text-s_1-letter_spacing, 0);
12
+
13
+ text-transform: var(--typography-text-s_1-text_transform, none);
14
+ }
15
+ .TitleSecondary_size_m {
16
+ --title-secondary-default-margin-block: 32px 16px;
17
+
18
+ font: var(--typography-text-m_1-font);
19
+
20
+ letter-spacing: var(--typography-text-m_1-letter_spacing, 0);
21
+
22
+ text-transform: var(--typography-text-m_1-text_transform, none);
23
+ }
24
+ .TitleSecondary_defaultMargin {
25
+ margin-block: var(--title-secondary-default-margin-block);
26
+ }
@@ -0,0 +1,4 @@
1
+ import './TitleSecondary.css';
2
+ import type { TitleSecondaryBaseProps } from './types';
3
+ export declare const cnTitleSecondary: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare const TitleSecondary: import("../../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleSecondaryBaseProps, "div">;
@@ -0,0 +1,12 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './TitleSecondary.css';
3
+ import React from 'react';
4
+ import { cn } from '../../../../../utils/classname';
5
+ import { polymorphicComponentWithRef } from '../../../../../utils/polymorphicComponentWithRef';
6
+ import { TITLE_DEFAULT_TAG } from '../../../constants';
7
+ export var cnTitleSecondary = cn('TitleSecondary');
8
+ export var TitleSecondary = polymorphicComponentWithRef(function (_a, ref) {
9
+ var size = _a.size, className = _a.className, _b = _a.as, Tag = _b === void 0 ? TITLE_DEFAULT_TAG : _b, children = _a.children, defaultMargin = _a.defaultMargin, other = __rest(_a, ["size", "className", "as", "children", "defaultMargin"]);
10
+ return (React.createElement(Tag, __assign({ className: cnTitleSecondary({ size: size, defaultMargin: defaultMargin }, [className]) }, other, { ref: ref }), children));
11
+ });
12
+ TitleSecondary.displayName = 'TitleSecondary';
@@ -0,0 +1,2 @@
1
+ export * from './TitleSecondary';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './TitleSecondary';
2
+ export * from './types';