@alfalab/core-components-input-autocomplete 10.1.1 → 10.1.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.mobile.js +1 -1
- package/Component.modal.mobile.js +1 -1
- package/Component.responsive.js +1 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +1 -1
- package/autocomplete-mobile-field/index.css +8 -8
- package/{modern/component-2abb571d.d.ts → component-1a4fbd11.d.ts} +1 -1
- package/{component-2abb571d.d.ts → cssm/component-1a4fbd11.d.ts} +1 -1
- package/cssm/{index-2abb571d.d.ts → index-1a4fbd11.d.ts} +8 -1
- package/cssm/index-c76d6398.d.ts +1 -1
- package/cssm/index-f12ee135.d.ts +2 -2
- package/{esm/types-92653002.d.ts → cssm/types-b0ff398d.d.ts} +5 -0
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.modal.mobile.js +1 -1
- package/esm/Component.responsive.js +1 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +1 -1
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/{component-2abb571d.d.ts → component-1a4fbd11.d.ts} +1 -1
- package/esm/{index-2abb571d.d.ts → index-1a4fbd11.d.ts} +8 -1
- package/esm/index-c76d6398.d.ts +1 -1
- package/esm/index-f12ee135.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/mobile.css +4 -4
- package/esm/mobile.js +1 -1
- package/esm/{mobile.module-d94bd137.js → mobile.module-7ccedebb.js} +1 -1
- package/{cssm/types-92653002.d.ts → esm/types-b0ff398d.d.ts} +5 -0
- package/{index-2abb571d.d.ts → index-1a4fbd11.d.ts} +8 -1
- package/index-c76d6398.d.ts +1 -1
- package/index-f12ee135.d.ts +2 -2
- package/index.js +1 -1
- package/mobile.css +4 -4
- package/mobile.js +1 -1
- package/{mobile.module-e6e04ea3.js → mobile.module-f3a9e8d4.js} +1 -1
- package/modern/Component-96988a65.d.ts +9 -0
- package/modern/Component-aed0af6e.d.ts +11 -0
- package/modern/Component-dd8ca091.d.ts +3 -70
- package/modern/Component-ebda875c.d.ts +98 -9
- package/modern/Component.mobile.d.ts +1 -1
- package/modern/Component.mobile.js +1 -1
- package/modern/Component.modal.mobile.d.ts +2 -2
- package/modern/Component.modal.mobile.js +1 -1
- package/modern/Component.responsive.d.ts +1 -1
- package/modern/Component.responsive.js +1 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +1 -1
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/{cssm/component-2abb571d.d.ts → modern/component-1a4fbd11.d.ts} +1 -1
- package/modern/desktop-63dec22f.d.ts +2 -6
- package/modern/hook-8abfea97.d.ts +4 -4
- package/modern/hook-ebda875c.d.ts +48 -0
- package/modern/{index-2abb571d.d.ts → index-1a4fbd11.d.ts} +8 -1
- package/modern/index-bdb4c6b9.d.ts +180 -2
- package/modern/index-c76d6398.d.ts +1 -1
- package/modern/index-ebda875c.d.ts +190 -107
- package/modern/index-f12ee135.d.ts +2 -2
- package/modern/index.js +1 -1
- package/modern/{Component.modal.mobile-dd8ca091.d.ts → mobile-45dc17c6.d.ts} +13 -26
- package/modern/mobile-96988a65.d.ts +5 -2
- package/modern/mobile.css +4 -4
- package/modern/mobile.js +1 -1
- package/modern/{mobile.module-698d1199.js → mobile.module-f3a5d2f8.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +2 -59
- package/modern/{types-92653002.d.ts → types-b0ff398d.d.ts} +5 -0
- package/package.json +4 -4
- package/{types-92653002.d.ts → types-b0ff398d.d.ts} +5 -0
- package/modern/Component-63dec22f.d.ts +0 -184
- package/modern/Component.mobile-ebda875c.d.ts +0 -6
- package/modern/mobile-ade26e99.d.ts +0 -5
- package/modern/utils-1574ad8b.d.ts +0 -29
- /package/{Component-2abb571d.d.ts → Component-1a4fbd11.d.ts} +0 -0
- /package/cssm/{Component-2abb571d.d.ts → Component-1a4fbd11.d.ts} +0 -0
- /package/esm/{Component-2abb571d.d.ts → Component-1a4fbd11.d.ts} +0 -0
- /package/modern/{Component-2abb571d.d.ts → Component-1a4fbd11.d.ts} +0 -0
- /package/modern/{useSkeleton-ebda875c.d.ts → useSkeleton-1b036d4b.d.ts} +0 -0
|
@@ -1,136 +1,219 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-transition-group" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { HTMLAttributes
|
|
5
|
-
type
|
|
6
|
-
default: {
|
|
7
|
-
[key: string]: string;
|
|
8
|
-
};
|
|
9
|
-
inverted: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
import { HTMLAttributes } from "react";
|
|
5
|
+
type ScrollbarProps = {
|
|
14
6
|
/**
|
|
15
|
-
*
|
|
7
|
+
* Оборачиваемый элемент.
|
|
16
8
|
*/
|
|
17
|
-
|
|
9
|
+
children?: React.ReactNode;
|
|
18
10
|
/**
|
|
19
|
-
*
|
|
11
|
+
* Дополнительный класс на корневой элемент.
|
|
20
12
|
*/
|
|
21
|
-
|
|
13
|
+
className?: string;
|
|
22
14
|
/**
|
|
23
15
|
* Набор цветов для компонента
|
|
24
16
|
*/
|
|
25
17
|
colors?: "default" | "inverted";
|
|
26
18
|
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Cостояние только для чтения
|
|
32
|
-
*/
|
|
33
|
-
readOnly?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Заполненное состояние
|
|
36
|
-
*/
|
|
37
|
-
filled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Выбранное (фокус) состояние
|
|
19
|
+
* Растягивать контент по горизонтали по ширине содержимого.
|
|
40
20
|
*/
|
|
41
|
-
|
|
21
|
+
horizontalAutoStretch?: boolean;
|
|
42
22
|
/**
|
|
43
|
-
*
|
|
23
|
+
* Название css свойства, которое устанавливается на контейнер при horizontalAutoStretch.
|
|
44
24
|
*/
|
|
45
|
-
|
|
25
|
+
widthPropName?: "minWidth" | "width" | "maxWidth";
|
|
46
26
|
/**
|
|
47
|
-
*
|
|
27
|
+
* Включает автоскрытие ползунка.
|
|
48
28
|
*/
|
|
49
|
-
|
|
29
|
+
autoHide?: boolean;
|
|
50
30
|
/**
|
|
51
|
-
*
|
|
31
|
+
* Время в мс, определяющее задержку до исчезновения полосы прокрутки (при включенной опции autoHide).
|
|
52
32
|
*/
|
|
53
|
-
|
|
33
|
+
autoHideTimeout?: number;
|
|
54
34
|
/**
|
|
55
|
-
*
|
|
35
|
+
* Принудительное отображение полосы прокрутки.
|
|
56
36
|
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Слот слева
|
|
60
|
-
*/
|
|
61
|
-
leftAddons?: ReactNode;
|
|
62
|
-
/**
|
|
63
|
-
* Слот справа
|
|
64
|
-
*/
|
|
65
|
-
rightAddons?: ReactNode;
|
|
66
|
-
/**
|
|
67
|
-
* Слот под полем
|
|
68
|
-
*/
|
|
69
|
-
bottomAddons?: ReactNode;
|
|
70
|
-
/**
|
|
71
|
-
* Дополнительный класс
|
|
72
|
-
*/
|
|
73
|
-
className?: string;
|
|
37
|
+
forceVisible?: boolean | "x" | "y";
|
|
74
38
|
/**
|
|
75
|
-
*
|
|
39
|
+
* Управление поведением клика по треку.
|
|
40
|
+
* Если true, то будет выполняться прокрутка к месту клика.
|
|
76
41
|
*/
|
|
77
|
-
|
|
42
|
+
clickOnTrack?: boolean;
|
|
78
43
|
/**
|
|
79
|
-
*
|
|
44
|
+
* HTML-aтрибуты на прокручиваемый узел.
|
|
80
45
|
*/
|
|
81
|
-
|
|
46
|
+
scrollableNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
82
47
|
/**
|
|
83
|
-
*
|
|
48
|
+
* HTML-aтрибуты на узел с контентом.
|
|
84
49
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
addonsClassName?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
92
|
-
*/
|
|
93
|
-
dataTestId?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Компонент поля (инпут, textarea и пр.)
|
|
96
|
-
*/
|
|
97
|
-
children?: ReactNode;
|
|
98
|
-
/**
|
|
99
|
-
* Основные стили компонента.
|
|
100
|
-
*/
|
|
101
|
-
styles: {
|
|
102
|
-
[key: string]: string;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Стили компонента для default и inverted режима.
|
|
106
|
-
*/
|
|
107
|
-
colorStyles?: StyleColors;
|
|
108
|
-
};
|
|
109
|
-
declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
110
|
-
block?: boolean | undefined;
|
|
111
|
-
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
112
|
-
colors?: "default" | "inverted" | undefined;
|
|
113
|
-
disabled?: boolean | undefined;
|
|
114
|
-
readOnly?: boolean | undefined;
|
|
115
|
-
filled?: boolean | undefined;
|
|
116
|
-
focused?: boolean | undefined;
|
|
117
|
-
error?: ReactNode | boolean;
|
|
118
|
-
hint?: ReactNode;
|
|
119
|
-
label?: ReactNode;
|
|
120
|
-
labelView?: "inner" | "outer" | undefined;
|
|
121
|
-
leftAddons?: ReactNode;
|
|
122
|
-
rightAddons?: ReactNode;
|
|
123
|
-
bottomAddons?: ReactNode;
|
|
50
|
+
contentNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
51
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
52
|
+
declare const Scrollbar: React.ForwardRefExoticComponent<{
|
|
53
|
+
children?: React.ReactNode;
|
|
124
54
|
className?: string | undefined;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
55
|
+
colors?: "default" | "inverted" | undefined;
|
|
56
|
+
horizontalAutoStretch?: boolean | undefined;
|
|
57
|
+
widthPropName?: "minWidth" | "width" | "maxWidth" | undefined;
|
|
58
|
+
autoHide?: boolean | undefined;
|
|
59
|
+
autoHideTimeout?: number | undefined;
|
|
60
|
+
forceVisible?: boolean | "x" | "y" | undefined;
|
|
61
|
+
clickOnTrack?: boolean | undefined;
|
|
62
|
+
scrollableNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
|
|
63
|
+
contentNodeProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
|
|
64
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare class SimpleBar {
|
|
66
|
+
static getRtlHelpers(): {
|
|
67
|
+
isRtlScrollingInverted: boolean;
|
|
68
|
+
isRtlScrollbarInverted: boolean;
|
|
69
|
+
};
|
|
70
|
+
static defaultOptions: {
|
|
71
|
+
autoHide: boolean;
|
|
72
|
+
forceVisible: boolean;
|
|
73
|
+
clickOnTrack: boolean;
|
|
74
|
+
clickOnTrackSpeed: number;
|
|
75
|
+
classNames: {
|
|
76
|
+
contentEl: string;
|
|
77
|
+
contentWrapper: string;
|
|
78
|
+
offset: string;
|
|
79
|
+
mask: string;
|
|
80
|
+
wrapper: string;
|
|
81
|
+
placeholder: string;
|
|
82
|
+
scrollbar: string;
|
|
83
|
+
track: string;
|
|
84
|
+
heightAutoObserverWrapperEl: string;
|
|
85
|
+
heightAutoObserverEl: string;
|
|
86
|
+
visible: string;
|
|
87
|
+
horizontal: string;
|
|
88
|
+
vertical: string;
|
|
89
|
+
hover: string;
|
|
90
|
+
dragging: string;
|
|
91
|
+
};
|
|
92
|
+
scrollbarMinSize: number;
|
|
93
|
+
scrollbarMaxSize: number;
|
|
94
|
+
timeout: number;
|
|
95
|
+
};
|
|
96
|
+
static getOffset(el: any): {
|
|
97
|
+
top: any;
|
|
98
|
+
left: any;
|
|
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;
|
|
133
208
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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 };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./component-
|
|
2
|
-
export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-
|
|
1
|
+
export * from "./component-1a4fbd11";
|
|
2
|
+
export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-b0ff398d";
|
|
3
3
|
export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
|
package/modern/index.js
CHANGED
|
@@ -14,4 +14,4 @@ import '@alfalab/core-components-input/modern';
|
|
|
14
14
|
import '@alfalab/core-components-select/modern/mobile';
|
|
15
15
|
import './autocomplete-mobile-field/Component.js';
|
|
16
16
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
17
|
-
import './mobile.module-
|
|
17
|
+
import './mobile.module-f3a5d2f8.js';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { ModalMobile } from "./Component.mobile-f1f15074";
|
|
4
4
|
import { UseSelectWithApplyProps } from "./hook-8abfea97";
|
|
5
5
|
import { BaseSelectProps } from "./typings-dd8ca091";
|
|
6
|
-
type SelectModalMobileProps = Omit<BaseSelectProps,
|
|
6
|
+
type SelectModalMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & {
|
|
7
7
|
/**
|
|
8
8
|
* Показывать кнопку очистки
|
|
9
9
|
*/
|
|
10
|
-
showClear?: UseSelectWithApplyProps[
|
|
10
|
+
showClear?: UseSelectWithApplyProps["showClear"];
|
|
11
11
|
/**
|
|
12
12
|
* Показывать пункт "Выбрать все"
|
|
13
13
|
*/
|
|
14
|
-
showSelectAll?: UseSelectWithApplyProps[
|
|
14
|
+
showSelectAll?: UseSelectWithApplyProps["showSelectAll"];
|
|
15
15
|
/**
|
|
16
16
|
* Дополнительные пропсы шапки модалки
|
|
17
17
|
*/
|
|
@@ -24,37 +24,24 @@ type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> &
|
|
|
24
24
|
* Дополнительные пропсы футера модалки
|
|
25
25
|
*/
|
|
26
26
|
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
27
|
-
|
|
27
|
+
/*
|
|
28
|
+
* Показывать пункт "Выбрать все" в заголовке списка
|
|
29
|
+
*/
|
|
30
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
|
|
28
31
|
/**
|
|
29
32
|
* Использовать ли хук useSelectWithApply
|
|
30
33
|
*/
|
|
31
34
|
useWithApplyHook?: boolean;
|
|
32
35
|
};
|
|
33
36
|
declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
showClear?: UseSelectWithApplyProps['showClear'];
|
|
38
|
-
/**
|
|
39
|
-
* Показывать пункт "Выбрать все"
|
|
40
|
-
*/
|
|
41
|
-
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
42
|
-
/**
|
|
43
|
-
* Дополнительные пропсы шапки модалки
|
|
44
|
-
*/
|
|
37
|
+
showClear?: UseSelectWithApplyProps["showClear"];
|
|
38
|
+
showSelectAll?: UseSelectWithApplyProps["showSelectAll"];
|
|
45
39
|
modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Дополнительные пропсы модалки
|
|
48
|
-
*/
|
|
49
40
|
modalProps?: Partial<import("./typings-bdb4c6b9").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Дополнительные пропсы футера модалки
|
|
52
|
-
*/
|
|
53
41
|
modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
|
|
54
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps[
|
|
55
|
-
/**
|
|
56
|
-
* Использовать ли хук useSelectWithApply
|
|
57
|
-
*/
|
|
42
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps["showHeaderWithSelectAll"];
|
|
58
43
|
useWithApplyHook?: boolean | undefined;
|
|
59
44
|
} & React.RefAttributes<unknown>>;
|
|
60
45
|
export { SelectModalMobileProps, SelectModalMobile };
|
|
46
|
+
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
47
|
+
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlMobileProps = Omit<BaseFormControlProps, "styles" | "colorStyles">;
|
|
5
|
+
declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FormControlMobileProps, FormControlMobile };
|
package/modern/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vh9c */
|
|
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_1j8pf {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_1j8pf {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_1j8pf > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/modern/mobile.js
CHANGED
|
@@ -10,4 +10,4 @@ import '@alfalab/core-components-select/modern/mobile';
|
|
|
10
10
|
import './autocomplete-mobile-field/Component.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
12
12
|
import '@alfalab/hooks';
|
|
13
|
-
import './mobile.module-
|
|
13
|
+
import './mobile.module-f3a5d2f8.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = {"bottomAddonInput":"input-
|
|
1
|
+
const styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_1j8pf","footer":"input-autocomplete__footer_1j8pf"};
|
|
2
2
|
require('./mobile.css')
|
|
3
3
|
|
|
4
4
|
export { styles as s };
|
|
@@ -1,64 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5
|
-
type useSelectWithLoadingProps = {
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
visibleOptions?: BaseSelectProps["visibleOptions"];
|
|
8
|
-
Option?: React.FC<OptionProps>;
|
|
9
|
-
};
|
|
10
|
-
declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
|
|
11
|
-
Option: (props: OptionProps) => React.JSX.Element;
|
|
12
|
-
options: OptionShape[];
|
|
13
|
-
} | null;
|
|
14
|
-
type OptionsFetcherResponse = {
|
|
15
|
-
options: OptionShape[];
|
|
16
|
-
hasMore: boolean;
|
|
17
|
-
};
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
19
|
-
type useLazyLoadingProps = {
|
|
20
|
-
/** Количество элементов на "странице" */
|
|
21
|
-
limit?: number;
|
|
22
|
-
/** Начальный номер "страницы" */
|
|
23
|
-
initialOffset?: number;
|
|
24
|
-
/** Скелетон загружаемых элементов */
|
|
25
|
-
skeleton?: React.ReactNode;
|
|
26
|
-
/** Компонент пункта меню */
|
|
27
|
-
Option?: React.FC<OptionProps>;
|
|
28
|
-
/**
|
|
29
|
-
* Функция-загрузчик опций.
|
|
30
|
-
* @param offset - текущая страница
|
|
31
|
-
* @param limit - количество элементов на странице
|
|
32
|
-
* @param queryString - строчные данные, пробрасываемые для поиска из кастомного инпута, расположенного в заголовке OptionsList
|
|
33
|
-
* @returns Promise<{
|
|
34
|
-
* options - список опций следующей "страницы". Они аппендятся к предыдущим
|
|
35
|
-
* hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
|
|
36
|
-
* }>
|
|
37
|
-
*/
|
|
38
|
-
optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
|
|
39
|
-
};
|
|
40
|
-
declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
|
|
41
|
-
optionsProps: {
|
|
42
|
-
Option: (props: OptionProps) => React.JSX.Element;
|
|
43
|
-
options: OptionShape[];
|
|
44
|
-
optionsListProps: {
|
|
45
|
-
ref: React.RefObject<HTMLDivElement>;
|
|
46
|
-
inputProps: {
|
|
47
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>, payload: {
|
|
48
|
-
value: string;
|
|
49
|
-
}) => void;
|
|
50
|
-
value: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
onOpen: (payload: {
|
|
54
|
-
open?: boolean;
|
|
55
|
-
}) => void;
|
|
56
|
-
};
|
|
57
|
-
reset: () => void;
|
|
58
|
-
};
|
|
59
1
|
export * from "./index-ebda875c";
|
|
2
|
+
export * from "./Component-1a4fbd11";
|
|
60
3
|
export * from "./Component-dd8ca091";
|
|
61
|
-
export
|
|
4
|
+
export * from "./hook-ebda875c";
|
|
62
5
|
export * from "./hook-8abfea97";
|
|
63
6
|
export * from "./typings-dd8ca091";
|
|
64
7
|
export * from "./utils-dd8ca091";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
3
|
+
import { HandledEvents } from 'react-swipeable/es/types';
|
|
3
4
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
4
5
|
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
5
6
|
import { NavigationBarProps } from "./index-c76d6398";
|
|
@@ -263,5 +264,9 @@ type BottomSheetProps = {
|
|
|
263
264
|
* Вызывается при изменении положения шторки
|
|
264
265
|
*/
|
|
265
266
|
onOffsetChange?: (offset: number, percent: number) => void;
|
|
267
|
+
/**
|
|
268
|
+
* Вызывается для событий touchend and mouseup.
|
|
269
|
+
*/
|
|
270
|
+
onTouchEnd?: (event: HandledEvents) => void;
|
|
266
271
|
};
|
|
267
272
|
export { BottomSheetTitleAlign, BottomSheetProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-input-autocomplete",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@alfalab/core-components-button": "^9.0.
|
|
37
|
+
"@alfalab/core-components-button": "^9.0.4",
|
|
38
38
|
"@alfalab/core-components-form-control": "^10.0.0",
|
|
39
|
-
"@alfalab/core-components-input": "^12.1.
|
|
40
|
-
"@alfalab/core-components-select": "^15.1.
|
|
39
|
+
"@alfalab/core-components-input": "^12.1.2",
|
|
40
|
+
"@alfalab/core-components-select": "^15.1.2",
|
|
41
41
|
"@alfalab/hooks": "^1.13.0",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"lodash.throttle": "^4.1.1",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
3
|
+
import { HandledEvents } from 'react-swipeable/es/types';
|
|
3
4
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
4
5
|
import { BaseModalProps } from "./index-bdb4c6b9";
|
|
5
6
|
import { NavigationBarProps } from "./index-c76d6398";
|
|
@@ -263,5 +264,9 @@ type BottomSheetProps = {
|
|
|
263
264
|
* Вызывается при изменении положения шторки
|
|
264
265
|
*/
|
|
265
266
|
onOffsetChange?: (offset: number, percent: number) => void;
|
|
267
|
+
/**
|
|
268
|
+
* Вызывается для событий touchend and mouseup.
|
|
269
|
+
*/
|
|
270
|
+
onTouchEnd?: (event: HandledEvents) => void;
|
|
266
271
|
};
|
|
267
272
|
export { BottomSheetTitleAlign, BottomSheetProps };
|