@salutejs/sdds-serv 0.323.0-canary.2213.17494099813.0 → 0.323.0-canary.2213.17563910419.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Autocomplete/Autocomplete.d.ts +124 -117
- package/components/Autocomplete/Autocomplete.js +14 -1
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Combobox/Combobox.d.ts +24 -24
- package/components/Dropdown/Dropdown.d.ts +4 -4
- package/components/Select/Select.d.ts +12 -6
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +76 -4
- package/emotion/es/components/Autocomplete/Autocomplete.js +61 -2
- package/es/components/Autocomplete/Autocomplete.js +11 -3
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/package.json +3 -3
- package/styled-components/cjs/components/Autocomplete/Autocomplete.js +76 -4
- package/styled-components/es/components/Autocomplete/Autocomplete.js +61 -2
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
import { AutocompleteProps, DistributiveOmit, DistributivePick, SuggestionItemType } from '@salutejs/plasma-new-hope/styled-components';
|
2
|
+
import React, { ComponentProps } from 'react';
|
3
|
+
import { config } from './Autocomplete.config';
|
4
|
+
export declare const AutocompleteComponent: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
2
5
|
view: {
|
3
6
|
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
4
7
|
positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
@@ -33,33 +36,33 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
33
36
|
readOnly?: boolean;
|
34
37
|
disabled?: boolean;
|
35
38
|
portal?: string | React.RefObject<HTMLElement>;
|
36
|
-
zIndex?:
|
39
|
+
zIndex?: React.CSSProperties["zIndex"];
|
37
40
|
value?: string;
|
38
41
|
defaultValue?: string;
|
39
|
-
suggestions?:
|
42
|
+
suggestions?: SuggestionItemType[] | undefined;
|
40
43
|
threshold?: number;
|
41
|
-
filter?: (data:
|
42
|
-
onSuggestionSelect?: (data:
|
44
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
45
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
43
46
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
44
47
|
listMaxHeight?: string;
|
45
48
|
listWidth?: string;
|
46
|
-
renderList?: (data?:
|
47
|
-
renderListEnd?: () =>
|
48
|
-
renderItem?: (item:
|
49
|
-
beforeList?:
|
50
|
-
afterList?:
|
49
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
50
|
+
renderListEnd?: () => React.ReactNode;
|
51
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
52
|
+
beforeList?: React.ReactNode;
|
53
|
+
afterList?: React.ReactNode;
|
51
54
|
virtual?: boolean;
|
52
55
|
flip?: boolean;
|
53
56
|
size?: string;
|
54
57
|
view?: string;
|
55
58
|
} & Omit<{
|
56
|
-
titleCaption?:
|
57
|
-
leftHelper?:
|
59
|
+
titleCaption?: React.ReactNode;
|
60
|
+
leftHelper?: React.ReactNode;
|
58
61
|
contentLeft?: React.ReactElement;
|
59
62
|
contentRight?: React.ReactElement;
|
60
63
|
textBefore?: string;
|
61
64
|
textAfter?: string;
|
62
|
-
onSearch?: (value: string, event?:
|
65
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
63
66
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
64
67
|
clear?: boolean;
|
65
68
|
hasDivider?: boolean;
|
@@ -68,53 +71,53 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
68
71
|
hintTrigger?: "hover" | "click";
|
69
72
|
hintView?: string;
|
70
73
|
hintSize?: string;
|
71
|
-
hintTargetIcon?:
|
74
|
+
hintTargetIcon?: React.ReactNode;
|
72
75
|
hintTargetPlacement?: "inner" | "outer";
|
73
76
|
hintPlacement?: import("@salutejs/plasma-new-hope/styled-components").PopoverPlacement | Array<import("@salutejs/plasma-new-hope/styled-components").PopoverPlacementBasic>;
|
74
77
|
hintHasArrow?: boolean;
|
75
78
|
hintOffset?: [number, number];
|
76
79
|
hintWidth?: string;
|
77
|
-
hintContentLeft?:
|
80
|
+
hintContentLeft?: React.ReactNode;
|
78
81
|
} & {
|
79
82
|
chips?: never;
|
80
83
|
onChangeChips?: never;
|
81
84
|
enumerationType?: "plain";
|
82
|
-
onSearch?: (value: string, event?:
|
85
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
83
86
|
chipType?: never;
|
84
87
|
chipView?: never;
|
85
88
|
chipValidator?: never;
|
86
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
89
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
87
90
|
labelPlacement?: string;
|
88
91
|
readOnly?: boolean;
|
89
92
|
disabled?: boolean;
|
90
93
|
portal?: string | React.RefObject<HTMLElement>;
|
91
|
-
zIndex?:
|
94
|
+
zIndex?: React.CSSProperties["zIndex"];
|
92
95
|
value?: string;
|
93
96
|
defaultValue?: string;
|
94
|
-
suggestions?:
|
97
|
+
suggestions?: SuggestionItemType[] | undefined;
|
95
98
|
threshold?: number;
|
96
|
-
filter?: (data:
|
97
|
-
onSuggestionSelect?: (data:
|
99
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
100
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
98
101
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
99
102
|
listMaxHeight?: string;
|
100
103
|
listWidth?: string;
|
101
|
-
renderList?: (data?:
|
102
|
-
renderListEnd?: () =>
|
103
|
-
renderItem?: (item:
|
104
|
-
beforeList?:
|
105
|
-
afterList?:
|
104
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
105
|
+
renderListEnd?: () => React.ReactNode;
|
106
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
107
|
+
beforeList?: React.ReactNode;
|
108
|
+
afterList?: React.ReactNode;
|
106
109
|
virtual?: boolean;
|
107
110
|
flip?: boolean;
|
108
111
|
size?: string;
|
109
112
|
view?: string;
|
110
113
|
} & Omit<{
|
111
|
-
titleCaption?:
|
112
|
-
leftHelper?:
|
114
|
+
titleCaption?: React.ReactNode;
|
115
|
+
leftHelper?: React.ReactNode;
|
113
116
|
contentLeft?: React.ReactElement;
|
114
117
|
contentRight?: React.ReactElement;
|
115
118
|
textBefore?: string;
|
116
119
|
textAfter?: string;
|
117
|
-
onSearch?: (value: string, event?:
|
120
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
118
121
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
119
122
|
clear?: boolean;
|
120
123
|
hasDivider?: boolean;
|
@@ -123,13 +126,13 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
123
126
|
hintTrigger?: "hover" | "click";
|
124
127
|
hintView?: string;
|
125
128
|
hintSize?: string;
|
126
|
-
hintTargetIcon?:
|
129
|
+
hintTargetIcon?: React.ReactNode;
|
127
130
|
hintTargetPlacement?: "inner" | "outer";
|
128
131
|
hintPlacement?: import("@salutejs/plasma-new-hope/styled-components").PopoverPlacement | Array<import("@salutejs/plasma-new-hope/styled-components").PopoverPlacementBasic>;
|
129
132
|
hintHasArrow?: boolean;
|
130
133
|
hintOffset?: [number, number];
|
131
134
|
hintWidth?: string;
|
132
|
-
hintContentLeft?:
|
135
|
+
hintContentLeft?: React.ReactNode;
|
133
136
|
} & {
|
134
137
|
enumerationType: "chip";
|
135
138
|
onSearch?: never;
|
@@ -140,38 +143,38 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
140
143
|
chipValidator?: (value: string) => {
|
141
144
|
view?: string;
|
142
145
|
};
|
143
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
146
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
144
147
|
labelPlacement?: string;
|
145
148
|
readOnly?: boolean;
|
146
149
|
disabled?: boolean;
|
147
150
|
portal?: string | React.RefObject<HTMLElement>;
|
148
|
-
zIndex?:
|
151
|
+
zIndex?: React.CSSProperties["zIndex"];
|
149
152
|
value?: string;
|
150
153
|
defaultValue?: string;
|
151
|
-
suggestions?:
|
154
|
+
suggestions?: SuggestionItemType[] | undefined;
|
152
155
|
threshold?: number;
|
153
|
-
filter?: (data:
|
154
|
-
onSuggestionSelect?: (data:
|
156
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
157
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
155
158
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
156
159
|
listMaxHeight?: string;
|
157
160
|
listWidth?: string;
|
158
|
-
renderList?: (data?:
|
159
|
-
renderListEnd?: () =>
|
160
|
-
renderItem?: (item:
|
161
|
-
beforeList?:
|
162
|
-
afterList?:
|
161
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
162
|
+
renderListEnd?: () => React.ReactNode;
|
163
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
164
|
+
beforeList?: React.ReactNode;
|
165
|
+
afterList?: React.ReactNode;
|
163
166
|
virtual?: boolean;
|
164
167
|
flip?: boolean;
|
165
168
|
size?: string;
|
166
169
|
view?: string;
|
167
170
|
} & Omit<{
|
168
|
-
titleCaption?:
|
169
|
-
leftHelper?:
|
171
|
+
titleCaption?: React.ReactNode;
|
172
|
+
leftHelper?: React.ReactNode;
|
170
173
|
contentLeft?: React.ReactElement;
|
171
174
|
contentRight?: React.ReactElement;
|
172
175
|
textBefore?: string;
|
173
176
|
textAfter?: string;
|
174
|
-
onSearch?: (value: string, event?:
|
177
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
175
178
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
176
179
|
clear?: boolean;
|
177
180
|
hasDivider?: boolean;
|
@@ -191,42 +194,42 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
191
194
|
chips?: never;
|
192
195
|
onChangeChips?: never;
|
193
196
|
enumerationType?: "plain";
|
194
|
-
onSearch?: (value: string, event?:
|
197
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
195
198
|
chipType?: never;
|
196
199
|
chipView?: never;
|
197
200
|
chipValidator?: never;
|
198
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
201
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
199
202
|
labelPlacement?: string;
|
200
203
|
readOnly?: boolean;
|
201
204
|
disabled?: boolean;
|
202
205
|
portal?: string | React.RefObject<HTMLElement>;
|
203
|
-
zIndex?:
|
206
|
+
zIndex?: React.CSSProperties["zIndex"];
|
204
207
|
value?: string;
|
205
208
|
defaultValue?: string;
|
206
|
-
suggestions?:
|
209
|
+
suggestions?: SuggestionItemType[] | undefined;
|
207
210
|
threshold?: number;
|
208
|
-
filter?: (data:
|
209
|
-
onSuggestionSelect?: (data:
|
211
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
212
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
210
213
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
211
214
|
listMaxHeight?: string;
|
212
215
|
listWidth?: string;
|
213
|
-
renderList?: (data?:
|
214
|
-
renderListEnd?: () =>
|
215
|
-
renderItem?: (item:
|
216
|
-
beforeList?:
|
217
|
-
afterList?:
|
216
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
217
|
+
renderListEnd?: () => React.ReactNode;
|
218
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
219
|
+
beforeList?: React.ReactNode;
|
220
|
+
afterList?: React.ReactNode;
|
218
221
|
virtual?: boolean;
|
219
222
|
flip?: boolean;
|
220
223
|
size?: string;
|
221
224
|
view?: string;
|
222
225
|
} & Omit<{
|
223
|
-
titleCaption?:
|
224
|
-
leftHelper?:
|
226
|
+
titleCaption?: React.ReactNode;
|
227
|
+
leftHelper?: React.ReactNode;
|
225
228
|
contentLeft?: React.ReactElement;
|
226
229
|
contentRight?: React.ReactElement;
|
227
230
|
textBefore?: string;
|
228
231
|
textAfter?: string;
|
229
|
-
onSearch?: (value: string, event?:
|
232
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
230
233
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
231
234
|
clear?: boolean;
|
232
235
|
hasDivider?: boolean;
|
@@ -252,38 +255,38 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
252
255
|
chipValidator?: (value: string) => {
|
253
256
|
view?: string;
|
254
257
|
};
|
255
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
258
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
256
259
|
labelPlacement?: string;
|
257
260
|
readOnly?: boolean;
|
258
261
|
disabled?: boolean;
|
259
262
|
portal?: string | React.RefObject<HTMLElement>;
|
260
|
-
zIndex?:
|
263
|
+
zIndex?: React.CSSProperties["zIndex"];
|
261
264
|
value?: string;
|
262
265
|
defaultValue?: string;
|
263
|
-
suggestions?:
|
266
|
+
suggestions?: SuggestionItemType[] | undefined;
|
264
267
|
threshold?: number;
|
265
|
-
filter?: (data:
|
266
|
-
onSuggestionSelect?: (data:
|
268
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
269
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
267
270
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
268
271
|
listMaxHeight?: string;
|
269
272
|
listWidth?: string;
|
270
|
-
renderList?: (data?:
|
271
|
-
renderListEnd?: () =>
|
272
|
-
renderItem?: (item:
|
273
|
-
beforeList?:
|
274
|
-
afterList?:
|
273
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
274
|
+
renderListEnd?: () => React.ReactNode;
|
275
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
276
|
+
beforeList?: React.ReactNode;
|
277
|
+
afterList?: React.ReactNode;
|
275
278
|
virtual?: boolean;
|
276
279
|
flip?: boolean;
|
277
280
|
size?: string;
|
278
281
|
view?: string;
|
279
282
|
} & Omit<{
|
280
|
-
titleCaption?:
|
281
|
-
leftHelper?:
|
283
|
+
titleCaption?: React.ReactNode;
|
284
|
+
leftHelper?: React.ReactNode;
|
282
285
|
contentLeft?: React.ReactElement;
|
283
286
|
contentRight?: React.ReactElement;
|
284
287
|
textBefore?: string;
|
285
288
|
textAfter?: string;
|
286
|
-
onSearch?: (value: string, event?:
|
289
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
287
290
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
288
291
|
clear?: false;
|
289
292
|
hasDivider?: never;
|
@@ -292,53 +295,53 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
292
295
|
hintTrigger?: "hover" | "click";
|
293
296
|
hintView?: string;
|
294
297
|
hintSize?: string;
|
295
|
-
hintTargetIcon?:
|
298
|
+
hintTargetIcon?: React.ReactNode;
|
296
299
|
hintTargetPlacement?: "inner" | "outer";
|
297
300
|
hintPlacement?: import("@salutejs/plasma-new-hope/styled-components").PopoverPlacement | Array<import("@salutejs/plasma-new-hope/styled-components").PopoverPlacementBasic>;
|
298
301
|
hintHasArrow?: boolean;
|
299
302
|
hintOffset?: [number, number];
|
300
303
|
hintWidth?: string;
|
301
|
-
hintContentLeft?:
|
304
|
+
hintContentLeft?: React.ReactNode;
|
302
305
|
} & {
|
303
306
|
chips?: never;
|
304
307
|
onChangeChips?: never;
|
305
308
|
enumerationType?: "plain";
|
306
|
-
onSearch?: (value: string, event?:
|
309
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
307
310
|
chipType?: never;
|
308
311
|
chipView?: never;
|
309
312
|
chipValidator?: never;
|
310
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
313
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
311
314
|
labelPlacement?: string;
|
312
315
|
readOnly?: boolean;
|
313
316
|
disabled?: boolean;
|
314
317
|
portal?: string | React.RefObject<HTMLElement>;
|
315
|
-
zIndex?:
|
318
|
+
zIndex?: React.CSSProperties["zIndex"];
|
316
319
|
value?: string;
|
317
320
|
defaultValue?: string;
|
318
|
-
suggestions?:
|
321
|
+
suggestions?: SuggestionItemType[] | undefined;
|
319
322
|
threshold?: number;
|
320
|
-
filter?: (data:
|
321
|
-
onSuggestionSelect?: (data:
|
323
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
324
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
322
325
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
323
326
|
listMaxHeight?: string;
|
324
327
|
listWidth?: string;
|
325
|
-
renderList?: (data?:
|
326
|
-
renderListEnd?: () =>
|
327
|
-
renderItem?: (item:
|
328
|
-
beforeList?:
|
329
|
-
afterList?:
|
328
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
329
|
+
renderListEnd?: () => React.ReactNode;
|
330
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
331
|
+
beforeList?: React.ReactNode;
|
332
|
+
afterList?: React.ReactNode;
|
330
333
|
virtual?: boolean;
|
331
334
|
flip?: boolean;
|
332
335
|
size?: string;
|
333
336
|
view?: string;
|
334
337
|
} & Omit<{
|
335
|
-
titleCaption?:
|
336
|
-
leftHelper?:
|
338
|
+
titleCaption?: React.ReactNode;
|
339
|
+
leftHelper?: React.ReactNode;
|
337
340
|
contentLeft?: React.ReactElement;
|
338
341
|
contentRight?: React.ReactElement;
|
339
342
|
textBefore?: string;
|
340
343
|
textAfter?: string;
|
341
|
-
onSearch?: (value: string, event?:
|
344
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
342
345
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
343
346
|
clear?: false;
|
344
347
|
hasDivider?: never;
|
@@ -347,13 +350,13 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
347
350
|
hintTrigger?: "hover" | "click";
|
348
351
|
hintView?: string;
|
349
352
|
hintSize?: string;
|
350
|
-
hintTargetIcon?:
|
353
|
+
hintTargetIcon?: React.ReactNode;
|
351
354
|
hintTargetPlacement?: "inner" | "outer";
|
352
355
|
hintPlacement?: import("@salutejs/plasma-new-hope/styled-components").PopoverPlacement | Array<import("@salutejs/plasma-new-hope/styled-components").PopoverPlacementBasic>;
|
353
356
|
hintHasArrow?: boolean;
|
354
357
|
hintOffset?: [number, number];
|
355
358
|
hintWidth?: string;
|
356
|
-
hintContentLeft?:
|
359
|
+
hintContentLeft?: React.ReactNode;
|
357
360
|
} & {
|
358
361
|
enumerationType: "chip";
|
359
362
|
onSearch?: never;
|
@@ -364,38 +367,38 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
364
367
|
chipValidator?: (value: string) => {
|
365
368
|
view?: string;
|
366
369
|
};
|
367
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
370
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
368
371
|
labelPlacement?: string;
|
369
372
|
readOnly?: boolean;
|
370
373
|
disabled?: boolean;
|
371
374
|
portal?: string | React.RefObject<HTMLElement>;
|
372
|
-
zIndex?:
|
375
|
+
zIndex?: React.CSSProperties["zIndex"];
|
373
376
|
value?: string;
|
374
377
|
defaultValue?: string;
|
375
|
-
suggestions?:
|
378
|
+
suggestions?: SuggestionItemType[] | undefined;
|
376
379
|
threshold?: number;
|
377
|
-
filter?: (data:
|
378
|
-
onSuggestionSelect?: (data:
|
380
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
381
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
379
382
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
380
383
|
listMaxHeight?: string;
|
381
384
|
listWidth?: string;
|
382
|
-
renderList?: (data?:
|
383
|
-
renderListEnd?: () =>
|
384
|
-
renderItem?: (item:
|
385
|
-
beforeList?:
|
386
|
-
afterList?:
|
385
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
386
|
+
renderListEnd?: () => React.ReactNode;
|
387
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
388
|
+
beforeList?: React.ReactNode;
|
389
|
+
afterList?: React.ReactNode;
|
387
390
|
virtual?: boolean;
|
388
391
|
flip?: boolean;
|
389
392
|
size?: string;
|
390
393
|
view?: string;
|
391
394
|
} & Omit<{
|
392
|
-
titleCaption?:
|
393
|
-
leftHelper?:
|
395
|
+
titleCaption?: React.ReactNode;
|
396
|
+
leftHelper?: React.ReactNode;
|
394
397
|
contentLeft?: React.ReactElement;
|
395
398
|
contentRight?: React.ReactElement;
|
396
399
|
textBefore?: string;
|
397
400
|
textAfter?: string;
|
398
|
-
onSearch?: (value: string, event?:
|
401
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
399
402
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
400
403
|
clear?: false;
|
401
404
|
hasDivider?: never;
|
@@ -415,42 +418,42 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
415
418
|
chips?: never;
|
416
419
|
onChangeChips?: never;
|
417
420
|
enumerationType?: "plain";
|
418
|
-
onSearch?: (value: string, event?:
|
421
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
419
422
|
chipType?: never;
|
420
423
|
chipView?: never;
|
421
424
|
chipValidator?: never;
|
422
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
425
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
|
423
426
|
labelPlacement?: string;
|
424
427
|
readOnly?: boolean;
|
425
428
|
disabled?: boolean;
|
426
429
|
portal?: string | React.RefObject<HTMLElement>;
|
427
|
-
zIndex?:
|
430
|
+
zIndex?: React.CSSProperties["zIndex"];
|
428
431
|
value?: string;
|
429
432
|
defaultValue?: string;
|
430
|
-
suggestions?:
|
433
|
+
suggestions?: SuggestionItemType[] | undefined;
|
431
434
|
threshold?: number;
|
432
|
-
filter?: (data:
|
433
|
-
onSuggestionSelect?: (data:
|
435
|
+
filter?: ((data: SuggestionItemType) => boolean) | undefined;
|
436
|
+
onSuggestionSelect?: ((data: SuggestionItemType) => void) | undefined;
|
434
437
|
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
435
438
|
listMaxHeight?: string;
|
436
439
|
listWidth?: string;
|
437
|
-
renderList?: (data?:
|
438
|
-
renderListEnd?: () =>
|
439
|
-
renderItem?: (item:
|
440
|
-
beforeList?:
|
441
|
-
afterList?:
|
440
|
+
renderList?: ((data?: SuggestionItemType[] | undefined) => React.ReactNode) | undefined;
|
441
|
+
renderListEnd?: () => React.ReactNode;
|
442
|
+
renderItem?: ((item: SuggestionItemType) => React.ReactNode) | undefined;
|
443
|
+
beforeList?: React.ReactNode;
|
444
|
+
afterList?: React.ReactNode;
|
442
445
|
virtual?: boolean;
|
443
446
|
flip?: boolean;
|
444
447
|
size?: string;
|
445
448
|
view?: string;
|
446
449
|
} & Omit<{
|
447
|
-
titleCaption?:
|
448
|
-
leftHelper?:
|
450
|
+
titleCaption?: React.ReactNode;
|
451
|
+
leftHelper?: React.ReactNode;
|
449
452
|
contentLeft?: React.ReactElement;
|
450
453
|
contentRight?: React.ReactElement;
|
451
454
|
textBefore?: string;
|
452
455
|
textAfter?: string;
|
453
|
-
onSearch?: (value: string, event?:
|
456
|
+
onSearch?: (value: string, event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
454
457
|
} & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").LabelProps & import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").RequiredProps & {
|
455
458
|
clear?: false;
|
456
459
|
hasDivider?: never;
|
@@ -476,4 +479,8 @@ export declare const Autocomplete: import("react").FunctionComponent<import("@sa
|
|
476
479
|
chipValidator?: (value: string) => {
|
477
480
|
view?: string;
|
478
481
|
};
|
479
|
-
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<
|
482
|
+
}, "labelPlacement" | "chipView" | "chips" | "onChangeChips" | "enumerationType" | "chipType" | "chipValidator"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "defaultValue" | "value" | "required"> & React.RefAttributes<HTMLInputElement>))>;
|
483
|
+
type PropsFromConfig = keyof typeof config['variations'];
|
484
|
+
type Props<T extends SuggestionItemType> = DistributiveOmit<AutocompleteProps<T>, PropsFromConfig> & DistributivePick<ComponentProps<typeof AutocompleteComponent>, PropsFromConfig>;
|
485
|
+
export declare const Autocomplete: <T extends SuggestionItemType>(props: Props<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
|
486
|
+
export {};
|
@@ -2,11 +2,24 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
5
6
|
var plasmaNewHope = require('@salutejs/plasma-new-hope');
|
7
|
+
var React = require('react');
|
6
8
|
var Autocomplete_config = require('./Autocomplete.config.js');
|
7
9
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
11
|
+
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
13
|
+
|
8
14
|
var mergedConfig = /*#__PURE__*/plasmaNewHope.mergeConfig(plasmaNewHope.autocompleteConfig, Autocomplete_config.config);
|
9
|
-
var
|
15
|
+
var AutocompleteComponent = /*#__PURE__*/plasmaNewHope.component(mergedConfig);
|
16
|
+
var AutocompleteWithoutRef = function AutocompleteWithoutRef(props, ref) {
|
17
|
+
return /*#__PURE__*/React__default.default.createElement(AutocompleteComponent, _rollupPluginBabelHelpers.extends({}, props, {
|
18
|
+
ref: ref
|
19
|
+
}));
|
20
|
+
};
|
21
|
+
var Autocomplete = /*#__PURE__*/plasmaNewHope.fixedForwardRef(AutocompleteWithoutRef);
|
10
22
|
|
11
23
|
exports.Autocomplete = Autocomplete;
|
24
|
+
exports.AutocompleteComponent = AutocompleteComponent;
|
12
25
|
//# sourceMappingURL=Autocomplete.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","sources":["../../src-css/components/Autocomplete/Autocomplete.
|
1
|
+
{"version":3,"file":"Autocomplete.js","sources":["../../src-css/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import {\n autocompleteConfig,\n AutocompleteProps,\n component,\n DistributiveOmit,\n DistributivePick,\n mergeConfig,\n SuggestionItemType,\n fixedForwardRef,\n} from '@salutejs/plasma-new-hope';\nimport React, { ComponentProps } from 'react';\n\nimport { config } from './Autocomplete.config';\n\nconst mergedConfig = mergeConfig(autocompleteConfig, config);\nexport const AutocompleteComponent = component(mergedConfig);\n\ntype PropsFromConfig = keyof typeof config['variations'];\n\ntype Props<T extends SuggestionItemType> = DistributiveOmit<AutocompleteProps<T>, PropsFromConfig> &\n DistributivePick<ComponentProps<typeof AutocompleteComponent>, PropsFromConfig>;\n\nconst AutocompleteWithoutRef = <T extends SuggestionItemType>(\n props: Props<T>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) => {\n return <AutocompleteComponent {...(props as any)} ref={ref} />;\n};\n\nexport const Autocomplete = fixedForwardRef(AutocompleteWithoutRef);\n"],"names":["mergedConfig","mergeConfig","autocompleteConfig","config","AutocompleteComponent","component","AutocompleteWithoutRef","props","ref","React","createElement","_extends","Autocomplete","fixedForwardRef"],"mappings":";;;;;;;;;;;;;AAcA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,gCAAkB,EAAEC,0BAAM,CAAC,CAAA;IAC/CC,qBAAqB,gBAAGC,uBAAS,CAACL,YAAY,EAAC;AAO5D,IAAMM,sBAAsB,GAAG,SAAzBA,sBAAsBA,CACxBC,KAAe,EACfC,GAAyC,EACxC;EACD,oBAAOC,sBAAA,CAAAC,aAAA,CAACN,qBAAqB,EAAAO,iCAAA,KAAMJ,KAAK,EAAA;AAAUC,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,CAAE,CAAC,CAAA;AAClE,CAAC,CAAA;IAEYI,YAAY,gBAAGC,6BAAe,CAACP,sBAAsB;;;;;"}
|