@carbon/vue 3.0.13 → 3.0.15
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 +9 -0
- package/dist/carbon-vue-3.common.js +884 -324
- package/dist/carbon-vue-3.common.js.map +1 -1
- package/dist/carbon-vue-3.umd.js +884 -324
- 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 +30 -3
- package/package.json +8 -5
- package/src/components/CvAccordion/CvAccordion.stories.mdx +11 -2
- package/src/components/CvAccordion/CvAccordionItem.vue +1 -1
- package/src/components/CvBreadcrumb/CvBreadcrumb.vue +1 -0
- package/src/components/CvBreadcrumb/CvBreadcrumbItem.vue +1 -0
- package/src/components/CvButton/CvButton.vue +1 -0
- package/src/components/CvButton/CvButtonSet.vue +1 -0
- package/src/components/CvButton/CvIconButton.vue +2 -1
- package/src/components/CvCheckbox/CvCheckbox.vue +2 -1
- package/src/components/CvCodeSnippet/CvCodeSnippet.vue +8 -3
- package/src/components/CvCodeSnippet/_CviCodeSnippetInline.vue +1 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue +1 -0
- package/src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue +1 -0
- package/src/components/CvComboBox/CvComboBox.vue +2 -1
- package/src/components/CvDataTable/CvDataTable.stories.mdx +26 -49
- package/src/components/CvDataTable/CvDataTable.vue +71 -52
- package/src/components/CvDataTable/CvDataTableRow.vue +11 -3
- package/src/components/CvDataTable/_CvDataTableRowInner.vue +18 -8
- package/src/components/CvDataTable/cvDataTableStore.js +1 -27
- package/src/components/CvDatePicker/CvDatePicker.stories.js +30 -6
- package/src/components/CvDatePicker/CvDatePicker.vue +24 -19
- package/src/components/CvDropdown/CvDropdown.stories.mdx +12 -2
- package/src/components/CvDropdown/CvDropdown.vue +4 -3
- package/src/components/CvFileUploader/CvFileUploader.vue +2 -2
- package/src/components/CvList/CvList.vue +1 -0
- package/src/components/CvList/CvListItem.vue +1 -1
- package/src/components/CvNotification/CvInlineNotification.vue +1 -0
- package/src/components/CvNotification/CvToastNotification.stories.js +65 -5
- package/src/components/CvNotification/CvToastNotification.vue +1 -0
- package/src/components/CvNotification/CvToastNotificationTemplate.mdx +17 -0
- package/src/components/CvNumberInput/CvNumberInput.vue +3 -3
- package/src/components/CvOverflowMenu/CvOverflowMenuItem.vue +2 -2
- package/src/components/CvPagination/CvPagination.stories.mdx +22 -15
- package/src/components/CvPagination/CvPagination.vue +16 -1
- package/src/components/CvProgress/CvProgress.stories.mdx +29 -7
- package/src/components/CvProgress/CvProgress.vue +1 -0
- package/src/components/CvProgress/CvProgressStep.vue +2 -0
- package/src/components/CvSlider/CvSlider.vue +1 -1
- package/src/components/CvTag/CvTag.stories.js +0 -2
- package/src/components/CvTag/CvTag.vue +6 -4
- package/src/index.js +112 -0
- package/telemetry.yml +8 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import DocumentationTemplate from './CvToastNotificationTemplate.mdx';
|
|
3
|
+
import { sbCompPrefix, storySourceCode } from '../../global/storybook-utils';
|
|
4
4
|
import { CvToastNotification, CvNotificationConsts } from '.';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -85,6 +85,11 @@ export default {
|
|
|
85
85
|
description: 'Caption slot for more custom content.',
|
|
86
86
|
},
|
|
87
87
|
},
|
|
88
|
+
parameters: {
|
|
89
|
+
docs: {
|
|
90
|
+
page: DocumentationTemplate,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
88
93
|
};
|
|
89
94
|
|
|
90
95
|
const template = `
|
|
@@ -118,58 +123,113 @@ const Template = args => {
|
|
|
118
123
|
};
|
|
119
124
|
};
|
|
120
125
|
|
|
121
|
-
export const
|
|
122
|
-
|
|
126
|
+
export const Default = Template.bind({});
|
|
127
|
+
Default.args = {
|
|
123
128
|
kind: CvNotificationConsts.notificationKinds[0],
|
|
129
|
+
title: 'info',
|
|
130
|
+
subTitle: 'subtitle',
|
|
131
|
+
caption: 'more information',
|
|
132
|
+
};
|
|
133
|
+
Default.parameters = {
|
|
134
|
+
docs: { source: { code: storySourceCode(template, Default.args) } },
|
|
124
135
|
};
|
|
125
136
|
|
|
126
137
|
export const InfoSquare = Template.bind({});
|
|
127
138
|
InfoSquare.storyName = 'Info square';
|
|
128
139
|
InfoSquare.args = {
|
|
129
140
|
kind: CvNotificationConsts.notificationKinds[1],
|
|
141
|
+
title: 'info²',
|
|
142
|
+
subTitle: 'subtitle',
|
|
143
|
+
caption: 'more information',
|
|
144
|
+
};
|
|
145
|
+
InfoSquare.parameters = {
|
|
146
|
+
docs: { source: { code: storySourceCode(template, InfoSquare.args) } },
|
|
130
147
|
};
|
|
131
148
|
|
|
132
149
|
export const Success = Template.bind({});
|
|
133
150
|
Success.args = {
|
|
134
151
|
kind: CvNotificationConsts.notificationKinds[2],
|
|
152
|
+
title: 'success',
|
|
153
|
+
subTitle: 'subtitle',
|
|
154
|
+
caption: 'more information',
|
|
155
|
+
};
|
|
156
|
+
Success.parameters = {
|
|
157
|
+
docs: { source: { code: storySourceCode(template, Success.args) } },
|
|
135
158
|
};
|
|
136
|
-
|
|
137
159
|
export const Warning = Template.bind({});
|
|
138
160
|
Warning.args = {
|
|
139
161
|
kind: CvNotificationConsts.notificationKinds[3],
|
|
162
|
+
title: 'warning',
|
|
163
|
+
subTitle: 'subtitle',
|
|
164
|
+
caption: 'more information',
|
|
165
|
+
};
|
|
166
|
+
Warning.parameters = {
|
|
167
|
+
docs: { source: { code: storySourceCode(template, Warning.args) } },
|
|
140
168
|
};
|
|
141
169
|
|
|
142
170
|
export const WarningAlt = Template.bind({});
|
|
143
171
|
WarningAlt.storyName = 'Warning (alt)';
|
|
144
172
|
WarningAlt.args = {
|
|
145
173
|
kind: CvNotificationConsts.notificationKinds[4],
|
|
174
|
+
title: 'warning △',
|
|
175
|
+
subTitle: 'subtitle',
|
|
176
|
+
caption: 'more information',
|
|
177
|
+
};
|
|
178
|
+
WarningAlt.parameters = {
|
|
179
|
+
docs: { source: { code: storySourceCode(template, WarningAlt.args) } },
|
|
146
180
|
};
|
|
147
181
|
|
|
148
182
|
export const Error = Template.bind({});
|
|
149
183
|
Error.args = {
|
|
150
184
|
kind: CvNotificationConsts.notificationKinds[5],
|
|
185
|
+
title: 'error',
|
|
186
|
+
subTitle: 'subtitle',
|
|
187
|
+
caption: 'more information',
|
|
188
|
+
};
|
|
189
|
+
Error.parameters = {
|
|
190
|
+
docs: { source: { code: storySourceCode(template, Error.args) } },
|
|
151
191
|
};
|
|
152
192
|
|
|
153
193
|
export const SlotDefault = Template.bind({});
|
|
154
194
|
SlotDefault.args = {
|
|
155
195
|
kind: CvNotificationConsts.notificationKinds[4],
|
|
196
|
+
title: 'title',
|
|
197
|
+
subTitle: 'subtitle',
|
|
156
198
|
defaultSlot: true,
|
|
157
199
|
};
|
|
200
|
+
SlotDefault.parameters = {
|
|
201
|
+
docs: { source: { code: storySourceCode(template, SlotDefault.args) } },
|
|
202
|
+
};
|
|
158
203
|
|
|
159
204
|
export const SlotTitle = Template.bind({});
|
|
160
205
|
SlotTitle.args = {
|
|
161
206
|
kind: CvNotificationConsts.notificationKinds[0],
|
|
162
207
|
titleSlot: true,
|
|
208
|
+
subTitle: 'subtitle',
|
|
209
|
+
caption: 'more information',
|
|
210
|
+
};
|
|
211
|
+
SlotTitle.parameters = {
|
|
212
|
+
docs: { source: { code: storySourceCode(template, SlotTitle.args) } },
|
|
163
213
|
};
|
|
164
214
|
|
|
165
215
|
export const SlotSubtitle = Template.bind({});
|
|
166
216
|
SlotSubtitle.args = {
|
|
167
217
|
kind: CvNotificationConsts.notificationKinds[3],
|
|
168
218
|
subtitleSlot: true,
|
|
219
|
+
title: 'title',
|
|
220
|
+
caption: 'more information',
|
|
221
|
+
};
|
|
222
|
+
SlotSubtitle.parameters = {
|
|
223
|
+
docs: { source: { code: storySourceCode(template, SlotSubtitle.args) } },
|
|
169
224
|
};
|
|
170
225
|
|
|
171
226
|
export const SlotCaption = Template.bind({});
|
|
172
227
|
SlotCaption.args = {
|
|
173
228
|
kind: CvNotificationConsts.notificationKinds[1],
|
|
174
229
|
captionSlot: true,
|
|
230
|
+
title: 'title',
|
|
231
|
+
subTitle: 'subtitle',
|
|
232
|
+
};
|
|
233
|
+
SlotCaption.parameters = {
|
|
234
|
+
docs: { source: { code: storySourceCode(template, SlotCaption.args) } },
|
|
175
235
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, Title, Primary, Stories } from '@storybook/addon-docs';
|
|
2
|
+
|
|
3
|
+
<Meta isTemplate />
|
|
4
|
+
|
|
5
|
+
<Title />
|
|
6
|
+
|
|
7
|
+
Migration notes:
|
|
8
|
+
|
|
9
|
+
- **Breaking**. The `subTitle` property no longer renders html. Please use the `subtitle` slot instead.
|
|
10
|
+
- **Breaking**. The `caption` property no longer renders html. Please use the `caption` slot instead.
|
|
11
|
+
- The `title` content can now be provided in the `title` slot.
|
|
12
|
+
|
|
13
|
+
<Primary />
|
|
14
|
+
|
|
15
|
+
<Controls />
|
|
16
|
+
|
|
17
|
+
<Stories />
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
:data-invalid="isInvalid || null"
|
|
39
39
|
type="number"
|
|
40
40
|
v-bind="$attrs"
|
|
41
|
-
:disabled="disabled"
|
|
41
|
+
:disabled="disabled || null"
|
|
42
42
|
:step="step"
|
|
43
43
|
:min="min"
|
|
44
44
|
:max="max"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
:class="`${carbonPrefix}--number__control-btn down-icon`"
|
|
54
54
|
type="button"
|
|
55
55
|
:aria-label="ariaLabelForDownButton"
|
|
56
|
-
:disabled="disabled"
|
|
56
|
+
:disabled="disabled || null"
|
|
57
57
|
aria-live="polite"
|
|
58
58
|
aria-atomic="true"
|
|
59
59
|
@click="doDown"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
:class="`${carbonPrefix}--number__control-btn up-icon`"
|
|
68
68
|
type="button"
|
|
69
69
|
:aria-label="ariaLabelForUpButton"
|
|
70
|
-
:disabled="disabled"
|
|
70
|
+
:disabled="disabled || null"
|
|
71
71
|
aria-live="polite"
|
|
72
72
|
aria-atomic="true"
|
|
73
73
|
@click="doUp"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<button
|
|
14
14
|
type="button"
|
|
15
15
|
:class="`${carbonPrefix}--overflow-menu-options__btn`"
|
|
16
|
-
:data-floating-menu-primary-focus="primaryFocus"
|
|
17
|
-
:disabled="disabled"
|
|
16
|
+
:data-floating-menu-primary-focus="primaryFocus || null"
|
|
17
|
+
:disabled="disabled || null"
|
|
18
18
|
@click="onClick"
|
|
19
19
|
>
|
|
20
20
|
<span :class="`${carbonPrefix}--overflow-menu-options__option-content`">
|
|
@@ -2,6 +2,10 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
|
2
2
|
import { CvPagination } from '.';
|
|
3
3
|
import { sbCompPrefix } from '../../global/storybook-utils';
|
|
4
4
|
import { action } from '@storybook/addon-actions';
|
|
5
|
+
import { ref } from 'vue';
|
|
6
|
+
const myPage=ref(1);
|
|
7
|
+
const myPageSizes=ref([5,7,10,11,13])
|
|
8
|
+
const myNumItems=ref(13)
|
|
5
9
|
|
|
6
10
|
<Meta title={`${sbCompPrefix}/CvPagination`} component={CvPagination} />
|
|
7
11
|
|
|
@@ -14,6 +18,9 @@ export const Template = args => ({
|
|
|
14
18
|
setup() {
|
|
15
19
|
return {
|
|
16
20
|
...args,
|
|
21
|
+
myPage,
|
|
22
|
+
myPageSizes,
|
|
23
|
+
myNumItems,
|
|
17
24
|
onChange: action('change'),
|
|
18
25
|
};
|
|
19
26
|
},
|
|
@@ -27,13 +34,22 @@ const defaultTemplate = `
|
|
|
27
34
|
:forward-text="forwardText"
|
|
28
35
|
:page-number-label="pageNumberLabel"
|
|
29
36
|
:page-sizes-label="pageSizesLabel"
|
|
30
|
-
:number-of-items="
|
|
37
|
+
:number-of-items="myNumItems"
|
|
31
38
|
:actual-items-on-page="actualItemsOnPage"
|
|
32
|
-
:page="
|
|
33
|
-
:page-sizes="
|
|
39
|
+
:page="myPage"
|
|
40
|
+
:page-sizes="myPageSizes"
|
|
34
41
|
:backwards-button-disabled="backwardsButtonDisabled"
|
|
35
42
|
:forwards-button-disabled="forwardsButtonDisabled">
|
|
36
43
|
</cv-pagination>
|
|
44
|
+
<div style="margin-top:2rem; background-color: #888888; padding:1rem">
|
|
45
|
+
<h3>Reactive properties</h3>
|
|
46
|
+
page: <button @click="myPage--">← prev page</button>
|
|
47
|
+
<button @click="myPage++">next page →</button><br/>
|
|
48
|
+
page-sizes: <button @click="myPageSizes=[5,10]">change page sizes to [5,10]</button>
|
|
49
|
+
<button @click="myPageSizes=[10,20,30,40,50]">change page sizes to [10,20,30,40,50]</button><br/>
|
|
50
|
+
number-of-items: <button @click="myNumItems=4">Set total items = 4</button>
|
|
51
|
+
<button @click="myNumItems=103">Set total items = 103</button>
|
|
52
|
+
</div>
|
|
37
53
|
`;
|
|
38
54
|
const slotsTemplate = `
|
|
39
55
|
<cv-pagination
|
|
@@ -87,23 +103,14 @@ Migration notes:
|
|
|
87
103
|
forwardText: undefined,
|
|
88
104
|
pageNumberLabel: undefined,
|
|
89
105
|
pageSizesLabel: undefined,
|
|
90
|
-
numberOfItems: 103,
|
|
91
|
-
page: 2,
|
|
92
|
-
pageSizes: [
|
|
93
|
-
10,
|
|
94
|
-
{
|
|
95
|
-
value: 20,
|
|
96
|
-
selected: true,
|
|
97
|
-
},
|
|
98
|
-
30,
|
|
99
|
-
40,
|
|
100
|
-
50,
|
|
101
|
-
],
|
|
102
106
|
backwardsButtonDisabled: false,
|
|
103
107
|
forwardsButtonDisabled: false,
|
|
104
108
|
actualItemsOnPage: Infinity,
|
|
105
109
|
}}
|
|
106
110
|
argTypes={{
|
|
111
|
+
page: { control: false },
|
|
112
|
+
pageSizes: { control: false },
|
|
113
|
+
numberOfItems: { control: false }
|
|
107
114
|
}}
|
|
108
115
|
>
|
|
109
116
|
{Template.bind({})}
|
|
@@ -156,15 +156,30 @@ const internalValue = computed(() => {
|
|
|
156
156
|
};
|
|
157
157
|
});
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
function adjustValues() {
|
|
160
160
|
pageSizeValue.value = newPageSizeValue(props.pageSizes);
|
|
161
161
|
pageCount.value = newPageCount(props.numberOfItems, pageSizeValue.value);
|
|
162
162
|
pageValue.value = newPageValue(props.page, pageCount.value);
|
|
163
163
|
pages.value = newPagesArray(pageCount.value);
|
|
164
164
|
firstItem.value = newFirstItem(pageValue.value, pageSizeValue.value);
|
|
165
|
+
}
|
|
166
|
+
onMounted(() => {
|
|
167
|
+
adjustValues();
|
|
165
168
|
// always emit on mount
|
|
166
169
|
emit('change', internalValue.value);
|
|
167
170
|
});
|
|
171
|
+
watch(
|
|
172
|
+
() => props.pageSizes,
|
|
173
|
+
() => adjustValues()
|
|
174
|
+
);
|
|
175
|
+
watch(
|
|
176
|
+
() => props.page,
|
|
177
|
+
() => adjustValues()
|
|
178
|
+
);
|
|
179
|
+
watch(
|
|
180
|
+
() => props.numberOfItems,
|
|
181
|
+
() => adjustValues()
|
|
182
|
+
);
|
|
168
183
|
|
|
169
184
|
function onPageChange(newVal) {
|
|
170
185
|
pageValue.value = parseInt(newVal, 10);
|
|
@@ -4,6 +4,19 @@ import { Time20 as TimeIcon } from '@carbon/icons-vue';
|
|
|
4
4
|
// noinspection ES6PreferShortImport
|
|
5
5
|
import { sbCompPrefix } from '../../global/storybook-utils';
|
|
6
6
|
import { action } from '@storybook/addon-actions';
|
|
7
|
+
import {ref } from "vue";
|
|
8
|
+
const step3Invalid = ref(false)
|
|
9
|
+
const step4Disable = ref(false)
|
|
10
|
+
const step5Complete = ref(false)
|
|
11
|
+
function onStep4Disable() {
|
|
12
|
+
step4Disable.value = !step4Disable.value
|
|
13
|
+
}
|
|
14
|
+
function onStep3Invalid() {
|
|
15
|
+
step3Invalid.value = !step3Invalid.value
|
|
16
|
+
}
|
|
17
|
+
function onStep5Complete() {
|
|
18
|
+
step5Complete.value = !step5Complete.value
|
|
19
|
+
}
|
|
7
20
|
|
|
8
21
|
<Meta title={`${sbCompPrefix}/CvProgress`} component={CvProgress} />
|
|
9
22
|
|
|
@@ -31,6 +44,12 @@ export const Template = args => ({
|
|
|
31
44
|
invalidIds: args.invalidIds,
|
|
32
45
|
disabledIds: args.disabledIds,
|
|
33
46
|
onStepClicked: action('step-clicked'),
|
|
47
|
+
step3Invalid,
|
|
48
|
+
onStep3Invalid,
|
|
49
|
+
step4Disable,
|
|
50
|
+
onStep4Disable,
|
|
51
|
+
step5Complete,
|
|
52
|
+
onStep5Complete,
|
|
34
53
|
};
|
|
35
54
|
},
|
|
36
55
|
// And then the `args` are bound to your component with `v-bind="args"`
|
|
@@ -79,7 +98,7 @@ const slotTemplate = `
|
|
|
79
98
|
id="step-3"
|
|
80
99
|
:label="step3"
|
|
81
100
|
:complete="completeIds.includes('step-3')"
|
|
82
|
-
:invalid="
|
|
101
|
+
:invalid="step3Invalid"
|
|
83
102
|
:disabled="disabledIds.includes('step-3')"
|
|
84
103
|
additionalInfo="save the world"
|
|
85
104
|
@step-clicked="onStepClicked"
|
|
@@ -90,7 +109,7 @@ const slotTemplate = `
|
|
|
90
109
|
:label="step4"
|
|
91
110
|
:complete="completeIds.includes('step-4')"
|
|
92
111
|
:invalid="invalidIds.includes('step-4')"
|
|
93
|
-
:disabled="
|
|
112
|
+
:disabled="step4Disable"
|
|
94
113
|
additionalInfo="Twins Dennys and Sandy"
|
|
95
114
|
@step-clicked="onStepClicked"
|
|
96
115
|
>
|
|
@@ -98,7 +117,7 @@ const slotTemplate = `
|
|
|
98
117
|
<cv-progress-step
|
|
99
118
|
id="step-5"
|
|
100
119
|
:label="step5"
|
|
101
|
-
:complete="
|
|
120
|
+
:complete="step5Complete"
|
|
102
121
|
:invalid="invalidIds.includes('step-5')"
|
|
103
122
|
:disabled="disabledIds.includes('step-5')"
|
|
104
123
|
additionalInfo="with Polyhymnia O'Keefe"
|
|
@@ -106,6 +125,9 @@ const slotTemplate = `
|
|
|
106
125
|
>
|
|
107
126
|
</cv-progress-step>
|
|
108
127
|
</cv-progress>
|
|
128
|
+
<div><button @click=onStep3Invalid>Toggle step 3 invalid</button></div>
|
|
129
|
+
<div><button @click=onStep4Disable>Toggle step 4 disabled</button></div>
|
|
130
|
+
<div><button @click=onStep5Complete>Toggle step 5 complete</button></div>
|
|
109
131
|
`;
|
|
110
132
|
const skeletonTemplate = `<cv-progress-skeleton :vertical="vertical" />`;
|
|
111
133
|
|
|
@@ -187,15 +209,15 @@ Use `cv-progress-step` for more control over the display.
|
|
|
187
209
|
},
|
|
188
210
|
disabledIds: {
|
|
189
211
|
control: 'multi-select',
|
|
190
|
-
options: ['step-1', 'step-2', 'step-3', 'step-
|
|
212
|
+
options: ['step-1', 'step-2', 'step-3', 'step-5'],
|
|
191
213
|
},
|
|
192
214
|
completeIds: {
|
|
193
215
|
control: 'multi-select',
|
|
194
|
-
options: ['step-1', 'step-2', 'step-3', 'step-4'
|
|
216
|
+
options: ['step-1', 'step-2', 'step-3', 'step-4'],
|
|
195
217
|
},
|
|
196
218
|
invalidIds: {
|
|
197
219
|
control: 'multi-select',
|
|
198
|
-
options: ['step-1', 'step-2', 'step-
|
|
220
|
+
options: ['step-1', 'step-2', 'step-4', 'step-5'],
|
|
199
221
|
},
|
|
200
222
|
}}
|
|
201
223
|
>
|
|
@@ -221,4 +243,4 @@ Use `cv-progress-step` for more control over the display.
|
|
|
221
243
|
>
|
|
222
244
|
{Template.bind({})}
|
|
223
245
|
</Story>
|
|
224
|
-
</Canvas>
|
|
246
|
+
</Canvas>
|
|
@@ -106,6 +106,8 @@ function checkCurrentStep() {
|
|
|
106
106
|
onMounted(checkCurrentStep);
|
|
107
107
|
watch(currentStep, checkCurrentStep);
|
|
108
108
|
watch(completedSteps, checkCurrentStep);
|
|
109
|
+
watch(() => props.complete, checkCurrentStep);
|
|
110
|
+
watch(() => props.disabled, checkCurrentStep);
|
|
109
111
|
|
|
110
112
|
onBeforeUnmount(() => {
|
|
111
113
|
const index = progressSteps.value.findIndex(step => step.uid === uid.value);
|
|
@@ -31,7 +31,6 @@ const Template = (args, { argTypes }) => {
|
|
|
31
31
|
|
|
32
32
|
export const Default = Template.bind({});
|
|
33
33
|
Default.args = {
|
|
34
|
-
kind: 'red',
|
|
35
34
|
label: 'This is a tag',
|
|
36
35
|
filter: false,
|
|
37
36
|
};
|
|
@@ -43,7 +42,6 @@ Default.parameters = storyParametersObject(
|
|
|
43
42
|
|
|
44
43
|
export const Filter = Template.bind({});
|
|
45
44
|
Filter.args = {
|
|
46
|
-
kind: 'teal',
|
|
47
45
|
label: 'This is a tag',
|
|
48
46
|
filter: true,
|
|
49
47
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
v-if="filter"
|
|
9
9
|
:class="`${carbonPrefix}--tag__close-icon`"
|
|
10
10
|
:aria-label="clearAriaLabel"
|
|
11
|
-
:disabled="disabled"
|
|
11
|
+
:disabled="disabled || null"
|
|
12
12
|
@click.stop.prevent="onRemove"
|
|
13
13
|
>
|
|
14
14
|
<Close16 />
|
|
@@ -40,7 +40,7 @@ export default {
|
|
|
40
40
|
*/
|
|
41
41
|
kind: {
|
|
42
42
|
type: String,
|
|
43
|
-
default:
|
|
43
|
+
default: undefined,
|
|
44
44
|
validator(val) {
|
|
45
45
|
return tagKinds.includes(val);
|
|
46
46
|
},
|
|
@@ -73,14 +73,16 @@ export default {
|
|
|
73
73
|
});
|
|
74
74
|
|
|
75
75
|
const tagClasses = computed(() => {
|
|
76
|
-
const classes = [
|
|
76
|
+
const classes = [`cv-tag ${carbonPrefix}--tag`];
|
|
77
77
|
|
|
78
78
|
if (props.small) classes.push(`${carbonPrefix}--tag--sm`);
|
|
79
79
|
|
|
80
80
|
if (props.skeleton) {
|
|
81
81
|
classes.push(`${carbonPrefix}--skeleton`);
|
|
82
82
|
} else {
|
|
83
|
-
|
|
83
|
+
if (props.kind) {
|
|
84
|
+
classes.push(`${carbonPrefix}--tag--${props.kind}`);
|
|
85
|
+
}
|
|
84
86
|
|
|
85
87
|
if (props.filter) {
|
|
86
88
|
classes.push(`${carbonPrefix}--tag--filter`);
|
package/src/index.js
CHANGED
|
@@ -43,3 +43,115 @@ export default {
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
+
export { default as CvAccordion } from './components/CvAccordion/CvAccordion.vue';
|
|
47
|
+
export { default as CvAccordionItem } from './components/CvAccordion/CvAccordionItem.vue';
|
|
48
|
+
export { default as CvAccordionSkeleton } from './components/CvAccordion/CvAccordionSkeleton.vue';
|
|
49
|
+
export { default as CvAspectRatio } from './components/CvAspectRatio/CvAspectRatio.vue';
|
|
50
|
+
export { default as CvBreadcrumb } from './components/CvBreadcrumb/CvBreadcrumb.vue';
|
|
51
|
+
export { default as CvBreadcrumbItem } from './components/CvBreadcrumb/CvBreadcrumbItem.vue';
|
|
52
|
+
export { default as CvBreadcrumbSkeleton } from './components/CvBreadcrumb/CvBreadcrumbSkeleton.vue';
|
|
53
|
+
export { default as CvBreadcrumbSkeletonItem } from './components/CvBreadcrumb/CvBreadcrumbSkeletonItem.vue';
|
|
54
|
+
export { default as CvButton } from './components/CvButton/CvButton.vue';
|
|
55
|
+
export { default as CvButtonSet } from './components/CvButton/CvButtonSet.vue';
|
|
56
|
+
export { default as CvButtonSkeleton } from './components/CvButton/CvButtonSkeleton.vue';
|
|
57
|
+
export { default as CvIconButton } from './components/CvButton/CvIconButton.vue';
|
|
58
|
+
export { default as CvCheckbox } from './components/CvCheckbox/CvCheckbox.vue';
|
|
59
|
+
export { default as CvCheckboxSkeleton } from './components/CvCheckbox/CvCheckboxSkeleton.vue';
|
|
60
|
+
export { default as CvCodeSnippet } from './components/CvCodeSnippet/CvCodeSnippet.vue';
|
|
61
|
+
export { default as CvCodeSnippetSkeleton } from './components/CvCodeSnippet/CvCodeSnippetSkeleton.vue';
|
|
62
|
+
export { default as CvComboBox } from './components/CvComboBox/CvComboBox.vue';
|
|
63
|
+
export { default as CvContentSwitcher } from './components/CvContentSwitcher/CvContentSwitcher.vue';
|
|
64
|
+
export { default as CvContentSwitcherButton } from './components/CvContentSwitcher/CvContentSwitcherButton.vue';
|
|
65
|
+
export { default as CvContentSwitcherContent } from './components/CvContentSwitcher/CvContentSwitcherContent.vue';
|
|
66
|
+
export { default as CvCopyButton } from './components/CvCopyButton/CvCopyButton.vue';
|
|
67
|
+
export { default as CvDataTable } from './components/CvDataTable/CvDataTable.vue';
|
|
68
|
+
export { default as CvDataTableAction } from './components/CvDataTable/CvDataTableAction.vue';
|
|
69
|
+
export { default as CvDataTableCell } from './components/CvDataTable/CvDataTableCell.vue';
|
|
70
|
+
export { default as CvDataTableHeading } from './components/CvDataTable/CvDataTableHeading.vue';
|
|
71
|
+
export { default as CvDataTableRow } from './components/CvDataTable/CvDataTableRow.vue';
|
|
72
|
+
export { default as CvDataTableSkeleton } from './components/CvDataTable/CvDataTableSkeleton.vue';
|
|
73
|
+
export { default as CvDatePicker } from './components/CvDatePicker/CvDatePicker.vue';
|
|
74
|
+
export { default as CvDatePickerSkeleton } from './components/CvDatePicker/CvDatePickerSkeleton.vue';
|
|
75
|
+
export { default as CvDropdown } from './components/CvDropdown/CvDropdown.vue';
|
|
76
|
+
export { default as CvDropdownItem } from './components/CvDropdown/CvDropdownItem.vue';
|
|
77
|
+
export { default as CvDropdownSkeleton } from './components/CvDropdown/CvDropdownSkeleton.vue';
|
|
78
|
+
export { default as CvFileUploader } from './components/CvFileUploader/CvFileUploader.vue';
|
|
79
|
+
export { default as CvFileUploaderItem } from './components/CvFileUploader/CvFileUploaderItem.vue';
|
|
80
|
+
export { default as CvFileUploaderSkeleton } from './components/CvFileUploader/CvFileUploaderSkeleton.vue';
|
|
81
|
+
export { default as CvForm } from './components/CvForm/CvForm.vue';
|
|
82
|
+
export { default as CvFormGroup } from './components/CvForm/CvFormGroup.vue';
|
|
83
|
+
export { default as CvFormItem } from './components/CvForm/CvFormItem.vue';
|
|
84
|
+
export { default as CvColumn } from './components/CvGrid/CvColumn.vue';
|
|
85
|
+
export { default as CvGrid } from './components/CvGrid/CvGrid.vue';
|
|
86
|
+
export { default as CvRow } from './components/CvGrid/CvRow.vue';
|
|
87
|
+
export { default as CvInlineLoading } from './components/CvInlineLoading/CvInlineLoading.vue';
|
|
88
|
+
export { default as CvLink } from './components/CvLink/CvLink.vue';
|
|
89
|
+
export { default as CvList } from './components/CvList/CvList.vue';
|
|
90
|
+
export { default as CvListItem } from './components/CvList/CvListItem.vue';
|
|
91
|
+
export { default as CvLoading } from './components/CvLoading/CvLoading.vue';
|
|
92
|
+
export { default as CvModal } from './components/CvModal/CvModal.vue';
|
|
93
|
+
export { default as CvMultiSelect } from './components/CvMultiSelect/CvMultiSelect.vue';
|
|
94
|
+
export { default as CvInlineNotification } from './components/CvNotification/CvInlineNotification.vue';
|
|
95
|
+
export { default as CvToastNotification } from './components/CvNotification/CvToastNotification.vue';
|
|
96
|
+
export { default as CvNumberInput } from './components/CvNumberInput/CvNumberInput.vue';
|
|
97
|
+
export { default as CvNumberInputSkeleton } from './components/CvNumberInput/CvNumberInputSkeleton.vue';
|
|
98
|
+
export { default as CvOverflowMenu } from './components/CvOverflowMenu/CvOverflowMenu.vue';
|
|
99
|
+
export { default as CvOverflowMenuItem } from './components/CvOverflowMenu/CvOverflowMenuItem.vue';
|
|
100
|
+
export { default as CvPagination } from './components/CvPagination/CvPagination.vue';
|
|
101
|
+
export { default as CvProgress } from './components/CvProgress/CvProgress.vue';
|
|
102
|
+
export { default as CvProgressSkeleton } from './components/CvProgress/CvProgressSkeleton.vue';
|
|
103
|
+
export { default as CvProgressStep } from './components/CvProgress/CvProgressStep.vue';
|
|
104
|
+
export { default as CvRadioButton } from './components/CvRadioButton/CvRadioButton.vue';
|
|
105
|
+
export { default as CvRadioGroup } from './components/CvRadioButton/CvRadioGroup.vue';
|
|
106
|
+
export { default as CvSearch } from './components/CvSearch/CvSearch.vue';
|
|
107
|
+
export { default as CvSelect } from './components/CvSelect/CvSelect.vue';
|
|
108
|
+
export { default as CvSelectOptgroup } from './components/CvSelect/CvSelectOptgroup.vue';
|
|
109
|
+
export { default as CvSelectOption } from './components/CvSelect/CvSelectOption.vue';
|
|
110
|
+
export { default as CvSkeletonText } from './components/CvSkeletonText/CvSkeletonText.vue';
|
|
111
|
+
export { default as CvSlider } from './components/CvSlider/CvSlider.vue';
|
|
112
|
+
export { default as CvSliderSkeleton } from './components/CvSlider/CvSliderSkeleton.vue';
|
|
113
|
+
export { default as CvStructuredList } from './components/CvStructuredList/CvStructuredList.vue';
|
|
114
|
+
export { default as CvStructuredListData } from './components/CvStructuredList/CvStructuredListData.vue';
|
|
115
|
+
export { default as CvStructuredListHeading } from './components/CvStructuredList/CvStructuredListHeading.vue';
|
|
116
|
+
export { default as CvStructuredListItem } from './components/CvStructuredList/CvStructuredListItem.vue';
|
|
117
|
+
export { default as CvStructuredListItemSelectable } from './components/CvStructuredList/CvStructuredListItemSelectable.vue';
|
|
118
|
+
export { default as CvStructuredListItemStandard } from './components/CvStructuredList/CvStructuredListItemStandard.vue';
|
|
119
|
+
export { default as CvTab } from './components/CvTabs/CvTab.vue';
|
|
120
|
+
export { default as CvTabs } from './components/CvTabs/CvTabs.vue';
|
|
121
|
+
export { default as CvTabsSkeleton } from './components/CvTabs/CvTabsSkeleton.vue';
|
|
122
|
+
export { default as CvTag } from './components/CvTag/CvTag.vue';
|
|
123
|
+
export { default as CvTagSkeleton } from './components/CvTag/CvTagSkeleton.vue';
|
|
124
|
+
export { default as CvTextArea } from './components/CvTextArea/CvTextArea.vue';
|
|
125
|
+
export { default as CvTextAreaSkeleton } from './components/CvTextArea/CvTextAreaSkeleton.vue';
|
|
126
|
+
export { default as CvTextInput } from './components/CvTextInput/CvTextInput.vue';
|
|
127
|
+
export { default as CvTextInputSkeleton } from './components/CvTextInput/CvTextInputSkeleton.vue';
|
|
128
|
+
export { default as CvTile } from './components/CvTile/CvTile.vue';
|
|
129
|
+
export { default as CvTileClickable } from './components/CvTile/CvTileClickable.vue';
|
|
130
|
+
export { default as CvTileExpandable } from './components/CvTile/CvTileExpandable.vue';
|
|
131
|
+
export { default as CvTileSelectable } from './components/CvTile/CvTileSelectable.vue';
|
|
132
|
+
export { default as CvTileStandard } from './components/CvTile/CvTileStandard.vue';
|
|
133
|
+
export { default as CvTimePicker } from './components/CvTimePicker/CvTimePicker.vue';
|
|
134
|
+
export { default as CvToggleSkeleton } from './components/CvToggle/CvToggle-Skeleton.vue';
|
|
135
|
+
export { default as CvToggle } from './components/CvToggle/CvToggle.vue';
|
|
136
|
+
export { default as CvDefinitionTooltip } from './components/CvTooltip/CvDefinitionTooltip.vue';
|
|
137
|
+
export { default as CvInteractiveTooltip } from './components/CvTooltip/CvInteractiveTooltip.vue';
|
|
138
|
+
export { default as CvTooltip } from './components/CvTooltip/CvTooltip.vue';
|
|
139
|
+
export { default as CvHeader } from './components/CvUIShell/CvHeader.vue';
|
|
140
|
+
export { default as CvHeaderGlobalAction } from './components/CvUIShell/CvHeaderGlobalAction.vue';
|
|
141
|
+
export { default as CvHeaderMenu } from './components/CvUIShell/CvHeaderMenu.vue';
|
|
142
|
+
export { default as CvHeaderMenuButton } from './components/CvUIShell/CvHeaderMenuButton.vue';
|
|
143
|
+
export { default as CvHeaderMenuItem } from './components/CvUIShell/CvHeaderMenuItem.vue';
|
|
144
|
+
export { default as CvHeaderName } from './components/CvUIShell/CvHeaderName.vue';
|
|
145
|
+
export { default as CvHeaderNav } from './components/CvUIShell/CvHeaderNav.vue';
|
|
146
|
+
export { default as CvHeaderPanel } from './components/CvUIShell/CvHeaderPanel.vue';
|
|
147
|
+
export { default as CvSideNav } from './components/CvUIShell/CvSideNav.vue';
|
|
148
|
+
export { default as CvSideNavIcon } from './components/CvUIShell/CvSideNavIcon.vue';
|
|
149
|
+
export { default as CvSideNavItems } from './components/CvUIShell/CvSideNavItems.vue';
|
|
150
|
+
export { default as CvSideNavLink } from './components/CvUIShell/CvSideNavLink.vue';
|
|
151
|
+
export { default as CvSideNavMenu } from './components/CvUIShell/CvSideNavMenu.vue';
|
|
152
|
+
export { default as CvSideNavMenuDivider } from './components/CvUIShell/CvSideNavMenuDivider.vue';
|
|
153
|
+
export { default as CvSideNavMenuItem } from './components/CvUIShell/CvSideNavMenuItem.vue';
|
|
154
|
+
export { default as CvSkipToContent } from './components/CvUIShell/CvSkipToContent.vue';
|
|
155
|
+
export { default as CvSwitcher } from './components/CvUIShell/CvSwitcher.vue';
|
|
156
|
+
export { default as CvSwitcherItem } from './components/CvUIShell/CvSwitcherItem.vue';
|
|
157
|
+
export { default as CvSwitcherItemLink } from './components/CvUIShell/CvSwitcherItemLink.vue';
|
package/telemetry.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://unpkg.com/@ibm/telemetry-config-schema@v1/dist/config.schema.json
|
|
2
|
+
|
|
3
|
+
version: 1
|
|
4
|
+
projectId: 084968c7-d247-4ddb-bc07-cbdbe57fdd43
|
|
5
|
+
endpoint: https://collector-prod.1am6wm210aow.us-south.codeengine.appdomain.cloud/v1/metrics
|
|
6
|
+
collect:
|
|
7
|
+
npm:
|
|
8
|
+
dependencies: null
|