@alfalab/core-components-custom-picker-button 1.0.1 → 1.0.2
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-ebda875c.d.ts +9 -139
- package/cssm/Component-ebda875c.d.ts +9 -139
- package/cssm/hook-3e68f8db.d.ts +15 -4
- package/esm/Component-ebda875c.d.ts +9 -139
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +5 -5
- package/esm/hook-3e68f8db.d.ts +15 -4
- package/field/Component.js +1 -1
- package/field/index.css +5 -5
- package/hook-3e68f8db.d.ts +15 -4
- package/modern/Component-ebda875c.d.ts +9 -139
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +5 -5
- package/modern/hook-3e68f8db.d.ts +15 -4
- package/package.json +2 -2
package/Component-ebda875c.d.ts
CHANGED
|
@@ -1,142 +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
|
-
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'];
|
|
4
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
5
|
+
type HeaderProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
onChange?: CheckboxProps['onChange'];
|
|
9
|
+
mobile?: boolean;
|
|
139
10
|
};
|
|
140
|
-
declare const
|
|
141
|
-
|
|
142
|
-
export { BaseModalProps, BaseModalContext, BaseModal };
|
|
11
|
+
declare const Header: React.FC<HeaderProps>;
|
|
12
|
+
export { HeaderProps, Header };
|
|
@@ -1,142 +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
|
-
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'];
|
|
4
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
5
|
+
type HeaderProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
onChange?: CheckboxProps['onChange'];
|
|
9
|
+
mobile?: boolean;
|
|
139
10
|
};
|
|
140
|
-
declare const
|
|
141
|
-
|
|
142
|
-
export { BaseModalProps, BaseModalContext, BaseModal };
|
|
11
|
+
declare const Header: React.FC<HeaderProps>;
|
|
12
|
+
export { HeaderProps, Header };
|
package/cssm/hook-3e68f8db.d.ts
CHANGED
|
@@ -29,17 +29,22 @@ type UseSelectWithApplyProps = {
|
|
|
29
29
|
* Показывать пункт "Выбрать все"
|
|
30
30
|
*/
|
|
31
31
|
showSelectAll?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
34
|
+
*/
|
|
35
|
+
showHeaderWithSelectAll?: boolean;
|
|
32
36
|
};
|
|
33
37
|
declare const SELECT_ALL_KEY = "select_all";
|
|
34
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, }: UseSelectWithApplyProps): {
|
|
38
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
35
39
|
OptionsList: import("react").ForwardRefExoticComponent<import("./index-3e68f8db").OptionsListProps & {
|
|
36
40
|
showClear?: boolean | undefined;
|
|
37
41
|
onClose?: (() => void) | undefined;
|
|
38
42
|
selectedDraft?: OptionShape[] | undefined;
|
|
39
|
-
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
40
|
-
* Пропсы, которые будут прокинуты в компонент списка
|
|
41
|
-
*/
|
|
43
|
+
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
42
44
|
Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
|
|
45
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
43
48
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
49
|
optionsListProps: {
|
|
45
50
|
OptionsList: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
@@ -48,6 +53,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
48
53
|
onApply: () => void;
|
|
49
54
|
onClose: () => void;
|
|
50
55
|
selectedDraft: OptionShape[];
|
|
56
|
+
showHeaderWithSelectAll: boolean;
|
|
57
|
+
headerProps: {
|
|
58
|
+
indeterminate: boolean;
|
|
59
|
+
checked: boolean;
|
|
60
|
+
onChange: () => void;
|
|
61
|
+
};
|
|
51
62
|
};
|
|
52
63
|
allowUnselect: boolean;
|
|
53
64
|
multiple: boolean;
|
|
@@ -1,142 +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
|
-
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'];
|
|
4
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
5
|
+
type HeaderProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
onChange?: CheckboxProps['onChange'];
|
|
9
|
+
mobile?: boolean;
|
|
139
10
|
};
|
|
140
|
-
declare const
|
|
141
|
-
|
|
142
|
-
export { BaseModalProps, BaseModalContext, BaseModal };
|
|
11
|
+
declare const Header: React.FC<HeaderProps>;
|
|
12
|
+
export { HeaderProps, Header };
|
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';
|
|
6
6
|
|
|
7
|
-
var styles = {"iconContainer":"custom-picker-
|
|
7
|
+
var styles = {"iconContainer":"custom-picker-button__iconContainer_7twoi","addonsContainer":"custom-picker-button__addonsContainer_7twoi","showControlIcon":"custom-picker-button__showControlIcon_7twoi","open":"custom-picker-button__open_7twoi"};
|
|
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: 17qc5 */
|
|
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_7twoi {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .custom-picker-
|
|
22
|
+
} .custom-picker-button__addonsContainer_7twoi {
|
|
23
23
|
display: flex
|
|
24
|
-
} .custom-picker-
|
|
24
|
+
} .custom-picker-button__addonsContainer_7twoi.custom-picker-button__showControlIcon_7twoi {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .custom-picker-
|
|
26
|
+
} .custom-picker-button__open_7twoi {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
package/esm/hook-3e68f8db.d.ts
CHANGED
|
@@ -29,17 +29,22 @@ type UseSelectWithApplyProps = {
|
|
|
29
29
|
* Показывать пункт "Выбрать все"
|
|
30
30
|
*/
|
|
31
31
|
showSelectAll?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
34
|
+
*/
|
|
35
|
+
showHeaderWithSelectAll?: boolean;
|
|
32
36
|
};
|
|
33
37
|
declare const SELECT_ALL_KEY = "select_all";
|
|
34
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, }: UseSelectWithApplyProps): {
|
|
38
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
35
39
|
OptionsList: import("react").ForwardRefExoticComponent<import("./index-3e68f8db").OptionsListProps & {
|
|
36
40
|
showClear?: boolean | undefined;
|
|
37
41
|
onClose?: (() => void) | undefined;
|
|
38
42
|
selectedDraft?: OptionShape[] | undefined;
|
|
39
|
-
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
40
|
-
* Пропсы, которые будут прокинуты в компонент списка
|
|
41
|
-
*/
|
|
43
|
+
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
42
44
|
Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
|
|
45
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
43
48
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
49
|
optionsListProps: {
|
|
45
50
|
OptionsList: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
@@ -48,6 +53,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
48
53
|
onApply: () => void;
|
|
49
54
|
onClose: () => void;
|
|
50
55
|
selectedDraft: OptionShape[];
|
|
56
|
+
showHeaderWithSelectAll: boolean;
|
|
57
|
+
headerProps: {
|
|
58
|
+
indeterminate: boolean;
|
|
59
|
+
checked: boolean;
|
|
60
|
+
onChange: () => void;
|
|
61
|
+
};
|
|
51
62
|
};
|
|
52
63
|
allowUnselect: boolean;
|
|
53
64
|
multiple: boolean;
|
package/field/Component.js
CHANGED
|
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"iconContainer":"custom-picker-
|
|
16
|
+
var styles = {"iconContainer":"custom-picker-button__iconContainer_7twoi","addonsContainer":"custom-picker-button__addonsContainer_7twoi","showControlIcon":"custom-picker-button__showControlIcon_7twoi","open":"custom-picker-button__open_7twoi"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Field = function (_a) {
|
package/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 17qc5 */
|
|
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_7twoi {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .custom-picker-
|
|
22
|
+
} .custom-picker-button__addonsContainer_7twoi {
|
|
23
23
|
display: flex
|
|
24
|
-
} .custom-picker-
|
|
24
|
+
} .custom-picker-button__addonsContainer_7twoi.custom-picker-button__showControlIcon_7twoi {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .custom-picker-
|
|
26
|
+
} .custom-picker-button__open_7twoi {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
package/hook-3e68f8db.d.ts
CHANGED
|
@@ -29,17 +29,22 @@ type UseSelectWithApplyProps = {
|
|
|
29
29
|
* Показывать пункт "Выбрать все"
|
|
30
30
|
*/
|
|
31
31
|
showSelectAll?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
34
|
+
*/
|
|
35
|
+
showHeaderWithSelectAll?: boolean;
|
|
32
36
|
};
|
|
33
37
|
declare const SELECT_ALL_KEY = "select_all";
|
|
34
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, }: UseSelectWithApplyProps): {
|
|
38
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
35
39
|
OptionsList: import("react").ForwardRefExoticComponent<import("./index-3e68f8db").OptionsListProps & {
|
|
36
40
|
showClear?: boolean | undefined;
|
|
37
41
|
onClose?: (() => void) | undefined;
|
|
38
42
|
selectedDraft?: OptionShape[] | undefined;
|
|
39
|
-
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
40
|
-
* Пропсы, которые будут прокинуты в компонент списка
|
|
41
|
-
*/
|
|
43
|
+
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
42
44
|
Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
|
|
45
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
43
48
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
49
|
optionsListProps: {
|
|
45
50
|
OptionsList: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
@@ -48,6 +53,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
48
53
|
onApply: () => void;
|
|
49
54
|
onClose: () => void;
|
|
50
55
|
selectedDraft: OptionShape[];
|
|
56
|
+
showHeaderWithSelectAll: boolean;
|
|
57
|
+
headerProps: {
|
|
58
|
+
indeterminate: boolean;
|
|
59
|
+
checked: boolean;
|
|
60
|
+
onChange: () => void;
|
|
61
|
+
};
|
|
51
62
|
};
|
|
52
63
|
allowUnselect: boolean;
|
|
53
64
|
multiple: boolean;
|
|
@@ -1,142 +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
|
-
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'];
|
|
4
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
5
|
+
type HeaderProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
indeterminate?: boolean;
|
|
8
|
+
onChange?: CheckboxProps['onChange'];
|
|
9
|
+
mobile?: boolean;
|
|
139
10
|
};
|
|
140
|
-
declare const
|
|
141
|
-
|
|
142
|
-
export { BaseModalProps, BaseModalContext, BaseModal };
|
|
11
|
+
declare const Header: React.FC<HeaderProps>;
|
|
12
|
+
export { HeaderProps, Header };
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { CustomButton } from '@alfalab/core-components-custom-button/modern';
|
|
4
4
|
import { getIcon } from '@alfalab/core-components-picker-button/modern';
|
|
5
5
|
|
|
6
|
-
const styles = {"iconContainer":"custom-picker-
|
|
6
|
+
const styles = {"iconContainer":"custom-picker-button__iconContainer_7twoi","addonsContainer":"custom-picker-button__addonsContainer_7twoi","showControlIcon":"custom-picker-button__showControlIcon_7twoi","open":"custom-picker-button__open_7twoi"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const Field = ({ buttonSize = 'm', buttonVariant = 'default', backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow = true, ...restProps }) => {
|
package/modern/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 17qc5 */
|
|
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_7twoi {
|
|
20
20
|
display: flex;
|
|
21
21
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .custom-picker-
|
|
22
|
+
} .custom-picker-button__addonsContainer_7twoi {
|
|
23
23
|
display: flex
|
|
24
|
-
} .custom-picker-
|
|
24
|
+
} .custom-picker-button__addonsContainer_7twoi.custom-picker-button__showControlIcon_7twoi {
|
|
25
25
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .custom-picker-
|
|
26
|
+
} .custom-picker-button__open_7twoi {
|
|
27
27
|
transform: var(--arrow-transform);
|
|
28
28
|
}
|
|
@@ -29,17 +29,22 @@ type UseSelectWithApplyProps = {
|
|
|
29
29
|
* Показывать пункт "Выбрать все"
|
|
30
30
|
*/
|
|
31
31
|
showSelectAll?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
34
|
+
*/
|
|
35
|
+
showHeaderWithSelectAll?: boolean;
|
|
32
36
|
};
|
|
33
37
|
declare const SELECT_ALL_KEY = "select_all";
|
|
34
|
-
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, }: UseSelectWithApplyProps): {
|
|
38
|
+
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
|
|
35
39
|
OptionsList: import("react").ForwardRefExoticComponent<import("./index-3e68f8db").OptionsListProps & {
|
|
36
40
|
showClear?: boolean | undefined;
|
|
37
41
|
onClose?: (() => void) | undefined;
|
|
38
42
|
selectedDraft?: OptionShape[] | undefined;
|
|
39
|
-
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
40
|
-
* Пропсы, которые будут прокинуты в компонент списка
|
|
41
|
-
*/
|
|
43
|
+
OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
42
44
|
Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
|
|
45
|
+
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
46
|
+
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
47
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
43
48
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
49
|
optionsListProps: {
|
|
45
50
|
OptionsList: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
@@ -48,6 +53,12 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
48
53
|
onApply: () => void;
|
|
49
54
|
onClose: () => void;
|
|
50
55
|
selectedDraft: OptionShape[];
|
|
56
|
+
showHeaderWithSelectAll: boolean;
|
|
57
|
+
headerProps: {
|
|
58
|
+
indeterminate: boolean;
|
|
59
|
+
checked: boolean;
|
|
60
|
+
onChange: () => void;
|
|
61
|
+
};
|
|
51
62
|
};
|
|
52
63
|
allowUnselect: boolean;
|
|
53
64
|
multiple: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-custom-picker-button",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Custom picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@alfalab/core-components-picker-button": "^10.3.
|
|
21
|
+
"@alfalab/core-components-picker-button": "^10.3.25",
|
|
22
22
|
"@alfalab/core-components-custom-button": "^3.2.0",
|
|
23
23
|
"@alfalab/core-components-mq": "^4.1.4",
|
|
24
24
|
"classnames": "^2.3.1",
|