@gitlab/ui 128.14.2 → 128.14.3
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.
|
@@ -4,11 +4,8 @@ var script = {
|
|
|
4
4
|
name: 'GlAccordion',
|
|
5
5
|
provide() {
|
|
6
6
|
return {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Track removing this workaround in https://gitlab.com/gitlab-org/gitlab-ui/-/issues/3152
|
|
10
|
-
defaultHeaderLevel: () => this.headerLevel,
|
|
11
|
-
autoCollapse: () => this.autoCollapse
|
|
7
|
+
defaultHeaderLevel: this.headerLevel,
|
|
8
|
+
autoCollapse: this.autoCollapse
|
|
12
9
|
};
|
|
13
10
|
},
|
|
14
11
|
props: {
|
|
@@ -70,7 +70,7 @@ var script = {
|
|
|
70
70
|
},
|
|
71
71
|
computed: {
|
|
72
72
|
headerComponent() {
|
|
73
|
-
const level = this.headerLevel || this.defaultHeaderLevel
|
|
73
|
+
const level = this.headerLevel || this.defaultHeaderLevel;
|
|
74
74
|
return `h${level}`;
|
|
75
75
|
},
|
|
76
76
|
buttonTitle() {
|
|
@@ -112,7 +112,7 @@ var script = {
|
|
|
112
112
|
this.checkAndCollapseSiblingAccordionItems(newLocalVisible);
|
|
113
113
|
},
|
|
114
114
|
checkAndCollapseSiblingAccordionItems(newVisible) {
|
|
115
|
-
if (this.autoCollapse
|
|
115
|
+
if (this.autoCollapse && newVisible) {
|
|
116
116
|
this.$parent.$el.dispatchEvent(new CustomEvent(COLLAPSE_EVENT, {
|
|
117
117
|
detail: this.accordionItemId
|
|
118
118
|
}));
|
package/package.json
CHANGED
|
@@ -3,11 +3,8 @@ export default {
|
|
|
3
3
|
name: 'GlAccordion',
|
|
4
4
|
provide() {
|
|
5
5
|
return {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Track removing this workaround in https://gitlab.com/gitlab-org/gitlab-ui/-/issues/3152
|
|
9
|
-
defaultHeaderLevel: () => this.headerLevel,
|
|
10
|
-
autoCollapse: () => this.autoCollapse,
|
|
6
|
+
defaultHeaderLevel: this.headerLevel,
|
|
7
|
+
autoCollapse: this.autoCollapse,
|
|
11
8
|
};
|
|
12
9
|
},
|
|
13
10
|
props: {
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
},
|
|
71
71
|
computed: {
|
|
72
72
|
headerComponent() {
|
|
73
|
-
const level = this.headerLevel || this.defaultHeaderLevel
|
|
73
|
+
const level = this.headerLevel || this.defaultHeaderLevel;
|
|
74
74
|
return `h${level}`;
|
|
75
75
|
},
|
|
76
76
|
buttonTitle() {
|
|
@@ -114,7 +114,7 @@ export default {
|
|
|
114
114
|
this.checkAndCollapseSiblingAccordionItems(newLocalVisible);
|
|
115
115
|
},
|
|
116
116
|
checkAndCollapseSiblingAccordionItems(newVisible) {
|
|
117
|
-
if (this.autoCollapse
|
|
117
|
+
if (this.autoCollapse && newVisible) {
|
|
118
118
|
this.$parent.$el.dispatchEvent(
|
|
119
119
|
new CustomEvent(COLLAPSE_EVENT, { detail: this.accordionItemId }),
|
|
120
120
|
);
|