@carbon/vue 2.35.0 → 2.37.1
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.
- package/CHANGELOG.md +26 -0
- package/dist/carbon-vue.common.js +175 -141
- package/dist/carbon-vue.common.js.map +1 -1
- package/dist/carbon-vue.umd.js +175 -141
- package/dist/carbon-vue.umd.js.map +1 -1
- package/dist/carbon-vue.umd.min.js +3 -3
- package/dist/carbon-vue.umd.min.js.map +1 -1
- package/package.json +5 -3
- package/src/components/cv-data-table/cv-data-table.vue +10 -2
- package/src/components/cv-date-picker/cv-date-picker.vue +1 -1
- package/src/components/cv-modal/cv-modal.vue +6 -3
- package/src/components/cv-multi-select/cv-multi-select.vue +1 -1
- package/src/components/cv-tabs/cv-tabs.vue +9 -1
- package/src/components/cv-tooltip/cv-definition-tooltip.vue +1 -1
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +7 -0
- package/src/components/cv-ui-shell/cv-side-nav-link.vue +10 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/vue",
|
|
3
3
|
"description": "A collection of components for the Carbon Design System built using Vue.js",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.37.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
],
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "vue-cli-service build --target lib --name carbon-vue ./src/index.js --no-clean",
|
|
59
|
-
"clean": "rimraf dist node_modules/.cache"
|
|
59
|
+
"clean": "rimraf dist node_modules/.cache",
|
|
60
|
+
"postinstall": "carbon-telemetry collect --install"
|
|
60
61
|
},
|
|
61
62
|
"engines": {
|
|
62
63
|
"node": ">=10.x"
|
|
@@ -64,6 +65,7 @@
|
|
|
64
65
|
"sideEffects": true,
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"@carbon/icons-vue": "10.20.0",
|
|
68
|
+
"@carbon/telemetry": "^0.0.0-alpha.6",
|
|
67
69
|
"carbon-components": "10.23.1",
|
|
68
70
|
"flatpickr": "4.6.3",
|
|
69
71
|
"vue": "^2.6.12"
|
|
@@ -73,5 +75,5 @@
|
|
|
73
75
|
"eslint-plugin-prettier": "^3.1.1",
|
|
74
76
|
"vue-template-compiler": "^2.6.12"
|
|
75
77
|
},
|
|
76
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "39a48b09921ec3760b9cc6e6f87f5b5456e71317"
|
|
77
79
|
}
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
@keydown.enter.prevent="checkSearchExpand(true)"
|
|
50
50
|
@keydown.space.prevent
|
|
51
51
|
@keyup.space.prevent="checkSearchExpand(true)"
|
|
52
|
-
@blur="checkSearchFocus"
|
|
53
52
|
ref="magnifier"
|
|
54
53
|
>
|
|
55
54
|
<Search16 :class="`${carbonPrefix}--toolbar-action__icon`" />
|
|
@@ -65,7 +64,6 @@
|
|
|
65
64
|
ref="search"
|
|
66
65
|
v-model="searchValue"
|
|
67
66
|
@input="onSearch"
|
|
68
|
-
@blur="checkSearchFocus"
|
|
69
67
|
@keydown.esc.prevent="checkSearchExpand(false)"
|
|
70
68
|
/>
|
|
71
69
|
<button
|
|
@@ -271,9 +269,19 @@ export default {
|
|
|
271
269
|
this.$on('cv:sort', (srcComponent, value) => this.onSort(srcComponent, value));
|
|
272
270
|
},
|
|
273
271
|
mounted() {
|
|
272
|
+
if (this.$refs.searchContainer) {
|
|
273
|
+
this.$refs.magnifier.addEventListener('blur', this.checkSearchFocus);
|
|
274
|
+
this.$refs.search.addEventListener('blur', this.checkSearchFocus);
|
|
275
|
+
}
|
|
274
276
|
this.updateRowsSelected();
|
|
275
277
|
this.checkSlots();
|
|
276
278
|
},
|
|
279
|
+
beforeDestroy() {
|
|
280
|
+
if (this.$refs.searchContainer) {
|
|
281
|
+
this.$refs.magnifier.removeEventListener('blur', this.checkSearchFocus);
|
|
282
|
+
this.$refs.search.removeEventListener('blur', this.checkSearchFocus);
|
|
283
|
+
}
|
|
284
|
+
},
|
|
277
285
|
updated() {
|
|
278
286
|
this.checkSlots();
|
|
279
287
|
},
|
|
@@ -245,14 +245,17 @@ export default {
|
|
|
245
245
|
document.body.classList.remove(`${this.carbonPrefix}--body--with-modal-open`);
|
|
246
246
|
|
|
247
247
|
if (this.dataVisible) {
|
|
248
|
-
this.$el.addEventListener('transitionend', this.afterHide
|
|
248
|
+
this.$el.addEventListener('transitionend', this.afterHide);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
this.dataVisible = false;
|
|
252
252
|
this.$emit('modal-hidden');
|
|
253
253
|
},
|
|
254
|
-
afterHide() {
|
|
255
|
-
|
|
254
|
+
afterHide(event) {
|
|
255
|
+
if (event.propertyName === 'opacity') {
|
|
256
|
+
this.$emit('after-modal-hidden');
|
|
257
|
+
this.$el.removeEventListener('transitionend', this.afterHide);
|
|
258
|
+
}
|
|
256
259
|
},
|
|
257
260
|
onPrimaryClick(ev) {
|
|
258
261
|
this.$emit('primary-click');
|
|
@@ -300,7 +300,7 @@ export default {
|
|
|
300
300
|
},
|
|
301
301
|
checkHighlightPosition(newHiglight) {
|
|
302
302
|
if (this.$refs.list && this.$refs.option && this.$refs.option[newHiglight]) {
|
|
303
|
-
if (this.$refs.list.scrollTop
|
|
303
|
+
if (this.$refs.list.scrollTop >= this.$refs.option[newHiglight].offsetTop) {
|
|
304
304
|
this.$refs.list.scrollTop = this.$refs.option[newHiglight].offsetTop;
|
|
305
305
|
} else if (
|
|
306
306
|
this.$refs.list.scrollTop + this.$refs.list.clientHeight <
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="cv-tabs"
|
|
2
|
+
<div class="cv-tabs" ref="tabs" style="width: 100%;">
|
|
3
3
|
<div
|
|
4
4
|
data-tabs
|
|
5
5
|
:class="[`cv-tab ${carbonPrefix}--tabs`, { [`${carbonPrefix}--tabs--container`]: container }]"
|
|
@@ -89,6 +89,14 @@ export default {
|
|
|
89
89
|
this.$on('cv:disabled', srcComponent => this.onCvDisabled(srcComponent));
|
|
90
90
|
this.$on('cv:enabled', srcComponent => this.onCvEnabled(srcComponent));
|
|
91
91
|
},
|
|
92
|
+
mounted() {
|
|
93
|
+
this.$refs.tabs.addEventListener('focusout', this.onFocusout);
|
|
94
|
+
this.$refs.tabs.addEventListener('focusin', this.onFocusin);
|
|
95
|
+
},
|
|
96
|
+
beforeDestroy() {
|
|
97
|
+
this.$refs.tabs.removeEventListener('focusout', this.onFocusout);
|
|
98
|
+
this.$refs.tabs.removeEventListener('focusin', this.onFocusin);
|
|
99
|
+
},
|
|
92
100
|
computed: {
|
|
93
101
|
triggerStyleOverride() {
|
|
94
102
|
// <style carbon tweaks - DO NOT USE STYLE TAG as it causes SSR issues
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
type: String,
|
|
31
31
|
default: 'top',
|
|
32
32
|
validator(val) {
|
|
33
|
-
const validValues = ['top', 'bottom'];
|
|
33
|
+
const validValues = ['top', 'left', 'right', 'bottom'];
|
|
34
34
|
const valid = validValues.includes(val);
|
|
35
35
|
if (!valid) {
|
|
36
36
|
console.warn(`CVDefinitionTooltip.direction must be one of the following: ${validValues}`);
|
|
@@ -36,11 +36,19 @@ export default {
|
|
|
36
36
|
},
|
|
37
37
|
data() {
|
|
38
38
|
return {
|
|
39
|
-
hasNavIcon:
|
|
39
|
+
hasNavIcon: false,
|
|
40
40
|
};
|
|
41
41
|
},
|
|
42
|
+
mounted() {
|
|
43
|
+
this.checkSlots();
|
|
44
|
+
},
|
|
42
45
|
updated() {
|
|
43
|
-
this.
|
|
46
|
+
this.checkSlots();
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
checkSlots() {
|
|
50
|
+
this.hasNavIcon = !!this.$slots['nav-icon'];
|
|
51
|
+
},
|
|
44
52
|
},
|
|
45
53
|
};
|
|
46
54
|
</script>
|