@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 CHANGED
@@ -58,46 +58,47 @@ export default Example;
58
58
 
59
59
  ## Properties
60
60
 
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)&#xA;<br>&#xA;[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)&#xA;<br>&#xA;[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.&#xA;<br>&#xA;[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.&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
75
- | `filterOption` | `ReactSelectProps['filterOption']` | | | Custom method to filter whether an option should be displayed in the menu&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
76
- | `id` | `ReactSelectProps['inputId']` | | | Used as HTML id property. An id is generated automatically when not provided.&#xA;This forwarded as react-select's "inputId"&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
77
- | `inputValue` | `ReactSelectProps['inputValue']` | | | The value of the search input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
78
- | `containerId` | `ReactSelectProps['id']` | | | The id to set on the SelectContainer component&#xA;This is forwarded as react-select's "id"&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
79
- | `isClearable` | `ReactSelectProps['isClearable']` | | | Is the select value clearable&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
80
- | `isDisabled` | `ReactSelectProps['isDisabled']` | | | Is the select disabled&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
81
- | `isOptionDisabled` | `ReactSelectProps['isOptionDisabled']` | | | Override the built-in logic to detect whether an option is disabled&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
82
- | `isMulti` | `ReactSelectProps['isMulti']` | | | Support multiple selected options&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
83
- | `isSearchable` | `ReactSelectProps['isSearchable']` | | | Whether to enable search functionality&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
84
- | `maxMenuHeight` | `ReactSelectProps['maxMenuHeight']` | | `220` | Maximum height of the menu before scrolling&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
85
- | `menuPortalTarget` | `ReactSelectProps['menuPortalTarget']` | | | Dom element to portal the select menu to&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
86
- | `menuPortalZIndex` | `number` | | `1` | z-index value for the menu portal |
87
- | `menuShouldBlockScroll` | `ReactSelectProps['menuShouldBlockScroll']` | | | whether the menu should block scroll while open&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
88
- | `closeMenuOnSelect` | `ReactSelectProps['closeMenuOnSelect']` | | | Whether the menu should close after a value is selected. Defaults to `true`.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
89
- | `name` | `ReactSelectProps['name']` | | | Name of the HTML Input (optional - without this, no input will be rendered)&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
90
- | `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 }.&#xA;<br />&#xA;`inputValue` will be an empty string when no search text is present.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
91
- | `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Handle blur events on the control |
92
- | `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.&#xA;<br/>&#xA;The value will be the selected option, or an array of options in case isMulti is true. |
93
- | `onFocus` | `ReactSelectProps['onFocus']` | | | Handle focus events on the control&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
94
- | `onInputChange` | `ReactSelectProps['onInputChange']` | | | Handle change events on the input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
95
- | `options` | `union`<br/>Possible values:<br/>`TOption[] , TOptionObject[]` | | | Array of options that populate the select menu |
96
- | `showOptionGroupDivider` | `boolean` | | | |
97
- | `placeholder` | `ReactSelectProps['placeholder']` | | | Placeholder text for the select value&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
98
- | `tabIndex` | `ReactSelectProps['tabIndex']` | | | Sets the tabIndex attribute on the input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
99
- | `tabSelectsValue` | `ReactSelectProps['tabSelectsValue']` | | | Select the currently focused option when the user presses tab&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
100
- | `value` | `ReactSelectProps['value']` | | | The value of the select; reflected by the selected option&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
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)&#xA;<br>&#xA;[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)&#xA;<br>&#xA;[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.&#xA;<br>&#xA;[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.&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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.&#xA;This forwarded as react-select's "inputId"&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
78
+ | `inputValue` | `ReactSelectProps['inputValue']` | | | The value of the search input&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
79
+ | `containerId` | `ReactSelectProps['id']` | | | The id to set on the SelectContainer component&#xA;This is forwarded as react-select's "id"&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
80
+ | `isClearable` | `ReactSelectProps['isClearable']` | | | Is the select value clearable&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
81
+ | `isDisabled` | `ReactSelectProps['isDisabled']` | | | Is the select disabled&#xA;<br>&#xA;[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&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
83
+ | `isMulti` | `ReactSelectProps['isMulti']` | | | Support multiple selected options&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
84
+ | `isSearchable` | `ReactSelectProps['isSearchable']` | | | Whether to enable search functionality&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
85
+ | `maxMenuHeight` | `ReactSelectProps['maxMenuHeight']` | | `220` | Maximum height of the menu before scrolling&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
86
+ | `menuPortalTarget` | `ReactSelectProps['menuPortalTarget']` | | | Dom element to portal the select menu to&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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`.&#xA;<br>&#xA;[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)&#xA;<br>&#xA;[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 }.&#xA;<br />&#xA;`inputValue` will be an empty string when no search text is present.&#xA;<br>&#xA;[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.&#xA;<br/>&#xA;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&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
95
+ | `onInputChange` | `ReactSelectProps['onInputChange']` | | | Handle change events on the input&#xA;<br>&#xA;[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&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
99
+ | `tabIndex` | `ReactSelectProps['tabIndex']` | | | Sets the tabIndex attribute on the input&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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&#xA;<br>&#xA;[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.0";
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.0";
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.0";
245
+ var version = "15.14.2";
245
246
 
246
247
  export { SelectInput$1 as default, version };
@@ -1,3 +1 @@
1
- import type { TSelectInputProps as SelectInputProps, TOption as Option } from './select-input';
2
- export type TSelectInputProps = SelectInputProps;
3
- export type TOption = Option;
1
+ export type { TSelectInputProps, TOption } from './select-input';
@@ -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.0",
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.0",
25
- "@commercetools-uikit/design-system": "15.14.0",
26
- "@commercetools-uikit/icons": "15.14.0",
27
- "@commercetools-uikit/select-utils": "15.14.0",
28
- "@commercetools-uikit/utils": "15.14.0",
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.0"
34
+ "react-select": "5.7.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "react": "17.0.2",