edvoyui-component-library-test-flight 0.0.171 → 0.0.173
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/dist/library-vue-ts.cjs.js +26 -26
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +2262 -2249
- package/dist/library-vue-ts.umd.js +41 -41
- package/package.json +1 -1
- package/src/components/dropdown/EUIMultiDropdown.vue +19 -6
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
<div
|
|
23
23
|
v-if="isOpen && menuItems.length"
|
|
24
24
|
:class="[
|
|
25
|
-
'absolute
|
|
26
|
-
|
|
25
|
+
'absolute z-0 p-2 transition-all duration-300 ease-in-out bg-white border border-gray-200 border-solid rounded-lg shadow-2xl shadow-gray-300 min-w-32 max-w-64 w-max',
|
|
26
|
+
mainDropdownClasses,
|
|
27
27
|
dropdownClass,
|
|
28
28
|
]"
|
|
29
29
|
@click.stop
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<!-- Sub-menu lists-->
|
|
58
58
|
<div
|
|
59
59
|
v-if="item.subMenu && activeMenuItem === item.text"
|
|
60
|
-
class="absolute top-0 z-10 transition-all duration-300 ease-in-out
|
|
60
|
+
:class="['absolute top-0 z-10 transition-all duration-300 ease-in-out min-w-32 max-w-64 w-max', placement === 'right' ? 'right-full' : 'left-full']"
|
|
61
61
|
>
|
|
62
62
|
<div
|
|
63
63
|
class="bg-white border border-gray-200 border-solid rounded-lg shadow-2xl ms-2 shadow-gray-300"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
</template>
|
|
92
92
|
|
|
93
93
|
<script setup lang="ts">
|
|
94
|
-
import { ref, defineProps, PropType } from "vue";
|
|
94
|
+
import { ref, defineProps, PropType, computed } from "vue";
|
|
95
95
|
import { onClickOutside } from "@vueuse/core";
|
|
96
96
|
import ChevronDownStroke from "../../assets/svg/ChevronDownStroke.vue";
|
|
97
97
|
import ChevronDownStrokeSolid from "../../assets/svg/ChevronDownStrokeSolid.vue";
|
|
@@ -102,7 +102,7 @@ interface MenuItem {
|
|
|
102
102
|
enableAction?: boolean;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
defineProps({
|
|
105
|
+
const props = defineProps({
|
|
106
106
|
title: {
|
|
107
107
|
type: String,
|
|
108
108
|
default: "My Students",
|
|
@@ -143,7 +143,7 @@ defineProps({
|
|
|
143
143
|
},
|
|
144
144
|
disabled: Boolean,
|
|
145
145
|
placement: {
|
|
146
|
-
type: String as PropType<"top" | "bottom">,
|
|
146
|
+
type: String as PropType<"top" | "bottom" | "left" | "right">,
|
|
147
147
|
default: "bottom",
|
|
148
148
|
},
|
|
149
149
|
});
|
|
@@ -169,6 +169,19 @@ const clearActiveMenuItem = () => {
|
|
|
169
169
|
onClickOutside(dropdownButton, () => {
|
|
170
170
|
isOpen.value = false;
|
|
171
171
|
});
|
|
172
|
+
|
|
173
|
+
const mainDropdownClasses = computed(() => {
|
|
174
|
+
switch (props.placement) {
|
|
175
|
+
case 'top':
|
|
176
|
+
return 'bottom-full left-0 mb-1';
|
|
177
|
+
case 'left':
|
|
178
|
+
return 'right-full top-0 me-1'; // me-1 is margin-end for spacing
|
|
179
|
+
case 'right':
|
|
180
|
+
return 'left-full top-0 ms-1'; // ms-1 is margin-start for spacing
|
|
181
|
+
default: // 'bottom'
|
|
182
|
+
return 'top-full left-0 mt-1';
|
|
183
|
+
}
|
|
184
|
+
});
|
|
172
185
|
</script>
|
|
173
186
|
|
|
174
187
|
<style lang="scss" scoped></style>
|