@alfalab/core-components-input-autocomplete 10.1.2 → 10.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.mobile.js +1 -1
- package/Component.modal.mobile.js +1 -1
- package/Component.responsive.js +1 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +1 -1
- package/autocomplete-mobile-field/index.css +8 -8
- package/component-1a4fbd11.d.ts +1 -1
- package/cssm/component-1a4fbd11.d.ts +1 -1
- package/cssm/index-f12ee135.d.ts +1 -1
- package/cssm/{types-b0ff398d.d.ts → types-e40becc7.d.ts} +6 -2
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.modal.mobile.js +1 -1
- package/esm/Component.responsive.js +1 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +1 -1
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/component-1a4fbd11.d.ts +1 -1
- package/esm/index-f12ee135.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/mobile.css +4 -4
- package/esm/mobile.js +1 -1
- package/esm/{mobile.module-7ccedebb.js → mobile.module-7c125313.js} +1 -1
- package/{modern/types-b0ff398d.d.ts → esm/types-e40becc7.d.ts} +6 -2
- package/index-f12ee135.d.ts +1 -1
- package/index.js +1 -1
- package/mobile.css +4 -4
- package/mobile.js +1 -1
- package/{mobile.module-f3a9e8d4.js → mobile.module-f4b02d6c.js} +1 -1
- package/modern/Component-63dec22f.d.ts +184 -0
- package/modern/Component-dd8ca091.d.ts +70 -3
- package/modern/Component-ebda875c.d.ts +9 -98
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/modern/Component.mobile.d.ts +1 -1
- package/modern/Component.mobile.js +1 -1
- package/modern/{mobile-45dc17c6.d.ts → Component.modal.mobile-dd8ca091.d.ts} +26 -13
- package/modern/Component.modal.mobile.d.ts +2 -2
- package/modern/Component.modal.mobile.js +1 -1
- package/modern/Component.responsive.d.ts +1 -1
- package/modern/Component.responsive.js +1 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +1 -1
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/component-1a4fbd11.d.ts +1 -1
- package/modern/desktop-63dec22f.d.ts +6 -2
- package/modern/hook-8abfea97.d.ts +4 -4
- package/modern/index-bdb4c6b9.d.ts +2 -180
- package/modern/index-ebda875c.d.ts +107 -190
- package/modern/index-f12ee135.d.ts +1 -1
- package/modern/index.js +1 -1
- package/modern/mobile-96988a65.d.ts +2 -5
- package/modern/mobile-ade26e99.d.ts +5 -0
- package/modern/mobile.css +4 -4
- package/modern/mobile.js +1 -1
- package/modern/{mobile.module-f3a5d2f8.js → mobile.module-b86c11f5.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +59 -2
- package/{esm/types-b0ff398d.d.ts → modern/types-e40becc7.d.ts} +6 -2
- package/modern/utils-1574ad8b.d.ts +29 -0
- package/package.json +4 -4
- package/{types-b0ff398d.d.ts → types-e40becc7.d.ts} +6 -2
- package/modern/Component-96988a65.d.ts +0 -9
- package/modern/Component-aed0af6e.d.ts +0 -11
- package/modern/hook-ebda875c.d.ts +0 -48
- /package/modern/{useSkeleton-1b036d4b.d.ts → useSkeleton-ebda875c.d.ts} +0 -0
|
@@ -1,101 +1,12 @@
|
|
|
1
|
-
/// <reference types="react-transition-group" />
|
|
2
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Управление состоянием поповера (открыт/закрыт)
|
|
12
|
-
*/
|
|
13
|
-
open: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Элемент, относительного которого появляется поповер
|
|
16
|
-
*/
|
|
17
|
-
anchorElement: RefElement;
|
|
18
|
-
/**
|
|
19
|
-
* Использовать ширину родительского элемента
|
|
20
|
-
*/
|
|
21
|
-
useAnchorWidth?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Позиционирование поповера
|
|
24
|
-
*/
|
|
25
|
-
position?: Position;
|
|
26
|
-
/**
|
|
27
|
-
* Запрещает поповеру менять свою позицию.
|
|
28
|
-
* Например, если места снизу недостаточно,то он все равно будет показан снизу
|
|
29
|
-
*/
|
|
30
|
-
preventFlip?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Запрещает поповеру менять свою позицию, если он не влезает в видимую область.
|
|
33
|
-
*/
|
|
34
|
-
preventOverflow?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Позволяет поповеру подствраивать свою высоту под границы экрана, если из-за величины контента он выходит за рамки видимой области экрана
|
|
37
|
-
*/
|
|
38
|
-
availableHeight?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Если `true`, будет отрисована стрелочка
|
|
41
|
-
*/
|
|
42
|
-
withArrow?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Смещение поповера.
|
|
45
|
-
* Если позиционирование top, bottom, то [x, y].
|
|
46
|
-
* Если позиционирование left, right то [y, x].
|
|
47
|
-
*/
|
|
48
|
-
offset?: [number, number];
|
|
49
|
-
/**
|
|
50
|
-
* Дополнительный класс для поповера
|
|
51
|
-
*/
|
|
52
|
-
popperClassName?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Дополнительный класс для стрелочки
|
|
55
|
-
*/
|
|
56
|
-
arrowClassName?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Функция, возвращающая контейнер, в который будет рендериться поповер
|
|
59
|
-
*/
|
|
60
|
-
getPortalContainer?: () => HTMLElement;
|
|
61
|
-
/**
|
|
62
|
-
* CSSTransitionProps, прокидываются в компонент CSSTransitionProps.
|
|
63
|
-
*/
|
|
64
|
-
transition?: CSSTransitionProps;
|
|
65
|
-
/**
|
|
66
|
-
* Выставляет кастомное свойство transition-duration
|
|
67
|
-
*/
|
|
68
|
-
transitionDuration?: CSSProperties['transitionDuration'];
|
|
69
|
-
/**
|
|
70
|
-
* Рендерит компонент, обернутый в Transition
|
|
71
|
-
*/
|
|
72
|
-
withTransition?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
75
|
-
*/
|
|
76
|
-
dataTestId?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Хранит функцию, с помощью которой можно обновить положение компонента
|
|
79
|
-
*/
|
|
80
|
-
update?: MutableRefObject<() => void>;
|
|
81
|
-
/**
|
|
82
|
-
* Дополнительный класс
|
|
83
|
-
*/
|
|
84
|
-
className?: string;
|
|
85
|
-
/**
|
|
86
|
-
* z-index компонента
|
|
87
|
-
*/
|
|
88
|
-
zIndex?: number;
|
|
89
|
-
/**
|
|
90
|
-
* Если поповер не помещается в переданной позиции (position), он попробует открыться в другой позиции,
|
|
91
|
-
* по очереди для каждой позиции из этого списка.
|
|
92
|
-
* Если не передавать, то поповер открывается в противоположном направлении от переданного position.
|
|
93
|
-
*/
|
|
94
|
-
fallbackPlacements?: Position[];
|
|
95
|
-
/**
|
|
96
|
-
* Контент
|
|
97
|
-
*/
|
|
98
|
-
children?: ReactNode;
|
|
4
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
5
|
+
type HeaderProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
onChange?: CheckboxProps['onChange'];
|
|
9
|
+
mobile?: boolean;
|
|
99
10
|
};
|
|
100
|
-
declare const
|
|
101
|
-
export {
|
|
11
|
+
declare const Header: React.FC<HeaderProps>;
|
|
12
|
+
export { HeaderProps, Header };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
+
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
+
export { ButtonMobileProps, ButtonMobile };
|
|
@@ -49,7 +49,7 @@ type InputAutocompleteMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Check
|
|
|
49
49
|
*/
|
|
50
50
|
Input?: ElementType;
|
|
51
51
|
};
|
|
52
|
-
declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "valueRenderer" | "
|
|
52
|
+
declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "valueRenderer" | "autocomplete" | "nativeSelect" | "OptionsList" | "Checkmark"> & {
|
|
53
53
|
/**
|
|
54
54
|
* Обработчик выбора
|
|
55
55
|
*/
|
|
@@ -6,7 +6,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectMobile } from '@alfalab/core-components-select/modern/mobile';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-b86c11f5.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { ModalMobile } from "./Component.mobile-f1f15074";
|
|
4
4
|
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
5
5
|
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
|
-
type SelectModalMobileProps = Omit<BaseSelectProps,
|
|
6
|
+
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Показывать кнопку очистки
|
|
9
9
|
*/
|
|
10
|
-
showClear?: UseSelectWithApplyProps[
|
|
10
|
+
showClear?: UseSelectWithApplyProps['showClear'];
|
|
11
11
|
/**
|
|
12
12
|
* Показывать пункт "Выбрать все"
|
|
13
13
|
*/
|
|
14
|
-
showSelectAll?: UseSelectWithApplyProps[
|
|
14
|
+
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
15
15
|
/**
|
|
16
16
|
* Дополнительные пропсы шапки модалки
|
|
17
17
|
*/
|
|
@@ -24,24 +24,37 @@ type SelectModalMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> &
|
|
|
24
24
|
* Дополнительные пропсы футера модалки
|
|
25
25
|
*/
|
|
26
26
|
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
27
|
-
|
|
28
|
-
* Показывать пункт "Выбрать все" в заголовке списка
|
|
29
|
-
*/
|
|
30
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
|
|
27
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
31
28
|
/**
|
|
32
29
|
* Использовать ли хук useSelectWithApply
|
|
33
30
|
*/
|
|
34
31
|
useWithApplyHook?: boolean;
|
|
35
32
|
};
|
|
36
33
|
declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Показывать кнопку очистки
|
|
36
|
+
*/
|
|
37
|
+
showClear?: UseSelectWithApplyProps['showClear'];
|
|
38
|
+
/**
|
|
39
|
+
* Показывать пункт "Выбрать все"
|
|
40
|
+
*/
|
|
41
|
+
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
42
|
+
/**
|
|
43
|
+
* Дополнительные пропсы шапки модалки
|
|
44
|
+
*/
|
|
39
45
|
modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Дополнительные пропсы модалки
|
|
48
|
+
*/
|
|
40
49
|
modalProps?: Partial<import("./typings-bdb4c6b9").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Дополнительные пропсы футера модалки
|
|
52
|
+
*/
|
|
41
53
|
modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
|
|
42
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps[
|
|
54
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
55
|
+
/**
|
|
56
|
+
* Использовать ли хук useSelectWithApply
|
|
57
|
+
*/
|
|
43
58
|
useWithApplyHook?: boolean | undefined;
|
|
44
59
|
} & React.RefAttributes<unknown>>;
|
|
45
60
|
export { SelectModalMobileProps, SelectModalMobile };
|
|
46
|
-
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
47
|
-
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, ElementType } from "react";
|
|
4
4
|
import { ButtonMobileProps } from "./mobile-96988a65";
|
|
5
|
-
import { SelectModalMobileProps } from "./mobile-
|
|
5
|
+
import { SelectModalMobileProps } from "./mobile-ade26e99";
|
|
6
6
|
import { BaseSelectChangePayload } from "./shared-4cd3936b";
|
|
7
7
|
type InputAutocompleteModalMobileProps = Omit<SelectModalMobileProps, 'OptionsList' | 'Checkmark' | 'onScroll' | 'nativeSelect' | 'autocomplete' | 'valueRenderer'> & {
|
|
8
8
|
/**
|
|
@@ -46,7 +46,7 @@ type InputAutocompleteModalMobileProps = Omit<SelectModalMobileProps, 'OptionsLi
|
|
|
46
46
|
*/
|
|
47
47
|
Input?: ElementType;
|
|
48
48
|
};
|
|
49
|
-
declare const InputAutocompleteModalMobile: React.ForwardRefExoticComponent<Omit<SelectModalMobileProps, "onScroll" | "valueRenderer" | "
|
|
49
|
+
declare const InputAutocompleteModalMobile: React.ForwardRefExoticComponent<Omit<SelectModalMobileProps, "onScroll" | "valueRenderer" | "autocomplete" | "nativeSelect" | "OptionsList" | "Checkmark"> & {
|
|
50
50
|
/**
|
|
51
51
|
* Обработчик выбора
|
|
52
52
|
*/
|
|
@@ -6,7 +6,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectModalMobile } from '@alfalab/core-components-select/modern/mobile';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-b86c11f5.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -26,7 +26,7 @@ declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<
|
|
|
26
26
|
success?: boolean | undefined;
|
|
27
27
|
onInput?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
28
28
|
updatePopover?: React.MutableRefObject<() => void> | undefined;
|
|
29
|
-
} & Omit<BaseSelectProps, "onScroll" | "valueRenderer" | "
|
|
29
|
+
} & Omit<BaseSelectProps, "onScroll" | "valueRenderer" | "autocomplete" | "nativeSelect" | "OptionsList" | "Checkmark"> & {
|
|
30
30
|
onChange: (payload: string | import("./shared-4cd3936b").BaseSelectChangePayload) => void;
|
|
31
31
|
onFilter: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
32
|
value?: string | undefined;
|
|
@@ -13,7 +13,7 @@ import '@alfalab/core-components-input/modern';
|
|
|
13
13
|
import '@alfalab/core-components-select/modern/mobile';
|
|
14
14
|
import './autocomplete-mobile-field/Component.js';
|
|
15
15
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
16
|
-
import './mobile.module-
|
|
16
|
+
import './mobile.module-b86c11f5.js';
|
|
17
17
|
|
|
18
18
|
const InputAutocompleteResponsive = forwardRef(({ breakpoint = 1024, ...restProps }, ref) => {
|
|
19
19
|
const [view] = useMedia([
|
|
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { InputDesktop } from '@alfalab/core-components-input/modern/desktop';
|
|
5
5
|
|
|
6
|
-
const styles = {"arrow":"input-
|
|
6
|
+
const styles = {"arrow":"input-autocomplete__arrow_uki5z","error":"input-autocomplete__error_uki5z"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input = InputDesktop, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, }) => {
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { FormControlMobile } from '@alfalab/core-components-form-control/modern/mobile';
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
|
|
6
|
-
const styles = {"component":"input-
|
|
6
|
+
const styles = {"component":"input-autocomplete__component_1cw9m","field":"input-autocomplete__field_1cw9m","disabled":"input-autocomplete__disabled_1cw9m","placeholder":"input-autocomplete__placeholder_1cw9m","contentWrapper":"input-autocomplete__contentWrapper_1cw9m","value":"input-autocomplete__value_1cw9m","focusVisible":"input-autocomplete__focusVisible_1cw9m"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteMobileField = ({ size = 'm', open, disabled, value, innerProps, dataTestId, fieldClassName, labelView = 'inner', placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1otfs */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_1cw9m {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_1cw9m:not(.input-autocomplete__disabled_1cw9m) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_1cw9m {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_1cw9m {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_1cw9m {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_1cw9m {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_1cw9m {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|
|
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
|
|
|
4
4
|
import { NavigationBarProps } from "./index-c76d6398";
|
|
5
5
|
import { SwipeableHandlers } from "react-swipeable";
|
|
6
6
|
import { BackdropProps } from "./index-ebda875c";
|
|
7
|
-
import { BottomSheetProps } from "./types-
|
|
7
|
+
import { BottomSheetProps } from "./types-e40becc7";
|
|
8
8
|
type FooterProps = {
|
|
9
9
|
/**
|
|
10
10
|
* Контент футера
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
+
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
+
export { ButtonDesktopProps, ButtonDesktop };
|
|
@@ -51,9 +51,9 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
51
51
|
*/
|
|
52
52
|
selectedDraft?: OptionShape[] | undefined;
|
|
53
53
|
OptionsList?: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
|
-
Footer?: import("react").FC<import("./Component-
|
|
55
|
-
Header?: import("react").FC<import("./Component-
|
|
56
|
-
headerProps?: import("./Component-
|
|
54
|
+
Footer?: import("react").FC<import("./Component-dd8ca091").FooterProps> | undefined;
|
|
55
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
56
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
57
57
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
58
58
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
59
59
|
optionsListProps: {
|
|
@@ -86,5 +86,5 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
86
86
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
87
|
} | undefined;
|
|
88
88
|
};
|
|
89
|
-
export * from "./Component-
|
|
89
|
+
export * from "./Component-dd8ca091";
|
|
90
90
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
|
@@ -1,180 +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
|
-
* Дополнительные пропсы на обертку контента
|
|
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 };
|
|
1
|
+
export * from "./Component-ebda875c";
|
|
2
|
+
export * from "./utils-1574ad8b";
|