@carbon/vue 3.0.10 → 3.0.12

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.
Files changed (37) hide show
  1. package/README.md +4 -4
  2. package/dist/carbon-vue-3.common.js +247 -166
  3. package/dist/carbon-vue-3.common.js.map +1 -1
  4. package/dist/carbon-vue-3.umd.js +247 -166
  5. package/dist/carbon-vue-3.umd.js.map +1 -1
  6. package/dist/carbon-vue-3.umd.min.js +2 -2
  7. package/dist/carbon-vue-3.umd.min.js.map +1 -1
  8. package/dist/web-types.json +41 -36
  9. package/package.json +3 -3
  10. package/src/components/CvComboBox/CvComboBox.vue +1 -1
  11. package/src/components/CvDataTable/CvDataTable.stories.mdx +39 -14
  12. package/src/components/CvDataTable/CvDataTable.vue +1 -1
  13. package/src/components/CvDataTable/CvDataTableHeading.vue +3 -5
  14. package/src/components/CvDatePicker/CvDatePicker.vue +7 -8
  15. package/src/components/CvDropdown/CvDropdown.stories.mdx +7 -66
  16. package/src/components/CvDropdown/CvDropdown.vue +7 -18
  17. package/src/components/CvDropdown/CvDropdownItem.vue +1 -1
  18. package/src/components/CvFileUploader/CvFileUploader.stories.mdx +79 -14
  19. package/src/components/CvFileUploader/CvFileUploaderItem.vue +8 -7
  20. package/src/components/CvLink/CvLink.vue +6 -1
  21. package/src/components/CvLoading/CvLoading.vue +1 -1
  22. package/src/components/CvModal/CvModal.vue +35 -13
  23. package/src/components/CvModal/index.js +29 -1
  24. package/src/components/CvMultiSelect/CvMultiSelect.stories.mdx +8 -18
  25. package/src/components/CvMultiSelect/CvMultiSelect.vue +14 -19
  26. package/src/components/CvNotification/CvInlineNotification.stories.js +58 -1
  27. package/src/components/CvNotification/CvInlineNotification.vue +13 -3
  28. package/src/components/CvNotification/CvInlineNotificationTemplate.mdx +16 -0
  29. package/src/components/CvProgress/CvProgress.stories.mdx +23 -1
  30. package/src/components/CvProgress/CvProgressSkeleton.vue +37 -0
  31. package/src/components/CvProgress/CvProgressStep.vue +1 -1
  32. package/src/components/CvProgress/index.js +3 -1
  33. package/src/components/CvSearch/CvSearch.stories.mdx +4 -13
  34. package/src/components/CvSearch/CvSearch.vue +8 -20
  35. package/src/components/CvTabs/CvTabs.vue +3 -3
  36. package/src/components/CvTabs/__tests__/__snapshots__/CvTabs.spec.js.snap +3 -3
  37. package/src/components/CvTooltip/CvInteractiveTooltip.vue +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@carbon/vue",
4
- "version": "3.0.9",
4
+ "version": "3.0.11",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -1679,15 +1679,6 @@
1679
1679
  },
1680
1680
  "default": "false"
1681
1681
  },
1682
- {
1683
- "name": "value",
1684
- "description": "Render with a value already selected. Available as `v-model:value`.",
1685
- "value": {
1686
- "kind": "expression",
1687
- "type": "string"
1688
- },
1689
- "default": "undefined"
1690
- },
1691
1682
  {
1692
1683
  "name": "warningMessage",
1693
1684
  "description": "Provide the text that is displayed and put the control in warning state",
@@ -1699,6 +1690,7 @@
1699
1690
  },
1700
1691
  {
1701
1692
  "name": "modelValue",
1693
+ "description": "Render with a value already selected. Available as `v-model`.",
1702
1694
  "value": {
1703
1695
  "kind": "expression",
1704
1696
  "type": "string"
@@ -1707,9 +1699,6 @@
1707
1699
  }
1708
1700
  ],
1709
1701
  "events": [
1710
- {
1711
- "name": "update:value"
1712
- },
1713
1702
  {
1714
1703
  "name": "update:modelValue"
1715
1704
  },
@@ -2498,7 +2487,7 @@
2498
2487
  },
2499
2488
  {
2500
2489
  "name": "subTitle",
2501
- "description": "Notification sub title (supports HTML)",
2490
+ "description": "Notification subtitle",
2502
2491
  "value": {
2503
2492
  "kind": "expression",
2504
2493
  "type": "string"
@@ -2531,6 +2520,15 @@
2531
2520
  "type": "boolean"
2532
2521
  },
2533
2522
  "default": "false"
2523
+ },
2524
+ {
2525
+ "name": "hideCloseButton",
2526
+ "description": "Set to true to hide the code button",
2527
+ "value": {
2528
+ "kind": "expression",
2529
+ "type": "boolean"
2530
+ },
2531
+ "default": "false"
2534
2532
  }
2535
2533
  ],
2536
2534
  "events": [
@@ -2543,6 +2541,14 @@
2543
2541
  "description": "Emitted on clicking the close button"
2544
2542
  }
2545
2543
  ],
2544
+ "slots": [
2545
+ {
2546
+ "name": "title"
2547
+ },
2548
+ {
2549
+ "name": "subtitle"
2550
+ }
2551
+ ],
2546
2552
  "source": {
2547
2553
  "module": "./src/components/CvNotification/CvInlineNotification.vue",
2548
2554
  "symbol": "default"
@@ -3031,14 +3037,6 @@
3031
3037
  },
3032
3038
  "default": "undefined"
3033
3039
  },
3034
- {
3035
- "name": "value",
3036
- "value": {
3037
- "kind": "expression",
3038
- "type": "array"
3039
- },
3040
- "default": "[]"
3041
- },
3042
3040
  {
3043
3041
  "name": "warningMessage",
3044
3042
  "description": "Provide the text that is displayed and put the control in warning state",
@@ -3054,12 +3052,12 @@
3054
3052
  "kind": "expression",
3055
3053
  "type": "array"
3056
3054
  },
3057
- "default": "undefined"
3055
+ "default": "[]"
3058
3056
  }
3059
3057
  ],
3060
3058
  "events": [
3061
3059
  {
3062
- "name": "update:value"
3060
+ "name": "update:modelValue"
3063
3061
  },
3064
3062
  {
3065
3063
  "name": "change"
@@ -3488,6 +3486,24 @@
3488
3486
  "symbol": "default"
3489
3487
  }
3490
3488
  },
3489
+ {
3490
+ "name": "CvProgressSkeleton",
3491
+ "description": "",
3492
+ "attributes": [
3493
+ {
3494
+ "name": "vertical",
3495
+ "value": {
3496
+ "kind": "expression",
3497
+ "type": "boolean"
3498
+ },
3499
+ "default": "false"
3500
+ }
3501
+ ],
3502
+ "source": {
3503
+ "module": "./src/components/CvProgress/CvProgressSkeleton.vue",
3504
+ "symbol": "default"
3505
+ }
3506
+ },
3491
3507
  {
3492
3508
  "name": "CvProgressStep",
3493
3509
  "description": "",
@@ -3764,17 +3780,9 @@
3764
3780
  },
3765
3781
  "default": "undefined"
3766
3782
  },
3767
- {
3768
- "name": "value",
3769
- "description": "Optionally provide the default value of the `<input>`",
3770
- "value": {
3771
- "kind": "expression",
3772
- "type": "string"
3773
- },
3774
- "default": "undefined"
3775
- },
3776
3783
  {
3777
3784
  "name": "modelValue",
3785
+ "description": "Optionally provide the default value of the `<input>`",
3778
3786
  "value": {
3779
3787
  "kind": "expression",
3780
3788
  "type": "string"
@@ -3803,9 +3811,6 @@
3803
3811
  {
3804
3812
  "name": "input"
3805
3813
  },
3806
- {
3807
- "name": "update:value"
3808
- },
3809
3814
  {
3810
3815
  "name": "update:modelValue"
3811
3816
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@carbon/vue",
3
3
  "license": "Apache-2.0",
4
- "version": "3.0.10",
4
+ "version": "3.0.12",
5
5
  "description": "A collection of components for the Carbon Design System built using Vue.js",
6
6
  "packageManager": "yarn@3.2.0",
7
7
  "main": "dist/carbon-vue-3.umd.min.js",
8
8
  "types": "src/index.d.ts",
9
9
  "web-types": "dist/web-types.json",
10
10
  "scripts": {
11
- "_postinstall": "node prepare.js",
11
+ "_postinstall": "node prepare.js && node .storybook/postinstall.js",
12
12
  "prepack": "pinst --disable",
13
13
  "postpack": "pinst --enable",
14
14
  "build": "vue-cli-service build --target lib --name carbon-vue-3 ./src/index.js --no-clean",
@@ -174,5 +174,5 @@
174
174
  "url": "git+https://github.com/carbon-design-system/carbon-components-vue.git"
175
175
  },
176
176
  "sideEffects": true,
177
- "gitHead": "337cb41677bb308c20c43938f3485faaf7db87c0"
177
+ "gitHead": "f685b28f8725fb4f61078e347e394ea08e4c0b5c"
178
178
  }
@@ -59,7 +59,7 @@
59
59
  :aria-controls="cvId"
60
60
  aria-autocomplete="list"
61
61
  role="combobox"
62
- :aria-disabled="disabled"
62
+ :aria-disabled="disabled || null"
63
63
  :aria-expanded="open ? 'true' : 'false'"
64
64
  autocomplete="off"
65
65
  :disabled="disabled"
@@ -10,16 +10,28 @@ import { sbCompPrefix } from '../../global/storybook-utils';
10
10
  import { action } from '@storybook/addon-actions';
11
11
  import { Terminal16 as CompileIcon, Debug16 as DebugIcon, Chip16 as EmbedIcon,
12
12
  TrashCan16 as TrashCanIcon} from '@carbon/icons-vue'
13
- const testData = [
14
- { name:"Java", year:1995, oo:"Yes", purpose:"Applications", standard:"Java Language Specification", desc: "As of September 2022, Java 19 is the latest version, while Java 17, 11 and 8 are the current long-term support (LTS) versions."},
15
- { name:"COBOL", year:1959, oo:"Yes", purpose:"Business applications", standard:"COBOL 2014", desc: "COBOL statements have an English-like syntax, which was designed to be self-documenting and highly readable."},
16
- { name:"Pascal", year:1970, oo:"No", purpose:"Applications", standard:"None", desc: "Pascal was developed on the pattern of the ALGOL 60 language."},
17
- { name:"Ada", year:1980, oo:"Yes", purpose:"US DoD projects", standard:"Ada 2012 TC1", desc: "Ada was named after Ada Lovelace (1815–1852), who has been credited as the first computer programmer."},
18
- { name:"BASIC", year:1964, oo:"No", purpose:"Education", standard:"ANSI", desc: "BASIC declined in popularity in the 1990s"},
19
- { name:"C++", year:1985, oo:"Yes", purpose:"Systems programming", standard:"ISO/IEC 2017", desc: "C++ is standardized by the International Organization for Standardization (ISO), with the latest standard version ratified and published by ISO in December 2020 as ISO/IEC 14882:2020 (informally known as C++20)."},
20
- { name:"Fortran", year:1957, oo:"No", purpose:"Engineering applications", standard:"ANSI", desc: "Fortran was originally developed by IBM in the 1950s for scientific and engineering applications, and subsequently came to dominate scientific computing."},
21
- { name:"Go", year:2009, oo:"Maybe", purpose:"Networked applications", standard:"Go Spec", desc: "Go's designers were primarily motivated by their shared dislike of C++."},
22
- ];
13
+ import { ref } from 'vue';
14
+ const testData = ref([
15
+ { index:"0", name:"Java", year:1995, oo:"Yes", purpose:"Applications", standard:"Java Language Specification", desc: "As of September 2022, Java 19 is the latest version, while Java 17, 11 and 8 are the current long-term support (LTS) versions."},
16
+ { index:"1", name:"COBOL", year:1959, oo:"Yes", purpose:"Business applications", standard:"COBOL 2014", desc: "COBOL statements have an English-like syntax, which was designed to be self-documenting and highly readable."},
17
+ { index:"2", name:"Pascal", year:1970, oo:"No", purpose:"Applications", standard:"None", desc: "Pascal was developed on the pattern of the ALGOL 60 language."},
18
+ { index:"3", name:"Ada", year:1980, oo:"Yes", purpose:"US DoD projects", standard:"Ada 2012 TC1", desc: "Ada was named after Ada Lovelace (1815–1852), who has been credited as the first computer programmer."},
19
+ { index:"4", name:"BASIC", year:1964, oo:"No", purpose:"Education", standard:"ANSI", desc: "BASIC declined in popularity in the 1990s"},
20
+ { index:"5", name:"C++", year:1985, oo:"Yes", purpose:"Systems programming", standard:"ISO/IEC 2017", desc: "C++ is standardized by the International Organization for Standardization (ISO), with the latest standard version ratified and published by ISO in December 2020 as ISO/IEC 14882:2020 (informally known as C++20)."},
21
+ { index:"6", name:"Fortran", year:1957, oo:"No", purpose:"Engineering applications", standard:"ANSI", desc: "Fortran was originally developed by IBM in the 1950s for scientific and engineering applications, and subsequently came to dominate scientific computing."},
22
+ { index:"7", name:"Go", year:2009, oo:"Maybe", purpose:"Networked applications", standard:"Go Spec", desc: "Go's designers were primarily motivated by their shared dislike of C++."},
23
+ ]);
24
+ function sortTestData(opts) {
25
+ action('sort')(opts)
26
+ if (opts.order === 'none')
27
+ return testData.value.sort((a, b) => a.index.localeCompare(b.index, 'en', { sensitivity: 'base' }));
28
+ let direction = 1
29
+ if (opts.order === 'descending') direction = -1
30
+ if (opts.name === 'name')
31
+ return testData.value.sort((a, b) => direction * a.name.localeCompare(b.name, 'en', { sensitivity: 'base' }));
32
+ else if (opts.name === 'year')
33
+ return testData.value.sort((a, b) => direction * (a.year - b.year));
34
+ }
23
35
 
24
36
  <Meta title={`${sbCompPrefix}/CvDataTable`} component={CvDataTable} />
25
37
 
@@ -46,7 +58,7 @@ setup() {
46
58
  useHelperTextSlot: undefined,
47
59
  template: undefined},
48
60
  trashIcon: TrashCanIcon,
49
- onSort: action('sort'),
61
+ onSort: sortTestData,
50
62
  onSearch: action('search'),
51
63
  onRowSelectChange: action('row-select-change'),
52
64
  onRowSelectChanges: action('row-select-changes'),
@@ -101,14 +113,14 @@ const defaultTemplate = `
101
113
  </embed-icon>
102
114
  </cv-data-table-action>
103
115
  </template>
104
- <template v-slot:headings>
116
+ <template #headings>
105
117
  <cv-data-table-heading heading="Name" name="name" sortable/>
106
118
  <cv-data-table-heading heading="Year" name="year" sortable/>
107
119
  <cv-data-table-heading heading="Object Oriented"/>
108
120
  <cv-data-table-heading heading="Purpose" />
109
121
  <cv-data-table-heading heading="Standard" />
110
122
  </template>
111
- <template v-slot:data>
123
+ <template #data>
112
124
  <cv-data-table-row v-for="row in testData" :key="row.name" :value="row.name">
113
125
  <cv-data-table-cell>{{row.name}}</cv-data-table-cell>
114
126
  <cv-data-table-cell>{{row.year}}</cv-data-table-cell>
@@ -122,7 +134,7 @@ const defaultTemplate = `
122
134
  `;
123
135
  const expandingRowsTemplate = defaultTemplate.replace(
124
136
  "<!-- Add optional expanding data here -->",
125
- `<template v-slot:expandedContent>{{row.desc}}</template>`)
137
+ `<template #expandedContent>{{row.desc}}</template>`)
126
138
  .replace('@search="onSearch"', '')
127
139
  const skeletonTemplate = `
128
140
  <cv-data-table-skeleton
@@ -137,6 +149,19 @@ const skeletonTemplate = `
137
149
 
138
150
  **Usage:**
139
151
  - Sorting, filtering and pagination are the responsibility of the component user. This component raises events to facilitate this.
152
+ For example the test data is sorted like this but this is very specific to this data. Users will need to provide their own sort and filtering.
153
+ ```javascript
154
+ function sortTestData(opts) {
155
+ if (opts.order === 'none')
156
+ return testData.value.sort((a, b) => a.index.localeCompare(b.index, 'en', { sensitivity: 'base' }));
157
+ let direction = 1
158
+ if (opts.order === 'descending') direction = -1
159
+ if (opts.name === 'name')
160
+ return testData.value.sort((a, b) => direction * a.name.localeCompare(b.name, 'en', { sensitivity: 'base' }));
161
+ else if (opts.name === 'year')
162
+ return testData.value.sort((a, b) => direction * (a.year - b.year));
163
+ }
164
+ ```
140
165
  - The search bar appears only if the search event is listened for.
141
166
 
142
167
  **Row attributes:**
@@ -23,7 +23,7 @@
23
23
  <section v-if="hasToolbar" :class="`${carbonPrefix}--table-toolbar`">
24
24
  <div
25
25
  v-show="hasBatchActions"
26
- :aria-hidden="!batchActive"
26
+ :aria-hidden="`${!batchActive}`"
27
27
  :class="[
28
28
  `${carbonPrefix}--batch-actions`,
29
29
  { [`${carbonPrefix}--batch-actions--active`]: batchActive },
@@ -127,11 +127,9 @@ const internalOrder = computed(() => {
127
127
  return undefined;
128
128
  }
129
129
  const heading = store.findHeading(parent, cvId);
130
- if (heading?.order !== 'ascending' && heading?.order !== 'descending') {
131
- return 'none';
132
- } else {
133
- return heading?.order;
134
- }
130
+ if (['ascending', 'descending', 'none'].includes(heading?.order))
131
+ return heading.order;
132
+ else return 'none';
135
133
  });
136
134
 
137
135
  const headingLabelTag = computed(() => {
@@ -42,13 +42,12 @@
42
42
  data-date-picker-input
43
43
  role="datepicker"
44
44
  :data-invalid="isInvalid || null"
45
- :disabled="disabled"
46
- :data-date-picker-input-from="getKind === 'range'"
45
+ :disabled="disabled || null"
46
+ :data-date-picker-input-from="`${getKind === 'range'}`"
47
47
  :class="`${carbonPrefix}--date-picker__input`"
48
48
  :pattern="pattern"
49
49
  :placeholder="placeholder"
50
50
  @change="handleUpdateEvent"
51
- @click="handleClick"
52
51
  />
53
52
  <Calendar16
54
53
  v-if="['single', 'range'].includes(getKind)"
@@ -87,9 +86,9 @@
87
86
  type="text"
88
87
  data-date-picker-input
89
88
  role="todatepicker"
90
- :data-date-picker-input-to="kind === 'range'"
89
+ :data-date-picker-input-to="`${kind === 'range'}`"
91
90
  :data-invalid="isInvalid || null"
92
- :disabled="disabled"
91
+ :disabled="disabled || null"
93
92
  :class="`${carbonPrefix}--date-picker__input`"
94
93
  :pattern="pattern"
95
94
  :placeholder="placeholder"
@@ -136,9 +135,6 @@ const dateWrapper = ref(null);
136
135
  const date = ref(null);
137
136
  const todate = ref(null);
138
137
 
139
- const cvId = useCvId(props, true, 'date-picker-');
140
- const isLight = useIsLight(props);
141
-
142
138
  let calendar;
143
139
 
144
140
  const props = defineProps({
@@ -169,6 +165,9 @@ const props = defineProps({
169
165
  ...propsCvTheme,
170
166
  });
171
167
 
168
+ const cvId = useCvId(props, true, 'date-picker-');
169
+ const isLight = useIsLight(props);
170
+
172
171
  const emit = defineEmits(['update:modelValue']);
173
172
 
174
173
  const getKind = computed({
@@ -49,7 +49,7 @@ const defaultTemplate = `
49
49
  <cv-dropdown
50
50
  :light="light"
51
51
  :placeholder="placeholder"
52
- :value="value"
52
+ :modelValue="modelValue"
53
53
  :up="up"
54
54
  :inline="inline"
55
55
  :helper-text="helperText"
@@ -71,7 +71,7 @@ const defaultTemplate = `
71
71
  const slotsTemplate = `
72
72
  <div :style="{width: '300px'}">
73
73
  <cv-dropdown
74
- v-model:value="myValue"
74
+ v-model="myValue"
75
75
  :light="light"
76
76
  :placeholder="placeholder"
77
77
  :up="up"
@@ -101,7 +101,7 @@ const itemsTemplate = `
101
101
  <cv-dropdown
102
102
  :light="light"
103
103
  :placeholder="placeholder"
104
- :value="value"
104
+ :modelValue="modelValue"
105
105
  :up="up"
106
106
  :inline="inline"
107
107
  :helper-text="helperText"
@@ -119,7 +119,7 @@ const itemsTemplate = `
119
119
  const vmodelTemplate = `
120
120
  <div :style="{width: '300px'}">
121
121
  <cv-dropdown
122
- v-model:value="myValue"
122
+ v-model="myValue"
123
123
  :label="label"
124
124
  :placeholder="placeholder"
125
125
  @change="onChange">
@@ -151,10 +151,7 @@ Notes:
151
151
 
152
152
  - You can place a Dropdown inline with other content by using the inline variant
153
153
  Migration notes:
154
-
155
- - The `v-model` is different in Vue 3 than Vue 2. You can still specify the `v-model=something` to control the visibility but
156
- if you specify it like this you will see a deprecation message in the log. Please use `v-model:value=something` instead.
157
- - Add the `size` option to match Carbon React
154
+ - Added the `size` option to match Carbon React
158
155
  - Added the `warningMessage` option to match Carbon React
159
156
 
160
157
  <Canvas>
@@ -168,21 +165,16 @@ Notes:
168
165
  'template',
169
166
  'change',
170
167
  'update:modelValue',
171
- 'update:value',
172
168
  'helper-text',
173
169
  'invalid-message',
174
170
  'warning-message',
175
171
  'internal-caption',
176
- 'modelValue',
177
172
  ],
178
173
  },
179
174
  docs: { source: { code: defaultTemplate } },
180
175
  }}
181
176
  args={{
182
177
  template: defaultTemplate,
183
- props: {
184
- modelValue: undefined,
185
- },
186
178
  label: 'Characters',
187
179
  placeholder: 'Choose an ally',
188
180
  helperText: 'May the force be with you',
@@ -273,7 +265,6 @@ Notes:
273
265
  'template',
274
266
  'change',
275
267
  'update:modelValue',
276
- 'update:value',
277
268
  'helper-text',
278
269
  'invalid-message',
279
270
  'warning-message',
@@ -316,32 +307,7 @@ Notes:
316
307
  name="v-model"
317
308
  parameters={{
318
309
  controls: {
319
- exclude: [
320
- 'props',
321
- 'default',
322
- 'template',
323
- 'change',
324
- 'update:modelValue',
325
- 'update:value',
326
- 'helper-text',
327
- 'invalid-message',
328
- 'warning-message',
329
- 'internal-caption',
330
- 'modelValue',
331
- 'ariaLabel',
332
- 'disabled',
333
- 'formItem',
334
- 'helperText',
335
- 'hideSelected',
336
- 'inline',
337
- 'invalidMessage',
338
- 'items',
339
- 'label',
340
- 'placeholder',
341
- 'size',
342
- 'up',
343
- 'value',
344
- 'warningMessage',
310
+ include: [
345
311
  ],
346
312
  },
347
313
  docs: { source: { code: vmodelTemplate } },
@@ -367,32 +333,7 @@ Notes:
367
333
  name="skeleton"
368
334
  parameters={{
369
335
  controls: {
370
- exclude: [
371
- 'props',
372
- 'default',
373
- 'template',
374
- 'change',
375
- 'update:modelValue',
376
- 'update:value',
377
- 'helper-text',
378
- 'invalid-message',
379
- 'warning-message',
380
- 'internal-caption',
381
- 'modelValue',
382
- 'ariaLabel',
383
- 'disabled',
384
- 'formItem',
385
- 'helperText',
386
- 'hideSelected',
387
- 'invalidMessage',
388
- 'items',
389
- 'label',
390
- 'placeholder',
391
- 'size',
392
- 'up',
393
- 'value',
394
- 'warningMessage',
395
- 'inline',
336
+ include: [
396
337
  ],
397
338
  },
398
339
  docs: { source: { code: skeletonTemplate } },
@@ -73,7 +73,7 @@
73
73
  <button
74
74
  ref="button"
75
75
  :aria-controls="`${uid}-menu`"
76
- :aria-disabled="disabled"
76
+ :aria-disabled="disabled || null"
77
77
  :aria-expanded="open ? 'true' : 'false'"
78
78
  :aria-labelledby="ariaLabeledBy"
79
79
  :class="`${carbonPrefix}--list-box__field`"
@@ -129,7 +129,7 @@
129
129
  </div>
130
130
  <div
131
131
  v-else-if="data.isHelper"
132
- :aria-disabled="disabled"
132
+ :aria-disabled="disabled || null"
133
133
  :class="[
134
134
  `${carbonPrefix}--form__helper-text`,
135
135
  { [`${carbonPrefix}--form__helper-text--disabled`]: disabled },
@@ -228,25 +228,15 @@ const props = defineProps({
228
228
  * Specify the direction of the dropdown. Can be either true (top) or (false) bottom.
229
229
  */
230
230
  up: { type: Boolean, default: false },
231
- /**
232
- * Render with a value already selected. Available as `v-model:value`.
233
- */
234
- value: { type: String, default: undefined },
235
231
  /**
236
232
  * Provide the text that is displayed and put the control in warning state
237
233
  */
238
234
  warningMessage: { type: String, default: undefined },
239
235
  /**
240
- * @deprecated - use v-model:value
236
+ * Render with a value already selected. Available as `v-model`.
241
237
  */
242
238
  modelValue: {
243
239
  type: String,
244
- validator: val => {
245
- console.warn(
246
- `v-model for cv-dropdown is deprecated. Specify "v-model:value" instead [${val}]`
247
- );
248
- return true;
249
- },
250
240
  default: undefined,
251
241
  },
252
242
 
@@ -255,7 +245,7 @@ const props = defineProps({
255
245
  });
256
246
  const uid = useCvId(props, true);
257
247
  const isLight = useIsLight(props);
258
- const dataValue = ref(props.value);
248
+ const dataValue = ref(props.modelValue);
259
249
  provide('dropdown-selected', dataValue);
260
250
  const focusItem = ref(undefined);
261
251
  provide('dropdown-focus', focusItem);
@@ -287,16 +277,15 @@ const isWarning = computed(() => {
287
277
  });
288
278
  onMounted(checkSlots);
289
279
  onUpdated(checkSlots);
290
- const emit = defineEmits(['update:value', 'update:modelValue', 'change']);
280
+ const emit = defineEmits(['update:modelValue', 'change']);
291
281
  watch(
292
- () => props.value,
282
+ () => props.modelValue,
293
283
  () => {
294
- dataValue.value = props.value;
284
+ dataValue.value = props.modelValue;
295
285
  }
296
286
  );
297
287
  watch(dataValue, () => {
298
288
  emit('change', dataValue.value);
299
- emit('update:value', dataValue.value);
300
289
  emit('update:modelValue', dataValue.value);
301
290
  });
302
291
  watch(open, () => {
@@ -21,7 +21,7 @@
21
21
  >
22
22
  <a
23
23
  ref="link"
24
- :aria-checked="dataSelected"
24
+ :aria-checked="`${dataSelected}`"
25
25
  :class="`${carbonPrefix}--dropdown-link`"
26
26
  href="javascript:void(0)"
27
27
  role="menuitemradio"