@alfalab/core-components-input-autocomplete 9.4.7 → 10.0.1
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.
- package/Component-50136800.d.ts +6 -0
- package/Component-5e1b8383.d.ts +70 -3
- package/{Component-3885b0d7.d.ts → Component-63dec22f.d.ts} +24 -26
- package/{modern/Component-425c8522.d.ts → Component-72dda473.d.ts} +1 -1
- package/Component-bdb4c6b9.d.ts +10 -7
- package/Component-c76d6398.d.ts +5 -0
- package/Component-ebda875c.d.ts +9 -98
- package/Component.desktop-ebda875c.d.ts +6 -0
- package/Component.desktop.d.ts +11 -65
- package/Component.desktop.js +4 -4
- package/Component.mobile-06ffd24b.d.ts +41 -0
- package/Component.mobile-ebda875c.d.ts +6 -0
- package/{Component.mobile-e81c389f.d.ts → Component.mobile-f1f15074.d.ts} +2 -6
- package/Component.mobile.d.ts +8 -9
- package/Component.mobile.js +7 -7
- package/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/Component.modal.mobile.d.ts +7 -39
- package/Component.modal.mobile.js +5 -5
- package/Component.responsive.d.ts +12 -71
- package/Component.responsive.js +7 -5
- package/autocomplete-field/Component.d.ts +1 -1
- package/autocomplete-field/Component.js +3 -3
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-field/index.js +1 -1
- package/autocomplete-mobile-field/Component.d.ts +9 -5
- package/autocomplete-mobile-field/Component.js +7 -7
- package/autocomplete-mobile-field/index.css +8 -8
- package/autocomplete-mobile-field/index.js +1 -1
- package/component-50136800.d.ts +44 -0
- package/cssm/Component-50136800.d.ts +6 -0
- package/cssm/Component-5e1b8383.d.ts +70 -3
- package/{modern/Component-3885b0d7.d.ts → cssm/Component-63dec22f.d.ts} +24 -26
- package/{Component-425c8522.d.ts → cssm/Component-72dda473.d.ts} +1 -1
- package/cssm/Component-bdb4c6b9.d.ts +10 -7
- package/cssm/Component-c76d6398.d.ts +5 -0
- package/cssm/Component-ebda875c.d.ts +9 -98
- package/cssm/Component.desktop-ebda875c.d.ts +6 -0
- package/cssm/Component.desktop.d.ts +11 -65
- package/cssm/Component.desktop.js +4 -4
- package/cssm/Component.mobile-06ffd24b.d.ts +41 -0
- package/cssm/Component.mobile-ebda875c.d.ts +6 -0
- package/{esm/Component.mobile-e81c389f.d.ts → cssm/Component.mobile-f1f15074.d.ts} +2 -6
- package/cssm/Component.mobile.d.ts +8 -9
- package/cssm/Component.mobile.js +6 -6
- package/cssm/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/cssm/Component.modal.mobile.d.ts +7 -39
- package/cssm/Component.modal.mobile.js +4 -4
- package/cssm/Component.responsive.d.ts +12 -71
- package/cssm/Component.responsive.js +6 -4
- package/cssm/autocomplete-field/Component.d.ts +1 -1
- package/cssm/autocomplete-field/Component.js +2 -2
- package/cssm/autocomplete-field/index.js +1 -1
- package/cssm/autocomplete-mobile-field/Component.d.ts +9 -5
- package/cssm/autocomplete-mobile-field/Component.js +6 -6
- package/cssm/autocomplete-mobile-field/index.js +1 -1
- package/cssm/component-50136800.d.ts +44 -0
- package/cssm/desktop-63dec22f.d.ts +6 -0
- package/cssm/desktop.d.ts +1 -1
- package/cssm/desktop.js +2 -2
- package/cssm/{hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +12 -10
- package/cssm/index-50136800.d.ts +11 -0
- package/cssm/{index-425c8522.d.ts → index-72dda473.d.ts} +7 -1
- package/cssm/index-bdb4c6b9.d.ts +2 -172
- package/cssm/index-c76d6398.d.ts +2 -0
- package/cssm/index-ebda875c.d.ts +94 -56
- package/cssm/index-f12ee135.d.ts +3 -287
- package/cssm/index.d.ts +2 -3
- package/cssm/index.js +9 -8
- package/cssm/mobile-06ffd24b.d.ts +5 -0
- package/cssm/mobile-96988a65.d.ts +3 -0
- package/cssm/mobile.d.ts +2 -2
- package/cssm/mobile.js +3 -4
- package/cssm/shared-4cd3936b.d.ts +93 -0
- package/cssm/types-d9f9bbcc.d.ts +259 -0
- package/cssm/typings-5e1b8383.d.ts +1 -1
- package/cssm/typings-9211a437.d.ts +95 -0
- package/cssm/utils-1574ad8b.d.ts +29 -0
- package/cssm/utils-49cc3c24.d.ts +8 -0
- package/desktop-63dec22f.d.ts +6 -0
- package/desktop.d.ts +1 -1
- package/desktop.js +2 -2
- package/esm/Component-50136800.d.ts +6 -0
- package/esm/Component-5e1b8383.d.ts +70 -3
- package/{cssm/Component-3885b0d7.d.ts → esm/Component-63dec22f.d.ts} +24 -26
- package/esm/{Component-425c8522.d.ts → Component-72dda473.d.ts} +1 -1
- package/esm/Component-bdb4c6b9.d.ts +10 -7
- package/esm/Component-c76d6398.d.ts +5 -0
- package/esm/Component-ebda875c.d.ts +9 -98
- package/esm/Component.desktop-ebda875c.d.ts +6 -0
- package/esm/Component.desktop.d.ts +11 -65
- package/esm/Component.desktop.js +2 -2
- package/esm/Component.mobile-06ffd24b.d.ts +41 -0
- package/esm/Component.mobile-ebda875c.d.ts +6 -0
- package/{modern/Component.mobile-e81c389f.d.ts → esm/Component.mobile-f1f15074.d.ts} +2 -6
- package/esm/Component.mobile.d.ts +8 -9
- package/esm/Component.mobile.js +6 -6
- package/esm/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/esm/Component.modal.mobile.d.ts +7 -39
- package/esm/Component.modal.mobile.js +5 -5
- package/esm/Component.responsive.d.ts +12 -71
- package/esm/Component.responsive.js +7 -5
- package/esm/autocomplete-field/Component.d.ts +1 -1
- package/esm/autocomplete-field/Component.js +4 -4
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-field/index.js +1 -1
- package/esm/autocomplete-mobile-field/Component.d.ts +9 -5
- package/esm/autocomplete-mobile-field/Component.js +7 -7
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-mobile-field/index.js +1 -1
- package/esm/component-50136800.d.ts +44 -0
- package/esm/desktop-63dec22f.d.ts +6 -0
- package/esm/desktop.d.ts +1 -1
- package/esm/desktop.js +2 -2
- package/{hook-b4e70cb0.d.ts → esm/hook-9ea9e32c.d.ts} +12 -10
- package/esm/index-50136800.d.ts +11 -0
- package/esm/{index-425c8522.d.ts → index-72dda473.d.ts} +7 -1
- package/esm/index-bdb4c6b9.d.ts +2 -172
- package/esm/index-c76d6398.d.ts +2 -0
- package/esm/index-ebda875c.d.ts +94 -56
- package/esm/index-f12ee135.d.ts +3 -287
- package/esm/index.d.ts +2 -3
- package/esm/index.js +10 -8
- package/esm/mobile-06ffd24b.d.ts +5 -0
- package/esm/mobile-96988a65.d.ts +3 -0
- package/esm/mobile.css +4 -4
- package/esm/mobile.d.ts +2 -2
- package/esm/mobile.js +4 -5
- package/esm/{mobile.module-2d568950.js → mobile.module-d324a3dd.js} +1 -1
- package/esm/shared-4cd3936b.d.ts +93 -0
- package/esm/types-d9f9bbcc.d.ts +259 -0
- package/esm/typings-5e1b8383.d.ts +1 -1
- package/esm/typings-9211a437.d.ts +95 -0
- package/esm/utils-1574ad8b.d.ts +29 -0
- package/esm/utils-49cc3c24.d.ts +8 -0
- package/{esm/hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +12 -10
- package/index-50136800.d.ts +11 -0
- package/{index-425c8522.d.ts → index-72dda473.d.ts} +7 -1
- package/index-bdb4c6b9.d.ts +2 -172
- package/index-c76d6398.d.ts +2 -0
- package/index-ebda875c.d.ts +94 -56
- package/index-f12ee135.d.ts +3 -287
- package/index.d.ts +2 -3
- package/index.js +10 -9
- package/mobile-06ffd24b.d.ts +5 -0
- package/mobile-96988a65.d.ts +3 -0
- package/mobile.css +4 -4
- package/mobile.d.ts +2 -2
- package/mobile.js +4 -5
- package/{mobile.module-80b4093b.js → mobile.module-2c3c27e1.js} +1 -1
- package/modern/Component-50136800.d.ts +6 -0
- package/modern/Component-5e1b8383.d.ts +70 -3
- package/{esm/Component-3885b0d7.d.ts → modern/Component-63dec22f.d.ts} +24 -26
- package/{cssm/Component-425c8522.d.ts → modern/Component-72dda473.d.ts} +1 -1
- package/modern/Component-bdb4c6b9.d.ts +10 -7
- package/modern/Component-c76d6398.d.ts +5 -0
- package/modern/Component-ebda875c.d.ts +9 -98
- package/modern/Component.desktop-ebda875c.d.ts +6 -0
- package/modern/Component.desktop.d.ts +11 -65
- package/modern/Component.desktop.js +2 -2
- package/modern/Component.mobile-06ffd24b.d.ts +41 -0
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/{cssm/Component.mobile-e81c389f.d.ts → modern/Component.mobile-f1f15074.d.ts} +2 -6
- package/modern/Component.mobile.d.ts +8 -9
- package/modern/Component.mobile.js +6 -6
- package/modern/Component.modal.mobile-5e1b8383.d.ts +60 -0
- package/modern/Component.modal.mobile.d.ts +7 -39
- package/modern/Component.modal.mobile.js +5 -5
- package/modern/Component.responsive.d.ts +12 -71
- package/modern/Component.responsive.js +7 -5
- package/modern/autocomplete-field/Component.d.ts +1 -1
- package/modern/autocomplete-field/Component.js +4 -4
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-field/index.js +1 -1
- package/modern/autocomplete-mobile-field/Component.d.ts +9 -5
- package/modern/autocomplete-mobile-field/Component.js +7 -7
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/autocomplete-mobile-field/index.js +1 -1
- package/modern/component-50136800.d.ts +44 -0
- package/modern/desktop-63dec22f.d.ts +6 -0
- package/modern/desktop.d.ts +1 -1
- package/modern/desktop.js +2 -2
- package/modern/{hook-b4e70cb0.d.ts → hook-9ea9e32c.d.ts} +12 -10
- package/modern/index-50136800.d.ts +11 -0
- package/modern/{index-425c8522.d.ts → index-72dda473.d.ts} +7 -1
- package/modern/index-bdb4c6b9.d.ts +2 -172
- package/modern/index-c76d6398.d.ts +2 -0
- package/modern/index-ebda875c.d.ts +94 -56
- package/modern/index-f12ee135.d.ts +3 -287
- package/modern/index.d.ts +2 -3
- package/modern/index.js +10 -8
- package/modern/mobile-06ffd24b.d.ts +5 -0
- package/modern/mobile-96988a65.d.ts +3 -0
- package/modern/mobile.css +4 -4
- package/modern/mobile.d.ts +2 -2
- package/modern/mobile.js +4 -5
- package/modern/{mobile.module-93c1e0e2.js → mobile.module-990d8697.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +93 -0
- package/modern/types-d9f9bbcc.d.ts +259 -0
- package/modern/typings-5e1b8383.d.ts +1 -1
- package/modern/typings-9211a437.d.ts +95 -0
- package/modern/utils-1574ad8b.d.ts +29 -0
- package/modern/utils-49cc3c24.d.ts +8 -0
- package/package.json +25 -5
- package/shared-4cd3936b.d.ts +93 -0
- package/src/Component.desktop.tsx +89 -0
- package/src/Component.mobile.tsx +251 -0
- package/src/Component.modal.mobile.tsx +227 -0
- package/src/Component.responsive.tsx +40 -0
- package/src/autocomplete-field/Component.tsx +91 -0
- package/src/autocomplete-field/index.module.css +3 -0
- package/src/autocomplete-field/index.ts +1 -0
- package/src/autocomplete-mobile-field/Component.tsx +77 -0
- package/src/autocomplete-mobile-field/index.module.css +37 -0
- package/src/autocomplete-mobile-field/index.ts +1 -0
- package/src/desktop.ts +1 -0
- package/src/index.ts +4 -0
- package/src/mobile.module.css +14 -0
- package/src/mobile.ts +5 -0
- package/types-d9f9bbcc.d.ts +259 -0
- package/typings-5e1b8383.d.ts +1 -1
- package/typings-9211a437.d.ts +95 -0
- package/utils-1574ad8b.d.ts +29 -0
- package/utils-49cc3c24.d.ts +8 -0
- package/Component-aed0af6e.d.ts +0 -11
- package/Component-b4e70cb0.d.ts +0 -22
- package/Component-f12ee135.d.ts +0 -71
- package/cssm/Component-aed0af6e.d.ts +0 -11
- package/cssm/Component-b4e70cb0.d.ts +0 -22
- package/cssm/Component-f12ee135.d.ts +0 -71
- package/cssm/index-3885b0d7.d.ts +0 -3
- package/cssm/index-3e68f8db.d.ts +0 -5
- package/cssm/index-e81c389f.d.ts +0 -3
- package/cssm/responsive.d.ts +0 -2
- package/cssm/responsive.js +0 -26
- package/esm/Component-aed0af6e.d.ts +0 -11
- package/esm/Component-b4e70cb0.d.ts +0 -22
- package/esm/Component-f12ee135.d.ts +0 -71
- package/esm/index-3885b0d7.d.ts +0 -3
- package/esm/index-3e68f8db.d.ts +0 -5
- package/esm/index-e81c389f.d.ts +0 -3
- package/esm/responsive.d.ts +0 -2
- package/esm/responsive.js +0 -16
- package/index-3885b0d7.d.ts +0 -3
- package/index-3e68f8db.d.ts +0 -5
- package/index-e81c389f.d.ts +0 -3
- package/modern/Component-aed0af6e.d.ts +0 -11
- package/modern/Component-b4e70cb0.d.ts +0 -22
- package/modern/Component-f12ee135.d.ts +0 -71
- package/modern/index-3885b0d7.d.ts +0 -3
- package/modern/index-3e68f8db.d.ts +0 -5
- package/modern/index-e81c389f.d.ts +0 -3
- package/modern/responsive.d.ts +0 -2
- package/modern/responsive.js +0 -15
- package/responsive.d.ts +0 -2
- package/responsive.js +0 -24
- /package/cssm/{types-ebda875c.d.ts → types-83e2bd9e.d.ts} +0 -0
- /package/esm/{types-ebda875c.d.ts → types-83e2bd9e.d.ts} +0 -0
- /package/modern/{types-ebda875c.d.ts → types-83e2bd9e.d.ts} +0 -0
- /package/{types-ebda875c.d.ts → types-83e2bd9e.d.ts} +0 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/// <reference types="react-transition-group" />
|
|
2
|
+
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
3
|
+
import { TransitionProps } from 'react-transition-group/Transition';
|
|
4
|
+
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
5
|
+
import { NavigationBarProps } from "./index-c76d6398";
|
|
6
|
+
import { BackgroundColorType } from "./index-72dda473";
|
|
7
|
+
type BottomSheetTitleAlign = 'center' | 'left';
|
|
8
|
+
type BottomSheetProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Контент
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Управление видимостью
|
|
15
|
+
*/
|
|
16
|
+
open: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Заголовок
|
|
19
|
+
*/
|
|
20
|
+
title?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Размер заголовка
|
|
23
|
+
*/
|
|
24
|
+
titleSize?: NavigationBarProps['titleSize'];
|
|
25
|
+
/**
|
|
26
|
+
* Подзаголовок.
|
|
27
|
+
*/
|
|
28
|
+
subtitle?: NavigationBarProps['subtitle'];
|
|
29
|
+
/**
|
|
30
|
+
* Кнопка действия (обычно, это кнопка закрытия)
|
|
31
|
+
*/
|
|
32
|
+
actionButton?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Нода, компонент или функция возвращающая их
|
|
35
|
+
*
|
|
36
|
+
* Контейнер к которому будут добавляться порталы
|
|
37
|
+
*/
|
|
38
|
+
container?: BaseModalProps['container'];
|
|
39
|
+
/**
|
|
40
|
+
* Рендерить ли в контейнер через портал.
|
|
41
|
+
*/
|
|
42
|
+
usePortal?: BaseModalProps['usePortal'];
|
|
43
|
+
/**
|
|
44
|
+
* Дополнительный класс
|
|
45
|
+
*/
|
|
46
|
+
className?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Дополнительный класс
|
|
49
|
+
*/
|
|
50
|
+
contentClassName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Дополнительные пропсы на контейнер.
|
|
53
|
+
*/
|
|
54
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
55
|
+
/**
|
|
56
|
+
* Дополнительный класс
|
|
57
|
+
*/
|
|
58
|
+
containerClassName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Цвет фона
|
|
61
|
+
*/
|
|
62
|
+
backgroundColor?: Extract<BackgroundColorType, 'primary' | 'secondary'>;
|
|
63
|
+
/**
|
|
64
|
+
* Дополнительный класс шапки
|
|
65
|
+
*/
|
|
66
|
+
headerClassName?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Дополнительный класс футера
|
|
69
|
+
*/
|
|
70
|
+
footerClassName?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Дополнительный класс для аддонов
|
|
73
|
+
*/
|
|
74
|
+
addonClassName?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Дополнительный класс для компонента крестика
|
|
77
|
+
*/
|
|
78
|
+
closerClassName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Дополнительный класс для компонента стрелки назад
|
|
81
|
+
*/
|
|
82
|
+
backerClassName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Дополнительный класс для компонента модального окна
|
|
85
|
+
*/
|
|
86
|
+
modalClassName?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Дополнительный класс для обертки модального окна
|
|
89
|
+
*/
|
|
90
|
+
modalWrapperClassName?: string;
|
|
91
|
+
/**
|
|
92
|
+
* TransitionProps, прокидываются в компонент CSSTransitionProps.
|
|
93
|
+
*/
|
|
94
|
+
transitionProps?: Partial<TransitionProps>;
|
|
95
|
+
/**
|
|
96
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
97
|
+
*/
|
|
98
|
+
dataTestId?: string;
|
|
99
|
+
/**
|
|
100
|
+
* z-index компонента
|
|
101
|
+
*/
|
|
102
|
+
zIndex?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Будет ли свайпаться шторка
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
swipeable?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Будет ли свайпаться контент
|
|
110
|
+
*/
|
|
111
|
+
swipeableContent?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Порог свайпа
|
|
114
|
+
*/
|
|
115
|
+
swipeThreshold?: number;
|
|
116
|
+
/**
|
|
117
|
+
* Слот слева
|
|
118
|
+
*/
|
|
119
|
+
leftAddons?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Слот справа
|
|
122
|
+
*/
|
|
123
|
+
rightAddons?: ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* Слот снизу
|
|
126
|
+
*/
|
|
127
|
+
bottomAddons?: ReactNode;
|
|
128
|
+
/**
|
|
129
|
+
* Наличие компонента крестика
|
|
130
|
+
*/
|
|
131
|
+
hasCloser?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Наличие компонента стрелки назад
|
|
134
|
+
*/
|
|
135
|
+
hasBacker?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Выравнивание заголовка
|
|
138
|
+
*/
|
|
139
|
+
titleAlign?: BottomSheetTitleAlign;
|
|
140
|
+
/**
|
|
141
|
+
* Фиксирует шапку
|
|
142
|
+
*/
|
|
143
|
+
stickyHeader?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Фиксирует футер
|
|
146
|
+
*/
|
|
147
|
+
stickyFooter?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Высота шторки
|
|
150
|
+
*/
|
|
151
|
+
initialHeight?: 'default' | 'full';
|
|
152
|
+
/**
|
|
153
|
+
* Будет ли виден оверлэй
|
|
154
|
+
*/
|
|
155
|
+
hideOverlay?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Будет ли видна шапка
|
|
158
|
+
*/
|
|
159
|
+
hideHeader?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Будет ли обрезан заголовок
|
|
162
|
+
*/
|
|
163
|
+
trimTitle?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Запретить закрытие шторки кликом на оверлэй
|
|
166
|
+
*/
|
|
167
|
+
disableOverlayClick?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Отключает блокировку скролла при открытии модального окна
|
|
170
|
+
*/
|
|
171
|
+
disableBlockingScroll?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Отключает ловушку фокуса
|
|
174
|
+
*/
|
|
175
|
+
disableFocusLock?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
178
|
+
* Не анимировать шторку при изменении размера вьюпорта
|
|
179
|
+
*/
|
|
180
|
+
ignoreScreenChange?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Свойства для Бэкдропа
|
|
183
|
+
*/
|
|
184
|
+
backdropProps?: BaseModalProps['backdropProps'];
|
|
185
|
+
/**
|
|
186
|
+
* Реф на контейнер, в котором происходит скролл
|
|
187
|
+
*/
|
|
188
|
+
scrollableContainerRef?: RefObject<HTMLElement>;
|
|
189
|
+
/**
|
|
190
|
+
* Реф для управления компонентом.
|
|
191
|
+
*/
|
|
192
|
+
bottomSheetInstanceRef?: RefObject<{
|
|
193
|
+
scrollToArea: (idx: number) => void;
|
|
194
|
+
}>;
|
|
195
|
+
/**
|
|
196
|
+
* Реф на контейнер, в котором находится шторка
|
|
197
|
+
*/
|
|
198
|
+
sheetContainerRef?: RefObject<HTMLElement>;
|
|
199
|
+
/**
|
|
200
|
+
* Магнитные области видимой высоты шторки.
|
|
201
|
+
* Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
|
|
202
|
+
* По-умолчанию -[0, window.innerHeight - '24px']
|
|
203
|
+
* массив должен состоять минимум из 2 элементов
|
|
204
|
+
*/
|
|
205
|
+
magneticAreas?: Array<number | string>;
|
|
206
|
+
/**
|
|
207
|
+
* Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
|
|
208
|
+
*/
|
|
209
|
+
initialActiveAreaIndex?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Отключает скролл контентной области.
|
|
212
|
+
*/
|
|
213
|
+
scrollLocked?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Скрыть скроллбар внутри шторки
|
|
216
|
+
*/
|
|
217
|
+
hideScrollbar?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Верхний отступ шторки, если она открыта на максимальную высоту
|
|
220
|
+
*/
|
|
221
|
+
headerOffset?: number;
|
|
222
|
+
/**
|
|
223
|
+
* Содержимое bottom-sheet всегда в DOM
|
|
224
|
+
*/
|
|
225
|
+
keepMounted?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Отключает автоматический перевод фокуса на bottom-sheet при открытии
|
|
228
|
+
*/
|
|
229
|
+
disableAutoFocus?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
|
|
232
|
+
*/
|
|
233
|
+
disableRestoreFocus?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Отключает вызов `onClose` при нажатии Escape
|
|
236
|
+
*/
|
|
237
|
+
disableEscapeKeyDown?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Обработчик закрытия
|
|
240
|
+
*/
|
|
241
|
+
onClose: () => void;
|
|
242
|
+
/**
|
|
243
|
+
* Обработчик нажатия на стрелку назад
|
|
244
|
+
*/
|
|
245
|
+
onBack?: () => void;
|
|
246
|
+
/**
|
|
247
|
+
* Вызывается в начале анимации притягивания к одной из `magneticAreas`
|
|
248
|
+
*/
|
|
249
|
+
onMagnetize?: (index: number) => void;
|
|
250
|
+
/**
|
|
251
|
+
* Вызывается после окончания анимации притягивания
|
|
252
|
+
*/
|
|
253
|
+
onMagnetizeEnd?: () => void;
|
|
254
|
+
/**
|
|
255
|
+
* Вызывается при изменении положения шторки
|
|
256
|
+
*/
|
|
257
|
+
onOffsetChange?: (offset: number, percent: number) => void;
|
|
258
|
+
};
|
|
259
|
+
export { BottomSheetTitleAlign, BottomSheetProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AriaAttributes, FC, FocusEvent, MouseEvent, ReactElement, ReactNode, RefAttributes, SVGProps } from 'react';
|
|
2
2
|
import { InputProps } from "@alfalab/core-components-input";
|
|
3
|
+
import { PopoverProps } from "./index-ebda875c";
|
|
3
4
|
type AnyObject = Record<string, any>;
|
|
4
5
|
type OptionShape = {
|
|
5
6
|
/**
|
|
@@ -546,5 +547,4 @@ type CheckmarkProps = {
|
|
|
546
547
|
*/
|
|
547
548
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
548
549
|
};
|
|
549
|
-
export * from "./Component-ebda875c";
|
|
550
550
|
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
type StyleColors = {
|
|
3
|
+
default: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
inverted: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type ComponentProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Тип кнопки
|
|
13
|
+
* @default secondary
|
|
14
|
+
*/
|
|
15
|
+
view?: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'outlined' | 'filled' | 'transparent' | 'link' | 'ghost';
|
|
16
|
+
/**
|
|
17
|
+
* Слот слева
|
|
18
|
+
*/
|
|
19
|
+
leftAddons?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Слот справа
|
|
22
|
+
*/
|
|
23
|
+
rightAddons?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Размер компонента
|
|
26
|
+
* @default m
|
|
27
|
+
*/
|
|
28
|
+
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
29
|
+
/**
|
|
30
|
+
* Растягивает компонент на ширину контейнера
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
block?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительный класс
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Дополнительный класс для спиннера
|
|
40
|
+
*/
|
|
41
|
+
spinnerClassName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Выводит ссылку в виде кнопки
|
|
44
|
+
*/
|
|
45
|
+
href?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
|
|
48
|
+
*/
|
|
49
|
+
Component?: ElementType;
|
|
50
|
+
/**
|
|
51
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
52
|
+
*/
|
|
53
|
+
dataTestId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Показать лоадер
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
loading?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Не переносить текст кнопки на новую строку
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
nowrap?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Набор цветов для компонента
|
|
66
|
+
*/
|
|
67
|
+
colors?: 'default' | 'inverted';
|
|
68
|
+
/**
|
|
69
|
+
* Дочерние элементы.
|
|
70
|
+
*/
|
|
71
|
+
children?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* Основные стили компонента.
|
|
74
|
+
*/
|
|
75
|
+
styles: {
|
|
76
|
+
[key: string]: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Стили компонента для default и inverted режима.
|
|
80
|
+
*/
|
|
81
|
+
colorStylesMap: StyleColors;
|
|
82
|
+
};
|
|
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> & {
|
|
89
|
+
/**
|
|
90
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
91
|
+
* @default 1024
|
|
92
|
+
*/
|
|
93
|
+
breakpoint?: number;
|
|
94
|
+
};
|
|
95
|
+
export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseSelectProps, OptionShape } from "./
|
|
2
|
+
import { BaseSelectProps, OptionShape } from "./typings-5e1b8383";
|
|
3
3
|
type UseSelectWithApplyProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Список выбранных пунктов
|
|
@@ -36,18 +36,20 @@ type UseSelectWithApplyProps = {
|
|
|
36
36
|
};
|
|
37
37
|
declare const SELECT_ALL_KEY = "select_all";
|
|
38
38
|
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
39
|
-
OptionsList: import("react").ForwardRefExoticComponent<import("./
|
|
39
|
+
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-5e1b8383").OptionsListProps & {
|
|
40
40
|
showClear?: boolean | undefined;
|
|
41
41
|
onClose?: (() => void) | undefined;
|
|
42
42
|
selectedDraft?: OptionShape[] | undefined;
|
|
43
|
-
OptionsList?: import("react").FC<import("./
|
|
44
|
-
Footer?: import("react").FC<import("./Component-
|
|
45
|
-
Header?: import("react").FC<import("./Component-
|
|
46
|
-
headerProps?: import("./Component-
|
|
43
|
+
OptionsList?: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
44
|
+
Footer?: import("react").FC<import("./Component-5e1b8383").FooterProps> | undefined;
|
|
45
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined; /**
|
|
47
|
+
* Показывать кнопку очистки
|
|
48
|
+
*/
|
|
47
49
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
48
50
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
49
51
|
optionsListProps: {
|
|
50
|
-
OptionsList: import("react").FC<import("./
|
|
52
|
+
OptionsList: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
51
53
|
showClear: boolean;
|
|
52
54
|
onClear: () => void;
|
|
53
55
|
onApply: () => void;
|
|
@@ -62,12 +64,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
62
64
|
};
|
|
63
65
|
allowUnselect: boolean;
|
|
64
66
|
multiple: boolean;
|
|
65
|
-
options: (OptionShape | import("./
|
|
67
|
+
options: (OptionShape | import("./typings-5e1b8383").GroupShape | {
|
|
66
68
|
key: string;
|
|
67
69
|
content: string;
|
|
68
70
|
})[];
|
|
69
|
-
onChange: (payload: import("./
|
|
71
|
+
onChange: (payload: import("./typings-5e1b8383").BaseSelectChangePayload) => void;
|
|
70
72
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
71
73
|
};
|
|
72
|
-
export * from "./Component-
|
|
74
|
+
export * from "./Component-5e1b8383";
|
|
73
75
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { PaddingType } from "./index-72dda473";
|
|
4
|
+
declare const isClient: () => boolean;
|
|
5
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
6
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
7
|
+
declare function easeInOutQuad(x: number): number;
|
|
8
|
+
declare const easingFns: {
|
|
9
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
10
|
+
};
|
|
11
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns };
|
|
@@ -3,4 +3,10 @@ type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' |
|
|
|
3
3
|
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
4
|
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
5
|
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
-
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
|
package/index-bdb4c6b9.d.ts
CHANGED
|
@@ -1,172 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { FC, KeyboardEvent, MouseEvent, MutableRefObject, ReactNode, Ref } from "react";
|
|
6
|
-
import { TransitionProps } from "react-transition-group/Transition";
|
|
7
|
-
import { BackdropProps, PortalProps } from "./index-ebda875c";
|
|
8
|
-
type BaseModalProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Контент
|
|
11
|
-
*/
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Компонент бэкдропа
|
|
15
|
-
*/
|
|
16
|
-
Backdrop?: FC<BackdropProps>;
|
|
17
|
-
/**
|
|
18
|
-
* Свойства для Бэкдропа
|
|
19
|
-
*/
|
|
20
|
-
backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
|
|
21
|
-
/**
|
|
22
|
-
* Нода, компонент или функция возвращающая их
|
|
23
|
-
*
|
|
24
|
-
* Контейнер к которому будут добавляться порталы
|
|
25
|
-
*/
|
|
26
|
-
container?: PortalProps["getPortalContainer"];
|
|
27
|
-
/**
|
|
28
|
-
* Отключает автоматический перевод фокуса на модалку при открытии
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
disableAutoFocus?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Отключает ловушку фокуса
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
disableFocusLock?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
disableRestoreFocus?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Отключает вызов `callback` при нажатии Escape
|
|
44
|
-
* @default false
|
|
45
|
-
*/
|
|
46
|
-
disableEscapeKeyDown?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Отключает вызов `callback` при клике на бэкдроп
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
|
-
disableBackdropClick?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Отключает блокировку скролла при открытии модального окна
|
|
54
|
-
* @default false
|
|
55
|
-
*/
|
|
56
|
-
disableBlockingScroll?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Содержимое модалки всегда в DOM
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
keepMounted?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Управление видимостью модалки
|
|
64
|
-
*/
|
|
65
|
-
open: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Дополнительный класс
|
|
68
|
-
*/
|
|
69
|
-
className?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Дополнительный класс
|
|
72
|
-
*/
|
|
73
|
-
contentClassName?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Дополнительный класс для обертки (Modal)
|
|
76
|
-
*/
|
|
77
|
-
wrapperClassName?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Обработчик скролла контента
|
|
80
|
-
*/
|
|
81
|
-
scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
|
|
82
|
-
/**
|
|
83
|
-
* Пропсы для анимации (CSSTransition)
|
|
84
|
-
*/
|
|
85
|
-
transitionProps?: Partial<TransitionProps>;
|
|
86
|
-
/**
|
|
87
|
-
* Рендерить ли в контейнер через портал.
|
|
88
|
-
* @default true
|
|
89
|
-
*/
|
|
90
|
-
usePortal?: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Обработчик события нажатия на бэкдроп
|
|
93
|
-
*/
|
|
94
|
-
onBackdropClick?: (event: MouseEvent) => void;
|
|
95
|
-
/**
|
|
96
|
-
* Обработчик события нажатия на Escape
|
|
97
|
-
*
|
|
98
|
-
* Если `disableEscapeKeyDown` - false и модальное окно в фокусе
|
|
99
|
-
*/
|
|
100
|
-
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
101
|
-
/**
|
|
102
|
-
* Обработчик закрытия
|
|
103
|
-
*/
|
|
104
|
-
onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
105
|
-
/**
|
|
106
|
-
* Обработчик события onEntered компонента Transition
|
|
107
|
-
*/
|
|
108
|
-
onMount?: () => void;
|
|
109
|
-
/**
|
|
110
|
-
* Обработчик события onExited компонента Transition
|
|
111
|
-
*/
|
|
112
|
-
onUnmount?: () => void;
|
|
113
|
-
/**
|
|
114
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
115
|
-
*/
|
|
116
|
-
dataTestId?: string;
|
|
117
|
-
/**
|
|
118
|
-
* z-index компонента
|
|
119
|
-
*/
|
|
120
|
-
zIndex?: number;
|
|
121
|
-
/**
|
|
122
|
-
* Реф, который должен быть установлен компонентной области
|
|
123
|
-
*/
|
|
124
|
-
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
125
|
-
};
|
|
126
|
-
type BaseModalContext = {
|
|
127
|
-
parentRef: React.RefObject<HTMLDivElement>;
|
|
128
|
-
componentRef: React.RefObject<HTMLDivElement>;
|
|
129
|
-
hasFooter?: boolean;
|
|
130
|
-
hasHeader?: boolean;
|
|
131
|
-
hasScroll?: boolean;
|
|
132
|
-
headerHighlighted?: boolean;
|
|
133
|
-
footerHighlighted?: boolean;
|
|
134
|
-
headerOffset?: number;
|
|
135
|
-
setHeaderOffset: (offset: number) => void;
|
|
136
|
-
contentRef: Ref<HTMLElement>;
|
|
137
|
-
setHasHeader: (exists: boolean) => void;
|
|
138
|
-
setHasFooter: (exists: boolean) => void;
|
|
139
|
-
onClose: Required<BaseModalProps>["onClose"];
|
|
140
|
-
};
|
|
141
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
142
|
-
declare const BaseModalContext: React.Context<BaseModalContext>;
|
|
143
|
-
declare const BaseModal: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
144
|
-
declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
145
|
-
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
146
|
-
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
147
|
-
declare const getScrollbarSize: () => number;
|
|
148
|
-
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
149
|
-
declare const handleContainer: (container?: HTMLElement) => void;
|
|
150
|
-
type SavedStyle = {
|
|
151
|
-
value: string;
|
|
152
|
-
key: string;
|
|
153
|
-
el: HTMLElement;
|
|
154
|
-
};
|
|
155
|
-
type RestoreStyle = {
|
|
156
|
-
container: HTMLElement;
|
|
157
|
-
modals: number;
|
|
158
|
-
styles: SavedStyle[];
|
|
159
|
-
};
|
|
160
|
-
declare class ModalStore {
|
|
161
|
-
private readonly restoreStyles;
|
|
162
|
-
constructor();
|
|
163
|
-
getRestoreStyles: () => RestoreStyle[];
|
|
164
|
-
}
|
|
165
|
-
declare const getModalStore: () => ModalStore;
|
|
166
|
-
declare class GlobalStore {
|
|
167
|
-
private readonly modalStore;
|
|
168
|
-
constructor();
|
|
169
|
-
getModalStore: () => ModalStore;
|
|
170
|
-
}
|
|
171
|
-
export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer, getModalStore, GlobalStore };
|
|
172
|
-
export type { SavedStyle };
|
|
1
|
+
export * from "./Component-ebda875c";
|
|
2
|
+
export * from "./utils-1574ad8b";
|