@carbon/vue 3.0.9 → 3.0.10
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 +19590 -19300
- package/dist/carbon-vue-3.common.js.map +1 -1
- package/dist/carbon-vue-3.css +1 -1
- package/dist/carbon-vue-3.umd.js +19541 -19251
- package/dist/carbon-vue-3.umd.js.map +1 -1
- package/dist/carbon-vue-3.umd.min.js +3 -3
- package/dist/carbon-vue-3.umd.min.js.map +1 -1
- package/dist/web-types.json +5477 -0
- package/package.json +10 -42
- package/src/components/CvAccordion/CvAccordionItem.vue +1 -1
- package/src/components/CvButton/CvButton.stories.js +1 -1
- package/src/components/CvButton/CvButton.vue +2 -2
- package/src/components/CvButton/CvIconButton.stories.js +14 -17
- package/src/components/CvButton/CvIconButton.vue +8 -7
- package/src/components/CvCheckbox/CvCheckbox.vue +4 -3
- package/src/components/CvCodeSnippet/CvCodeSnippet.vue +5 -5
- package/src/components/CvCodeSnippet/_CviCodeSnippetInline.vue +2 -2
- package/src/components/CvCodeSnippet/_CviCodeSnippetMultiline.vue +6 -6
- package/src/components/CvCodeSnippet/_CviCodeSnippetOneline.vue +3 -3
- package/src/components/CvComboBox/CvComboBox.vue +8 -8
- package/src/components/CvContentSwitcher/CvContentSwitcher.vue +1 -1
- package/src/components/CvContentSwitcher/CvContentSwitcherButton.vue +1 -1
- package/src/components/CvCopyButton/CvCopyButton.vue +1 -1
- package/src/components/CvCopyButton/_CviCopyButton.vue +2 -2
- package/src/components/CvDataTable/CvDataTable.vue +29 -27
- package/src/components/CvDataTable/CvDataTableHeading.vue +9 -9
- package/src/components/CvDataTable/CvDataTableRow.vue +6 -6
- package/src/components/CvDataTable/CvDataTableSkeleton.vue +3 -3
- package/src/components/CvDataTable/_CvDataTableRowInner.vue +9 -9
- package/src/components/CvDatePicker/CvDatePicker.vue +10 -10
- package/src/components/CvDatePicker/CvDatePickerSkeleton.vue +3 -3
- package/src/components/CvDropdown/CvDropdown.vue +7 -9
- package/src/components/CvDropdown/CvDropdownItem.vue +1 -1
- package/src/components/CvFileUploader/CvFileUploader.vue +7 -7
- package/src/components/CvFileUploader/CvFileUploaderItem.vue +1 -1
- package/src/components/CvForm/CvFormGroup.vue +2 -2
- package/src/components/CvGrid/CvColumn.vue +5 -0
- package/src/components/CvLink/CvLink.vue +1 -1
- package/src/components/CvLoading/CvLoading.stories.js +1 -1
- package/src/components/CvLoading/CvLoading.vue +1 -1
- package/src/components/CvModal/CvModal.vue +19 -19
- package/src/components/CvMultiSelect/CvMultiSelect.vue +4 -4
- package/src/components/CvNotification/CvToastNotification.stories.js +12 -15
- package/src/components/CvNotification/CvToastNotification.vue +1 -1
- package/src/components/CvNumberInput/CvNumberInput.vue +3 -6
- package/src/components/CvOverflowMenu/CvOverflowMenu.vue +11 -10
- package/src/components/CvOverflowMenu/CvOverflowMenuItem.vue +1 -1
- package/src/components/CvPagination/CvPagination.vue +11 -15
- package/src/components/CvProgress/CvProgress.vue +1 -1
- package/src/components/CvProgress/CvProgressStep.vue +5 -5
- package/src/components/CvRadioButton/CvRadioButton.vue +3 -3
- package/src/components/CvSearch/CvSearch.vue +11 -10
- package/src/components/CvSelect/CvSelect.vue +1 -1
- package/src/components/CvSlider/CvSlider.vue +7 -7
- package/src/components/CvSlider/__tests__/__snapshots__/CvSlider.spec.js.snap +1 -1
- package/src/components/CvStructuredList/CvStructuredListItem.vue +3 -3
- package/src/components/CvStructuredList/CvStructuredListItemSelectable.vue +1 -1
- package/src/components/CvStructuredList/__tests__/__snapshots__/CvStructuredListItem.spec.js.snap +3 -3
- package/src/components/CvSvg/__tests__/_TestIcon.vue +2 -2
- package/src/components/CvTabs/CvTab.vue +1 -1
- package/src/components/CvTabs/CvTabs.vue +12 -12
- package/src/components/CvTabs/__tests__/__snapshots__/CvTabs.spec.js.snap +6 -6
- package/src/components/CvTag/CvTag.stories.js +1 -1
- package/src/components/CvTag/CvTag.vue +1 -1
- package/src/components/CvTextArea/CvTextArea.vue +6 -6
- package/src/components/CvTextInput/CvTextInput.stories.js +28 -16
- package/src/components/CvTextInput/CvTextInput.vue +37 -7
- package/src/components/CvTextInput/CvTextInputSkeleton.vue +17 -0
- package/src/components/CvTextInput/index.js +2 -1
- package/src/components/CvTile/CvTile.vue +3 -3
- package/src/components/CvTile/CvTileExpandable.vue +7 -7
- package/src/components/CvTile/CvTileSelectable.vue +2 -2
- package/src/components/CvTimePicker/CvTimePicker.vue +1 -1
- package/src/components/CvTooltip/CvDefinitionTooltip.vue +2 -2
- package/src/components/CvTooltip/CvInteractiveTooltip.vue +6 -6
- package/src/components/CvTooltip/__tests__/__snapshots__/CvTooltip.spec.js.snap +14 -14
- package/src/components/CvUIShell/CvHeader.vue +1 -1
- package/src/components/CvUIShell/CvHeaderGlobalAction.vue +7 -7
- package/src/components/CvUIShell/CvHeaderMenu.vue +3 -3
- package/src/components/CvUIShell/CvHeaderMenuButton.vue +2 -2
- package/src/components/CvUIShell/CvHeaderMenuItem.vue +2 -2
- package/src/components/CvUIShell/CvHeaderName.vue +1 -1
- package/src/components/CvUIShell/CvHeaderNav.vue +1 -1
- package/src/components/CvUIShell/CvHeaderPanel.vue +3 -2
- package/src/components/CvUIShell/CvSideNav.vue +5 -4
- package/src/components/CvUIShell/CvSideNavItems.vue +1 -1
- package/src/components/CvUIShell/CvSideNavLink.vue +1 -1
- package/src/components/CvUIShell/_CvSideNavFooter.vue +2 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="body" :disabled="disableTeleport">
|
|
3
3
|
<div
|
|
4
|
+
:id="uid"
|
|
4
5
|
ref="el"
|
|
5
6
|
data-modal
|
|
6
|
-
:id="uid"
|
|
7
7
|
:class="[
|
|
8
8
|
`cv-modal ${carbonPrefix}--modal`,
|
|
9
9
|
{
|
|
@@ -12,24 +12,24 @@
|
|
|
12
12
|
},
|
|
13
13
|
]"
|
|
14
14
|
tabindex="-1"
|
|
15
|
+
v-bind="$attrs"
|
|
15
16
|
@keydown.esc.prevent="onEsc"
|
|
16
17
|
@click.self="onExternalClick"
|
|
17
|
-
v-bind="$attrs"
|
|
18
18
|
>
|
|
19
19
|
<div
|
|
20
|
+
v-bind="dialogAttrs"
|
|
21
|
+
ref="modalDialog"
|
|
20
22
|
:class="[
|
|
21
23
|
`${carbonPrefix}--modal-container`,
|
|
22
24
|
{
|
|
23
25
|
[`${carbonPrefix}--modal-container--${internalSize}`]: internalSize,
|
|
24
26
|
},
|
|
25
27
|
]"
|
|
26
|
-
v-bind="dialogAttrs"
|
|
27
28
|
:aria-label="ariaLabel"
|
|
28
|
-
ref="modalDialog"
|
|
29
29
|
>
|
|
30
30
|
<div
|
|
31
|
-
class="cv-modal__before-content"
|
|
32
31
|
ref="beforeContent"
|
|
32
|
+
class="cv-modal__before-content"
|
|
33
33
|
tabindex="0"
|
|
34
34
|
style="position: absolute; height: 1px; width: 1px; left: -9999px"
|
|
35
35
|
role="separator"
|
|
@@ -44,28 +44,29 @@
|
|
|
44
44
|
<slot name="title">Modal Title</slot>
|
|
45
45
|
</p>
|
|
46
46
|
<button
|
|
47
|
+
ref="closeBtn"
|
|
47
48
|
:class="`${carbonPrefix}--modal-close`"
|
|
48
49
|
type="button"
|
|
49
|
-
@click="onClose"
|
|
50
|
-
ref="closeBtn"
|
|
51
50
|
:aria-label="closeAriaLabel"
|
|
51
|
+
@click="onClose"
|
|
52
52
|
>
|
|
53
53
|
<Close16 :class="`${carbonPrefix}--modal-close__icon`" />
|
|
54
54
|
</button>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
57
|
<div
|
|
58
|
+
ref="content"
|
|
58
59
|
:class="[
|
|
59
60
|
`${carbonPrefix}--modal-content`,
|
|
60
61
|
{ [`${carbonPrefix}--modal-content--with-form`]: hasFormContent },
|
|
61
62
|
]"
|
|
62
|
-
ref="content"
|
|
63
63
|
:tabindex="data.scrollable ? 0 : undefined"
|
|
64
64
|
>
|
|
65
65
|
<slot name="content"></slot>
|
|
66
66
|
</div>
|
|
67
67
|
|
|
68
68
|
<cv-button-set
|
|
69
|
+
v-if="data.hasFooter"
|
|
69
70
|
:class="[
|
|
70
71
|
`${carbonPrefix}--modal-footer`,
|
|
71
72
|
{
|
|
@@ -73,40 +74,39 @@
|
|
|
73
74
|
data.hasPrimary && data.hasSecondary && data.hasOtherBtn,
|
|
74
75
|
},
|
|
75
76
|
]"
|
|
76
|
-
v-if="data.hasFooter"
|
|
77
77
|
>
|
|
78
78
|
<cv-button
|
|
79
|
+
v-if="data.hasOtherBtn"
|
|
80
|
+
ref="otherBtn"
|
|
79
81
|
type="button"
|
|
80
82
|
kind="secondary"
|
|
81
83
|
@click="onOtherBtnClick"
|
|
82
|
-
v-if="data.hasOtherBtn"
|
|
83
|
-
ref="otherBtn"
|
|
84
84
|
>
|
|
85
85
|
<slot name="other-button">Other button</slot>
|
|
86
86
|
</cv-button>
|
|
87
87
|
<cv-button
|
|
88
|
+
v-if="data.hasSecondary"
|
|
89
|
+
ref="secondaryBtn"
|
|
88
90
|
type="button"
|
|
89
91
|
kind="secondary"
|
|
90
92
|
@click="onSecondaryClick"
|
|
91
|
-
v-if="data.hasSecondary"
|
|
92
|
-
ref="secondaryBtn"
|
|
93
93
|
>
|
|
94
94
|
<slot name="secondary-button">Secondary button</slot>
|
|
95
95
|
</cv-button>
|
|
96
96
|
<cv-button
|
|
97
|
+
v-if="data.hasPrimary"
|
|
98
|
+
ref="primary"
|
|
97
99
|
:disabled="primaryButtonDisabled"
|
|
98
100
|
type="button"
|
|
99
101
|
:kind="primaryKind"
|
|
100
102
|
@click="onPrimaryClick"
|
|
101
|
-
v-if="data.hasPrimary"
|
|
102
|
-
ref="primary"
|
|
103
103
|
>
|
|
104
104
|
<slot name="primary-button">Primary button</slot>
|
|
105
105
|
</cv-button>
|
|
106
106
|
</cv-button-set>
|
|
107
107
|
<div
|
|
108
|
-
class="cv-modal__after-content"
|
|
109
108
|
ref="afterContent"
|
|
109
|
+
class="cv-modal__after-content"
|
|
110
110
|
tabindex="0"
|
|
111
111
|
style="position: absolute; height: 1px; width: 1px; left: -9999px"
|
|
112
112
|
role="separator"
|
|
@@ -201,9 +201,9 @@ const props = defineProps({
|
|
|
201
201
|
disableTeleport: { type: Boolean, default: false },
|
|
202
202
|
|
|
203
203
|
// Listeners
|
|
204
|
-
onPrimaryClick: { type: Function },
|
|
205
|
-
onSecondaryClick: { type: Function },
|
|
206
|
-
onOtherBtnClick: { type: Function },
|
|
204
|
+
onPrimaryClick: { type: Function, default: undefined },
|
|
205
|
+
onSecondaryClick: { type: Function, default: undefined },
|
|
206
|
+
onOtherBtnClick: { type: Function, default: undefined },
|
|
207
207
|
|
|
208
208
|
...propsCvId,
|
|
209
209
|
});
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
[`${carbonPrefix}--combo-box`]: isFilterable,
|
|
46
46
|
},
|
|
47
47
|
]"
|
|
48
|
-
:data-invalid="data.isInvalid
|
|
48
|
+
:data-invalid="data.isInvalid || null"
|
|
49
49
|
v-bind="$attrs"
|
|
50
50
|
@keydown.down.prevent="onDown"
|
|
51
51
|
@keydown.up.prevent="onUp"
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
<div
|
|
151
151
|
v-for="(item, index) in data.options"
|
|
152
152
|
ref="elOption"
|
|
153
|
-
role="menuitem"
|
|
154
153
|
:key="`multi-select-${index}`"
|
|
154
|
+
role="menuitem"
|
|
155
155
|
:class="[
|
|
156
156
|
`${carbonPrefix}--list-box__menu-item`,
|
|
157
157
|
{
|
|
@@ -281,7 +281,7 @@ const props = defineProps({
|
|
|
281
281
|
/**
|
|
282
282
|
* The value of an option to initially highlight
|
|
283
283
|
*/
|
|
284
|
-
highlight: String,
|
|
284
|
+
highlight: { type: String, default: undefined },
|
|
285
285
|
/**
|
|
286
286
|
* Specify 'true' to create an inline multi-select.
|
|
287
287
|
*/
|
|
@@ -341,7 +341,7 @@ const props = defineProps({
|
|
|
341
341
|
/**
|
|
342
342
|
* Provide text to be used in a <label> element that is tied to the multiselect via ARIA attributes.
|
|
343
343
|
*/
|
|
344
|
-
title: String,
|
|
344
|
+
title: { type: String, default: undefined },
|
|
345
345
|
/***
|
|
346
346
|
* Allow users to pass in arbitrary items from their collection that are pre-selected
|
|
347
347
|
*/
|
|
@@ -8,20 +8,17 @@ export default {
|
|
|
8
8
|
component: CvToastNotification,
|
|
9
9
|
argTypes: {
|
|
10
10
|
kind: {
|
|
11
|
-
control:
|
|
12
|
-
|
|
13
|
-
options: CvNotificationConsts.notificationKinds,
|
|
14
|
-
},
|
|
15
|
-
defaultValue: CvNotificationConsts.notificationKinds[0],
|
|
11
|
+
control: 'select',
|
|
12
|
+
options: CvNotificationConsts.notificationKinds,
|
|
16
13
|
table: {
|
|
17
14
|
defaultValue: {
|
|
18
|
-
summary: `"${
|
|
15
|
+
summary: `"${CvToastNotification.props.kind.default}"`,
|
|
19
16
|
},
|
|
20
17
|
},
|
|
21
18
|
},
|
|
22
19
|
title: {
|
|
23
|
-
control:
|
|
24
|
-
|
|
20
|
+
control: 'text',
|
|
21
|
+
default: 'Notification title',
|
|
25
22
|
table: {
|
|
26
23
|
defaultValue: {
|
|
27
24
|
summary: `"${CvToastNotification.props.title.default}"`,
|
|
@@ -29,8 +26,8 @@ export default {
|
|
|
29
26
|
},
|
|
30
27
|
},
|
|
31
28
|
subTitle: {
|
|
32
|
-
control:
|
|
33
|
-
|
|
29
|
+
control: 'text',
|
|
30
|
+
default: 'Subtitle text goes here.',
|
|
34
31
|
table: {
|
|
35
32
|
defaultValue: {
|
|
36
33
|
summary: `"${CvToastNotification.props.subTitle.default}"`,
|
|
@@ -38,8 +35,8 @@ export default {
|
|
|
38
35
|
},
|
|
39
36
|
},
|
|
40
37
|
caption: {
|
|
41
|
-
control:
|
|
42
|
-
|
|
38
|
+
control: 'text',
|
|
39
|
+
default: '00:00:00 AM',
|
|
43
40
|
table: {
|
|
44
41
|
defaultValue: {
|
|
45
42
|
summary: `"${CvToastNotification.props.caption.default}"`,
|
|
@@ -47,8 +44,8 @@ export default {
|
|
|
47
44
|
},
|
|
48
45
|
},
|
|
49
46
|
closeAriaLabel: {
|
|
50
|
-
control:
|
|
51
|
-
|
|
47
|
+
control: 'text',
|
|
48
|
+
default: CvToastNotification.props.closeAriaLabel.default,
|
|
52
49
|
table: {
|
|
53
50
|
defaultValue: {
|
|
54
51
|
summary: `"${CvToastNotification.props.closeAriaLabel.default}"`,
|
|
@@ -56,7 +53,7 @@ export default {
|
|
|
56
53
|
},
|
|
57
54
|
},
|
|
58
55
|
lowContrast: {
|
|
59
|
-
control:
|
|
56
|
+
control: 'boolean',
|
|
60
57
|
},
|
|
61
58
|
// slots
|
|
62
59
|
default: {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[`cv-number-input`]: !formItem,
|
|
14
14
|
},
|
|
15
15
|
]"
|
|
16
|
-
:data-invalid="
|
|
16
|
+
:data-invalid="isInvalid || null"
|
|
17
17
|
>
|
|
18
18
|
<label
|
|
19
19
|
v-show="label || slots['label']"
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
]"
|
|
33
33
|
>
|
|
34
34
|
<input
|
|
35
|
+
:id="cvId"
|
|
35
36
|
ref="input"
|
|
36
37
|
v-model="internalValue"
|
|
37
|
-
:
|
|
38
|
-
:data-invalid="dataInvalidAttributeValue"
|
|
38
|
+
:data-invalid="isInvalid || null"
|
|
39
39
|
type="number"
|
|
40
40
|
v-bind="$attrs"
|
|
41
41
|
:disabled="disabled"
|
|
@@ -159,9 +159,6 @@ const props = defineProps({
|
|
|
159
159
|
const emit = defineEmits(['update:modelValue']);
|
|
160
160
|
const cvId = useCvId(props);
|
|
161
161
|
const { isInvalid, isWarn, isHelper, isLight } = useCvInputHelpers(props);
|
|
162
|
-
const dataInvalidAttributeValue = computed(() =>
|
|
163
|
-
isInvalid.value ? true : undefined
|
|
164
|
-
);
|
|
165
162
|
|
|
166
163
|
const iconClasses = computed(() => {
|
|
167
164
|
const classes = [];
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
data-overflow-menu
|
|
4
|
-
:class="`cv-overflow-menu ${carbonPrefix}--overflow-menu`"
|
|
5
3
|
:id="uid"
|
|
6
4
|
ref="el"
|
|
5
|
+
data-overflow-menu
|
|
6
|
+
:class="`cv-overflow-menu ${carbonPrefix}--overflow-menu`"
|
|
7
7
|
>
|
|
8
8
|
<button
|
|
9
|
+
:id="`${uid}-trigger`"
|
|
10
|
+
ref="trigger"
|
|
9
11
|
:class="[
|
|
10
12
|
`${carbonPrefix}--overflow-menu__trigger ${carbonPrefix}--tooltip__trigger`,
|
|
11
13
|
`${carbonPrefix}--tooltip--a11y`,
|
|
@@ -20,15 +22,13 @@
|
|
|
20
22
|
:aria-expanded="open ? 'true' : 'false'"
|
|
21
23
|
:aria-controls="`${uid}-menu`"
|
|
22
24
|
:aria-labelledby="`${uid}`"
|
|
23
|
-
:id="`${uid}-trigger`"
|
|
24
|
-
ref="trigger"
|
|
25
25
|
@click="doToggle"
|
|
26
26
|
@keydown.space.prevent
|
|
27
27
|
@keyup.space.prevent="doToggle"
|
|
28
28
|
@keydown.enter.prevent="doToggle"
|
|
29
29
|
@keydown.tab="onOverflowMenuTab"
|
|
30
30
|
>
|
|
31
|
-
<span :class="`${carbonPrefix}--assistive-text`"
|
|
31
|
+
<span v-if="label" :class="`${carbonPrefix}--assistive-text`">{{
|
|
32
32
|
label
|
|
33
33
|
}}</span>
|
|
34
34
|
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
</button>
|
|
41
41
|
<Teleport to="body">
|
|
42
42
|
<div
|
|
43
|
+
:id="`${uid}-menu`"
|
|
44
|
+
ref="popup"
|
|
43
45
|
:class="[
|
|
44
46
|
`${carbonPrefix}--overflow-menu-options`,
|
|
45
47
|
{
|
|
@@ -48,16 +50,14 @@
|
|
|
48
50
|
},
|
|
49
51
|
]"
|
|
50
52
|
tabindex="-1"
|
|
51
|
-
ref="popup"
|
|
52
53
|
:aria-labelledby="`${uid}-trigger`"
|
|
53
|
-
:id="`${uid}-menu`"
|
|
54
54
|
:style="{ left: left + 'px', top: top + 'px' }"
|
|
55
55
|
@focusout="checkFocusOut"
|
|
56
56
|
@mousedown.prevent="preventFocusOut"
|
|
57
57
|
>
|
|
58
58
|
<div
|
|
59
|
-
class="cv-overflow-menu__before-content"
|
|
60
59
|
ref="beforeContent"
|
|
60
|
+
class="cv-overflow-menu__before-content"
|
|
61
61
|
tabindex="0"
|
|
62
62
|
style="position: absolute; height: 1px; width: 1px; left: -9999px"
|
|
63
63
|
@focus="focusBeforeContent"
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
<slot></slot>
|
|
67
67
|
</ul>
|
|
68
68
|
<div
|
|
69
|
-
class="cv-overflow-menu__after-content"
|
|
70
69
|
ref="afterContent"
|
|
70
|
+
class="cv-overflow-menu__after-content"
|
|
71
71
|
tabindex="0"
|
|
72
72
|
style="position: absolute; height: 1px; width: 1px; left: -9999px"
|
|
73
73
|
@focus="focusAfterContent"
|
|
@@ -86,7 +86,7 @@ const props = defineProps({
|
|
|
86
86
|
/**
|
|
87
87
|
* assistive text shown as a tooltip
|
|
88
88
|
*/
|
|
89
|
-
label: String,
|
|
89
|
+
label: { type: String, default: undefined },
|
|
90
90
|
/**
|
|
91
91
|
* moves caret from right to left of popup menu
|
|
92
92
|
*/
|
|
@@ -105,6 +105,7 @@ const props = defineProps({
|
|
|
105
105
|
return value && value.left !== undefined && value.top !== undefined;
|
|
106
106
|
// value.hasOwnProperty('left') && value.hasOwnProperty('top');
|
|
107
107
|
},
|
|
108
|
+
default: undefined,
|
|
108
109
|
},
|
|
109
110
|
/**
|
|
110
111
|
* top, left, right(default) or bottom
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div :class="`cv-pagination ${carbonPrefix}--pagination`" data-pagination>
|
|
3
3
|
<div :class="`${carbonPrefix}--pagination__left`">
|
|
4
4
|
<cv-select
|
|
5
|
+
ref="pageSizeSelect"
|
|
5
6
|
:class="`${carbonPrefix}--select__item-count`"
|
|
6
7
|
:label="pageSizesLabel"
|
|
7
8
|
inline
|
|
8
|
-
ref="pageSizeSelect"
|
|
9
|
-
@change="onPageSizeChange"
|
|
10
9
|
:value="`${pageSizeValue}`"
|
|
10
|
+
@change="onPageSizeChange"
|
|
11
11
|
>
|
|
12
12
|
<cv-select-option
|
|
13
13
|
v-for="(size, index) in pageSizes"
|
|
@@ -21,23 +21,21 @@
|
|
|
21
21
|
|
|
22
22
|
<span :class="`${carbonPrefix}--pagination__text`">
|
|
23
23
|
<span data-displayed-item-range>
|
|
24
|
-
<slot name="range-text"
|
|
25
|
-
rangeText
|
|
26
|
-
}}</slot>
|
|
24
|
+
<slot name="range-text" :scope="rangeProps">{{ rangeText }}</slot>
|
|
27
25
|
</span>
|
|
28
26
|
</span>
|
|
29
27
|
</div>
|
|
30
28
|
|
|
31
29
|
<div :class="`${carbonPrefix}--pagination__right`">
|
|
32
30
|
<cv-select
|
|
31
|
+
v-if="numberOfItems !== Infinity"
|
|
32
|
+
ref="pageSelect"
|
|
33
33
|
:class="`${carbonPrefix}--select__page-number`"
|
|
34
34
|
:label="pageNumberLabel"
|
|
35
35
|
inline
|
|
36
|
-
|
|
37
|
-
ref="pageSelect"
|
|
38
|
-
@change="onPageChange"
|
|
36
|
+
hide-label
|
|
39
37
|
:value="`${pageValue}`"
|
|
40
|
-
|
|
38
|
+
@change="onPageChange"
|
|
41
39
|
>
|
|
42
40
|
<cv-select-option
|
|
43
41
|
v-for="pageNumber in pages"
|
|
@@ -48,9 +46,7 @@
|
|
|
48
46
|
>
|
|
49
47
|
</cv-select>
|
|
50
48
|
<span :class="`${carbonPrefix}--pagination__text`">
|
|
51
|
-
<slot name="of-n-pages"
|
|
52
|
-
pageOfPages
|
|
53
|
-
}}</slot>
|
|
49
|
+
<slot name="of-n-pages" :scope="ofNPagesProps">{{ pageOfPages }}</slot>
|
|
54
50
|
</span>
|
|
55
51
|
|
|
56
52
|
<button
|
|
@@ -61,8 +57,8 @@
|
|
|
61
57
|
]"
|
|
62
58
|
data-page-backward
|
|
63
59
|
:aria-label="backwardText"
|
|
64
|
-
@click="onPrevPage"
|
|
65
60
|
:disabled="noWayBack"
|
|
61
|
+
@click="onPrevPage"
|
|
66
62
|
>
|
|
67
63
|
<CaretLeft16 :class="`${carbonPrefix}--pagination__button-icon`" />
|
|
68
64
|
</button>
|
|
@@ -75,8 +71,8 @@
|
|
|
75
71
|
]"
|
|
76
72
|
data-page-forward
|
|
77
73
|
:aria-label="forwardText"
|
|
78
|
-
@click="onNextPage"
|
|
79
74
|
:disabled="noWayForward"
|
|
75
|
+
@click="onNextPage"
|
|
80
76
|
>
|
|
81
77
|
<CaretRight16 :class="`${carbonPrefix}--pagination__button-icon`" />
|
|
82
78
|
</button>
|
|
@@ -102,7 +98,7 @@ const props = defineProps({
|
|
|
102
98
|
pageSizesLabel: { type: String, default: 'Items per page:' },
|
|
103
99
|
numberOfItems: { type: Number, default: Infinity },
|
|
104
100
|
actualItemsOnPage: { type: Number, default: Infinity },
|
|
105
|
-
page: Number,
|
|
101
|
+
page: { type: Number, default: undefined },
|
|
106
102
|
pageSizes: { type: Array, default: () => [10, 20, 30, 40, 50] },
|
|
107
103
|
});
|
|
108
104
|
|
|
@@ -34,7 +34,7 @@ const props = defineProps({
|
|
|
34
34
|
/**
|
|
35
35
|
* An array of labels for the steps. Use `cv-progress-step` components for more control over the step logic.
|
|
36
36
|
*/
|
|
37
|
-
steps: Array,
|
|
37
|
+
steps: { type: Array, default: () => [] },
|
|
38
38
|
/**
|
|
39
39
|
* Determines whether the ProgressIndicator should be rendered vertically.
|
|
40
40
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!--suppress HtmlUnknownTag -->
|
|
2
2
|
<template>
|
|
3
3
|
<li
|
|
4
|
+
:id="uid"
|
|
4
5
|
:class="[
|
|
5
6
|
`cv-progress-step ${carbonPrefix}--progress-step`,
|
|
6
7
|
`${carbonPrefix}--progress-step--${internalState}`,
|
|
7
8
|
]"
|
|
8
|
-
:id="uid"
|
|
9
9
|
:aria-disabled="disabled"
|
|
10
10
|
>
|
|
11
11
|
<button
|
|
@@ -62,12 +62,12 @@ const STEP_INCOMPLETE = 'incomplete';
|
|
|
62
62
|
const STEP_DISABLED = 'disabled';
|
|
63
63
|
|
|
64
64
|
const props = defineProps({
|
|
65
|
-
additionalInfo: String,
|
|
66
|
-
description: String,
|
|
65
|
+
additionalInfo: { type: String, default: undefined },
|
|
66
|
+
description: { type: String, default: undefined },
|
|
67
67
|
disabled: Boolean,
|
|
68
68
|
invalid: Boolean,
|
|
69
|
-
label: String,
|
|
70
|
-
tipText: String,
|
|
69
|
+
label: { type: String, default: undefined },
|
|
70
|
+
tipText: { type: String, default: undefined },
|
|
71
71
|
complete: Boolean,
|
|
72
72
|
...propsCvId,
|
|
73
73
|
});
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
<input
|
|
9
9
|
v-bind="$attrs"
|
|
10
10
|
:id="cvId"
|
|
11
|
+
ref="input"
|
|
11
12
|
:checked="isChecked"
|
|
12
13
|
:class="`${carbonPrefix}--radio-button`"
|
|
13
|
-
ref="input"
|
|
14
14
|
type="radio"
|
|
15
15
|
:value="value"
|
|
16
16
|
@change="onChange"
|
|
@@ -33,9 +33,9 @@ import { carbonPrefix } from '../../global/settings';
|
|
|
33
33
|
import { useCvId, propsCvId, useMethods, useRadio } from '../../use';
|
|
34
34
|
|
|
35
35
|
const props = defineProps({
|
|
36
|
-
modelValue: String,
|
|
36
|
+
modelValue: { type: String, default: undefined },
|
|
37
37
|
checked: Boolean,
|
|
38
|
-
label: String,
|
|
38
|
+
label: { type: String, default: undefined },
|
|
39
39
|
value: { type: String, required: true },
|
|
40
40
|
hideLabel: Boolean,
|
|
41
41
|
labelLeft: Boolean,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:class="`cv-search ${carbonPrefix}--form-item`"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
|
+
ref="elSearch"
|
|
7
8
|
:aria-label="internalAriaLabel"
|
|
8
9
|
:aria-labelledby="internalAriaLabelBy"
|
|
9
10
|
:class="[
|
|
@@ -18,7 +19,6 @@
|
|
|
18
19
|
},
|
|
19
20
|
]"
|
|
20
21
|
role="search"
|
|
21
|
-
ref="elSearch"
|
|
22
22
|
>
|
|
23
23
|
<div
|
|
24
24
|
:class="`${carbonPrefix}--search-magnifier`"
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
}}</label>
|
|
34
34
|
|
|
35
35
|
<input
|
|
36
|
-
role="searchbox"
|
|
37
36
|
:id="uid"
|
|
38
|
-
:class="`${carbonPrefix}--search-input`"
|
|
39
37
|
v-bind="$attrs"
|
|
38
|
+
ref="elInput"
|
|
40
39
|
v-model="internalSearchText"
|
|
41
|
-
|
|
40
|
+
role="searchbox"
|
|
41
|
+
:class="`${carbonPrefix}--search-input`"
|
|
42
42
|
type="text"
|
|
43
|
-
ref="elInput"
|
|
44
43
|
:placeholder="placeholder"
|
|
45
44
|
:aria-labelledby="uid"
|
|
45
|
+
:disabled="disabled ? 'true' : undefined"
|
|
46
|
+
@input="onInput"
|
|
46
47
|
@blur="checkFocus"
|
|
47
48
|
@click="toggleActive"
|
|
48
49
|
@keydown.esc="onClearClick"
|
|
49
|
-
:disabled="disabled ? 'true' : undefined"
|
|
50
50
|
/>
|
|
51
51
|
|
|
52
52
|
<button
|
|
@@ -111,7 +111,7 @@ const props = defineProps({
|
|
|
111
111
|
/**
|
|
112
112
|
* Provide the label text for the Search icon
|
|
113
113
|
*/
|
|
114
|
-
label: String,
|
|
114
|
+
label: { type: String, default: undefined },
|
|
115
115
|
/**
|
|
116
116
|
* Specify the search size ('sm', 'md', 'lg', 'xl')
|
|
117
117
|
*/
|
|
@@ -151,7 +151,7 @@ const props = defineProps({
|
|
|
151
151
|
/**
|
|
152
152
|
* Optionally provide the default value of the `<input>`
|
|
153
153
|
*/
|
|
154
|
-
value: String,
|
|
154
|
+
value: { type: String, default: undefined },
|
|
155
155
|
/**
|
|
156
156
|
* @deprecated use value
|
|
157
157
|
*/
|
|
@@ -172,10 +172,11 @@ const props = defineProps({
|
|
|
172
172
|
*/
|
|
173
173
|
toolbarAriaLabel: {
|
|
174
174
|
type: String,
|
|
175
|
-
validator:
|
|
176
|
-
console.warn('Deprecated: probably you want expandable=true');
|
|
175
|
+
validator: s => {
|
|
176
|
+
if (s) console.warn('Deprecated: probably you want expandable=true');
|
|
177
177
|
return true;
|
|
178
178
|
},
|
|
179
|
+
default: undefined,
|
|
179
180
|
},
|
|
180
181
|
...propsTheme,
|
|
181
182
|
...propsCvId,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div :class="`cv-slider ${carbonPrefix}--form-item`">
|
|
3
3
|
<label
|
|
4
4
|
v-show="label"
|
|
5
|
+
:id="labelId"
|
|
5
6
|
:for="cvId"
|
|
6
7
|
:class="[
|
|
7
8
|
`${carbonPrefix}--label`,
|
|
8
9
|
{ [`${carbonPrefix}--label--disabled`]: disabled },
|
|
9
10
|
]"
|
|
10
|
-
:id="labelId"
|
|
11
11
|
>
|
|
12
12
|
{{ label }}
|
|
13
13
|
</label>
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
data-slider-input-box="#slider-input-box"
|
|
27
27
|
>
|
|
28
28
|
<div
|
|
29
|
+
ref="track"
|
|
29
30
|
:class="`${carbonPrefix}--slider__track`"
|
|
30
31
|
@click="onTrackClick"
|
|
31
|
-
ref="track"
|
|
32
32
|
></div>
|
|
33
33
|
|
|
34
34
|
<div
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
></div>
|
|
38
38
|
|
|
39
39
|
<div
|
|
40
|
+
ref="thumb"
|
|
40
41
|
:class="[
|
|
41
42
|
`${carbonPrefix}--slider__thumb`,
|
|
42
43
|
{
|
|
@@ -46,7 +47,6 @@
|
|
|
46
47
|
tabindex="0"
|
|
47
48
|
:aria-labelledby="labelId"
|
|
48
49
|
:style="`left: ${percentage};`"
|
|
49
|
-
ref="thumb"
|
|
50
50
|
@keydown.up.right.prevent="onUp"
|
|
51
51
|
@keydown.down.left.prevent="onDown"
|
|
52
52
|
@mousedown="onStartDrag"
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
|
|
55
55
|
<input
|
|
56
56
|
:id="cvId"
|
|
57
|
+
ref="range"
|
|
57
58
|
:class="`${carbonPrefix}--slider__input`"
|
|
58
59
|
type="range"
|
|
59
60
|
:step="step"
|
|
60
61
|
:min="min"
|
|
61
62
|
:max="max"
|
|
62
|
-
ref="range"
|
|
63
63
|
/>
|
|
64
64
|
</div>
|
|
65
65
|
|
|
@@ -68,18 +68,18 @@
|
|
|
68
68
|
</span>
|
|
69
69
|
|
|
70
70
|
<input
|
|
71
|
+
ref="inputBox"
|
|
72
|
+
v-model="internalValue"
|
|
71
73
|
type="string"
|
|
72
74
|
:class="[
|
|
73
75
|
`${carbonPrefix}--text-input ${carbonPrefix}--slider-text-input`,
|
|
74
76
|
{ [`${carbonPrefix}--text-input--light`]: isLight },
|
|
75
77
|
]"
|
|
76
78
|
:placeholder="min"
|
|
77
|
-
|
|
79
|
+
:disabled="disabled"
|
|
78
80
|
@change="onChange"
|
|
79
|
-
ref="inputBox"
|
|
80
81
|
@keydown.up.prevent="onUp"
|
|
81
82
|
@keydown.down.prevent="onDown"
|
|
82
|
-
:disabled="disabled"
|
|
83
83
|
/>
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|