@commercetools-uikit/select-input 15.14.0 → 15.14.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/README.md +41 -40
- package/dist/commercetools-uikit-select-input.cjs.dev.js +3 -2
- package/dist/commercetools-uikit-select-input.cjs.prod.js +3 -2
- package/dist/commercetools-uikit-select-input.esm.js +3 -2
- package/dist/declarations/src/export-types.d.ts +1 -3
- package/dist/declarations/src/select-input.d.ts +1 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -58,46 +58,47 @@ export default Example;
|
|
|
58
58
|
|
|
59
59
|
## Properties
|
|
60
60
|
|
|
61
|
-
| Props
|
|
62
|
-
|
|
|
63
|
-
| `horizontalConstraint`
|
|
64
|
-
| `hasError`
|
|
65
|
-
| `isReadOnly`
|
|
66
|
-
| `hasWarning`
|
|
67
|
-
| `iconLeft`
|
|
68
|
-
| `aria-label`
|
|
69
|
-
| `aria-labelledby`
|
|
70
|
-
| `aria-invalid`
|
|
71
|
-
| `aria-errormessage`
|
|
72
|
-
| `isAutofocussed`
|
|
73
|
-
| `backspaceRemovesValue`
|
|
74
|
-
| `components`
|
|
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
|
-
| `
|
|
61
|
+
| Props | Type | Required | Default | Description |
|
|
62
|
+
| -------------------------- | ----------------------------------------------------------------------------------------------------- | :------: | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | | |
|
|
64
|
+
| `hasError` | `boolean` | | | Indicates that input has errors |
|
|
65
|
+
| `isReadOnly` | `boolean` | | | Is the select read-only |
|
|
66
|
+
| `hasWarning` | `boolean` | | | Control to indicate on the input if there are selected values that are potentially invalid |
|
|
67
|
+
| `iconLeft` | `ReactNode` | | | Icon to display on the left of the placeholder text and selected value. Has no effect when isMulti is enabled. |
|
|
68
|
+
| `aria-label` | `ReactSelectProps['aria-label']` | | | Aria label (for assistive tech)
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
69
|
+
| `aria-labelledby` | `ReactSelectProps['aria-labelledby']` | | | HTML ID of an element that should be used as the label (for assistive tech)
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
70
|
+
| `aria-invalid` | `ReactSelectProps['aria-invalid']` | | | Indicate if the value entered in the input is invalid.
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
71
|
+
| `aria-errormessage` | `ReactSelectProps['aria-errormessage']` | | | HTML ID of an element containing an error message related to the input.
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
72
|
+
| `isAutofocussed` | `boolean` | | | Focus the control when it is mounted |
|
|
73
|
+
| `backspaceRemovesValue` | `ReactSelectProps['backspaceRemovesValue']` | | | Remove the currently focused option when the user presses backspace
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
74
|
+
| `components` | `ReactSelectProps['components']` | | | Map of components to overwrite the default ones, see what components you can override
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
75
|
+
| `controlShouldRenderValue` | `ReactSelectProps['controlShouldRenderValue']` | | | Control whether the selected values should be rendered in the control
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
76
|
+
| `filterOption` | `ReactSelectProps['filterOption']` | | | Custom method to filter whether an option should be displayed in the menu
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
77
|
+
| `id` | `ReactSelectProps['inputId']` | | | Used as HTML id property. An id is generated automatically when not provided.
This forwarded as react-select's "inputId"
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
78
|
+
| `inputValue` | `ReactSelectProps['inputValue']` | | | The value of the search input
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
79
|
+
| `containerId` | `ReactSelectProps['id']` | | | The id to set on the SelectContainer component
This is forwarded as react-select's "id"
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
80
|
+
| `isClearable` | `ReactSelectProps['isClearable']` | | | Is the select value clearable
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
81
|
+
| `isDisabled` | `ReactSelectProps['isDisabled']` | | | Is the select disabled
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
82
|
+
| `isOptionDisabled` | `ReactSelectProps['isOptionDisabled']` | | | Override the built-in logic to detect whether an option is disabled
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
83
|
+
| `isMulti` | `ReactSelectProps['isMulti']` | | | Support multiple selected options
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
84
|
+
| `isSearchable` | `ReactSelectProps['isSearchable']` | | | Whether to enable search functionality
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
85
|
+
| `maxMenuHeight` | `ReactSelectProps['maxMenuHeight']` | | `220` | Maximum height of the menu before scrolling
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
86
|
+
| `menuPortalTarget` | `ReactSelectProps['menuPortalTarget']` | | | Dom element to portal the select menu to
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
87
|
+
| `menuPortalZIndex` | `number` | | `1` | z-index value for the menu portal |
|
|
88
|
+
| `menuShouldBlockScroll` | `ReactSelectProps['menuShouldBlockScroll']` | | | whether the menu should block scroll while open
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
89
|
+
| `closeMenuOnSelect` | `ReactSelectProps['closeMenuOnSelect']` | | | Whether the menu should close after a value is selected. Defaults to `true`.
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
90
|
+
| `name` | `ReactSelectProps['name']` | | | Name of the HTML Input (optional - without this, no input will be rendered)
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
91
|
+
| `noOptionsMessage` | `ReactSelectProps['noOptionsMessage']` | | | 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 }.
<br />
`inputValue` will be an empty string when no search text is present.
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
92
|
+
| `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Handle blur events on the control |
|
|
93
|
+
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | | | Called with a fake event when value changes. The event's target.name will be the name supplied in props. The event's target.value will hold the value.
<br/>
The value will be the selected option, or an array of options in case isMulti is true. |
|
|
94
|
+
| `onFocus` | `ReactSelectProps['onFocus']` | | | Handle focus events on the control
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
95
|
+
| `onInputChange` | `ReactSelectProps['onInputChange']` | | | Handle change events on the input
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
96
|
+
| `options` | `union`<br/>Possible values:<br/>`TOption[] , TOptionObject[]` | | | Array of options that populate the select menu |
|
|
97
|
+
| `showOptionGroupDivider` | `boolean` | | | |
|
|
98
|
+
| `placeholder` | `ReactSelectProps['placeholder']` | | | Placeholder text for the select value
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
99
|
+
| `tabIndex` | `ReactSelectProps['tabIndex']` | | | Sets the tabIndex attribute on the input
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
100
|
+
| `tabSelectsValue` | `ReactSelectProps['tabSelectsValue']` | | | Select the currently focused option when the user presses tab
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
101
|
+
| `value` | `ReactSelectProps['value']` | | | The value of the select; reflected by the selected option
<br>
[Props from React select was used](https://react-select.com/props) |
|
|
101
102
|
|
|
102
103
|
## Signatures
|
|
103
104
|
|
|
@@ -194,7 +194,8 @@ var SelectInput = function SelectInput(props) {
|
|
|
194
194
|
tabIndex: props.tabIndex,
|
|
195
195
|
tabSelectsValue: props.tabSelectsValue,
|
|
196
196
|
value: selectedOptions,
|
|
197
|
-
iconLeft: props.iconLeft
|
|
197
|
+
iconLeft: props.iconLeft,
|
|
198
|
+
controlShouldRenderValue: props.controlShouldRenderValue
|
|
198
199
|
})
|
|
199
200
|
}))
|
|
200
201
|
});
|
|
@@ -264,7 +265,7 @@ SelectInput.ValueContainer = Select.components.ValueContainer;
|
|
|
264
265
|
var SelectInput$1 = SelectInput;
|
|
265
266
|
|
|
266
267
|
// NOTE: This string will be replaced on build time with the package version.
|
|
267
|
-
var version = "15.14.
|
|
268
|
+
var version = "15.14.2";
|
|
268
269
|
|
|
269
270
|
exports["default"] = SelectInput$1;
|
|
270
271
|
exports.version = version;
|
|
@@ -193,7 +193,8 @@ var SelectInput = function SelectInput(props) {
|
|
|
193
193
|
tabIndex: props.tabIndex,
|
|
194
194
|
tabSelectsValue: props.tabSelectsValue,
|
|
195
195
|
value: selectedOptions,
|
|
196
|
-
iconLeft: props.iconLeft
|
|
196
|
+
iconLeft: props.iconLeft,
|
|
197
|
+
controlShouldRenderValue: props.controlShouldRenderValue
|
|
197
198
|
})
|
|
198
199
|
}))
|
|
199
200
|
});
|
|
@@ -243,7 +244,7 @@ SelectInput.ValueContainer = Select.components.ValueContainer;
|
|
|
243
244
|
var SelectInput$1 = SelectInput;
|
|
244
245
|
|
|
245
246
|
// NOTE: This string will be replaced on build time with the package version.
|
|
246
|
-
var version = "15.14.
|
|
247
|
+
var version = "15.14.2";
|
|
247
248
|
|
|
248
249
|
exports["default"] = SelectInput$1;
|
|
249
250
|
exports.version = version;
|
|
@@ -171,7 +171,8 @@ var SelectInput = function SelectInput(props) {
|
|
|
171
171
|
tabIndex: props.tabIndex,
|
|
172
172
|
tabSelectsValue: props.tabSelectsValue,
|
|
173
173
|
value: selectedOptions,
|
|
174
|
-
iconLeft: props.iconLeft
|
|
174
|
+
iconLeft: props.iconLeft,
|
|
175
|
+
controlShouldRenderValue: props.controlShouldRenderValue
|
|
175
176
|
})
|
|
176
177
|
}))
|
|
177
178
|
});
|
|
@@ -241,6 +242,6 @@ SelectInput.ValueContainer = components.ValueContainer;
|
|
|
241
242
|
var SelectInput$1 = SelectInput;
|
|
242
243
|
|
|
243
244
|
// NOTE: This string will be replaced on build time with the package version.
|
|
244
|
-
var version = "15.14.
|
|
245
|
+
var version = "15.14.2";
|
|
245
246
|
|
|
246
247
|
export { SelectInput$1 as default, version };
|
|
@@ -29,6 +29,7 @@ export type TSelectInputProps = {
|
|
|
29
29
|
isAutofocussed?: boolean;
|
|
30
30
|
backspaceRemovesValue?: ReactSelectProps['backspaceRemovesValue'];
|
|
31
31
|
components?: ReactSelectProps['components'];
|
|
32
|
+
controlShouldRenderValue?: ReactSelectProps['controlShouldRenderValue'];
|
|
32
33
|
filterOption?: ReactSelectProps['filterOption'];
|
|
33
34
|
id?: ReactSelectProps['inputId'];
|
|
34
35
|
inputValue?: ReactSelectProps['inputValue'];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/select-input",
|
|
3
3
|
"description": "An input component getting a selection from the user.",
|
|
4
|
-
"version": "15.14.
|
|
4
|
+
"version": "15.14.2",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "15.14.
|
|
25
|
-
"@commercetools-uikit/design-system": "15.14.
|
|
26
|
-
"@commercetools-uikit/icons": "15.14.
|
|
27
|
-
"@commercetools-uikit/select-utils": "15.14.
|
|
28
|
-
"@commercetools-uikit/utils": "15.14.
|
|
24
|
+
"@commercetools-uikit/constraints": "15.14.2",
|
|
25
|
+
"@commercetools-uikit/design-system": "15.14.2",
|
|
26
|
+
"@commercetools-uikit/icons": "15.14.2",
|
|
27
|
+
"@commercetools-uikit/select-utils": "15.14.2",
|
|
28
|
+
"@commercetools-uikit/utils": "15.14.2",
|
|
29
29
|
"@emotion/is-prop-valid": "1.2.0",
|
|
30
30
|
"@emotion/react": "^11.10.5",
|
|
31
31
|
"@emotion/styled": "^11.10.5",
|
|
32
32
|
"lodash": "4.17.21",
|
|
33
33
|
"prop-types": "15.8.1",
|
|
34
|
-
"react-select": "5.7.
|
|
34
|
+
"react-select": "5.7.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "17.0.2",
|