@carbon/vue 2.27.1 → 2.28.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 +10 -0
- package/dist/carbon-vue.common.js +332 -154
- package/dist/carbon-vue.common.js.map +1 -1
- package/dist/carbon-vue.umd.js +332 -154
- package/dist/carbon-vue.umd.js.map +1 -1
- package/dist/carbon-vue.umd.min.js +4 -4
- package/dist/carbon-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/images/example-icon-svg.js +10 -0
- package/src/assets/images/example-icon.svg +6 -0
- package/src/components/cv-accordion/cv-accordion-item.vue +1 -1
- package/src/components/cv-breadcrumb/_cv-breadcrumb-item-skeleton.vue +4 -2
- package/src/components/cv-breadcrumb/cv-breadcrumb-item.vue +10 -5
- package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +3 -1
- package/src/components/cv-breadcrumb/cv-breadcrumb.vue +12 -5
- package/src/components/cv-button/cv-button.vue +3 -4
- package/src/components/cv-button/cv-icon-button.vue +3 -4
- package/src/components/cv-checkbox/cv-checkbox-skeleton.vue +4 -2
- package/src/components/cv-checkbox/cv-checkbox.vue +32 -11
- package/src/components/cv-combo-box/cv-combo-box.vue +3 -3
- package/src/components/cv-content-switcher/cv-content-switcher-button.vue +4 -5
- package/src/components/cv-dropdown/cv-dropdown.vue +10 -4
- package/src/components/cv-form/cv-form.vue +1 -1
- package/src/components/cv-inline-loading/cv-inline-loading.vue +20 -14
- package/src/components/cv-link/cv-link.vue +12 -8
- package/src/components/cv-multi-select/cv-multi-select.vue +2 -2
- package/src/components/cv-number-input/cv-number-input-skeleton.vue +5 -3
- package/src/components/cv-number-input/cv-number-input.vue +32 -23
- package/src/components/cv-overflow-menu/cv-overflow-menu.vue +1 -1
- package/src/components/cv-svg/_cv-svg.vue +41 -0
- package/src/components/cv-tabs/cv-tab.vue +1 -1
- package/src/components/cv-tabs/cv-tabs.vue +1 -1
- package/src/components/cv-text-area/cv-text-area.vue +6 -0
- package/src/components/cv-text-input/cv-text-input.vue +5 -0
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +1 -1
- package/src/components/cv-ui-shell/cv-header-global-action.vue +1 -1
- package/src/components/cv-ui-shell/cv-header-menu-button.vue +1 -1
- package/src/components/cv-ui-shell/cv-header-panel.vue +1 -1
- package/src/components/cv-ui-shell/cv-side-nav.vue +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import CvWrapper from '../cv-wrapper/_cv-wrapper';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'CvSvg',
|
|
6
|
+
components: { CvWrapper },
|
|
7
|
+
props: {
|
|
8
|
+
svg: {
|
|
9
|
+
type: [String, Object],
|
|
10
|
+
default: undefined,
|
|
11
|
+
validator(val) {
|
|
12
|
+
if (!val || typeof val === 'string') {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
return val.render !== null;
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
isSvg() {
|
|
21
|
+
return this.svg !== undefined && this.svg.indexOf('<svg') >= 0;
|
|
22
|
+
},
|
|
23
|
+
isSymbol() {
|
|
24
|
+
return this.svg !== undefined && !this.isSvg && this.svg.indexOf('#') >= 0;
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
render(createElement) {
|
|
28
|
+
if (typeof this.svg === 'object') {
|
|
29
|
+
return createElement('component', { is: this.svg });
|
|
30
|
+
} else if (this.isSvg) {
|
|
31
|
+
return createElement('svg', { domProps: { innerHTML: this.svg } });
|
|
32
|
+
} else {
|
|
33
|
+
if (this.isSymbol) {
|
|
34
|
+
return createElement('svg', {}, [createElement('use', { attrs: { href: this.svg } })]);
|
|
35
|
+
} else {
|
|
36
|
+
return createElement('img', { attrs: { src: this.svg } });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
'bx--tabs__nav-item--disabled': disabledTabs.indexOf(tab.uid) !== -1,
|
|
35
35
|
}"
|
|
36
36
|
role="tab"
|
|
37
|
-
:aria-selected="selectedId == tab.uid"
|
|
37
|
+
:aria-selected="selectedId == tab.uid ? 'true' : 'false'"
|
|
38
38
|
:aria-disabled="disabledTabs.indexOf(tab.uid) !== -1"
|
|
39
39
|
>
|
|
40
40
|
<a
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
v-bind="$attrs"
|
|
23
23
|
:value="value"
|
|
24
24
|
v-on="inputListeners"
|
|
25
|
+
ref="textarea"
|
|
25
26
|
></textarea>
|
|
26
27
|
</div>
|
|
27
28
|
<div class="bx--form-requirement" v-if="isInvalid">
|
|
@@ -75,6 +76,11 @@ export default {
|
|
|
75
76
|
this.isInvalid = !!(this.$slots['invalid-message'] || (this.invalidMessage && this.invalidMessage.length));
|
|
76
77
|
this.isHelper = !!(this.$slots['helper-text'] || (this.helperText && this.helperText.length));
|
|
77
78
|
},
|
|
79
|
+
focus() {
|
|
80
|
+
this.$nextTick(() => {
|
|
81
|
+
this.$refs.textarea.focus();
|
|
82
|
+
});
|
|
83
|
+
},
|
|
78
84
|
},
|
|
79
85
|
};
|
|
80
86
|
</script>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
'bx--side-nav--collapsed': !panelExpanded && fixed,
|
|
8
8
|
'bx--side-nav--ux': isChildOfHeader,
|
|
9
9
|
}"
|
|
10
|
-
:aria-hidden="!panelExpanded && !fixed"
|
|
10
|
+
:aria-hidden="!panelExpanded && !fixed ? 'true' : 'false'"
|
|
11
11
|
:id="id"
|
|
12
12
|
@focusout="onFocusout"
|
|
13
13
|
@mousedown="onMouseDown"
|