@commercetools-uikit/search-text-input 15.12.0 → 15.13.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.
@@ -175,7 +175,7 @@ var SearchTextInput = function SearchTextInput(props) {
175
175
  max: props.horizontalConstraint,
176
176
  children: jsxRuntime.jsxs("div", {
177
177
  css: getSearchTextInputContainerStyles(props),
178
- children: [jsxRuntime.jsx("input", _objectSpread({
178
+ children: [jsxRuntime.jsx("input", _objectSpread(_objectSpread({
179
179
  id: props.id,
180
180
  name: props.name,
181
181
  type: "text",
@@ -193,7 +193,13 @@ var SearchTextInput = function SearchTextInput(props) {
193
193
  "aria-invalid": props['aria-invalid'],
194
194
  "aria-errormessage": props['aria-errormessage'],
195
195
  css: getSearchTextInputStyles(props)
196
- }, utils.filterDataAttributes(props))), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
196
+ }, utils.filterDataAttributes(props)), {}, {
197
+ onKeyDown: function onKeyDown(event) {
198
+ if (!props.isReadOnly && event.key === 'Enter') {
199
+ handleSubmit(event);
200
+ }
201
+ }
202
+ })), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
197
203
  icon: jsxRuntime.jsx(icons.CloseIcon, {
198
204
  size: "medium"
199
205
  }),
@@ -241,7 +247,7 @@ SearchTextInput.isEmpty = function (value) {
241
247
  var SearchTextInput$1 = SearchTextInput;
242
248
 
243
249
  // NOTE: This string will be replaced on build time with the package version.
244
- var version = "15.12.0";
250
+ var version = "15.13.0";
245
251
 
246
252
  exports["default"] = SearchTextInput$1;
247
253
  exports.version = version;
@@ -165,7 +165,7 @@ var SearchTextInput = function SearchTextInput(props) {
165
165
  max: props.horizontalConstraint,
166
166
  children: jsxRuntime.jsxs("div", {
167
167
  css: getSearchTextInputContainerStyles(props),
168
- children: [jsxRuntime.jsx("input", _objectSpread({
168
+ children: [jsxRuntime.jsx("input", _objectSpread(_objectSpread({
169
169
  id: props.id,
170
170
  name: props.name,
171
171
  type: "text",
@@ -183,7 +183,13 @@ var SearchTextInput = function SearchTextInput(props) {
183
183
  "aria-invalid": props['aria-invalid'],
184
184
  "aria-errormessage": props['aria-errormessage'],
185
185
  css: getSearchTextInputStyles(props)
186
- }, utils.filterDataAttributes(props))), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
186
+ }, utils.filterDataAttributes(props)), {}, {
187
+ onKeyDown: function onKeyDown(event) {
188
+ if (!props.isReadOnly && event.key === 'Enter') {
189
+ handleSubmit(event);
190
+ }
191
+ }
192
+ })), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(SecondaryIconButton__default["default"], {
187
193
  icon: jsxRuntime.jsx(icons.CloseIcon, {
188
194
  size: "medium"
189
195
  }),
@@ -211,7 +217,7 @@ SearchTextInput.isEmpty = function (value) {
211
217
  var SearchTextInput$1 = SearchTextInput;
212
218
 
213
219
  // NOTE: This string will be replaced on build time with the package version.
214
- var version = "15.12.0";
220
+ var version = "15.13.0";
215
221
 
216
222
  exports["default"] = SearchTextInput$1;
217
223
  exports.version = version;
@@ -156,7 +156,7 @@ var SearchTextInput = function SearchTextInput(props) {
156
156
  max: props.horizontalConstraint,
157
157
  children: jsxs("div", {
158
158
  css: getSearchTextInputContainerStyles(props),
159
- children: [jsx("input", _objectSpread({
159
+ children: [jsx("input", _objectSpread(_objectSpread({
160
160
  id: props.id,
161
161
  name: props.name,
162
162
  type: "text",
@@ -174,7 +174,13 @@ var SearchTextInput = function SearchTextInput(props) {
174
174
  "aria-invalid": props['aria-invalid'],
175
175
  "aria-errormessage": props['aria-errormessage'],
176
176
  css: getSearchTextInputStyles(props)
177
- }, filterDataAttributes(props))), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsx(SecondaryIconButton, {
177
+ }, filterDataAttributes(props)), {}, {
178
+ onKeyDown: function onKeyDown(event) {
179
+ if (!props.isReadOnly && event.key === 'Enter') {
180
+ handleSubmit(event);
181
+ }
182
+ }
183
+ })), props.isClearable && searchValue && !props.isDisabled && !props.isReadOnly && jsx(SecondaryIconButton, {
178
184
  icon: jsx(CloseIcon, {
179
185
  size: "medium"
180
186
  }),
@@ -222,6 +228,6 @@ SearchTextInput.isEmpty = function (value) {
222
228
  var SearchTextInput$1 = SearchTextInput;
223
229
 
224
230
  // NOTE: This string will be replaced on build time with the package version.
225
- var version = "15.12.0";
231
+ var version = "15.13.0";
226
232
 
227
233
  export { SearchTextInput$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/search-text-input",
3
3
  "description": "A controlled search text input component for single-line strings with validation states.",
4
- "version": "15.12.0",
4
+ "version": "15.13.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/constraints": "15.12.0",
25
- "@commercetools-uikit/design-system": "15.12.0",
26
- "@commercetools-uikit/icons": "15.12.0",
27
- "@commercetools-uikit/input-utils": "15.12.0",
28
- "@commercetools-uikit/secondary-icon-button": "15.12.0",
29
- "@commercetools-uikit/utils": "15.12.0",
24
+ "@commercetools-uikit/constraints": "15.13.0",
25
+ "@commercetools-uikit/design-system": "15.13.0",
26
+ "@commercetools-uikit/icons": "15.13.0",
27
+ "@commercetools-uikit/input-utils": "15.13.0",
28
+ "@commercetools-uikit/secondary-icon-button": "15.13.0",
29
+ "@commercetools-uikit/utils": "15.13.0",
30
30
  "@emotion/react": "^11.10.5",
31
31
  "@emotion/styled": "^11.10.5",
32
32
  "prop-types": "15.8.1"