@carbon/vue 3.0.19 → 3.0.21
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-3.common.js +3852 -3828
- package/dist/carbon-vue-3.common.js.map +1 -1
- package/dist/carbon-vue-3.umd.js +3854 -3830
- package/dist/carbon-vue-3.umd.js.map +1 -1
- package/dist/carbon-vue-3.umd.min.js +4 -4
- package/dist/carbon-vue-3.umd.min.js.map +1 -1
- package/dist/web-types.json +25 -2
- package/package.json +2 -3
- package/src/components/CvCheckbox/CvCheckbox.stories.js +4 -2
- package/src/components/CvDataTable/CvDataTable.stories.mdx +27 -4
- package/src/components/CvDataTable/CvDataTable.vue +2 -1
- package/src/components/CvDataTable/CvDataTableRow.vue +6 -1
- package/src/components/CvDatePicker/CvDatePicker.stories.js +99 -22
- package/src/components/CvDatePicker/CvDatePicker.vue +3 -1
- package/src/components/CvDropdown/CvDropdown.vue +14 -4
- package/src/components/CvTag/CvTag.stories.js +57 -3
- package/src/components/CvTag/CvTag.vue +20 -17
- package/src/index.js +2 -0
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="skeleton" :class="tagClasses"></div>
|
|
3
3
|
<div v-else :class="tagClasses" role="listitem" :title="title">
|
|
4
|
+
<cv-svg
|
|
5
|
+
v-if="!skeleton && renderIcon"
|
|
6
|
+
:svg="renderIcon"
|
|
7
|
+
:class="`${carbonPrefix}--tag__custom-icon`"
|
|
8
|
+
/>
|
|
4
9
|
<span :class="`${carbonPrefix}--tag__label`">
|
|
5
10
|
{{ label }}
|
|
6
11
|
</span>
|
|
@@ -21,23 +26,19 @@ import { computed } from 'vue';
|
|
|
21
26
|
import { carbonPrefix } from '../../global/settings';
|
|
22
27
|
import { tagKinds } from './consts';
|
|
23
28
|
import Close16 from '@carbon/icons-vue/es/close/16';
|
|
29
|
+
import CvSvg from '../CvSvg/_CvSvg.vue';
|
|
24
30
|
|
|
25
31
|
export default {
|
|
26
32
|
name: 'CvTag',
|
|
27
|
-
components: { Close16 },
|
|
33
|
+
components: { CvSvg, Close16 },
|
|
28
34
|
props: {
|
|
35
|
+
/** aria label to use for the x icon for the filter tag */
|
|
29
36
|
clearAriaLabel: { type: String, default: 'Clear filter' },
|
|
30
|
-
/**
|
|
31
|
-
* disabled by property or if skeleton
|
|
32
|
-
*/
|
|
37
|
+
/** disabled by property or if skeleton */
|
|
33
38
|
disabled: Boolean,
|
|
34
|
-
/**
|
|
35
|
-
* label to be used in the CvTag component
|
|
36
|
-
*/
|
|
39
|
+
/** label to be used in the CvTag component */
|
|
37
40
|
label: { type: String, required: true },
|
|
38
|
-
/**
|
|
39
|
-
* kind of the CvTag
|
|
40
|
-
*/
|
|
41
|
+
/** kind of the CvTag */
|
|
41
42
|
kind: {
|
|
42
43
|
type: String,
|
|
43
44
|
default: undefined,
|
|
@@ -46,20 +47,22 @@ export default {
|
|
|
46
47
|
},
|
|
47
48
|
},
|
|
48
49
|
/**
|
|
49
|
-
* If filter is true, the CvTag will include a remove button on the right side, which on a click, will emit the
|
|
50
|
+
* If filter is true, the CvTag will include a remove button on the right side, which on a click, will emit the
|
|
51
|
+
* 'remove' event.
|
|
50
52
|
*/
|
|
51
53
|
filter: {
|
|
52
54
|
type: Boolean,
|
|
53
55
|
default: false,
|
|
54
56
|
},
|
|
55
|
-
/**
|
|
56
|
-
* skeleton used when loading
|
|
57
|
-
*/
|
|
57
|
+
/** skeleton used when loading */
|
|
58
58
|
skeleton: Boolean,
|
|
59
|
-
/**
|
|
60
|
-
* tag size small
|
|
61
|
-
*/
|
|
59
|
+
/** tag size small */
|
|
62
60
|
small: Boolean,
|
|
61
|
+
/** Optional prop to render a custom icon. \@carbon/icons-vue icon, href, svg or symbol */
|
|
62
|
+
renderIcon: {
|
|
63
|
+
type: [String, Object],
|
|
64
|
+
default: undefined,
|
|
65
|
+
},
|
|
63
66
|
},
|
|
64
67
|
emits: [
|
|
65
68
|
/**
|
package/src/index.js
CHANGED
|
@@ -43,6 +43,8 @@ export default {
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
+
|
|
47
|
+
// AUTO-GENERATED EXPORTS - DO NOT EDIT BELOW
|
|
46
48
|
export { default as CvAccordion } from './components/CvAccordion/CvAccordion.vue';
|
|
47
49
|
export { default as CvAccordionItem } from './components/CvAccordion/CvAccordionItem.vue';
|
|
48
50
|
export { default as CvAccordionSkeleton } from './components/CvAccordion/CvAccordionSkeleton.vue';
|