@commercetools-uikit/search-select-input 19.9.0 → 19.10.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.
|
@@ -132,7 +132,7 @@ SearchSelectInput.displayName = 'SearchSelectInput';
|
|
|
132
132
|
var SearchSelectInput$1 = SearchSelectInput;
|
|
133
133
|
|
|
134
134
|
// NOTE: This string will be replaced on build time with the package version.
|
|
135
|
-
var version = "19.
|
|
135
|
+
var version = "19.10.0";
|
|
136
136
|
|
|
137
137
|
exports["default"] = SearchSelectInput$1;
|
|
138
138
|
exports.version = version;
|
|
@@ -110,7 +110,7 @@ SearchSelectInput.displayName = 'SearchSelectInput';
|
|
|
110
110
|
var SearchSelectInput$1 = SearchSelectInput;
|
|
111
111
|
|
|
112
112
|
// NOTE: This string will be replaced on build time with the package version.
|
|
113
|
-
var version = "19.
|
|
113
|
+
var version = "19.10.0";
|
|
114
114
|
|
|
115
115
|
exports["default"] = SearchSelectInput$1;
|
|
116
116
|
exports.version = version;
|
|
@@ -113,6 +113,6 @@ SearchSelectInput.displayName = 'SearchSelectInput';
|
|
|
113
113
|
var SearchSelectInput$1 = SearchSelectInput;
|
|
114
114
|
|
|
115
115
|
// NOTE: This string will be replaced on build time with the package version.
|
|
116
|
-
var version = "19.
|
|
116
|
+
var version = "19.10.0";
|
|
117
117
|
|
|
118
118
|
export { SearchSelectInput$1 as default, version };
|
|
@@ -11,48 +11,237 @@ type TCustomEvent = {
|
|
|
11
11
|
persist: () => void;
|
|
12
12
|
};
|
|
13
13
|
export type TSearchSelectInputProps = {
|
|
14
|
+
/**
|
|
15
|
+
*Horizontal size limit of the input fields.
|
|
16
|
+
*/
|
|
14
17
|
horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
18
|
+
/**
|
|
19
|
+
* Aria label (for assistive tech)
|
|
20
|
+
* <br>
|
|
21
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
22
|
+
*/
|
|
15
23
|
'aria-label'?: ReactSelectAsyncProps['aria-label'];
|
|
24
|
+
/**
|
|
25
|
+
* HTML ID of an element that should be used as the label (for assistive tech)
|
|
26
|
+
* <br>
|
|
27
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
28
|
+
*/
|
|
16
29
|
'aria-labelledby'?: ReactSelectAsyncProps['aria-labelledby'];
|
|
30
|
+
/**
|
|
31
|
+
* Indicate if the value entered in the input is invalid.
|
|
32
|
+
* <br>
|
|
33
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
34
|
+
*/
|
|
17
35
|
'aria-invalid'?: ReactSelectAsyncProps['aria-invalid'];
|
|
36
|
+
/**
|
|
37
|
+
* HTML ID of an element containing an error message related to the input.
|
|
38
|
+
* <br>
|
|
39
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
40
|
+
*/
|
|
18
41
|
'aria-errormessage'?: ReactSelectAsyncProps['aria-errormessage'];
|
|
42
|
+
/**
|
|
43
|
+
* The id of the search input. This forwarded as react-select's "inputId"
|
|
44
|
+
* <br>
|
|
45
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
46
|
+
*/
|
|
19
47
|
id?: ReactSelectAsyncProps['inputId'];
|
|
48
|
+
/**
|
|
49
|
+
* The id to set on the SelectContainer component. This is forwarded as react-select's "id"
|
|
50
|
+
* <br>
|
|
51
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
52
|
+
*/
|
|
20
53
|
containerId?: ReactSelectAsyncProps['id'];
|
|
54
|
+
/**
|
|
55
|
+
* Name of the HTML Input (optional - without this, no input will be rendered)
|
|
56
|
+
* <br>
|
|
57
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
58
|
+
*/
|
|
21
59
|
name?: ReactSelectAsyncProps['name'];
|
|
60
|
+
/**
|
|
61
|
+
* Placeholder text for the select value
|
|
62
|
+
* <br>
|
|
63
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
64
|
+
*/
|
|
22
65
|
placeholder?: ReactSelectAsyncProps['placeholder'];
|
|
66
|
+
/**
|
|
67
|
+
* Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
|
|
68
|
+
* <br>
|
|
69
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
70
|
+
*/
|
|
23
71
|
components?: ReactSelectAsyncProps['components'];
|
|
72
|
+
/**
|
|
73
|
+
* Control whether the selected values should be rendered in the control
|
|
74
|
+
* <br>
|
|
75
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
76
|
+
*/
|
|
24
77
|
controlShouldRenderValue?: ReactSelectAsyncProps['controlShouldRenderValue'];
|
|
78
|
+
/**
|
|
79
|
+
* Sets the tabIndex attribute on the input
|
|
80
|
+
* <br>
|
|
81
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
82
|
+
*/
|
|
25
83
|
tabIndex?: ReactSelectAsyncProps['tabIndex'];
|
|
84
|
+
/**
|
|
85
|
+
* The value of the select; reflected by the selected option
|
|
86
|
+
* <br>
|
|
87
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
88
|
+
*/
|
|
26
89
|
value?: ReactSelectAsyncProps['value'];
|
|
90
|
+
/**
|
|
91
|
+
* Remove the currently focused option when the user presses backspace
|
|
92
|
+
* <br>
|
|
93
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
94
|
+
*/
|
|
27
95
|
backspaceRemovesValue?: ReactSelectAsyncProps['backspaceRemovesValue'];
|
|
96
|
+
/**
|
|
97
|
+
* Indicates the input field has an error
|
|
98
|
+
*/
|
|
28
99
|
hasError?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Indicates the input field has a warning
|
|
102
|
+
*/
|
|
29
103
|
hasWarning?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Is the select read-only
|
|
106
|
+
*/
|
|
30
107
|
isReadOnly?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Is the select disabled
|
|
110
|
+
*/
|
|
31
111
|
isDisabled?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Is the select value clearable
|
|
114
|
+
*/
|
|
32
115
|
isClearable?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Whether the input and options are rendered with condensed paddings
|
|
118
|
+
*/
|
|
33
119
|
isCondensed?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Override the built-in logic to detect whether an option is disabled
|
|
122
|
+
* <br>
|
|
123
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
124
|
+
*/
|
|
34
125
|
isOptionDisabled?: ReactSelectAsyncProps['isOptionDisabled'];
|
|
126
|
+
/**
|
|
127
|
+
* Support multiple selected options
|
|
128
|
+
* <br>
|
|
129
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
130
|
+
*/
|
|
35
131
|
isMulti?: ReactSelectAsyncProps['isMulti'];
|
|
132
|
+
/**
|
|
133
|
+
* Focus the control when it is mounted. Renamed autoFocus of react-select
|
|
134
|
+
*/
|
|
36
135
|
isAutofocussed?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with `{ inputValue: String }`. `inputValue` will be an empty string when no search text is present.
|
|
138
|
+
* <br>
|
|
139
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
140
|
+
*/
|
|
37
141
|
noOptionsMessage?: ReactSelectAsyncProps['noOptionsMessage'];
|
|
142
|
+
/**
|
|
143
|
+
* Can be used to enforce the select input to be opened
|
|
144
|
+
* <br>
|
|
145
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
146
|
+
*/
|
|
38
147
|
menuIsOpen?: ReactSelectAsyncProps['menuIsOpen'];
|
|
148
|
+
/**
|
|
149
|
+
* Maximum height of the menu before scrolling
|
|
150
|
+
* <br>
|
|
151
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
152
|
+
*/
|
|
39
153
|
maxMenuHeight?: ReactSelectAsyncProps['maxMenuHeight'];
|
|
154
|
+
/**
|
|
155
|
+
* Dom element to portal the select menu to
|
|
156
|
+
* <br>
|
|
157
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
158
|
+
*/
|
|
40
159
|
menuPortalTarget?: ReactSelectAsyncProps['menuPortalTarget'];
|
|
160
|
+
/**
|
|
161
|
+
* z-index value for the menu portal
|
|
162
|
+
* <br>
|
|
163
|
+
* Use in conjunction with `menuPortalTarget`
|
|
164
|
+
*/
|
|
41
165
|
menuPortalZIndex: number;
|
|
166
|
+
/**
|
|
167
|
+
* whether the menu should block scroll while open
|
|
168
|
+
* <br>
|
|
169
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
170
|
+
*/
|
|
42
171
|
menuShouldBlockScroll?: ReactSelectAsyncProps['menuShouldBlockScroll'];
|
|
172
|
+
/**
|
|
173
|
+
* Whether the menu should close after a value is selected. Defaults to `true`.
|
|
174
|
+
* <br>
|
|
175
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
176
|
+
*/
|
|
43
177
|
closeMenuOnSelect?: ReactSelectAsyncProps['closeMenuOnSelect'];
|
|
178
|
+
/**
|
|
179
|
+
* Determines if option groups will be separated by a divider
|
|
180
|
+
*/
|
|
44
181
|
showOptionGroupDivider?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* The default set of options to show before the user starts searching. When set to `true`, the results for `loadOptions('')` will be autoloaded.
|
|
184
|
+
* <br>
|
|
185
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
186
|
+
*/
|
|
45
187
|
defaultOptions?: ReactSelectAsyncProps['defaultOptions'];
|
|
188
|
+
/**
|
|
189
|
+
* Handle blur events on the control
|
|
190
|
+
*/
|
|
46
191
|
onBlur?: (event: TCustomEvent) => void;
|
|
192
|
+
/**
|
|
193
|
+
* Called with a fake event when value changes.
|
|
194
|
+
* <br />
|
|
195
|
+
* The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`.
|
|
196
|
+
*/
|
|
47
197
|
onChange?: (event: TCustomEvent, info: ActionMeta<unknown>) => void;
|
|
198
|
+
/**
|
|
199
|
+
* Handle focus events on the control
|
|
200
|
+
* <br>
|
|
201
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
202
|
+
*/
|
|
48
203
|
onFocus?: ReactSelectAsyncProps['onFocus'];
|
|
204
|
+
/**
|
|
205
|
+
* Handle change events on the input
|
|
206
|
+
* <br>
|
|
207
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
208
|
+
*/
|
|
49
209
|
onInputChange?: ReactSelectAsyncProps['onInputChange'];
|
|
210
|
+
/**
|
|
211
|
+
* Select the currently focused option when the user presses tab
|
|
212
|
+
* <br>
|
|
213
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
214
|
+
*/
|
|
50
215
|
tabSelectsValue?: ReactSelectAsyncProps['tabSelectsValue'];
|
|
216
|
+
/**
|
|
217
|
+
* Function that returns a promise, which is the set of options to be used once the promise resolves.
|
|
218
|
+
* <br>
|
|
219
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
220
|
+
*/
|
|
51
221
|
loadOptions: ReactSelectAsyncProps['loadOptions'];
|
|
222
|
+
/**
|
|
223
|
+
* The text shown while the options are being loaded
|
|
224
|
+
*/
|
|
52
225
|
loadingMessage?: string | (() => string);
|
|
226
|
+
/**
|
|
227
|
+
* If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
|
|
228
|
+
* <br>
|
|
229
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
230
|
+
*/
|
|
53
231
|
cacheOptions?: ReactSelectAsyncProps['cacheOptions'];
|
|
232
|
+
/**
|
|
233
|
+
* Custom method to filter whether an option should be displayed in the menu
|
|
234
|
+
* <br>
|
|
235
|
+
* [Props from React select was used](https://react-select.com/props)
|
|
236
|
+
*/
|
|
54
237
|
filterOption?: ReactSelectAsyncProps['filterOption'];
|
|
238
|
+
/**
|
|
239
|
+
* The style of the an option in the dropdown menu. It could be single lined option or an option with more and custom info
|
|
240
|
+
*/
|
|
55
241
|
optionType?: 'single-property' | 'double-property' | 'multiple-properties';
|
|
242
|
+
/**
|
|
243
|
+
* Icon to display on the left of the placeholder text and selected value. Has no effect when `isMulti` is enabled.
|
|
244
|
+
*/
|
|
56
245
|
iconLeft?: ReactNode;
|
|
57
246
|
};
|
|
58
247
|
declare const SearchSelectInput: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/search-select-input",
|
|
3
3
|
"description": "A search select input component built on top of `@commercetools-uikit/async-select-input` to asynchronously load results (options) using the keyword that the user has entered.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.10.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/async-select-input": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/select-utils": "19.
|
|
27
|
-
"@commercetools-uikit/spacings": "19.
|
|
28
|
-
"@commercetools-uikit/text": "19.
|
|
29
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/async-select-input": "19.10.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.10.0",
|
|
26
|
+
"@commercetools-uikit/select-utils": "19.10.0",
|
|
27
|
+
"@commercetools-uikit/spacings": "19.10.0",
|
|
28
|
+
"@commercetools-uikit/text": "19.10.0",
|
|
29
|
+
"@commercetools-uikit/utils": "19.10.0",
|
|
30
30
|
"@emotion/react": "^11.10.5",
|
|
31
31
|
"@emotion/styled": "^11.10.5",
|
|
32
32
|
"prop-types": "15.8.1"
|