@alfalab/core-components-input-autocomplete 9.4.0 → 9.4.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-aed0af6e.d.ts +11 -0
- package/{Component-4b555174.d.ts → Component-b4e70cb0.d.ts} +4 -0
- package/Component-bdb4c6b9.d.ts +7 -11
- package/Component-f12ee135.d.ts +3 -3
- package/{Component.mobile-b2c0420d.d.ts → Component.mobile-e81c389f.d.ts} +5 -2
- package/Component.mobile.js +2 -2
- package/Component.modal.mobile.d.ts +10 -2
- package/Component.modal.mobile.js +2 -2
- package/Component.responsive.js +1 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +1 -1
- package/autocomplete-mobile-field/index.css +8 -8
- package/cssm/Component-aed0af6e.d.ts +11 -0
- package/{esm/Component-4b555174.d.ts → cssm/Component-b4e70cb0.d.ts} +4 -0
- package/cssm/Component-bdb4c6b9.d.ts +7 -11
- package/cssm/Component-f12ee135.d.ts +3 -3
- package/cssm/{Component.mobile-b2c0420d.d.ts → Component.mobile-e81c389f.d.ts} +5 -2
- package/cssm/Component.mobile.js +1 -1
- package/cssm/Component.modal.mobile.d.ts +10 -2
- package/cssm/Component.modal.mobile.js +1 -1
- package/cssm/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +17 -6
- package/cssm/index-ebda875c.d.ts +95 -216
- package/cssm/index-f12ee135.d.ts +4 -0
- package/esm/Component-aed0af6e.d.ts +11 -0
- package/{cssm/Component-4b555174.d.ts → esm/Component-b4e70cb0.d.ts} +4 -0
- package/esm/Component.mobile.js +2 -2
- package/esm/Component.modal.mobile.d.ts +9 -1
- package/esm/Component.modal.mobile.js +2 -2
- package/esm/Component.responsive.js +1 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +1 -1
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +17 -6
- package/esm/index-ebda875c.d.ts +95 -216
- package/esm/index-f12ee135.d.ts +4 -0
- package/esm/index.js +1 -1
- package/esm/mobile.css +4 -4
- package/esm/mobile.js +1 -1
- package/esm/{mobile.module-0ca7666f.js → mobile.module-0f496cf3.js} +1 -1
- package/esm/responsive.js +1 -1
- package/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +17 -6
- package/index-ebda875c.d.ts +95 -216
- package/index-f12ee135.d.ts +4 -0
- package/index.js +1 -1
- package/mobile.css +4 -4
- package/mobile.js +1 -1
- package/{mobile.module-48c4c311.js → mobile.module-f85b4300.js} +1 -1
- package/modern/Component-aed0af6e.d.ts +11 -0
- package/modern/{Component-4b555174.d.ts → Component-b4e70cb0.d.ts} +4 -0
- package/modern/Component.desktop.d.ts +4 -4
- package/modern/Component.mobile.js +2 -2
- package/modern/Component.modal.mobile.d.ts +9 -1
- package/modern/Component.modal.mobile.js +2 -2
- package/modern/Component.responsive.d.ts +4 -4
- package/modern/Component.responsive.js +1 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +1 -1
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/{hook-4b555174.d.ts → hook-b4e70cb0.d.ts} +17 -6
- package/modern/index-ebda875c.d.ts +95 -216
- package/modern/index-f12ee135.d.ts +4 -0
- package/modern/index.js +1 -1
- package/modern/mobile.css +4 -4
- package/modern/mobile.js +1 -1
- package/modern/{mobile.module-95a2557d.js → mobile.module-bcf5a0ca.js} +1 -1
- package/modern/responsive.js +1 -1
- package/package.json +2 -2
- package/responsive.js +1 -1
package/index-ebda875c.d.ts
CHANGED
|
@@ -1,219 +1,98 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
};
|
|
100
|
-
static instances: WeakMap<object, any>;
|
|
101
|
-
constructor(element: any, options: any);
|
|
102
|
-
el: any;
|
|
103
|
-
minScrollbarWidth: number;
|
|
104
|
-
options: any;
|
|
105
|
-
classNames: any;
|
|
106
|
-
axis: {
|
|
107
|
-
x: {
|
|
108
|
-
scrollOffsetAttr: string;
|
|
109
|
-
sizeAttr: string;
|
|
110
|
-
scrollSizeAttr: string;
|
|
111
|
-
offsetSizeAttr: string;
|
|
112
|
-
offsetAttr: string;
|
|
113
|
-
overflowAttr: string;
|
|
114
|
-
dragOffset: number;
|
|
115
|
-
isOverflowing: boolean;
|
|
116
|
-
isVisible: boolean;
|
|
117
|
-
forceVisible: boolean;
|
|
118
|
-
track: {};
|
|
119
|
-
scrollbar: {};
|
|
120
|
-
};
|
|
121
|
-
y: {
|
|
122
|
-
scrollOffsetAttr: string;
|
|
123
|
-
sizeAttr: string;
|
|
124
|
-
scrollSizeAttr: string;
|
|
125
|
-
offsetSizeAttr: string;
|
|
126
|
-
offsetAttr: string;
|
|
127
|
-
overflowAttr: string;
|
|
128
|
-
dragOffset: number;
|
|
129
|
-
isOverflowing: boolean;
|
|
130
|
-
isVisible: boolean;
|
|
131
|
-
forceVisible: boolean;
|
|
132
|
-
track: {};
|
|
133
|
-
scrollbar: {};
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
removePreventClickId: any;
|
|
137
|
-
recalculate(): void;
|
|
138
|
-
onMouseMove: (e: any) => void;
|
|
139
|
-
hideScrollbars: () => void;
|
|
140
|
-
onWindowResize: () => void;
|
|
141
|
-
init(): void;
|
|
142
|
-
scrollbarWidth: any;
|
|
143
|
-
initDOM(): void;
|
|
144
|
-
wrapperEl: any;
|
|
145
|
-
contentWrapperEl: any;
|
|
146
|
-
contentEl: any;
|
|
147
|
-
offsetEl: any;
|
|
148
|
-
maskEl: any;
|
|
149
|
-
placeholderEl: any;
|
|
150
|
-
heightAutoObserverWrapperEl: any;
|
|
151
|
-
heightAutoObserverEl: any;
|
|
152
|
-
setAccessibilityAttributes(): void;
|
|
153
|
-
initListeners(): void;
|
|
154
|
-
resizeObserver: any;
|
|
155
|
-
mutationObserver: any;
|
|
156
|
-
elStyles: any;
|
|
157
|
-
isRtl: boolean | undefined;
|
|
158
|
-
getScrollbarSize(axis?: string): number;
|
|
159
|
-
positionScrollbar(axis?: string): void;
|
|
160
|
-
toggleTrackVisibility(axis?: string): void;
|
|
161
|
-
hideNativeScrollbar(): void;
|
|
162
|
-
onScroll: () => void;
|
|
163
|
-
scrollXTicking: boolean | undefined;
|
|
164
|
-
scrollYTicking: boolean | undefined;
|
|
165
|
-
scrollX: () => void;
|
|
166
|
-
scrollY: () => void;
|
|
167
|
-
onMouseEnter: () => void;
|
|
168
|
-
mouseX: any;
|
|
169
|
-
mouseY: any;
|
|
170
|
-
onMouseMoveForAxis(axis?: string): void;
|
|
171
|
-
onMouseLeave: () => void;
|
|
172
|
-
onMouseLeaveForAxis(axis?: string): void;
|
|
173
|
-
showScrollbar(axis?: string): void;
|
|
174
|
-
onPointerEvent: (e: any) => void;
|
|
175
|
-
onDragStart(e: any, axis?: string): void;
|
|
176
|
-
draggedAxis: string | undefined;
|
|
177
|
-
drag: (e: any) => void;
|
|
178
|
-
onEndDrag: (e: any) => void;
|
|
179
|
-
preventClick: (e: any) => void;
|
|
180
|
-
onTrackClick(e: any, axis?: string): void;
|
|
181
|
-
getContentElement(): any;
|
|
182
|
-
getScrollElement(): any;
|
|
183
|
-
getScrollbarWidth(): any;
|
|
184
|
-
removeListeners(): void;
|
|
185
|
-
unMount(): void;
|
|
186
|
-
isWithinBounds(bbox: any): boolean;
|
|
187
|
-
findChild(el: any, query: any): any;
|
|
188
|
-
}
|
|
189
|
-
declare function memoize(func: Function, resolver?: Function | undefined): Function;
|
|
190
|
-
declare namespace memoize$0 {
|
|
191
|
-
export { MapCache as Cache };
|
|
192
|
-
}
|
|
193
|
-
declare function MapCache(entries?: any[] | undefined): void;
|
|
194
|
-
declare class MapCache {
|
|
195
|
-
private constructor();
|
|
196
|
-
clear: typeof mapCacheClear;
|
|
197
|
-
delete: typeof mapCacheDelete;
|
|
198
|
-
get: typeof mapCacheGet;
|
|
199
|
-
has: typeof mapCacheHas;
|
|
200
|
-
set: typeof mapCacheSet;
|
|
201
|
-
}
|
|
202
|
-
declare function mapCacheClear(): void;
|
|
203
|
-
declare class mapCacheClear {
|
|
204
|
-
__data__: {
|
|
205
|
-
hash: Hash;
|
|
206
|
-
map: any;
|
|
207
|
-
string: Hash;
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
declare function mapCacheDelete(key: string): boolean;
|
|
211
|
-
declare function mapCacheGet(key: string): any;
|
|
212
|
-
declare function mapCacheHas(key: string): boolean;
|
|
213
|
-
declare function mapCacheSet(key: string, value: any): Object;
|
|
214
|
-
declare var canUseDOM: boolean;
|
|
215
|
-
declare function scrollbarWidth(el: any): any;
|
|
216
|
-
declare function getElementWindow(element: any): any;
|
|
217
|
-
declare function getElementDocument(element: any): any;
|
|
218
|
-
declare function getOptions(obj: any): unknown;
|
|
219
|
-
export { memoize as default, ScrollbarProps, Scrollbar, getElementWindow, getElementDocument, getOptions };
|
|
4
|
+
import { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
5
|
+
type NativeProps = InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
+
type Align = "start" | "center";
|
|
7
|
+
type CheckboxProps = Omit<NativeProps, "size" | "onChange" | "enterKeyHint"> & {
|
|
8
|
+
/**
|
|
9
|
+
* Управление состоянием вкл/выкл чекбокса (native prop)
|
|
10
|
+
*/
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Обработчик переключения чекбокса
|
|
14
|
+
*/
|
|
15
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>, payload: {
|
|
16
|
+
checked: boolean;
|
|
17
|
+
name?: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Текст подписи к чекбоксу
|
|
21
|
+
*/
|
|
22
|
+
label?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Текст подсказки снизу
|
|
25
|
+
*/
|
|
26
|
+
hint?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Размер компонента
|
|
29
|
+
*/
|
|
30
|
+
size?: "s" | "m";
|
|
31
|
+
/**
|
|
32
|
+
* Доп. класс чекбокса
|
|
33
|
+
*/
|
|
34
|
+
boxClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Доп. класс контента
|
|
37
|
+
*/
|
|
38
|
+
contentClassName?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Выравнивание
|
|
41
|
+
*/
|
|
42
|
+
align?: Align;
|
|
43
|
+
/**
|
|
44
|
+
* Дополнительный слот
|
|
45
|
+
*/
|
|
46
|
+
addons?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Растягивать ли компонент на всю ширину
|
|
49
|
+
*/
|
|
50
|
+
block?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Управление состоянием включен / выключен
|
|
53
|
+
*/
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Управление состоянием активен / неактивен
|
|
57
|
+
*/
|
|
58
|
+
inactive?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
61
|
+
*/
|
|
62
|
+
dataTestId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Управление неопределенным состоянием чекбокса
|
|
65
|
+
*/
|
|
66
|
+
indeterminate?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Отображение ошибки
|
|
69
|
+
*/
|
|
70
|
+
error?: ReactNode | boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Флаг для скрытия нативного инпута.
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
hiddenInput?: boolean;
|
|
76
|
+
};
|
|
77
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<NativeProps, "size" | "onChange" | "enterKeyHint"> & {
|
|
78
|
+
checked?: boolean | undefined;
|
|
79
|
+
onChange?: ((event: ChangeEvent<HTMLInputElement>, payload: {
|
|
80
|
+
checked: boolean;
|
|
81
|
+
name?: string;
|
|
82
|
+
}) => void) | undefined;
|
|
83
|
+
label?: ReactNode;
|
|
84
|
+
hint?: ReactNode;
|
|
85
|
+
size?: "s" | "m" | undefined;
|
|
86
|
+
boxClassName?: string | undefined;
|
|
87
|
+
contentClassName?: string | undefined;
|
|
88
|
+
align?: Align | undefined;
|
|
89
|
+
addons?: React.ReactNode;
|
|
90
|
+
block?: boolean | undefined;
|
|
91
|
+
disabled?: boolean | undefined;
|
|
92
|
+
inactive?: boolean | undefined;
|
|
93
|
+
dataTestId?: string | undefined;
|
|
94
|
+
indeterminate?: boolean | undefined;
|
|
95
|
+
error?: ReactNode | boolean;
|
|
96
|
+
hiddenInput?: boolean | undefined;
|
|
97
|
+
} & React.RefAttributes<HTMLLabelElement>>;
|
|
98
|
+
export { CheckboxProps, Checkbox };
|
package/index-f12ee135.d.ts
CHANGED
|
@@ -165,6 +165,10 @@ type BottomSheetProps = {
|
|
|
165
165
|
* Отключает блокировку скролла при открытии модального окна
|
|
166
166
|
*/
|
|
167
167
|
disableBlockingScroll?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Отключает ловушку фокуса
|
|
170
|
+
*/
|
|
171
|
+
disableFocusLock?: boolean;
|
|
168
172
|
/**
|
|
169
173
|
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
170
174
|
* Не анимировать шторку при изменении размера вьюпорта
|
package/index.js
CHANGED
|
@@ -17,7 +17,7 @@ require('lodash.throttle');
|
|
|
17
17
|
require('@alfalab/core-components-button');
|
|
18
18
|
require('./autocomplete-mobile-field/Component.js');
|
|
19
19
|
require('@alfalab/core-components-form-control');
|
|
20
|
-
require('./mobile.module-
|
|
20
|
+
require('./mobile.module-f85b4300.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
package/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9cwx2 */
|
|
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,11 +16,11 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .input-
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_ynfri {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_ynfri {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_ynfri > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/mobile.js
CHANGED
|
@@ -15,7 +15,7 @@ require('@alfalab/core-components-select');
|
|
|
15
15
|
require('./autocomplete-mobile-field/Component.js');
|
|
16
16
|
require('@alfalab/core-components-form-control');
|
|
17
17
|
require('@alfalab/hooks');
|
|
18
|
-
require('./mobile.module-
|
|
18
|
+
require('./mobile.module-f85b4300.js');
|
|
19
19
|
require('@alfalab/core-components-select/mobile');
|
|
20
20
|
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var styles = {"bottomAddonInput":"input-
|
|
3
|
+
var styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_ynfri","footer":"input-autocomplete__footer_ynfri"};
|
|
4
4
|
require('./mobile.css')
|
|
5
5
|
|
|
6
6
|
exports.styles = styles;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CheckboxProps } from "./index-ebda875c";
|
|
4
|
+
type HeaderProps = {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
indeterminate?: boolean;
|
|
7
|
+
onChange?: CheckboxProps['onChange'];
|
|
8
|
+
mobile?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Header: React.FC<HeaderProps>;
|
|
11
|
+
export { HeaderProps, Header };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OptionShape, OptionsListProps } from "./typings-5e1b8383";
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { HeaderProps } from "./Component-aed0af6e";
|
|
4
5
|
type FooterProps = {
|
|
5
6
|
handleClear?: () => void;
|
|
6
7
|
handleApply?: () => void;
|
|
@@ -14,5 +15,8 @@ declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListP
|
|
|
14
15
|
selectedDraft?: OptionShape[] | undefined;
|
|
15
16
|
OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
16
17
|
Footer?: React.FC<FooterProps> | undefined;
|
|
18
|
+
Header?: React.FC<HeaderProps> | undefined;
|
|
19
|
+
headerProps?: HeaderProps | undefined;
|
|
20
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
17
21
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
22
|
export { FooterProps, Footer, OptionsListWithApply };
|
|
@@ -37,7 +37,7 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
37
37
|
/**
|
|
38
38
|
* Компонент ввода значения
|
|
39
39
|
*/
|
|
40
|
-
Input?: React.FC<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
40
|
+
Input?: React.FC<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
41
41
|
value?: string | undefined;
|
|
42
42
|
defaultValue?: string | undefined;
|
|
43
43
|
block?: boolean | undefined;
|
|
@@ -49,7 +49,7 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
49
49
|
hint?: React.ReactNode;
|
|
50
50
|
label?: React.ReactNode;
|
|
51
51
|
labelView?: "inner" | "outer" | undefined;
|
|
52
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
52
|
+
type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
|
|
53
53
|
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
54
54
|
leftAddons?: React.ReactNode;
|
|
55
55
|
rightAddons?: React.ReactNode;
|
|
@@ -73,7 +73,7 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
73
73
|
/**
|
|
74
74
|
* Пропсы, которые будут прокинуты в инпут
|
|
75
75
|
*/
|
|
76
|
-
inputProps?: (Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
76
|
+
inputProps?: (Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
77
77
|
value?: string | undefined;
|
|
78
78
|
defaultValue?: string | undefined;
|
|
79
79
|
block?: boolean | undefined;
|
|
@@ -85,7 +85,7 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
85
85
|
hint?: React.ReactNode;
|
|
86
86
|
label?: React.ReactNode;
|
|
87
87
|
labelView?: "inner" | "outer" | undefined;
|
|
88
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
88
|
+
type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
|
|
89
89
|
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
90
90
|
leftAddons?: React.ReactNode;
|
|
91
91
|
rightAddons?: React.ReactNode;
|
|
@@ -6,7 +6,7 @@ import { Button } from '@alfalab/core-components-button/modern';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectMobile } from '@alfalab/core-components-select/modern';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-bcf5a0ca.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -77,7 +77,7 @@ const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetP
|
|
|
77
77
|
},
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return (React.createElement(SelectMobile, { ref: mergeRefs([targetRef, ref]), selected: selected || SELECTED, open: Boolean(open || openProp), onOpen: handleOpen, onChange: handleChange, Arrow: Arrow, Field: AutocompleteMobileField, fieldProps: { value }, placeholder: placeholder, label: label, size: size, name: name, multiple: multiple, bottomSheetProps: getBottomSheetProps(), optionsListProps: { showFooter: false }, ...restProps }));
|
|
80
|
+
return (React.createElement(SelectMobile, { ref: mergeRefs([targetRef, ref]), selected: selected || SELECTED, open: Boolean(open || openProp), onOpen: handleOpen, onChange: handleChange, Arrow: Arrow, Field: AutocompleteMobileField, fieldProps: { value }, placeholder: placeholder, label: label, size: size, name: name, multiple: multiple, useWithApplyHook: false, bottomSheetProps: getBottomSheetProps(), optionsListProps: { showFooter: false }, ...restProps }));
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
export { InputAutocompleteMobile };
|
|
@@ -4,7 +4,7 @@ import { ChangeEvent, ElementType } from "react";
|
|
|
4
4
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
5
5
|
import { BaseSelectChangePayload } from "./index-3e68f8db";
|
|
6
6
|
import { ModalMobile } from "./Component.mobile-e81c389f";
|
|
7
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
7
|
+
import { UseSelectWithApplyProps } from "./hook-b4e70cb0";
|
|
8
8
|
import { BaseSelectProps } from "./typings-5e1b8383";
|
|
9
9
|
type SelectModalMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & {
|
|
10
10
|
/**
|
|
@@ -27,6 +27,14 @@ type SelectModalMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> &
|
|
|
27
27
|
* Дополнительные пропсы футера модалки
|
|
28
28
|
*/
|
|
29
29
|
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
30
|
+
/*
|
|
31
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
32
|
+
*/
|
|
33
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
|
|
34
|
+
/**
|
|
35
|
+
* Использовать ли хук useSelectWithApply
|
|
36
|
+
*/
|
|
37
|
+
useWithApplyHook?: boolean;
|
|
30
38
|
};
|
|
31
39
|
type InputAutocompleteModalMobileProps = Omit<SelectModalMobileProps, 'OptionsList' | 'Checkmark' | 'onScroll' | 'nativeSelect' | 'autocomplete' | 'valueRenderer'> & {
|
|
32
40
|
/**
|
|
@@ -6,7 +6,7 @@ import { Button } from '@alfalab/core-components-button/modern';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectModalMobile } from '@alfalab/core-components-select/modern/mobile';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-bcf5a0ca.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -57,7 +57,7 @@ const InputAutocompleteModalMobile = React.forwardRef(({ open: openProp, onOpen,
|
|
|
57
57
|
const renderFooter = () => (React.createElement(React.Fragment, null,
|
|
58
58
|
React.createElement(Button, { block: true, view: 'primary', size: 's', onClick: handleApply, ...continueButtonProps }, "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"),
|
|
59
59
|
React.createElement(Button, { block: true, view: 'secondary', size: 's', onClick: handleCancel, ...cancelButtonProps }, "\u041E\u0442\u043C\u0435\u043D\u0430")));
|
|
60
|
-
return (React.createElement(SelectModalMobile, { ...restProps, ref: mergeRefs([ref, targetRef]), name: name, Field: AutocompleteMobileField, Arrow: Arrow, onOpen: handleOpen, onChange: handleChange, multiple: multiple, open: openProp ?? open, size: size, fieldProps: { value }, placeholder: placeholder, modalProps: {
|
|
60
|
+
return (React.createElement(SelectModalMobile, { ...restProps, ref: mergeRefs([ref, targetRef]), name: name, Field: AutocompleteMobileField, Arrow: Arrow, onOpen: handleOpen, onChange: handleChange, multiple: multiple, open: openProp ?? open, size: size, fieldProps: { value }, placeholder: placeholder, useWithApplyHook: false, modalProps: {
|
|
61
61
|
...restProps.modalProps,
|
|
62
62
|
componentRef: modalScrollableRef,
|
|
63
63
|
}, modalHeaderProps: {
|
|
@@ -14,7 +14,7 @@ type InputAutocompleteResponsiveProps = InputAutocompleteDesktopProps & InputAut
|
|
|
14
14
|
};
|
|
15
15
|
type InputAutocompleteMedia = 'desktop' | 'mobile';
|
|
16
16
|
declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "nativeSelect" | "Field"> & {
|
|
17
|
-
Input?: React.FC<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
17
|
+
Input?: React.FC<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
18
18
|
value?: string | undefined;
|
|
19
19
|
defaultValue?: string | undefined;
|
|
20
20
|
block?: boolean | undefined;
|
|
@@ -26,7 +26,7 @@ declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<
|
|
|
26
26
|
hint?: React.ReactNode;
|
|
27
27
|
label?: React.ReactNode;
|
|
28
28
|
labelView?: "inner" | "outer" | undefined;
|
|
29
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
29
|
+
type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
|
|
30
30
|
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
31
31
|
leftAddons?: React.ReactNode;
|
|
32
32
|
rightAddons?: React.ReactNode;
|
|
@@ -47,7 +47,7 @@ declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<
|
|
|
47
47
|
onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
48
48
|
dataTestId?: string | undefined;
|
|
49
49
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
50
|
-
inputProps?: (Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
50
|
+
inputProps?: (Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "defaultValue" | "onChange" | "onClick" | "onMouseDown" | "value" | "enterKeyHint"> & {
|
|
51
51
|
value?: string | undefined;
|
|
52
52
|
defaultValue?: string | undefined;
|
|
53
53
|
block?: boolean | undefined;
|
|
@@ -59,7 +59,7 @@ declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<
|
|
|
59
59
|
hint?: React.ReactNode;
|
|
60
60
|
label?: React.ReactNode;
|
|
61
61
|
labelView?: "inner" | "outer" | undefined;
|
|
62
|
-
type?: "number" | "text" | "tel" | "email" | "
|
|
62
|
+
type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
|
|
63
63
|
wrapperRef?: React.Ref<HTMLDivElement> | undefined;
|
|
64
64
|
leftAddons?: React.ReactNode;
|
|
65
65
|
rightAddons?: React.ReactNode;
|
|
@@ -11,7 +11,7 @@ import 'lodash.throttle';
|
|
|
11
11
|
import '@alfalab/core-components-button/modern';
|
|
12
12
|
import './autocomplete-mobile-field/Component.js';
|
|
13
13
|
import '@alfalab/core-components-form-control/modern';
|
|
14
|
-
import './mobile.module-
|
|
14
|
+
import './mobile.module-bcf5a0ca.js';
|
|
15
15
|
|
|
16
16
|
const InputAutocompleteResponsive = forwardRef(({ breakpoint = 1024, ...restProps }, ref) => {
|
|
17
17
|
const [view] = useMedia([
|
|
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
5
5
|
|
|
6
|
-
const styles = {"arrow":"input-
|
|
6
|
+
const styles = {"arrow":"input-autocomplete__arrow_24bt3","error":"input-autocomplete__error_24bt3"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input: Input$1 = Input, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, }) => {
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { FormControl } from '@alfalab/core-components-form-control/modern';
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
|
|
6
|
-
const styles = {"component":"input-
|
|
6
|
+
const styles = {"component":"input-autocomplete__component_nonoc","field":"input-autocomplete__field_nonoc","disabled":"input-autocomplete__disabled_nonoc","placeholder":"input-autocomplete__placeholder_nonoc","contentWrapper":"input-autocomplete__contentWrapper_nonoc","value":"input-autocomplete__value_nonoc","focusVisible":"input-autocomplete__focusVisible_nonoc"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteMobileField = ({ size = 'm', open, error, hint, disabled, label, labelView = 'inner', placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dd24a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_nonoc {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_nonoc:not(.input-autocomplete__disabled_nonoc) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_nonoc {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_nonoc {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_nonoc {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_nonoc {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_nonoc {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|