@alfalab/core-components-picker-button 11.1.6 → 11.1.8
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-0f4b9bed.d.ts +5 -0
- package/Component-10db897e.d.ts +296 -0
- package/Component-72dda473.d.ts +53 -0
- package/Component-aed0af6e.d.ts +11 -0
- package/Component-ebda875c.d.ts +98 -9
- package/{cssm/Component-dd8ca091.d.ts → Component-f12ee135.d.ts} +1 -1
- package/Component.desktop.d.ts +2 -2
- package/Component.desktop.js +1 -1
- package/Component.mobile-96988a65.d.ts +6 -0
- package/{cssm/Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
- package/Component.mobile.d.ts +1 -1
- package/Component.responsive.d.ts +1 -1
- package/{esm/Component-dd8ca091.d.ts → cssm/Component-0f4b9bed.d.ts} +1 -1
- package/{esm/Component-72308007.d.ts → cssm/Component-10db897e.d.ts} +2 -2
- package/cssm/Component.desktop-785df74d.d.ts +1 -1
- package/cssm/Component.desktop.d.ts +2 -2
- package/cssm/Component.mobile-d7e9f69d.d.ts +1 -1
- package/{esm/Component.mobile-ade26e99.d.ts → cssm/Component.mobile-f28cbba0.d.ts} +1 -1
- package/{Component.modal.mobile-dd8ca091.d.ts → cssm/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/cssm/Component.responsive-3109f463.d.ts +1 -1
- package/cssm/Component.responsive.d.ts +1 -1
- package/{esm/component-72308007.d.ts → cssm/component-10db897e.d.ts} +1 -1
- package/cssm/desktop-69921c40.d.ts +6 -0
- package/cssm/field/Component.d.ts +1 -1
- package/cssm/hook-8abfea97.d.ts +8 -8
- package/cssm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/cssm/index-c44170fe.d.ts +2 -163
- package/cssm/index-c76d6398.d.ts +2 -2
- package/cssm/index-ebda875c.d.ts +2 -2
- package/cssm/index-f12ee135.d.ts +2 -2
- package/cssm/mobile-89f0cb07.d.ts +6 -0
- package/cssm/shared-4cd3936b.d.ts +5 -5
- package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{esm/types-e40becc7.d.ts → cssm/types-67a2d8af.d.ts} +1 -1
- package/{modern/typings-dd8ca091.d.ts → cssm/typings-0f4b9bed.d.ts} +4 -0
- package/{modern/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/cssm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/desktop-69921c40.d.ts +6 -0
- package/{Component-dd8ca091.d.ts → esm/Component-0f4b9bed.d.ts} +1 -1
- package/{Component-72308007.d.ts → esm/Component-10db897e.d.ts} +2 -2
- package/esm/Component.desktop-785df74d.d.ts +1 -1
- package/esm/Component.desktop.d.ts +2 -2
- package/esm/Component.desktop.js +1 -1
- package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
- package/{modern/Component.mobile-ade26e99.d.ts → esm/Component.mobile-f28cbba0.d.ts} +1 -1
- package/esm/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/esm/Component.responsive-3109f463.d.ts +1 -1
- package/esm/Component.responsive.d.ts +1 -1
- package/{cssm/component-72308007.d.ts → esm/component-10db897e.d.ts} +1 -1
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/field/Component.d.ts +1 -1
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +6 -6
- package/esm/hook-8abfea97.d.ts +8 -8
- package/esm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
- package/esm/index-c44170fe.d.ts +2 -163
- package/esm/index-c76d6398.d.ts +2 -2
- package/esm/index-ebda875c.d.ts +2 -2
- package/esm/index-f12ee135.d.ts +2 -2
- package/esm/index.css +5 -5
- package/esm/mobile-89f0cb07.d.ts +6 -0
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/esm/shared-4cd3936b.d.ts +5 -5
- package/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{modern/types-e40becc7.d.ts → esm/types-67a2d8af.d.ts} +1 -1
- package/{cssm/typings-dd8ca091.d.ts → esm/typings-0f4b9bed.d.ts} +4 -0
- package/{cssm/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/esm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/field/Component.d.ts +1 -1
- package/field/Component.js +1 -1
- package/field/index.css +6 -6
- package/hook-8abfea97.d.ts +10 -10
- package/hook-ebda875c.d.ts +48 -0
- package/{modern/index-72308007.d.ts → index-10db897e.d.ts} +2 -6
- package/index-bdb4c6b9.d.ts +180 -2
- package/index-c44170fe.d.ts +2 -163
- package/index-c76d6398.d.ts +2 -2
- package/index-ebda875c.d.ts +191 -53
- package/index-f12ee135.d.ts +324 -3
- package/index.css +5 -5
- package/modern/{Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/{cssm/Component-72308007.d.ts → modern/Component-10db897e.d.ts} +2 -2
- package/modern/Component.desktop-785df74d.d.ts +1 -1
- package/modern/Component.desktop.d.ts +2 -2
- package/modern/Component.desktop.js +1 -1
- package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
- package/{Component.mobile-ade26e99.d.ts → modern/Component.mobile-f28cbba0.d.ts} +1 -1
- package/modern/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/modern/Component.responsive-3109f463.d.ts +1 -1
- package/modern/Component.responsive.d.ts +1 -1
- package/{component-72308007.d.ts → modern/component-10db897e.d.ts} +1 -1
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/field/Component.d.ts +1 -1
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +6 -6
- package/modern/hook-8abfea97.d.ts +8 -8
- package/{index-72308007.d.ts → modern/index-10db897e.d.ts} +1 -5
- package/modern/index-c44170fe.d.ts +2 -163
- package/modern/index-c76d6398.d.ts +2 -2
- package/modern/index-ebda875c.d.ts +2 -2
- package/modern/index-f12ee135.d.ts +2 -2
- package/modern/index.css +5 -5
- package/modern/mobile-89f0cb07.d.ts +6 -0
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/modern/shared-4cd3936b.d.ts +5 -5
- package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{cssm/types-e40becc7.d.ts → modern/types-67a2d8af.d.ts} +1 -1
- package/{typings-dd8ca091.d.ts → modern/typings-0f4b9bed.d.ts} +4 -0
- package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/modern/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +3 -3
- package/shared-4cd3936b.d.ts +5 -63
- package/src/Component.desktop.tsx +3 -0
- package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{esm/typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/{esm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/Component.modal.mobile-dd8ca091.d.ts +0 -60
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/Component.mobile-ebda875c.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/modern/Component-63dec22f.d.ts +0 -184
- package/modern/Component-72308007.d.ts +0 -6
- package/modern/Component.mobile-ebda875c.d.ts +0 -6
- package/modern/component-72308007.d.ts +0 -44
- package/modern/desktop-63dec22f.d.ts +0 -6
- package/types-e40becc7.d.ts +0 -276
- package/utils-1574ad8b.d.ts +0 -29
- package/utils-49cc3c24.d.ts +0 -8
- /package/{Component.responsive-3109f463.d.ts → Component.responsive-d7e9f69d.d.ts} +0 -0
- /package/{Component-63dec22f.d.ts → cssm/Component-69921c40.d.ts} +0 -0
- /package/cssm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/{cssm/Component-63dec22f.d.ts → esm/Component-69921c40.d.ts} +0 -0
- /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/{esm/Component-63dec22f.d.ts → modern/Component-69921c40.d.ts} +0 -0
- /package/modern/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/{useSkeleton-ebda875c.d.ts → useSkeleton-1b036d4b.d.ts} +0 -0
package/index-bdb4c6b9.d.ts
CHANGED
|
@@ -1,2 +1,180 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-transition-group" />
|
|
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
|
+
* Дополнительные пропсы на обертку контента
|
|
76
|
+
*/
|
|
77
|
+
contentProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
78
|
+
/**
|
|
79
|
+
* Дополнительные пропсы на компонентную обертку контента
|
|
80
|
+
*/
|
|
81
|
+
componentDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
82
|
+
/**
|
|
83
|
+
* Дополнительный класс для обертки (Modal)
|
|
84
|
+
*/
|
|
85
|
+
wrapperClassName?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Обработчик скролла контента
|
|
88
|
+
*/
|
|
89
|
+
scrollHandler?: "wrapper" | "content" | MutableRefObject<HTMLDivElement | null>;
|
|
90
|
+
/**
|
|
91
|
+
* Пропсы для анимации (CSSTransition)
|
|
92
|
+
*/
|
|
93
|
+
transitionProps?: Partial<TransitionProps>;
|
|
94
|
+
/**
|
|
95
|
+
* Рендерить ли в контейнер через портал.
|
|
96
|
+
* @default true
|
|
97
|
+
*/
|
|
98
|
+
usePortal?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Обработчик события нажатия на бэкдроп
|
|
101
|
+
*/
|
|
102
|
+
onBackdropClick?: (event: MouseEvent) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Обработчик события нажатия на Escape
|
|
105
|
+
*
|
|
106
|
+
* Если `disableEscapeKeyDown` - false и модальное окно в фокусе
|
|
107
|
+
*/
|
|
108
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
109
|
+
/**
|
|
110
|
+
* Обработчик закрытия
|
|
111
|
+
*/
|
|
112
|
+
onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
113
|
+
/**
|
|
114
|
+
* Обработчик события onEntered компонента Transition
|
|
115
|
+
*/
|
|
116
|
+
onMount?: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Обработчик события onExited компонента Transition
|
|
119
|
+
*/
|
|
120
|
+
onUnmount?: () => void;
|
|
121
|
+
/**
|
|
122
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
123
|
+
*/
|
|
124
|
+
dataTestId?: string;
|
|
125
|
+
/**
|
|
126
|
+
* z-index компонента
|
|
127
|
+
*/
|
|
128
|
+
zIndex?: number;
|
|
129
|
+
/**
|
|
130
|
+
* Реф, который должен быть установлен компонентной области
|
|
131
|
+
*/
|
|
132
|
+
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
133
|
+
};
|
|
134
|
+
type BaseModalContext = {
|
|
135
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
136
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
137
|
+
hasFooter?: boolean;
|
|
138
|
+
hasHeader?: boolean;
|
|
139
|
+
hasScroll?: boolean;
|
|
140
|
+
headerHighlighted?: boolean;
|
|
141
|
+
footerHighlighted?: boolean;
|
|
142
|
+
headerOffset?: number;
|
|
143
|
+
setHeaderOffset: (offset: number) => void;
|
|
144
|
+
contentRef: Ref<HTMLElement>;
|
|
145
|
+
setHasHeader: (exists: boolean) => void;
|
|
146
|
+
setHasFooter: (exists: boolean) => void;
|
|
147
|
+
onClose: Required<BaseModalProps>["onClose"];
|
|
148
|
+
};
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
150
|
+
declare const BaseModalContext: React.Context<BaseModalContext>;
|
|
151
|
+
declare const BaseModal: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
152
|
+
declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
153
|
+
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
154
|
+
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
155
|
+
declare const getScrollbarSize: () => number;
|
|
156
|
+
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
157
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
158
|
+
type SavedStyle = {
|
|
159
|
+
value: string;
|
|
160
|
+
key: string;
|
|
161
|
+
el: HTMLElement;
|
|
162
|
+
};
|
|
163
|
+
type RestoreStyle = {
|
|
164
|
+
container: HTMLElement;
|
|
165
|
+
modals: number;
|
|
166
|
+
styles: SavedStyle[];
|
|
167
|
+
};
|
|
168
|
+
declare class ModalStore {
|
|
169
|
+
private readonly restoreStyles;
|
|
170
|
+
constructor();
|
|
171
|
+
getRestoreStyles: () => RestoreStyle[];
|
|
172
|
+
}
|
|
173
|
+
declare const getModalStore: () => ModalStore;
|
|
174
|
+
declare class GlobalStore {
|
|
175
|
+
private readonly modalStore;
|
|
176
|
+
constructor();
|
|
177
|
+
getModalStore: () => ModalStore;
|
|
178
|
+
}
|
|
179
|
+
export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer, getModalStore, GlobalStore };
|
|
180
|
+
export type { SavedStyle };
|
package/index-c44170fe.d.ts
CHANGED
|
@@ -1,164 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type StyleColors = {
|
|
5
|
-
default: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
|
-
inverted: {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "enterKeyHint"> & {
|
|
13
|
-
/**
|
|
14
|
-
* Значение поля ввода
|
|
15
|
-
*/
|
|
16
|
-
value?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Начальное значение поля
|
|
19
|
-
*/
|
|
20
|
-
defaultValue?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Растягивает компонент на ширину контейнера
|
|
23
|
-
*/
|
|
24
|
-
block?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Крестик для очистки поля
|
|
27
|
-
*/
|
|
28
|
-
clear?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Размер компонента
|
|
31
|
-
*/
|
|
32
|
-
size?: "s" | "m" | "l" | "xl";
|
|
33
|
-
/**
|
|
34
|
-
* Набор цветов для компонента
|
|
35
|
-
*/
|
|
36
|
-
colors?: "default" | "inverted";
|
|
37
|
-
/**
|
|
38
|
-
* Отображение ошибки
|
|
39
|
-
*/
|
|
40
|
-
error?: ReactNode | boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Отображение иконки успеха
|
|
43
|
-
*/
|
|
44
|
-
success?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Текст подсказки
|
|
47
|
-
*/
|
|
48
|
-
hint?: ReactNode;
|
|
49
|
-
/**
|
|
50
|
-
* Лейбл компонента
|
|
51
|
-
*/
|
|
52
|
-
label?: React.ReactNode;
|
|
53
|
-
/**
|
|
54
|
-
* Вид лейбла внутри / снаружи
|
|
55
|
-
*/
|
|
56
|
-
labelView?: "inner" | "outer";
|
|
57
|
-
/**
|
|
58
|
-
* Атрибут type
|
|
59
|
-
*/
|
|
60
|
-
type?: "number" | "card" | "email" | "money" | "password" | "tel" | "text";
|
|
61
|
-
/**
|
|
62
|
-
* Ref для обертки input
|
|
63
|
-
*/
|
|
64
|
-
wrapperRef?: React.Ref<HTMLDivElement> | null;
|
|
65
|
-
/**
|
|
66
|
-
* Слот слева
|
|
67
|
-
*/
|
|
68
|
-
leftAddons?: React.ReactNode;
|
|
69
|
-
/**
|
|
70
|
-
* Слот справа
|
|
71
|
-
*/
|
|
72
|
-
rightAddons?: React.ReactNode;
|
|
73
|
-
/**
|
|
74
|
-
* Слот под инпутом
|
|
75
|
-
*/
|
|
76
|
-
bottomAddons?: React.ReactNode;
|
|
77
|
-
/**
|
|
78
|
-
* Дополнительный класс
|
|
79
|
-
*/
|
|
80
|
-
className?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Дополнительный класс для поля
|
|
83
|
-
*/
|
|
84
|
-
fieldClassName?: string;
|
|
85
|
-
/**
|
|
86
|
-
* Дополнительный класс инпута
|
|
87
|
-
*/
|
|
88
|
-
inputClassName?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Дополнительный класс для лейбла
|
|
91
|
-
*/
|
|
92
|
-
labelClassName?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Дополнительный класс для аддонов
|
|
95
|
-
*/
|
|
96
|
-
addonsClassName?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Класс, который будет установлен при фокусе
|
|
99
|
-
*/
|
|
100
|
-
focusedClassName?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Класс, который будет установлен, если в поле есть значение
|
|
103
|
-
*/
|
|
104
|
-
filledClassName?: string;
|
|
105
|
-
/**
|
|
106
|
-
* Обработчик поля ввода
|
|
107
|
-
*/
|
|
108
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
|
|
109
|
-
value: string;
|
|
110
|
-
}) => void;
|
|
111
|
-
/**
|
|
112
|
-
* Обработчик нажатия на кнопку очистки
|
|
113
|
-
*/
|
|
114
|
-
onClear?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
115
|
-
/**
|
|
116
|
-
* Обработчик клика по полю
|
|
117
|
-
*/
|
|
118
|
-
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
119
|
-
/**
|
|
120
|
-
* Обработчик MouseDown по полю
|
|
121
|
-
*/
|
|
122
|
-
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
123
|
-
/**
|
|
124
|
-
* Обработчик MouseUp по полю
|
|
125
|
-
*/
|
|
126
|
-
onMouseUp?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
127
|
-
/**
|
|
128
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
129
|
-
*/
|
|
130
|
-
FormControlComponent?: ElementType;
|
|
131
|
-
/**
|
|
132
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
133
|
-
*/
|
|
134
|
-
dataTestId?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Стили компонента для default и inverted режима.
|
|
137
|
-
*/
|
|
138
|
-
colorStyles?: StyleColors;
|
|
139
|
-
/**
|
|
140
|
-
* Запрещает ввод с клавиатуры
|
|
141
|
-
*/
|
|
142
|
-
disableUserInput?: boolean;
|
|
143
|
-
};
|
|
144
|
-
type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
|
|
145
|
-
/**
|
|
146
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
147
|
-
* @default 1024
|
|
148
|
-
*/
|
|
149
|
-
breakpoint?: number;
|
|
150
|
-
/**
|
|
151
|
-
* Значение по-умолчанию для хука useMatchMedia
|
|
152
|
-
*/
|
|
153
|
-
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
154
|
-
};
|
|
155
|
-
declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
|
|
156
|
-
breakpoint?: number | undefined;
|
|
157
|
-
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
158
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
159
|
-
type InputDesktopProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
|
|
160
|
-
declare const InputDesktop: React.ForwardRefExoticComponent<InputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
161
|
-
type InputMobileProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
|
|
162
|
-
declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
163
|
-
export { InputProps, Input, InputDesktopProps, InputDesktop, InputMobileProps, InputMobile };
|
|
164
|
-
export * from "./Component.desktop-785df74d";
|
|
2
|
+
export * from "./Component.responsive-d7e9f69d";
|
|
3
|
+
export {};
|
package/index-c76d6398.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component-
|
|
2
|
-
export type { NavigationBarProps } from "./types-
|
|
1
|
+
export * from "./Component-10db897e";
|
|
2
|
+
export type { NavigationBarProps } from "./types-1c79e231";
|
package/index-ebda875c.d.ts
CHANGED
|
@@ -1,81 +1,219 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
import { HTMLAttributes } from "react";
|
|
5
|
+
type ScrollbarProps = {
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* Оборачиваемый элемент.
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
children?: React.ReactNode;
|
|
11
10
|
/**
|
|
12
|
-
* Дополнительный класс
|
|
11
|
+
* Дополнительный класс на корневой элемент.
|
|
13
12
|
*/
|
|
14
13
|
className?: string;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
align?: "left" | "right";
|
|
19
|
-
/**
|
|
20
|
-
* Фиксирует крестик
|
|
21
|
-
*/
|
|
22
|
-
sticky?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Иконка
|
|
25
|
-
*/
|
|
26
|
-
icon?: ElementType;
|
|
27
|
-
/**
|
|
28
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
15
|
+
* Набор цветов для компонента
|
|
29
16
|
*/
|
|
30
|
-
|
|
17
|
+
colors?: "default" | "inverted";
|
|
31
18
|
/**
|
|
32
|
-
*
|
|
19
|
+
* Растягивать контент по горизонтали по ширине содержимого.
|
|
33
20
|
*/
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
declare const Closer: FC<CloserProps>;
|
|
37
|
-
type IconButtonProps = {
|
|
21
|
+
horizontalAutoStretch?: boolean;
|
|
38
22
|
/**
|
|
39
|
-
*
|
|
23
|
+
* Название css свойства, которое устанавливается на контейнер при horizontalAutoStretch.
|
|
40
24
|
*/
|
|
41
|
-
|
|
42
|
-
className?: string;
|
|
43
|
-
}> | ReactElement;
|
|
25
|
+
widthPropName?: "minWidth" | "width" | "maxWidth";
|
|
44
26
|
/**
|
|
45
|
-
*
|
|
27
|
+
* Включает автоскрытие ползунка.
|
|
46
28
|
*/
|
|
47
|
-
|
|
29
|
+
autoHide?: boolean;
|
|
48
30
|
/**
|
|
49
|
-
*
|
|
31
|
+
* Время в мс, определяющее задержку до исчезновения полосы прокрутки (при включенной опции autoHide).
|
|
50
32
|
*/
|
|
51
|
-
|
|
33
|
+
autoHideTimeout?: number;
|
|
52
34
|
/**
|
|
53
|
-
*
|
|
35
|
+
* Принудительное отображение полосы прокрутки.
|
|
54
36
|
*/
|
|
55
|
-
|
|
37
|
+
forceVisible?: boolean | "x" | "y";
|
|
56
38
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
39
|
+
* Управление поведением клика по треку.
|
|
40
|
+
* Если true, то будет выполняться прокрутка к месту клика.
|
|
59
41
|
*/
|
|
60
|
-
|
|
42
|
+
clickOnTrack?: boolean;
|
|
61
43
|
/**
|
|
62
|
-
*
|
|
44
|
+
* HTML-aтрибуты на прокручиваемый узел.
|
|
63
45
|
*/
|
|
64
|
-
|
|
46
|
+
scrollableNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
65
47
|
/**
|
|
66
|
-
*
|
|
48
|
+
* HTML-aтрибуты на узел с контентом.
|
|
67
49
|
*/
|
|
68
|
-
|
|
69
|
-
} &
|
|
70
|
-
declare const
|
|
71
|
-
|
|
72
|
-
className?: string;
|
|
73
|
-
}> | ReactElement;
|
|
74
|
-
view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
|
|
75
|
-
size?: "s" | "xs" | "xxs" | undefined;
|
|
50
|
+
contentNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
51
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
52
|
+
declare const Scrollbar: React.ForwardRefExoticComponent<{
|
|
53
|
+
children?: React.ReactNode;
|
|
76
54
|
className?: string | undefined;
|
|
77
|
-
alignIcon?: "center" | "right" | "left" | undefined;
|
|
78
|
-
dataTestId?: string | undefined;
|
|
79
55
|
colors?: "default" | "inverted" | undefined;
|
|
80
|
-
|
|
81
|
-
|
|
56
|
+
horizontalAutoStretch?: boolean | undefined;
|
|
57
|
+
widthPropName?: "width" | "minWidth" | "maxWidth" | undefined;
|
|
58
|
+
autoHide?: boolean | undefined;
|
|
59
|
+
autoHideTimeout?: number | undefined;
|
|
60
|
+
forceVisible?: boolean | "x" | "y" | undefined;
|
|
61
|
+
clickOnTrack?: boolean | undefined;
|
|
62
|
+
scrollableNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
|
|
63
|
+
contentNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
|
|
64
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare class SimpleBar {
|
|
66
|
+
static getRtlHelpers(): {
|
|
67
|
+
isRtlScrollingInverted: boolean;
|
|
68
|
+
isRtlScrollbarInverted: boolean;
|
|
69
|
+
};
|
|
70
|
+
static defaultOptions: {
|
|
71
|
+
autoHide: boolean;
|
|
72
|
+
forceVisible: boolean;
|
|
73
|
+
clickOnTrack: boolean;
|
|
74
|
+
clickOnTrackSpeed: number;
|
|
75
|
+
classNames: {
|
|
76
|
+
contentEl: string;
|
|
77
|
+
contentWrapper: string;
|
|
78
|
+
offset: string;
|
|
79
|
+
mask: string;
|
|
80
|
+
wrapper: string;
|
|
81
|
+
placeholder: string;
|
|
82
|
+
scrollbar: string;
|
|
83
|
+
track: string;
|
|
84
|
+
heightAutoObserverWrapperEl: string;
|
|
85
|
+
heightAutoObserverEl: string;
|
|
86
|
+
visible: string;
|
|
87
|
+
horizontal: string;
|
|
88
|
+
vertical: string;
|
|
89
|
+
hover: string;
|
|
90
|
+
dragging: string;
|
|
91
|
+
};
|
|
92
|
+
scrollbarMinSize: number;
|
|
93
|
+
scrollbarMaxSize: number;
|
|
94
|
+
timeout: number;
|
|
95
|
+
};
|
|
96
|
+
static getOffset(el: any): {
|
|
97
|
+
top: any;
|
|
98
|
+
left: any;
|
|
99
|
+
};
|
|
100
|
+
static instances: WeakMap<object, any>;
|
|
101
|
+
constructor(element: any, options: any);
|
|
102
|
+
el: any;
|
|
103
|
+
minScrollbarWidth: number;
|
|
104
|
+
options: any;
|
|
105
|
+
classNames: any;
|
|
106
|
+
axis: {
|
|
107
|
+
x: {
|
|
108
|
+
scrollOffsetAttr: string;
|
|
109
|
+
sizeAttr: string;
|
|
110
|
+
scrollSizeAttr: string;
|
|
111
|
+
offsetSizeAttr: string;
|
|
112
|
+
offsetAttr: string;
|
|
113
|
+
overflowAttr: string;
|
|
114
|
+
dragOffset: number;
|
|
115
|
+
isOverflowing: boolean;
|
|
116
|
+
isVisible: boolean;
|
|
117
|
+
forceVisible: boolean;
|
|
118
|
+
track: {};
|
|
119
|
+
scrollbar: {};
|
|
120
|
+
};
|
|
121
|
+
y: {
|
|
122
|
+
scrollOffsetAttr: string;
|
|
123
|
+
sizeAttr: string;
|
|
124
|
+
scrollSizeAttr: string;
|
|
125
|
+
offsetSizeAttr: string;
|
|
126
|
+
offsetAttr: string;
|
|
127
|
+
overflowAttr: string;
|
|
128
|
+
dragOffset: number;
|
|
129
|
+
isOverflowing: boolean;
|
|
130
|
+
isVisible: boolean;
|
|
131
|
+
forceVisible: boolean;
|
|
132
|
+
track: {};
|
|
133
|
+
scrollbar: {};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
removePreventClickId: any;
|
|
137
|
+
recalculate(): void;
|
|
138
|
+
onMouseMove: (e: any) => void;
|
|
139
|
+
hideScrollbars: () => void;
|
|
140
|
+
onWindowResize: () => void;
|
|
141
|
+
init(): void;
|
|
142
|
+
scrollbarWidth: any;
|
|
143
|
+
initDOM(): void;
|
|
144
|
+
wrapperEl: any;
|
|
145
|
+
contentWrapperEl: any;
|
|
146
|
+
contentEl: any;
|
|
147
|
+
offsetEl: any;
|
|
148
|
+
maskEl: any;
|
|
149
|
+
placeholderEl: any;
|
|
150
|
+
heightAutoObserverWrapperEl: any;
|
|
151
|
+
heightAutoObserverEl: any;
|
|
152
|
+
setAccessibilityAttributes(): void;
|
|
153
|
+
initListeners(): void;
|
|
154
|
+
resizeObserver: any;
|
|
155
|
+
mutationObserver: any;
|
|
156
|
+
elStyles: any;
|
|
157
|
+
isRtl: boolean | undefined;
|
|
158
|
+
getScrollbarSize(axis?: string): number;
|
|
159
|
+
positionScrollbar(axis?: string): void;
|
|
160
|
+
toggleTrackVisibility(axis?: string): void;
|
|
161
|
+
hideNativeScrollbar(): void;
|
|
162
|
+
onScroll: () => void;
|
|
163
|
+
scrollXTicking: boolean | undefined;
|
|
164
|
+
scrollYTicking: boolean | undefined;
|
|
165
|
+
scrollX: () => void;
|
|
166
|
+
scrollY: () => void;
|
|
167
|
+
onMouseEnter: () => void;
|
|
168
|
+
mouseX: any;
|
|
169
|
+
mouseY: any;
|
|
170
|
+
onMouseMoveForAxis(axis?: string): void;
|
|
171
|
+
onMouseLeave: () => void;
|
|
172
|
+
onMouseLeaveForAxis(axis?: string): void;
|
|
173
|
+
showScrollbar(axis?: string): void;
|
|
174
|
+
onPointerEvent: (e: any) => void;
|
|
175
|
+
onDragStart(e: any, axis?: string): void;
|
|
176
|
+
draggedAxis: string | undefined;
|
|
177
|
+
drag: (e: any) => void;
|
|
178
|
+
onEndDrag: (e: any) => void;
|
|
179
|
+
preventClick: (e: any) => void;
|
|
180
|
+
onTrackClick(e: any, axis?: string): void;
|
|
181
|
+
getContentElement(): any;
|
|
182
|
+
getScrollElement(): any;
|
|
183
|
+
getScrollbarWidth(): any;
|
|
184
|
+
removeListeners(): void;
|
|
185
|
+
unMount(): void;
|
|
186
|
+
isWithinBounds(bbox: any): boolean;
|
|
187
|
+
findChild(el: any, query: any): any;
|
|
188
|
+
}
|
|
189
|
+
declare function memoize(func: Function, resolver?: Function | undefined): Function;
|
|
190
|
+
declare namespace memoize$0 {
|
|
191
|
+
export { MapCache as Cache };
|
|
192
|
+
}
|
|
193
|
+
declare function MapCache(entries?: any[] | undefined): void;
|
|
194
|
+
declare class MapCache {
|
|
195
|
+
private constructor();
|
|
196
|
+
clear: typeof mapCacheClear;
|
|
197
|
+
delete: typeof mapCacheDelete;
|
|
198
|
+
get: typeof mapCacheGet;
|
|
199
|
+
has: typeof mapCacheHas;
|
|
200
|
+
set: typeof mapCacheSet;
|
|
201
|
+
}
|
|
202
|
+
declare function mapCacheClear(): void;
|
|
203
|
+
declare class mapCacheClear {
|
|
204
|
+
__data__: {
|
|
205
|
+
hash: Hash;
|
|
206
|
+
map: any;
|
|
207
|
+
string: Hash;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
declare function mapCacheDelete(key: string): boolean;
|
|
211
|
+
declare function mapCacheGet(key: string): any;
|
|
212
|
+
declare function mapCacheHas(key: string): boolean;
|
|
213
|
+
declare function mapCacheSet(key: string, value: any): Object;
|
|
214
|
+
declare var canUseDOM: boolean;
|
|
215
|
+
declare function scrollbarWidth(el: any): any;
|
|
216
|
+
declare function getElementWindow(element: any): any;
|
|
217
|
+
declare function getElementDocument(element: any): any;
|
|
218
|
+
declare function getOptions(obj: any): unknown;
|
|
219
|
+
export { memoize as default, ScrollbarProps, Scrollbar, getElementWindow, getElementDocument, getOptions };
|