@commercetools-uikit/time-input 14.0.4 → 15.0.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.
@@ -297,14 +297,7 @@ var TimeInput = function TimeInput(props) {
297
297
  process.env.NODE_ENV !== "production" ? utils.warning(typeof props.onChange === 'function', 'TimeInput: `onChange` is required when input is not read only.') : void 0;
298
298
  }
299
299
 
300
- var onBlur = props.onBlur,
301
- onChange = props.onChange;
302
- var handleChange = react$1.useCallback(function (event) {
303
- var rawValue = event.target.value;
304
- var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
305
- event.target.value = formattedValue;
306
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
307
- }, [intl.locale, onChange]);
300
+ var onBlur = props.onBlur;
308
301
  var handleBlur = react$1.useCallback(function (event) {
309
302
  var rawValue = event.target.value;
310
303
  var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
@@ -332,7 +325,7 @@ var TimeInput = function TimeInput(props) {
332
325
  name: props.name,
333
326
  autoComplete: props.autoComplete,
334
327
  value: props.value,
335
- onChange: handleChange,
328
+ onChange: props.onChange,
336
329
  onBlur: handleBlur,
337
330
  onFocus: props.onFocus,
338
331
  isAutofocussed: props.isAutofocussed,
@@ -404,7 +397,7 @@ TimeInput.toLocaleTime = function (time, locale) {
404
397
  var TimeInput$1 = TimeInput;
405
398
 
406
399
  // NOTE: This string will be replaced on build time with the package version.
407
- var version = "14.0.4";
400
+ var version = "15.0.0";
408
401
 
409
402
  exports["default"] = TimeInput$1;
410
403
  exports.version = version;
@@ -276,14 +276,7 @@ var TimeInput = function TimeInput(props) {
276
276
 
277
277
  if (!props.isReadOnly) ;
278
278
 
279
- var onBlur = props.onBlur,
280
- onChange = props.onChange;
281
- var handleChange = react$1.useCallback(function (event) {
282
- var rawValue = event.target.value;
283
- var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
284
- event.target.value = formattedValue;
285
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
286
- }, [intl.locale, onChange]);
279
+ var onBlur = props.onBlur;
287
280
  var handleBlur = react$1.useCallback(function (event) {
288
281
  var rawValue = event.target.value;
289
282
  var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
@@ -311,7 +304,7 @@ var TimeInput = function TimeInput(props) {
311
304
  name: props.name,
312
305
  autoComplete: props.autoComplete,
313
306
  value: props.value,
314
- onChange: handleChange,
307
+ onChange: props.onChange,
315
308
  onBlur: handleBlur,
316
309
  onFocus: props.onFocus,
317
310
  isAutofocussed: props.isAutofocussed,
@@ -367,7 +360,7 @@ TimeInput.toLocaleTime = function (time, locale) {
367
360
  var TimeInput$1 = TimeInput;
368
361
 
369
362
  // NOTE: This string will be replaced on build time with the package version.
370
- var version = "14.0.4";
363
+ var version = "15.0.0";
371
364
 
372
365
  exports["default"] = TimeInput$1;
373
366
  exports.version = version;
@@ -275,14 +275,7 @@ var TimeInput = function TimeInput(props) {
275
275
  process.env.NODE_ENV !== "production" ? warning(typeof props.onChange === 'function', 'TimeInput: `onChange` is required when input is not read only.') : void 0;
276
276
  }
277
277
 
278
- var onBlur = props.onBlur,
279
- onChange = props.onChange;
280
- var handleChange = useCallback(function (event) {
281
- var rawValue = event.target.value;
282
- var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
283
- event.target.value = formattedValue;
284
- onChange === null || onChange === void 0 ? void 0 : onChange(event);
285
- }, [intl.locale, onChange]);
278
+ var onBlur = props.onBlur;
286
279
  var handleBlur = useCallback(function (event) {
287
280
  var rawValue = event.target.value;
288
281
  var formattedValue = TimeInput.toLocaleTime(rawValue, intl.locale);
@@ -310,7 +303,7 @@ var TimeInput = function TimeInput(props) {
310
303
  name: props.name,
311
304
  autoComplete: props.autoComplete,
312
305
  value: props.value,
313
- onChange: handleChange,
306
+ onChange: props.onChange,
314
307
  onBlur: handleBlur,
315
308
  onFocus: props.onFocus,
316
309
  isAutofocussed: props.isAutofocussed,
@@ -382,6 +375,6 @@ TimeInput.toLocaleTime = function (time, locale) {
382
375
  var TimeInput$1 = TimeInput;
383
376
 
384
377
  // NOTE: This string will be replaced on build time with the package version.
385
- var version = "14.0.4";
378
+ var version = "15.0.0";
386
379
 
387
380
  export { TimeInput$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/time-input",
3
3
  "description": "The TimeInput component allows the user to select a time.",
4
- "version": "14.0.4",
4
+ "version": "15.0.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.17.2",
23
23
  "@babel/runtime-corejs3": "^7.17.2",
24
- "@commercetools-uikit/accessible-button": "14.0.1",
25
- "@commercetools-uikit/constraints": "14.0.1",
26
- "@commercetools-uikit/design-system": "14.0.0",
27
- "@commercetools-uikit/hooks": "14.0.3",
28
- "@commercetools-uikit/icons": "14.0.1",
29
- "@commercetools-uikit/input-utils": "14.0.2",
30
- "@commercetools-uikit/spacings-inline": "14.0.1",
31
- "@commercetools-uikit/utils": "14.0.1",
24
+ "@commercetools-uikit/accessible-button": "15.0.0",
25
+ "@commercetools-uikit/constraints": "15.0.0",
26
+ "@commercetools-uikit/design-system": "15.0.0",
27
+ "@commercetools-uikit/hooks": "15.0.0",
28
+ "@commercetools-uikit/icons": "15.0.0",
29
+ "@commercetools-uikit/input-utils": "15.0.0",
30
+ "@commercetools-uikit/spacings-inline": "15.0.0",
31
+ "@commercetools-uikit/utils": "15.0.0",
32
32
  "@emotion/is-prop-valid": "1.1.2",
33
33
  "@emotion/react": "^11.4.0",
34
34
  "@emotion/styled": "^11.3.0",