@alfalab/core-components-picker-button 11.1.8 → 11.1.9

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 (49) hide show
  1. package/Component-0f4b9bed.d.ts +70 -3
  2. package/Component-10db897e.d.ts +4 -294
  3. package/Component-69921c40.d.ts +184 -0
  4. package/Component-ebda875c.d.ts +9 -98
  5. package/Component.desktop-785df74d.d.ts +1 -1
  6. package/Component.desktop.d.ts +1 -1
  7. package/Component.desktop.js +1 -1
  8. package/Component.mobile-d7e9f69d.d.ts +1 -1
  9. package/Component.mobile.d.ts +1 -1
  10. package/Component.modal.mobile-0f4b9bed.d.ts +60 -0
  11. package/{Component.responsive-d7e9f69d.d.ts → Component.responsive-3109f463.d.ts} +1 -1
  12. package/Component.responsive.d.ts +1 -1
  13. package/component-10db897e.d.ts +44 -0
  14. package/esm/Component.desktop.js +1 -1
  15. package/esm/field/Component.js +1 -1
  16. package/esm/field/index.css +6 -6
  17. package/esm/index.css +5 -5
  18. package/esm/option/Component.js +1 -1
  19. package/esm/option/index.css +4 -4
  20. package/field/Component.js +1 -1
  21. package/field/index.css +6 -6
  22. package/hook-8abfea97.d.ts +4 -4
  23. package/index-10db897e.d.ts +2 -2
  24. package/index-bdb4c6b9.d.ts +2 -180
  25. package/index-c44170fe.d.ts +1 -1
  26. package/index-ebda875c.d.ts +53 -191
  27. package/index-f12ee135.d.ts +3 -324
  28. package/index.css +5 -5
  29. package/mobile-89f0cb07.d.ts +6 -0
  30. package/modern/Component.desktop.js +1 -1
  31. package/modern/field/Component.js +1 -1
  32. package/modern/field/index.css +6 -6
  33. package/modern/index.css +5 -5
  34. package/modern/option/Component.js +1 -1
  35. package/modern/option/index.css +4 -4
  36. package/option/Component.js +1 -1
  37. package/option/index.css +4 -4
  38. package/package.json +2 -2
  39. package/shared-4cd3936b.d.ts +59 -1
  40. package/types-67a2d8af.d.ts +276 -0
  41. package/utils-1574ad8b.d.ts +29 -0
  42. package/utils-49cc3c24.d.ts +8 -0
  43. package/Component-72dda473.d.ts +0 -53
  44. package/Component-aed0af6e.d.ts +0 -11
  45. package/Component-f12ee135.d.ts +0 -72
  46. package/Component.mobile-96988a65.d.ts +0 -6
  47. package/hook-ebda875c.d.ts +0 -48
  48. /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  49. /package/{useSkeleton-1b036d4b.d.ts → useSkeleton-ebda875c.d.ts} +0 -0
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: d1uom */
1
+ /* hash: 1bv4l */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,13 +16,13 @@
16
16
  --gap-m: 16px;
17
17
  } :root {
18
18
  } :root {
19
- } .picker-button__container_culfp {
19
+ } .picker-button__container_kzg9i {
20
20
  min-width: auto;
21
- } .cc-picker-button.picker-button__optionsPopover_culfp.picker-button__sideGap_culfp {
21
+ } .cc-picker-button.picker-button__optionsPopover_kzg9i.picker-button__sideGap_kzg9i {
22
22
  padding: 0 var(--gap-xs);
23
- } .cc-picker-button .picker-button__option_culfp {
23
+ } .cc-picker-button .picker-button__option_kzg9i {
24
24
  padding: 0 var(--gap-m)
25
- } .cc-picker-button .picker-button__option_culfp:before {
25
+ } .cc-picker-button .picker-button__option_kzg9i:before {
26
26
  /* Удаляем разделители у опций выпадающего списка. */
27
27
  display: none;
28
28
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Option as Option$1 } from '@alfalab/core-components-select/modern/shared';
3
3
 
4
- const styles = {"container":"picker-button__container_1la98","icon":"picker-button__icon_1la98","content":"picker-button__content_1la98"};
4
+ const styles = {"container":"picker-button__container_1tf41","icon":"picker-button__icon_1tf41","content":"picker-button__content_1tf41"};
5
5
  require('./index.css')
6
6
 
7
7
  const Option = ({ option, children, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1fydo */
1
+ /* hash: 938l2 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,13 +15,13 @@
15
15
  --gap-s: 12px;
16
16
  } :root {
17
17
  } :root {
18
- } .picker-button__container_1la98 {
18
+ } .picker-button__container_1tf41 {
19
19
  display: flex;
20
20
  align-items: center;
21
- } .picker-button__icon_1la98 {
21
+ } .picker-button__icon_1tf41 {
22
22
  display: flex;
23
23
  margin-right: var(--gap-s);
24
- } .picker-button__content_1la98 {
24
+ } .picker-button__content_1tf41 {
25
25
  overflow: hidden;
26
26
  flex: 1;
27
27
  text-overflow: ellipsis;
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
10
10
 
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
 
13
- var styles = {"container":"picker-button__container_1la98","icon":"picker-button__icon_1la98","content":"picker-button__content_1la98"};
13
+ var styles = {"container":"picker-button__container_1tf41","icon":"picker-button__icon_1tf41","content":"picker-button__content_1tf41"};
14
14
  require('./index.css')
15
15
 
16
16
  var Option = function (_a) {
package/option/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1fydo */
1
+ /* hash: 938l2 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,13 +15,13 @@
15
15
  --gap-s: 12px;
16
16
  } :root {
17
17
  } :root {
18
- } .picker-button__container_1la98 {
18
+ } .picker-button__container_1tf41 {
19
19
  display: flex;
20
20
  align-items: center;
21
- } .picker-button__icon_1la98 {
21
+ } .picker-button__icon_1tf41 {
22
22
  display: flex;
23
23
  margin-right: var(--gap-s);
24
- } .picker-button__content_1la98 {
24
+ } .picker-button__content_1tf41 {
25
25
  overflow: hidden;
26
26
  flex: 1;
27
27
  text-overflow: ellipsis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-picker-button",
3
- "version": "11.1.8",
3
+ "version": "11.1.9",
4
4
  "description": "Picker button component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@alfalab/core-components-button": "^9.0.6",
43
- "@alfalab/core-components-select": "^15.2.1",
43
+ "@alfalab/core-components-select": "^15.2.2",
44
44
  "@alfalab/hooks": "^1.13.0",
45
45
  "@alfalab/icons-glyph": "^2.108.0",
46
46
  "classnames": "^2.3.1",
@@ -1,6 +1,64 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { BaseSelectProps, OptionProps, OptionShape } from "./typings-0f4b9bed";
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
+ };
1
59
  export * from "./index-ebda875c";
2
60
  export * from "./Component-0f4b9bed";
3
- export * from "./hook-ebda875c";
61
+ export { useSelectWithLoading, useLazyLoading };
4
62
  export * from "./hook-8abfea97";
5
63
  export * from "./typings-0f4b9bed";
6
64
  export * from "./utils-0f4b9bed";
@@ -0,0 +1,276 @@
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 };
@@ -0,0 +1,29 @@
1
+ type SavedStyle = {
2
+ value: string;
3
+ key: string;
4
+ el: HTMLElement;
5
+ };
6
+ type RestoreStyle = {
7
+ container: HTMLElement;
8
+ modals: number;
9
+ styles: SavedStyle[];
10
+ };
11
+ declare class ModalStore {
12
+ private readonly restoreStyles;
13
+ constructor();
14
+ getRestoreStyles: () => RestoreStyle[];
15
+ }
16
+ declare const getModalStore: () => ModalStore;
17
+ declare class GlobalStore {
18
+ private readonly modalStore;
19
+ constructor();
20
+ getModalStore: () => ModalStore;
21
+ }
22
+ declare function isScrolledToTop(target: HTMLElement): boolean;
23
+ declare function isScrolledToBottom(target: HTMLElement): boolean;
24
+ declare function hasScrollbar(target: HTMLElement): boolean;
25
+ declare const getScrollbarSize: () => number;
26
+ declare const restoreContainerStyles: (container: HTMLElement) => void;
27
+ declare const handleContainer: (container?: HTMLElement) => void;
28
+ export type { SavedStyle };
29
+ export { getModalStore, GlobalStore, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer };
@@ -0,0 +1,8 @@
1
+ declare const TIMEOUT = 500;
2
+ declare const SWIPE_VELOCITY = 0.4;
3
+ declare const MARKER_HEIGHT = 24;
4
+ declare const CLOSE_OFFSET = 0.2;
5
+ declare const SCROLL_OFFSET = 1;
6
+ declare const HEADER_OFFSET = 24;
7
+ declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
8
+ export { TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber };
@@ -1,53 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { BackgroundColorType, GraphicColorType } from "./index-72dda473";
4
- type IconColorType = Extract<GraphicColorType, 'positive' | 'attention' | 'link' | 'negative' | 'tertiary' | 'secondary' | 'primary'>;
5
- type BadgeProps = {
6
- /**
7
- * Дополнительный класс
8
- */
9
- className?: string;
10
- /**
11
- * Вид компонента
12
- */
13
- view: 'icon' | 'count';
14
- /**
15
- * Размер компонента (только для view=icon)
16
- * //deprecated(используйте height для view=count )
17
- */
18
- size?: 's' | 'm' | 'l' | 'xl';
19
- /**
20
- * Видимость белой обводки вокруг иконки
21
- */
22
- visibleIconOutline?: boolean;
23
- /**
24
- * Видимость цветной обводки вокруг иконки (только для view=icon)
25
- */
26
- visibleColorOutline?: boolean;
27
- /**
28
- * Контент компонента
29
- */
30
- content?: React.ReactElement | number;
31
- /**
32
- * Высота компонента, min = 16; max = 48 (только для view=count)
33
- */
34
- height?: number;
35
- /**
36
- * Цветовое оформление бейджа при view='count'
37
- */
38
- color?: Extract<BackgroundColorType, 'accent' | 'primary' | 'specialbg-secondary-transparent'>;
39
- /**
40
- * Цветовое оформление бейджа при view='icon'
41
- */
42
- iconColor?: IconColorType;
43
- /**
44
- * Цвет подложки под иконкой
45
- */
46
- iconUnderlayColor?: Extract<GraphicColorType, 'primary' | 'static-light'>;
47
- /**
48
- * Идентификатор для систем автоматизированного тестирования
49
- */
50
- dataTestId?: string;
51
- };
52
- declare const Badge: ({ className, size, view, visibleIconOutline, visibleColorOutline, content, height, iconColor, color, iconUnderlayColor, dataTestId, }: BadgeProps) => React.JSX.Element;
53
- export { IconColorType, BadgeProps, Badge };
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { CheckboxProps } from "./index-ebda875c";
4
- type HeaderProps = {
5
- checked?: boolean;
6
- indeterminate?: boolean;
7
- onChange?: CheckboxProps['onChange'];
8
- mobile?: boolean;
9
- };
10
- declare const Header: React.FC<HeaderProps>;
11
- export { HeaderProps, Header };
@@ -1,72 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ReactNode } from "react";
4
- import { BottomSheetProps } from "./index-f12ee135";
5
- import { BaseSelectProps } from "./typings-0f4b9bed";
6
- type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
- /**
8
- * Футер
9
- * @deprecated Используйте bottomSheetProps.actionButton
10
- */
11
- footer?: ReactNode;
12
- /**
13
- * Будет ли свайпаться шторка
14
- * @deprecated Используйте bottomSheetProps.swipeable
15
- */
16
- swipeable?: boolean;
17
- /**
18
- * Отображать в BottomSheet
19
- */
20
- isBottomSheet?: boolean;
21
- /**
22
- * Дополнительные пропсы шторки
23
- */
24
- bottomSheetProps?: Partial<BottomSheetProps>;
25
- /**
26
- * Дополнительные пропсы модалки
27
- */
28
- modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
29
- /**
30
- * Дополнительные пропсы шапки модалки
31
- */
32
- modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
33
- /**
34
- * Дополнительные пропсы футера модалки
35
- */
36
- modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
37
- };
38
- declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
39
- /**
40
- * Футер
41
- * @deprecated Используйте bottomSheetProps.actionButton
42
- */
43
- footer?: ReactNode;
44
- /**
45
- * Будет ли свайпаться шторка
46
- * @deprecated Используйте bottomSheetProps.swipeable
47
- */
48
- swipeable?: boolean | undefined;
49
- /**
50
- * Отображать в BottomSheet
51
- */
52
- isBottomSheet?: boolean | undefined;
53
- /**
54
- * Дополнительные пропсы шторки
55
- */
56
- bottomSheetProps?: Partial<BottomSheetProps> | undefined;
57
- /**
58
- * Дополнительные пропсы модалки
59
- */
60
- modalProps?: Partial<ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
61
- /**
62
- * Дополнительные пропсы шапки модалки
63
- */
64
- modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
65
- /**
66
- * Дополнительные пропсы футера модалки
67
- */
68
- modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
69
- } & React.RefAttributes<unknown>>;
70
- export * from "./Component.mobile-f1f15074";
71
- export { ModalMobileProps } from "./typings-bdb4c6b9";
72
- export { SelectMobileProps, BaseSelectMobile };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { BaseInputProps } from "./index-ebda875c";
4
- type InputMobileProps = Omit<BaseInputProps, 'FormControlComponent' | 'colorStyles'>;
5
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
- export { InputMobileProps, InputMobile };