@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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@carbon/vue",
4
- "version": "3.0.23",
4
+ "version": "3.0.24",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -3174,7 +3174,7 @@
3174
3174
  "kind": "expression",
3175
3175
  "type": "string|number"
3176
3176
  },
3177
- "default": "''"
3177
+ "default": "undefined"
3178
3178
  },
3179
3179
  {
3180
3180
  "name": "formItem",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/vue",
3
3
  "license": "Apache-2.0",
4
- "version": "3.0.24",
4
+ "version": "3.0.25",
5
5
  "description": "A collection of components for the Carbon Design System built using Vue.js",
6
6
  "packageManager": "yarn@3.2.0",
7
7
  "main": "dist/carbon-vue-3.umd.min.js",
@@ -1,3 +1,16 @@
1
1
  import CvDataTable from './CvDataTable.vue';
2
- export { CvDataTable };
2
+ import CvDataTableAction from './CvDataTableAction.vue';
3
+ import CvDataTableCell from './CvDataTableCell.vue';
4
+ import CvDataTableHeading from './CvDataTableHeading.vue';
5
+ import CvDataTableRow from './CvDataTableRow.vue';
6
+ import CvDataTableSkeleton from './CvDataTableSkeleton.vue';
7
+
8
+ export {
9
+ CvDataTable,
10
+ CvDataTableAction,
11
+ CvDataTableCell,
12
+ CvDataTableHeading,
13
+ CvDataTableSkeleton,
14
+ CvDataTableRow,
15
+ };
3
16
  export default CvDataTable;
@@ -114,7 +114,7 @@ const props = defineProps({
114
114
  disabled: Boolean,
115
115
  modelValue: {
116
116
  type: [String, Number],
117
- default: '',
117
+ default: undefined,
118
118
  },
119
119
  formItem: {
120
120
  type: Boolean,
@@ -190,18 +190,22 @@ const modelValueType = typeof props.modelValue;
190
190
  const valuesToNaN = ['', null, undefined];
191
191
 
192
192
  const formatInputValueType = value => {
193
- if (modelValueType === 'string') return value.toString();
193
+ if (modelValueType === 'string') return Number(value).toString();
194
194
  // According to Vue2 component if there is no value NaN is emitted
195
195
  return valuesToNaN.includes(value) ? NaN : Number(value);
196
196
  };
197
197
 
198
+ const displayValue = ref(props.modelValue || props.min);
198
199
  const internalValue = computed({
199
200
  get() {
200
- return props.modelValue;
201
+ return props.modelValue || displayValue.value;
201
202
  },
202
203
  set(value) {
203
- const valueFormatted = formatInputValueType(value);
204
- onInput(valueFormatted);
204
+ displayValue.value = formatInputValueType(value);
205
+ if (typeof value === 'string') {
206
+ input.value.value = '';
207
+ }
208
+ onInput(displayValue.value);
205
209
  },
206
210
  });
207
211