@alfalab/core-components-custom-picker-button 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Component-50136800.d.ts → Component-2abb571d.d.ts} +1 -1
- package/Component-8b2c2707.d.ts +1 -1
- package/{modern/Component-5e1b8383.d.ts → Component-dd8ca091.d.ts} +1 -1
- package/{esm/Component.mobile-06ffd24b.d.ts → Component.mobile-ade26e99.d.ts} +2 -2
- package/Component.mobile-d446ae02.d.ts +4 -4
- package/{esm/Component.modal.mobile-5e1b8383.d.ts → Component.modal.mobile-dd8ca091.d.ts} +2 -2
- package/cssm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +1 -1
- package/cssm/Component-8b2c2707.d.ts +1 -1
- package/{Component-5e1b8383.d.ts → cssm/Component-dd8ca091.d.ts} +1 -1
- package/{modern/Component.mobile-06ffd24b.d.ts → cssm/Component.mobile-ade26e99.d.ts} +2 -2
- package/cssm/Component.mobile-d446ae02.d.ts +4 -4
- package/{modern/Component.modal.mobile-5e1b8383.d.ts → cssm/Component.modal.mobile-dd8ca091.d.ts} +2 -2
- package/cssm/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
- package/cssm/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/cssm/index-c76d6398.d.ts +1 -1
- package/cssm/index-f12ee135.d.ts +1 -1
- package/cssm/shared-4cd3936b.d.ts +7 -7
- package/cssm/{typings-5e1b8383.d.ts → typings-dd8ca091.d.ts} +23 -1
- package/cssm/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
- package/esm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +1 -1
- package/esm/Component-8b2c2707.d.ts +1 -1
- package/esm/{Component-5e1b8383.d.ts → Component-dd8ca091.d.ts} +1 -1
- package/{Component.mobile-06ffd24b.d.ts → esm/Component.mobile-ade26e99.d.ts} +2 -2
- package/esm/Component.mobile-d446ae02.d.ts +4 -4
- package/{cssm/Component.modal.mobile-5e1b8383.d.ts → esm/Component.modal.mobile-dd8ca091.d.ts} +2 -2
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +5 -5
- package/esm/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
- package/esm/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/esm/index-c76d6398.d.ts +1 -1
- package/esm/index-f12ee135.d.ts +1 -1
- package/esm/shared-4cd3936b.d.ts +7 -7
- package/esm/{typings-5e1b8383.d.ts → typings-dd8ca091.d.ts} +23 -1
- package/esm/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
- package/field/Component.js +1 -1
- package/field/index.css +5 -5
- package/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
- package/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/index-c76d6398.d.ts +1 -1
- package/index-f12ee135.d.ts +1 -1
- package/modern/{Component-50136800.d.ts → Component-2abb571d.d.ts} +1 -1
- package/modern/Component-8b2c2707.d.ts +1 -1
- package/{cssm/Component-5e1b8383.d.ts → modern/Component-dd8ca091.d.ts} +1 -1
- package/{cssm/Component.mobile-06ffd24b.d.ts → modern/Component.mobile-ade26e99.d.ts} +2 -2
- package/modern/Component.mobile-d446ae02.d.ts +4 -4
- package/{Component.modal.mobile-5e1b8383.d.ts → modern/Component.modal.mobile-dd8ca091.d.ts} +2 -2
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +5 -5
- package/modern/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
- package/modern/{index-50136800.d.ts → index-2abb571d.d.ts} +5 -1
- package/modern/index-c76d6398.d.ts +1 -1
- package/modern/index-f12ee135.d.ts +1 -1
- package/modern/shared-4cd3936b.d.ts +7 -7
- package/modern/{typings-5e1b8383.d.ts → typings-dd8ca091.d.ts} +23 -1
- package/modern/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
- package/package.json +4 -4
- package/shared-4cd3936b.d.ts +7 -7
- package/{typings-5e1b8383.d.ts → typings-dd8ca091.d.ts} +23 -1
- package/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
- /package/{component-50136800.d.ts → component-2abb571d.d.ts} +0 -0
- /package/cssm/{component-50136800.d.ts → component-2abb571d.d.ts} +0 -0
- /package/esm/{component-50136800.d.ts → component-2abb571d.d.ts} +0 -0
- /package/modern/{component-50136800.d.ts → component-2abb571d.d.ts} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Футер
|
package/Component-8b2c2707.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ButtonProps } from "./index-8b2c2707";
|
|
4
|
-
import { FieldProps as BaseFieldProps } from "./typings-
|
|
4
|
+
import { FieldProps as BaseFieldProps } from "./typings-dd8ca091";
|
|
5
5
|
import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
|
|
6
6
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
7
7
|
buttonSize?: PickerButtonSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { OptionShape, OptionsListProps } from "./typings-
|
|
3
|
+
import { OptionShape, OptionsListProps } from "./typings-dd8ca091";
|
|
4
4
|
import { HeaderProps } from "./Component-ebda875c";
|
|
5
5
|
type FooterProps = {
|
|
6
6
|
handleClear?: () => void;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
6
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
6
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
7
7
|
type AdditionalMobileProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Футер
|
|
@@ -16,8 +16,8 @@ declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerBut
|
|
|
16
16
|
*/
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
-
export { SelectMobile } from "./Component.mobile-
|
|
20
|
-
export { SelectModalMobile } from "./Component.modal.mobile-
|
|
21
|
-
export type { SelectMobileProps } from "./Component.mobile-
|
|
22
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-
|
|
19
|
+
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
20
|
+
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
21
|
+
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
22
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
23
23
|
export { PickerButtonMobileProps, PickerButtonMobile };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ModalMobile } from "./Component.mobile-f1f15074";
|
|
4
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
4
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Показывать кнопку очистки
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Футер
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ButtonProps } from "./index-8b2c2707";
|
|
4
|
-
import { FieldProps as BaseFieldProps } from "./typings-
|
|
4
|
+
import { FieldProps as BaseFieldProps } from "./typings-dd8ca091";
|
|
5
5
|
import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
|
|
6
6
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
7
7
|
buttonSize?: PickerButtonSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { OptionShape, OptionsListProps } from "./typings-
|
|
3
|
+
import { OptionShape, OptionsListProps } from "./typings-dd8ca091";
|
|
4
4
|
import { HeaderProps } from "./Component-ebda875c";
|
|
5
5
|
type FooterProps = {
|
|
6
6
|
handleClear?: () => void;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
6
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
6
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
7
7
|
type AdditionalMobileProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Футер
|
|
@@ -16,8 +16,8 @@ declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerBut
|
|
|
16
16
|
*/
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
-
export { SelectMobile } from "./Component.mobile-
|
|
20
|
-
export { SelectModalMobile } from "./Component.modal.mobile-
|
|
21
|
-
export type { SelectMobileProps } from "./Component.mobile-
|
|
22
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-
|
|
19
|
+
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
20
|
+
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
21
|
+
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
22
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
23
23
|
export { PickerButtonMobileProps, PickerButtonMobile };
|
package/{modern/Component.modal.mobile-5e1b8383.d.ts → cssm/Component.modal.mobile-dd8ca091.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ModalMobile } from "./Component.mobile-f1f15074";
|
|
4
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
4
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Показывать кнопку очистки
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseSelectProps, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, OptionShape } from "./typings-dd8ca091";
|
|
3
3
|
type UseSelectWithApplyProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Список выбранных пунктов
|
|
@@ -21,6 +21,14 @@ type UseSelectWithApplyProps = {
|
|
|
21
21
|
* Пропсы, которые будут прокинуты в компонент списка
|
|
22
22
|
*/
|
|
23
23
|
optionsListProps?: BaseSelectProps['optionsListProps'];
|
|
24
|
+
/**
|
|
25
|
+
* Включает отображение поиска
|
|
26
|
+
*/
|
|
27
|
+
showSearch?: BaseSelectProps['showSearch'];
|
|
28
|
+
/**
|
|
29
|
+
* Настройки поиска
|
|
30
|
+
*/
|
|
31
|
+
searchProps?: BaseSelectProps['searchProps'];
|
|
24
32
|
/**
|
|
25
33
|
* Показывать кнопку очистки
|
|
26
34
|
*/
|
|
@@ -35,21 +43,21 @@ type UseSelectWithApplyProps = {
|
|
|
35
43
|
showHeaderWithSelectAll?: boolean;
|
|
36
44
|
};
|
|
37
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
38
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
39
|
-
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-
|
|
46
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
|
+
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-dd8ca091").OptionsListProps & {
|
|
40
48
|
showClear?: boolean | undefined;
|
|
41
|
-
onClose?: (() => void) | undefined;
|
|
49
|
+
onClose?: (() => void) | undefined; /**
|
|
50
|
+
* Компонент выпадающего меню
|
|
51
|
+
*/
|
|
42
52
|
selectedDraft?: OptionShape[] | undefined;
|
|
43
|
-
OptionsList?: import("react").FC<import("./typings-
|
|
44
|
-
Footer?: import("react").FC<import("./Component-
|
|
53
|
+
OptionsList?: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
|
+
Footer?: import("react").FC<import("./Component-dd8ca091").FooterProps> | undefined;
|
|
45
55
|
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
-
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
-
* Показывать кнопку очистки
|
|
48
|
-
*/
|
|
56
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
49
57
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
50
58
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
59
|
optionsListProps: {
|
|
52
|
-
OptionsList: import("react").FC<import("./typings-
|
|
60
|
+
OptionsList: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
53
61
|
showClear: boolean;
|
|
54
62
|
onClear: () => void;
|
|
55
63
|
onApply: () => void;
|
|
@@ -64,12 +72,19 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
64
72
|
};
|
|
65
73
|
allowUnselect: boolean;
|
|
66
74
|
multiple: boolean;
|
|
67
|
-
options: (OptionShape | import("./typings-
|
|
75
|
+
options: (OptionShape | import("./typings-dd8ca091").GroupShape | {
|
|
68
76
|
key: string;
|
|
69
77
|
content: string;
|
|
70
78
|
})[];
|
|
71
|
-
onChange: (payload: import("./typings-
|
|
79
|
+
onChange: (payload: import("./typings-dd8ca091").BaseSelectChangePayload) => void;
|
|
72
80
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
81
|
+
showSearch: boolean | undefined;
|
|
82
|
+
searchProps: {
|
|
83
|
+
value: string;
|
|
84
|
+
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
85
|
+
componentProps?: import("./index-c44170fe").InputProps | undefined;
|
|
86
|
+
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
|
+
} | undefined;
|
|
73
88
|
};
|
|
74
|
-
export * from "./Component-
|
|
89
|
+
export * from "./Component-dd8ca091";
|
|
75
90
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
package/cssm/index-c76d6398.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component-
|
|
1
|
+
export * from "./Component-2abb571d";
|
|
2
2
|
export type { NavigationBarProps } from "./types-83e2bd9e";
|
package/cssm/index-f12ee135.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-
|
|
3
|
+
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5
5
|
type useSelectWithLoadingProps = {
|
|
6
6
|
loading?: boolean;
|
|
@@ -57,10 +57,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
57
57
|
reset: () => void;
|
|
58
58
|
};
|
|
59
59
|
export * from "./index-ebda875c";
|
|
60
|
-
export * from "./Component-
|
|
61
|
-
export * from "./Component-
|
|
60
|
+
export * from "./Component-2abb571d";
|
|
61
|
+
export * from "./Component-dd8ca091";
|
|
62
62
|
export { useSelectWithLoading, useLazyLoading };
|
|
63
|
-
export * from "./hook-
|
|
64
|
-
export * from "./typings-
|
|
65
|
-
export * from "./utils-
|
|
66
|
-
export type { AdditionalMobileProps } from "./Component.mobile-
|
|
63
|
+
export * from "./hook-8abfea97";
|
|
64
|
+
export * from "./typings-dd8ca091";
|
|
65
|
+
export * from "./utils-dd8ca091";
|
|
66
|
+
export type { AdditionalMobileProps } from "./Component.mobile-ade26e99";
|
|
@@ -210,6 +210,23 @@ type BaseSelectProps = {
|
|
|
210
210
|
* Компонент пункта меню
|
|
211
211
|
*/
|
|
212
212
|
Option?: FC<OptionProps>;
|
|
213
|
+
/**
|
|
214
|
+
* Включает отображение поиска
|
|
215
|
+
*/
|
|
216
|
+
showSearch?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Компонент поиска
|
|
219
|
+
*/
|
|
220
|
+
Search?: FC<SearchProps & RefAttributes<HTMLInputElement>>;
|
|
221
|
+
/**
|
|
222
|
+
* Настройки поиска
|
|
223
|
+
*/
|
|
224
|
+
searchProps?: {
|
|
225
|
+
componentProps?: SearchProps;
|
|
226
|
+
accessor?: (option: OptionShape) => string;
|
|
227
|
+
value?: string;
|
|
228
|
+
onChange?: (value: string) => void;
|
|
229
|
+
};
|
|
213
230
|
/**
|
|
214
231
|
* Обработчик выбора
|
|
215
232
|
*/
|
|
@@ -345,6 +362,10 @@ type OptionsListProps = {
|
|
|
345
362
|
* Дополнительный класс для компонента группы пунктов
|
|
346
363
|
*/
|
|
347
364
|
optionGroupClassName?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Дополнительный класс для скроллбара
|
|
367
|
+
*/
|
|
368
|
+
scrollbarClassName?: string;
|
|
348
369
|
/**
|
|
349
370
|
* Размер компонента
|
|
350
371
|
*/
|
|
@@ -547,4 +568,5 @@ type CheckmarkProps = {
|
|
|
547
568
|
*/
|
|
548
569
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
549
570
|
};
|
|
550
|
-
|
|
571
|
+
type SearchProps = InputProps;
|
|
572
|
+
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
6
6
|
selected?: OptionShape | undefined;
|
|
7
7
|
selectedMultiple?: OptionShape[] | undefined;
|
|
8
8
|
}) => ReactNode[] | null;
|
|
9
|
-
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected']): {
|
|
9
|
+
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape) => boolean): {
|
|
10
|
+
filteredOptions: (OptionShape | GroupShape)[];
|
|
10
11
|
flatOptions: OptionShape[];
|
|
11
12
|
selectedOptions: OptionShape[];
|
|
12
13
|
};
|
|
@@ -33,6 +34,8 @@ type useVisibleOptionsArgs = {
|
|
|
33
34
|
invalidate?: unknown;
|
|
34
35
|
};
|
|
35
36
|
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
|
|
37
|
+
declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
38
|
+
declare function defaultAccessor(option: OptionShape): string;
|
|
36
39
|
declare function usePrevious<T>(value: T): T | undefined;
|
|
37
40
|
declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
|
|
38
|
-
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, usePrevious, lastIndexOf };
|
|
41
|
+
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Футер
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ButtonProps } from "./index-8b2c2707";
|
|
4
|
-
import { FieldProps as BaseFieldProps } from "./typings-
|
|
4
|
+
import { FieldProps as BaseFieldProps } from "./typings-dd8ca091";
|
|
5
5
|
import { PickerButtonSize, PickerButtonVariant } from "./types-4480ac4f";
|
|
6
6
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
7
7
|
buttonSize?: PickerButtonSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { OptionShape, OptionsListProps } from "./typings-
|
|
3
|
+
import { OptionShape, OptionsListProps } from "./typings-dd8ca091";
|
|
4
4
|
import { HeaderProps } from "./Component-ebda875c";
|
|
5
5
|
type FooterProps = {
|
|
6
6
|
handleClear?: () => void;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
6
|
-
import { BaseSelectProps } from "./typings-
|
|
5
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
6
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
7
7
|
type AdditionalMobileProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Футер
|
|
@@ -16,8 +16,8 @@ declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerBut
|
|
|
16
16
|
*/
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
-
export { SelectMobile } from "./Component.mobile-
|
|
20
|
-
export { SelectModalMobile } from "./Component.modal.mobile-
|
|
21
|
-
export type { SelectMobileProps } from "./Component.mobile-
|
|
22
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-
|
|
19
|
+
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
20
|
+
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
21
|
+
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
22
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
23
23
|
export { PickerButtonMobileProps, PickerButtonMobile };
|
package/{cssm/Component.modal.mobile-5e1b8383.d.ts → esm/Component.modal.mobile-dd8ca091.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ModalMobile } from "./Component.mobile-f1f15074";
|
|
4
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
5
|
-
import { BaseSelectProps } from "./typings-
|
|
4
|
+
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
5
|
+
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
6
|
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Показывать кнопку очистки
|
package/esm/field/Component.js
CHANGED
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import { CustomButton } from '@alfalab/core-components-custom-button/esm';
|
|
5
5
|
import { getIcon } from '@alfalab/core-components-picker-button/esm/shared';
|
|
6
6
|
|
|
7
|
-
var styles = {"iconContainer":"custom-picker-
|
|
7
|
+
var styles = {"iconContainer":"custom-picker-button__iconContainer_1m60l","addonsContainer":"custom-picker-button__addonsContainer_1m60l","showControlIcon":"custom-picker-button__showControlIcon_1m60l","open":"custom-picker-button__open_1m60l"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Field = function (_a) {
|
package/esm/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 11hnk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .custom-picker-
|
|
19
|
+
} .custom-picker-button__iconContainer_1m60l {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .custom-picker-
|
|
22
|
+
} .custom-picker-button__addonsContainer_1m60l {
|
|
23
23
|
display: flex
|
|
24
|
-
} .custom-picker-
|
|
24
|
+
} .custom-picker-button__addonsContainer_1m60l.custom-picker-button__showControlIcon_1m60l {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .custom-picker-
|
|
26
|
+
} .custom-picker-button__open_1m60l {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseSelectProps, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, OptionShape } from "./typings-dd8ca091";
|
|
3
3
|
type UseSelectWithApplyProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Список выбранных пунктов
|
|
@@ -21,6 +21,14 @@ type UseSelectWithApplyProps = {
|
|
|
21
21
|
* Пропсы, которые будут прокинуты в компонент списка
|
|
22
22
|
*/
|
|
23
23
|
optionsListProps?: BaseSelectProps['optionsListProps'];
|
|
24
|
+
/**
|
|
25
|
+
* Включает отображение поиска
|
|
26
|
+
*/
|
|
27
|
+
showSearch?: BaseSelectProps['showSearch'];
|
|
28
|
+
/**
|
|
29
|
+
* Настройки поиска
|
|
30
|
+
*/
|
|
31
|
+
searchProps?: BaseSelectProps['searchProps'];
|
|
24
32
|
/**
|
|
25
33
|
* Показывать кнопку очистки
|
|
26
34
|
*/
|
|
@@ -35,21 +43,21 @@ type UseSelectWithApplyProps = {
|
|
|
35
43
|
showHeaderWithSelectAll?: boolean;
|
|
36
44
|
};
|
|
37
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
38
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
39
|
-
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-
|
|
46
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
|
+
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-dd8ca091").OptionsListProps & {
|
|
40
48
|
showClear?: boolean | undefined;
|
|
41
|
-
onClose?: (() => void) | undefined;
|
|
49
|
+
onClose?: (() => void) | undefined; /**
|
|
50
|
+
* Компонент выпадающего меню
|
|
51
|
+
*/
|
|
42
52
|
selectedDraft?: OptionShape[] | undefined;
|
|
43
|
-
OptionsList?: import("react").FC<import("./typings-
|
|
44
|
-
Footer?: import("react").FC<import("./Component-
|
|
53
|
+
OptionsList?: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
|
+
Footer?: import("react").FC<import("./Component-dd8ca091").FooterProps> | undefined;
|
|
45
55
|
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
-
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
-
* Показывать кнопку очистки
|
|
48
|
-
*/
|
|
56
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
49
57
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
50
58
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
59
|
optionsListProps: {
|
|
52
|
-
OptionsList: import("react").FC<import("./typings-
|
|
60
|
+
OptionsList: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
53
61
|
showClear: boolean;
|
|
54
62
|
onClear: () => void;
|
|
55
63
|
onApply: () => void;
|
|
@@ -64,12 +72,19 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
64
72
|
};
|
|
65
73
|
allowUnselect: boolean;
|
|
66
74
|
multiple: boolean;
|
|
67
|
-
options: (OptionShape | import("./typings-
|
|
75
|
+
options: (OptionShape | import("./typings-dd8ca091").GroupShape | {
|
|
68
76
|
key: string;
|
|
69
77
|
content: string;
|
|
70
78
|
})[];
|
|
71
|
-
onChange: (payload: import("./typings-
|
|
79
|
+
onChange: (payload: import("./typings-dd8ca091").BaseSelectChangePayload) => void;
|
|
72
80
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
81
|
+
showSearch: boolean | undefined;
|
|
82
|
+
searchProps: {
|
|
83
|
+
value: string;
|
|
84
|
+
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
85
|
+
componentProps?: import("./index-c44170fe").InputProps | undefined;
|
|
86
|
+
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
|
+
} | undefined;
|
|
73
88
|
};
|
|
74
|
-
export * from "./Component-
|
|
89
|
+
export * from "./Component-dd8ca091";
|
|
75
90
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
|
@@ -8,4 +8,8 @@ declare function easeInOutQuad(x: number): number;
|
|
|
8
8
|
declare const easingFns: {
|
|
9
9
|
easeInOutQuad: typeof easeInOutQuad;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
|
|
12
|
+
declare const inputUtils: {
|
|
13
|
+
disableUserInput: typeof disableUserInput;
|
|
14
|
+
};
|
|
15
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils };
|
package/esm/index-c76d6398.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Component-
|
|
1
|
+
export * from "./Component-2abb571d";
|
|
2
2
|
export type { NavigationBarProps } from "./types-83e2bd9e";
|
package/esm/index-f12ee135.d.ts
CHANGED
package/esm/shared-4cd3936b.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-
|
|
3
|
+
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5
5
|
type useSelectWithLoadingProps = {
|
|
6
6
|
loading?: boolean;
|
|
@@ -57,10 +57,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
57
57
|
reset: () => void;
|
|
58
58
|
};
|
|
59
59
|
export * from "./index-ebda875c";
|
|
60
|
-
export * from "./Component-
|
|
61
|
-
export * from "./Component-
|
|
60
|
+
export * from "./Component-2abb571d";
|
|
61
|
+
export * from "./Component-dd8ca091";
|
|
62
62
|
export { useSelectWithLoading, useLazyLoading };
|
|
63
|
-
export * from "./hook-
|
|
64
|
-
export * from "./typings-
|
|
65
|
-
export * from "./utils-
|
|
66
|
-
export type { AdditionalMobileProps } from "./Component.mobile-
|
|
63
|
+
export * from "./hook-8abfea97";
|
|
64
|
+
export * from "./typings-dd8ca091";
|
|
65
|
+
export * from "./utils-dd8ca091";
|
|
66
|
+
export type { AdditionalMobileProps } from "./Component.mobile-ade26e99";
|
|
@@ -210,6 +210,23 @@ type BaseSelectProps = {
|
|
|
210
210
|
* Компонент пункта меню
|
|
211
211
|
*/
|
|
212
212
|
Option?: FC<OptionProps>;
|
|
213
|
+
/**
|
|
214
|
+
* Включает отображение поиска
|
|
215
|
+
*/
|
|
216
|
+
showSearch?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Компонент поиска
|
|
219
|
+
*/
|
|
220
|
+
Search?: FC<SearchProps & RefAttributes<HTMLInputElement>>;
|
|
221
|
+
/**
|
|
222
|
+
* Настройки поиска
|
|
223
|
+
*/
|
|
224
|
+
searchProps?: {
|
|
225
|
+
componentProps?: SearchProps;
|
|
226
|
+
accessor?: (option: OptionShape) => string;
|
|
227
|
+
value?: string;
|
|
228
|
+
onChange?: (value: string) => void;
|
|
229
|
+
};
|
|
213
230
|
/**
|
|
214
231
|
* Обработчик выбора
|
|
215
232
|
*/
|
|
@@ -345,6 +362,10 @@ type OptionsListProps = {
|
|
|
345
362
|
* Дополнительный класс для компонента группы пунктов
|
|
346
363
|
*/
|
|
347
364
|
optionGroupClassName?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Дополнительный класс для скроллбара
|
|
367
|
+
*/
|
|
368
|
+
scrollbarClassName?: string;
|
|
348
369
|
/**
|
|
349
370
|
* Размер компонента
|
|
350
371
|
*/
|
|
@@ -547,4 +568,5 @@ type CheckmarkProps = {
|
|
|
547
568
|
*/
|
|
548
569
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
549
570
|
};
|
|
550
|
-
|
|
571
|
+
type SearchProps = InputProps;
|
|
572
|
+
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps };
|