@carbon/vue 2.44.1 → 2.45.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/vue",
3
3
  "description": "A collection of components for the Carbon Design System built using Vue.js",
4
- "version": "2.44.1",
4
+ "version": "2.45.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -57,23 +57,27 @@
57
57
  "scripts": {
58
58
  "build": "vue-cli-service build --target lib --name carbon-vue ./src/index.js --no-clean",
59
59
  "clean": "rimraf dist node_modules/.cache",
60
- "postinstall": "carbon-telemetry collect --install"
60
+ "postinstall": "carbon-telemetry collect --install",
61
+ "upgrade:dependencies": "run-s -s 'upgrade:dependencies:*'",
62
+ "upgrade:dependencies:carbon": "npm-check-updates -u --dep dev,peer,prod --filter '/carbon/' --target minor",
63
+ "upgrade:dependencies:other": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^vue$|^@vue)/'",
64
+ "upgrade:dependencies:yarn": "yarn set version latest"
61
65
  },
62
66
  "engines": {
63
67
  "node": ">=10.x"
64
68
  },
65
69
  "sideEffects": true,
66
70
  "dependencies": {
67
- "@carbon/icons-vue": "10.56.0",
71
+ "@carbon/icons-vue": "10.63.0",
68
72
  "@carbon/telemetry": "^0.1.0",
69
- "carbon-components": "10.58.0",
73
+ "carbon-components": "10.58.5",
70
74
  "flatpickr": "4.6.13",
71
75
  "vue": "^2.7.10"
72
76
  },
73
77
  "devDependencies": {
74
- "@vue/cli-service": "^3.12.1",
75
- "eslint-plugin-prettier": "^3.4.1",
76
- "vue-template-compiler": "^2.7.10"
78
+ "@vue/cli-service": "~4.5.19",
79
+ "eslint-plugin-prettier": "^4.2.1",
80
+ "vue-template-compiler": "^2.7.14"
77
81
  },
78
- "gitHead": "bc9edcb2243d53639b8e402752df209934fc2476"
82
+ "gitHead": "46ff5b12ef6af76bf521bef0ceaa6ab7dcc181fb"
79
83
  }
package/src/carbon.yml CHANGED
@@ -2,10 +2,64 @@
2
2
  library:
3
3
  id: carbon-components-vue
4
4
  name: Carbon Vue
5
- description: Vue implementation of Carbon Components.
5
+ description: Build user interfaces with Carbon's core components.
6
6
  externalDocsUrl: https://vue.carbondesignsystem.com/?path=/story/welcome
7
7
  inherits: carbon-styles
8
8
  packageJsonPath: /../package.json
9
+ navData:
10
+ - title: Get started
11
+ path: "https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/frameworks/vue.mdx"
12
+ - title: Tutorial
13
+ items:
14
+ - title: Overview
15
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/overview.mdx'
16
+ - title: Step 1
17
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/step-1.mdx'
18
+ - title: Step 2
19
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/step-2.mdx'
20
+ - title: Step 3
21
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/step-3.mdx'
22
+ - title: Step 4
23
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/step-4.mdx'
24
+ - title: Step 5
25
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/carbon-platform/src/pages/developing/vue-tutorial/step-5.mdx'
26
+ - title: Wrapping up
27
+ path: 'https://github.com/carbon-design-system/carbon-website/blob/main/src/pages/developing/vue-tutorial/wrapping-up.mdx'
28
+ designKits:
29
+ carbon-white-sketch:
30
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-white-sketch
31
+ carbon-g10-sketch:
32
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g10-sketch
33
+ carbon-g90-sketch:
34
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g90-sketch
35
+ carbon-g100-sketch:
36
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g100-sketch
37
+ carbon-shell-sketch:
38
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-shell-sketch
39
+ carbon-white-adobe-xd:
40
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-white-adobe-xd
41
+ carbon-g10-adobe-xd:
42
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g10-adobe-xd
43
+ carbon-g90-adobe-xd:
44
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g90-adobe-xd
45
+ carbon-g100-adobe-xd:
46
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g100-adobe-xd
47
+ axure-widget-library:
48
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/axure-widget-library
49
+ text-toolbar-sketch:
50
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/text-toolbar-sketch
51
+ carbon-mid-fi-sketch:
52
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-mid-fi-sketch
53
+ carbon-wireframe-invision-freehand:
54
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-wireframe-invision-freehand
55
+ carbon-white-figma:
56
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-white-figma
57
+ carbon-g10-figma:
58
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g10-figma
59
+ carbon-g90-figma:
60
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g90-figma
61
+ carbon-g100-figma:
62
+ $ref: https://unpkg.com/@carbon-platform/resources/carbon.yml#/designKits/carbon-g100-figma
9
63
  assets:
10
64
  accordion:
11
65
  status: stable
@@ -182,7 +182,7 @@ export default {
182
182
  this.updateOptions();
183
183
  },
184
184
  mounted() {
185
- this.filter = this.value;
185
+ this.internalUpdateValue(this.value);
186
186
  this.highlighted = this.value ? this.value : this.highlight; // override highlight with value if provided
187
187
  this.checkSlots();
188
188
  },
@@ -54,7 +54,7 @@
54
54
  :class="`${carbonPrefix}--search-input`"
55
55
  type="text"
56
56
  :id="uid"
57
- role="search"
57
+ role="searchbox"
58
58
  :placeholder="searchPlaceholder"
59
59
  :aria-labelledby="uid"
60
60
  ref="search"
@@ -4,6 +4,7 @@
4
4
  <p :class="`${carbonPrefix}--label-description`">{{ helperText }}</p>
5
5
  <div :class="`${carbonPrefix}--file`" data-file>
6
6
  <label
7
+ v-if="kind === 'button'"
7
8
  :for="uid"
8
9
  :class="[
9
10
  {
@@ -18,13 +19,33 @@
18
19
  @keydown.space.prevent
19
20
  @keyup.space.prevent="onShow()"
20
21
  >
21
- <cv-wrapper
22
- :tag-type="kind !== 'button' ? 'div' : ''"
22
+ <slot name="drop-target">{{ internalDropTargetLabel }}</slot>
23
+ <input
24
+ v-if="kind !== 'button'"
25
+ v-bind="$attrs"
26
+ type="file"
27
+ :accept="accept"
28
+ :class="`${carbonPrefix}--file-input`"
29
+ :id="uid"
30
+ data-file-uploader
31
+ data-target="[data-file-container]"
32
+ v-on="inputListeners"
33
+ ref="file-input"
34
+ />
35
+ </label>
36
+ <label v-else :for="uid">
37
+ <div
38
+ tabindex="0"
39
+ ref="focusTarget"
23
40
  data-file-drop-container
24
- :class="`${carbonPrefix}--file__drop-container${allowDropClass}`"
41
+ :class="wrapperClass"
42
+ role="button"
25
43
  @dragover="onDragEvent"
26
44
  @dragleave="onDragEvent"
27
45
  @drop="onDragEvent"
46
+ @keydown.enter.prevent="onShow()"
47
+ @keydown.space.prevent
48
+ @keyup.space.prevent="onShow()"
28
49
  >
29
50
  <slot name="drop-target">{{ internalDropTargetLabel }}</slot>
30
51
  <input
@@ -39,7 +60,7 @@
39
60
  v-on="inputListeners"
40
61
  ref="file-input"
41
62
  />
42
- </cv-wrapper>
63
+ </div>
43
64
  </label>
44
65
  <input
45
66
  v-if="kind === 'button'"
@@ -205,6 +226,15 @@ export default {
205
226
  allowDropClass() {
206
227
  return this.allowDrop ? ` ${this.carbonPrefix}--file__drop-container--drag-over` : '';
207
228
  },
229
+ wrapperClass() {
230
+ const staticClass = `${this.carbonPrefix}--file__drop-container${this.allowDropClass}`;
231
+ const dynamicClass =
232
+ this.kind !== 'button'
233
+ ? `${this.carbonPrefix}--file-browse-btn`
234
+ : `${this.carbonPrefix}--btn ${this.carbonPrefix}--btn--primary`;
235
+
236
+ return `${staticClass} ${dynamicClass}`;
237
+ },
208
238
  },
209
239
  methods: {
210
240
  remove(index) {
@@ -14,6 +14,8 @@
14
14
  type="button"
15
15
  :aria-expanded="open ? 'true' : 'false'"
16
16
  :aria-controls="`${uid}-menu`"
17
+ :aria-labelledby="`${uid}`"
18
+ :aria-label="ariaLabel"
17
19
  :id="`${uid}-trigger`"
18
20
  ref="trigger"
19
21
  @click="doToggle"
@@ -75,6 +77,7 @@ export default {
75
77
  mixins: [uidMixin, carbonPrefixMixin, methodsMixin({ trigger: ['blur', 'focus'] })],
76
78
  props: {
77
79
  label: String,
80
+ ariaLabel: String,
78
81
  flipMenu: Boolean,
79
82
  up: Boolean,
80
83
  offset: {
@@ -59,6 +59,7 @@
59
59
  // eslint-disable-nextx-line
60
60
  selectedId == tab.uid ? 0 : -1
61
61
  "
62
+ type="button"
62
63
  >
63
64
  {{ tab.label }}
64
65
  </button>
@@ -28,6 +28,7 @@
28
28
  :aria-label="clearAriaLabel"
29
29
  @click.stop.prevent="onRemove"
30
30
  :disabled="disabled"
31
+ type="button"
31
32
  >
32
33
  <Close16 />
33
34
  </button>