@maas/vue-equipment 0.37.1 → 0.38.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/dist/nuxt/module.json +1 -1
- package/dist/plugins/MagicAutoSize/src/components/MagicAutoSize.vue +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +7 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +1 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +4 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +2 -3
- package/package.json +1 -1
package/dist/nuxt/module.json
CHANGED
|
@@ -148,5 +148,5 @@ onMounted(() => {
|
|
|
148
148
|
</script>
|
|
149
149
|
|
|
150
150
|
<style>
|
|
151
|
-
.magic-auto-size{height:var(--magic-auto-size-height);transition:var(--magic-auto-size-transition,all .15s var(--ease-in-out));width:var(--magic-auto-size-width)}
|
|
151
|
+
.magic-auto-size{height:var(--magic-auto-size-height);transition:var(--magic-auto-size-transition,all .15s var(--ease-in-out));transition-delay:var(--magic-auto-size-transition-delay,0s);width:var(--magic-auto-size-width)}
|
|
152
152
|
</style>
|
|
@@ -25,9 +25,10 @@ import { useMenuState } from '../composables/private/useMenuState'
|
|
|
25
25
|
|
|
26
26
|
interface MagicMenuChannelProps {
|
|
27
27
|
id: string
|
|
28
|
+
transition?: string
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
+
const { transition, id } = defineProps<MagicMenuChannelProps>()
|
|
31
32
|
|
|
32
33
|
const instanceId = inject(MagicMenuInstanceId, undefined)
|
|
33
34
|
const viewId = inject(MagicMenuViewId, undefined)
|
|
@@ -41,7 +42,7 @@ if (!viewId) {
|
|
|
41
42
|
throw new Error('MagicMenuChannel must be nested inside MagicMenuView')
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
if (!
|
|
45
|
+
if (!id) {
|
|
45
46
|
throw new Error('MagicMenuChannel requires an id')
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -54,8 +55,10 @@ if (!contentId) {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
const mappedId = computed(() => `magic-menu-channel-${
|
|
58
|
-
const mappedTransition = computed(
|
|
58
|
+
const mappedId = computed(() => `magic-menu-channel-${id}`)
|
|
59
|
+
const mappedTransition = computed(
|
|
60
|
+
() => transition ?? state.options.transition.channel
|
|
61
|
+
)
|
|
59
62
|
|
|
60
63
|
// Register channel
|
|
61
64
|
const { initializeChannel } = useMenuChannel({
|
|
@@ -87,10 +87,11 @@ defineOptions({
|
|
|
87
87
|
|
|
88
88
|
interface MagicMenuContentProps {
|
|
89
89
|
arrow?: boolean | undefined
|
|
90
|
+
transition?: string
|
|
90
91
|
referenceEl?: MaybeRef<HTMLElement | ComponentPublicInstance>
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
const { arrow = undefined, transition } = defineProps<MagicMenuContentProps>()
|
|
94
95
|
|
|
95
96
|
const contentRef = ref<HTMLElement | undefined>(undefined)
|
|
96
97
|
|
|
@@ -115,6 +116,8 @@ const pointerDisabled = computed(() => state.input.disabled.includes('pointer'))
|
|
|
115
116
|
|
|
116
117
|
const mappedTransition = computed(() => {
|
|
117
118
|
switch (true) {
|
|
119
|
+
case !!transition:
|
|
120
|
+
return transition
|
|
118
121
|
case !!view?.parent.item:
|
|
119
122
|
return state.options.transition.content.nested
|
|
120
123
|
case !!state.options.transition.content.default:
|
|
@@ -3,6 +3,7 @@ import '@maas/vue-equipment/utils/css/animations/fade-in.css';
|
|
|
3
3
|
import '@maas/vue-equipment/utils/css/animations/fade-out.css';
|
|
4
4
|
interface MagicMenuContentProps {
|
|
5
5
|
arrow?: boolean | undefined;
|
|
6
|
+
transition?: string;
|
|
6
7
|
referenceEl?: MaybeRef<HTMLElement | ComponentPublicInstance>;
|
|
7
8
|
}
|
|
8
9
|
declare function __VLS_template(): {
|
|
@@ -16,9 +17,7 @@ declare function __VLS_template(): {
|
|
|
16
17
|
attrs: Partial<{}>;
|
|
17
18
|
};
|
|
18
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicMenuContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuContentProps> & Readonly<{}>, {
|
|
20
|
-
arrow: boolean;
|
|
21
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicMenuContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicMenuContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
21
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
22
|
export default _default;
|
|
24
23
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maas/vue-equipment",
|
|
3
3
|
"description": "A magic collection of Vue composables, plugins, components and directives",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.38.0",
|
|
5
5
|
"author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|