@commercetools-uikit/async-creatable-select-input 0.0.0-canary-20230127130607 → 0.0.0-canary-20230130113601

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.
@@ -21,6 +21,7 @@ var Constraints = require('@commercetools-uikit/constraints');
21
21
  var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
22
22
  var selectUtils = require('@commercetools-uikit/select-utils');
23
23
  var utils = require('@commercetools-uikit/utils');
24
+ var designSystem = require('@commercetools-uikit/design-system');
24
25
  var jsxRuntime = require('@emotion/react/jsx-runtime');
25
26
 
26
27
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -67,6 +68,10 @@ var defaultProps = {
67
68
 
68
69
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
69
70
  var intl = reactIntl.useIntl();
71
+
72
+ var _useTheme = designSystem.useTheme(),
73
+ isNewTheme = _useTheme.isNewTheme;
74
+
70
75
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
71
76
 
72
77
  if (!props.isReadOnly) {
@@ -104,7 +109,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
104
109
  isReadOnly: props.isReadOnly,
105
110
  iconLeft: props.iconLeft,
106
111
  isMulti: props.isMulti,
107
- hasValue: !isEmpty__default["default"](props.value)
112
+ hasValue: !isEmpty__default["default"](props.value),
113
+ isNewTheme: isNewTheme
108
114
  }),
109
115
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
110
116
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -21,6 +21,7 @@ var Constraints = require('@commercetools-uikit/constraints');
21
21
  var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
22
22
  var selectUtils = require('@commercetools-uikit/select-utils');
23
23
  var utils = require('@commercetools-uikit/utils');
24
+ var designSystem = require('@commercetools-uikit/design-system');
24
25
  var jsxRuntime = require('@emotion/react/jsx-runtime');
25
26
 
26
27
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -65,6 +66,10 @@ var defaultProps = {
65
66
 
66
67
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
67
68
  var intl = reactIntl.useIntl();
69
+
70
+ var _useTheme = designSystem.useTheme(),
71
+ isNewTheme = _useTheme.isNewTheme;
72
+
68
73
  var placeholder = props.placeholder || intl.formatMessage(selectUtils.messages.placeholder);
69
74
 
70
75
  if (!props.isReadOnly) ;
@@ -98,7 +103,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
98
103
  isReadOnly: props.isReadOnly,
99
104
  iconLeft: props.iconLeft,
100
105
  isMulti: props.isMulti,
101
- hasValue: !isEmpty__default["default"](props.value)
106
+ hasValue: !isEmpty__default["default"](props.value),
107
+ isNewTheme: isNewTheme
102
108
  }),
103
109
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
104
110
  // but we use "id" (for the input) and "containerId" (for the container)
@@ -17,6 +17,7 @@ import Constraints from '@commercetools-uikit/constraints';
17
17
  import LoadingSpinner from '@commercetools-uikit/loading-spinner';
18
18
  import { messages, customComponentsWithIcons, createSelectStyles, DropdownIndicator, ClearIndicator, TagRemove } from '@commercetools-uikit/select-utils';
19
19
  import { warning, filterDataAttributes } from '@commercetools-uikit/utils';
20
+ import { useTheme } from '@commercetools-uikit/design-system';
20
21
  import { jsx } from '@emotion/react/jsx-runtime';
21
22
 
22
23
  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; }
@@ -46,6 +47,10 @@ var defaultProps = {
46
47
 
47
48
  var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
48
49
  var intl = useIntl();
50
+
51
+ var _useTheme = useTheme(),
52
+ isNewTheme = _useTheme.isNewTheme;
53
+
49
54
  var placeholder = props.placeholder || intl.formatMessage(messages.placeholder);
50
55
 
51
56
  if (!props.isReadOnly) {
@@ -83,7 +88,8 @@ var AsyncCreatableSelectInput = function AsyncCreatableSelectInput(props) {
83
88
  isReadOnly: props.isReadOnly,
84
89
  iconLeft: props.iconLeft,
85
90
  isMulti: props.isMulti,
86
- hasValue: !isEmpty(props.value)
91
+ hasValue: !isEmpty(props.value),
92
+ isNewTheme: isNewTheme
87
93
  }),
88
94
  filterOption: props.filterOption // react-select uses "id" (for the container) and "inputId" (for the input),
89
95
  // but we use "id" (for the input) and "containerId" (for the container)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/async-creatable-select-input",
3
3
  "description": "An input component getting a selection from an asynchronously loaded list from the user, and where options can be created by the user.",
4
- "version": "0.0.0-canary-20230127130607",
4
+ "version": "0.0.0-canary-20230130113601",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -29,14 +29,14 @@
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.19.0",
31
31
  "@babel/runtime-corejs3": "^7.19.1",
32
- "@commercetools-uikit/constraints": "0.0.0-canary-20230127130607",
33
- "@commercetools-uikit/design-system": "0.0.0-canary-20230127130607",
34
- "@commercetools-uikit/icons": "0.0.0-canary-20230127130607",
35
- "@commercetools-uikit/loading-spinner": "0.0.0-canary-20230127130607",
36
- "@commercetools-uikit/select-utils": "0.0.0-canary-20230127130607",
37
- "@commercetools-uikit/spacings": "0.0.0-canary-20230127130607",
38
- "@commercetools-uikit/text": "0.0.0-canary-20230127130607",
39
- "@commercetools-uikit/utils": "0.0.0-canary-20230127130607",
32
+ "@commercetools-uikit/constraints": "0.0.0-canary-20230130113601",
33
+ "@commercetools-uikit/design-system": "0.0.0-canary-20230130113601",
34
+ "@commercetools-uikit/icons": "0.0.0-canary-20230130113601",
35
+ "@commercetools-uikit/loading-spinner": "0.0.0-canary-20230130113601",
36
+ "@commercetools-uikit/select-utils": "0.0.0-canary-20230130113601",
37
+ "@commercetools-uikit/spacings": "0.0.0-canary-20230130113601",
38
+ "@commercetools-uikit/text": "0.0.0-canary-20230130113601",
39
+ "@commercetools-uikit/utils": "0.0.0-canary-20230130113601",
40
40
  "@emotion/is-prop-valid": "1.2.0",
41
41
  "@emotion/react": "^11.4.0",
42
42
  "@emotion/styled": "^11.3.0",