@carbon/vue 3.0.8-alpha.0 → 3.0.9
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/README.md +60 -21
- package/dist/carbon-vue-3.common.js +539 -69
- package/dist/carbon-vue-3.common.js.map +1 -1
- package/dist/carbon-vue-3.umd.js +539 -69
- 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/package.json +2 -2
- package/src/components/CvFileUploader/CvFileUploader.stories.mdx +24 -6
- package/src/components/CvFileUploader/CvFileUploader.vue +58 -19
- package/src/components/CvNotification/CvToastNotification.stories.js +71 -1
- package/src/components/CvNotification/CvToastNotification.vue +6 -4
- package/src/components/CvOverflowMenu/CvOverflowMenu.stories.mdx +68 -12
- package/src/components/CvOverflowMenu/CvOverflowMenu.vue +39 -45
- package/src/components/CvOverflowMenu/CvOverflowMenuItem.vue +6 -11
- package/src/components/CvOverflowMenu/index.js +2 -1
- package/src/components/CvStructuredList/CvStructuredList.stories.js +141 -0
- package/src/components/CvStructuredList/CvStructuredList.vue +44 -0
- package/src/components/CvStructuredList/CvStructuredListData.vue +19 -0
- package/src/components/CvStructuredList/CvStructuredListHeading.vue +11 -0
- package/src/components/CvStructuredList/CvStructuredListItem.vue +47 -0
- package/src/components/CvStructuredList/CvStructuredListItemSelectable.vue +56 -0
- package/src/components/CvStructuredList/CvStructuredListItemStandard.vue +11 -0
- package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredList.spec.js.snap +73 -0
- package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListData.spec.js.snap +5 -0
- package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListHeading.spec.js.snap +9 -0
- package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListItem.spec.js.snap +7 -0
- package/src/components/CvStructuredList/index.js +12 -0
- package/src/components/CvTabs/CvTabs.stories.mdx +84 -3
- package/src/components/CvTabs/CvTabs.vue +3 -1
- package/src/components/CvTabs/__tests__/__snapshots__/CvTabs.spec.js.snap +24 -0
- package/src/components/CvTag/CvTag.stories.js +2 -1
- package/src/components/CvTag/CvTag.vue +10 -5
- package/src/components/CvTag/CvTagSkeleton.stories.js +39 -0
- package/src/components/CvTag/CvTagSkeleton.vue +20 -0
- package/src/components/CvTag/index.js +2 -1
- package/src/use/useRadio.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="skeleton" :class="tagClasses"
|
|
2
|
+
<div v-if="skeleton" :class="tagClasses"></div>
|
|
3
3
|
<div v-else :class="tagClasses" role="listitem" :title="title">
|
|
4
4
|
<span :class="`${carbonPrefix}--tag__label`">
|
|
5
5
|
{{ label }}
|
|
@@ -56,6 +56,10 @@ export default {
|
|
|
56
56
|
* skeleton used when loading
|
|
57
57
|
*/
|
|
58
58
|
skeleton: Boolean,
|
|
59
|
+
/**
|
|
60
|
+
* tag size small
|
|
61
|
+
*/
|
|
62
|
+
small: Boolean,
|
|
59
63
|
},
|
|
60
64
|
emits: [
|
|
61
65
|
/**
|
|
@@ -69,14 +73,15 @@ export default {
|
|
|
69
73
|
});
|
|
70
74
|
|
|
71
75
|
const tagClasses = computed(() => {
|
|
72
|
-
const classes = [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
];
|
|
76
|
+
const classes = [`${carbonPrefix}--tag`];
|
|
77
|
+
|
|
78
|
+
if (props.small) classes.push(`${carbonPrefix}--tag--sm`);
|
|
76
79
|
|
|
77
80
|
if (props.skeleton) {
|
|
78
81
|
classes.push(`${carbonPrefix}--skeleton`);
|
|
79
82
|
} else {
|
|
83
|
+
classes.push(`${carbonPrefix}--tag--${props.kind}`);
|
|
84
|
+
|
|
80
85
|
if (props.filter) {
|
|
81
86
|
classes.push(`${carbonPrefix}--tag--filter`);
|
|
82
87
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sbCompPrefix,
|
|
3
|
+
storyParametersObject,
|
|
4
|
+
} from '../../global/storybook-utils';
|
|
5
|
+
import CvTagSkeleton from './CvTagSkeleton.vue';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: `${sbCompPrefix}/CvTagSkeleton`,
|
|
9
|
+
component: CvTagSkeleton,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const template = `<cv-tag-skeleton v-bind="args"></cv-tag-skeleton>`;
|
|
13
|
+
const Template = (args, { argTypes }) => {
|
|
14
|
+
return {
|
|
15
|
+
props: Object.keys(argTypes),
|
|
16
|
+
components: { CvTagSkeleton },
|
|
17
|
+
template,
|
|
18
|
+
setup() {
|
|
19
|
+
return { args };
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Default = Template.bind({});
|
|
25
|
+
Default.parameters = storyParametersObject(
|
|
26
|
+
Default.parameters,
|
|
27
|
+
template,
|
|
28
|
+
Default.args
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export const Small = Template.bind({});
|
|
32
|
+
Small.args = {
|
|
33
|
+
small: true,
|
|
34
|
+
};
|
|
35
|
+
Small.parameters = storyParametersObject(
|
|
36
|
+
Small.parameters,
|
|
37
|
+
template,
|
|
38
|
+
Small.args
|
|
39
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CvTag skeleton :small="small" :label="''" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import CvTag from './CvTag.vue';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'CvTagSkeleton',
|
|
10
|
+
components: { CvTag },
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* tag size small
|
|
14
|
+
*/
|
|
15
|
+
small: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
</script>
|
package/src/use/useRadio.js
CHANGED