@commercetools-uikit/search-select-input 16.8.0 → 16.9.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/README.md CHANGED
@@ -102,6 +102,7 @@ export default Example;
102
102
  | `cacheOptions` | `AsyncProps['cacheOptions']` | | | If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.&#xA;<br>&#xA;[Props from React select was used](https://react-select.com/props) |
103
103
  | `filterOption` | `AsyncProps['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) |
104
104
  | `optionType` | `union`<br/>Possible values:<br/>`'single-property' , 'double-property' , 'multiple-properties'` | | | The style of the an option in the dropdown menu. It could be single lined option or an option with more and custom info |
105
+ | `iconLeft` | `ReactNode` | | | Icon to display on the left of the placeholder text and selected value. Has no effect when `isMulti` is enabled. |
105
106
 
106
107
  ## Signatures
107
108
 
@@ -101,7 +101,7 @@ const SearchSelectInput = props => {
101
101
  children: jsxRuntime.jsx(AsyncSelectInput__default["default"], _objectSpread(_objectSpread({}, props), {}, {
102
102
  components: components,
103
103
  placeholder: placeholder,
104
- iconLeft: undefined,
104
+ iconLeft: props.iconLeft,
105
105
  loadingMessage: loadingMessage,
106
106
  noOptionsMessage: noOptionsMessage,
107
107
  isSearchable: true,
@@ -122,14 +122,15 @@ SearchSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
122
122
  onBlur: _pt__default["default"].func,
123
123
  onChange: _pt__default["default"].func,
124
124
  loadingMessage: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].func]),
125
- optionType: _pt__default["default"].oneOf(['single-property', 'double-property', 'multiple-properties'])
125
+ optionType: _pt__default["default"].oneOf(['single-property', 'double-property', 'multiple-properties']),
126
+ iconLeft: _pt__default["default"].node
126
127
  } : {};
127
128
  SearchSelectInput.defaultProps = defaultProps;
128
129
  SearchSelectInput.displayName = 'SearchSelectInput';
129
130
  var SearchSelectInput$1 = SearchSelectInput;
130
131
 
131
132
  // NOTE: This string will be replaced on build time with the package version.
132
- var version = "16.8.0";
133
+ var version = "16.9.0";
133
134
 
134
135
  exports["default"] = SearchSelectInput$1;
135
136
  exports.version = version;
@@ -95,7 +95,7 @@ const SearchSelectInput = props => {
95
95
  children: jsxRuntime.jsx(AsyncSelectInput__default["default"], _objectSpread(_objectSpread({}, props), {}, {
96
96
  components: components,
97
97
  placeholder: placeholder,
98
- iconLeft: undefined,
98
+ iconLeft: props.iconLeft,
99
99
  loadingMessage: loadingMessage,
100
100
  noOptionsMessage: noOptionsMessage,
101
101
  isSearchable: true,
@@ -109,7 +109,7 @@ SearchSelectInput.displayName = 'SearchSelectInput';
109
109
  var SearchSelectInput$1 = SearchSelectInput;
110
110
 
111
111
  // NOTE: This string will be replaced on build time with the package version.
112
- var version = "16.8.0";
112
+ var version = "16.9.0";
113
113
 
114
114
  exports["default"] = SearchSelectInput$1;
115
115
  exports.version = version;
@@ -82,7 +82,7 @@ const SearchSelectInput = props => {
82
82
  children: jsx(AsyncSelectInput, _objectSpread(_objectSpread({}, props), {}, {
83
83
  components: components,
84
84
  placeholder: placeholder,
85
- iconLeft: undefined,
85
+ iconLeft: props.iconLeft,
86
86
  loadingMessage: loadingMessage,
87
87
  noOptionsMessage: noOptionsMessage,
88
88
  isSearchable: true,
@@ -103,13 +103,14 @@ SearchSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
103
103
  onBlur: _pt.func,
104
104
  onChange: _pt.func,
105
105
  loadingMessage: _pt.oneOfType([_pt.string, _pt.func]),
106
- optionType: _pt.oneOf(['single-property', 'double-property', 'multiple-properties'])
106
+ optionType: _pt.oneOf(['single-property', 'double-property', 'multiple-properties']),
107
+ iconLeft: _pt.node
107
108
  } : {};
108
109
  SearchSelectInput.defaultProps = defaultProps;
109
110
  SearchSelectInput.displayName = 'SearchSelectInput';
110
111
  var SearchSelectInput$1 = SearchSelectInput;
111
112
 
112
113
  // NOTE: This string will be replaced on build time with the package version.
113
- var version = "16.8.0";
114
+ var version = "16.9.0";
114
115
 
115
116
  export { SearchSelectInput$1 as default, version };
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import type { ActionMeta, GroupBase } from 'react-select';
2
3
  import type { AsyncProps } from 'react-select/async';
3
4
  type ReactSelectAsyncProps = AsyncProps<unknown, boolean, GroupBase<unknown>>;
@@ -50,6 +51,7 @@ export type TSearchSelectInputProps = {
50
51
  cacheOptions?: ReactSelectAsyncProps['cacheOptions'];
51
52
  filterOption?: ReactSelectAsyncProps['filterOption'];
52
53
  optionType?: 'single-property' | 'double-property' | 'multiple-properties';
54
+ iconLeft?: ReactNode;
53
55
  };
54
56
  declare const SearchSelectInput: {
55
57
  (props: TSearchSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
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": "16.8.0",
4
+ "version": "16.9.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": "16.8.0",
25
- "@commercetools-uikit/design-system": "16.8.0",
26
- "@commercetools-uikit/select-utils": "16.8.0",
27
- "@commercetools-uikit/spacings": "16.8.0",
28
- "@commercetools-uikit/text": "16.8.0",
29
- "@commercetools-uikit/utils": "16.8.0",
24
+ "@commercetools-uikit/async-select-input": "16.9.0",
25
+ "@commercetools-uikit/design-system": "16.9.0",
26
+ "@commercetools-uikit/select-utils": "16.9.0",
27
+ "@commercetools-uikit/spacings": "16.9.0",
28
+ "@commercetools-uikit/text": "16.9.0",
29
+ "@commercetools-uikit/utils": "16.9.0",
30
30
  "@emotion/react": "^11.10.5",
31
31
  "@emotion/styled": "^11.10.5",
32
32
  "prop-types": "15.8.1"