@carbon/vue 3.0.24 → 3.0.25

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.
@@ -13420,7 +13420,7 @@ var __default__ = {
13420
13420
  disabled: Boolean,
13421
13421
  modelValue: {
13422
13422
  type: [String, Number],
13423
- default: ''
13423
+ default: undefined
13424
13424
  },
13425
13425
  formItem: {
13426
13426
  type: Boolean,
@@ -13499,17 +13499,21 @@ var __default__ = {
13499
13499
  var modelValueType = (0,esm_typeof/* default */.A)(props.modelValue);
13500
13500
  var valuesToNaN = ['', null, undefined];
13501
13501
  var formatInputValueType = function formatInputValueType(value) {
13502
- if (modelValueType === 'string') return value.toString();
13502
+ if (modelValueType === 'string') return Number(value).toString();
13503
13503
  // According to Vue2 component if there is no value NaN is emitted
13504
13504
  return valuesToNaN.includes(value) ? NaN : Number(value);
13505
13505
  };
13506
+ var displayValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(props.modelValue || props.min);
13506
13507
  var internalValue = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)({
13507
13508
  get: function get() {
13508
- return props.modelValue;
13509
+ return props.modelValue || displayValue.value;
13509
13510
  },
13510
13511
  set: function set(value) {
13511
- var valueFormatted = formatInputValueType(value);
13512
- onInput(valueFormatted);
13512
+ displayValue.value = formatInputValueType(value);
13513
+ if (typeof value === 'string') {
13514
+ input.value.value = '';
13515
+ }
13516
+ onInput(displayValue.value);
13513
13517
  }
13514
13518
  });
13515
13519
  var onInput = function onInput(value) {