@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,319 +0,0 @@
1
- /// <reference types="react" />
2
- /* eslint-disable complexity */
3
- import React from "react";
4
- import { ReactNode, ButtonHTMLAttributes, ElementType, FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
5
- import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
6
- interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
7
- /**
8
- * Вид компонента
9
- */
10
- view: "desktop" | "mobile";
11
- /**
12
- * Дополнительный класс
13
- */
14
- className?: string;
15
- /**
16
- * Позиция крестика
17
- */
18
- align?: "left" | "right";
19
- /**
20
- * Фиксирует крестик
21
- */
22
- sticky?: boolean;
23
- /**
24
- * Иконка
25
- */
26
- icon?: ElementType;
27
- /**
28
- * Идентификатор для систем автоматизированного тестирования
29
- */
30
- dataTestId?: string;
31
- /**
32
- * Коллбэк закрытия.
33
- */
34
- onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
35
- }
36
- type NavigationBarProps = {
37
- /**
38
- * Контент шапки
39
- */
40
- children?: ReactNode;
41
- /**
42
- * Заголовок шапки
43
- */
44
- title?: string;
45
- /**
46
- * Подзаголовок (доступен только в мобильной версии)
47
- */
48
- subtitle?: ReactNode;
49
- /**
50
- * Размер заголовка (compact доступен только в мобильной версии)
51
- */
52
- titleSize?: "default" | "compact";
53
- /**
54
- * Доп. класс для аддонов
55
- */
56
- addonClassName?: string;
57
- /**
58
- * Слот слева
59
- */
60
- leftAddons?: ReactNode;
61
- /**
62
- * Слот справа
63
- */
64
- rightAddons?: ReactNode;
65
- /**
66
- * Дополнительный класс для closer
67
- */
68
- closerClassName?: string;
69
- /**
70
- * Слот снизу
71
- */
72
- bottomAddons?: ReactNode;
73
- /**
74
- * Наличие компонента крестика
75
- */
76
- hasCloser?: boolean;
77
- /**
78
- * Наличие кнопки "Назад"
79
- */
80
- hasBackButton?: boolean;
81
- /**
82
- * Дополнительный класс для правого аддона
83
- */
84
- backButtonClassName?: string;
85
- /**
86
- * Дополнительный класс
87
- */
88
- className?: string;
89
- /**
90
- * Дополнительный класс для контента
91
- */
92
- contentClassName?: string;
93
- /**
94
- * Дополнительный класс для нижнего аддона
95
- */
96
- bottomAddonsClassName?: string;
97
- /**
98
- * Выравнивание заголовка
99
- */
100
- align?: "left" | "center";
101
- /**
102
- * Обрезать ли заголовок
103
- */
104
- trim?: boolean;
105
- /**
106
- * Фиксирует шапку
107
- */
108
- sticky?: boolean;
109
- /**
110
- * Идентификатор для систем автоматизированного тестирования
111
- */
112
- dataTestId?: string;
113
- /**
114
- * Фоновое изображение
115
- */
116
- imageUrl?: string;
117
- /**
118
- * Иконка closer.
119
- */
120
- closerIcon?: React.ElementType;
121
- /**
122
- * Обработчик закрытия
123
- */
124
- onClose?: CloserProps["onClose"];
125
- /**
126
- * обработчик клика по кнопке "назад"
127
- */
128
- onBack?: () => void;
129
- /**
130
- * Вид шапки - мобильный или десктоп
131
- */
132
- view: "desktop" | "mobile";
133
- /**
134
- * Ссылка на родительскую ноду overflow: auto
135
- */
136
- scrollableParentRef?: React.RefObject<HTMLDivElement>;
137
- };
138
- declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
139
- interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
140
- /**
141
- * Текст после иконки
142
- */
143
- text?: string;
144
- /**
145
- * Дополнительный класс
146
- */
147
- className?: string;
148
- /**
149
- * Вид компонента
150
- */
151
- view: "mobile" | "desktop";
152
- /**
153
- * Прозрачность текста
154
- */
155
- textOpacity?: number;
156
- /**
157
- * Обработчик клика
158
- */
159
- onClick?: () => void;
160
- }
161
- declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
162
- declare const colors: readonly [
163
- "tertiary",
164
- "disabled",
165
- "accent",
166
- "primary",
167
- "attention",
168
- "positive",
169
- "secondary",
170
- "tertiary-inverted",
171
- "primary-inverted",
172
- "secondary-inverted",
173
- "link",
174
- "negative",
175
- "static-primary-light",
176
- "static-secondary-light",
177
- "static-tertiary-light",
178
- "static-primary-dark",
179
- "static-secondary-dark",
180
- "static-tertiary-dark",
181
- "static-accent"
182
- ];
183
- type Color = (typeof colors)[number];
184
- type NativeProps = HTMLAttributes<HTMLSpanElement>;
185
- type TextBaseProps = {
186
- /**
187
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/tokens-assets-типографика--docs)
188
- */
189
- view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "component-primary" | "component-secondary" | "caps";
190
- /**
191
- * Цвет текста
192
- */
193
- color?: Color;
194
- /**
195
- * Толщина шрифта
196
- */
197
- weight?: "regular" | "medium" | "bold";
198
- /**
199
- * Делает цифры моноширинными
200
- */
201
- monospaceNumbers?: boolean;
202
- /**
203
- * HTML тег
204
- */
205
- tag?: "span" | "div";
206
- /**
207
- * Css-класс для стилизации (native prop)
208
- */
209
- className?: string;
210
- /**
211
- * Id компонента для тестов
212
- */
213
- dataTestId?: string;
214
- /**
215
- * Контент (native prop)
216
- */
217
- children?: React.ReactNode;
218
- /**
219
- * Добавляет отступы к тэгу 'p'
220
- */
221
- defaultMargins?: never;
222
- /**
223
- * Количество строк (не поддерживает IE)
224
- */
225
- rowLimit?: 1 | 2 | 3;
226
- /**
227
- * Показать скелетон
228
- */
229
- showSkeleton?: boolean;
230
- /**
231
- * Пропы для скелетона
232
- */
233
- skeletonProps?: TextSkeletonProps;
234
- };
235
- type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
236
- tag?: "p";
237
- defaultMargins?: boolean;
238
- };
239
- type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
240
- type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
241
- type TitleProps = Omit<NativeProps$0, "color"> & {
242
- /**
243
- * HTML тег
244
- */
245
- tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
246
- /**
247
- * [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
248
- */
249
- view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
250
- /**
251
- * Цвет текста
252
- */
253
- color?: Color;
254
- /**
255
- * Толщина шрифта
256
- */
257
- weight?: "regular" | "medium" | "bold";
258
- /**
259
- * Шрифт текста
260
- */
261
- font?: "styrene" | "system";
262
- /**
263
- * Добавляет отступы
264
- */
265
- defaultMargins?: boolean;
266
- /**
267
- * Css-класс для стилизации (native prop)
268
- */
269
- className?: string;
270
- /**
271
- * Id компонента для тестов
272
- */
273
- dataTestId?: string;
274
- /**
275
- * Контент (native prop)
276
- */
277
- children?: React.ReactNode;
278
- /**
279
- * Количество строк (не поддерживает IE)
280
- */
281
- rowLimit?: 1 | 2 | 3;
282
- /**
283
- * Показать скелетон
284
- */
285
- showSkeleton?: boolean;
286
- /**
287
- * Пропы для скелетона
288
- */
289
- skeletonProps?: TextSkeletonProps;
290
- };
291
- type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
292
- declare const Typography: {
293
- Title: FC<TitleProps>;
294
- Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
295
- TitleResponsive: FC<TitleProps>;
296
- TitleMobile: FC<TitleMobileProps>;
297
- };
298
- declare const typographyPresets: {
299
- mobile: {
300
- list: {
301
- text: {
302
- primary: {
303
- tag: string;
304
- view: string;
305
- };
306
- secondary: {
307
- tag: string;
308
- color: string;
309
- view: string;
310
- };
311
- };
312
- };
313
- };
314
- };
315
- declare const TitleResponsive: FC<TitleProps>;
316
- export { NavigationBar, BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive };
317
- export type { TitleProps, TextProps, Color, NavigationBarProps };
318
- export * from "./useSkeleton-1b036d4b";
319
- export * from "./Component-8b2c2707";
@@ -1,276 +0,0 @@
1
- /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
- import { HandledEvents } from 'react-swipeable/es/types';
4
- import { TransitionProps } from 'react-transition-group/Transition';
5
- import { BaseModalProps } from "./index-bdb4c6b9";
6
- import { NavigationBarProps } from "./index-c76d6398";
7
- import { BackgroundColorType } from "./index-72dda473";
8
- type BottomSheetTitleAlign = 'center' | 'left';
9
- type BottomSheetProps = {
10
- /**
11
- * Контент
12
- */
13
- children?: ReactNode;
14
- /**
15
- * Управление видимостью
16
- */
17
- open: boolean;
18
- /**
19
- * Заголовок
20
- */
21
- title?: ReactNode;
22
- /**
23
- * Размер заголовка
24
- */
25
- titleSize?: NavigationBarProps['titleSize'];
26
- /**
27
- * Подзаголовок.
28
- */
29
- subtitle?: NavigationBarProps['subtitle'];
30
- /**
31
- * Кнопка действия (обычно, это кнопка закрытия)
32
- */
33
- actionButton?: ReactNode;
34
- /**
35
- * Нода, компонент или функция возвращающая их
36
- *
37
- * Контейнер к которому будут добавляться порталы
38
- */
39
- container?: BaseModalProps['container'];
40
- /**
41
- * Рендерить ли в контейнер через портал.
42
- */
43
- usePortal?: BaseModalProps['usePortal'];
44
- /**
45
- * Дополнительный класс
46
- */
47
- className?: string;
48
- /**
49
- * Дополнительный класс
50
- */
51
- contentClassName?: string;
52
- /**
53
- * Дополнительные пропсы на контейнер.
54
- */
55
- containerProps?: HTMLAttributes<HTMLDivElement>;
56
- /**
57
- * Дополнительный класс
58
- */
59
- containerClassName?: string;
60
- /**
61
- * Цвет фона
62
- */
63
- backgroundColor?: Extract<BackgroundColorType, 'primary' | 'secondary'>;
64
- /**
65
- * Дополнительный класс шапки
66
- */
67
- headerClassName?: string;
68
- /**
69
- * Дополнительный класс футера
70
- */
71
- footerClassName?: string;
72
- /**
73
- * Дополнительный класс для аддонов
74
- */
75
- addonClassName?: string;
76
- /**
77
- * Дополнительный класс для компонента крестика
78
- */
79
- closerClassName?: string;
80
- /**
81
- * Дополнительный класс для компонента стрелки назад
82
- */
83
- backerClassName?: string;
84
- /**
85
- * Дополнительный класс для компонента модального окна
86
- */
87
- modalClassName?: string;
88
- /**
89
- * Дополнительный класс для обертки модального окна
90
- */
91
- modalWrapperClassName?: string;
92
- /**
93
- * Дополнительный класс для маркера
94
- */
95
- swipeableMarkerClassName?: string;
96
- /**
97
- * Кастомный маркер
98
- */
99
- swipeableMarker?: ReactElement;
100
- /**
101
- * TransitionProps, прокидываются в компонент CSSTransitionProps.
102
- */
103
- transitionProps?: Partial<TransitionProps>;
104
- /**
105
- * Идентификатор для систем автоматизированного тестирования
106
- */
107
- dataTestId?: string;
108
- /**
109
- * z-index компонента
110
- */
111
- zIndex?: number;
112
- /**
113
- * Будет ли свайпаться шторка
114
- * @default true
115
- */
116
- swipeable?: boolean;
117
- /**
118
- * Будет ли свайпаться контент
119
- */
120
- swipeableContent?: boolean;
121
- /**
122
- * Порог свайпа
123
- */
124
- swipeThreshold?: number;
125
- /**
126
- * Слот слева
127
- */
128
- leftAddons?: ReactNode;
129
- /**
130
- * Слот справа
131
- */
132
- rightAddons?: ReactNode;
133
- /**
134
- * Слот снизу
135
- */
136
- bottomAddons?: ReactNode;
137
- /**
138
- * Наличие компонента крестика
139
- */
140
- hasCloser?: boolean;
141
- /**
142
- * Наличие компонента стрелки назад
143
- */
144
- hasBacker?: boolean;
145
- /**
146
- * Выравнивание заголовка
147
- */
148
- titleAlign?: BottomSheetTitleAlign;
149
- /**
150
- * Фиксирует шапку
151
- */
152
- stickyHeader?: boolean;
153
- /**
154
- * Фиксирует футер
155
- */
156
- stickyFooter?: boolean;
157
- /**
158
- * Высота шторки
159
- */
160
- initialHeight?: 'default' | 'full';
161
- /**
162
- * Будет ли виден оверлэй
163
- */
164
- hideOverlay?: boolean;
165
- /**
166
- * Будет ли видна шапка
167
- */
168
- hideHeader?: boolean;
169
- /**
170
- * Будет ли обрезан заголовок
171
- */
172
- trimTitle?: boolean;
173
- /**
174
- * Запретить закрытие шторки кликом на оверлэй
175
- */
176
- disableOverlayClick?: boolean;
177
- /**
178
- * Отключает блокировку скролла при открытии модального окна
179
- */
180
- disableBlockingScroll?: boolean;
181
- /**
182
- * Отключает ловушку фокуса
183
- */
184
- disableFocusLock?: boolean;
185
- /**
186
- * @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
187
- * Не анимировать шторку при изменении размера вьюпорта
188
- */
189
- ignoreScreenChange?: boolean;
190
- /**
191
- * Свойства для Бэкдропа
192
- */
193
- backdropProps?: BaseModalProps['backdropProps'];
194
- /**
195
- * Реф на контейнер, в котором происходит скролл
196
- */
197
- scrollableContainerRef?: RefObject<HTMLElement>;
198
- /**
199
- * Реф для управления компонентом.
200
- */
201
- bottomSheetInstanceRef?: RefObject<{
202
- scrollToArea: (idx: number) => void;
203
- }>;
204
- /**
205
- * Реф на контейнер, в котором находится шторка
206
- */
207
- sheetContainerRef?: RefObject<HTMLElement>;
208
- /**
209
- * Магнитные области видимой высоты шторки.
210
- * Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
211
- * По-умолчанию -[0, window.innerHeight - '24px']
212
- * массив должен состоять минимум из 2 элементов
213
- */
214
- magneticAreas?: Array<number | string>;
215
- /**
216
- * Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
217
- */
218
- initialActiveAreaIndex?: number;
219
- /**
220
- * Отключает скролл контентной области.
221
- */
222
- scrollLocked?: boolean;
223
- /**
224
- * Скрыть скроллбар внутри шторки
225
- */
226
- hideScrollbar?: boolean;
227
- /**
228
- * Верхний отступ шторки, если она открыта на максимальную высоту
229
- */
230
- headerOffset?: number;
231
- /**
232
- * Содержимое bottom-sheet всегда в DOM
233
- */
234
- keepMounted?: boolean;
235
- /**
236
- * Отключает автоматический перевод фокуса на bottom-sheet при открытии
237
- */
238
- disableAutoFocus?: boolean;
239
- /**
240
- * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
241
- */
242
- disableRestoreFocus?: boolean;
243
- /**
244
- * Отключает вызов `onClose` при нажатии Escape
245
- */
246
- disableEscapeKeyDown?: boolean;
247
- /**
248
- * Обработчик закрытия
249
- */
250
- onClose: () => void;
251
- /**
252
- * Обработчик нажатия на стрелку назад
253
- */
254
- onBack?: () => void;
255
- /**
256
- * Вызывается в начале анимации притягивания к одной из `magneticAreas`
257
- */
258
- onMagnetize?: (index: number) => void;
259
- /**
260
- * Вызывается после окончания анимации притягивания
261
- */
262
- onMagnetizeEnd?: (index: number) => void;
263
- /**
264
- * Вызывается при изменении положения шторки
265
- */
266
- onOffsetChange?: (offset: number, percent: number) => void;
267
- /**
268
- * Вызывается в начале свайпа
269
- */
270
- onSwipeStart?: (event: HandledEvents) => void;
271
- /**
272
- * Вызывается после окончания свайпа
273
- */
274
- onSwipeEnd?: (event: HandledEvents | null) => void;
275
- };
276
- export { BottomSheetTitleAlign, BottomSheetProps };
@@ -1,91 +0,0 @@
1
- /// <reference types="react" />
2
- import { BaseSelectProps, OptionShape } from "./typings-0816e61d";
3
- type UseSelectWithApplyProps = {
4
- /**
5
- * Список выбранных пунктов
6
- */
7
- selected: BaseSelectProps['selected'];
8
- /**
9
- * Список вариантов выбора
10
- */
11
- options: BaseSelectProps['options'];
12
- /**
13
- * Обработчик выбора
14
- */
15
- onChange: BaseSelectProps['onChange'];
16
- /**
17
- * Компонент выпадающего меню
18
- */
19
- OptionsList?: BaseSelectProps['OptionsList'];
20
- /**
21
- * Пропсы, которые будут прокинуты в компонент списка
22
- */
23
- optionsListProps?: BaseSelectProps['optionsListProps'];
24
- /**
25
- * Включает отображение поиска
26
- */
27
- showSearch?: BaseSelectProps['showSearch'];
28
- /**
29
- * Настройки поиска
30
- */
31
- searchProps?: BaseSelectProps['searchProps'];
32
- /**
33
- * Показывать кнопку очистки
34
- */
35
- showClear?: boolean;
36
- /**
37
- * Показывать пункт "Выбрать все"
38
- */
39
- showSelectAll?: boolean;
40
- /**
41
- * Показывать пункт "Выбрать все" в заголовке списка
42
- */
43
- showHeaderWithSelectAll?: boolean;
44
- };
45
- declare const SELECT_ALL_KEY = "select_all";
46
- declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
47
- OptionsList: import("react").ForwardRefExoticComponent<import("./typings-0816e61d").OptionsListProps & {
48
- showClear?: boolean | undefined;
49
- onClose?: (() => void) | undefined; /**
50
- * Компонент выпадающего меню
51
- */
52
- selectedDraft?: OptionShape[] | undefined;
53
- OptionsList?: import("react").FC<import("./typings-0816e61d").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
54
- Footer?: import("react").FC<import("./Component-0816e61d").FooterProps> | undefined;
55
- Header?: import("react").FC<import("./Component-0816e61d").HeaderProps> | undefined;
56
- headerProps?: import("./Component-0816e61d").HeaderProps | undefined;
57
- showHeaderWithSelectAll?: boolean | undefined;
58
- } & import("react").RefAttributes<HTMLDivElement>>;
59
- optionsListProps: {
60
- OptionsList: import("react").FC<import("./typings-0816e61d").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
61
- showClear: boolean;
62
- onClear: () => void;
63
- onApply: () => void;
64
- onClose: () => void;
65
- selectedDraft: OptionShape[];
66
- showHeaderWithSelectAll: boolean;
67
- headerProps: {
68
- indeterminate: boolean;
69
- checked: boolean;
70
- onChange: () => void;
71
- };
72
- };
73
- allowUnselect: boolean;
74
- multiple: boolean;
75
- options: (OptionShape | import("./typings-0816e61d").GroupShape | {
76
- key: string;
77
- content: string;
78
- })[];
79
- onChange: (payload: import("./typings-0816e61d").BaseSelectChangePayload) => void;
80
- selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
81
- showSearch: boolean | undefined;
82
- searchProps: {
83
- value: string;
84
- onChange: ((value: string) => void) | undefined;
85
- componentProps?: import("./typings-0816e61d").SearchProps | undefined;
86
- accessor?: ((option: OptionShape) => string) | undefined;
87
- filterFn?: ((optionText: string, search: string) => boolean) | undefined;
88
- } | undefined;
89
- };
90
- export * from "./Component-0816e61d";
91
- export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };