@ozen-ui/kit 0.63.1 → 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 (261) hide show
  1. package/ChipGroup/package.json +5 -0
  2. package/InputOTP/package.json +5 -0
  3. package/Title/package.json +5 -0
  4. package/__inner__/cjs/components/ChipGroup/ChipGroup.css +16 -0
  5. package/__inner__/cjs/components/ChipGroup/ChipGroup.d.ts +4 -0
  6. package/__inner__/cjs/components/ChipGroup/ChipGroup.js +52 -0
  7. package/__inner__/cjs/components/ChipGroup/ChipGroupContext.d.ts +10 -0
  8. package/__inner__/cjs/components/ChipGroup/ChipGroupContext.js +5 -0
  9. package/__inner__/cjs/components/ChipGroup/constants.d.ts +5 -0
  10. package/__inner__/cjs/components/ChipGroup/constants.js +6 -0
  11. package/__inner__/cjs/components/ChipGroup/index.d.ts +2 -0
  12. package/__inner__/cjs/components/ChipGroup/index.js +5 -0
  13. package/__inner__/cjs/components/ChipGroup/types.d.ts +33 -0
  14. package/__inner__/cjs/components/ChipGroup/types.js +2 -0
  15. package/__inner__/cjs/components/ChipNext/Chip.css +50 -17
  16. package/__inner__/cjs/components/ChipNext/Chip.js +32 -5
  17. package/__inner__/cjs/components/ChipNext/types.d.ts +9 -5
  18. package/__inner__/cjs/components/ChipNext/types.js +9 -2
  19. package/__inner__/cjs/components/FormGroup/types.d.ts +2 -0
  20. package/__inner__/cjs/components/FormTitle/FormTitle.d.ts +1 -0
  21. package/__inner__/cjs/components/IconButtonNext/types.d.ts +4 -1
  22. package/__inner__/cjs/components/IconButtonNext/utils.d.ts +2 -2
  23. package/__inner__/cjs/components/InputOTP/InputOTP.css +60 -0
  24. package/__inner__/cjs/components/InputOTP/InputOTP.d.ts +4 -0
  25. package/__inner__/cjs/components/InputOTP/InputOTP.js +179 -0
  26. package/__inner__/cjs/components/InputOTP/constants.d.ts +8 -0
  27. package/__inner__/cjs/components/InputOTP/constants.js +13 -0
  28. package/__inner__/cjs/components/InputOTP/helper.d.ts +13 -0
  29. package/__inner__/cjs/components/InputOTP/helper.js +87 -0
  30. package/__inner__/cjs/components/InputOTP/hooks/index.d.ts +1 -0
  31. package/__inner__/cjs/components/InputOTP/hooks/index.js +4 -0
  32. package/__inner__/cjs/components/InputOTP/hooks/useInputOTPEvents.d.ts +20 -0
  33. package/__inner__/cjs/components/InputOTP/hooks/useInputOTPEvents.js +183 -0
  34. package/__inner__/cjs/components/InputOTP/index.d.ts +3 -0
  35. package/__inner__/cjs/components/InputOTP/index.js +6 -0
  36. package/__inner__/cjs/components/InputOTP/presets.d.ts +12 -0
  37. package/__inner__/cjs/components/InputOTP/presets.js +27 -0
  38. package/__inner__/cjs/components/InputOTP/types.d.ts +101 -0
  39. package/__inner__/cjs/components/InputOTP/types.js +7 -0
  40. package/__inner__/cjs/components/TagNext/types.d.ts +1 -1
  41. package/__inner__/cjs/components/TagNext/types.js +1 -0
  42. package/__inner__/cjs/components/ThemeProvider/types.d.ts +7 -2
  43. package/__inner__/cjs/components/Title/Title.d.ts +4 -0
  44. package/__inner__/cjs/components/Title/Title.js +27 -0
  45. package/__inner__/cjs/components/Title/TitleContext.d.ts +8 -0
  46. package/__inner__/cjs/components/Title/TitleContext.js +17 -0
  47. package/__inner__/cjs/components/Title/components/index.d.ts +1 -0
  48. package/__inner__/cjs/components/Title/components/index.js +4 -0
  49. package/__inner__/cjs/components/Title/components/variant/TitleVariant.d.ts +2 -0
  50. package/__inner__/cjs/components/Title/components/variant/TitleVariant.js +24 -0
  51. package/__inner__/cjs/components/Title/components/variant/index.d.ts +4 -0
  52. package/__inner__/cjs/components/Title/components/variant/index.js +7 -0
  53. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.css +38 -0
  54. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.d.ts +4 -0
  55. package/__inner__/cjs/components/Title/components/variant/main/TitleMain.js +35 -0
  56. package/__inner__/cjs/components/Title/components/variant/main/config.d.ts +3 -0
  57. package/__inner__/cjs/components/Title/components/variant/main/config.js +7 -0
  58. package/__inner__/cjs/components/Title/components/variant/main/index.d.ts +2 -0
  59. package/__inner__/cjs/components/Title/components/variant/main/index.js +5 -0
  60. package/__inner__/cjs/components/Title/components/variant/main/types.d.ts +13 -0
  61. package/__inner__/cjs/components/Title/components/variant/main/types.js +2 -0
  62. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
  63. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
  64. package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.js +15 -0
  65. package/__inner__/cjs/components/Title/components/variant/secondary/index.d.ts +2 -0
  66. package/__inner__/cjs/components/Title/components/variant/secondary/index.js +5 -0
  67. package/__inner__/cjs/components/Title/components/variant/secondary/types.d.ts +10 -0
  68. package/__inner__/cjs/components/Title/components/variant/secondary/types.js +2 -0
  69. package/__inner__/cjs/components/Title/components/variant/types.d.ts +8 -0
  70. package/__inner__/cjs/components/Title/components/variant/types.js +2 -0
  71. package/__inner__/cjs/components/Title/constants.d.ts +4 -0
  72. package/__inner__/cjs/components/Title/constants.js +6 -0
  73. package/__inner__/cjs/components/Title/entities/icon.d.ts +3 -0
  74. package/__inner__/cjs/components/Title/entities/icon.js +2 -0
  75. package/__inner__/cjs/components/Title/entities/index.d.ts +3 -0
  76. package/__inner__/cjs/components/Title/entities/index.js +6 -0
  77. package/__inner__/cjs/components/Title/entities/size.d.ts +2 -0
  78. package/__inner__/cjs/components/Title/entities/size.js +4 -0
  79. package/__inner__/cjs/components/Title/entities/variant.d.ts +7 -0
  80. package/__inner__/cjs/components/Title/entities/variant.js +4 -0
  81. package/__inner__/cjs/components/Title/index.d.ts +4 -0
  82. package/__inner__/cjs/components/Title/index.js +7 -0
  83. package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
  84. package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.js +16 -0
  85. package/__inner__/cjs/components/Title/modules/icon-button/constants.d.ts +1 -0
  86. package/__inner__/cjs/components/Title/modules/icon-button/constants.js +4 -0
  87. package/__inner__/cjs/components/Title/modules/icon-button/index.d.ts +2 -0
  88. package/__inner__/cjs/components/Title/modules/icon-button/index.js +5 -0
  89. package/__inner__/cjs/components/Title/modules/icon-button/types.d.ts +6 -0
  90. package/__inner__/cjs/components/Title/modules/icon-button/types.js +2 -0
  91. package/__inner__/cjs/components/Title/modules/index.d.ts +2 -0
  92. package/__inner__/cjs/components/Title/modules/index.js +5 -0
  93. package/__inner__/cjs/components/Title/modules/tag/TitleTag.css +4 -0
  94. package/__inner__/cjs/components/Title/modules/tag/TitleTag.d.ts +3 -0
  95. package/__inner__/cjs/components/Title/modules/tag/TitleTag.js +11 -0
  96. package/__inner__/cjs/components/Title/modules/tag/constants.d.ts +1 -0
  97. package/__inner__/cjs/components/Title/modules/tag/constants.js +4 -0
  98. package/__inner__/cjs/components/Title/modules/tag/index.d.ts +2 -0
  99. package/__inner__/cjs/components/Title/modules/tag/index.js +5 -0
  100. package/__inner__/cjs/components/Title/modules/tag/types.d.ts +6 -0
  101. package/__inner__/cjs/components/Title/modules/tag/types.js +2 -0
  102. package/__inner__/cjs/components/Title/types.d.ts +10 -0
  103. package/__inner__/cjs/components/Title/types.js +2 -0
  104. package/__inner__/cjs/constants/environment/index.d.ts +2 -0
  105. package/__inner__/cjs/constants/environment/index.js +5 -0
  106. package/__inner__/cjs/constants/environment/isDev.d.ts +1 -0
  107. package/__inner__/cjs/constants/environment/isDev.js +5 -0
  108. package/__inner__/cjs/constants/environment/isProduction.d.ts +1 -0
  109. package/__inner__/cjs/constants/environment/isProduction.js +4 -0
  110. package/__inner__/cjs/hooks/useStoredValue/index.d.ts +3 -0
  111. package/__inner__/cjs/hooks/useStoredValue/index.js +6 -0
  112. package/__inner__/cjs/hooks/useStoredValue/types.d.ts +2 -0
  113. package/__inner__/cjs/hooks/useStoredValue/types.js +2 -0
  114. package/__inner__/cjs/hooks/useStoredValue/useStoredValue.d.ts +4 -0
  115. package/__inner__/cjs/hooks/useStoredValue/useStoredValue.js +16 -0
  116. package/__inner__/cjs/hooks/useStoredValue/utils.d.ts +2 -0
  117. package/__inner__/cjs/hooks/useStoredValue/utils.js +8 -0
  118. package/__inner__/cjs/types/object/withPartial.d.ts +3 -0
  119. package/__inner__/cjs/types/object/withPartial.js +2 -0
  120. package/__inner__/cjs/utils/array/create-empty/createEmptyArray.d.ts +1 -0
  121. package/__inner__/cjs/utils/array/create-empty/createEmptyArray.js +8 -0
  122. package/__inner__/cjs/utils/array/create-empty/index.d.ts +1 -0
  123. package/__inner__/cjs/utils/array/create-empty/index.js +4 -0
  124. package/__inner__/cjs/utils/array/create-filled/createFilledArray.d.ts +1 -0
  125. package/__inner__/cjs/utils/array/create-filled/createFilledArray.js +7 -0
  126. package/__inner__/cjs/utils/array/create-filled/index.d.ts +1 -0
  127. package/__inner__/cjs/utils/array/create-filled/index.js +4 -0
  128. package/__inner__/cjs/utils/array/index.d.ts +2 -0
  129. package/__inner__/cjs/utils/array/index.js +5 -0
  130. package/__inner__/cjs/utils/isFunction.d.ts +1 -0
  131. package/__inner__/cjs/utils/isFunction.js +8 -0
  132. package/__inner__/esm/components/ChipGroup/ChipGroup.css +16 -0
  133. package/__inner__/esm/components/ChipGroup/ChipGroup.d.ts +4 -0
  134. package/__inner__/esm/components/ChipGroup/ChipGroup.js +49 -0
  135. package/__inner__/esm/components/ChipGroup/ChipGroupContext.d.ts +10 -0
  136. package/__inner__/esm/components/ChipGroup/ChipGroupContext.js +2 -0
  137. package/__inner__/esm/components/ChipGroup/constants.d.ts +5 -0
  138. package/__inner__/esm/components/ChipGroup/constants.js +3 -0
  139. package/__inner__/esm/components/ChipGroup/index.d.ts +2 -0
  140. package/__inner__/esm/components/ChipGroup/index.js +2 -0
  141. package/__inner__/esm/components/ChipGroup/types.d.ts +33 -0
  142. package/__inner__/esm/components/ChipGroup/types.js +1 -0
  143. package/__inner__/esm/components/ChipNext/Chip.css +50 -17
  144. package/__inner__/esm/components/ChipNext/Chip.js +32 -5
  145. package/__inner__/esm/components/ChipNext/types.d.ts +9 -5
  146. package/__inner__/esm/components/ChipNext/types.js +8 -1
  147. package/__inner__/esm/components/FormGroup/types.d.ts +2 -0
  148. package/__inner__/esm/components/FormTitle/FormTitle.d.ts +1 -0
  149. package/__inner__/esm/components/IconButtonNext/types.d.ts +4 -1
  150. package/__inner__/esm/components/IconButtonNext/utils.d.ts +2 -2
  151. package/__inner__/esm/components/InputOTP/InputOTP.css +60 -0
  152. package/__inner__/esm/components/InputOTP/InputOTP.d.ts +4 -0
  153. package/__inner__/esm/components/InputOTP/InputOTP.js +176 -0
  154. package/__inner__/esm/components/InputOTP/constants.d.ts +8 -0
  155. package/__inner__/esm/components/InputOTP/constants.js +10 -0
  156. package/__inner__/esm/components/InputOTP/helper.d.ts +13 -0
  157. package/__inner__/esm/components/InputOTP/helper.js +79 -0
  158. package/__inner__/esm/components/InputOTP/hooks/index.d.ts +1 -0
  159. package/__inner__/esm/components/InputOTP/hooks/index.js +1 -0
  160. package/__inner__/esm/components/InputOTP/hooks/useInputOTPEvents.d.ts +20 -0
  161. package/__inner__/esm/components/InputOTP/hooks/useInputOTPEvents.js +179 -0
  162. package/__inner__/esm/components/InputOTP/index.d.ts +3 -0
  163. package/__inner__/esm/components/InputOTP/index.js +3 -0
  164. package/__inner__/esm/components/InputOTP/presets.d.ts +12 -0
  165. package/__inner__/esm/components/InputOTP/presets.js +24 -0
  166. package/__inner__/esm/components/InputOTP/types.d.ts +101 -0
  167. package/__inner__/esm/components/InputOTP/types.js +4 -0
  168. package/__inner__/esm/components/TagNext/types.d.ts +1 -1
  169. package/__inner__/esm/components/TagNext/types.js +1 -0
  170. package/__inner__/esm/components/ThemeProvider/types.d.ts +7 -2
  171. package/__inner__/esm/components/Title/Title.d.ts +4 -0
  172. package/__inner__/esm/components/Title/Title.js +24 -0
  173. package/__inner__/esm/components/Title/TitleContext.d.ts +8 -0
  174. package/__inner__/esm/components/Title/TitleContext.js +12 -0
  175. package/__inner__/esm/components/Title/components/index.d.ts +1 -0
  176. package/__inner__/esm/components/Title/components/index.js +1 -0
  177. package/__inner__/esm/components/Title/components/variant/TitleVariant.d.ts +2 -0
  178. package/__inner__/esm/components/Title/components/variant/TitleVariant.js +21 -0
  179. package/__inner__/esm/components/Title/components/variant/index.d.ts +4 -0
  180. package/__inner__/esm/components/Title/components/variant/index.js +4 -0
  181. package/__inner__/esm/components/Title/components/variant/main/TitleMain.css +38 -0
  182. package/__inner__/esm/components/Title/components/variant/main/TitleMain.d.ts +4 -0
  183. package/__inner__/esm/components/Title/components/variant/main/TitleMain.js +32 -0
  184. package/__inner__/esm/components/Title/components/variant/main/config.d.ts +3 -0
  185. package/__inner__/esm/components/Title/components/variant/main/config.js +4 -0
  186. package/__inner__/esm/components/Title/components/variant/main/index.d.ts +2 -0
  187. package/__inner__/esm/components/Title/components/variant/main/index.js +2 -0
  188. package/__inner__/esm/components/Title/components/variant/main/types.d.ts +13 -0
  189. package/__inner__/esm/components/Title/components/variant/main/types.js +1 -0
  190. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
  191. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
  192. package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.js +12 -0
  193. package/__inner__/esm/components/Title/components/variant/secondary/index.d.ts +2 -0
  194. package/__inner__/esm/components/Title/components/variant/secondary/index.js +2 -0
  195. package/__inner__/esm/components/Title/components/variant/secondary/types.d.ts +10 -0
  196. package/__inner__/esm/components/Title/components/variant/secondary/types.js +1 -0
  197. package/__inner__/esm/components/Title/components/variant/types.d.ts +8 -0
  198. package/__inner__/esm/components/Title/components/variant/types.js +1 -0
  199. package/__inner__/esm/components/Title/constants.d.ts +4 -0
  200. package/__inner__/esm/components/Title/constants.js +3 -0
  201. package/__inner__/esm/components/Title/entities/icon.d.ts +3 -0
  202. package/__inner__/esm/components/Title/entities/icon.js +1 -0
  203. package/__inner__/esm/components/Title/entities/index.d.ts +3 -0
  204. package/__inner__/esm/components/Title/entities/index.js +3 -0
  205. package/__inner__/esm/components/Title/entities/size.d.ts +2 -0
  206. package/__inner__/esm/components/Title/entities/size.js +1 -0
  207. package/__inner__/esm/components/Title/entities/variant.d.ts +7 -0
  208. package/__inner__/esm/components/Title/entities/variant.js +1 -0
  209. package/__inner__/esm/components/Title/index.d.ts +4 -0
  210. package/__inner__/esm/components/Title/index.js +4 -0
  211. package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
  212. package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.js +13 -0
  213. package/__inner__/esm/components/Title/modules/icon-button/constants.d.ts +1 -0
  214. package/__inner__/esm/components/Title/modules/icon-button/constants.js +1 -0
  215. package/__inner__/esm/components/Title/modules/icon-button/index.d.ts +2 -0
  216. package/__inner__/esm/components/Title/modules/icon-button/index.js +2 -0
  217. package/__inner__/esm/components/Title/modules/icon-button/types.d.ts +6 -0
  218. package/__inner__/esm/components/Title/modules/icon-button/types.js +1 -0
  219. package/__inner__/esm/components/Title/modules/index.d.ts +2 -0
  220. package/__inner__/esm/components/Title/modules/index.js +2 -0
  221. package/__inner__/esm/components/Title/modules/tag/TitleTag.css +4 -0
  222. package/__inner__/esm/components/Title/modules/tag/TitleTag.d.ts +3 -0
  223. package/__inner__/esm/components/Title/modules/tag/TitleTag.js +8 -0
  224. package/__inner__/esm/components/Title/modules/tag/constants.d.ts +1 -0
  225. package/__inner__/esm/components/Title/modules/tag/constants.js +1 -0
  226. package/__inner__/esm/components/Title/modules/tag/index.d.ts +2 -0
  227. package/__inner__/esm/components/Title/modules/tag/index.js +2 -0
  228. package/__inner__/esm/components/Title/modules/tag/types.d.ts +6 -0
  229. package/__inner__/esm/components/Title/modules/tag/types.js +1 -0
  230. package/__inner__/esm/components/Title/types.d.ts +10 -0
  231. package/__inner__/esm/components/Title/types.js +1 -0
  232. package/__inner__/esm/constants/environment/index.d.ts +2 -0
  233. package/__inner__/esm/constants/environment/index.js +2 -0
  234. package/__inner__/esm/constants/environment/isDev.d.ts +1 -0
  235. package/__inner__/esm/constants/environment/isDev.js +2 -0
  236. package/__inner__/esm/constants/environment/isProduction.d.ts +1 -0
  237. package/__inner__/esm/constants/environment/isProduction.js +1 -0
  238. package/__inner__/esm/hooks/useStoredValue/index.d.ts +3 -0
  239. package/__inner__/esm/hooks/useStoredValue/index.js +3 -0
  240. package/__inner__/esm/hooks/useStoredValue/types.d.ts +2 -0
  241. package/__inner__/esm/hooks/useStoredValue/types.js +1 -0
  242. package/__inner__/esm/hooks/useStoredValue/useStoredValue.d.ts +4 -0
  243. package/__inner__/esm/hooks/useStoredValue/useStoredValue.js +13 -0
  244. package/__inner__/esm/hooks/useStoredValue/utils.d.ts +2 -0
  245. package/__inner__/esm/hooks/useStoredValue/utils.js +5 -0
  246. package/__inner__/esm/types/object/withPartial.d.ts +3 -0
  247. package/__inner__/esm/types/object/withPartial.js +1 -0
  248. package/__inner__/esm/utils/array/create-empty/createEmptyArray.d.ts +1 -0
  249. package/__inner__/esm/utils/array/create-empty/createEmptyArray.js +4 -0
  250. package/__inner__/esm/utils/array/create-empty/index.d.ts +1 -0
  251. package/__inner__/esm/utils/array/create-empty/index.js +1 -0
  252. package/__inner__/esm/utils/array/create-filled/createFilledArray.d.ts +1 -0
  253. package/__inner__/esm/utils/array/create-filled/createFilledArray.js +3 -0
  254. package/__inner__/esm/utils/array/create-filled/index.d.ts +1 -0
  255. package/__inner__/esm/utils/array/create-filled/index.js +1 -0
  256. package/__inner__/esm/utils/array/index.d.ts +2 -0
  257. package/__inner__/esm/utils/array/index.js +2 -0
  258. package/__inner__/esm/utils/isFunction.d.ts +1 -0
  259. package/__inner__/esm/utils/isFunction.js +4 -0
  260. package/package.json +4 -4
  261. package/useStoredValue/package.json +5 -0
@@ -0,0 +1,101 @@
1
+ import type { ComponentPropsWithRef, ElementType } from 'react';
2
+ import type { PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
3
+ import type { FIELD_CONTROL_DEFAULT_TAG, FieldControlBaseProps } from '../FieldControl';
4
+ import type { FieldInputProps } from '../FieldInput';
5
+ import type { INPUT_OTP_DEFAULT_TAG } from './constants';
6
+ export declare const inputOTPAutoCompleteMode: readonly ["firstOnly", "all"];
7
+ export type InputOTPAutoCompleteMode = (typeof inputOTPAutoCompleteMode)[number];
8
+ export declare const inputOTPSizeVariant: readonly ["s", "m"];
9
+ export type InputOTPSizeVariant = (typeof inputOTPSizeVariant)[number];
10
+ export type InputOTPValidate = (value: string) => boolean;
11
+ export type InputOTPRawValue = string[];
12
+ export type InputOTPValue = InputOTPRawValue | string;
13
+ export type InputOTPOnChange = (value: string, rawValue: InputOTPRawValue, maskedValue: string, maskedRawValue: InputOTPRawValue) => void;
14
+ export type InputOTPOnFinish = (value: string, rawValue: InputOTPRawValue, maskedValue: string, maskedRawValue: InputOTPRawValue) => void;
15
+ export type InputOTPInputs = HTMLInputElement[];
16
+ export type InputOTPInputProps = FieldInputProps;
17
+ export type InputOTPCalculatedInput = {
18
+ /** Значение input */
19
+ value: string;
20
+ /** Необработанное input */
21
+ rawValue: string;
22
+ /** Флаг: это предыдущий input */
23
+ isPrevious: boolean;
24
+ /** Флаг: это следующий input */
25
+ isNext: boolean;
26
+ /** Флаг: это текущий input */
27
+ isCurrentInput: boolean;
28
+ /** Флаг: это последний input */
29
+ isLast: boolean;
30
+ /** Флаг: input отключен */
31
+ isDisabled: boolean;
32
+ };
33
+ export type InputOTPMask = string | ((value: string, index: number) => string);
34
+ export type InputOTPFinishBehaviorContext = {
35
+ /** Флаг: Поле полностью заполнено */
36
+ isFullFilled: boolean;
37
+ /** Значение */
38
+ value: string;
39
+ /** Необработанное значение */
40
+ rawValue: InputOTPRawValue;
41
+ /** Значение с маской */
42
+ maskedValue: string;
43
+ /** Необработанное значение с маской */
44
+ maskedRawValue: InputOTPRawValue;
45
+ /** Флаг: Это изменение на последнем input'е */
46
+ isChangeOnLastInput: boolean;
47
+ /** index input'а, на котором произошло изменение */
48
+ inputIndex: number;
49
+ /** Флаг: Был нажат enter */
50
+ isEnter: boolean;
51
+ };
52
+ export type InputOTPFinishBehavior = (context: InputOTPFinishBehaviorContext) => boolean;
53
+ export type InputOTPDynamicInputParameter<Parameter> = Parameter | ((calculatedInput: InputOTPCalculatedInput, index: number) => Parameter);
54
+ export type InputOTPBaseProps = {
55
+ /** Длина кода */
56
+ length: number;
57
+ /** Значение */
58
+ value?: InputOTPValue;
59
+ /** Значение по умолчанию */
60
+ defaultValue?: InputOTPValue;
61
+ /** Обработчик события на изменение значения поля */
62
+ onChange?: InputOTPOnChange;
63
+ /** Обработчик события на завершение ввода */
64
+ onFinish?: InputOTPOnFinish;
65
+ /** Маска значения */
66
+ mask?: InputOTPMask;
67
+ /** autoComplete */
68
+ autoComplete?: InputOTPInputProps['autoComplete'];
69
+ /**
70
+ * Мод autoComplete.
71
+ * В зависимости от режима, autoComplete будет устанавливаться разным input
72
+ */
73
+ autoCompleteMode?: InputOTPAutoCompleteMode;
74
+ /** Если `true` переводит поле в состояние ошибки */
75
+ error?: boolean;
76
+ /** Если `true` делает элемент неактивным */
77
+ disabled?: boolean;
78
+ /** Функция-валидатор */
79
+ validate?: InputOTPValidate;
80
+ /** Размер */
81
+ size?: InputOTPSizeVariant;
82
+ /** Лейбл */
83
+ ariaLabel?: string;
84
+ /** Если `true` отключает обводку */
85
+ disableStroke?: boolean;
86
+ /** Подсказка. Отображается, когда значение не введено */
87
+ placeholder?: InputOTPDynamicInputParameter<string>;
88
+ /** Свойства Field */
89
+ fieldProps?: InputOTPDynamicInputParameter<PolymorphicComponentPropsWithRef<FieldControlBaseProps, typeof FIELD_CONTROL_DEFAULT_TAG>>;
90
+ /** Свойства Input */
91
+ inputProps?: InputOTPDynamicInputParameter<FieldInputProps>;
92
+ /** Свойства InputContainer */
93
+ inputContainerProps?: InputOTPDynamicInputParameter<ComponentPropsWithRef<'div'> & {
94
+ 'data-testid'?: string;
95
+ }>;
96
+ /** Функция, которая определяет поведение финиша */
97
+ finishBehavior?: InputOTPFinishBehavior;
98
+ /** data-атрибут для тестирования */
99
+ 'data-testid'?: string;
100
+ };
101
+ export type InputOTPProps<As extends ElementType = typeof INPUT_OTP_DEFAULT_TAG> = PolymorphicComponentPropsWithRef<InputOTPBaseProps, As>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inputOTPSizeVariant = exports.inputOTPAutoCompleteMode = void 0;
4
+ // ---- AUTO-COMPLETE MODE ----
5
+ exports.inputOTPAutoCompleteMode = ['firstOnly', 'all'];
6
+ // ---- SIZE ----
7
+ exports.inputOTPSizeVariant = ['s', 'm'];
@@ -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'];
@@ -9,4 +9,5 @@ exports.tagColorVariant = [
9
9
  'warning',
10
10
  'success',
11
11
  'info',
12
+ 'uncolored',
12
13
  ];
@@ -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>;
@@ -111,6 +114,7 @@ export type Theme = {
111
114
  Indicator?: Partial<IndicatorProps>;
112
115
  Input?: Partial<InputProps>;
113
116
  InputNumber?: Partial<InputNumberProps>;
117
+ InputOTP?: Partial<InputProps>;
114
118
  Link?: Partial<LinkProps>;
115
119
  List?: Partial<ListProps>;
116
120
  ListItem?: Partial<ListItemProps>;
@@ -139,6 +143,7 @@ export type Theme = {
139
143
  Tag?: Partial<TagProps>;
140
144
  TagNext?: Partial<TagPropsNext>;
141
145
  Textarea?: Partial<TextareaProps>;
146
+ Title?: Partial<TitleProps>;
142
147
  Toggle?: Partial<ToggleProps>;
143
148
  Tooltip?: Partial<TooltipProps>;
144
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,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Title = exports.cnTitle = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./modules/tag/TitleTag.css");
6
+ var react_1 = tslib_1.__importDefault(require("react"));
7
+ var useThemeProps_1 = require("../../hooks/useThemeProps");
8
+ var classname_1 = require("../../utils/classname");
9
+ var polymorphicComponentWithRef_1 = require("../../utils/polymorphicComponentWithRef");
10
+ var components_1 = require("./components");
11
+ var constants_1 = require("./constants");
12
+ var TitleContext_1 = require("./TitleContext");
13
+ exports.cnTitle = (0, classname_1.cn)('Title');
14
+ exports.Title = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
15
+ var props = (0, useThemeProps_1.useThemeProps)({
16
+ props: inProps,
17
+ name: 'Title',
18
+ });
19
+ var _a = props.size, size = _a === void 0 ? constants_1.TITLE_DEFAULT_SIZE : _a, classNameProp = props.className, _b = props.as, as = _b === void 0 ? constants_1.TITLE_DEFAULT_TAG : _b, _c = props.variant, variant = _c === void 0 ? constants_1.TITLE_DEFAULT_VARIANT : _c, other = tslib_1.__rest(props, ["size", "className", "as", "variant"]);
20
+ var className = (0, exports.cnTitle)('', [classNameProp]);
21
+ return (react_1.default.createElement(TitleContext_1.TitleContext.Provider, { value: {
22
+ size: size,
23
+ variant: variant,
24
+ } },
25
+ react_1.default.createElement(components_1.TitleVariant, tslib_1.__assign({}, other, { ref: ref, as: as, className: className, size: size, variant: variant }))));
26
+ });
27
+ exports.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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useTitleContext = exports.TitleContext = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
+ var environment_1 = require("../../constants/environment");
7
+ var constants_1 = require("./constants");
8
+ exports.TitleContext = react_1.default.createContext({
9
+ variant: constants_1.TITLE_DEFAULT_VARIANT,
10
+ size: constants_1.TITLE_DEFAULT_SIZE,
11
+ });
12
+ var useTitleContext = function () { return (0, react_1.useContext)(exports.TitleContext); };
13
+ exports.useTitleContext = useTitleContext;
14
+ // Именованный провайдер
15
+ if (environment_1.IS_DEV) {
16
+ exports.TitleContext.displayName = 'TitleContext';
17
+ }
@@ -0,0 +1 @@
1
+ export * from './variant';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./variant"), exports);
@@ -0,0 +1,2 @@
1
+ import type { TitleVariantBaseProps } from './types';
2
+ export declare const TitleVariant: import("../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleVariantBaseProps, "div">;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleVariant = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importDefault(require("react"));
6
+ var logger_1 = require("@ozen-ui/logger");
7
+ var environment_1 = require("../../../../constants/environment");
8
+ var polymorphicComponentWithRef_1 = require("../../../../utils/polymorphicComponentWithRef");
9
+ var entities_1 = require("../../entities");
10
+ var main_1 = require("./main");
11
+ var secondary_1 = require("./secondary");
12
+ exports.TitleVariant = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (_a, ref) {
13
+ var variant = _a.variant, as = _a.as, other = tslib_1.__rest(_a, ["variant", "as"]);
14
+ if (variant === 'main') {
15
+ return react_1.default.createElement(main_1.TitleMain, tslib_1.__assign({}, other, { as: as, ref: ref }));
16
+ }
17
+ if (variant === 'secondary') {
18
+ return react_1.default.createElement(secondary_1.TitleSecondary, tslib_1.__assign({}, other, { as: as, ref: ref }));
19
+ }
20
+ if (environment_1.IS_DEV) {
21
+ logger_1.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(entities_1.titleVariant.join(', '), "]'"));
22
+ }
23
+ return null;
24
+ });
@@ -0,0 +1,4 @@
1
+ export * from './main';
2
+ export * from './secondary';
3
+ export * from './TitleVariant';
4
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./main"), exports);
5
+ tslib_1.__exportStar(require("./secondary"), exports);
6
+ tslib_1.__exportStar(require("./TitleVariant"), exports);
7
+ tslib_1.__exportStar(require("./types"), exports);
@@ -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,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleMain = exports.cnTitleMain = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./TitleMain.css");
6
+ var react_1 = tslib_1.__importDefault(require("react"));
7
+ var classname_1 = require("../../../../../utils/classname");
8
+ var getIconSizeToFormElement_1 = require("../../../../../utils/getIconSizeToFormElement");
9
+ var polymorphicComponentWithRef_1 = require("../../../../../utils/polymorphicComponentWithRef");
10
+ var renderContent_1 = require("../../../../../utils/renderContent");
11
+ var Breadcrumbs_1 = require("../../../../Breadcrumbs");
12
+ var Stack_1 = require("../../../../Stack");
13
+ var constants_1 = require("../../../constants");
14
+ var config_1 = require("./config");
15
+ exports.cnTitleMain = (0, classname_1.cn)('TitleMain');
16
+ exports.TitleMain = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (_a, ref) {
17
+ var size = _a.size, className = _a.className, _b = _a.as, Tag = _b === void 0 ? constants_1.TITLE_DEFAULT_TAG : _b, children = _a.children, renderLeft = _a.renderLeft, renderRight = _a.renderRight, label = _a.label, defaultMarginProp = _a.defaultMargin, other = tslib_1.__rest(_a, ["size", "className", "as", "children", "renderLeft", "renderRight", "label", "defaultMargin"]);
18
+ var defaultMargin = defaultMarginProp === undefined ? !!label : defaultMarginProp;
19
+ var renderIcon = function (content) {
20
+ return (0, renderContent_1.renderContent)({
21
+ content: content,
22
+ props: {
23
+ size: (0, getIconSizeToFormElement_1.getIconSizeToFormElement)(size),
24
+ },
25
+ });
26
+ };
27
+ return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnTitleMain)({ size: size, defaultMargin: defaultMargin }, [className]) }, other, { ref: ref }),
28
+ (label || defaultMargin) && (react_1.default.createElement(Breadcrumbs_1.Breadcrumbs, { size: config_1.TITLE_MAIN_LABEL_SIZE_MAP[size], className: (0, exports.cnTitleMain)('LabelContainer') },
29
+ react_1.default.createElement(Breadcrumbs_1.BreadcrumbItem, { as: "span", className: (0, exports.cnTitleMain)('Label') }, label))),
30
+ react_1.default.createElement(Stack_1.Stack, { gap: "s", align: "center", className: (0, exports.cnTitleMain)('ContentContainer') },
31
+ renderIcon(renderLeft),
32
+ react_1.default.createElement("span", { className: (0, exports.cnTitleMain)('Content') }, children),
33
+ renderIcon(renderRight))));
34
+ });
35
+ exports.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,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TITLE_MAIN_LABEL_SIZE_MAP = void 0;
4
+ exports.TITLE_MAIN_LABEL_SIZE_MAP = {
5
+ s: 'xs',
6
+ m: 's',
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from './TitleMain';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./TitleMain"), exports);
5
+ tslib_1.__exportStar(require("./types"), exports);
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleSecondary = exports.cnTitleSecondary = void 0;
4
+ var tslib_1 = require("tslib");
5
+ require("./TitleSecondary.css");
6
+ var react_1 = tslib_1.__importDefault(require("react"));
7
+ var classname_1 = require("../../../../../utils/classname");
8
+ var polymorphicComponentWithRef_1 = require("../../../../../utils/polymorphicComponentWithRef");
9
+ var constants_1 = require("../../../constants");
10
+ exports.cnTitleSecondary = (0, classname_1.cn)('TitleSecondary');
11
+ exports.TitleSecondary = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (_a, ref) {
12
+ var size = _a.size, className = _a.className, _b = _a.as, Tag = _b === void 0 ? constants_1.TITLE_DEFAULT_TAG : _b, children = _a.children, defaultMargin = _a.defaultMargin, other = tslib_1.__rest(_a, ["size", "className", "as", "children", "defaultMargin"]);
13
+ return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnTitleSecondary)({ size: size, defaultMargin: defaultMargin }, [className]) }, other, { ref: ref }), children));
14
+ });
15
+ exports.TitleSecondary.displayName = 'TitleSecondary';
@@ -0,0 +1,2 @@
1
+ export * from './TitleSecondary';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./TitleSecondary"), exports);
5
+ tslib_1.__exportStar(require("./types"), exports);
@@ -0,0 +1,10 @@
1
+ import type { ElementType } from 'react';
2
+ import type { PolymorphicComponentPropsWithoutRef } from '../../../../../utils/polymorphicComponentWithRef';
3
+ import type { TITLE_DEFAULT_TAG } from '../../../constants';
4
+ import type { TitleSizeVariant } from '../../../entities';
5
+ export type TitleSecondaryBaseProps = {
6
+ size: TitleSizeVariant;
7
+ defaultMargin?: boolean;
8
+ 'data-testid'?: string;
9
+ };
10
+ export type TitleSecondaryProps<As extends ElementType = typeof TITLE_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<TitleSecondaryBaseProps, As>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type { ElementType } from 'react';
2
+ import type { PolymorphicComponentPropsWithoutRef } from '../../../../utils/polymorphicComponentWithRef';
3
+ import type { TITLE_DEFAULT_TAG } from '../../constants';
4
+ import type { TitleVariantValue } from '../../entities';
5
+ import type { TitleMainBaseProps } from '../variant/main';
6
+ import type { TitleSecondaryBaseProps } from '../variant/secondary';
7
+ export type TitleVariantBaseProps = TitleVariantValue<'main', TitleMainBaseProps> | TitleVariantValue<'secondary', TitleSecondaryBaseProps> | TitleVariantValue<undefined, TitleMainBaseProps>;
8
+ export type TitleVariantProps<As extends ElementType = typeof TITLE_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<TitleVariantBaseProps, As>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { TitleSizeVariant, TitleVariant } from './entities';
2
+ export declare const TITLE_DEFAULT_SIZE: TitleSizeVariant;
3
+ export declare const TITLE_DEFAULT_VARIANT: TitleVariant;
4
+ export declare const TITLE_DEFAULT_TAG = "div";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TITLE_DEFAULT_TAG = exports.TITLE_DEFAULT_VARIANT = exports.TITLE_DEFAULT_SIZE = void 0;
4
+ exports.TITLE_DEFAULT_SIZE = 'm';
5
+ exports.TITLE_DEFAULT_VARIANT = 'main';
6
+ exports.TITLE_DEFAULT_TAG = 'div';
@@ -0,0 +1,3 @@
1
+ import type { IconProps } from '@ozen-ui/icons';
2
+ import type { RenderContentType } from '../../../utils/renderContent';
3
+ export type TitleIcon = RenderContentType<IconProps>['content'];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from './icon';
2
+ export * from './variant';
3
+ export * from './size';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./icon"), exports);
5
+ tslib_1.__exportStar(require("./variant"), exports);
6
+ tslib_1.__exportStar(require("./size"), exports);
@@ -0,0 +1,2 @@
1
+ export declare const titleSizeVariant: readonly ["s", "m"];
2
+ export type TitleSizeVariant = (typeof titleSizeVariant)[number];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.titleSizeVariant = void 0;
4
+ exports.titleSizeVariant = ['s', 'm'];
@@ -0,0 +1,7 @@
1
+ export declare const titleVariant: readonly ["main", "secondary"];
2
+ export type TitleVariant = (typeof titleVariant)[number];
3
+ export type TitleVariantValue<Variant extends TitleVariant | undefined, Value> = (Variant extends undefined ? {
4
+ variant?: undefined;
5
+ } : {
6
+ variant: Variant;
7
+ }) & Value;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.titleVariant = void 0;
4
+ exports.titleVariant = ['main', 'secondary'];
@@ -0,0 +1,4 @@
1
+ export * from './entities';
2
+ export * from './modules';
3
+ export * from './Title';
4
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./entities"), exports);
5
+ tslib_1.__exportStar(require("./modules"), exports);
6
+ tslib_1.__exportStar(require("./Title"), exports);
7
+ tslib_1.__exportStar(require("./types"), exports);
@@ -0,0 +1,3 @@
1
+ import type { TitleIconButtonBaseProps } from './types';
2
+ export declare const cnTitleIconButton: import("@bem-react/classname").ClassNameFormatter;
3
+ export declare const TitleIconButton: import("../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<TitleIconButtonBaseProps, "button">;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleIconButton = exports.cnTitleIconButton = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importDefault(require("react"));
6
+ var classname_1 = require("../../../../utils/classname");
7
+ var polymorphicComponentWithRef_1 = require("../../../../utils/polymorphicComponentWithRef");
8
+ var IconButtonNext_1 = require("../../../IconButtonNext");
9
+ var TitleContext_1 = require("../../TitleContext");
10
+ var constants_1 = require("./constants");
11
+ exports.cnTitleIconButton = (0, classname_1.cn)('TitleIconButton');
12
+ exports.TitleIconButton = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (props, ref) {
13
+ var size = (0, TitleContext_1.useTitleContext)().size;
14
+ return (react_1.default.createElement(IconButtonNext_1.IconButton, tslib_1.__assign({ compressed: true, as: constants_1.TITLE_ICON_BUTTON_DEFAULT_TAG }, props, { ref: ref, size: size, className: (0, exports.cnTitleIconButton)('', [props.className]) })));
15
+ });
16
+ exports.TitleIconButton.displayName = 'TitleIconButton';
@@ -0,0 +1 @@
1
+ export declare const TITLE_ICON_BUTTON_DEFAULT_TAG = "button";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TITLE_ICON_BUTTON_DEFAULT_TAG = void 0;
4
+ exports.TITLE_ICON_BUTTON_DEFAULT_TAG = 'button';
@@ -0,0 +1,2 @@
1
+ export * from './TitleIconButton';
2
+ export * from './types';