@carbon/vue 2.26.0-canary.0 → 2.26.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.26.0-canary.0",
4
+ "version": "2.26.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -73,5 +73,5 @@
73
73
  "eslint-plugin-prettier": "^3.1.1",
74
74
  "vue-template-compiler": "^2.6.10"
75
75
  },
76
- "gitHead": "2fd7ea5beaa75ca776a7f5eb3e23afa16ec40f4d"
76
+ "gitHead": "5bcf4d93005e113e5501524d339f0907f57f1758"
77
77
  }
@@ -9,7 +9,8 @@
9
9
  <li
10
10
  data-accordion-item
11
11
  class="cv-accordion-item bx--accordion__item"
12
- :class="{ 'bx--accordion__item--active': dataOpen }"
12
+ :class="itemClasses"
13
+ @animationend="onAnimationEnd"
13
14
  >
14
15
  <button
15
16
  type="button"
@@ -50,6 +51,7 @@ export default {
50
51
  },
51
52
  data() {
52
53
  return {
54
+ animation: '',
53
55
  dataOpen: false,
54
56
  };
55
57
  },
@@ -58,6 +60,7 @@ export default {
58
60
  },
59
61
  methods: {
60
62
  toggle(force) {
63
+ this.animation = this.dataOpen ? 'collapsing' : 'expanding';
61
64
  const newValue = typeof force === 'boolean' ? !!force : !this.dataOpen;
62
65
  const change = this.dataOpen !== undefined && newValue !== this.dataOpen;
63
66
 
@@ -66,6 +69,21 @@ export default {
66
69
  this.$parent.$emit('cv:change', this);
67
70
  }
68
71
  },
72
+ onAnimationEnd() {
73
+ this.animation = '';
74
+ },
75
+ },
76
+ computed: {
77
+ itemClasses() {
78
+ const classes = [];
79
+ if (this.dataOpen) {
80
+ classes.push('bx--accordion__item--active');
81
+ }
82
+ if (this.animation) {
83
+ classes.push(`bx--accordion__item--${this.animation}`);
84
+ }
85
+ return classes.join(' ');
86
+ },
69
87
  },
70
88
  };
71
89
  </script>
@@ -15,6 +15,7 @@
15
15
  :class="{
16
16
  'bx--list-box--light': theme === 'light',
17
17
  'bx--combo-box--expanded': open,
18
+ 'bx--list-box--expanded': open,
18
19
  'bx--combo-box--disabled bx--list-box--disabled': $attrs.disabled,
19
20
  }"
20
21
  :data-invalid="isInvalid"
@@ -9,10 +9,8 @@
9
9
  </div>
10
10
 
11
11
  <section v-if="hasToolbar" class="bx--table-toolbar">
12
- <div v-if="batchActive" :style="{ minHeight: '48px', maxWidth: '0' }" />
13
-
14
12
  <div
15
- v-if="hasBatchActions"
13
+ v-show="hasBatchActions"
16
14
  class="bx--batch-actions"
17
15
  :class="{ 'bx--batch-actions--active': batchActive }"
18
16
  :aria-label="actionBarAriaLabel"
@@ -34,7 +32,7 @@
34
32
  </div>
35
33
  </div>
36
34
 
37
- <div v-if="(hasActions || $listeners.search) && !batchActive" class="bx--toolbar-content">
35
+ <div class="bx--toolbar-content">
38
36
  <div
39
37
  v-if="$listeners.search"
40
38
  :class="{