mediacube-ui 0.1.232 → 0.1.234
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.234](https://github.com/MediaCubeCo/mcui/compare/v0.1.233...v0.1.234) (2024-03-14)
|
|
6
|
+
|
|
7
|
+
### [0.1.233](https://github.com/MediaCubeCo/mcui/compare/v0.1.232...v0.1.233) (2024-03-12)
|
|
8
|
+
|
|
5
9
|
### [0.1.232](https://github.com/MediaCubeCo/mcui/compare/v0.1.231...v0.1.232) (2024-03-11)
|
|
6
10
|
|
|
7
11
|
### [0.1.231](https://github.com/MediaCubeCo/mcui/compare/v0.1.230...v0.1.231) (2024-03-06)
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
import VueClickOutside from 'vue-click-outside'
|
|
16
|
+
import _throttle from 'lodash/throttle'
|
|
16
17
|
|
|
17
18
|
export default {
|
|
18
19
|
name: 'McDropdown',
|
|
@@ -101,10 +102,14 @@ export default {
|
|
|
101
102
|
|
|
102
103
|
mounted() {
|
|
103
104
|
this.activator.addEventListener('click', this.toggleDropdown)
|
|
105
|
+
window.addEventListener('resize', this.throttledCalculateDropdownPosition)
|
|
106
|
+
window.addEventListener('transitionrun', this.throttledCalculateDropdownPosition)
|
|
104
107
|
},
|
|
105
108
|
|
|
106
109
|
beforeDestroy() {
|
|
107
110
|
this.activator.removeEventListener('click', this.toggleDropdown)
|
|
111
|
+
window.removeEventListener('resize', this.throttledCalculateDropdownPosition)
|
|
112
|
+
window.removeEventListener('transitionrun', this.throttledCalculateDropdownPosition)
|
|
108
113
|
},
|
|
109
114
|
|
|
110
115
|
methods: {
|
|
@@ -123,6 +128,7 @@ export default {
|
|
|
123
128
|
this.$emit('input', false)
|
|
124
129
|
},
|
|
125
130
|
calculateDropdownPosition() {
|
|
131
|
+
if (!this.$refs.dropdown_body) return
|
|
126
132
|
const rect = this.activator.getBoundingClientRect()
|
|
127
133
|
const space_below = window.innerHeight - rect.bottom
|
|
128
134
|
const space_left = window.innerWidth - rect.left
|
|
@@ -134,6 +140,9 @@ export default {
|
|
|
134
140
|
this.local_list_position = this.listPosition === 'auto' ? auto_list_position : this.listPosition
|
|
135
141
|
this.local_position = this.position === 'auto' ? auto_position : this.position
|
|
136
142
|
},
|
|
143
|
+
throttledCalculateDropdownPosition: _throttle(function() {
|
|
144
|
+
this.calculateDropdownPosition()
|
|
145
|
+
}, 200),
|
|
137
146
|
},
|
|
138
147
|
}
|
|
139
148
|
</script>
|
|
@@ -289,6 +289,16 @@ export default {
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
+
.mc-side-bar-button {
|
|
293
|
+
&__tooltip {
|
|
294
|
+
width: calc(100% - #{$space-250});
|
|
295
|
+
.mc-button {
|
|
296
|
+
&__text {
|
|
297
|
+
margin-inline-end: $space-zero;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
292
302
|
}
|
|
293
303
|
&__head {
|
|
294
304
|
display: flex;
|