@commercetools-uikit/select-input 15.10.0 → 15.11.1

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.
@@ -22,6 +22,7 @@ var Select = require('react-select');
22
22
  var Constraints = require('@commercetools-uikit/constraints');
23
23
  var selectUtils = require('@commercetools-uikit/select-utils');
24
24
  var utils = require('@commercetools-uikit/utils');
25
+ var designSystem = require('@commercetools-uikit/design-system');
25
26
  var jsxRuntime = require('@emotion/react/jsx-runtime');
26
27
 
27
28
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -60,6 +61,10 @@ var SelectInput = function SelectInput(props) {
60
61
  var _context, _context2;
61
62
 
62
63
  var intl = reactIntl.useIntl();
64
+
65
+ var _useTheme = designSystem.useTheme(),
66
+ isNewTheme = _useTheme.isNewTheme;
67
+
63
68
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder); // Options can be grouped as
64
69
  // const colourOptions = [{ value: 'green', label: 'Green' }];
65
70
  // const flavourOptions = [{ value: 'vanilla', label: 'Vanilla' }];
@@ -108,7 +113,8 @@ var SelectInput = function SelectInput(props) {
108
113
  isReadOnly: props.isReadOnly,
109
114
  iconLeft: props.iconLeft,
110
115
  isMulti: props.isMulti,
111
- hasValue: !isEmpty__default["default"](selectedOptions)
116
+ hasValue: !isEmpty__default["default"](selectedOptions),
117
+ isNewTheme: isNewTheme
112
118
  }),
113
119
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
114
120
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -258,7 +264,7 @@ SelectInput.ValueContainer = Select.components.ValueContainer;
258
264
  var SelectInput$1 = SelectInput;
259
265
 
260
266
  // NOTE: This string will be replaced on build time with the package version.
261
- var version = "15.10.0";
267
+ var version = "15.11.1";
262
268
 
263
269
  exports["default"] = SelectInput$1;
264
270
  exports.version = version;
@@ -22,6 +22,7 @@ var Select = require('react-select');
22
22
  var Constraints = require('@commercetools-uikit/constraints');
23
23
  var selectUtils = require('@commercetools-uikit/select-utils');
24
24
  var utils = require('@commercetools-uikit/utils');
25
+ var designSystem = require('@commercetools-uikit/design-system');
25
26
  var jsxRuntime = require('@emotion/react/jsx-runtime');
26
27
 
27
28
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -59,6 +60,10 @@ var SelectInput = function SelectInput(props) {
59
60
  var _context, _context2;
60
61
 
61
62
  var intl = reactIntl.useIntl();
63
+
64
+ var _useTheme = designSystem.useTheme(),
65
+ isNewTheme = _useTheme.isNewTheme;
66
+
62
67
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder); // Options can be grouped as
63
68
  // const colourOptions = [{ value: 'green', label: 'Green' }];
64
69
  // const flavourOptions = [{ value: 'vanilla', label: 'Vanilla' }];
@@ -107,7 +112,8 @@ var SelectInput = function SelectInput(props) {
107
112
  isReadOnly: props.isReadOnly,
108
113
  iconLeft: props.iconLeft,
109
114
  isMulti: props.isMulti,
110
- hasValue: !isEmpty__default["default"](selectedOptions)
115
+ hasValue: !isEmpty__default["default"](selectedOptions),
116
+ isNewTheme: isNewTheme
111
117
  }),
112
118
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
113
119
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -237,7 +243,7 @@ SelectInput.ValueContainer = Select.components.ValueContainer;
237
243
  var SelectInput$1 = SelectInput;
238
244
 
239
245
  // NOTE: This string will be replaced on build time with the package version.
240
- var version = "15.10.0";
246
+ var version = "15.11.1";
241
247
 
242
248
  exports["default"] = SelectInput$1;
243
249
  exports.version = version;
@@ -18,6 +18,7 @@ import Select, { components } from 'react-select';
18
18
  import Constraints from '@commercetools-uikit/constraints';
19
19
  import { messages, customComponentsWithIcons, createSelectStyles, DropdownIndicator, ClearIndicator, TagRemove } from '@commercetools-uikit/select-utils';
20
20
  import { filterDataAttributes } from '@commercetools-uikit/utils';
21
+ import { useTheme } from '@commercetools-uikit/design-system';
21
22
  import { jsx } from '@emotion/react/jsx-runtime';
22
23
 
23
24
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -37,6 +38,10 @@ var SelectInput = function SelectInput(props) {
37
38
  var _context, _context2;
38
39
 
39
40
  var intl = useIntl();
41
+
42
+ var _useTheme = useTheme(),
43
+ isNewTheme = _useTheme.isNewTheme;
44
+
40
45
  var placeholder = props.placeholder || intl.formatMessage(messages.placeholder); // Options can be grouped as
41
46
  // const colourOptions = [{ value: 'green', label: 'Green' }];
42
47
  // const flavourOptions = [{ value: 'vanilla', label: 'Vanilla' }];
@@ -85,7 +90,8 @@ var SelectInput = function SelectInput(props) {
85
90
  isReadOnly: props.isReadOnly,
86
91
  iconLeft: props.iconLeft,
87
92
  isMulti: props.isMulti,
88
- hasValue: !isEmpty(selectedOptions)
93
+ hasValue: !isEmpty(selectedOptions),
94
+ isNewTheme: isNewTheme
89
95
  }),
90
96
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
91
97
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -235,6 +241,6 @@ SelectInput.ValueContainer = components.ValueContainer;
235
241
  var SelectInput$1 = SelectInput;
236
242
 
237
243
  // NOTE: This string will be replaced on build time with the package version.
238
- var version = "15.10.0";
244
+ var version = "15.11.1";
239
245
 
240
246
  export { SelectInput$1 as default, version };
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.10.0",
4
+ "version": "15.11.1",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,11 +21,11 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.19.0",
23
23
  "@babel/runtime-corejs3": "^7.19.1",
24
- "@commercetools-uikit/constraints": "15.10.0",
25
- "@commercetools-uikit/design-system": "15.10.0",
26
- "@commercetools-uikit/icons": "15.10.0",
27
- "@commercetools-uikit/select-utils": "15.10.0",
28
- "@commercetools-uikit/utils": "15.10.0",
24
+ "@commercetools-uikit/constraints": "15.11.1",
25
+ "@commercetools-uikit/design-system": "15.11.1",
26
+ "@commercetools-uikit/icons": "15.11.1",
27
+ "@commercetools-uikit/select-utils": "15.11.1",
28
+ "@commercetools-uikit/utils": "15.11.1",
29
29
  "@emotion/is-prop-valid": "1.2.0",
30
30
  "@emotion/react": "^11.4.0",
31
31
  "@emotion/styled": "^11.3.0",