@alfalab/core-components-custom-picker-button 2.0.11 → 2.0.13

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 (153) hide show
  1. package/{esm/Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
  2. package/{cssm/Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
  3. package/{esm/Component-9211a437.d.ts → Component-89f0cb07.d.ts} +2 -2
  4. package/Component-8b2c2707.d.ts +1 -1
  5. package/Component.desktop-0aa4e915.d.ts +5 -0
  6. package/Component.desktop-785df74d.d.ts +1 -1
  7. package/Component.mobile-16b1285a.d.ts +5 -0
  8. package/Component.mobile-d446ae02.d.ts +4 -4
  9. package/Component.mobile-d7e9f69d.d.ts +1 -1
  10. package/{Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
  11. package/{cssm/Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  12. package/{cssm/component-72308007.d.ts → component-10db897e.d.ts} +1 -1
  13. package/cssm/Component-0f4b9bed.d.ts +5 -0
  14. package/cssm/Component-10db897e.d.ts +296 -0
  15. package/cssm/Component-aed0af6e.d.ts +11 -0
  16. package/cssm/Component-ebda875c.d.ts +98 -9
  17. package/{Component-72308007.d.ts → cssm/Component-f12ee135.d.ts} +1 -1
  18. package/cssm/Component.desktop-0aa4e915.d.ts +5 -0
  19. package/cssm/Component.desktop-4cd3936b.d.ts +49 -0
  20. package/cssm/Component.mobile-16b1285a.d.ts +5 -0
  21. package/cssm/Component.mobile-96988a65.d.ts +6 -0
  22. package/{esm/Component.mobile-ade26e99.d.ts → cssm/Component.mobile-f28cbba0.d.ts} +1 -1
  23. package/cssm/Component.mobile.d.ts +9 -1
  24. package/cssm/{index-8b2c2707.d.ts → Component.responsive-0aa4e915.d.ts} +2 -3
  25. package/cssm/desktop-69921c40.d.ts +2 -0
  26. package/cssm/desktop-d446ae02.d.ts +2 -39
  27. package/cssm/hook-8abfea97.d.ts +10 -10
  28. package/cssm/hook-ebda875c.d.ts +48 -0
  29. package/{esm/index-72308007.d.ts → cssm/index-10db897e.d.ts} +1 -5
  30. package/cssm/index-89f0cb07.d.ts +2 -0
  31. package/cssm/index-bdb4c6b9.d.ts +180 -2
  32. package/cssm/index-c44170fe.d.ts +2 -22
  33. package/cssm/index-c76d6398.d.ts +2 -2
  34. package/cssm/index-ebda875c.d.ts +200 -18
  35. package/cssm/index-f12ee135.d.ts +324 -3
  36. package/cssm/shared-4cd3936b.d.ts +5 -64
  37. package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  38. package/{modern/typings-dd8ca091.d.ts → cssm/typings-0f4b9bed.d.ts} +4 -0
  39. package/{modern/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
  40. package/cssm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  41. package/desktop-89f0cb07.d.ts +2 -0
  42. package/desktop-d446ae02.d.ts +2 -2
  43. package/{modern/Component-dd8ca091.d.ts → esm/Component-0f4b9bed.d.ts} +1 -1
  44. package/esm/{Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
  45. package/{cssm/Component-9211a437.d.ts → esm/Component-89f0cb07.d.ts} +2 -2
  46. package/esm/Component-8b2c2707.d.ts +1 -1
  47. package/esm/Component.desktop-0aa4e915.d.ts +5 -0
  48. package/esm/Component.desktop-785df74d.d.ts +1 -1
  49. package/esm/Component.mobile-16b1285a.d.ts +5 -0
  50. package/esm/Component.mobile-d446ae02.d.ts +4 -4
  51. package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
  52. package/{modern/Component.mobile-ade26e99.d.ts → esm/Component.mobile-f28cbba0.d.ts} +1 -1
  53. package/esm/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  54. package/esm/{component-72308007.d.ts → component-10db897e.d.ts} +1 -1
  55. package/esm/desktop-89f0cb07.d.ts +2 -0
  56. package/esm/desktop-d446ae02.d.ts +2 -2
  57. package/esm/field/Component.js +1 -1
  58. package/esm/field/index.css +5 -5
  59. package/esm/hook-8abfea97.d.ts +8 -8
  60. package/{cssm/index-72308007.d.ts → esm/index-10db897e.d.ts} +1 -5
  61. package/esm/index-8b2c2707.d.ts +2 -2
  62. package/esm/index-c44170fe.d.ts +4 -9
  63. package/esm/index-c76d6398.d.ts +2 -2
  64. package/esm/index-f12ee135.d.ts +2 -2
  65. package/esm/mobile-89f0cb07.d.ts +2 -0
  66. package/esm/shared-4cd3936b.d.ts +6 -6
  67. package/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  68. package/esm/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  69. package/{cssm/typings-dd8ca091.d.ts → esm/typings-0f4b9bed.d.ts} +4 -0
  70. package/{cssm/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
  71. package/esm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  72. package/field/Component.js +1 -1
  73. package/field/index.css +5 -5
  74. package/hook-8abfea97.d.ts +8 -8
  75. package/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  76. package/index-8b2c2707.d.ts +2 -2
  77. package/index-c44170fe.d.ts +4 -9
  78. package/index-c76d6398.d.ts +2 -2
  79. package/index-f12ee135.d.ts +2 -2
  80. package/mobile-89f0cb07.d.ts +2 -0
  81. package/{cssm/Component-dd8ca091.d.ts → modern/Component-0f4b9bed.d.ts} +1 -1
  82. package/modern/{Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
  83. package/{Component-9211a437.d.ts → modern/Component-89f0cb07.d.ts} +2 -2
  84. package/modern/Component-8b2c2707.d.ts +1 -1
  85. package/modern/Component.desktop-0aa4e915.d.ts +5 -0
  86. package/modern/Component.desktop-785df74d.d.ts +1 -1
  87. package/modern/Component.mobile-16b1285a.d.ts +5 -0
  88. package/modern/Component.mobile-d446ae02.d.ts +4 -4
  89. package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
  90. package/{cssm/Component.mobile-ade26e99.d.ts → modern/Component.mobile-f28cbba0.d.ts} +1 -1
  91. package/modern/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  92. package/modern/{component-72308007.d.ts → component-10db897e.d.ts} +1 -1
  93. package/modern/desktop-89f0cb07.d.ts +2 -0
  94. package/modern/desktop-d446ae02.d.ts +2 -2
  95. package/modern/field/Component.js +1 -1
  96. package/modern/field/index.css +5 -5
  97. package/modern/hook-8abfea97.d.ts +8 -8
  98. package/modern/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  99. package/modern/index-8b2c2707.d.ts +2 -2
  100. package/modern/index-c44170fe.d.ts +4 -9
  101. package/modern/index-c76d6398.d.ts +2 -2
  102. package/modern/index-f12ee135.d.ts +2 -2
  103. package/modern/mobile-89f0cb07.d.ts +2 -0
  104. package/modern/shared-4cd3936b.d.ts +6 -6
  105. package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  106. package/modern/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  107. package/{typings-dd8ca091.d.ts → modern/typings-0f4b9bed.d.ts} +4 -0
  108. package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
  109. package/modern/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  110. package/package.json +4 -4
  111. package/shared-4cd3936b.d.ts +6 -6
  112. package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  113. package/{cssm/types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  114. package/{esm/typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
  115. package/{esm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
  116. package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  117. package/Component-dd8ca091.d.ts +0 -22
  118. package/Component.desktop-2e2b2125.d.ts +0 -6
  119. package/Component.mobile-755fbaa3.d.ts +0 -6
  120. package/Component.modal.mobile-dd8ca091.d.ts +0 -60
  121. package/component-72308007.d.ts +0 -44
  122. package/cssm/Component-8b2c2707.d.ts +0 -12
  123. package/cssm/Component.desktop-2e2b2125.d.ts +0 -6
  124. package/cssm/Component.mobile-755fbaa3.d.ts +0 -6
  125. package/cssm/Component.mobile-d446ae02.d.ts +0 -23
  126. package/cssm/Component.responsive-785df74d.d.ts +0 -26
  127. package/cssm/desktop-2e2b2125.d.ts +0 -2
  128. package/cssm/mobile-755fbaa3.d.ts +0 -2
  129. package/cssm/utils-1574ad8b.d.ts +0 -29
  130. package/cssm/utils-49cc3c24.d.ts +0 -8
  131. package/desktop-2e2b2125.d.ts +0 -2
  132. package/esm/Component.desktop-2e2b2125.d.ts +0 -6
  133. package/esm/Component.mobile-755fbaa3.d.ts +0 -6
  134. package/esm/Component.responsive-785df74d.d.ts +0 -26
  135. package/esm/desktop-2e2b2125.d.ts +0 -2
  136. package/esm/mobile-755fbaa3.d.ts +0 -2
  137. package/mobile-755fbaa3.d.ts +0 -2
  138. package/modern/Component-63dec22f.d.ts +0 -184
  139. package/modern/Component-9211a437.d.ts +0 -38
  140. package/modern/Component.desktop-2e2b2125.d.ts +0 -6
  141. package/modern/Component.mobile-755fbaa3.d.ts +0 -6
  142. package/modern/Component.responsive-785df74d.d.ts +0 -26
  143. package/modern/desktop-2e2b2125.d.ts +0 -2
  144. package/modern/mobile-755fbaa3.d.ts +0 -2
  145. package/types-e40becc7.d.ts +0 -276
  146. /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
  147. /package/{Component.responsive-785df74d.d.ts → cssm/Component.responsive-d7e9f69d.d.ts} +0 -0
  148. /package/cssm/{useSkeleton-ebda875c.d.ts → useSkeleton-1b036d4b.d.ts} +0 -0
  149. /package/{cssm/Component-63dec22f.d.ts → esm/Component-69921c40.d.ts} +0 -0
  150. /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  151. /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  152. /package/{esm/Component-63dec22f.d.ts → modern/Component-69921c40.d.ts} +0 -0
  153. /package/modern/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
@@ -1,3 +1,324 @@
1
- export * from "./component-72308007";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-e40becc7";
3
- export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
1
+ /// <reference types="react-transition-group" />
2
+ /// <reference types="react" />
3
+ import React from "react";
4
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject, FC } from "react";
5
+ import { HandledEvents } from "react-swipeable/es/types";
6
+ import { TransitionProps } from "react-transition-group/Transition";
7
+ import { BaseModalProps } from "./index-bdb4c6b9";
8
+ import { NavigationBarProps } from "./index-c76d6398";
9
+ import { BackgroundColorType } from "./index-72dda473";
10
+ import { SwipeableHandlers } from "react-swipeable";
11
+ import { BackdropProps } from "./index-ebda875c";
12
+ type BottomSheetTitleAlign = "center" | "left";
13
+ type BottomSheetProps = {
14
+ /**
15
+ * Контент
16
+ */
17
+ children?: ReactNode;
18
+ /**
19
+ * Управление видимостью
20
+ */
21
+ open: boolean;
22
+ /**
23
+ * Заголовок
24
+ */
25
+ title?: ReactNode;
26
+ /**
27
+ * Размер заголовка
28
+ */
29
+ titleSize?: NavigationBarProps["titleSize"];
30
+ /**
31
+ * Подзаголовок.
32
+ */
33
+ subtitle?: NavigationBarProps["subtitle"];
34
+ /**
35
+ * Кнопка действия (обычно, это кнопка закрытия)
36
+ */
37
+ actionButton?: ReactNode;
38
+ /**
39
+ * Нода, компонент или функция возвращающая их
40
+ *
41
+ * Контейнер к которому будут добавляться порталы
42
+ */
43
+ container?: BaseModalProps["container"];
44
+ /**
45
+ * Рендерить ли в контейнер через портал.
46
+ */
47
+ usePortal?: BaseModalProps["usePortal"];
48
+ /**
49
+ * Дополнительный класс
50
+ */
51
+ className?: string;
52
+ /**
53
+ * Дополнительный класс
54
+ */
55
+ contentClassName?: string;
56
+ /**
57
+ * Дополнительные пропсы на контейнер.
58
+ */
59
+ containerProps?: HTMLAttributes<HTMLDivElement>;
60
+ /**
61
+ * Дополнительный класс
62
+ */
63
+ containerClassName?: string;
64
+ /**
65
+ * Цвет фона
66
+ */
67
+ backgroundColor?: Extract<BackgroundColorType, "primary" | "secondary">;
68
+ /**
69
+ * Дополнительный класс шапки
70
+ */
71
+ headerClassName?: string;
72
+ /**
73
+ * Дополнительный класс футера
74
+ */
75
+ footerClassName?: string;
76
+ /**
77
+ * Дополнительный класс для аддонов
78
+ */
79
+ addonClassName?: string;
80
+ /**
81
+ * Дополнительный класс для компонента крестика
82
+ */
83
+ closerClassName?: string;
84
+ /**
85
+ * Дополнительный класс для компонента стрелки назад
86
+ */
87
+ backerClassName?: string;
88
+ /**
89
+ * Дополнительный класс для компонента модального окна
90
+ */
91
+ modalClassName?: string;
92
+ /**
93
+ * Дополнительный класс для обертки модального окна
94
+ */
95
+ modalWrapperClassName?: string;
96
+ /**
97
+ * Дополнительный класс для маркера
98
+ */
99
+ swipeableMarkerClassName?: string;
100
+ /**
101
+ * Кастомный маркер
102
+ */
103
+ swipeableMarker?: ReactElement;
104
+ /**
105
+ * TransitionProps, прокидываются в компонент CSSTransitionProps.
106
+ */
107
+ transitionProps?: Partial<TransitionProps>;
108
+ /**
109
+ * Идентификатор для систем автоматизированного тестирования
110
+ */
111
+ dataTestId?: string;
112
+ /**
113
+ * z-index компонента
114
+ */
115
+ zIndex?: number;
116
+ /**
117
+ * Будет ли свайпаться шторка
118
+ * @default true
119
+ */
120
+ swipeable?: boolean;
121
+ /**
122
+ * Будет ли свайпаться контент
123
+ */
124
+ swipeableContent?: boolean;
125
+ /**
126
+ * Порог свайпа
127
+ */
128
+ swipeThreshold?: number;
129
+ /**
130
+ * Слот слева
131
+ */
132
+ leftAddons?: ReactNode;
133
+ /**
134
+ * Слот справа
135
+ */
136
+ rightAddons?: ReactNode;
137
+ /**
138
+ * Слот снизу
139
+ */
140
+ bottomAddons?: ReactNode;
141
+ /**
142
+ * Наличие компонента крестика
143
+ */
144
+ hasCloser?: boolean;
145
+ /**
146
+ * Наличие компонента стрелки назад
147
+ */
148
+ hasBacker?: boolean;
149
+ /**
150
+ * Выравнивание заголовка
151
+ */
152
+ titleAlign?: BottomSheetTitleAlign;
153
+ /**
154
+ * Фиксирует шапку
155
+ */
156
+ stickyHeader?: boolean;
157
+ /**
158
+ * Фиксирует футер
159
+ */
160
+ stickyFooter?: boolean;
161
+ /**
162
+ * Высота шторки
163
+ */
164
+ initialHeight?: "default" | "full";
165
+ /**
166
+ * Будет ли виден оверлэй
167
+ */
168
+ hideOverlay?: boolean;
169
+ /**
170
+ * Будет ли видна шапка
171
+ */
172
+ hideHeader?: boolean;
173
+ /**
174
+ * Будет ли обрезан заголовок
175
+ */
176
+ trimTitle?: boolean;
177
+ /**
178
+ * Запретить закрытие шторки кликом на оверлэй
179
+ */
180
+ disableOverlayClick?: boolean;
181
+ /**
182
+ * Отключает блокировку скролла при открытии модального окна
183
+ */
184
+ disableBlockingScroll?: boolean;
185
+ /**
186
+ * Отключает ловушку фокуса
187
+ */
188
+ disableFocusLock?: boolean;
189
+ /**
190
+ * @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
191
+ * Не анимировать шторку при изменении размера вьюпорта
192
+ */
193
+ ignoreScreenChange?: boolean;
194
+ /**
195
+ * Свойства для Бэкдропа
196
+ */
197
+ backdropProps?: BaseModalProps["backdropProps"];
198
+ /**
199
+ * Реф на контейнер, в котором происходит скролл
200
+ */
201
+ scrollableContainerRef?: RefObject<HTMLElement>;
202
+ /**
203
+ * Реф для управления компонентом.
204
+ */
205
+ bottomSheetInstanceRef?: RefObject<{
206
+ scrollToArea: (idx: number) => void;
207
+ }>;
208
+ /**
209
+ * Реф на контейнер, в котором находится шторка
210
+ */
211
+ sheetContainerRef?: RefObject<HTMLElement>;
212
+ /**
213
+ * Магнитные области видимой высоты шторки.
214
+ * Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
215
+ * По-умолчанию -[0, window.innerHeight - '24px']
216
+ * массив должен состоять минимум из 2 элементов
217
+ */
218
+ magneticAreas?: Array<number | string>;
219
+ /**
220
+ * Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
221
+ */
222
+ initialActiveAreaIndex?: number;
223
+ /**
224
+ * Отключает скролл контентной области.
225
+ */
226
+ scrollLocked?: boolean;
227
+ /**
228
+ * Скрыть скроллбар внутри шторки
229
+ */
230
+ hideScrollbar?: boolean;
231
+ /**
232
+ * Верхний отступ шторки, если она открыта на максимальную высоту
233
+ */
234
+ headerOffset?: number;
235
+ /**
236
+ * Содержимое bottom-sheet всегда в DOM
237
+ */
238
+ keepMounted?: boolean;
239
+ /**
240
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
241
+ */
242
+ disableAutoFocus?: boolean;
243
+ /**
244
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
245
+ */
246
+ disableRestoreFocus?: boolean;
247
+ /**
248
+ * Отключает вызов `onClose` при нажатии Escape
249
+ */
250
+ disableEscapeKeyDown?: boolean;
251
+ /**
252
+ * Обработчик закрытия
253
+ */
254
+ onClose: () => void;
255
+ /**
256
+ * Обработчик нажатия на стрелку назад
257
+ */
258
+ onBack?: () => void;
259
+ /**
260
+ * Вызывается в начале анимации притягивания к одной из `magneticAreas`
261
+ */
262
+ onMagnetize?: (index: number) => void;
263
+ /**
264
+ * Вызывается после окончания анимации притягивания
265
+ */
266
+ onMagnetizeEnd?: (index: number) => void;
267
+ /**
268
+ * Вызывается при изменении положения шторки
269
+ */
270
+ onOffsetChange?: (offset: number, percent: number) => void;
271
+ /**
272
+ * Вызывается в начале свайпа
273
+ */
274
+ onSwipeStart?: (event: HandledEvents) => void;
275
+ /**
276
+ * Вызывается после окончания свайпа
277
+ */
278
+ onSwipeEnd?: (event: HandledEvents | null) => void;
279
+ };
280
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
281
+ declare const TIMEOUT = 500;
282
+ declare const SWIPE_VELOCITY = 0.4;
283
+ declare const MARKER_HEIGHT = 24;
284
+ declare const CLOSE_OFFSET = 0.2;
285
+ declare const SCROLL_OFFSET = 1;
286
+ declare const HEADER_OFFSET = 24;
287
+ declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
288
+ type FooterProps = {
289
+ /**
290
+ * Контент футера
291
+ */
292
+ children?: ReactNode;
293
+ /**
294
+ * Фиксирует футер
295
+ */
296
+ sticky?: boolean;
297
+ /**
298
+ * Дополнительный класс
299
+ */
300
+ className?: string;
301
+ };
302
+ declare const Footer: FC<FooterProps>;
303
+ type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
304
+ headerRef: RefObject<HTMLDivElement>;
305
+ headerOffset: number;
306
+ };
307
+ declare const Header: FC<HeaderProps>;
308
+ type SwipeableBackdropProps = BackdropProps & {
309
+ /**
310
+ * Прозрачность бэкдропа
311
+ */
312
+ opacity?: number;
313
+ /**
314
+ * Обработчики свайпа
315
+ */
316
+ handlers?: SwipeableHandlers;
317
+ /**
318
+ * Время анимации opacity
319
+ */
320
+ opacityTimeout?: number;
321
+ };
322
+ declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
323
+ export { BottomSheet, TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber, FooterProps, Footer, HeaderProps, Header, SwipeableBackdropProps, SwipeableBackdrop };
324
+ export type { BottomSheetProps, BottomSheetTitleAlign };
@@ -1,66 +1,7 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
4
- // eslint-disable-next-line @typescript-eslint/naming-convention
5
- type useSelectWithLoadingProps = {
6
- loading?: boolean;
7
- visibleOptions?: BaseSelectProps["visibleOptions"];
8
- Option?: React.FC<OptionProps>;
9
- };
10
- declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
11
- Option: (props: OptionProps) => React.JSX.Element;
12
- options: OptionShape[];
13
- } | null;
14
- type OptionsFetcherResponse = {
15
- options: OptionShape[];
16
- hasMore: boolean;
17
- };
18
- // eslint-disable-next-line @typescript-eslint/naming-convention
19
- type useLazyLoadingProps = {
20
- /** Количество элементов на "странице" */
21
- limit?: number;
22
- /** Начальный номер "страницы" */
23
- initialOffset?: number;
24
- /** Скелетон загружаемых элементов */
25
- skeleton?: React.ReactNode;
26
- /** Компонент пункта меню */
27
- Option?: React.FC<OptionProps>;
28
- /**
29
- * Функция-загрузчик опций.
30
- * @param offset - текущая страница
31
- * @param limit - количество элементов на странице
32
- * @param queryString - строчные данные, пробрасываемые для поиска из кастомного инпута, расположенного в заголовке OptionsList
33
- * @returns Promise<{
34
- * options - список опций следующей "страницы". Они аппендятся к предыдущим
35
- * hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
36
- * }>
37
- */
38
- optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
39
- };
40
- declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
41
- optionsProps: {
42
- Option: (props: OptionProps) => React.JSX.Element;
43
- options: OptionShape[];
44
- optionsListProps: {
45
- ref: React.RefObject<HTMLDivElement>;
46
- inputProps: {
47
- onChange: (event: React.ChangeEvent<HTMLInputElement>, payload: {
48
- value: string;
49
- }) => void;
50
- value: string;
51
- };
52
- };
53
- onOpen: (payload: {
54
- open?: boolean;
55
- }) => void;
56
- };
57
- reset: () => void;
58
- };
59
1
  export * from "./index-ebda875c";
60
- export * from "./Component-72308007";
61
- export * from "./Component-dd8ca091";
62
- export { useSelectWithLoading, useLazyLoading };
2
+ export * from "./Component-0f4b9bed";
3
+ export * from "./hook-ebda875c";
63
4
  export * from "./hook-8abfea97";
64
- export * from "./typings-dd8ca091";
65
- export * from "./utils-dd8ca091";
66
- export type { AdditionalMobileProps } from "./Component.mobile-ade26e99";
5
+ export * from "./typings-0f4b9bed";
6
+ export * from "./utils-0f4b9bed";
7
+ export type { AdditionalMobileProps } from "./Component.mobile-f28cbba0";
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -459,6 +459,10 @@ type OptionsListProps = {
459
459
  * Обработчик отмены изменений
460
460
  */
461
461
  onClear?: () => void;
462
+ /**
463
+ * Указать индекс пункта для hover состояния
464
+ */
465
+ setHighlightedIndex?: (index: number) => void;
462
466
  };
463
467
  type OptgroupProps = {
464
468
  /**
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
3
3
  declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  declare const joinOptions: ({ selected, selectedMultiple, }: {
@@ -0,0 +1,2 @@
1
+ export { ButtonDesktop } from "./Component.desktop-0aa4e915";
2
+ export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
@@ -4,7 +4,7 @@ import { FC, SVGProps } from "react";
4
4
  import { ButtonProps } from "./index-8b2c2707";
5
5
  import { BaseSelectProps } from "./shared-4cd3936b";
6
6
  import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
7
- type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" | "autocomplete" | "size" | "onFocus" | "selected" | "closeOnSelect" | "multiple" | "hint" | "allowUnselect" | "options"> & Pick<ButtonProps, "view" | "loading" | "leftAddons" | "rightAddons"> & {
7
+ type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" | "autocomplete" | "size" | "onFocus" | "selected" | "closeOnSelect" | "multiple" | "hint" | "allowUnselect" | "options" | "searchProps" | "showSearch" | "Search"> & Pick<ButtonProps, "view" | "loading" | "leftAddons" | "rightAddons"> & {
8
8
  options: Array<BaseSelectProps["options"][0] & {
9
9
  /**
10
10
  * Иконка, отображающаяся слева от текстового представления пункта
@@ -25,7 +25,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" |
25
25
  */
26
26
  showArrow?: boolean;
27
27
  };
28
- declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
28
+ declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "searchProps" | "showSearch" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
29
29
  options: Array<BaseSelectProps["options"][0] & {
30
30
  /**
31
31
  * Иконка, отображающаяся слева от текстового представления пункта
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { OptionShape, OptionsListProps } from "./typings-dd8ca091";
3
+ import { OptionShape, OptionsListProps } from "./typings-0f4b9bed";
4
4
  import { HeaderProps } from "./Component-ebda875c";
5
5
  type FooterProps = {
6
6
  handleClear?: () => void;
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { BaseSelectProps } from "./typings-dd8ca091";
5
+ import { BaseSelectProps } from "./typings-0f4b9bed";
6
6
  type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Футер
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { BaseButtonProps } from "./typings-9211a437";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -34,5 +34,5 @@ declare const Spinner: FC<SpinnerProps>;
34
34
  * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
35
  */
36
36
  declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
- declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
38
  export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ButtonProps } from "./index-8b2c2707";
4
- import { FieldProps as BaseFieldProps } from "./typings-dd8ca091";
4
+ import { FieldProps as BaseFieldProps } from "./typings-0f4b9bed";
5
5
  import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
6
6
  type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
7
7
  buttonSize?: PickerButtonSize;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CommonButtonProps } from "./typings-89f0cb07";
4
+ declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
5
+ export { ButtonDesktop };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./index-c44170fe";
4
4
  type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlDesktopProps, FormControlDesktop };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { CommonButtonProps } from "./typings-89f0cb07";
4
+ declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
5
+ export { ButtonMobile };
@@ -16,8 +16,8 @@ declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerBut
16
16
  */
17
17
  breakpoint?: number | undefined;
18
18
  } & React.RefAttributes<HTMLInputElement>>;
19
- export { SelectMobile } from "./Component.mobile-ade26e99";
20
- export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
21
- export type { SelectMobileProps } from "./Component.mobile-ade26e99";
22
- export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
19
+ export { SelectMobile } from "./Component.mobile-f28cbba0";
20
+ export { SelectModalMobile } from "./Component.modal.mobile-0f4b9bed";
21
+ export type { SelectMobileProps } from "./Component.mobile-f28cbba0";
22
+ export type { SelectModalMobileProps } from "./Component.modal.mobile-0f4b9bed";
23
23
  export { PickerButtonMobileProps, PickerButtonMobile };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseFormControlProps } from "./index-ebda875c";
3
+ import { BaseFormControlProps } from "./index-c44170fe";
4
4
  type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
5
  declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { FormControlMobileProps, FormControlMobile };
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
5
  import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
- import { BaseSelectProps } from "./typings-dd8ca091";
6
+ import { BaseSelectProps } from "./typings-0f4b9bed";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { ModalMobile } from "./Component.mobile-f1f15074";
4
4
  import { UseSelectWithApplyProps } from "./hook-8abfea97";
5
- import { BaseSelectProps } from "./typings-dd8ca091";
5
+ import { BaseSelectProps } from "./typings-0f4b9bed";
6
6
  type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Показывать кнопку очистки
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-e40becc7";
7
+ import { BottomSheetProps } from "./types-67a2d8af";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -0,0 +1,2 @@
1
+ export { ButtonDesktop } from "./Component.desktop-0aa4e915";
2
+ export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
@@ -4,7 +4,7 @@ import { FC, SVGProps } from "react";
4
4
  import { ButtonProps } from "./index-8b2c2707";
5
5
  import { BaseSelectProps } from "./shared-4cd3936b";
6
6
  import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
7
- type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" | "autocomplete" | "size" | "onFocus" | "selected" | "closeOnSelect" | "multiple" | "hint" | "allowUnselect" | "options"> & Pick<ButtonProps, "view" | "loading" | "leftAddons" | "rightAddons"> & {
7
+ type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" | "autocomplete" | "size" | "onFocus" | "selected" | "closeOnSelect" | "multiple" | "hint" | "allowUnselect" | "options" | "searchProps" | "showSearch" | "Search"> & Pick<ButtonProps, "view" | "loading" | "leftAddons" | "rightAddons"> & {
8
8
  options: Array<BaseSelectProps["options"][0] & {
9
9
  /**
10
10
  * Иконка, отображающаяся слева от текстового представления пункта
@@ -25,7 +25,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, "placeholder" | "Arrow" |
25
25
  */
26
26
  showArrow?: boolean;
27
27
  };
28
- declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
28
+ declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "searchProps" | "showSearch" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
29
29
  options: Array<BaseSelectProps["options"][0] & {
30
30
  /**
31
31
  * Иконка, отображающаяся слева от текстового представления пункта
@@ -4,7 +4,7 @@ import cn from 'classnames';
4
4
  import { CustomButton } from '@alfalab/core-components-custom-button/esm';
5
5
  import { getIcon } from '@alfalab/core-components-picker-button/esm/shared';
6
6
 
7
- var styles = {"iconContainer":"custom-picker-button__iconContainer_61kdr","addonsContainer":"custom-picker-button__addonsContainer_61kdr","showControlIcon":"custom-picker-button__showControlIcon_61kdr","open":"custom-picker-button__open_61kdr"};
7
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_1ri89","addonsContainer":"custom-picker-button__addonsContainer_1ri89","showControlIcon":"custom-picker-button__showControlIcon_1ri89","open":"custom-picker-button__open_1ri89"};
8
8
  require('./index.css')
9
9
 
10
10
  var Field = function (_a) {