@carbon/vue 2.42.0 → 2.43.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/dist/carbon-vue.common.js +1015 -954
- package/dist/carbon-vue.common.js.map +1 -1
- package/dist/carbon-vue.umd.js +1015 -954
- 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 -5
- package/src/components/cv-accordion/cv-accordion-skeleton.vue +1 -1
- package/src/components/cv-accordion/cv-accordion.vue +1 -1
- package/src/components/cv-aspect-ratio/cv-aspect-ratio.vue +3 -2
- package/src/components/cv-aspect-ratio/index.js +2 -2
- package/src/components/cv-breadcrumb/cv-breadcrumb-skeleton.vue +8 -1
- package/src/components/cv-button/button-mixin.js +7 -4
- package/src/components/cv-button/consts.js +14 -0
- package/src/components/cv-button/cv-icon-button.vue +2 -2
- package/src/components/cv-code-snippet/cv-code-snippet-skeleton.vue +1 -1
- package/src/components/cv-code-snippet/cv-code-snippet.vue +1 -1
- package/src/components/cv-data-table/cv-data-table-heading.vue +1 -1
- package/src/components/cv-data-table/cv-data-table-skeleton.vue +1 -2
- package/src/components/cv-feedback-button/_cv-feedback-button.vue +1 -1
- package/src/components/cv-file-uploader/cv-file-uploader.vue +22 -11
- package/src/components/cv-inline-loading/cv-inline-loading.vue +1 -0
- package/src/components/cv-link/cv-link.vue +8 -1
- package/src/components/cv-loading/cv-loading.vue +4 -1
- package/src/components/cv-number-input/cv-number-input.vue +38 -30
- package/src/components/cv-overflow-menu/cv-overflow-menu.vue +3 -3
- package/src/components/cv-search/cv-search.vue +17 -12
- package/src/components/cv-tabs/cv-tabs-skeleton.vue +7 -19
- package/src/components/cv-tag/cv-tag-skeleton.vue +1 -3
- package/src/components/cv-tag/cv-tag.vue +6 -7
- package/src/components/cv-tag/index.js +3 -2
- package/src/components/cv-tile/_cv-tile-selectable.vue +0 -1
- package/src/components/cv-tooltip/consts.js +2 -0
- package/src/components/cv-tooltip/cv-definition-tooltip.vue +5 -5
- package/src/components/cv-tooltip/cv-interactive-tooltip.vue +7 -7
- package/src/components/cv-tooltip/cv-tooltip.vue +5 -5
- package/src/components/cv-tooltip/index.js +1 -0
- package/src/components/cv-ui-shell/cv-header-global-action.vue +1 -1
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
`cv-tag ${carbonPrefix}--tag`,
|
|
8
8
|
`${carbonPrefix}--tag--${tagKind}`,
|
|
9
9
|
{
|
|
10
|
+
[`${carbonPrefix}--tag--disabled`]: disabled,
|
|
10
11
|
[`${carbonPrefix}--tag--filter`]: isFilter,
|
|
12
|
+
[`${carbonPrefix}--tag--interactive`]: hasClickListener,
|
|
11
13
|
[`${carbonPrefix}--tag--${size}`]: size,
|
|
12
14
|
},
|
|
13
15
|
]"
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
<div v-if="icon && !filter" :class="`${carbonPrefix}--tag__custom-icon`">
|
|
20
22
|
<CvSvg :svg="icon" />
|
|
21
23
|
</div>
|
|
22
|
-
<span :class="`${carbonPrefix}--tag__label`">{{ label }}</span>
|
|
24
|
+
<span :class="`${carbonPrefix}--tag__label`" :title="hasClickListener ? label : ''">{{ label }}</span>
|
|
23
25
|
<button
|
|
24
26
|
v-if="isFilter"
|
|
25
27
|
:class="`${carbonPrefix}--tag__close-icon`"
|
|
@@ -37,7 +39,7 @@ import Close16 from '@carbon/icons-vue/es/close/16';
|
|
|
37
39
|
import { carbonPrefixMixin, uidMixin } from '../../mixins';
|
|
38
40
|
import CvSvg from '../cv-svg/_cv-svg';
|
|
39
41
|
|
|
40
|
-
const tagKinds = [
|
|
42
|
+
export const tagKinds = [
|
|
41
43
|
'red',
|
|
42
44
|
'magenta',
|
|
43
45
|
'purple',
|
|
@@ -71,8 +73,7 @@ export default {
|
|
|
71
73
|
label: { type: String, required: true },
|
|
72
74
|
kind: {
|
|
73
75
|
type: String,
|
|
74
|
-
|
|
75
|
-
validator(val) {
|
|
76
|
+
validator: val => {
|
|
76
77
|
if (val === 'filter' && process.env.NODE_ENV === 'development') {
|
|
77
78
|
console.warn('DEPRECARTED: Prefer props.filter (bool)');
|
|
78
79
|
return true;
|
|
@@ -86,9 +87,7 @@ export default {
|
|
|
86
87
|
},
|
|
87
88
|
size: {
|
|
88
89
|
type: String,
|
|
89
|
-
validator(val)
|
|
90
|
-
return !val || val == 'sm';
|
|
91
|
-
},
|
|
90
|
+
validator: val => ['sm'].includes(val),
|
|
92
91
|
},
|
|
93
92
|
},
|
|
94
93
|
data() {
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
21
|
import { uidMixin, carbonPrefixMixin } from '../../mixins';
|
|
22
|
+
import { alignments, directions } from './consts';
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
25
|
name: 'CvDefinitionTooltip',
|
|
25
26
|
mixins: [uidMixin, carbonPrefixMixin],
|
|
26
27
|
props: {
|
|
27
|
-
alignment: { type: String, default: 'center', validator: val =>
|
|
28
|
+
alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
|
|
28
29
|
definition: { type: String, required: true },
|
|
29
30
|
direction: {
|
|
30
31
|
type: String,
|
|
31
32
|
default: 'top',
|
|
32
|
-
validator
|
|
33
|
-
const
|
|
34
|
-
const valid = validValues.includes(val);
|
|
33
|
+
validator: val => {
|
|
34
|
+
const valid = directions.includes(val);
|
|
35
35
|
if (!valid) {
|
|
36
|
-
console.warn(`CVDefinitionTooltip.direction must be one of the following: ${
|
|
36
|
+
console.warn(`CVDefinitionTooltip.direction must be one of the following: ${directions}`);
|
|
37
37
|
}
|
|
38
38
|
return valid;
|
|
39
39
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
class="cv-interactive-tooltip__before-content"
|
|
47
47
|
ref="beforeContent"
|
|
48
48
|
tabindex="0"
|
|
49
|
-
style="position: absolute; left: -9999px; width: 1px; height: 1px
|
|
49
|
+
style="position: absolute; left: -9999px; width: 1px; height: 1px"
|
|
50
50
|
@focus="focusBeforeContent"
|
|
51
51
|
/>
|
|
52
52
|
<span :class="`${carbonPrefix}--tooltip__caret`"></span>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
class="cv-interactive-tooltip__after-content"
|
|
58
58
|
ref="afterContent"
|
|
59
59
|
tabindex="0"
|
|
60
|
-
style="position: absolute; left: -9999px; width: 1px; height: 1px
|
|
60
|
+
style="position: absolute; left: -9999px; width: 1px; height: 1px"
|
|
61
61
|
@focus="focusAfterContent"
|
|
62
62
|
/>
|
|
63
63
|
</div>
|
|
@@ -67,21 +67,21 @@
|
|
|
67
67
|
<script>
|
|
68
68
|
import { uidMixin, carbonPrefixMixin } from '../../mixins';
|
|
69
69
|
import Information16 from '@carbon/icons-vue/es/information/16';
|
|
70
|
+
import { alignments, directions } from './consts';
|
|
70
71
|
|
|
71
72
|
export default {
|
|
72
73
|
name: 'CvInteractiveTooltip',
|
|
73
74
|
mixins: [uidMixin, carbonPrefixMixin],
|
|
74
75
|
components: { Information16 },
|
|
75
76
|
props: {
|
|
76
|
-
alignment: { type: String, default: 'center', validator: val =>
|
|
77
|
+
alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
|
|
77
78
|
direction: {
|
|
78
79
|
type: String,
|
|
79
80
|
default: 'top',
|
|
80
|
-
validator
|
|
81
|
-
const
|
|
82
|
-
const valid = validValues.includes(val);
|
|
81
|
+
validator: val => {
|
|
82
|
+
const valid = directions.includes(val);
|
|
83
83
|
if (!valid) {
|
|
84
|
-
console.warn(`CVInteractiveTooltip.direction must be one of the following: ${
|
|
84
|
+
console.warn(`CVInteractiveTooltip.direction must be one of the following: ${directions}`);
|
|
85
85
|
}
|
|
86
86
|
return valid;
|
|
87
87
|
},
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
<script>
|
|
20
20
|
import Information16 from '@carbon/icons-vue/es/information/16';
|
|
21
21
|
import { carbonPrefixMixin } from '../../mixins';
|
|
22
|
+
import { alignments, directions } from './consts';
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
25
|
name: 'CvTooltip',
|
|
25
26
|
mixins: [carbonPrefixMixin],
|
|
26
27
|
components: { Information16 },
|
|
27
28
|
props: {
|
|
28
|
-
alignment: { type: String, default: 'center', validator: val =>
|
|
29
|
+
alignment: { type: String, default: 'center', validator: val => alignments.includes(val) },
|
|
29
30
|
direction: {
|
|
30
31
|
type: String,
|
|
31
32
|
default: 'top',
|
|
32
|
-
validator
|
|
33
|
-
const
|
|
34
|
-
const valid = validValues.includes(val);
|
|
33
|
+
validator: val => {
|
|
34
|
+
const valid = directions.includes(val);
|
|
35
35
|
if (!valid) {
|
|
36
|
-
console.warn(`CVTooltip.direction must be one of the following: ${
|
|
36
|
+
console.warn(`CVTooltip.direction must be one of the following: ${directions}`);
|
|
37
37
|
}
|
|
38
38
|
return valid;
|
|
39
39
|
},
|
|
@@ -2,4 +2,5 @@ import CvTooltip from './cv-tooltip';
|
|
|
2
2
|
import CvInteractiveTooltip from './cv-interactive-tooltip';
|
|
3
3
|
import CvDefinitionTooltip from './cv-definition-tooltip';
|
|
4
4
|
|
|
5
|
+
export { alignments, directions } from './consts';
|
|
5
6
|
export { CvTooltip, CvInteractiveTooltip, CvDefinitionTooltip };
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
tipPosition: {
|
|
39
39
|
type: String,
|
|
40
40
|
default: 'bottom',
|
|
41
|
-
validator: val => ['top', 'left', 'bottom', 'right'.includes(val)
|
|
41
|
+
validator: val => ['top', 'left', 'bottom', 'right'].includes(val),
|
|
42
42
|
},
|
|
43
43
|
tipAlignment: { type: String, default: 'center', validator: val => ['start', 'center', 'end'].includes(val) },
|
|
44
44
|
},
|