@alfalab/core-components-custom-picker-button 1.0.0
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-2aef4eba.d.ts +50 -0
- package/Component-3885b0d7.d.ts +71 -0
- package/Component-3e68f8db.d.ts +11 -0
- package/Component-3ebe4754.d.ts +176 -0
- package/Component-5e1b8383.d.ts +4 -0
- package/Component-bdb4c6b9.d.ts +12 -0
- package/Component-ebda875c.d.ts +142 -0
- package/Component.desktop.d.ts +6 -0
- package/Component.desktop.js +28 -0
- package/Component.mobile-ae13210f.d.ts +7 -0
- package/Component.mobile-b2c0420d.d.ts +35 -0
- package/Component.mobile.d.ts +6 -0
- package/Component.mobile.js +28 -0
- package/Component.responsive-2aef4eba.d.ts +28 -0
- package/Component.responsive.d.ts +22 -0
- package/Component.responsive.js +28 -0
- package/Context-bdb4c6b9.d.ts +4 -0
- package/ResponsiveContext-baf4875b.d.ts +5 -0
- package/component-3885b0d7.d.ts +43 -0
- package/consts-f777ba1a.d.ts +2 -0
- package/cssm/Component-2aef4eba.d.ts +50 -0
- package/cssm/Component-3885b0d7.d.ts +71 -0
- package/cssm/Component-3e68f8db.d.ts +11 -0
- package/cssm/Component-3ebe4754.d.ts +176 -0
- package/cssm/Component-5e1b8383.d.ts +4 -0
- package/cssm/Component-bdb4c6b9.d.ts +12 -0
- package/cssm/Component-ebda875c.d.ts +142 -0
- package/cssm/Component.desktop.d.ts +6 -0
- package/cssm/Component.desktop.js +29 -0
- package/cssm/Component.mobile-ae13210f.d.ts +7 -0
- package/cssm/Component.mobile-b2c0420d.d.ts +35 -0
- package/cssm/Component.mobile.d.ts +6 -0
- package/cssm/Component.mobile.js +29 -0
- package/cssm/Component.responsive-2aef4eba.d.ts +28 -0
- package/cssm/Component.responsive.d.ts +22 -0
- package/cssm/Component.responsive.js +29 -0
- package/cssm/Context-bdb4c6b9.d.ts +4 -0
- package/cssm/ResponsiveContext-baf4875b.d.ts +5 -0
- package/cssm/component-3885b0d7.d.ts +43 -0
- package/cssm/consts-f777ba1a.d.ts +2 -0
- package/cssm/desktop.d.ts +2 -0
- package/cssm/desktop.js +17 -0
- package/cssm/field/Component.d.ts +11 -0
- package/cssm/field/Component.js +31 -0
- package/cssm/field/index.d.ts +1 -0
- package/cssm/field/index.js +15 -0
- package/cssm/field/index.module.css +27 -0
- package/cssm/hook-3e68f8db.d.ts +62 -0
- package/cssm/index-136acbb1.d.ts +28 -0
- package/cssm/index-2aef4eba.d.ts +5 -0
- package/cssm/index-3885b0d7.d.ts +3 -0
- package/cssm/index-3e68f8db.d.ts +100 -0
- package/cssm/index-3ebe4754.d.ts +1 -0
- package/cssm/index-425c8522.d.ts +6 -0
- package/cssm/index-701e77da.d.ts +4 -0
- package/cssm/index-bdb4c6b9.d.ts +2 -0
- package/cssm/index-e81c389f.d.ts +3 -0
- package/cssm/index-ebda875c.d.ts +37 -0
- package/cssm/index-f12ee135.d.ts +3 -0
- package/cssm/index.d.ts +2 -0
- package/cssm/index.js +21 -0
- package/cssm/mobile.d.ts +2 -0
- package/cssm/mobile.js +17 -0
- package/cssm/responsive.d.ts +2 -0
- package/cssm/responsive.js +21 -0
- package/cssm/types-5e678ff2.d.ts +219 -0
- package/cssm/types-ebda875c.d.ts +113 -0
- package/cssm/typings-5e1b8383.d.ts +549 -0
- package/cssm/typings-bdb4c6b9.d.ts +52 -0
- package/cssm/utils-1574ad8b.d.ts +29 -0
- package/cssm/utils-5e1b8383.d.ts +38 -0
- package/cssm/utils-b64479aa.d.ts +8 -0
- package/desktop.d.ts +2 -0
- package/desktop.js +16 -0
- package/esm/Component-2aef4eba.d.ts +50 -0
- package/esm/Component-3885b0d7.d.ts +71 -0
- package/esm/Component-3e68f8db.d.ts +11 -0
- package/esm/Component-3ebe4754.d.ts +176 -0
- package/esm/Component-5e1b8383.d.ts +4 -0
- package/esm/Component-bdb4c6b9.d.ts +12 -0
- package/esm/Component-ebda875c.d.ts +142 -0
- package/esm/Component.desktop.d.ts +6 -0
- package/esm/Component.desktop.js +20 -0
- package/esm/Component.mobile-ae13210f.d.ts +7 -0
- package/esm/Component.mobile-b2c0420d.d.ts +35 -0
- package/esm/Component.mobile.d.ts +6 -0
- package/esm/Component.mobile.js +20 -0
- package/esm/Component.responsive-2aef4eba.d.ts +28 -0
- package/esm/Component.responsive.d.ts +22 -0
- package/esm/Component.responsive.js +20 -0
- package/esm/Context-bdb4c6b9.d.ts +4 -0
- package/esm/ResponsiveContext-baf4875b.d.ts +5 -0
- package/esm/component-3885b0d7.d.ts +43 -0
- package/esm/consts-f777ba1a.d.ts +2 -0
- package/esm/desktop.d.ts +2 -0
- package/esm/desktop.js +8 -0
- package/esm/field/Component.d.ts +11 -0
- package/esm/field/Component.js +23 -0
- package/esm/field/index.css +28 -0
- package/esm/field/index.d.ts +1 -0
- package/esm/field/index.js +6 -0
- package/esm/hook-3e68f8db.d.ts +62 -0
- package/esm/index-136acbb1.d.ts +28 -0
- package/esm/index-2aef4eba.d.ts +5 -0
- package/esm/index-3885b0d7.d.ts +3 -0
- package/esm/index-3e68f8db.d.ts +100 -0
- package/esm/index-3ebe4754.d.ts +1 -0
- package/esm/index-425c8522.d.ts +6 -0
- package/esm/index-701e77da.d.ts +4 -0
- package/esm/index-bdb4c6b9.d.ts +2 -0
- package/esm/index-e81c389f.d.ts +3 -0
- package/esm/index-ebda875c.d.ts +37 -0
- package/esm/index-f12ee135.d.ts +3 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +12 -0
- package/esm/mobile.d.ts +2 -0
- package/esm/mobile.js +8 -0
- package/esm/responsive.d.ts +2 -0
- package/esm/responsive.js +12 -0
- package/esm/types-5e678ff2.d.ts +219 -0
- package/esm/types-ebda875c.d.ts +113 -0
- package/esm/typings-5e1b8383.d.ts +549 -0
- package/esm/typings-bdb4c6b9.d.ts +52 -0
- package/esm/utils-1574ad8b.d.ts +29 -0
- package/esm/utils-5e1b8383.d.ts +38 -0
- package/esm/utils-b64479aa.d.ts +8 -0
- package/field/Component.d.ts +11 -0
- package/field/Component.js +32 -0
- package/field/index.css +28 -0
- package/field/index.d.ts +1 -0
- package/field/index.js +14 -0
- package/hook-3e68f8db.d.ts +62 -0
- package/index-136acbb1.d.ts +28 -0
- package/index-2aef4eba.d.ts +5 -0
- package/index-3885b0d7.d.ts +3 -0
- package/index-3e68f8db.d.ts +100 -0
- package/index-3ebe4754.d.ts +1 -0
- package/index-425c8522.d.ts +6 -0
- package/index-701e77da.d.ts +4 -0
- package/index-bdb4c6b9.d.ts +2 -0
- package/index-e81c389f.d.ts +3 -0
- package/index-ebda875c.d.ts +37 -0
- package/index-f12ee135.d.ts +3 -0
- package/index.d.ts +2 -0
- package/index.js +20 -0
- package/mobile.d.ts +2 -0
- package/mobile.js +16 -0
- package/modern/Component-2aef4eba.d.ts +50 -0
- package/modern/Component-3885b0d7.d.ts +71 -0
- package/modern/Component-3e68f8db.d.ts +11 -0
- package/modern/Component-3ebe4754.d.ts +176 -0
- package/modern/Component-5e1b8383.d.ts +4 -0
- package/modern/Component-bdb4c6b9.d.ts +12 -0
- package/modern/Component-ebda875c.d.ts +142 -0
- package/modern/Component.desktop.d.ts +6 -0
- package/modern/Component.desktop.js +16 -0
- package/modern/Component.mobile-ae13210f.d.ts +7 -0
- package/modern/Component.mobile-b2c0420d.d.ts +35 -0
- package/modern/Component.mobile.d.ts +6 -0
- package/modern/Component.mobile.js +16 -0
- package/modern/Component.responsive-2aef4eba.d.ts +28 -0
- package/modern/Component.responsive.d.ts +22 -0
- package/modern/Component.responsive.js +18 -0
- package/modern/Context-bdb4c6b9.d.ts +4 -0
- package/modern/ResponsiveContext-baf4875b.d.ts +5 -0
- package/modern/component-3885b0d7.d.ts +43 -0
- package/modern/consts-f777ba1a.d.ts +2 -0
- package/modern/desktop.d.ts +2 -0
- package/modern/desktop.js +7 -0
- package/modern/field/Component.d.ts +11 -0
- package/modern/field/Component.js +23 -0
- package/modern/field/index.css +28 -0
- package/modern/field/index.d.ts +1 -0
- package/modern/field/index.js +5 -0
- package/modern/hook-3e68f8db.d.ts +62 -0
- package/modern/index-136acbb1.d.ts +28 -0
- package/modern/index-2aef4eba.d.ts +5 -0
- package/modern/index-3885b0d7.d.ts +3 -0
- package/modern/index-3e68f8db.d.ts +100 -0
- package/modern/index-3ebe4754.d.ts +1 -0
- package/modern/index-425c8522.d.ts +6 -0
- package/modern/index-701e77da.d.ts +4 -0
- package/modern/index-bdb4c6b9.d.ts +2 -0
- package/modern/index-e81c389f.d.ts +3 -0
- package/modern/index-ebda875c.d.ts +37 -0
- package/modern/index-f12ee135.d.ts +3 -0
- package/modern/index.d.ts +2 -0
- package/modern/index.js +11 -0
- package/modern/mobile.d.ts +2 -0
- package/modern/mobile.js +7 -0
- package/modern/responsive.d.ts +2 -0
- package/modern/responsive.js +11 -0
- package/modern/types-5e678ff2.d.ts +219 -0
- package/modern/types-ebda875c.d.ts +113 -0
- package/modern/typings-5e1b8383.d.ts +549 -0
- package/modern/typings-bdb4c6b9.d.ts +52 -0
- package/modern/utils-1574ad8b.d.ts +29 -0
- package/modern/utils-5e1b8383.d.ts +38 -0
- package/modern/utils-b64479aa.d.ts +8 -0
- package/package.json +27 -0
- package/responsive.d.ts +2 -0
- package/responsive.js +20 -0
- package/send-stats.js +82 -0
- package/types-5e678ff2.d.ts +219 -0
- package/types-ebda875c.d.ts +113 -0
- package/typings-5e1b8383.d.ts +549 -0
- package/typings-bdb4c6b9.d.ts +52 -0
- package/utils-1574ad8b.d.ts +29 -0
- package/utils-5e1b8383.d.ts +38 -0
- package/utils-b64479aa.d.ts +8 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FC, SVGProps } from "react";
|
|
4
|
+
import { ButtonProps } from "./index-ebda875c";
|
|
5
|
+
import { BaseSelectProps } from "./index-3e68f8db";
|
|
6
|
+
type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
7
|
+
type PickerButtonVariant = 'default' | 'compact';
|
|
8
|
+
type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' | 'autocomplete' | 'size' | 'onFocus' | 'selected' | 'closeOnSelect' | 'multiple' | 'hint' | 'allowUnselect' | 'options'> & Pick<ButtonProps, 'view' | 'loading' | 'leftAddons' | 'rightAddons'> & {
|
|
9
|
+
options: Array<BaseSelectProps['options'][0] & {
|
|
10
|
+
/**
|
|
11
|
+
* Иконка, отображающаяся слева от текстового представления пункта
|
|
12
|
+
*/
|
|
13
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Размер кнопки
|
|
17
|
+
*/
|
|
18
|
+
size?: PickerButtonSize;
|
|
19
|
+
/**
|
|
20
|
+
* Тип кнопки
|
|
21
|
+
*/
|
|
22
|
+
variant?: PickerButtonVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Показывать стрелку
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
showArrow?: boolean;
|
|
28
|
+
};
|
|
29
|
+
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
30
|
+
options: Array<BaseSelectProps['options'][0] & {
|
|
31
|
+
/**
|
|
32
|
+
* Иконка, отображающаяся слева от текстового представления пункта
|
|
33
|
+
*/
|
|
34
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Размер кнопки
|
|
38
|
+
*/
|
|
39
|
+
size?: PickerButtonSize | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Тип кнопки
|
|
42
|
+
*/
|
|
43
|
+
variant?: PickerButtonVariant | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Показывать стрелку
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showArrow?: boolean | undefined;
|
|
49
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
50
|
+
export { PickerButtonSize, PickerButtonVariant, PickerButtonDesktopProps, PickerButtonDesktop };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
+
import { BaseSelectProps } from "./typings-5e1b8383";
|
|
6
|
+
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
|
+
/**
|
|
8
|
+
* Футер
|
|
9
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
10
|
+
*/
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Будет ли свайпаться шторка
|
|
14
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
15
|
+
*/
|
|
16
|
+
swipeable?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Отображать в BottomSheet
|
|
19
|
+
*/
|
|
20
|
+
isBottomSheet?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Дополнительные пропсы шторки
|
|
23
|
+
*/
|
|
24
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Дополнительные пропсы модалки
|
|
27
|
+
*/
|
|
28
|
+
modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
|
|
29
|
+
/**
|
|
30
|
+
* Дополнительные пропсы шапки модалки
|
|
31
|
+
*/
|
|
32
|
+
modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
|
|
33
|
+
/**
|
|
34
|
+
* Дополнительные пропсы футера модалки
|
|
35
|
+
*/
|
|
36
|
+
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
37
|
+
};
|
|
38
|
+
declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
39
|
+
/**
|
|
40
|
+
* Футер
|
|
41
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
42
|
+
*/
|
|
43
|
+
footer?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Будет ли свайпаться шторка
|
|
46
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
47
|
+
*/
|
|
48
|
+
swipeable?: boolean | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Отображать в BottomSheet
|
|
51
|
+
*/
|
|
52
|
+
isBottomSheet?: boolean | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Дополнительные пропсы шторки
|
|
55
|
+
*/
|
|
56
|
+
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Дополнительные пропсы модалки
|
|
59
|
+
*/
|
|
60
|
+
modalProps?: Partial<import("./typings-bdb4c6b9").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Дополнительные пропсы шапки модалки
|
|
63
|
+
*/
|
|
64
|
+
modalHeaderProps?: Partial<import("./Component-5e1b8383").HeaderProps> | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительные пропсы футера модалки
|
|
67
|
+
*/
|
|
68
|
+
modalFooterProps?: Partial<import("./Component.mobile-b2c0420d").FooterProps> | undefined;
|
|
69
|
+
} & React.RefAttributes<unknown>>;
|
|
70
|
+
export * from "./Component.mobile-b2c0420d";
|
|
71
|
+
export { SelectMobileProps, BaseSelectMobile };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FC, SVGProps } from 'react';
|
|
3
|
+
import { OptionShape } from "./typings-5e1b8383";
|
|
4
|
+
import { OptionProps as BaseOptionProps } from "./typings-5e1b8383";
|
|
5
|
+
type OptionProps = Omit<BaseOptionProps, 'option'> & {
|
|
6
|
+
option: OptionShape & {
|
|
7
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const Option: ({ option, children, ...restProps }: OptionProps) => JSX.Element;
|
|
11
|
+
export { Option };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
4
|
+
type FormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
/**
|
|
6
|
+
* Растягивает компонент на ширину контейнера
|
|
7
|
+
*/
|
|
8
|
+
block?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Размер компонента
|
|
11
|
+
*/
|
|
12
|
+
size?: 's' | 'm' | 'l' | 'xl';
|
|
13
|
+
/**
|
|
14
|
+
* Набор цветов для компонента
|
|
15
|
+
*/
|
|
16
|
+
colors?: 'default' | 'inverted';
|
|
17
|
+
/**
|
|
18
|
+
* Заблокированное состояние
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Cостояние только для чтения
|
|
23
|
+
*/
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Заполненное состояние
|
|
27
|
+
*/
|
|
28
|
+
filled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Выбранное (фокус) состояние
|
|
31
|
+
*/
|
|
32
|
+
focused?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Отображение ошибки
|
|
35
|
+
*/
|
|
36
|
+
error?: ReactNode | boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Текст подсказки
|
|
39
|
+
*/
|
|
40
|
+
hint?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Лейбл компонента
|
|
43
|
+
*/
|
|
44
|
+
label?: ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Вид лейбла внутри / снаружи
|
|
47
|
+
*/
|
|
48
|
+
labelView?: 'inner' | 'outer';
|
|
49
|
+
/**
|
|
50
|
+
* Слот слева
|
|
51
|
+
*/
|
|
52
|
+
leftAddons?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Слот справа
|
|
55
|
+
*/
|
|
56
|
+
rightAddons?: ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Слот под полем
|
|
59
|
+
*/
|
|
60
|
+
bottomAddons?: ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Дополнительный класс
|
|
63
|
+
*/
|
|
64
|
+
className?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительный класс для поля
|
|
67
|
+
*/
|
|
68
|
+
fieldClassName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Дополнительный класс для поля
|
|
71
|
+
*/
|
|
72
|
+
inputWrapperClassName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Дополнительный класс для лейбла
|
|
75
|
+
*/
|
|
76
|
+
labelClassName?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Дополнительный класс для аддонов
|
|
79
|
+
*/
|
|
80
|
+
addonsClassName?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
83
|
+
*/
|
|
84
|
+
dataTestId?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Компонент поля (инпут, textarea и пр.)
|
|
87
|
+
*/
|
|
88
|
+
children?: ReactNode;
|
|
89
|
+
};
|
|
90
|
+
declare const FormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
91
|
+
/**
|
|
92
|
+
* Растягивает компонент на ширину контейнера
|
|
93
|
+
*/
|
|
94
|
+
block?: boolean | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Размер компонента
|
|
97
|
+
*/
|
|
98
|
+
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Набор цветов для компонента
|
|
101
|
+
*/
|
|
102
|
+
colors?: "default" | "inverted" | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Заблокированное состояние
|
|
105
|
+
*/
|
|
106
|
+
disabled?: boolean | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Cостояние только для чтения
|
|
109
|
+
*/
|
|
110
|
+
readOnly?: boolean | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Заполненное состояние
|
|
113
|
+
*/
|
|
114
|
+
filled?: boolean | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Выбранное (фокус) состояние
|
|
117
|
+
*/
|
|
118
|
+
focused?: boolean | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Отображение ошибки
|
|
121
|
+
*/
|
|
122
|
+
error?: ReactNode | boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Текст подсказки
|
|
125
|
+
*/
|
|
126
|
+
hint?: ReactNode;
|
|
127
|
+
/**
|
|
128
|
+
* Лейбл компонента
|
|
129
|
+
*/
|
|
130
|
+
label?: ReactNode;
|
|
131
|
+
/**
|
|
132
|
+
* Вид лейбла внутри / снаружи
|
|
133
|
+
*/
|
|
134
|
+
labelView?: "inner" | "outer" | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* Слот слева
|
|
137
|
+
*/
|
|
138
|
+
leftAddons?: ReactNode;
|
|
139
|
+
/**
|
|
140
|
+
* Слот справа
|
|
141
|
+
*/
|
|
142
|
+
rightAddons?: ReactNode;
|
|
143
|
+
/**
|
|
144
|
+
* Слот под полем
|
|
145
|
+
*/
|
|
146
|
+
bottomAddons?: ReactNode;
|
|
147
|
+
/**
|
|
148
|
+
* Дополнительный класс
|
|
149
|
+
*/
|
|
150
|
+
className?: string | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Дополнительный класс для поля
|
|
153
|
+
*/
|
|
154
|
+
fieldClassName?: string | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Дополнительный класс для поля
|
|
157
|
+
*/
|
|
158
|
+
inputWrapperClassName?: string | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Дополнительный класс для лейбла
|
|
161
|
+
*/
|
|
162
|
+
labelClassName?: string | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Дополнительный класс для аддонов
|
|
165
|
+
*/
|
|
166
|
+
addonsClassName?: string | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
169
|
+
*/
|
|
170
|
+
dataTestId?: string | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Компонент поля (инпут, textarea и пр.)
|
|
173
|
+
*/
|
|
174
|
+
children?: ReactNode;
|
|
175
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
176
|
+
export { FormControlProps, FormControl };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { View } from "./typings-bdb4c6b9";
|
|
4
|
+
declare const Modal: React.ForwardRefExoticComponent<import("./index-bdb4c6b9").BaseModalProps & {
|
|
5
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
6
|
+
fullscreen?: boolean | undefined;
|
|
7
|
+
fixedPosition?: boolean | undefined;
|
|
8
|
+
hasCloser?: boolean | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
view: View;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { Modal };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/// <reference types="react-transition-group" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { FC, KeyboardEvent, MouseEvent, MutableRefObject, ReactNode, Ref } from "react";
|
|
5
|
+
import { TransitionProps } from 'react-transition-group/Transition';
|
|
6
|
+
import { BackdropProps, PortalProps } from "./index-ebda875c";
|
|
7
|
+
type BaseModalProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Контент
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Компонент бэкдропа
|
|
14
|
+
*/
|
|
15
|
+
Backdrop?: FC<BackdropProps>;
|
|
16
|
+
/**
|
|
17
|
+
* Свойства для Бэкдропа
|
|
18
|
+
*/
|
|
19
|
+
backdropProps?: Partial<BackdropProps> & Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Нода, компонент или функция возвращающая их
|
|
22
|
+
*
|
|
23
|
+
* Контейнер к которому будут добавляться порталы
|
|
24
|
+
*/
|
|
25
|
+
container?: PortalProps['getPortalContainer'];
|
|
26
|
+
/**
|
|
27
|
+
* Отключает автоматический перевод фокуса на модалку при открытии
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
disableAutoFocus?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Отключает ловушку фокуса
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disableFocusLock?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Отключает восстановление фокуса на предыдущем элементе после закрытия модалки
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disableRestoreFocus?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Отключает вызов `callback` при нажатии Escape
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
disableEscapeKeyDown?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Отключает вызов `callback` при клике на бэкдроп
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
disableBackdropClick?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Отключает блокировку скролла при открытии модального окна
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
disableBlockingScroll?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Содержимое модалки всегда в DOM
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
keepMounted?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Управление видимостью модалки
|
|
63
|
+
*/
|
|
64
|
+
open: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительный класс
|
|
67
|
+
*/
|
|
68
|
+
className?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Дополнительный класс
|
|
71
|
+
*/
|
|
72
|
+
contentClassName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Дополнительный класс для обертки (Modal)
|
|
75
|
+
*/
|
|
76
|
+
wrapperClassName?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Обработчик скролла контента
|
|
79
|
+
*/
|
|
80
|
+
scrollHandler?: 'wrapper' | 'content' | MutableRefObject<HTMLDivElement | null>;
|
|
81
|
+
/**
|
|
82
|
+
* Пропсы для анимации (CSSTransition)
|
|
83
|
+
*/
|
|
84
|
+
transitionProps?: Partial<TransitionProps>;
|
|
85
|
+
/**
|
|
86
|
+
* Рендерить ли в контейнер через портал.
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
usePortal?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Обработчик события нажатия на бэкдроп
|
|
92
|
+
*/
|
|
93
|
+
onBackdropClick?: (event: MouseEvent) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Обработчик события нажатия на Escape
|
|
96
|
+
*
|
|
97
|
+
* Если `disableEscapeKeyDown` - false и модальное окно в фокусе
|
|
98
|
+
*/
|
|
99
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Обработчик закрытия
|
|
102
|
+
*/
|
|
103
|
+
onClose?: (event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>, reason?: 'backdropClick' | 'escapeKeyDown' | 'closerClick') => void;
|
|
104
|
+
/**
|
|
105
|
+
* Обработчик события onEntered компонента Transition
|
|
106
|
+
*/
|
|
107
|
+
onMount?: () => void;
|
|
108
|
+
/**
|
|
109
|
+
* Обработчик события onExited компонента Transition
|
|
110
|
+
*/
|
|
111
|
+
onUnmount?: () => void;
|
|
112
|
+
/**
|
|
113
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
114
|
+
*/
|
|
115
|
+
dataTestId?: string;
|
|
116
|
+
/**
|
|
117
|
+
* z-index компонента
|
|
118
|
+
*/
|
|
119
|
+
zIndex?: number;
|
|
120
|
+
/**
|
|
121
|
+
* Реф, который должен быть установлен компонентной области
|
|
122
|
+
*/
|
|
123
|
+
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
124
|
+
};
|
|
125
|
+
type BaseModalContext = {
|
|
126
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
127
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
128
|
+
hasFooter?: boolean;
|
|
129
|
+
hasHeader?: boolean;
|
|
130
|
+
hasScroll?: boolean;
|
|
131
|
+
headerHighlighted?: boolean;
|
|
132
|
+
footerHighlighted?: boolean;
|
|
133
|
+
headerOffset?: number;
|
|
134
|
+
setHeaderOffset: (offset: number) => void;
|
|
135
|
+
contentRef: Ref<HTMLElement>;
|
|
136
|
+
setHasHeader: (exists: boolean) => void;
|
|
137
|
+
setHasFooter: (exists: boolean) => void;
|
|
138
|
+
onClose: Required<BaseModalProps>['onClose'];
|
|
139
|
+
};
|
|
140
|
+
declare const BaseModalContext: React.Context<BaseModalContext>;
|
|
141
|
+
declare const BaseModal: React.ForwardRefExoticComponent<BaseModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
export { BaseModalProps, BaseModalContext, BaseModal };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CustomButtonProps } from "@alfalab/core-components-custom-button";
|
|
4
|
+
type CustomPickerButtonDesktopProps = Omit<PickerButtonDesktopProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
+
declare const CustomPickerButtonDesktop: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "colors" | "view"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export { CustomPickerButtonDesktopProps, CustomPickerButtonDesktop };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var desktop = require('@alfalab/core-components-picker-button/desktop');
|
|
8
|
+
var field_Component = require('./field/Component.js');
|
|
9
|
+
require('classnames');
|
|
10
|
+
require('@alfalab/core-components-custom-button');
|
|
11
|
+
require('@alfalab/core-components-picker-button');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
+
|
|
17
|
+
var DEFAULT_BUTTON_COLOR = '#FF45C3';
|
|
18
|
+
var DEFAULT_CONTENT_COLOR = 'white';
|
|
19
|
+
var CustomPickerButtonDesktop = React.forwardRef(function (_a, ref) {
|
|
20
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? DEFAULT_BUTTON_COLOR : _b, _c = _a.contentColor, contentColor = _c === void 0 ? DEFAULT_CONTENT_COLOR : _c, _d = _a.stateType, stateType = _d === void 0 ? 'darkening' : _d, restProps = tslib.__rest(_a, ["backgroundColor", "contentColor", "stateType"]);
|
|
21
|
+
return (React__default.default.createElement(desktop.PickerButtonDesktop, tslib.__assign({}, restProps, { fieldProps: {
|
|
22
|
+
backgroundColor: backgroundColor,
|
|
23
|
+
contentColor: contentColor,
|
|
24
|
+
stateType: stateType,
|
|
25
|
+
}, Field: field_Component.Field, ref: ref })));
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.CustomPickerButtonDesktop = CustomPickerButtonDesktop;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AdditionalMobileProps } from "./index-3e68f8db";
|
|
4
|
+
import { PickerButtonDesktopProps } from "./Component-2aef4eba";
|
|
5
|
+
type PickerButtonMobileProps = Omit<PickerButtonDesktopProps, 'OptionsList' | 'Checkmark' | 'onScroll'> & AdditionalMobileProps;
|
|
6
|
+
declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "onScroll" | "OptionsList" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export { PickerButtonMobileProps, PickerButtonMobile };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC, ReactNode } from "react";
|
|
4
|
+
import { ContentProps, ModalMobileProps } from "./typings-bdb4c6b9";
|
|
5
|
+
declare const Content: FC<ContentProps>;
|
|
6
|
+
type FooterProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Контент футера
|
|
9
|
+
*/
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Дополнительный класс
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Фиксирует футер
|
|
17
|
+
*/
|
|
18
|
+
sticky?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Выравнивание элементов футера
|
|
21
|
+
*/
|
|
22
|
+
layout?: "start" | "center" | "space-between" | "column";
|
|
23
|
+
/**
|
|
24
|
+
* Отступы между элементами футера
|
|
25
|
+
*/
|
|
26
|
+
gap?: 16 | 24 | 32;
|
|
27
|
+
};
|
|
28
|
+
declare const Footer: FC<FooterProps>;
|
|
29
|
+
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
30
|
+
Content: React.FC<import("./typings-bdb4c6b9").ContentProps>;
|
|
31
|
+
Header: React.FC<import("./Component-5e1b8383").HeaderProps>;
|
|
32
|
+
Footer: React.FC<FooterProps>;
|
|
33
|
+
Closer: React.FC<import("./index-e81c389f").CloserProps>;
|
|
34
|
+
};
|
|
35
|
+
export { Content, FooterProps, Footer, ModalMobile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CustomButtonProps } from "@alfalab/core-components-custom-button";
|
|
4
|
+
type CustomPickerButtonMobileProps = Omit<PickerButtonMobileProps, 'view' | 'colors'> & Pick<CustomButtonProps, 'backgroundColor' | 'contentColor' | 'stateType'>;
|
|
5
|
+
declare const CustomPickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonMobileProps, "colors" | "view"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export { CustomPickerButtonMobileProps, CustomPickerButtonMobile };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var mobile = require('@alfalab/core-components-picker-button/mobile');
|
|
8
|
+
var field_Component = require('./field/Component.js');
|
|
9
|
+
require('classnames');
|
|
10
|
+
require('@alfalab/core-components-custom-button');
|
|
11
|
+
require('@alfalab/core-components-picker-button');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
+
|
|
17
|
+
var DEFAULT_BUTTON_COLOR = '#FF45C3';
|
|
18
|
+
var DEFAULT_CONTENT_COLOR = 'white';
|
|
19
|
+
var CustomPickerButtonMobile = React.forwardRef(function (_a, ref) {
|
|
20
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? DEFAULT_BUTTON_COLOR : _b, _c = _a.contentColor, contentColor = _c === void 0 ? DEFAULT_CONTENT_COLOR : _c, _d = _a.stateType, stateType = _d === void 0 ? 'darkening' : _d, restProps = tslib.__rest(_a, ["backgroundColor", "contentColor", "stateType"]);
|
|
21
|
+
return (React__default.default.createElement(mobile.PickerButtonMobile, tslib.__assign({}, restProps, { fieldProps: {
|
|
22
|
+
backgroundColor: backgroundColor,
|
|
23
|
+
contentColor: contentColor,
|
|
24
|
+
stateType: stateType,
|
|
25
|
+
}, Field: field_Component.Field, ref: ref })));
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
exports.CustomPickerButtonMobile = CustomPickerButtonMobile;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonProps } from "./index-ebda875c";
|
|
4
|
+
import { AdditionalMobileProps } from "./index-3e68f8db";
|
|
5
|
+
import { PickerButtonDesktopProps } from "./Component-2aef4eba";
|
|
6
|
+
type PickerButtonMatchMedia = 'desktop' | 'mobile';
|
|
7
|
+
type PickerButtonResponsiveProps = PickerButtonDesktopProps & AdditionalMobileProps & {
|
|
8
|
+
/**
|
|
9
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
10
|
+
* @default 1024
|
|
11
|
+
*/
|
|
12
|
+
breakpoint?: number;
|
|
13
|
+
};
|
|
14
|
+
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("./index-3e68f8db").BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
15
|
+
options: ((import("./index-3e68f8db").OptionShape | import("./index-3e68f8db").GroupShape) & {
|
|
16
|
+
icon?: React.FC<React.SVGProps<SVGSVGElement>> | undefined;
|
|
17
|
+
})[];
|
|
18
|
+
size?: import("./Component-2aef4eba").PickerButtonSize | undefined;
|
|
19
|
+
variant?: import("./Component-2aef4eba").PickerButtonVariant | undefined;
|
|
20
|
+
showArrow?: boolean | undefined;
|
|
21
|
+
} & AdditionalMobileProps & {
|
|
22
|
+
/**
|
|
23
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
24
|
+
* @default 1024
|
|
25
|
+
*/
|
|
26
|
+
breakpoint?: number | undefined;
|
|
27
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
28
|
+
export { PickerButtonMatchMedia, PickerButtonResponsiveProps, PickerButtonResponsive };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CustomButtonProps } from "@alfalab/core-components-custom-button";
|
|
4
|
+
import { PickerButtonDesktopProps } from "./index-2aef4eba";
|
|
5
|
+
import { AdditionalMobileProps } from "./index-3e68f8db";
|
|
6
|
+
import { CustomPickerButtonDesktopProps } from "./Component.desktop";
|
|
7
|
+
type PickerButtonMatchMedia = 'desktop' | 'mobile';
|
|
8
|
+
type CustomPickerButtonResponsiveProps = CustomPickerButtonDesktopProps & AdditionalMobileProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
11
|
+
* @default 1024
|
|
12
|
+
*/
|
|
13
|
+
breakpoint?: number;
|
|
14
|
+
};
|
|
15
|
+
declare const CustomPickerButtonResponsive: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "colors" | "view"> & Pick<CustomButtonProps, "backgroundColor" | "contentColor" | "stateType"> & AdditionalMobileProps & {
|
|
16
|
+
/**
|
|
17
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
18
|
+
* @default 1024
|
|
19
|
+
*/
|
|
20
|
+
breakpoint?: number | undefined;
|
|
21
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
22
|
+
export { PickerButtonMatchMedia, CustomPickerButtonResponsiveProps, CustomPickerButtonResponsive };
|