@carbon/vue 2.44.1 → 2.44.2

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.44.2",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -75,5 +75,5 @@
75
75
  "eslint-plugin-prettier": "^3.4.1",
76
76
  "vue-template-compiler": "^2.7.10"
77
77
  },
78
- "gitHead": "bc9edcb2243d53639b8e402752df209934fc2476"
78
+ "gitHead": "a680fe88936b6d711a40ad1d2b2a29bf1f5233c2"
79
79
  }
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
@@ -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,7 @@
14
14
  type="button"
15
15
  :aria-expanded="open ? 'true' : 'false'"
16
16
  :aria-controls="`${uid}-menu`"
17
+ :aria-labelledby="`${uid}`"
17
18
  :id="`${uid}-trigger`"
18
19
  ref="trigger"
19
20
  @click="doToggle"