@alfalab/core-components-international-phone-input 1.2.2 → 1.2.4

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 (170) hide show
  1. package/{esm/Component-89f0cb07.d.ts → Component-553146b2.d.ts} +1 -1
  2. package/Component-bdb4c6b9.d.ts +12 -0
  3. package/{Component-0816e61d.d.ts → Component-c29389e5.d.ts} +1 -1
  4. package/Component.mobile-ebda875c.d.ts +6 -0
  5. package/{cssm/index-8b2c2707.d.ts → Component.responsive-8566963f.d.ts} +4 -4
  6. package/Component.responsive.d.ts +10 -10
  7. package/Component.responsive.js +4 -4
  8. package/ResponsiveContext-08e5596c.d.ts +5 -0
  9. package/components/base-international-phone-input/Component.d.ts +3 -3
  10. package/components/base-international-phone-input/Component.js +1 -1
  11. package/components/base-international-phone-input/index.css +2 -2
  12. package/components/country-select/Component.js +1 -1
  13. package/components/country-select/index.css +8 -8
  14. package/components/flag-icon/component.js +1 -1
  15. package/components/flag-icon/index.css +3 -3
  16. package/components/select-field/component.js +1 -1
  17. package/components/select-field/index.css +9 -9
  18. package/{Component-89f0cb07.d.ts → cssm/Component-553146b2.d.ts} +1 -1
  19. package/cssm/Component-bdb4c6b9.d.ts +12 -0
  20. package/{esm/Component-0816e61d.d.ts → cssm/Component-c29389e5.d.ts} +1 -1
  21. package/cssm/Component.mobile-ebda875c.d.ts +6 -0
  22. package/{esm/index-8b2c2707.d.ts → cssm/Component.responsive-8566963f.d.ts} +4 -4
  23. package/cssm/Component.responsive.d.ts +10 -10
  24. package/cssm/Component.responsive.js +4 -4
  25. package/cssm/ResponsiveContext-08e5596c.d.ts +5 -0
  26. package/cssm/components/base-international-phone-input/Component.d.ts +3 -3
  27. package/cssm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  28. package/cssm/{Component.desktop.js → desktop/Component.desktop.js} +15 -15
  29. package/cssm/desktop/index.d.ts +1 -1
  30. package/cssm/desktop/index.js +3 -3
  31. package/cssm/index-553146b2.d.ts +2 -0
  32. package/cssm/{Component.desktop-0aa4e915.d.ts → index-8566963f.d.ts} +3 -2
  33. package/cssm/index-ebda875c.d.ts +140 -12
  34. package/cssm/index.js +3 -3
  35. package/cssm/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  36. package/cssm/{Component.mobile.js → mobile/Component.mobile.js} +12 -12
  37. package/cssm/mobile/index.d.ts +1 -1
  38. package/cssm/mobile/index.js +2 -2
  39. package/cssm/types.d.ts +1 -1
  40. package/cssm/typings-08e5596c.d.ts +56 -0
  41. package/cssm/{typings-89f0cb07.d.ts → typings-553146b2.d.ts} +2 -1
  42. package/cssm/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +719 -56
  43. package/cssm/utils-d2597f31.d.ts +1 -1
  44. package/{esm → desktop}/Component.desktop.d.ts +1 -1
  45. package/{Component.desktop.js → desktop/Component.desktop.js} +11 -11
  46. package/desktop/index.d.ts +1 -1
  47. package/desktop/index.js +3 -3
  48. package/{modern/Component-89f0cb07.d.ts → esm/Component-553146b2.d.ts} +1 -1
  49. package/esm/Component-bdb4c6b9.d.ts +12 -0
  50. package/{cssm/Component-0816e61d.d.ts → esm/Component-c29389e5.d.ts} +1 -1
  51. package/esm/Component.mobile-ebda875c.d.ts +6 -0
  52. package/{index-8b2c2707.d.ts → esm/Component.responsive-8566963f.d.ts} +4 -4
  53. package/esm/Component.responsive.d.ts +10 -10
  54. package/esm/Component.responsive.js +3 -3
  55. package/esm/ResponsiveContext-08e5596c.d.ts +5 -0
  56. package/esm/components/base-international-phone-input/Component.d.ts +3 -3
  57. package/esm/components/base-international-phone-input/Component.js +1 -1
  58. package/esm/components/base-international-phone-input/index.css +2 -2
  59. package/esm/components/country-select/Component.js +1 -1
  60. package/esm/components/country-select/index.css +8 -8
  61. package/esm/components/flag-icon/component.js +1 -1
  62. package/esm/components/flag-icon/index.css +3 -3
  63. package/esm/components/select-field/component.js +1 -1
  64. package/esm/components/select-field/index.css +9 -9
  65. package/{Component.desktop.d.ts → esm/desktop/Component.desktop.d.ts} +1 -1
  66. package/esm/{Component.desktop.js → desktop/Component.desktop.js} +9 -9
  67. package/esm/desktop/index.d.ts +1 -1
  68. package/esm/desktop/index.js +2 -2
  69. package/esm/index-553146b2.d.ts +2 -0
  70. package/{modern/Component.desktop-0aa4e915.d.ts → esm/index-8566963f.d.ts} +3 -2
  71. package/esm/index-ebda875c.d.ts +140 -12
  72. package/esm/index.js +3 -3
  73. package/{Component.mobile.d.ts → esm/mobile/Component.mobile.d.ts} +1 -1
  74. package/esm/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  75. package/esm/mobile/index.d.ts +1 -1
  76. package/esm/mobile/index.js +1 -1
  77. package/esm/types.d.ts +1 -1
  78. package/esm/typings-08e5596c.d.ts +56 -0
  79. package/esm/{typings-89f0cb07.d.ts → typings-553146b2.d.ts} +2 -1
  80. package/esm/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +719 -56
  81. package/esm/utils-d2597f31.d.ts +1 -1
  82. package/index-553146b2.d.ts +2 -0
  83. package/{esm/Component.desktop-0aa4e915.d.ts → index-8566963f.d.ts} +3 -2
  84. package/index-ebda875c.d.ts +140 -12
  85. package/index.js +3 -3
  86. package/{esm → mobile}/Component.mobile.d.ts +1 -1
  87. package/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  88. package/mobile/index.d.ts +1 -1
  89. package/mobile/index.js +2 -2
  90. package/{cssm/Component-89f0cb07.d.ts → modern/Component-553146b2.d.ts} +1 -1
  91. package/modern/Component-bdb4c6b9.d.ts +12 -0
  92. package/modern/{Component-0816e61d.d.ts → Component-c29389e5.d.ts} +1 -1
  93. package/modern/Component.mobile-ebda875c.d.ts +6 -0
  94. package/modern/{index-8b2c2707.d.ts → Component.responsive-8566963f.d.ts} +4 -4
  95. package/modern/Component.responsive.d.ts +10 -10
  96. package/modern/Component.responsive.js +3 -3
  97. package/modern/ResponsiveContext-08e5596c.d.ts +5 -0
  98. package/modern/components/base-international-phone-input/Component.d.ts +3 -3
  99. package/modern/components/base-international-phone-input/Component.js +1 -1
  100. package/modern/components/base-international-phone-input/index.css +2 -2
  101. package/modern/components/country-select/Component.js +1 -1
  102. package/modern/components/country-select/index.css +8 -8
  103. package/modern/components/flag-icon/component.js +1 -1
  104. package/modern/components/flag-icon/index.css +3 -3
  105. package/modern/components/select-field/component.js +1 -1
  106. package/modern/components/select-field/index.css +9 -9
  107. package/modern/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  108. package/modern/{Component.desktop.js → desktop/Component.desktop.js} +9 -9
  109. package/modern/desktop/index.d.ts +1 -1
  110. package/modern/desktop/index.js +2 -2
  111. package/modern/index-553146b2.d.ts +2 -0
  112. package/{Component.desktop-0aa4e915.d.ts → modern/index-8566963f.d.ts} +3 -2
  113. package/modern/index-ebda875c.d.ts +140 -12
  114. package/modern/index.js +3 -3
  115. package/modern/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  116. package/modern/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  117. package/modern/mobile/index.d.ts +1 -1
  118. package/modern/mobile/index.js +1 -1
  119. package/modern/types.d.ts +1 -1
  120. package/modern/typings-08e5596c.d.ts +56 -0
  121. package/modern/{typings-89f0cb07.d.ts → typings-553146b2.d.ts} +2 -1
  122. package/modern/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +719 -56
  123. package/modern/utils-d2597f31.d.ts +1 -1
  124. package/package.json +4 -4
  125. package/src/Component.responsive.tsx +2 -2
  126. package/src/{Component.desktop.tsx → desktop/Component.desktop.tsx} +3 -3
  127. package/src/desktop/index.ts +1 -1
  128. package/src/{Component.mobile.tsx → mobile/Component.mobile.tsx} +5 -2
  129. package/src/mobile/index.ts +1 -1
  130. package/types.d.ts +1 -1
  131. package/typings-08e5596c.d.ts +56 -0
  132. package/{typings-89f0cb07.d.ts → typings-553146b2.d.ts} +2 -1
  133. package/{typings-0816e61d.d.ts → typings-c29389e5.d.ts} +719 -56
  134. package/utils-d2597f31.d.ts +1 -1
  135. package/Component-8b2c2707.d.ts +0 -71
  136. package/Component.responsive-785df74d.d.ts +0 -28
  137. package/cssm/Component-8b2c2707.d.ts +0 -71
  138. package/cssm/Component.responsive-785df74d.d.ts +0 -28
  139. package/cssm/index-72dda473.d.ts +0 -12
  140. package/cssm/index-89f0cb07.d.ts +0 -2
  141. package/cssm/index-c44170fe.d.ts +0 -2
  142. package/cssm/index-c76d6398.d.ts +0 -319
  143. package/cssm/types-72dda473.d.ts +0 -276
  144. package/cssm/typings-c44170fe.d.ts +0 -91
  145. package/esm/Component-8b2c2707.d.ts +0 -71
  146. package/esm/Component.responsive-785df74d.d.ts +0 -28
  147. package/esm/index-72dda473.d.ts +0 -12
  148. package/esm/index-89f0cb07.d.ts +0 -2
  149. package/esm/index-c44170fe.d.ts +0 -2
  150. package/esm/index-c76d6398.d.ts +0 -319
  151. package/esm/types-72dda473.d.ts +0 -276
  152. package/esm/typings-c44170fe.d.ts +0 -91
  153. package/index-72dda473.d.ts +0 -12
  154. package/index-89f0cb07.d.ts +0 -2
  155. package/index-c44170fe.d.ts +0 -2
  156. package/index-c76d6398.d.ts +0 -319
  157. package/modern/Component-8b2c2707.d.ts +0 -71
  158. package/modern/Component.responsive-785df74d.d.ts +0 -28
  159. package/modern/index-72dda473.d.ts +0 -12
  160. package/modern/index-89f0cb07.d.ts +0 -2
  161. package/modern/index-c44170fe.d.ts +0 -2
  162. package/modern/index-c76d6398.d.ts +0 -319
  163. package/modern/types-72dda473.d.ts +0 -276
  164. package/modern/typings-c44170fe.d.ts +0 -91
  165. package/types-72dda473.d.ts +0 -276
  166. package/typings-c44170fe.d.ts +0 -91
  167. /package/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  168. /package/cssm/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  169. /package/esm/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  170. /package/modern/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
@@ -1,71 +1,470 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react-transition-group" />
3
3
  import React from "react";
4
- import { FC, ReactNode, CSSProperties, MutableRefObject, RefObject, AriaAttributes, FocusEvent, MouseEvent, ReactElement, RefAttributes, SVGProps } from "react";
5
- import { BottomSheetProps } from "./types-72dda473";
6
- import { BottomSheetProps as BottomSheetProps$0 } from "./types-72dda473";
7
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, ButtonHTMLAttributes, ElementType, FC, CSSProperties, MutableRefObject, ForwardRefExoticComponent, RefAttributes, AnchorHTMLAttributes, AriaAttributes, FocusEvent, MouseEvent, SVGProps } from "react";
5
+ import { HandledEvents } from "react-swipeable/es/types";
6
+ import { TransitionProps } from "react-transition-group/Transition";
8
7
  import { BaseModalProps, BaseModalContext } from "./index-bdb4c6b9";
9
- import { NavigationBarProps } from "./index-c76d6398";
8
+ import { BaseFormControlProps, BackdropProps } from "./index-ebda875c";
10
9
  import { CSSTransitionProps } from "react-transition-group/CSSTransition";
11
10
  import { BasePlacement, VariationPlacement } from "@popperjs/core";
12
11
  import { SwipeableHandlers } from "react-swipeable";
13
- import { BackdropProps } from "./index-ebda875c";
14
- import { FormControlProps } from "./index-c44170fe";
12
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
13
+ import { ButtonProps } from "./index-553146b2";
14
+ import { ContentProps } from "./typings-08e5596c";
15
+ import { ModalResponsiveProps as ModalProps } from "./typings-08e5596c";
15
16
  import { InputProps } from "@alfalab/core-components-input";
16
- import { UseSelectWithApplyProps } from "./typings-c44170fe";
17
- declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
18
- declare const CLOSE_OFFSET = 0.2;
19
- declare const HEADER_OFFSET = 24;
20
- type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
21
- type ModalDesktopProps = BaseModalProps & {
17
+ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
18
+ /**
19
+ * Текст после иконки
20
+ */
21
+ text?: string;
22
+ /**
23
+ * Дополнительный класс
24
+ */
25
+ className?: string;
26
+ /**
27
+ * Вид компонента
28
+ */
29
+ view: "mobile" | "desktop";
30
+ /**
31
+ * Прозрачность текста
32
+ */
33
+ textOpacity?: number;
34
+ /**
35
+ * Обработчик клика
36
+ */
37
+ onClick?: () => void;
38
+ }
39
+ interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
40
+ /**
41
+ * Вид компонента
42
+ */
43
+ view: "desktop" | "mobile";
44
+ /**
45
+ * Дополнительный класс
46
+ */
47
+ className?: string;
48
+ /**
49
+ * Позиция крестика
50
+ */
51
+ align?: "left" | "right";
52
+ /**
53
+ * Фиксирует крестик
54
+ */
55
+ sticky?: boolean;
56
+ /**
57
+ * Иконка
58
+ */
59
+ icon?: ElementType;
60
+ /**
61
+ * Идентификатор для систем автоматизированного тестирования
62
+ */
63
+ dataTestId?: string;
64
+ /**
65
+ * Коллбэк закрытия.
66
+ */
67
+ onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
68
+ }
69
+ type NavigationBarProps = {
70
+ /**
71
+ * Контент шапки
72
+ */
73
+ children?: ReactNode;
74
+ /**
75
+ * Заголовок шапки
76
+ */
77
+ title?: string;
78
+ /**
79
+ * Подзаголовок (доступен только в мобильной версии)
80
+ */
81
+ subtitle?: ReactNode;
82
+ /**
83
+ * Размер заголовка (compact доступен только в мобильной версии)
84
+ */
85
+ titleSize?: "default" | "compact";
86
+ /**
87
+ * Доп. класс для аддонов
88
+ */
89
+ addonClassName?: string;
90
+ /**
91
+ * Слот слева
92
+ */
93
+ leftAddons?: ReactNode;
22
94
  /**
23
- * Ширина модального окна
24
- * @default "m"
95
+ * Слот справа
25
96
  */
26
- size?: "s" | "m" | "l" | "xl" | "fullscreen";
97
+ rightAddons?: ReactNode;
27
98
  /**
28
- * Растягивает модальное окно на весь экран
29
- * @deprecated Используйте размер fullscreen
99
+ * Дополнительный класс для closer
30
100
  */
31
- fullscreen?: boolean;
101
+ closerClassName?: string;
32
102
  /**
33
- * Фиксирует позицию модального окна после открытия,
34
- * предотвращая скачки, если контент внутри будет меняться
103
+ * Слот снизу
35
104
  */
36
- fixedPosition?: boolean;
105
+ bottomAddons?: ReactNode;
37
106
  /**
38
- * Управление наличием закрывающего крестика
39
- * @default false
107
+ * Наличие компонента крестика
40
108
  */
41
109
  hasCloser?: boolean;
42
- };
43
- type ModalResponsiveProps = ModalDesktopProps & {
44
110
  /**
45
- * Контрольная точка, с нее начинается desktop версия
46
- * @default 1024
111
+ * Наличие кнопки "Назад"
47
112
  */
48
- breakpoint?: number;
49
- };
50
- type View = "desktop" | "mobile";
51
- type TResponsiveModalContext = {
52
- view: View;
53
- size: NonNullable<ModalDesktopProps["size"]>;
113
+ hasBackButton?: boolean;
114
+ /**
115
+ * Дополнительный класс для правого аддона
116
+ */
117
+ backButtonClassName?: string;
118
+ /**
119
+ * Дополнительные пропсы для кнопки "Назад"
120
+ */
121
+ backButtonProps?: Omit<BackArrowAddonProps, "view" | "textOpacity" | "onClick">;
122
+ /**
123
+ * Дополнительный класс
124
+ */
125
+ className?: string;
126
+ /**
127
+ * Дополнительный класс для контента
128
+ */
129
+ contentClassName?: string;
130
+ /**
131
+ * Дополнительный класс для нижнего аддона
132
+ */
133
+ bottomAddonsClassName?: string;
134
+ /**
135
+ * Выравнивание заголовка
136
+ */
137
+ align?: "left" | "center";
138
+ /**
139
+ * Обрезать ли заголовок
140
+ */
141
+ trim?: boolean;
142
+ /**
143
+ * Фиксирует шапку
144
+ */
145
+ sticky?: boolean;
146
+ /**
147
+ * Идентификатор для систем автоматизированного тестирования
148
+ */
149
+ dataTestId?: string;
150
+ /**
151
+ * Фоновое изображение
152
+ */
153
+ imageUrl?: string;
154
+ /**
155
+ * Иконка closer.
156
+ */
157
+ closerIcon?: React.ElementType;
158
+ /**
159
+ * Обработчик закрытия
160
+ */
161
+ onClose?: CloserProps["onClose"];
162
+ /**
163
+ * обработчик клика по кнопке "назад"
164
+ */
165
+ onBack?: () => void;
166
+ /**
167
+ * Вид шапки - мобильный или десктоп
168
+ */
169
+ view: "desktop" | "mobile";
170
+ /**
171
+ * Ссылка на родительскую ноду overflow: auto
172
+ */
173
+ scrollableParentRef?: React.RefObject<HTMLDivElement>;
54
174
  };
55
- type ContentProps = {
175
+ type BackgroundColorType = "accent" | "info" | "attention-muted" | "positive-muted" | "negative-muted" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "quaternary" | "quaternary-inverted" | "specialbg-component" | "specialbg-component-inverted" | "specialbg-primary-grouped" | "specialbg-secondary-grouped" | "specialbg-tertiary-grouped" | "specialbg-secondary-transparent" | "specialbg-secondary-transparent-inverted" | "specialbg-tertiary-transparent" | "specialbg-tertiary-transparent-inverted";
176
+ type BottomSheetTitleAlign = "center" | "left";
177
+ type BottomSheetProps = {
56
178
  /**
57
179
  * Контент
58
180
  */
59
181
  children?: ReactNode;
182
+ /**
183
+ * Управление видимостью
184
+ */
185
+ open: boolean;
186
+ /**
187
+ * Заголовок
188
+ */
189
+ title?: ReactNode;
190
+ /**
191
+ * Размер заголовка
192
+ */
193
+ titleSize?: NavigationBarProps["titleSize"];
194
+ /**
195
+ * Подзаголовок.
196
+ */
197
+ subtitle?: NavigationBarProps["subtitle"];
198
+ /**
199
+ * Кнопка действия (обычно, это кнопка закрытия)
200
+ */
201
+ actionButton?: ReactNode;
202
+ /**
203
+ * Нода, компонент или функция возвращающая их
204
+ *
205
+ * Контейнер к которому будут добавляться порталы
206
+ */
207
+ container?: BaseModalProps["container"];
208
+ /**
209
+ * Рендерить ли в контейнер через портал.
210
+ */
211
+ usePortal?: BaseModalProps["usePortal"];
60
212
  /**
61
213
  * Дополнительный класс
62
214
  */
63
215
  className?: string;
64
216
  /**
65
- * Растягивает контент на всю высоту
217
+ * Дополнительный класс
218
+ */
219
+ contentClassName?: string;
220
+ /**
221
+ * Дополнительные пропсы на контейнер.
222
+ */
223
+ containerProps?: HTMLAttributes<HTMLDivElement>;
224
+ /**
225
+ * Дополнительный класс
226
+ */
227
+ containerClassName?: string;
228
+ /**
229
+ * Цвет фона
230
+ */
231
+ backgroundColor?: Extract<BackgroundColorType, "primary" | "secondary">;
232
+ /**
233
+ * Дополнительный класс шапки
234
+ */
235
+ headerClassName?: string;
236
+ /**
237
+ * Дополнительный класс футера
238
+ */
239
+ footerClassName?: string;
240
+ /**
241
+ * Дополнительный класс для аддонов
242
+ */
243
+ addonClassName?: string;
244
+ /**
245
+ * Дополнительный класс для компонента крестика
246
+ */
247
+ closerClassName?: string;
248
+ /**
249
+ * Дополнительный класс для компонента стрелки назад
250
+ */
251
+ backerClassName?: string;
252
+ /**
253
+ * Дополнительный класс для компонента модального окна
254
+ */
255
+ modalClassName?: string;
256
+ /**
257
+ * Дополнительный класс для обертки модального окна
258
+ */
259
+ modalWrapperClassName?: string;
260
+ /**
261
+ * Дополнительный класс для маркера
262
+ */
263
+ swipeableMarkerClassName?: string;
264
+ /**
265
+ * Кастомный маркер
266
+ */
267
+ swipeableMarker?: ReactElement;
268
+ /**
269
+ * TransitionProps, прокидываются в компонент CSSTransitionProps.
270
+ */
271
+ transitionProps?: Partial<TransitionProps>;
272
+ /**
273
+ * Идентификатор для систем автоматизированного тестирования.
274
+ * Для заголовка используется модификатор -header
275
+ */
276
+ dataTestId?: string;
277
+ /**
278
+ * z-index компонента
279
+ */
280
+ zIndex?: number;
281
+ /**
282
+ * Будет ли свайпаться шторка
283
+ * @default true
284
+ */
285
+ swipeable?: boolean;
286
+ /**
287
+ * Будет ли свайпаться контент
288
+ */
289
+ swipeableContent?: boolean;
290
+ /**
291
+ * Порог свайпа
292
+ */
293
+ swipeThreshold?: number;
294
+ /**
295
+ * Слот слева
296
+ */
297
+ leftAddons?: ReactNode;
298
+ /**
299
+ * Слот справа
300
+ */
301
+ rightAddons?: ReactNode;
302
+ /**
303
+ * Слот снизу
304
+ */
305
+ bottomAddons?: ReactNode;
306
+ /**
307
+ * Наличие компонента крестика
308
+ */
309
+ hasCloser?: boolean;
310
+ /**
311
+ * Наличие компонента стрелки назад
312
+ */
313
+ hasBacker?: boolean;
314
+ /**
315
+ * Дополнительные пропсы для кнопки "Назад"
316
+ */
317
+ backButtonProps?: NavigationBarProps["backButtonProps"];
318
+ /**
319
+ * Выравнивание заголовка
320
+ */
321
+ titleAlign?: BottomSheetTitleAlign;
322
+ /**
323
+ * Фиксирует шапку
324
+ */
325
+ stickyHeader?: boolean;
326
+ /**
327
+ * Фиксирует футер
328
+ */
329
+ stickyFooter?: boolean;
330
+ /**
331
+ * Высота шторки
332
+ */
333
+ initialHeight?: "default" | "full";
334
+ /**
335
+ * Будет ли виден оверлэй
336
+ */
337
+ hideOverlay?: boolean;
338
+ /**
339
+ * Будет ли видна шапка
340
+ */
341
+ hideHeader?: boolean;
342
+ /**
343
+ * Будет ли обрезан заголовок
344
+ */
345
+ trimTitle?: boolean;
346
+ /**
347
+ * Запретить закрытие шторки кликом на оверлэй
348
+ */
349
+ disableOverlayClick?: boolean;
350
+ /**
351
+ * Отключает блокировку скролла при открытии модального окна
352
+ */
353
+ disableBlockingScroll?: boolean;
354
+ /**
355
+ * Отключает ловушку фокуса
356
+ */
357
+ disableFocusLock?: boolean;
358
+ /**
359
+ * @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
360
+ * Не анимировать шторку при изменении размера вьюпорта
361
+ */
362
+ ignoreScreenChange?: boolean;
363
+ /**
364
+ * Свойства для Бэкдропа
365
+ */
366
+ backdropProps?: BaseModalProps["backdropProps"];
367
+ /**
368
+ * Реф на контейнер, в котором происходит скролл
369
+ */
370
+ scrollableContainerRef?: RefObject<HTMLElement>;
371
+ /**
372
+ * Реф для управления компонентом.
373
+ */
374
+ bottomSheetInstanceRef?: RefObject<{
375
+ scrollToArea: (idx: number) => void;
376
+ }>;
377
+ /**
378
+ * Реф на контейнер, в котором находится шторка
379
+ */
380
+ sheetContainerRef?: RefObject<HTMLElement>;
381
+ /**
382
+ * Магнитные области видимой высоты шторки.
383
+ * Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
384
+ * По-умолчанию -[0, window.innerHeight - '24px']
385
+ * массив должен состоять минимум из 2 элементов
386
+ */
387
+ magneticAreas?: Array<number | string>;
388
+ /**
389
+ * Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
390
+ */
391
+ initialActiveAreaIndex?: number;
392
+ /**
393
+ * Отключает скролл контентной области.
394
+ */
395
+ scrollLocked?: boolean;
396
+ /**
397
+ * Скрыть скроллбар внутри шторки
398
+ */
399
+ hideScrollbar?: boolean;
400
+ /**
401
+ * Верхний отступ шторки, если она открыта на максимальную высоту
402
+ */
403
+ headerOffset?: number;
404
+ /**
405
+ * Содержимое bottom-sheet всегда в DOM
406
+ */
407
+ keepMounted?: boolean;
408
+ /**
409
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
410
+ */
411
+ disableAutoFocus?: boolean;
412
+ /**
413
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
414
+ */
415
+ disableRestoreFocus?: boolean;
416
+ /**
417
+ * Отключает вызов `onClose` при нажатии Escape
418
+ */
419
+ disableEscapeKeyDown?: boolean;
420
+ /**
421
+ * Обработчик закрытия
422
+ */
423
+ onClose: () => void;
424
+ /**
425
+ * Обработчик нажатия на стрелку назад
426
+ */
427
+ onBack?: () => void;
428
+ /**
429
+ * Вызывается в начале анимации притягивания к одной из `magneticAreas`
430
+ */
431
+ onMagnetize?: (index: number) => void;
432
+ /**
433
+ * Вызывается после окончания анимации притягивания
434
+ */
435
+ onMagnetizeEnd?: (index: number) => void;
436
+ /**
437
+ * Вызывается при изменении положения шторки
438
+ */
439
+ onOffsetChange?: (offset: number, percent: number) => void;
440
+ /**
441
+ * Вызывается в начале свайпа
442
+ */
443
+ onSwipeStart?: (event: HandledEvents) => void;
444
+ /**
445
+ * Вызывается после окончания свайпа
446
+ */
447
+ onSwipeEnd?: (event: HandledEvents | null) => void;
448
+ };
449
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
450
+ declare const CLOSE_OFFSET = 0.2;
451
+ declare const HEADER_OFFSET = 24;
452
+ type FormControlProps = Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
453
+ /**
454
+ * Контрольная точка, с нее начинается desktop версия
455
+ * @default 1024
456
+ */
457
+ breakpoint?: number;
458
+ /**
459
+ * Значение по-умолчанию для хука useMatchMedia
66
460
  */
67
- flex?: boolean;
461
+ defaultMatchMediaValue?: boolean | (() => boolean);
68
462
  };
463
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
464
+ breakpoint?: number | undefined;
465
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
466
+ } & React.RefAttributes<HTMLDivElement>>;
467
+ type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
69
468
  type FooterProps = {
70
469
  /**
71
470
  * Контент футера
@@ -88,17 +487,43 @@ type FooterProps = {
88
487
  */
89
488
  gap?: 16 | 24 | 32;
90
489
  };
91
- declare const ModalResponsive: React.ForwardRefExoticComponent<BaseModalProps & {
490
+ interface ControlsProps {
491
+ /**
492
+ * Основной слот
493
+ */
494
+ primary?: ReactNode;
495
+ /**
496
+ * Дополнительный слот
497
+ */
498
+ secondary?: ReactNode;
499
+ /**
500
+ * Выравнивание элементов футера
501
+ * @default start
502
+ */
503
+ layout?: "start" | "center" | "space-between" | "column";
504
+ /**
505
+ * Выравнивание элементов футера (мобильный view)
506
+ * @default start
507
+ */
508
+ mobileLayout?: "start" | "center" | "space-between" | "column";
509
+ /**
510
+ * Отступы между элементами футера
511
+ */
512
+ gap?: 16 | 24 | 32;
513
+ }
514
+ declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
92
515
  size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
93
516
  fullscreen?: boolean | undefined;
94
517
  fixedPosition?: boolean | undefined;
95
518
  hasCloser?: boolean | undefined;
96
519
  } & {
97
520
  breakpoint?: number | undefined;
521
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
98
522
  } & React.RefAttributes<HTMLDivElement>> & {
99
523
  Header: React.FC<HeaderProps>;
100
- Content: React.FC<ContentProps>;
524
+ Content: React.FC<import("./typings-08e5596c").ContentProps>;
101
525
  Footer: React.FC<FooterProps>;
526
+ Controls: React.FC<ControlsProps>;
102
527
  };
103
528
  declare const ModalContext: import("react").Context<BaseModalContext>;
104
529
  type RefElement = HTMLElement | null;
@@ -177,7 +602,7 @@ type PopoverProps = {
177
602
  /**
178
603
  * Хранит функцию, с помощью которой можно обновить положение компонента
179
604
  */
180
- update?: MutableRefObject<() => void>;
605
+ update?: MutableRefObject<(() => void) | undefined>;
181
606
  /**
182
607
  * Дополнительный класс
183
608
  */
@@ -218,14 +643,6 @@ type HeaderProps$0 = Omit<NavigationBarProps, "view" | "size"> & {
218
643
  headerOffset: number;
219
644
  };
220
645
  declare const Header$0: FC<HeaderProps$0>;
221
- declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
222
- size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
223
- fullscreen?: boolean | undefined;
224
- fixedPosition?: boolean | undefined;
225
- hasCloser?: boolean | undefined;
226
- } & {
227
- view: View;
228
- } & React.RefAttributes<HTMLDivElement>>;
229
646
  type SwipeableBackdropProps = BackdropProps & {
230
647
  /**
231
648
  * Прозрачность бэкдропа
@@ -241,8 +658,247 @@ type SwipeableBackdropProps = BackdropProps & {
241
658
  opacityTimeout?: number;
242
659
  };
243
660
  declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
661
+ declare const colors: readonly [
662
+ "tertiary",
663
+ "disabled",
664
+ "accent",
665
+ "primary",
666
+ "attention",
667
+ "positive",
668
+ "secondary",
669
+ "tertiary-inverted",
670
+ "primary-inverted",
671
+ "secondary-inverted",
672
+ "link",
673
+ "negative",
674
+ "static-primary-light",
675
+ "static-secondary-light",
676
+ "static-tertiary-light",
677
+ "static-primary-dark",
678
+ "static-secondary-dark",
679
+ "static-tertiary-dark",
680
+ "static-accent"
681
+ ];
682
+ type Color = (typeof colors)[number];
683
+ type NativeProps = HTMLAttributes<HTMLSpanElement>;
684
+ type TextBaseProps = {
685
+ /**
686
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
687
+ */
688
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "component-primary" | "component-secondary" | "caps";
689
+ /**
690
+ * Цвет текста
691
+ */
692
+ color?: Color;
693
+ /**
694
+ * Толщина шрифта
695
+ */
696
+ weight?: "regular" | "medium" | "bold";
697
+ /**
698
+ * Делает цифры моноширинными
699
+ */
700
+ monospaceNumbers?: boolean;
701
+ /**
702
+ * HTML тег
703
+ */
704
+ tag?: "span" | "div";
705
+ /**
706
+ * Css-класс для стилизации (native prop)
707
+ */
708
+ className?: string;
709
+ /**
710
+ * Id компонента для тестов
711
+ */
712
+ dataTestId?: string;
713
+ /**
714
+ * Контент (native prop)
715
+ */
716
+ children?: React.ReactNode;
717
+ /**
718
+ * Добавляет отступы к тэгу 'p'
719
+ */
720
+ defaultMargins?: never;
721
+ /**
722
+ * Количество строк
723
+ */
724
+ rowLimit?: 1 | 2 | 3;
725
+ /**
726
+ * Показать скелетон
727
+ */
728
+ showSkeleton?: boolean;
729
+ /**
730
+ * Пропы для скелетона
731
+ */
732
+ skeletonProps?: TextSkeletonProps;
733
+ };
734
+ type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
735
+ tag?: "p";
736
+ defaultMargins?: boolean;
737
+ };
738
+ type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
739
+ type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
740
+ type TitleProps = Omit<NativeProps$0, "color"> & {
741
+ /**
742
+ * HTML тег
743
+ */
744
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
745
+ /**
746
+ * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
747
+ */
748
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
749
+ /**
750
+ * Цвет текста
751
+ */
752
+ color?: Color;
753
+ /**
754
+ * Толщина шрифта
755
+ */
756
+ weight?: "regular" | "medium" | "bold";
757
+ /**
758
+ * Шрифт текста
759
+ */
760
+ font?: "styrene" | "system";
761
+ /**
762
+ * Добавляет отступы
763
+ */
764
+ defaultMargins?: boolean;
765
+ /**
766
+ * Css-класс для стилизации (native prop)
767
+ */
768
+ className?: string;
769
+ /**
770
+ * Id компонента для тестов
771
+ */
772
+ dataTestId?: string;
773
+ /**
774
+ * Контент (native prop)
775
+ */
776
+ children?: React.ReactNode;
777
+ /**
778
+ * Количество строк
779
+ */
780
+ rowLimit?: 1 | 2 | 3;
781
+ /**
782
+ * Показать скелетон
783
+ */
784
+ showSkeleton?: boolean;
785
+ /**
786
+ * Пропы для скелетона
787
+ */
788
+ skeletonProps?: TextSkeletonProps;
789
+ };
790
+ type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
791
+ declare const Typography: {
792
+ Title: FC<TitleProps>;
793
+ Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
794
+ TitleResponsive: FC<TitleProps>;
795
+ TitleMobile: FC<TitleMobileProps>;
796
+ };
797
+ declare const typographyPresets: {
798
+ mobile: {
799
+ list: {
800
+ text: {
801
+ primary: {
802
+ tag: string;
803
+ view: string;
804
+ };
805
+ secondary: {
806
+ tag: string;
807
+ color: string;
808
+ view: string;
809
+ };
810
+ };
811
+ };
812
+ };
813
+ };
814
+ declare const TitleResponsive: FC<TitleProps>;
815
+ type IconButtonProps = {
816
+ /**
817
+ * Компонент иконки
818
+ */
819
+ icon: ElementType<{
820
+ className?: string;
821
+ }> | ReactElement;
822
+ /**
823
+ * Тип кнопки
824
+ */
825
+ view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
826
+ /**
827
+ * Размер компонента
828
+ */
829
+ size?: "xxs" | "xs" | "s";
830
+ /**
831
+ * Дополнительный класс
832
+ */
833
+ className?: string;
834
+ /**
835
+ * Выравнивание иконки
836
+ * @default 'center'
837
+ */
838
+ alignIcon?: "left" | "center" | "right";
839
+ /**
840
+ * Идентификатор для систем автоматизированного тестирования
841
+ */
842
+ dataTestId?: string;
843
+ /**
844
+ * Набор цветов для компонента
845
+ */
846
+ colors?: "default" | "inverted";
847
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
848
+ declare const IconButton: React.ForwardRefExoticComponent<{
849
+ icon: ElementType<{
850
+ className?: string;
851
+ }> | ReactElement;
852
+ view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
853
+ size?: "s" | "xs" | "xxs" | undefined;
854
+ className?: string | undefined;
855
+ alignIcon?: "center" | "right" | "left" | undefined;
856
+ dataTestId?: string | undefined;
857
+ colors?: "default" | "inverted" | undefined;
858
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "breakpoint" | "href" | "Component" | "loading"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
244
859
  declare const Content: FC<ContentProps>;
245
- declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
860
+ type UseSelectWithApplyProps = {
861
+ /**
862
+ * Список выбранных пунктов
863
+ */
864
+ selected: BaseSelectProps["selected"];
865
+ /**
866
+ * Список вариантов выбора
867
+ */
868
+ options: BaseSelectProps["options"];
869
+ /**
870
+ * Обработчик выбора
871
+ */
872
+ onChange: BaseSelectProps["onChange"];
873
+ /**
874
+ * Компонент выпадающего меню
875
+ */
876
+ OptionsList?: BaseSelectProps["OptionsList"];
877
+ /**
878
+ * Пропсы, которые будут прокинуты в компонент списка
879
+ */
880
+ optionsListProps?: BaseSelectProps["optionsListProps"];
881
+ /**
882
+ * Включает отображение поиска
883
+ */
884
+ showSearch?: BaseSelectProps["showSearch"];
885
+ /**
886
+ * Настройки поиска
887
+ */
888
+ searchProps?: BaseSelectProps["searchProps"];
889
+ /**
890
+ * Показывать кнопку очистки
891
+ */
892
+ showClear?: boolean;
893
+ /**
894
+ * Показывать пункт "Выбрать все"
895
+ */
896
+ showSelectAll?: boolean;
897
+ /**
898
+ * Показывать пункт "Выбрать все" в заголовке списка
899
+ */
900
+ showHeaderWithSelectAll?: boolean;
901
+ };
246
902
  type AnyObject = Record<string, any>;
247
903
  type OptionShape = {
248
904
  /**
@@ -284,7 +940,10 @@ type BaseSelectChangePayload = {
284
940
  };
285
941
  type BaseSelectProps = {
286
942
  /**
287
- * Идентификатор для систем автоматизированного тестирования
943
+ * Идентификатор для систем автоматизированного тестирования.
944
+ * Для пункта меню используется модификатор -option, компонента поиска -search,
945
+ * компонента выпадающего меню -options-list, компонента BottomSheet -bottom-sheet,
946
+ * компонента поля -field, компонета FormControl -field-form-control
288
947
  */
289
948
  dataTestId?: string;
290
949
  /**
@@ -482,11 +1141,11 @@ type BaseSelectProps = {
482
1141
  name?: string;
483
1142
  }) => void;
484
1143
  /**
485
- * Обработчик фокуса поля
1144
+ * Обработчик блюра поля
486
1145
  */
487
1146
  onBlur?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
488
1147
  /**
489
- * Обработчик блюра поля
1148
+ * Обработчик фокуса поля
490
1149
  */
491
1150
  onFocus?: (event: FocusEvent<HTMLDivElement | HTMLInputElement>) => void;
492
1151
  /**
@@ -849,7 +1508,7 @@ type BottomSheetSelectMobileProps = {
849
1508
  /**
850
1509
  * Дополнительные пропсы шторки
851
1510
  */
852
- bottomSheetProps?: Partial<BottomSheetProps$0>;
1511
+ bottomSheetProps?: Partial<BottomSheetProps>;
853
1512
  };
854
1513
  type ModalSelectMobileProps = {
855
1514
  /**
@@ -889,6 +1548,10 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
889
1548
  */
890
1549
  defaultMatchMediaValue?: boolean | (() => boolean);
891
1550
  };
892
- export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, ModalResponsive as Modal, ModalResponsiveProps as ModalProps, ModalContext, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Content, ResponsiveContext, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
893
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-72dda473";
894
- export type { HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, ContentProps as ModalContentProps };
1551
+ export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Typography, typographyPresets, TitleResponsive, IconButtonProps, IconButton, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
1552
+ export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TitleProps, TextProps, Color };
1553
+ export { ModalResponsiveProps as ModalProps } from "./typings-08e5596c";
1554
+ export type { ContentProps as ModalContentProps } from "./typings-08e5596c";
1555
+ export * from "./useSkeleton-1b036d4b";
1556
+ export * from "./Component.desktop-ebda875c";
1557
+ export * from "./Component.mobile-ebda875c";