@carbon/vue 2.13.0 → 2.14.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.
- package/CHANGELOG.md +6 -0
- package/dist/carbon-vue.common.js +83 -49
- package/dist/carbon-vue.common.js.map +1 -1
- package/dist/carbon-vue.umd.js +83 -49
- 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 +2 -2
- package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +4 -1
- package/src/components/cv-breadcrumb/cv-breadcrumb.vue +2 -1
- package/src/components/cv-data-table/cv-data-table.vue +2 -1
- package/src/components/cv-date-picker/cv-date-picker.vue +5 -2
- package/src/components/cv-file-uploader/cv-file-uploader.vue +3 -2
- package/src/components/cv-inline-notification/cv-inline-notification.vue +8 -1
- package/src/components/cv-modal/cv-modal.vue +2 -0
- package/src/components/cv-overflow-menu/cv-overflow-menu.vue +5 -1
- package/src/components/cv-search/cv-search.vue +5 -3
- package/src/components/cv-tag/cv-tag.vue +7 -10
- package/src/components/cv-tile/_cv-tile-selectable.vue +4 -1
- package/src/components/cv-toast-notification/cv-toast-notification.vue +2 -1
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +5 -1
- package/src/mixins/link-mixin.js +6 -1
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.14.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"babel-preset-env": "1.7.0",
|
|
73
73
|
"vue-template-compiler": "^2.6.10"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "d1585de603e956cb32d56c2a201d9be3e13b5bd2"
|
|
76
76
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<nav class="bx--breadcrumb bx--skeleton" aria-label="
|
|
2
|
+
<nav class="bx--breadcrumb bx--skeleton" :aria-label="ariaLabel">
|
|
3
3
|
<cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
|
|
4
4
|
<cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
|
|
5
5
|
<cv-breadcrumb-item-skeleton></cv-breadcrumb-item-skeleton>
|
|
@@ -14,5 +14,8 @@ export default {
|
|
|
14
14
|
components: {
|
|
15
15
|
CvBreadcrumbItemSkeleton,
|
|
16
16
|
},
|
|
17
|
+
props: {
|
|
18
|
+
ariaLabel: { type: String, default: 'breadcrumb' },
|
|
19
|
+
},
|
|
17
20
|
};
|
|
18
21
|
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<nav
|
|
3
3
|
class="cv-breadcrumb bx--breadcrumb"
|
|
4
4
|
:class="{ 'bx--breadcrumb--no-trailing-slash': noTrailingSlash }"
|
|
5
|
-
aria-label="
|
|
5
|
+
:aria-label="ariaLabel"
|
|
6
6
|
>
|
|
7
7
|
<slot></slot>
|
|
8
8
|
</nav>
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
export default {
|
|
13
13
|
name: 'CvBreadcrumb',
|
|
14
14
|
props: {
|
|
15
|
+
ariaLabel: { type: String, default: 'breadcrumb' },
|
|
15
16
|
noTrailingSlash: Boolean,
|
|
16
17
|
},
|
|
17
18
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
v-if="hasBatchActions"
|
|
16
16
|
class="bx--batch-actions"
|
|
17
17
|
:class="{ 'bx--batch-actions--active': batchActive }"
|
|
18
|
-
aria-label="
|
|
18
|
+
:aria-label="actionBarAriaLabel"
|
|
19
19
|
>
|
|
20
20
|
<div class="bx--action-list">
|
|
21
21
|
<slot name="batch-actions" />
|
|
@@ -179,6 +179,7 @@ export default {
|
|
|
179
179
|
},
|
|
180
180
|
mixins: [uidMixin],
|
|
181
181
|
props: {
|
|
182
|
+
actionBarAriaLabel: { type: String, default: 'Table Action Bar' },
|
|
182
183
|
autoWidth: Boolean,
|
|
183
184
|
batchCancelLabel: { type: String, default: 'cancel' },
|
|
184
185
|
borderless: Boolean,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
:data-date-picker-input-to="kind === 'range'"
|
|
51
51
|
ref="todate"
|
|
52
52
|
/>
|
|
53
|
-
<Calendar16 class="bx--date-picker__icon" data-date-picker-icon @click="
|
|
53
|
+
<Calendar16 class="bx--date-picker__icon" data-date-picker-icon @click="openTodateCal()" />
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
@@ -160,7 +160,7 @@ export default {
|
|
|
160
160
|
// _options.onValueUpdate = this.onChange;
|
|
161
161
|
|
|
162
162
|
if (this.kind === 'range') {
|
|
163
|
-
_options.plugins = [new RangePlugin({ input: this.$refs.todate })];
|
|
163
|
+
_options.plugins = [new RangePlugin({ input: this.$refs.todate, position: 'left' })];
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
return _options;
|
|
@@ -223,6 +223,9 @@ export default {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
|
+
openTodateCal() {
|
|
227
|
+
this.$refs.todate.click();
|
|
228
|
+
},
|
|
226
229
|
},
|
|
227
230
|
mounted() {
|
|
228
231
|
if (['single', 'range'].includes(this.kind)) {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
class="bx--file-close"
|
|
47
47
|
:tabindex="'1'"
|
|
48
48
|
role="button"
|
|
49
|
-
alt="
|
|
50
|
-
arial-label="
|
|
49
|
+
:alt="removeAriaLabel"
|
|
50
|
+
:arial-label="removeAriaLabel"
|
|
51
51
|
@click="remove(index)"
|
|
52
52
|
@keydown.enter.prevent="remove(index)"
|
|
53
53
|
@keydown.space.prevent
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
92
92
|
initialStateUploading: Boolean,
|
|
93
93
|
removable: Boolean,
|
|
94
94
|
buttonLabel: { type: String, default: 'Select file' },
|
|
95
|
+
removeAriaLabel: { type: String, default: 'Remove file' },
|
|
95
96
|
},
|
|
96
97
|
model: {
|
|
97
98
|
prop: 'files',
|
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
<p class="bx--inline-notification__subtitle">{{ subTitle }}.</p>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
|
-
<button
|
|
17
|
+
<button
|
|
18
|
+
type="button"
|
|
19
|
+
:aria-label="closeAriaLabel"
|
|
20
|
+
data-notification-btn
|
|
21
|
+
class="bx--inline-notification__close-button"
|
|
22
|
+
@click="$emit('close')"
|
|
23
|
+
>
|
|
18
24
|
<Close16 class="bx--inline-notification__close-icon" />
|
|
19
25
|
</button>
|
|
20
26
|
</div>
|
|
@@ -32,6 +38,7 @@ export default {
|
|
|
32
38
|
components: { Close16 },
|
|
33
39
|
mixins: [notificationMixin],
|
|
34
40
|
props: {
|
|
41
|
+
closeAriaLabel: { type: String, default: 'Clear filter' },
|
|
35
42
|
kind: {
|
|
36
43
|
type: String,
|
|
37
44
|
default: 'info',
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
<slot name="secondary-button">Secondary button</slot>
|
|
52
52
|
</cv-button>
|
|
53
53
|
<cv-button
|
|
54
|
+
:disabled="primaryButtonDisabled"
|
|
54
55
|
type="button"
|
|
55
56
|
:kind="primaryKind"
|
|
56
57
|
@click="onPrimaryClick"
|
|
@@ -91,6 +92,7 @@ export default {
|
|
|
91
92
|
},
|
|
92
93
|
autoHideOff: Boolean,
|
|
93
94
|
visible: Boolean,
|
|
95
|
+
primaryButtonDisabled: Boolean,
|
|
94
96
|
},
|
|
95
97
|
data() {
|
|
96
98
|
return {
|
|
@@ -215,10 +215,14 @@ export default {
|
|
|
215
215
|
this.$el.addEventListener('focusout', this.checkFocusOut);
|
|
216
216
|
|
|
217
217
|
// move popup out to body to ensure it appears above other elements
|
|
218
|
-
document.body.appendChild(this.$refs.popup);
|
|
218
|
+
this.popupEl = document.body.appendChild(this.$refs.popup);
|
|
219
219
|
},
|
|
220
220
|
beforeDestroy() {
|
|
221
221
|
this.positionListen(false);
|
|
222
|
+
if (this.popupEl) {
|
|
223
|
+
// move back to where it came from
|
|
224
|
+
this.$el.appendChild(this.popupEl);
|
|
225
|
+
}
|
|
222
226
|
},
|
|
223
227
|
};
|
|
224
228
|
</script>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
type="button"
|
|
22
22
|
v-if="isToolbarKind"
|
|
23
23
|
class="bx--toolbar-search__btn"
|
|
24
|
-
aria-label="
|
|
24
|
+
:aria-label="toolbarAriaLabel"
|
|
25
25
|
@click="toggleActive(true)"
|
|
26
26
|
@blur="checkFocus"
|
|
27
27
|
>
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
type="button"
|
|
33
33
|
class="bx--search-close"
|
|
34
34
|
:class="{ 'bx--search-close--hidden': !clearVisible }"
|
|
35
|
-
title="
|
|
36
|
-
aria-label="
|
|
35
|
+
:title="clearAriaLabel"
|
|
36
|
+
:aria-label="clearAriaLabel"
|
|
37
37
|
@click="onClearClick"
|
|
38
38
|
>
|
|
39
39
|
<Close16 />
|
|
@@ -55,6 +55,7 @@ export default {
|
|
|
55
55
|
components: { Close16, Search16, CvWrapper },
|
|
56
56
|
inheritAttrs: false,
|
|
57
57
|
props: {
|
|
58
|
+
clearAriaLabel: { type: String, default: 'Clear search input' },
|
|
58
59
|
formItem: { type: Boolean, default: true },
|
|
59
60
|
kind: { type: String, default: null },
|
|
60
61
|
label: String,
|
|
@@ -73,6 +74,7 @@ export default {
|
|
|
73
74
|
},
|
|
74
75
|
value: String,
|
|
75
76
|
placeholder: { type: String, default: 'Search' },
|
|
77
|
+
toolbarAriaLabel: { type: String, default: 'Toolbar search' },
|
|
76
78
|
},
|
|
77
79
|
data() {
|
|
78
80
|
return {
|
|
@@ -8,18 +8,14 @@
|
|
|
8
8
|
'bx--tag--disabled': disabled,
|
|
9
9
|
},
|
|
10
10
|
]"
|
|
11
|
+
tabindex="0"
|
|
11
12
|
:title="title"
|
|
13
|
+
@keydown.enter.stop.prevent="$emit('remove')"
|
|
14
|
+
@keydown.space.prevent
|
|
15
|
+
@keyup.space.prevent="$emit('remove')"
|
|
12
16
|
>
|
|
13
17
|
{{ label }}
|
|
14
|
-
<Close16
|
|
15
|
-
v-if="isFilter"
|
|
16
|
-
aria-label="Clear filter"
|
|
17
|
-
@click.stop.prevent="$emit('remove')"
|
|
18
|
-
tabindex="0"
|
|
19
|
-
@keydown.enter.stop.prevent="$emit('remove')"
|
|
20
|
-
@keydown.space.prevent
|
|
21
|
-
@keyup.space.prevent="$emit('remove')"
|
|
22
|
-
/>
|
|
18
|
+
<Close16 v-if="isFilter" :aria-label="clearAriaLabel" role="button" @click.stop.prevent="$emit('remove')" />
|
|
23
19
|
</span>
|
|
24
20
|
</template>
|
|
25
21
|
|
|
@@ -44,6 +40,7 @@ export default {
|
|
|
44
40
|
name: 'CvTag',
|
|
45
41
|
components: { Close16 },
|
|
46
42
|
props: {
|
|
43
|
+
clearAriaLabel: { type: String, default: 'Clear filter' },
|
|
47
44
|
disabled: Boolean,
|
|
48
45
|
label: { type: String, required: true },
|
|
49
46
|
kind: {
|
|
@@ -59,7 +56,7 @@ export default {
|
|
|
59
56
|
return this.kind === 'filter';
|
|
60
57
|
},
|
|
61
58
|
title() {
|
|
62
|
-
return this.isFilter ?
|
|
59
|
+
return this.isFilter ? this.clearAriaLabel : null;
|
|
63
60
|
},
|
|
64
61
|
},
|
|
65
62
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<label
|
|
3
3
|
:data-wibble="`${isChecked}`"
|
|
4
4
|
:for="uid"
|
|
5
|
-
aria-label="
|
|
5
|
+
:aria-label="ariaLabel"
|
|
6
6
|
class="cv-tile-selectable bx--tile--selectable"
|
|
7
7
|
:class="{ 'bx--tile--is-selected': isChecked }"
|
|
8
8
|
data-tile="selectable"
|
|
@@ -40,5 +40,8 @@ export default {
|
|
|
40
40
|
mixins: [uidMixin, checkMixin],
|
|
41
41
|
components: { CheckmarkFilled16 },
|
|
42
42
|
inheritAttrs: false,
|
|
43
|
+
props: {
|
|
44
|
+
ariaLabel: { type: String, default: 'tile' },
|
|
45
|
+
},
|
|
43
46
|
};
|
|
44
47
|
</script>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<p class="bx--toast-notification__caption">{{ caption }}</p>
|
|
15
15
|
</div>
|
|
16
16
|
<button
|
|
17
|
-
aria-label="
|
|
17
|
+
:aria-label="closeAriaLabel"
|
|
18
18
|
type="button"
|
|
19
19
|
data-notification-btn
|
|
20
20
|
class="bx--toast-notification__close-button"
|
|
@@ -38,6 +38,7 @@ export default {
|
|
|
38
38
|
mixins: [notificationMixin],
|
|
39
39
|
props: {
|
|
40
40
|
caption: String,
|
|
41
|
+
closeAriaLabel: { type: String, default: 'Close' },
|
|
41
42
|
kind: {
|
|
42
43
|
type: String,
|
|
43
44
|
default: 'info',
|
|
@@ -201,7 +201,7 @@ export default {
|
|
|
201
201
|
},
|
|
202
202
|
mounted() {
|
|
203
203
|
// move popup out to body to ensure it appears above other elements
|
|
204
|
-
document.body.appendChild(this.$refs.popup);
|
|
204
|
+
this.popupEl = document.body.appendChild(this.$refs.popup);
|
|
205
205
|
|
|
206
206
|
if (this.visible) {
|
|
207
207
|
this.show();
|
|
@@ -211,6 +211,10 @@ export default {
|
|
|
211
211
|
},
|
|
212
212
|
beforeDestroy() {
|
|
213
213
|
this.positionListen(false);
|
|
214
|
+
if (this.popupEl) {
|
|
215
|
+
// move back to where it came from
|
|
216
|
+
this.$el.appendChild(this.popupEl);
|
|
217
|
+
}
|
|
214
218
|
},
|
|
215
219
|
};
|
|
216
220
|
</script>
|
package/src/mixins/link-mixin.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
+
disabled: Boolean,
|
|
3
4
|
to: String,
|
|
4
5
|
href: String,
|
|
5
6
|
},
|
|
@@ -9,7 +10,11 @@ export default {
|
|
|
9
10
|
return this.to && !this.href ? 'router-link' : 'a';
|
|
10
11
|
},
|
|
11
12
|
linkProps() {
|
|
12
|
-
if (this.
|
|
13
|
+
if (this.disabled) {
|
|
14
|
+
return {
|
|
15
|
+
'aria-disabled': true,
|
|
16
|
+
};
|
|
17
|
+
} else if (this.to && !this.href) {
|
|
13
18
|
return { to: this.to };
|
|
14
19
|
}
|
|
15
20
|
return { href: this.href };
|