@iqual/nuxt-icms 1.3.0 → 1.4.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.
Files changed (122) hide show
  1. package/assets/symbols/chevron-right.svg +1 -1
  2. package/components/Blokkli/HeroImage/index.vue +1 -1
  3. package/components/Blokkli/Teasers/icon.svg +3 -3
  4. package/components/DesignSystem/Atoms/Button.vue +86 -36
  5. package/components/DesignSystem/Atoms/Caption.vue +10 -10
  6. package/components/DesignSystem/Atoms/Container.vue +10 -6
  7. package/components/DesignSystem/Atoms/GridRow.vue +4 -3
  8. package/components/DesignSystem/Atoms/LinkListItem.vue +31 -8
  9. package/components/DesignSystem/Molecules/ButtonGroup.vue +18 -3
  10. package/components/DesignSystem/Molecules/Card.vue +86 -31
  11. package/components/DesignSystem/Molecules/IconText.vue +37 -16
  12. package/components/DesignSystem/Molecules/MediaLightbox.vue +213 -58
  13. package/components/DesignSystem/Molecules/MediaSlider.vue +88 -25
  14. package/components/DesignSystem/Molecules/Partnership.vue +40 -9
  15. package/components/DesignSystem/Molecules/Table.vue +90 -25
  16. package/components/DesignSystem/Molecules/TitleComposition.vue +15 -12
  17. package/components/DesignSystem/Organisms/ContentBlock.vue +61 -15
  18. package/components/DesignSystem/Organisms/FacetedListing.vue +170 -0
  19. package/components/DesignSystem/Organisms/FlipTeaser.vue +119 -47
  20. package/components/DesignSystem/Organisms/HeaderHero.vue +167 -0
  21. package/components/DesignSystem/Organisms/HeaderTextImage.vue +71 -0
  22. package/components/DesignSystem/Organisms/LogoElement.vue +33 -10
  23. package/components/DesignSystem/Organisms/Map.vue +11 -6
  24. package/components/DesignSystem/Organisms/SearchResults.vue +41 -0
  25. package/components/DesignSystem/Organisms/TeamElement.vue +84 -20
  26. package/components/DesignSystem/Organisms/TeaserCard.vue +87 -34
  27. package/components/DesignSystem/Organisms/Testimonial.vue +82 -12
  28. package/components/DesignSystem/Organisms/TimelineElement.vue +42 -12
  29. package/components/DesignSystem/Organisms/TwoColumnTextElement.vue +44 -9
  30. package/components/DesignSystem/Pages/Search.vue +39 -0
  31. package/components/Drupal/Breadcrumb/index.vue +16 -5
  32. package/components/Drupal/Messages/index.vue +16 -5
  33. package/components/Drupal/Webform/fragment.graphql +8 -5
  34. package/components/Drupal/Webform/index.vue +20 -9
  35. package/components/Drupal/Webform/query.graphql +18 -16
  36. package/components/Form/CheckboxInput.vue +6 -6
  37. package/components/Form/CheckboxInputs.vue +5 -5
  38. package/components/Form/FileUploadInput.vue +6 -6
  39. package/components/Form/RadioButtonsInput.vue +5 -5
  40. package/components/Form/SelectInput.vue +7 -7
  41. package/components/Form/SubmitButton.vue +1 -1
  42. package/components/Form/TextAreaInput.vue +2 -2
  43. package/components/Form/TextEmailInput.vue +2 -2
  44. package/components/Form/TextInput.vue +2 -2
  45. package/components/Form/TextPhoneInput.vue +2 -2
  46. package/components/Form/composables/useFormElement.ts +5 -5
  47. package/components/Form/utils/types.ts +8 -7
  48. package/components/Media/Icon/index.vue +10 -6
  49. package/components/Media/Image/index.vue +26 -20
  50. package/components/Media/RemoteVideo/index.vue +34 -21
  51. package/components/Media/Video/index.vue +6 -5
  52. package/components/Node/Icms/Page/Teaser/index.vue +6 -4
  53. package/components/Node/Icms/Page/index.vue +2 -2
  54. package/components/Paragraph/Button/Element/index.vue +9 -2
  55. package/components/Paragraph/CallToAction/index.vue +43 -10
  56. package/components/Paragraph/Card/Element/index.vue +2 -1
  57. package/components/Paragraph/Card/Layout/index.vue +29 -10
  58. package/components/Paragraph/Contact/index.vue +41 -12
  59. package/components/Paragraph/Downloads/index.vue +82 -33
  60. package/components/Paragraph/FAQ/Element/index.vue +41 -12
  61. package/components/Paragraph/FAQ/Layout/index.vue +47 -13
  62. package/components/Paragraph/FlipTeasers/index.vue +26 -6
  63. package/components/Paragraph/Gallery/index.vue +42 -10
  64. package/components/Paragraph/HeroImage/index.vue +62 -16
  65. package/components/Paragraph/IconText/Element/index.vue +7 -1
  66. package/components/Paragraph/IconText/Layout/index.vue +39 -12
  67. package/components/Paragraph/Introduction/index.vue +50 -15
  68. package/components/Paragraph/Logo/Element/fragment.graphql +1 -0
  69. package/components/Paragraph/Logo/Element/index.vue +7 -2
  70. package/components/Paragraph/Media/index.vue +32 -31
  71. package/components/Paragraph/Partnerships/Element/fragment.graphql +1 -0
  72. package/components/Paragraph/Partnerships/Element/index.vue +7 -0
  73. package/components/Paragraph/Partnerships/Layout/index.vue +100 -27
  74. package/components/Paragraph/SingleTestimonial/index.vue +58 -15
  75. package/components/Paragraph/Table/index.vue +32 -9
  76. package/components/Paragraph/Tabs/Element/index.vue +44 -10
  77. package/components/Paragraph/Tabs/Layout/index.vue +123 -37
  78. package/components/Paragraph/Team/Element/index.vue +18 -1
  79. package/components/Paragraph/Team/Layout/index.vue +30 -7
  80. package/components/Paragraph/Teasers/index.vue +33 -7
  81. package/components/Paragraph/Testimonial/Element/index.vue +30 -5
  82. package/components/Paragraph/Testimonial/Layout/index.vue +78 -24
  83. package/components/Paragraph/Text/index.vue +32 -10
  84. package/components/Paragraph/TextMedia/index.vue +44 -13
  85. package/components/Paragraph/Timeline/Element/index.vue +23 -7
  86. package/components/Paragraph/Timeline/Layout/index.vue +232 -67
  87. package/components/Paragraph/TwoColumnText/Element/index.vue +20 -3
  88. package/components/Paragraph/TwoColumnText/Layout/index.vue +8 -1
  89. package/components/Paragraph/iFrame/index.vue +31 -11
  90. package/components/Search/Facets/FacetDropdownUI.vue +351 -77
  91. package/components/Search/Facets/FacetedSearchUI.vue +257 -101
  92. package/components/Search/Facets/fragment.graphql +5 -1
  93. package/components/Search/Input/index.vue +125 -0
  94. package/components/Section/Footer/index.vue +170 -30
  95. package/components/Section/Header/Buttons.vue +34 -0
  96. package/components/Section/Header/DesktopMainMenu.vue +160 -0
  97. package/components/Section/Header/DesktopMainMenuDropdown.vue +170 -0
  98. package/components/Section/Header/LanguageDropdown.vue +95 -64
  99. package/components/Section/Header/LanguageLinks.vue +39 -0
  100. package/components/Section/Header/Logo.vue +23 -0
  101. package/components/Section/Header/MainButtons.vue +31 -0
  102. package/components/Section/Header/MenuIcon.vue +60 -49
  103. package/components/Section/Header/MetaButtons.vue +31 -0
  104. package/components/Section/Header/MetaMenu.vue +55 -53
  105. package/components/Section/Header/MobileMainMenu.vue +23 -0
  106. package/components/Section/Header/MobileMainMenuItem.vue +191 -0
  107. package/components/Section/Header/index.vue +182 -186
  108. package/composables/useMenu.ts +2 -2
  109. package/composables/useMobileMenuOverlayBus.ts +44 -0
  110. package/composables/useNavigationOffset.ts +2 -2
  111. package/composables/useTheme.ts +107 -0
  112. package/formkit.theme.ts +541 -586
  113. package/layouts/default.vue +7 -35
  114. package/layouts/error.vue +7 -32
  115. package/nuxt.config.ts +13 -0
  116. package/package.json +1 -1
  117. package/plugins/initData.ts +8 -5
  118. package/queries/query.initData.graphql +4 -2
  119. package/tailwind.config.ts +11 -11
  120. package/types/global.ts +1 -0
  121. package/components/Section/Header/GlobalMenu.vue +0 -335
  122. package/components/Section/Header/LanguageSwitcher.vue +0 -37
@@ -1,34 +1,65 @@
1
1
  <template>
2
2
  <div :class="partnershipElement({ colorScheme })">
3
- <NuxtLink :to="link" :title="title">
3
+ <NuxtLink
4
+ :to="link"
5
+ :title="title"
6
+ :target="targetBlank ? '_blank' : '_self'"
7
+ :class="themedClass('linkClass')"
8
+ >
4
9
  <Media
5
10
  v-if="logo"
6
11
  :media="logo"
7
12
  imageSizes="xs:100vw sm:100vw md:50vw lg:580px"
8
- mediaClass="h-full"
13
+ :mediaClass="themedClass('mediaClass', 'h-full')"
14
+ :figcaptionClass="themedClass('figcaptionClass')"
15
+ :elementClass="themedClass('elementClass')"
9
16
  />
10
17
  </NuxtLink>
11
18
  </div>
12
19
  </template>
13
20
 
14
21
  <script lang="ts" setup>
15
- import { tv } from 'tailwind-variants'
22
+ import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
16
23
  import type { MediaFragment } from '#graphql-operations'
24
+ import { tv } from 'tailwind-variants'
25
+ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
26
+
27
+ const themedClass = useTheme()
17
28
 
18
29
  defineProps<{
19
30
  logo?: MediaFragment
20
31
  link?: string
21
32
  title?: string
33
+ targetBlank?: boolean
34
+ linkClass?: string
35
+ mediaClass?: string
36
+ figcaptionClass?: string
37
+ elementClass?: string
22
38
  }>()
23
39
 
24
40
  const partnershipElement = tv({
25
- base: 'flex md:min-h-32 w-1/2 xl:w-auto xl:flex-1 justify-center p-4',
41
+ base: themedClass(
42
+ 'partnershipElementBase',
43
+ 'flex md:min-h-32 w-1/2 xl:w-auto xl:flex-1 justify-center p-4',
44
+ ),
26
45
  variants: {
27
46
  colorScheme: {
28
- none: 'bg-white',
29
- dark: 'bg-gray-900',
30
- light: 'bg-white',
31
- accent: 'bg-primary-700',
47
+ none: themedClass(
48
+ 'partnershipElementVariantsColorSchemeNone',
49
+ 'bg-gray-50',
50
+ ),
51
+ dark: themedClass(
52
+ 'partnershipElementVariantsColorSchemeDark',
53
+ 'bg-gray-900',
54
+ ),
55
+ light: themedClass(
56
+ 'partnershipElementBaseVariantsColorSchemeLight',
57
+ 'bg-white',
58
+ ),
59
+ accent: themedClass(
60
+ 'partnershipElementBaseVariantsColorSchemeAccent',
61
+ 'bg-primary-700',
62
+ ),
32
63
  },
33
64
  },
34
65
  defaultVariants: {
@@ -36,5 +67,5 @@ const partnershipElement = tv({
36
67
  },
37
68
  })
38
69
 
39
- const colorScheme = inject<string>('colorScheme')
70
+ const colorScheme = inject<ColorScheme>('colorScheme')
40
71
  </script>
@@ -1,7 +1,12 @@
1
1
  <template>
2
- <div class="overflow-x-auto rounded-lg shadow-custom-offset">
2
+ <div :class="themedClass('containerClass', 'overflow-x-auto')">
3
3
  <table
4
- class="w-full min-w-[600px] table-auto border-collapse text-left text-sm"
4
+ :class="
5
+ themedClass(
6
+ 'tableClass',
7
+ 'w-full min-w-[600px] table-auto border-collapse text-left text-sm',
8
+ )
9
+ "
5
10
  >
6
11
  <thead>
7
12
  <tr>
@@ -30,7 +35,7 @@
30
35
  </tbody>
31
36
  <caption
32
37
  v-if="tableData?.value.caption"
33
- class="absolute -bottom-8 left-1/2 -translate-x-1/2 text-center text-xs italic"
38
+ :class="caption({ colorScheme })"
34
39
  >
35
40
  {{
36
41
  tableData?.value.caption
@@ -41,16 +46,27 @@
41
46
  </template>
42
47
 
43
48
  <script lang="ts" setup>
49
+ import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
44
50
  import { tv } from 'tailwind-variants'
51
+ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
52
+
53
+ const themedClass = useTheme()
54
+
55
+ const props = defineProps<{
56
+ tableData?: Record<string, any>
57
+ colorScheme?: ColorScheme
58
+ containerClass?: string
59
+ tableClass?: string
60
+ }>()
45
61
 
46
62
  const tr = tv({
47
- base: 'border-b last:border-0',
63
+ base: themedClass('tableTrBase', 'border-b last:border-0'),
48
64
  variants: {
49
65
  colorScheme: {
50
- none: 'border-gray-100',
51
- dark: 'border-gray-700',
52
- light: 'border-gray-200',
53
- accent: 'border-primary-500',
66
+ none: themedClass('tableTrVariantsColorSchemeNone', 'border-gray-100'),
67
+ dark: themedClass('tableTrVariantsColorSchemeDark', 'border-gray-700'),
68
+ light: themedClass('tableTrVariantsColorSchemeLight', 'border-gray-200'),
69
+ accent: themedClass('tableTrVariantsColorSchemeAccent', 'border-primary'),
54
70
  },
55
71
  },
56
72
  defaultVariants: {
@@ -59,13 +75,28 @@ const tr = tv({
59
75
  })
60
76
 
61
77
  const th = tv({
62
- base: 'first:z-1 px-4 py-8 text-center text-sm first:sticky first:left-0 first:min-w-48 even:rounded-t-lg',
78
+ base: themedClass(
79
+ 'tableThBase',
80
+ 'first:z-1 px-4 py-8 text-center text-sm first:sticky first:left-0 first:min-w-32',
81
+ ),
63
82
  variants: {
64
83
  colorScheme: {
65
- none: 'odd:bg-white even:bg-gray-50',
66
- dark: 'odd:bg-black even:bg-gray-900',
67
- light: 'odd:bg-gray-50 even:bg-gray-100',
68
- accent: 'odd:bg-primary-600 even:bg-primary-700',
84
+ none: themedClass(
85
+ 'tableThVariantsColorSchemeNone',
86
+ 'odd:bg-white even:bg-gray-50',
87
+ ),
88
+ dark: themedClass(
89
+ 'tableThVariantsColorSchemeDark',
90
+ 'odd:bg-gray-950 even:bg-gray-900',
91
+ ),
92
+ light: themedClass(
93
+ 'tableThVariantsColorSchemeLight',
94
+ 'odd:bg-gray-50 even:bg-gray-100',
95
+ ),
96
+ accent: themedClass(
97
+ 'tableThVariantsColorSchemeAccent',
98
+ 'odd:bg-primary-600 even:bg-primary-700',
99
+ ),
69
100
  },
70
101
  },
71
102
  defaultVariants: {
@@ -74,13 +105,52 @@ const th = tv({
74
105
  })
75
106
 
76
107
  const td = tv({
77
- base: 'first:z-1 h-14 px-4 py-3 text-center leading-6 first:sticky first:left-0 first:min-w-48 first:max-w-40 first:text-left first:text-sm first:font-bold',
108
+ base: themedClass(
109
+ 'tableTdBase',
110
+ 'first:z-1 h-14 px-4 py-3 text-center leading-6 first:sticky first:left-0 first:min-w-32 first:max-w-40 first:text-left first:text-sm first:font-bold',
111
+ ),
112
+ variants: {
113
+ colorScheme: {
114
+ none: themedClass(
115
+ 'tableTdVariantsColorSchemeNone',
116
+ 'odd:bg-white even:bg-gray-50',
117
+ ),
118
+ dark: themedClass(
119
+ 'tableTdVariantsColorSchemeDark',
120
+ 'odd:bg-gray-950 even:bg-gray-900',
121
+ ),
122
+ light: themedClass(
123
+ 'tableTdVariantsColorSchemeLight',
124
+ 'odd:bg-gray-50 even:bg-gray-100',
125
+ ),
126
+ accent: themedClass(
127
+ 'tableTdVariantsColorSchemeAccent',
128
+ 'odd:bg-primary-600 even:bg-primary-700',
129
+ ),
130
+ },
131
+ },
132
+ defaultVariants: {
133
+ colorScheme: 'none',
134
+ },
135
+ })
136
+
137
+ const caption = tv({
138
+ base: themedClass(
139
+ 'tableCaptionBase',
140
+ 'absolute -bottom-8 left-1/2 -translate-x-1/2 text-center text-xs italic',
141
+ ),
78
142
  variants: {
79
143
  colorScheme: {
80
- none: 'odd:bg-white even:bg-gray-50',
81
- dark: 'odd:bg-black even:bg-gray-900',
82
- light: 'odd:bg-gray-50 even:bg-gray-100',
83
- accent: 'odd:bg-primary-600 even:bg-primary-700',
144
+ none: themedClass('tableCaptionVariantsColorSchemeNone', 'text-gray-400'),
145
+ dark: themedClass('tableCaptionVariantsColorSchemeDark', 'text-white'),
146
+ light: themedClass(
147
+ 'tableCaptionVariantsColorSchemeLight',
148
+ 'text-gray-500',
149
+ ),
150
+ accent: themedClass(
151
+ 'tableCaptionVariantsColorSchemeAccent',
152
+ 'text-white',
153
+ ),
84
154
  },
85
155
  },
86
156
  defaultVariants: {
@@ -89,14 +159,9 @@ const td = tv({
89
159
  })
90
160
 
91
161
  const xIcon =
92
- '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: 0 auto">><path d="M18 6L6 18M6 6L18 18" stroke="#D9D9D9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
162
+ '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: 0 auto"><path d="M18 6L6 18M6 6L18 18" stroke="#D9D9D9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
93
163
  const checkIcon =
94
- '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: 0 auto;">><path d="M20.5 6L9.5 17L4.5 12" stroke="#757575" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
95
-
96
- const props = defineProps<{
97
- tableData?: Record<string, any>
98
- colorScheme?: string
99
- }>()
164
+ '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: 0 auto;"><path d="M20.5 6L9.5 17L4.5 12" stroke="#757575" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
100
165
 
101
166
  const parseWeight = (weight: any) => {
102
167
  const num = parseFloat(weight)
@@ -1,28 +1,30 @@
1
1
  <template>
2
- <div v-if="pretitle || title || subtitle">
2
+ <div v-if="pretitle || title || subtitle" :class="themedClass('containerClass')">
3
3
  <p
4
4
  v-if="pretitle"
5
5
  :class="
6
- cn('mb-2 text-xl font-semibold lg:text-2xl', props.pretitleClass)
6
+ themedClass('pretitleClass', 'mb-2 text-xl font-semibold lg:text-2xl')
7
7
  "
8
8
  >
9
9
  {{ pretitle }}
10
10
  </p>
11
- <h1 v-if="title && weight === 'h1'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h1>
12
- <h2 v-if="title && weight === 'h2'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h2>
13
- <h3 v-if="title && weight === 'h3'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h3>
14
- <h4 v-if="title && weight === 'h4'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h4>
15
- <h5 v-if="title && weight === 'h5'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h5>
16
- <h6 v-if="title && weight === 'h6'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></h6>
17
- <p v-if="title && weight === 'p'" :class="cn(titleClassList, props.titleClass)" v-html="title.replace(/\n/g, '<br>')"></p>
18
- <p v-if="subtitle" :class="cn('mb-2 font-semibold', props.subtitleClass)">
11
+ <h1 v-if="title && weight === 'h1'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h1>
12
+ <h2 v-if="title && weight === 'h2'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h2>
13
+ <h3 v-if="title && weight === 'h3'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h3>
14
+ <h4 v-if="title && weight === 'h4'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h4>
15
+ <h5 v-if="title && weight === 'h5'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h5>
16
+ <h6 v-if="title && weight === 'h6'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></h6>
17
+ <p v-if="title && weight === 'p'" :class="themedClass('titleClass', titleClassList)" v-html="title.replace(/\n/g, '<br>')"></p>
18
+ <p v-if="subtitle" :class="themedClass('subtitleClass', 'mb-2 font-semibold')">
19
19
  {{ subtitle }}
20
20
  </p>
21
21
  </div>
22
22
  </template>
23
23
 
24
24
  <script lang="ts" setup>
25
- import cn from '@iqual/nuxt-icms/composables/useCn'
25
+ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
26
+
27
+ const themedClass = useTheme()
26
28
 
27
29
  const props = withDefaults(
28
30
  defineProps<{
@@ -34,6 +36,7 @@ const props = withDefaults(
34
36
  subtitleClass?: string
35
37
  weight?: string
36
38
  style?: string
39
+ containerClass?: string
37
40
  }>(),
38
41
  {
39
42
  weight: 'h2',
@@ -61,6 +64,6 @@ const titleClassList = computed(() => {
61
64
  if (props.style == 'heading-6') {
62
65
  classList.push('h6')
63
66
  }
64
- return classList
67
+ return classList.join(' ')
65
68
  })
66
69
  </script>
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div>
2
+ <div :class="themedClass('containerClass')">
3
3
  <DesignSystemMoleculesTitleComposition
4
4
  :pretitle="pretitle"
5
- :pretitleClass="pretitleClass"
5
+ :pretitleClass="themedClass('pretitleClass')"
6
6
  :title="title"
7
- :titleClass="titleClass"
7
+ :titleClass="themedClass('titleClass')"
8
8
  :subtitle="subtitle"
9
- :subtitleClass="subtitleClass"
9
+ :subtitleClass="themedClass('subtitleClass')"
10
10
  :weight="titleWeight"
11
11
  :style="titleStyle"
12
12
  />
@@ -14,31 +14,63 @@
14
14
  <DesignSystemMoleculesMediaSlider
15
15
  v-if="media && media.length"
16
16
  :media="media"
17
+ imageAspectRatios="4/3"
18
+ imageSizes="xs:100vw sm:100vw md:50vw lg:50vw"
17
19
  :colorScheme="colorScheme"
18
- :mediaClass="mediaClass"
19
- :sliderClass="mediaSliderClass"
20
- :elementClass="mediaElementClass"
20
+ :mediaClass="themedClass('mediaClass')"
21
+ :containerClass="themedClass('mediaContainerClass')"
22
+ :elementClass="themedClass('mediaElementClass')"
21
23
  />
22
24
 
23
25
  <div
24
26
  v-if="text"
25
- class="ck-content hyphens-auto text-base lg:hyphens-none"
26
- :class="cn(textColumnClass, textClass)"
27
+ :class="
28
+ cn(
29
+ themedClass(
30
+ 'textClass',
31
+ 'ck-content hyphens-auto text-base lg:hyphens-none',
32
+ ),
33
+ textColumnClass,
34
+ )
35
+ "
27
36
  v-html="text"
28
37
  />
29
38
 
30
39
  <DesignSystemMoleculesButtonGroup
31
40
  :links="links"
32
41
  :colorScheme="colorScheme"
33
- :wrapperClass="buttonWrapperClass"
42
+ :containerClass="themedClass('buttonGroupContainerClass')"
34
43
  :buttonAlignment="buttonAlignment"
44
+ :buttonClass="themedClass('buttonClass')"
45
+ :labelClass="themedClass('labelClass')"
46
+ :sublineClass="themedClass('sublineClass')"
35
47
  />
36
48
  </div>
37
49
  </template>
38
50
 
39
51
  <script lang="ts" setup>
40
- import cn from '@iqual/nuxt-icms/composables/useCn'
52
+ import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
41
53
  import type { MediaFragment } from '#graphql-operations'
54
+ import cn from '@iqual/nuxt-icms/composables/useCn'
55
+ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
56
+
57
+ const themedClass = useTheme()
58
+
59
+ type Link = {
60
+ props: {
61
+ label?: string
62
+ subline?: string
63
+ link?: {
64
+ uri: {
65
+ path: string
66
+ }
67
+ }
68
+ params?: string
69
+ buttonStyle?: string
70
+ targetBlank?: boolean
71
+ title?: string
72
+ }
73
+ }
42
74
 
43
75
  const props = defineProps<{
44
76
  pretitle?: string
@@ -49,17 +81,31 @@ const props = defineProps<{
49
81
  subtitleClass?: string
50
82
  text?: string
51
83
  textClass?: string
52
- links?: Array<object>
84
+ links?: Array<Link>
53
85
  buttonAlignment?: string
54
- buttonWrapperClass?: string
86
+ buttonGroupContainerClass?: string
55
87
  textColumns?: string
56
88
  titleWeight?: string
57
89
  titleStyle?: string
58
90
  media?: MediaFragment[]
91
+ imageAspectRatios?: string
92
+ imageSizes?: string
93
+ imageLoading?: 'lazy' | 'eager' | undefined
59
94
  mediaClass?: string
60
- colorScheme?: string
61
- mediaSliderClass?: string
95
+ elementClass?: string
96
+ figcaptionClass?: string
97
+ carouselClass?: string
98
+ carouselContentClass?: string
99
+ carouselItemClass?: string
100
+ carouselButtonPrevClass?: string
101
+ carouselButtonNextClass?: string
102
+ colorScheme?: ColorScheme
103
+ mediaContainerClass?: string
62
104
  mediaElementClass?: string
105
+ containerClass?: string
106
+ buttonClass?: string
107
+ labelClass?: string
108
+ sublineClass?: string
63
109
  }>()
64
110
 
65
111
  const textColumnClass = computed(() => {
@@ -0,0 +1,170 @@
1
+ <template>
2
+ <div>
3
+ <DesignSystemAtomsContainer
4
+ :color-scheme="colorScheme"
5
+ :spacing="spacing"
6
+ :class="themedClass('containerClass')"
7
+ >
8
+ <DesignSystemAtomsGridRow :class="themedClass('firstRowClass')">
9
+ <div
10
+ :class="
11
+ themedClass(
12
+ 'firstRowFirstColumnClass',
13
+ 'col-span-12 md:col-span-12',
14
+ )
15
+ "
16
+ >
17
+ <DesignSystemOrganismsContentBlock
18
+ :pretitle="pretitle"
19
+ :pretitleClass="themedClass('pretitleClass')"
20
+ :title="title"
21
+ :titleClass="themedClass('titleClass', 'mb-0')"
22
+ :titleWeight="titleWeight"
23
+ :titleStyle="titleStyle"
24
+ :colorScheme="colorScheme"
25
+ />
26
+ </div>
27
+ <div
28
+ :class="
29
+ themedClass(
30
+ 'firstRowSecondColumnClass',
31
+ 'col-span-12 md:col-span-9',
32
+ )
33
+ "
34
+ >
35
+ <DesignSystemOrganismsContentBlock
36
+ :text="text"
37
+ :textClass="themedClass('textClass')"
38
+ :colorScheme="colorScheme"
39
+ />
40
+ </div>
41
+ </DesignSystemAtomsGridRow>
42
+
43
+ <DesignSystemAtomsGridRow
44
+ :class="themedClass('secondRowClass', 'grid-3-col mt-10')"
45
+ >
46
+ <div :class="themedClass('secondRowColumnClass', 'col-span-12')">
47
+ <SearchFacetsFacetedSearchUI
48
+ :base-filter="baseFilter"
49
+ :facets="availableFacets"
50
+ :listing-type="listingType"
51
+ :manual-filters="manualFilters"
52
+ :items-per-page="maxResults"
53
+ :no-results-text="
54
+ $texts(
55
+ 'listing.no_results',
56
+ 'Currently there is no content available.',
57
+ )
58
+ "
59
+ :loading-text="$texts('listing.loading', 'Loading...')"
60
+ :load-more-text="$texts('listing.load_more', 'Load more')"
61
+ :color-scheme="colorScheme"
62
+ :debug="false"
63
+ >
64
+ <template #results="{ results }">
65
+ <slot name="preResults" :results="results"></slot>
66
+ <div
67
+ :class="
68
+ themedClass(
69
+ 'resultsGridClass',
70
+ 'grid-3-col mx-auto mt-10 grid grid-cols-12 gap-x-6 gap-y-12',
71
+ )
72
+ "
73
+ >
74
+ <component
75
+ v-for="teaser in results?.results"
76
+ :is="teaserComponent(teaser?.bundle)"
77
+ v-bind="teaser"
78
+ />
79
+ </div>
80
+ </template>
81
+ </SearchFacetsFacetedSearchUI>
82
+ </div>
83
+ </DesignSystemAtomsGridRow>
84
+ </DesignSystemAtomsContainer>
85
+ </div>
86
+ </template>
87
+
88
+ <script lang="ts" setup>
89
+ import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
90
+ import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
91
+
92
+ const props = withDefaults(
93
+ defineProps<{
94
+ colorScheme?: ColorScheme
95
+ spacing: {
96
+ top: string
97
+ bottom: string
98
+ }
99
+ pretitle?: string
100
+ title?: string
101
+ titleWeight?: string
102
+ titleStyle?: string
103
+ text?: string
104
+ listingType?: string
105
+ topics?: ({
106
+ id?: string
107
+ name?: string
108
+ } | null)[]
109
+ availableFacets?: string[]
110
+ contentTypeFilter?: string[]
111
+ containerClass?: string
112
+ firstRowClass?: string
113
+ firstRowFirstColumnClass?: string
114
+ firstRowSecondColumnClass?: string
115
+ secondRowClass?: string
116
+ secondRowColumnClass?: string
117
+ pretitleClass?: string
118
+ titleClass?: string
119
+ textClass?: string
120
+ resultsGridClass?: string
121
+ }>(),
122
+ {
123
+ availableFacets: () => ['topics'],
124
+ },
125
+ )
126
+
127
+ const themedClass = useTheme()
128
+ const { $texts } = useNuxtApp()
129
+
130
+ // Helper function to filter valid items
131
+ const filterValidItems = (items?: any[]) =>
132
+ (items || []).filter(item => item?.id && item?.name) as { id: string; name: string }[]
133
+
134
+ // Build manual filters object from props for 'manual' listing type
135
+ const manualFilters = computed(() => ({
136
+ topics: filterValidItems(props.topics),
137
+ }))
138
+
139
+ // Get the valid listing type
140
+ const listingType = computed(() => {
141
+ const type = props.listingType
142
+ if (type === 'all' || type === 'manual' || type === 'contextual') {
143
+ return type
144
+ }
145
+ return 'all' // default fallback
146
+ })
147
+
148
+ // Configuration for the faceted search
149
+ const baseFilter = computed(() => {
150
+ if (props?.contentTypeFilter) {
151
+ return {
152
+ conditions: [{ field: 'type', value: props?.contentTypeFilter }],
153
+ }
154
+ }
155
+ return {}
156
+ })
157
+
158
+ // Set the maximum number of teasers to display per "page"
159
+ const maxResults = props.listingType === 'all' ? 12 : 3
160
+
161
+ const { $resolveDynamicEntityComponent } = useNuxtApp()
162
+ const teaserComponent = (bundle) => {
163
+ return $resolveDynamicEntityComponent(`${bundle}Teaser`)
164
+ }
165
+
166
+ const childTitleWeight = useChildTitleWeight(props.titleWeight ?? '0')
167
+
168
+ provide('colorScheme', props.colorScheme)
169
+ provide('titleWeight', childTitleWeight)
170
+ </script>