@iqual/nuxt-icms 1.4.5 → 1.4.6

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.
Files changed (27) hide show
  1. package/assets/css/components/container.css +1 -1
  2. package/components/DesignSystem/Atoms/Button.vue +1 -1
  3. package/components/DesignSystem/Atoms/Container.vue +32 -8
  4. package/components/DesignSystem/Molecules/Card.vue +1 -1
  5. package/components/DesignSystem/Molecules/Partnership.vue +2 -2
  6. package/components/DesignSystem/Molecules/Table.vue +1 -1
  7. package/components/DesignSystem/Organisms/ContentBlock.vue +1 -1
  8. package/components/DesignSystem/Organisms/TeaserCard.vue +2 -2
  9. package/components/DesignSystem/Organisms/TimelineElement.vue +1 -1
  10. package/components/Drupal/Webform/index.vue +29 -13
  11. package/components/Drupal/Webform/query.graphql +2 -2
  12. package/components/Paragraph/Card/Layout/index.vue +3 -1
  13. package/components/Paragraph/Contact/index.vue +4 -2
  14. package/components/Paragraph/Introduction/index.vue +1 -1
  15. package/components/Section/Header/DesktopMainMenu.vue +22 -12
  16. package/components/Section/Header/DesktopMainMenuDropdown.vue +16 -10
  17. package/components/Section/Header/LanguageDropdown.vue +7 -1
  18. package/components/Section/Header/LanguageLinks.vue +10 -2
  19. package/components/Section/Header/Logo.vue +2 -0
  20. package/components/Section/Header/MenuIcon.vue +1 -1
  21. package/components/Section/Header/MetaMenu.vue +3 -2
  22. package/components/Section/Header/MobileMainMenuItem.vue +21 -8
  23. package/components/Section/Header/index.vue +7 -15
  24. package/composables/useIsHomepage.ts +4 -0
  25. package/composables/useNavigationOffset.ts +1 -1
  26. package/package.json +1 -1
  27. package/tailwind.config.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  @layer components {
2
2
  .container {
3
- @apply max-w-full px-4;
3
+ @apply px-4;
4
4
 
5
5
  @screen md {
6
6
  @apply px-8;
@@ -47,7 +47,7 @@ const props = defineProps<{
47
47
  const button = tv({
48
48
  base: themedClass(
49
49
  'buttonBase',
50
- 'cursor-pointer font-medium py-3 px-10 duration-200 ease-in-out block w-full md:w-fit',
50
+ 'cursor-pointer font-medium py-3 px-10 block w-full md:w-fit motion-safe:transition-colors motion-safe:duration-200 motion-safe:ease-in-out',
51
51
  ),
52
52
  variants: {
53
53
  colorScheme: {
@@ -30,28 +30,52 @@ const props = withDefaults(
30
30
  const containerClassList = computed(() => {
31
31
  const classList = []
32
32
  if (props.colorScheme === 'none') {
33
- classList.push('bg-white text-gray-950')
33
+ classList.push(
34
+ themedClass(
35
+ 'containerClassListColorSchemeNone',
36
+ 'bg-white text-gray-950',
37
+ ),
38
+ )
34
39
  }
35
40
  if (props.colorScheme === 'dark') {
36
- classList.push('bg-gray-950 text-white')
41
+ classList.push(
42
+ themedClass(
43
+ 'containerClassListColorSchemeDark',
44
+ 'bg-gray-950 text-gray-200',
45
+ ),
46
+ )
37
47
  }
38
48
  if (props.colorScheme === 'light') {
39
- classList.push('bg-gray-50 text-gray-950')
49
+ classList.push(
50
+ themedClass(
51
+ 'containerClassListColorSchemeLight',
52
+ 'bg-gray-50 text-gray-950',
53
+ ),
54
+ )
40
55
  }
41
56
  if (props.colorScheme === 'accent') {
42
- classList.push('bg-primary-600 text-white')
57
+ classList.push(
58
+ themedClass(
59
+ 'containerClassListColorSchemeAccent',
60
+ 'bg-primary-600 text-white',
61
+ ),
62
+ )
43
63
  }
44
64
  if (props.spacing.top === 'small') {
45
- classList.push('pt-16')
65
+ classList.push(themedClass('containerClassListSpacingTopSmall', 'pt-16'))
46
66
  }
47
67
  if (props.spacing.top === 'large') {
48
- classList.push('pt-24 md:pt-32')
68
+ classList.push(
69
+ themedClass('containerClassListSpacingTopLarge', 'pt-24 md:pt-32'),
70
+ )
49
71
  }
50
72
  if (props.spacing.bottom === 'small') {
51
- classList.push('pb-16')
73
+ classList.push(themedClass('containerClassListSpacingBottomSmall', 'pb-16'))
52
74
  }
53
75
  if (props.spacing.bottom === 'large') {
54
- classList.push('pb-24 md:pb-32')
76
+ classList.push(
77
+ themedClass('containerClassListSpacingBottomLarge', 'pb-24 md:pb-32'),
78
+ )
55
79
  }
56
80
  return classList.join(' ')
57
81
  })
@@ -17,7 +17,7 @@
17
17
  <Media
18
18
  v-if="image"
19
19
  :media="image"
20
- imageAspectRatios="4/3"
20
+ imageAspectRatios="16/9"
21
21
  imageSizes="xs:100vw sm:100vw md:50vw lg:50vw"
22
22
  :mediaClass="themedClass('mediaClass')"
23
23
  :figcaptionClass="themedClass('figcaptionClass')"
@@ -53,11 +53,11 @@ const partnershipElement = tv({
53
53
  'bg-gray-900',
54
54
  ),
55
55
  light: themedClass(
56
- 'partnershipElementBaseVariantsColorSchemeLight',
56
+ 'partnershipElementVariantsColorSchemeLight',
57
57
  'bg-white',
58
58
  ),
59
59
  accent: themedClass(
60
- 'partnershipElementBaseVariantsColorSchemeAccent',
60
+ 'partnershipElementVariantsColorSchemeAccent',
61
61
  'bg-primary-700',
62
62
  ),
63
63
  },
@@ -9,7 +9,7 @@
9
9
  "
10
10
  >
11
11
  <thead>
12
- <tr>
12
+ <tr :class="themedClass('tableHeaderRowClass')">
13
13
  <th
14
14
  v-for="(header, index) in tableHeaders"
15
15
  :key="index"
@@ -14,7 +14,7 @@
14
14
  <DesignSystemMoleculesMediaSlider
15
15
  v-if="media && media.length"
16
16
  :media="media"
17
- imageAspectRatios="4/3"
17
+ imageAspectRatios="16/9"
18
18
  imageSizes="xs:100vw sm:100vw md:50vw lg:50vw"
19
19
  :colorScheme="colorScheme"
20
20
  :mediaClass="themedClass('mediaClass')"
@@ -5,7 +5,7 @@
5
5
  v-if="image"
6
6
  :media="image"
7
7
  imageSizes="xs:100vw sm:100vw md:420px lg:420px"
8
- imageAspectRatios="4/3"
8
+ imageAspectRatios="16/9"
9
9
  :mediaClass="themedClass('mediaClass', '@xl:w-1/2')"
10
10
  :figcaptionClass="themedClass('figcaptionClass')"
11
11
  :elementClass="themedClass('elementClass', 'w-full')"
@@ -25,7 +25,7 @@
25
25
  :pretitleClass="
26
26
  themedClass(
27
27
  'pretitleClass',
28
- 'mb-2 text-base lg:text-base font-medium',
28
+ 'mb-1 text-base lg:text-base font-medium',
29
29
  )
30
30
  "
31
31
  :title="title"
@@ -44,7 +44,7 @@
44
44
  colorScheme="none"
45
45
  :containerClass="themedClass('mediaContainerClass', 'my-0')"
46
46
  imageSizes="xs:750px"
47
- imageAspectRatios="3/2"
47
+ imageAspectRatios="16/9"
48
48
  :mediaClass="themedClass('mediaClass', 'my-0')"
49
49
  :figcaptionClass="themedClass('figcaptionClass')"
50
50
  :elementClass="themedClass('elementClass')"
@@ -1,15 +1,20 @@
1
1
  <template>
2
2
  <div :class="themedClass('wrapperClass')">
3
3
  <Transition name="fade">
4
- <div v-if="!submitted && !showThankYou && !showError" :class="themedClass('formWrapperClass')">
4
+ <div
5
+ v-if="!submitted && !showThankYou && !showError"
6
+ :class="themedClass('formWrapperClass')"
7
+ >
5
8
  <FormKit
6
9
  type="form"
7
10
  :actions="false"
8
11
  :messages-class="themedClass('messagesClass', 'mt-2')"
9
- :incomplete-message="$texts(
10
- 'webform.submission_validation_incomplete',
11
- 'Please fill in all required fields.',
12
- )"
12
+ :incomplete-message="
13
+ $texts(
14
+ 'webform.submission_validation_incomplete',
15
+ 'Please fill in all required fields.',
16
+ )
17
+ "
13
18
  use-local-storage
14
19
  @submit="submitWebform"
15
20
  >
@@ -18,7 +23,6 @@
18
23
  :key="formElement?.metadata?.key"
19
24
  :class="themedClass('elementWrapperClass')"
20
25
  >
21
-
22
26
  <NuxtTurnstile
23
27
  v-model="token"
24
28
  v-if="formElement?.metadata?.key === 'actions'"
@@ -38,7 +42,12 @@
38
42
  <Transition name="fade">
39
43
  <div
40
44
  v-if="showThankYou"
41
- :class="themedClass('successMessageClass', 'mb-4 rounded-lg border border-success-500 px-6 py-4 text-success-500')"
45
+ :class="
46
+ themedClass(
47
+ 'successMessageClass',
48
+ 'border-success-500 text-success-500 mb-4 rounded-lg border px-6 py-4',
49
+ )
50
+ "
42
51
  >
43
52
  <p>
44
53
  {{
@@ -54,7 +63,12 @@
54
63
  <Transition name="fade">
55
64
  <div
56
65
  v-if="showError"
57
- :class="themedClass('errorMessageClass', 'mb-4 rounded-lg border border-error-500 px-6 py-4 text-error-500')"
66
+ :class="
67
+ themedClass(
68
+ 'errorMessageClass',
69
+ 'border-error-500 text-error-500 mb-4 rounded-lg border px-6 py-4',
70
+ )
71
+ "
58
72
  >
59
73
  <p>
60
74
  {{
@@ -111,12 +125,14 @@ const submitted = ref(false)
111
125
  const showThankYou = ref(false)
112
126
  const showError = ref(false)
113
127
 
114
- const queryKey = `drupalWebform-${props?.formId || '0'}`;
128
+ const queryKey = `drupalWebform-${props?.formId || '0'}`
129
+
115
130
  const { data: formDefinition } = await useAsyncData(queryKey, async () => {
116
- return await useGraphqlQuery('webformById', { id: props?.formId }).then(
117
- (v) => v?.data?.webformById || { elements: [] }
118
- )
119
- })
131
+ return await useGraphqlQuery('webformById', { id: props?.formId }).then(
132
+ (v) => v?.data?.webformById || { elements: [] },
133
+ )
134
+ })
135
+ console.log('Drupal Webform formDefinition:', formDefinition)
120
136
 
121
137
  async function submitWebform(data: FormData) {
122
138
  try {
@@ -1,5 +1,5 @@
1
- query webformById($id: ID!) {
2
- webformById(id: "contact") {
1
+ query webformById($id: String!) {
2
+ webformById(id: $id) {
3
3
  label
4
4
  id
5
5
  elements {
@@ -9,6 +9,7 @@
9
9
  :class="themedClass('rowClass')"
10
10
  >
11
11
  <div
12
+ v-if="pretitle || title"
12
13
  :class="themedClass('firstColumnClass', 'col-span-12 md:col-span-9')"
13
14
  >
14
15
  <DesignSystemOrganismsContentBlock
@@ -22,6 +23,7 @@
22
23
  />
23
24
  </div>
24
25
  <div
26
+ v-if="subtitle || text"
25
27
  :class="themedClass('secondColumnClass', 'col-span-12 md:col-span-9')"
26
28
  >
27
29
  <DesignSystemOrganismsContentBlock
@@ -39,7 +41,7 @@
39
41
  :list="cards"
40
42
  :class="[
41
43
  themedClass(
42
- 'cardsContainerClass',
44
+ 'buttonsContainerClass',
43
45
  'grid-3-col container mx-auto grid gap-x-6 gap-y-12',
44
46
  ),
45
47
  { droptarget: isEditing },
@@ -58,7 +58,7 @@
58
58
  >
59
59
  <DrupalWebform
60
60
  v-if="contactWebform?.id"
61
- :form-id="contactWebform?.id"
61
+ :formId="contactWebform?.id"
62
62
  :wrapperClass="themedClass('wrapperClass')"
63
63
  :formWrapperClass="themedClass('formWrapperClass')"
64
64
  :messagesClass="themedClass('messagesClass')"
@@ -74,7 +74,9 @@
74
74
  import type { ParagraphIcmsLayoutContactFragment } from '#graphql-operations'
75
75
  import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
76
76
 
77
- defineProps<ParagraphIcmsLayoutContactFragment>()
77
+ const props = defineProps<ParagraphIcmsLayoutContactFragment>()
78
+
79
+ console.log('Contact', props)
78
80
 
79
81
  const { options, isEditing } = useAttrs().blokkliData
80
82
 
@@ -18,7 +18,7 @@
18
18
  <Media
19
19
  v-if="image"
20
20
  :media="image"
21
- imageAspectRatios="1/1"
21
+ imageAspectRatios="16/9"
22
22
  imageSizes="xs:100vw sm:100vw md:320px lg:380px"
23
23
  :mediaClass="themedClass('mediaClass')"
24
24
  :elementClass="themedClass('elementClass')"
@@ -1,9 +1,15 @@
1
1
  <template>
2
2
  <nav
3
3
  :aria-label="$texts('main_menu.nav_aria_label', 'Main navigation')"
4
- :class="themedClass('containerClass', 'flex h-full')"
4
+ :class="
5
+ themedClass(
6
+ 'containerClass',
7
+ 'ml-auto hidden empty:hidden 2xl:flex 2xl:h-full 2xl:items-center',
8
+ )
9
+ "
5
10
  >
6
11
  <ul
12
+ v-if="menuItems.length"
7
13
  :class="themedClass('listClass', 'flex items-stretch justify-end gap-8')"
8
14
  >
9
15
  <li
@@ -28,7 +34,7 @@
28
34
  'submenuToggleClass',
29
35
  'size-5 shrink-0 cursor-pointer text-black motion-safe:transition-transform motion-safe:duration-300',
30
36
  ),
31
- { 'rotate-180': isOpen(item) },
37
+ { 'motion-safe:rotate-180': isOpen(item) },
32
38
  ]"
33
39
  />
34
40
  </component>
@@ -37,30 +43,34 @@
37
43
  :enter-active-class="
38
44
  themedClass(
39
45
  'transitionEnterActiveClass',
40
- 'transition-opacity duration-200 ease-in-out',
46
+ 'motion-safe:transition-opacity motion-safe:duration-200 motion-safe:ease-in-out',
41
47
  )
42
48
  "
43
49
  :enter-from-class="
44
- themedClass('transitionEnterFromClass', 'opacity-0')
50
+ themedClass('transitionEnterFromClass', 'motion-safe:opacity-0')
51
+ "
52
+ :enter-to-class="
53
+ themedClass('transitionEnterToClass', 'motion-safe:opacity-100')
45
54
  "
46
- :enter-to-class="themedClass('transitionEnterToClass', 'opacity-100')"
47
55
  :leave-active-class="
48
56
  themedClass(
49
57
  'transitionLeaveActiveClass',
50
- 'transition-opacity duration-200 ease-in-out',
58
+ 'motion-safe:transition-opacity motion-safe:duration-200 motion-safe:ease-in-out',
51
59
  )
52
60
  "
53
61
  :leave-from-class="
54
- themedClass('transitionLeaveFromClass', 'opacity-100')
62
+ themedClass('transitionLeaveFromClass', 'motion-safe:opacity-100')
63
+ "
64
+ :leave-to-class="
65
+ themedClass('transitionLeaveToClass', 'motion-safe:opacity-0')
55
66
  "
56
- :leave-to-class="themedClass('transitionLeaveToClass', 'opacity-0')"
57
67
  >
58
68
  <ul
59
69
  v-if="hasSubmenu(item) && isOpen(item)"
60
70
  :id="submenuId(item)"
61
71
  :class="
62
72
  themedClass(
63
- 'submenulistClass',
73
+ 'submenuListClass',
64
74
  'absolute left-0 top-full w-fit min-w-48 border border-gray-100 bg-white',
65
75
  )
66
76
  "
@@ -79,7 +89,7 @@
79
89
  <script lang="ts" setup>
80
90
  import type { MappedMenuLink } from '@iqual/nuxt-icms/plugins/initData'
81
91
  import { NuxtLink } from '#components'
82
- import DesktopMainMenuDropdown from './DesktopMainMenuDropdown.vue'
92
+ import DesktopMainMenuDropdown from '@iqual/nuxt-icms/components/Section/Header/DesktopMainMenuDropdown.vue'
83
93
  import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
84
94
  import cn from '@iqual/nuxt-icms/composables/useCn'
85
95
 
@@ -122,11 +132,11 @@ function componentAttrs(item: MappedMenuLink) {
122
132
  class: cn(
123
133
  themedClass(
124
134
  'linkClass',
125
- 'flex items-center justify-between gap-1 hover:text-primary duration-200 whitespace-normal break-keep hyphens-none',
135
+ 'flex items-center justify-between gap-1 hover:text-primary motion-safe:transition-colors motion-safe:duration-200 whitespace-normal break-keep hyphens-none',
126
136
  ),
127
137
  item.additionalClass,
128
138
  ),
129
- 'exact-active-class': 'text-primary',
139
+ 'exact-active-class': themedClass('linkActiveClass', 'text-primary'),
130
140
  }
131
141
 
132
142
  case 'button':
@@ -34,19 +34,27 @@
34
34
  :enter-active-class="
35
35
  themedClass(
36
36
  'transitionEnterActiveClass',
37
- 'transition-opacity duration-200 ease-in-out',
37
+ 'motion-safe:transition-opacity motion-safe:duration-200 motion-safe:ease-in-out',
38
38
  )
39
39
  "
40
- :enter-from-class="themedClass('transitionEnterFromClass', 'opacity-0')"
41
- :enter-to-class="themedClass('transitionEnterToClass', 'opacity-100')"
40
+ :enter-from-class="
41
+ themedClass('transitionEnterFromClass', 'motion-safe:opacity-0')
42
+ "
43
+ :enter-to-class="
44
+ themedClass('transitionEnterToClass', 'motion-safe:opacity-100')
45
+ "
42
46
  :leave-active-class="
43
47
  themedClass(
44
48
  'transitionLeaveActiveClass',
45
- 'transition-opacity duration-200 ease-in-out',
49
+ 'motion-safe:transition-opacity motion-safe:duration-200 motion-safe:ease-in-out',
46
50
  )
47
51
  "
48
- :leave-from-class="themedClass('transitionLeaveFromClass', 'opacity-100')"
49
- :leave-to-class="themedClass('transitionLeaveToClass', 'opacity-0')"
52
+ :leave-from-class="
53
+ themedClass('transitionLeaveFromClass', 'motion-safe:opacity-100')
54
+ "
55
+ :leave-to-class="
56
+ themedClass('transitionLeaveToClass', 'motion-safe:opacity-0')
57
+ "
50
58
  >
51
59
  <ul
52
60
  v-if="hasSubmenu(child) && isOpen(child)"
@@ -83,9 +91,7 @@ const props = defineProps<{
83
91
  const { item, menuItemActive } = props
84
92
 
85
93
  const hasSubmenu = (child: MappedMenuLink) => (child.children?.length ?? 0) > 0
86
-
87
94
  const submenuId = (child: MappedMenuLink) => `${child.id}-submenu`
88
-
89
95
  const isActive = (child: MappedMenuLink) => menuItemActive?.id === child.id
90
96
 
91
97
  const openMap = ref<Record<string, boolean>>({})
@@ -132,11 +138,11 @@ function componentAttrs(child: MappedMenuLink) {
132
138
  'aria-controls': submenu ? submenuId(child) : undefined,
133
139
  'aria-current': active ? 'page' : undefined,
134
140
  tabindex: 0,
135
- 'exact-active-class': 'text-primary',
141
+ 'exact-active-class': themedClass('linkActiveClass', 'text-primary'),
136
142
  class: cn(
137
143
  themedClass(
138
144
  'linkClass',
139
- 'w-full flex items-center justify-between gap-4 px-6 py-3 hover:text-primary duration-200 whitespace-normal break-keep hyphens-none',
145
+ 'w-full flex items-center justify-between gap-4 px-6 py-3 hover:text-primary motion-safe:transition-colors motion-safe:duration-200 whitespace-normal break-keep hyphens-none',
140
146
  ),
141
147
  child.additionalClass,
142
148
  ),
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <ClientOnly>
3
3
  <div
4
+ v-if="showLanguageLinks"
4
5
  v-click-away="closeDropdown"
5
6
  @keydown.esc="closeDropdown"
6
7
  :class="themedClass('containerClass', 'relative py-2')"
@@ -105,9 +106,14 @@
105
106
  <script lang="ts" setup>
106
107
  import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
107
108
 
109
+ const themedClass = useTheme('SectionHeaderLanguageDropdown')
108
110
  const links = useLanguageLinks()
109
111
  const currentLanguage = useCurrentLanguage()
110
- const themedClass = useTheme('SectionHeaderLanguageDropdown')
112
+
113
+ const showLanguageLinks = computed(() => {
114
+ const list = links.value ?? []
115
+ return list.filter((l) => l.enabled).length > 1
116
+ })
111
117
 
112
118
  const isLangDropdownOpen = ref(false)
113
119
 
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <ClientOnly>
3
- <div :class="themedClass('containerClass', 'flex items-center')">
3
+ <div
4
+ v-if="showLanguageLinks"
5
+ :class="themedClass('containerClass', 'flex items-center')"
6
+ >
4
7
  <ul :class="themedClass('listClass', 'flex gap-4 uppercase')">
5
8
  <li
6
9
  v-for="(lang, i) in links"
@@ -34,6 +37,11 @@
34
37
  import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
35
38
  const { close } = useMobileMenuOverlayBus()
36
39
 
37
- const links = useLanguageLinks()
38
40
  const themedClass = useTheme('SectionHeaderLanguageLinks')
41
+
42
+ const links = useLanguageLinks()
43
+ const showLanguageLinks = computed(() => {
44
+ const list = links.value ?? []
45
+ return list.filter((l) => l.enabled).length > 1
46
+ })
39
47
  </script>
@@ -10,6 +10,8 @@
10
10
  v-if="companyLogo"
11
11
  :media="companyLogo"
12
12
  :mediaClass="themedClass('mediaClass', 'h-10 2xl:h-16')"
13
+ :figcaptionClass="themedClass('figcaptionClass')"
14
+ :elementClass="themedClass('elementClass')"
13
15
  />
14
16
  </NuxtLink>
15
17
  </template>
@@ -10,7 +10,7 @@
10
10
  viewBox="0 0 24 24"
11
11
  fill="none"
12
12
  xmlns="http://www.w3.org/2000/svg"
13
- class="size-6 overflow-visible text-black"
13
+ :class="themedClass('hamburgerSvg', 'size-6 overflow-visible text-black')"
14
14
  aria-hidden
15
15
  >
16
16
  <rect
@@ -3,9 +3,10 @@
3
3
  :aria-label="
4
4
  $texts('meta_navigation.nav_aria_label', 'Meta navigation menu')
5
5
  "
6
- :class="themedClass('containerClass')"
6
+ :class="themedClass('containerClass', 'empty:hidden')"
7
7
  >
8
8
  <ul
9
+ v-if="menuItems.length"
9
10
  :class="
10
11
  themedClass(
11
12
  'listClass',
@@ -33,7 +34,7 @@
33
34
  :target="menuItem?.target"
34
35
  :rel="menuItem?.rel"
35
36
  @click="close()"
36
- exact-active-class="text-primary"
37
+ :exact-active-class="themedClass('linkActiveClass', 'text-primary')"
37
38
  :class="
38
39
  cn(
39
40
  themedClass(
@@ -31,35 +31,48 @@
31
31
  'submenuToggleClass',
32
32
  'size-5 cursor-pointer motion-safe:transition-transform motion-safe:duration-300',
33
33
  ),
34
- { 'rotate-180': isOpen },
34
+ { 'motion-safe:rotate-180': isOpen },
35
35
  ]"
36
36
  />
37
37
  </div>
38
+
38
39
  <Transition
39
40
  v-if="hasSubmenu"
40
41
  :enter-active-class="
41
42
  themedClass(
42
43
  'transitionEnterActiveClass',
43
- 'transition-[max-height,opacity] duration-300 ease-in-out overflow-hidden',
44
+ 'motion-safe:transition-[max-height,opacity] motion-safe:duration-300 motion-safe:ease-in-out overflow-hidden',
44
45
  )
45
46
  "
46
47
  :enter-from-class="
47
- themedClass('transitionEnterFromClass', 'max-h-0 opacity-0')
48
+ themedClass(
49
+ 'transitionEnterFromClass',
50
+ 'motion-safe:max-h-0 motion-safe:opacity-0',
51
+ )
48
52
  "
49
53
  :enter-to-class="
50
- themedClass('transitionEnterToClass', 'max-h-96 opacity-100')
54
+ themedClass(
55
+ 'transitionEnterToClass',
56
+ 'motion-safe:max-h-96 motion-safe:opacity-100',
57
+ )
51
58
  "
52
59
  :leave-active-class="
53
60
  themedClass(
54
61
  'transitionLeaveActiveClass',
55
- 'transition-[max-height,opacity] duration-300 ease-in-out overflow-hidden',
62
+ 'motion-safe:transition-[max-height,opacity] motion-safe:duration-300 motion-safe:ease-in-out overflow-hidden',
56
63
  )
57
64
  "
58
65
  :leave-from-class="
59
- themedClass('transitionLeaveFromClass', 'max-h-96 opacity-100')
66
+ themedClass(
67
+ 'transitionLeaveFromClass',
68
+ 'motion-safe:max-h-96 motion-safe:opacity-100',
69
+ )
60
70
  "
61
71
  :leave-to-class="
62
- themedClass('transitionLeaveToClass', 'max-h-0 opacity-0')
72
+ themedClass(
73
+ 'transitionLeaveToClass',
74
+ 'motion-safe:max-h-0 motion-safe:opacity-0',
75
+ )
63
76
  "
64
77
  >
65
78
  <ul
@@ -163,7 +176,7 @@ const componentAttrs = computed(() => {
163
176
  'aria-current': menuItemActive?.id === item.id ? 'page' : undefined,
164
177
  tabindex: 0,
165
178
  class: cn(themedClass('linkClass'), item.additionalClass),
166
- 'exact-active-class': 'text-primary',
179
+ 'exact-active-class': themedClass('linkActiveClass', 'text-primary'),
167
180
  }
168
181
 
169
182
  case 'button':
@@ -25,21 +25,17 @@
25
25
  :class="
26
26
  themedClass(
27
27
  'metaRowClass',
28
- 'flex items-center justify-end gap-8 py-2',
28
+ 'flex items-center justify-end gap-8 py-2 empty:hidden',
29
29
  )
30
30
  "
31
31
  >
32
- <div :class="themedClass('metaMenuContainer')">
33
- <SectionHeaderMetaMenu />
34
- </div>
35
- <div :class="themedClass('metaButtonsContainer')">
36
- <SectionHeaderButtons :buttons="metaLinks" />
37
- </div>
32
+ <SectionHeaderMetaMenu />
33
+ <SectionHeaderButtons :buttons="metaLinks" />
38
34
  <div
39
35
  :class="
40
36
  themedClass(
41
37
  'languageDropdownContainer',
42
- 'flex h-full items-center',
38
+ 'flex h-full items-center empty:hidden',
43
39
  )
44
40
  "
45
41
  >
@@ -64,17 +60,13 @@
64
60
  <div :class="themedClass('logoContainer', 'shrink-0')">
65
61
  <SectionHeaderLogo />
66
62
  </div>
63
+
64
+ <SectionHeaderDesktopMainMenu />
67
65
  <div
68
66
  :class="
69
- themedClass(
70
- 'mainMenuContainer',
71
- 'ml-auto hidden 2xl:flex 2xl:h-full 2xl:items-center',
72
- )
67
+ themedClass('mainButtonsContainer', 'hidden empty:hidden 2xl:block')
73
68
  "
74
69
  >
75
- <SectionHeaderDesktopMainMenu />
76
- </div>
77
- <div :class="themedClass('mainButtonsContainer', 'hidden 2xl:block')">
78
70
  <SectionHeaderButtons :buttons="contactButtons" />
79
71
  </div>
80
72
  <div
@@ -0,0 +1,4 @@
1
+ export function useIsHomepage() {
2
+ const route = useRoute()
3
+ return computed(() => route.name === 'home')
4
+ }
@@ -1,4 +1,4 @@
1
- import { useIsMobile } from './useIsMobile'
1
+ import { useIsMobile } from '@iqual/nuxt-icms/composables/useIsMobile'
2
2
 
3
3
  const mobileNavHeight: number = 60 // actual height + 4
4
4
  const desktopNavHeight: number = 85 // actual height + 4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqual/nuxt-icms",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "ICMS Base",
5
5
  "type": "module",
6
6
  "private": false,
@@ -223,8 +223,8 @@ const config: Config = {
223
223
  },
224
224
  ],
225
225
  corePlugins: {
226
+ container: true,
226
227
  textOpacity: false,
227
- container: false,
228
228
  },
229
229
  }
230
230