@commercetools-uikit/creatable-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.
@@ -19,6 +19,7 @@ var CreatableSelect = require('react-select/creatable');
19
19
  var Constraints = require('@commercetools-uikit/constraints');
20
20
  var utils = require('@commercetools-uikit/utils');
21
21
  var selectUtils = require('@commercetools-uikit/select-utils');
22
+ var designSystem = require('@commercetools-uikit/design-system');
22
23
  var jsxRuntime = require('@emotion/react/jsx-runtime');
23
24
 
24
25
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -61,6 +62,9 @@ var defaultProps = {
61
62
  var CreatableSelectInput = function CreatableSelectInput(props) {
62
63
  var intl = reactIntl.useIntl();
63
64
 
65
+ var _useTheme = designSystem.useTheme(),
66
+ isNewTheme = _useTheme.isNewTheme;
67
+
64
68
  if (!props.isReadOnly) {
65
69
  process.env.NODE_ENV !== "production" ? utils.warning(typeof props.onChange === 'function', 'CreatableSelectInput: `onChange` is required when input is not read only.') : void 0;
66
70
  }
@@ -93,7 +97,8 @@ var CreatableSelectInput = function CreatableSelectInput(props) {
93
97
  isReadOnly: props.isReadOnly,
94
98
  iconLeft: props.iconLeft,
95
99
  isMulti: props.isMulti,
96
- hasValue: !isEmpty__default["default"](props.value)
100
+ hasValue: !isEmpty__default["default"](props.value),
101
+ isNewTheme: isNewTheme
97
102
  }),
98
103
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
99
104
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -249,7 +254,7 @@ CreatableSelectInput.ValueContainer = reactSelect.components.ValueContainer;
249
254
  var CreatableSelectInput$1 = CreatableSelectInput;
250
255
 
251
256
  // NOTE: This string will be replaced on build time with the package version.
252
- var version = "15.10.0";
257
+ var version = "15.11.1";
253
258
 
254
259
  exports["default"] = CreatableSelectInput$1;
255
260
  exports.version = version;
@@ -19,6 +19,7 @@ var CreatableSelect = require('react-select/creatable');
19
19
  var Constraints = require('@commercetools-uikit/constraints');
20
20
  var utils = require('@commercetools-uikit/utils');
21
21
  var selectUtils = require('@commercetools-uikit/select-utils');
22
+ var designSystem = require('@commercetools-uikit/design-system');
22
23
  var jsxRuntime = require('@emotion/react/jsx-runtime');
23
24
 
24
25
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -60,6 +61,9 @@ var defaultProps = {
60
61
  var CreatableSelectInput = function CreatableSelectInput(props) {
61
62
  var intl = reactIntl.useIntl();
62
63
 
64
+ var _useTheme = designSystem.useTheme(),
65
+ isNewTheme = _useTheme.isNewTheme;
66
+
63
67
  if (!props.isReadOnly) ;
64
68
 
65
69
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
@@ -90,7 +94,8 @@ var CreatableSelectInput = function CreatableSelectInput(props) {
90
94
  isReadOnly: props.isReadOnly,
91
95
  iconLeft: props.iconLeft,
92
96
  isMulti: props.isMulti,
93
- hasValue: !isEmpty__default["default"](props.value)
97
+ hasValue: !isEmpty__default["default"](props.value),
98
+ isNewTheme: isNewTheme
94
99
  }),
95
100
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
96
101
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -226,7 +231,7 @@ CreatableSelectInput.ValueContainer = reactSelect.components.ValueContainer;
226
231
  var CreatableSelectInput$1 = CreatableSelectInput;
227
232
 
228
233
  // NOTE: This string will be replaced on build time with the package version.
229
- var version = "15.10.0";
234
+ var version = "15.11.1";
230
235
 
231
236
  exports["default"] = CreatableSelectInput$1;
232
237
  exports.version = version;
@@ -15,6 +15,7 @@ import CreatableSelect from 'react-select/creatable';
15
15
  import Constraints from '@commercetools-uikit/constraints';
16
16
  import { warning, filterDataAttributes } from '@commercetools-uikit/utils';
17
17
  import { messages, customComponentsWithIcons, createSelectStyles, DropdownIndicator, ClearIndicator, TagRemove } from '@commercetools-uikit/select-utils';
18
+ import { useTheme } from '@commercetools-uikit/design-system';
18
19
  import { jsx } from '@emotion/react/jsx-runtime';
19
20
 
20
21
  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; }
@@ -42,6 +43,9 @@ var defaultProps = {
42
43
  var CreatableSelectInput = function CreatableSelectInput(props) {
43
44
  var intl = useIntl();
44
45
 
46
+ var _useTheme = useTheme(),
47
+ isNewTheme = _useTheme.isNewTheme;
48
+
45
49
  if (!props.isReadOnly) {
46
50
  process.env.NODE_ENV !== "production" ? warning(typeof props.onChange === 'function', 'CreatableSelectInput: `onChange` is required when input is not read only.') : void 0;
47
51
  }
@@ -74,7 +78,8 @@ var CreatableSelectInput = function CreatableSelectInput(props) {
74
78
  isReadOnly: props.isReadOnly,
75
79
  iconLeft: props.iconLeft,
76
80
  isMulti: props.isMulti,
77
- hasValue: !isEmpty(props.value)
81
+ hasValue: !isEmpty(props.value),
82
+ isNewTheme: isNewTheme
78
83
  }),
79
84
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
80
85
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -230,6 +235,6 @@ CreatableSelectInput.ValueContainer = components.ValueContainer;
230
235
  var CreatableSelectInput$1 = CreatableSelectInput;
231
236
 
232
237
  // NOTE: This string will be replaced on build time with the package version.
233
- var version = "15.10.0";
238
+ var version = "15.11.1";
234
239
 
235
240
  export { CreatableSelectInput$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/creatable-select-input",
3
3
  "description": "An input component getting a selection from the user, and where options can also be created by 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,13 +21,13 @@
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/spacings": "15.10.0",
29
- "@commercetools-uikit/text": "15.10.0",
30
- "@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/spacings": "15.11.1",
29
+ "@commercetools-uikit/text": "15.11.1",
30
+ "@commercetools-uikit/utils": "15.11.1",
31
31
  "@emotion/react": "^11.4.0",
32
32
  "@emotion/styled": "^11.3.0",
33
33
  "lodash": "4.17.21",