@iqual/nuxt-icms 1.2.3 → 1.3.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 (36) hide show
  1. package/app.vue +3 -3
  2. package/components/DesignSystem/Atoms/LinkListItem.vue +1 -1
  3. package/components/Form/CheckboxInput.vue +3 -3
  4. package/components/Form/CheckboxInputs.vue +3 -3
  5. package/components/Form/FileUploadInput.vue +3 -3
  6. package/components/Form/RadioButtonsInput.vue +3 -3
  7. package/components/Form/SelectInput.vue +4 -4
  8. package/components/Form/SubmitButton.vue +1 -1
  9. package/components/Form/TextAreaInput.vue +2 -2
  10. package/components/Form/TextEmailInput.vue +2 -2
  11. package/components/Form/TextInput.vue +2 -2
  12. package/components/Form/TextPhoneInput.vue +2 -2
  13. package/components/Form/WebformMarkup.vue +1 -1
  14. package/components/Form/composables/useFormElement.ts +1 -1
  15. package/components/Media/Image/fragment.graphql +6 -0
  16. package/components/Node/Icms/Page/SearchResult/fragment.graphql +4 -2
  17. package/components/Node/Icms/Page/SearchResult/index.vue +2 -2
  18. package/components/Node/Icms/Page/fragment.graphql +0 -18
  19. package/components/Paragraph/Downloads/fragment.graphql +3 -2
  20. package/components/Paragraph/Downloads/index.vue +2 -4
  21. package/components/Paragraph/Tabs/Element/index.vue +1 -17
  22. package/components/Paragraph/Tabs/Layout/index.vue +4 -13
  23. package/components/Search/Facets/FacetDropdownUI.vue +235 -92
  24. package/components/Search/Facets/FacetedSearchUI.vue +385 -69
  25. package/components/Search/Facets/fragment.graphql +22 -3
  26. package/components/Section/Footer/index.vue +2 -2
  27. package/components/Section/Header/GlobalMenu.vue +22 -24
  28. package/components/Section/Header/LanguageDropdown.vue +6 -8
  29. package/components/Section/Header/MetaMenu.vue +11 -6
  30. package/components/Section/Header/index.vue +20 -21
  31. package/composables/useImageSources.ts +2 -1
  32. package/composables/useIsMobile.ts +2 -6
  33. package/error.vue +3 -4
  34. package/layouts/default.vue +2 -2
  35. package/layouts/error.vue +2 -2
  36. package/package.json +1 -1
package/app.vue CHANGED
@@ -3,7 +3,7 @@
3
3
  <ClientOnly>
4
4
  <div
5
5
  v-if="drupalUser.accessToolbar && !isEditing"
6
- class="hidden border-b border-b-gray-100 bg-white lg:block"
6
+ class="hidden border-b border-b-gray-100 bg-white 2xl:block"
7
7
  >
8
8
  <VuepalAdminToolbar :key="language" />
9
9
  <div class="flex">
@@ -45,6 +45,6 @@ useHead({
45
45
  .page-enter-from,
46
46
  .page-leave-to {
47
47
  opacity: 0;
48
- filter: blur(2px)
48
+ filter: blur(2px);
49
49
  }
50
- </style>
50
+ </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <NuxtLink v-if="link"
2
+ <NuxtLink v-if="link && (title || description)"
3
3
  class="block border-b-1 first:border-t-1 py-4"
4
4
  :to="link"
5
5
  :title="title"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { CheckboxInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { CheckboxInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: CheckboxInput }>()
6
6
 
@@ -24,7 +24,7 @@ const { cleanDescription, getValidationData } = useFormElement(
24
24
  :id="formElement.key"
25
25
  :checked="value"
26
26
  @update:checked="node.input($event)"
27
- class="size-5 border-1 border-gray-200 shadow-custom-small focus-visible:ring-primary-500 focus-visible:ring-offset-0 data-[state=checked]:bg-white data-[state=checked]:text-primary-500 dark:border-gray-200 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:bg-white dark:data-[state=checked]:text-primary-500"
27
+ class="border-1 shadow-custom-small focus-visible:ring-primary-500 data-[state=checked]:text-primary-500 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:text-primary-500 size-5 border-gray-200 focus-visible:ring-offset-0 data-[state=checked]:bg-white dark:border-gray-200 dark:data-[state=checked]:bg-white"
28
28
  />
29
29
  <Label :for="formElement.key" class="text-base font-normal">
30
30
  {{ `${formElement.title}${formElement.required ? '*' : ''}` }}
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { CheckboxInputs } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { CheckboxInputs } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: CheckboxInputs }>()
6
6
 
@@ -29,7 +29,7 @@ const { cleanDescription, getValidationData, getFormattedOptions } =
29
29
  <Checkbox
30
30
  :value="option.value"
31
31
  :id="`${formElement.key}-${index}`"
32
- class="size-5 border-1 border-gray-200 shadow-custom-small focus-visible:ring-primary-500 focus-visible:ring-offset-0 data-[state=checked]:bg-white data-[state=checked]:text-primary-500 dark:border-gray-200 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:bg-white dark:data-[state=checked]:text-primary-500"
32
+ class="border-1 shadow-custom-small focus-visible:ring-primary-500 data-[state=checked]:text-primary-500 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:text-primary-500 size-5 border-gray-200 focus-visible:ring-offset-0 data-[state=checked]:bg-white dark:border-gray-200 dark:data-[state=checked]:bg-white"
33
33
  />
34
34
  <Label
35
35
  :for="`${formElement.key}-${index}`"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { FileUploadInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { FileUploadInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: FileUploadInput }>()
6
6
 
@@ -26,7 +26,7 @@ const { cleanDescription, getValidationData, getFormattedFileExtensions } =
26
26
  <Input
27
27
  :id="formElement?.key"
28
28
  type="file"
29
- class="h-auto cursor-pointer rounded-lg border-gray-200 bg-white px-6 py-4 text-base font-normal shadow-custom-small !ring-offset-0 transition-all file:mr-6 file:cursor-pointer file:rounded file:bg-primary file:px-4 file:py-2 file:text-base file:font-bold file:text-white placeholder:text-gray-300 focus-visible:ring-primary-500 dark:border-gray-200 dark:bg-white dark:placeholder:text-gray-300 dark:focus-visible:ring-primary-500"
29
+ class="shadow-custom-small file:bg-primary focus-visible:ring-primary-500 dark:focus-visible:ring-primary-500 h-auto cursor-pointer rounded-lg border-gray-200 bg-white px-6 py-4 text-base font-normal !ring-offset-0 transition-all file:mr-6 file:cursor-pointer file:rounded file:px-4 file:py-2 file:text-base file:font-bold file:text-white placeholder:text-gray-300 dark:border-gray-200 dark:bg-white dark:placeholder:text-gray-300"
30
30
  />
31
31
  </div>
32
32
  </template>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { RadioButtonsInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { RadioButtonsInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: RadioButtonsInput }>()
6
6
 
@@ -29,7 +29,7 @@ const { cleanDescription, getValidationData, getFormattedOptions } =
29
29
  <RadioGroupItem
30
30
  :id="`${formElement.key}-${index}`"
31
31
  :value="option.value"
32
- class="size-5 border-1 border-gray-200 shadow-custom-small focus-visible:ring-primary-500 focus-visible:ring-offset-0 data-[state=checked]:bg-white data-[state=checked]:text-primary-500 dark:border-gray-200 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:bg-white dark:data-[state=checked]:text-primary-500"
32
+ class="border-1 shadow-custom-small focus-visible:ring-primary-500 data-[state=checked]:text-primary-500 dark:focus-visible:ring-primary-500 dark:data-[state=checked]:text-primary-500 size-5 border-gray-200 focus-visible:ring-offset-0 data-[state=checked]:bg-white dark:border-gray-200 dark:data-[state=checked]:bg-white"
33
33
  />
34
34
  <Label
35
35
  :for="`${formElement.key}-${index}`"
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { SelectInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { SelectInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: SelectInput }>()
6
6
 
@@ -24,7 +24,7 @@ const { cleanDescription, getValidationData, getFormattedOptions } =
24
24
  @update:model-value="node.input"
25
25
  >
26
26
  <SelectTrigger
27
- class="[&[data-state=open]>svg]:transition-200 h-auto border-1 border-gray-200 bg-white px-6 py-4 shadow-custom-small focus:outline-none focus:ring-primary-500 focus:ring-offset-0 dark:border-gray-200 dark:bg-white dark:focus:outline-none dark:focus:ring-primary-500 dark:focus:ring-offset-0 [&[data-state=open]>svg]:rotate-180 [&[data-state=open]>svg]:transition-all"
27
+ class="[&[data-state=open]>svg]:transition-200 border-1 shadow-custom-small focus:ring-primary-500 dark:focus:ring-primary-500 h-auto border-gray-200 bg-white px-6 py-4 focus:outline-none focus:ring-offset-0 dark:border-gray-200 dark:bg-white dark:focus:outline-none dark:focus:ring-offset-0 [&[data-state=open]>svg]:rotate-180 [&[data-state=open]>svg]:transition-all"
28
28
  >
29
29
  <SelectValue
30
30
  :placeholder="`${formElement.title}${formElement.required ? '*' : ''}`"
@@ -36,7 +36,7 @@ const { cleanDescription, getValidationData, getFormattedOptions } =
36
36
  </SelectValue>
37
37
  </SelectTrigger>
38
38
  <SelectContent
39
- class="border-1 border-gray-200 bg-white !shadow-custom-small dark:border-gray-200 dark:bg-white [&>div]:!px-0 [&>div]:!py-1"
39
+ class="border-1 !shadow-custom-small border-gray-200 bg-white dark:border-gray-200 dark:bg-white [&>div]:!px-0 [&>div]:!py-1"
40
40
  >
41
41
  <SelectItem
42
42
  v-for="(option, index) in getFormattedOptions"
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { SubmitButton } from './utils/types'
2
+ import type { SubmitButton } from '@iqual/nuxt-icms/components/Form/utils/types'
3
3
 
4
4
  defineProps<{ formElement: SubmitButton }>()
5
5
  </script>
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import type { TextAreaInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { TextAreaInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: TextAreaInput }>()
6
6
 
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import type { TextEmailInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { TextEmailInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: TextEmailInput }>()
6
6
 
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import type { TextInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { TextInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: TextInput }>()
6
6
 
@@ -1,6 +1,6 @@
1
1
  <script lang="ts" setup>
2
- import type { TextPhoneInput } from './utils/types'
3
- import { useFormElement } from './composables/useFormElement'
2
+ import type { TextPhoneInput } from '@iqual/nuxt-icms/components/Form/utils/types'
3
+ import { useFormElement } from '@iqual/nuxt-icms/components/Form/composables/useFormElement'
4
4
 
5
5
  const props = defineProps<{ formElement: TextPhoneInput }>()
6
6
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import type { WebformMarkup } from './utils/types'
2
+ import type { WebformMarkup } from '@iqual/nuxt-icms/components/Form/utils/types'
3
3
 
4
4
  defineProps<{ formElement: WebformMarkup }>()
5
5
  </script>
@@ -1,4 +1,4 @@
1
- import type { FormElement, TextInput, SelectInput, InputOption, CheckboxInputs, CheckboxInput, FileUploadInput } from '../utils/types'
1
+ import type { FormElement, TextInput, SelectInput, InputOption, CheckboxInputs, CheckboxInput, FileUploadInput } from '@iqual/nuxt-icms/components/Form/utils/types'
2
2
 
3
3
  export function useFormElement(formElement: FormElement) {
4
4
  const { $texts } = useNuxtApp()
@@ -8,4 +8,10 @@ fragment mediaImage on MediaImage {
8
8
  path
9
9
  }
10
10
  caption: fieldCaption
11
+ focalPoint: fieldMediaImage {
12
+ focalPoint {
13
+ x: xNormalized
14
+ y: yNormalized
15
+ }
16
+ }
11
17
  }
@@ -1,7 +1,9 @@
1
1
  fragment nodeIcmsPageSearchResult on NodeIcmsPage {
2
2
  id
3
- title: label
4
- description: body
3
+ title: fieldIcmsTeaserTitle
4
+ mainTitle: label
5
+ text: fieldIcmsTeaserText
6
+ mainText: body
5
7
  link: url {
6
8
  path
7
9
  }
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <DesignSystemAtomsLinkListItem
3
3
  :link="link?.path"
4
- :title="title"
5
- :description="description"
4
+ :title="title || mainTitle"
5
+ :description="text || mainText"
6
6
  />
7
7
  </template>
8
8
 
@@ -15,21 +15,3 @@ fragment nodeIcmsPage on NodeIcmsPage {
15
15
  }
16
16
  }
17
17
  }
18
-
19
- fragment nodeIcmsPageTeaser on NodeIcmsPage {
20
- pretitle: fieldIcmsTeaserPretitle
21
- title: fieldIcmsTeaserTitle
22
- mainTitle: label
23
- text: fieldIcmsTeaserText
24
- mainText: body
25
- image: fieldIcmsTeaserImage {
26
- ...media
27
- }
28
- mainImage: fieldIcmsImage {
29
- ...media
30
- }
31
- link: url {
32
- path
33
- }
34
- linkLabel: fieldIcmsTeaserLinkLabel
35
- }
@@ -2,6 +2,7 @@ fragment paragraphIcmsLayoutDownloads on ParagraphIcmsLayoutDownloads {
2
2
  pretitle: fieldIcmsPretitle
3
3
  title: fieldIcmsTitle
4
4
  titleWeight: fieldIcmsTitleWeight
5
+ titleStyle: fieldIcmsTitleStyle
5
6
  text: fieldIcmsText
6
7
  media: fieldIcmsMediaElements {
7
8
  ...media
@@ -9,7 +10,7 @@ fragment paragraphIcmsLayoutDownloads on ParagraphIcmsLayoutDownloads {
9
10
  documents: fieldIcmsDocuments {
10
11
  name
11
12
  mediaFileUrl {
12
- path
13
+ path
13
14
  }
14
15
  }
15
- }
16
+ }
@@ -6,6 +6,7 @@
6
6
  :pretitle="pretitle"
7
7
  :title="title"
8
8
  :titleWeight="titleWeight"
9
+ :titleStyle="titleStyle"
9
10
  titleClass="mb-0"
10
11
  :colorScheme="colorScheme"
11
12
  />
@@ -29,10 +30,7 @@
29
30
  :class="download({ colorScheme })"
30
31
  >
31
32
  <div :class="downloadIcon({ colorScheme })">
32
- <SpriteSymbol
33
- name="download"
34
- class="size-5"
35
- />
33
+ <SpriteSymbol name="download" class="size-5" />
36
34
  </div>
37
35
  <DesignSystemOrganismsContentBlock :text="document.name" />
38
36
  </a>
@@ -29,23 +29,7 @@ import type { ParagraphIcmsTabElementFragment } from '#graphql-operations'
29
29
 
30
30
  defineProps<ParagraphIcmsTabElementFragment>()
31
31
 
32
- const { options, isEditing } = defineBlokkli({
33
- bundle: 'icms_tab_element',
34
- })
35
-
36
- const tabTrigger = tv({
37
- base: 'inline-flex w-full flex-1 items-center justify-center whitespace-nowrap rounded-none rounded-t-lg py-4 text-base shadow-custom-inner transition-all disabled:pointer-events-none lg:w-fit data-[state=active]:shadow-none',
38
- variants: {
39
- colorScheme: {
40
- none: 'bg-white dark:bg-white text-black dark:text-black data-[state=active]:bg-white dark:data-[state=active]:bg-white dark:data-[state=active]:text-black',
41
- dark: 'bg-gray-700 dark:bg-gray-700 text-white dark:text-white data-[state=active]:bg-gray-900 dark:data-[state=active]:bg-gray-900 data-[state=active]:text-white',
42
- light:
43
- 'bg-white dark:bg-white text-black dark:text-black data-[state=active]:bg-white dark:data-[state=active]:bg-white dark:data-[state=active]:text-black',
44
- accent:
45
- 'bg-primary-600 dark:bg-primary-600 text-white dark:text-white data-[state=active]:bg-primary-700 dark:data-[state=active]:bg-primary-700 data-[state=active]:text-white',
46
- },
47
- },
48
- })
32
+ const { isEditing } = useAttrs().blokkliData as any
49
33
 
50
34
  const tabContent = tv({
51
35
  base: 'm-0 rounded-b-lg p-8 text-black md:p-16',
@@ -12,7 +12,7 @@
12
12
  </DesignSystemAtomsGridRow>
13
13
  <DesignSystemAtomsGridRow>
14
14
  <div class="relative col-span-12" v-if="isEditing">
15
- <Tabs class="rounded-lg shadow-custom">
15
+ <Tabs class="shadow-custom rounded-lg">
16
16
  <BlokkliField
17
17
  name="field_icms_tab_elements"
18
18
  :list="tabElements"
@@ -25,7 +25,7 @@
25
25
  <Tabs
26
26
  v-if="!isMobile"
27
27
  default-value="tab-1"
28
- class="rounded-lg shadow-custom"
28
+ class="shadow-custom rounded-lg"
29
29
  >
30
30
  <TabsList
31
31
  class="flex flex-col items-center justify-center bg-transparent p-0 lg:flex-row dark:bg-transparent"
@@ -107,21 +107,13 @@
107
107
 
108
108
  <script lang="ts" setup>
109
109
  import { tv } from 'tailwind-variants'
110
- import { useAccordionScroll } from '@/composables/useAccordionScroll'
110
+ import { useAccordionScroll } from '@iqual/nuxt-icms/composables/useAccordionScroll'
111
111
 
112
112
  import type { ParagraphIcmsLayoutTabsFragment } from '#graphql-operations'
113
113
 
114
114
  const props = defineProps<ParagraphIcmsLayoutTabsFragment>()
115
115
 
116
- const { options, isEditing } = defineBlokkli({
117
- bundle: 'icms_layout_tabs',
118
- globalOptions: [
119
- 'spacingBottom',
120
- 'spacingTop',
121
- 'colorScheme',
122
- 'buttonAlignment',
123
- ],
124
- })
116
+ const { options, isEditing } = useAttrs().blokkliData as any
125
117
 
126
118
  const { isMobile } = useIsMobile()
127
119
 
@@ -188,4 +180,3 @@ provide('colorScheme', colorScheme)
188
180
  provide('buttonAlignment', buttonAlignment)
189
181
  provide('childTitleWeight', childTitleWeight)
190
182
  </script>
191
-