@itfin/components 1.2.135 → 1.2.136
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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<template>
|
|
2
2
|
|
|
3
3
|
<div class="itf-dropdown" :class="`drop${placement}`">
|
|
4
4
|
<div v-if="disabled"><slot name="button">{{label}}</slot></div>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
</template
|
|
29
|
+
</template>
|
|
30
30
|
<script>
|
|
31
31
|
import { Vue, Component, Prop, Watch, PropSync } from 'vue-property-decorator';
|
|
32
32
|
import itfButton from '../button/Button';
|
|
@@ -73,38 +73,12 @@ class itfDropdown extends Vue {
|
|
|
73
73
|
// }
|
|
74
74
|
// }
|
|
75
75
|
|
|
76
|
-
render (createElement) {
|
|
77
|
-
const modalId = `dropdownId${this._uid}`;
|
|
78
|
-
const { right, shadow } = this;
|
|
79
|
-
return createElement('div', {}, [
|
|
80
|
-
createElement(
|
|
81
|
-
'itf-button',
|
|
82
|
-
{
|
|
83
|
-
props: this.buttonOptions || {},
|
|
84
|
-
class: { 'dropdown-toggle': this.toggle },
|
|
85
|
-
attrs: { id: modalId, 'data-bs-toggle': 'dropdown', 'aria-expanded': 'false' },
|
|
86
|
-
ref: 'toggle',
|
|
87
|
-
},
|
|
88
|
-
this.$slots.button
|
|
89
|
-
),
|
|
90
|
-
createElement(
|
|
91
|
-
'div',
|
|
92
|
-
{
|
|
93
|
-
attrs: { rel: 'dropdown' , 'aria-labelledby': modalId},
|
|
94
|
-
class: { 'dropdown-menu-end': right, 'shadow': shadow },
|
|
95
|
-
staticClass: 'itf-dropdown__menu dropdown-menu'
|
|
96
|
-
},
|
|
97
|
-
this.$slots.default
|
|
98
|
-
)
|
|
99
|
-
]);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
76
|
created() {
|
|
103
|
-
|
|
77
|
+
globalModalIndex += 1;
|
|
78
|
+
this.modalId = `dropdownId${globalModalIndex}`;
|
|
104
79
|
}
|
|
105
80
|
|
|
106
81
|
async mounted() {
|
|
107
|
-
console.info(this);
|
|
108
82
|
if (typeof window === 'undefined' || !this.$refs.toggle) {
|
|
109
83
|
return;
|
|
110
84
|
}
|
|
@@ -53,6 +53,7 @@ class itfModal extends Vue {
|
|
|
53
53
|
@Prop({ type: Boolean, default: false }) closable
|
|
54
54
|
@Prop({ type: Boolean, default: false }) closeIcon
|
|
55
55
|
@Prop({ type: Boolean, default: false }) persistent
|
|
56
|
+
@Prop({ type: Boolean, default: false }) slider
|
|
56
57
|
@Prop({ type: Boolean, default: false }) escClose
|
|
57
58
|
@Prop({ type: Function, default: null }) onEscClose;
|
|
58
59
|
@Prop({ type: Boolean, default: true }) appendToBody;
|