@iqual/nuxt-icms 1.5.18 → 1.5.20
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.
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
controls: themedClass('carouselControlsClass'),
|
|
74
74
|
arrows: themedClass('carouselArrowsClass'),
|
|
75
75
|
prev: cn(
|
|
76
|
-
themedClass('carouselButtonPrevClass', 'sm:-start-24'),
|
|
76
|
+
themedClass('carouselButtonPrevClass', '-start-12 sm:-start-12 xl:-start-24'),
|
|
77
77
|
carouselButton({ colorScheme }),
|
|
78
78
|
),
|
|
79
79
|
next: cn(
|
|
80
|
-
themedClass('carouselButtonNextClass', 'sm:-end-24'),
|
|
80
|
+
themedClass('carouselButtonNextClass', '-end-12 sm:-end-12 xl:-end-24'),
|
|
81
81
|
carouselButton({ colorScheme }),
|
|
82
82
|
),
|
|
83
83
|
dots: themedClass('carouselDotsClass'),
|
|
@@ -98,6 +98,7 @@ import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
|
98
98
|
const { menuItems, menuItemActive } = await useMenu('mainMenu')
|
|
99
99
|
|
|
100
100
|
const themedClass = useTheme('SectionHeaderDesktopMainMenu')
|
|
101
|
+
const route = useRoute()
|
|
101
102
|
|
|
102
103
|
const isActive = (item: MappedMenuLink) => menuItemActive.value?.id === item.id
|
|
103
104
|
const hasSubmenu = (item: MappedMenuLink) => (item.children?.length ?? 0) > 0
|
|
@@ -108,6 +109,14 @@ const isOpen = (item: MappedMenuLink) => !!openMap.value[item.id]
|
|
|
108
109
|
const setOpen = (item: MappedMenuLink, value: boolean) =>
|
|
109
110
|
(openMap.value[item.id] = value)
|
|
110
111
|
|
|
112
|
+
// Close all dropdowns on navigation
|
|
113
|
+
watch(
|
|
114
|
+
() => route.path,
|
|
115
|
+
() => {
|
|
116
|
+
openMap.value = {}
|
|
117
|
+
},
|
|
118
|
+
)
|
|
119
|
+
|
|
111
120
|
function elementType(item: MappedMenuLink) {
|
|
112
121
|
if (item.href) return NuxtLink
|
|
113
122
|
if (item.children?.length) return 'button'
|
|
@@ -82,6 +82,7 @@ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
|
|
|
82
82
|
import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
83
83
|
|
|
84
84
|
const themedClass = useTheme('SectionHeaderDesktopMainMenuDropdown')
|
|
85
|
+
const route = useRoute()
|
|
85
86
|
|
|
86
87
|
const props = defineProps<{
|
|
87
88
|
item: MappedMenuLink
|
|
@@ -99,6 +100,14 @@ const isOpen = (child: MappedMenuLink) => !!openMap.value[child.id]
|
|
|
99
100
|
const setOpen = (child: MappedMenuLink, val: boolean) =>
|
|
100
101
|
(openMap.value[child.id] = val)
|
|
101
102
|
|
|
103
|
+
// Close all nested dropdowns on navigation
|
|
104
|
+
watch(
|
|
105
|
+
() => route.path,
|
|
106
|
+
() => {
|
|
107
|
+
openMap.value = {}
|
|
108
|
+
},
|
|
109
|
+
)
|
|
110
|
+
|
|
102
111
|
/**
|
|
103
112
|
* Determines which element type to render for a menu item.
|
|
104
113
|
*
|
package/nuxt.config.ts
CHANGED