@cooperco/cooper-component-library 0.1.0 → 0.1.2
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/{component-lib.js → lib/component-lib.js} +1924 -1475
- package/dist/lib/component-lib.umd.cjs +98 -0
- package/{src/assets → dist/lib/css}/main.css +3 -2
- package/dist/lib/style.css +1 -0
- package/dist/lib/vite.svg +16 -0
- package/dist/types/App.vue.d.ts +2 -0
- package/dist/types/components/Accordion/Accordion.d.ts +17 -0
- package/dist/types/components/Accordion/Accordion.vue.d.ts +29 -0
- package/dist/types/components/Accordion/AccordionItem.d.ts +23 -0
- package/dist/types/components/Accordion/AccordionItem.vue.d.ts +30 -0
- package/dist/types/components/Accordion/AccordionListItem.vue.d.ts +12 -0
- package/dist/types/components/Accordion/AccordionTileItem.vue.d.ts +16 -0
- package/dist/types/components/CTA/CTA.d.ts +19 -0
- package/dist/types/components/CTA/CTA.vue.d.ts +12 -0
- package/dist/types/components/CarouselModule/CarouselModule.d.ts +24 -0
- package/dist/types/components/CarouselModule/CarouselModule.vue.d.ts +26 -0
- package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.d.ts +11 -0
- package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.vue.d.ts +12 -0
- package/dist/types/components/ContainerModule/ContainerModule.d.ts +26 -0
- package/dist/types/components/ContainerModule/ContainerModule.vue.d.ts +36 -0
- package/dist/types/components/ContentModule/ContentModule.d.ts +28 -0
- package/dist/types/components/ContentModule/ContentModule.vue.d.ts +29 -0
- package/dist/types/components/FooterNavigation/FooterNavigation.d.ts +12 -0
- package/dist/types/components/FooterNavigation/FooterNavigation.vue.d.ts +12 -0
- package/dist/types/components/Image/Image.d.ts +13 -0
- package/dist/types/components/Image/Image.vue.d.ts +26 -0
- package/dist/types/components/LogoCollectionModule/LogoCollectionModule.d.ts +10 -0
- package/dist/types/components/LogoCollectionModule/LogoCollectionModule.vue.d.ts +12 -0
- package/dist/types/components/NavigationElement/NavigationElement.d.ts +17 -0
- package/dist/types/components/NavigationElement/NavigationElement.vue.d.ts +12 -0
- package/dist/types/components/PrimaryNavigation/PrimaryNavigation.d.ts +11 -0
- package/dist/types/components/PrimaryNavigation/PrimaryNavigation.vue.d.ts +12 -0
- package/dist/types/components/SplitModule/SplitModule.d.ts +16 -0
- package/dist/types/components/SplitModule/SplitModule.vue.d.ts +12 -0
- package/dist/types/components/TestimonialModule/TestimonialModule.d.ts +21 -0
- package/dist/types/components/TestimonialModule/TestimonialModule.vue.d.ts +12 -0
- package/dist/types/components/TileCollectionModule/TileCollectionModule.d.ts +14 -0
- package/dist/types/components/TileCollectionModule/TileCollectionModule.vue.d.ts +12 -0
- package/dist/types/components/TileContent/TileContent.d.ts +53 -0
- package/dist/types/components/TileContent/TileContentIconTile.vue.d.ts +12 -0
- package/dist/types/components/TileContent/TileContentImageStackedAnimatedTile.vue.d.ts +12 -0
- package/dist/types/components/TileContent/TileContentImageTile.vue.d.ts +12 -0
- package/dist/types/components/TileContent/TileContentTextTile.vue.d.ts +12 -0
- package/dist/types/components/TileContent/TileContentVideoTile.vue.d.ts +12 -0
- package/dist/types/components/TileLabel/TileLabel.d.ts +13 -0
- package/dist/types/components/TileLabel/TileLabel.vue.d.ts +29 -0
- package/dist/types/components/Video/Video.d.ts +8 -0
- package/dist/types/components/Video/Video.vue.d.ts +26 -0
- package/dist/types/components/components.d.ts +23 -0
- package/dist/types/components/types.d.ts +16 -0
- package/dist/types/config/defaultPassthrough.d.ts +96 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/init.d.ts +3 -0
- package/dist/types/pages/index.vue.d.ts +2 -0
- package/dist/types/router.d.ts +5 -0
- package/dist/types/types.d.ts +49 -0
- package/package.json +96 -93
- package/dist/component-lib.umd.cjs +0 -98
- package/src/components/Accordion/Accordion.ts +0 -20
- package/src/components/Accordion/Accordion.vue +0 -66
- package/src/components/Accordion/AccordionItem.ts +0 -25
- package/src/components/Accordion/AccordionItem.vue +0 -104
- package/src/components/Accordion/AccordionListItem.vue +0 -61
- package/src/components/Accordion/AccordionTileItem.vue +0 -75
- package/src/components/CTA/CTA.ts +0 -22
- package/src/components/CTA/CTA.vue +0 -65
- package/src/components/CarouselModule/CarouselModule.ts +0 -20
- package/src/components/CarouselModule/CarouselModule.vue +0 -64
- package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +0 -12
- package/src/components/ContainerCollectionModule/ContainerCollectionModule.vue +0 -42
- package/src/components/ContainerModule/ContainerModule.ts +0 -69
- package/src/components/ContainerModule/ContainerModule.vue +0 -113
- package/src/components/ContentModule/ContentModule.ts +0 -31
- package/src/components/ContentModule/ContentModule.vue +0 -65
- package/src/components/FooterNavigation/FooterNavigation.ts +0 -13
- package/src/components/FooterNavigation/FooterNavigation.vue +0 -59
- package/src/components/Image/Image.ts +0 -12
- package/src/components/Image/Image.vue +0 -17
- package/src/components/LogoCollectionModule/LogoCollectionModule.ts +0 -12
- package/src/components/LogoCollectionModule/LogoCollectionModule.vue +0 -40
- package/src/components/NavigationElement/NavigationElement.ts +0 -22
- package/src/components/NavigationElement/NavigationElement.vue +0 -101
- package/src/components/PrimaryNavigation/PrimaryNavigation.ts +0 -10
- package/src/components/PrimaryNavigation/PrimaryNavigation.vue +0 -71
- package/src/components/SplitModule/SplitModule.ts +0 -17
- package/src/components/SplitModule/SplitModule.vue +0 -57
- package/src/components/TestimonialModule/TestimonialModule.ts +0 -22
- package/src/components/TestimonialModule/TestimonialModule.vue +0 -51
- package/src/components/TileCollectionModule/TileCollectionModule.ts +0 -18
- package/src/components/TileCollectionModule/TileCollectionModule.vue +0 -58
- package/src/components/TileContent/TileContent.ts +0 -60
- package/src/components/TileContent/TileContent.vue +0 -116
- package/src/components/TileContent/TileContentIconTile.vue +0 -83
- package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +0 -121
- package/src/components/TileContent/TileContentImageTile.vue +0 -80
- package/src/components/TileContent/TileContentTextTile.vue +0 -63
- package/src/components/TileContent/TileContentVideoTile.vue +0 -81
- package/src/components/Video/Video.ts +0 -8
- package/src/components/Video/Video.vue +0 -18
- /package/{src/assets → dist/lib/css}/theme.css +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Bold.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Bold.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Bold.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Regular.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Medium.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Medium.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Regular.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Regular.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/fonts.scss +0 -0
- /package/{src/assets → dist/lib}/fonts/notosanssc-bold-webfont.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/notosanssc-bold-webfont.woff2 +0 -0
- /package/{src/assets → dist/lib}/fonts/notosanssc-regular-webfont.woff +0 -0
- /package/{src/assets → dist/lib}/fonts/notosanssc-regular-webfont.woff2 +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough } from '../../types'
|
|
2
|
-
import { CTA } from '../CTA/CTA'
|
|
3
|
-
import { Image } from '../Image/Image'
|
|
4
|
-
|
|
5
|
-
export interface ContentModulePassthrough extends ComponentPassthrough {
|
|
6
|
-
container?: string
|
|
7
|
-
ctas?: string
|
|
8
|
-
logo?: string
|
|
9
|
-
subHeadline?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export enum ContentModuleAligmentEnum {
|
|
13
|
-
Left = 'left',
|
|
14
|
-
Center = 'center',
|
|
15
|
-
Right = 'right',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface ContentModule {
|
|
19
|
-
__typename?: 'ContentModule'
|
|
20
|
-
headline?: string
|
|
21
|
-
subHeadline?: string
|
|
22
|
-
description?: string
|
|
23
|
-
ctas?: CTA[]
|
|
24
|
-
textColor?: string
|
|
25
|
-
backgroundColor?: string
|
|
26
|
-
pt?: ContentModulePassthrough
|
|
27
|
-
logo?: Image
|
|
28
|
-
isHero?: boolean
|
|
29
|
-
alignment?: ContentModuleAligmentEnum
|
|
30
|
-
isChild?: boolean
|
|
31
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ContentModule, ContentModuleAligmentEnum } from './ContentModule'
|
|
3
|
-
import CTA from '../CTA/CTA.vue'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import {
|
|
6
|
-
combinePassthroughs,
|
|
7
|
-
ContentModulePt,
|
|
8
|
-
} from '../../config/defaultPassthrough'
|
|
9
|
-
import { twMerge } from 'tailwind-merge'
|
|
10
|
-
|
|
11
|
-
const props = withDefaults(defineProps<ContentModule>(), {
|
|
12
|
-
isHero: false,
|
|
13
|
-
alignment: ContentModuleAligmentEnum.Left,
|
|
14
|
-
})
|
|
15
|
-
const pt = computed(() => combinePassthroughs(ContentModulePt, props.pt ?? {}))
|
|
16
|
-
|
|
17
|
-
const computedStyle = computed(() => {
|
|
18
|
-
return {
|
|
19
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
20
|
-
color: props.textColor ?? 'inherit',
|
|
21
|
-
}
|
|
22
|
-
})
|
|
23
|
-
const computedAlignment = computed(() => `text-${props.alignment}`)
|
|
24
|
-
const logoClass = computed(
|
|
25
|
-
// TODO: Add description or remove when class error is fixed
|
|
26
|
-
// @ts-expect-error <add description>
|
|
27
|
-
() => `${pt.value?.logo ?? ''} ${props?.logo?.class}`
|
|
28
|
-
)
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<div :class="`content-module ${pt?.root ?? ''}`" :style="computedStyle">
|
|
33
|
-
<div :class="`content-module-container mx-auto ${pt?.container ?? ''}`">
|
|
34
|
-
<Image v-if="logo" v-bind="logo" :class="logoClass" />
|
|
35
|
-
<h2
|
|
36
|
-
v-if="headline"
|
|
37
|
-
:class="`${headline && !subHeadline ? 'mb-4' : ''} ${twMerge(pt?.headline ?? '', computedAlignment)}`"
|
|
38
|
-
>
|
|
39
|
-
{{ headline }}
|
|
40
|
-
</h2>
|
|
41
|
-
<h2
|
|
42
|
-
v-if="subHeadline"
|
|
43
|
-
:class="`content-module-subheadline ${twMerge(pt?.subheadline ?? '', computedAlignment)}`"
|
|
44
|
-
>
|
|
45
|
-
{{ subHeadline }}
|
|
46
|
-
</h2>
|
|
47
|
-
<p
|
|
48
|
-
v-if="description"
|
|
49
|
-
:class="`content-module-description ${twMerge(pt?.description ?? '', computedAlignment)}`"
|
|
50
|
-
>
|
|
51
|
-
{{ description }}
|
|
52
|
-
</p>
|
|
53
|
-
<div
|
|
54
|
-
v-if="ctas"
|
|
55
|
-
:class="`content-module-ctas ${twMerge(pt?.ctas ?? '', computedAlignment)}`"
|
|
56
|
-
>
|
|
57
|
-
<CTA
|
|
58
|
-
v-for="(item, index) in ctas"
|
|
59
|
-
v-bind="item"
|
|
60
|
-
:key="`cta-${item.title}-${index}`"
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</template>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { socialMedia } from '../../types'
|
|
2
|
-
import { Image } from '../Image/Image'
|
|
3
|
-
import { NavigationElement } from '../NavigationElement/NavigationElement'
|
|
4
|
-
|
|
5
|
-
export interface FooterNavigation {
|
|
6
|
-
title?: string
|
|
7
|
-
logo?: Image
|
|
8
|
-
legalText?: string
|
|
9
|
-
textColor?: string
|
|
10
|
-
backgroundColor?: string
|
|
11
|
-
navigation?: NavigationElement[]
|
|
12
|
-
socialMediaRef?: socialMedia[]
|
|
13
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { type FooterNavigation } from './FooterNavigation'
|
|
3
|
-
import NavigationElement from '../NavigationElement/NavigationElement.vue'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
|
|
6
|
-
const props = defineProps<FooterNavigation>()
|
|
7
|
-
|
|
8
|
-
const computedStyle = computed(() => {
|
|
9
|
-
return {
|
|
10
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
11
|
-
color: props.textColor ?? 'inherit',
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
</script>
|
|
15
|
-
<template>
|
|
16
|
-
<footer class="w-full p-5" :style="computedStyle">
|
|
17
|
-
<div class="container flex flex-col mx-auto">
|
|
18
|
-
<div class="flex justify-between flex-col sm:flex-row p-5 gap-4">
|
|
19
|
-
<a href="/" class="footer-navigation-logo text-center">
|
|
20
|
-
<img
|
|
21
|
-
v-if="logo"
|
|
22
|
-
class="min-h-[95px] min-w-[100px] w-[100px] h-[95px]"
|
|
23
|
-
:="logo"
|
|
24
|
-
/>
|
|
25
|
-
{{ title }}
|
|
26
|
-
</a>
|
|
27
|
-
<div
|
|
28
|
-
v-if="navigation"
|
|
29
|
-
class="footer-navigation px-2 pt-2 pb-4 sm:flex sm:p-0 sm:space-x-2 md:space-x-4 space-y-5 sm:space-y-0"
|
|
30
|
-
>
|
|
31
|
-
<NavigationElement
|
|
32
|
-
v-for="(item, index) in navigation"
|
|
33
|
-
:key="`footer-nav-item-${item.title}-${index}`"
|
|
34
|
-
:class="`footer-nav-item-${index}`"
|
|
35
|
-
role="menuitem"
|
|
36
|
-
tabindex="-1"
|
|
37
|
-
:="{ ...item, isChild: false, elementType: 'footer' }"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
<div
|
|
41
|
-
v-if="socialMediaRef"
|
|
42
|
-
class="flex flex-wrap footer-social space-x-2"
|
|
43
|
-
>
|
|
44
|
-
<a
|
|
45
|
-
v-for="(item, index) in socialMediaRef"
|
|
46
|
-
:key="`footer-social-item-${item.icon.altTag}-${index}`"
|
|
47
|
-
:class="`footer-social-item-${index}`"
|
|
48
|
-
:href="item?.url?.link"
|
|
49
|
-
>
|
|
50
|
-
<img :="item.icon" />
|
|
51
|
-
</a>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<hr />
|
|
55
|
-
<!-- switch to rich text if we go forward with this -->
|
|
56
|
-
<div v-if="legalText" class="footer-legal py-5" v-html="legalText" />
|
|
57
|
-
</div>
|
|
58
|
-
</footer>
|
|
59
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { Image } from './Image'
|
|
3
|
-
|
|
4
|
-
const props = defineProps<Image>()
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<!-- TODO: Add description below or remove if classes fixed -->
|
|
9
|
-
<!-- @vue-expect-error <add description> -->
|
|
10
|
-
<img
|
|
11
|
-
:class="props.class"
|
|
12
|
-
:src="props.media.src"
|
|
13
|
-
:alt="props.altTag"
|
|
14
|
-
:height="props.media.height"
|
|
15
|
-
:width="props.media.width"
|
|
16
|
-
/>
|
|
17
|
-
</template>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough } from '../../types'
|
|
2
|
-
import { Image } from '../Image/Image'
|
|
3
|
-
|
|
4
|
-
// Logos
|
|
5
|
-
export interface LogoCollectionModule {
|
|
6
|
-
__typename?: 'LogoCollectionModule'
|
|
7
|
-
headline: string
|
|
8
|
-
modules: Image[]
|
|
9
|
-
textColor?: string
|
|
10
|
-
backgroundColor?: string
|
|
11
|
-
pt?: ComponentPassthrough
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { LogoCollectionModule } from './LogoCollectionModule'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import {
|
|
5
|
-
combinePassthroughs,
|
|
6
|
-
LogoCollectionModulePt,
|
|
7
|
-
} from '../../config/defaultPassthrough'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<LogoCollectionModule>()
|
|
10
|
-
const pt = computed(() =>
|
|
11
|
-
combinePassthroughs(LogoCollectionModulePt, props.pt ?? {})
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
const computedStyle = computed(() => {
|
|
15
|
-
return {
|
|
16
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
17
|
-
color: props.textColor ?? 'inherit',
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<section :style="computedStyle" class="logo-module">
|
|
24
|
-
<div :class="`container mx-auto ${pt?.container ?? ''}`">
|
|
25
|
-
<h2 v-if="headline" :class="`logo-module-headline ${pt?.headline ?? ''}`">
|
|
26
|
-
{{ headline }}
|
|
27
|
-
</h2>
|
|
28
|
-
<div
|
|
29
|
-
v-if="modules"
|
|
30
|
-
:class="`logo-module-content flex flex-wrap justify-evenly gap-2 ${pt?.content ?? ''}`"
|
|
31
|
-
>
|
|
32
|
-
<Image
|
|
33
|
-
v-for="(image, index) in modules"
|
|
34
|
-
v-bind="image"
|
|
35
|
-
:key="`cta-${image.altTag}-${index}`"
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</section>
|
|
40
|
-
</template>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough, URLRef } from '../../types'
|
|
2
|
-
|
|
3
|
-
export interface NavigationElementPt extends ComponentPassthrough {
|
|
4
|
-
icon?: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface NavigationElement {
|
|
8
|
-
elementType?: 'header' | 'footer'
|
|
9
|
-
title?: string
|
|
10
|
-
linkRef?: URLRef
|
|
11
|
-
htmlRef?: string
|
|
12
|
-
subNavigation?: NavigationElement[]
|
|
13
|
-
// types only used in code, based on placement from contentful
|
|
14
|
-
isChild?: boolean
|
|
15
|
-
pt?: NavigationElementPt
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Navigation
|
|
19
|
-
export enum NavigationElementType {
|
|
20
|
-
'header' = 0,
|
|
21
|
-
'footer' = 1,
|
|
22
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
NavigationElement as NavigationElementT,
|
|
4
|
-
NavigationElementType,
|
|
5
|
-
} from './NavigationElement'
|
|
6
|
-
import { computed, ref } from 'vue'
|
|
7
|
-
import { RouterLink } from 'vue-router'
|
|
8
|
-
import {
|
|
9
|
-
combinePassthroughs,
|
|
10
|
-
NavigationElementPt,
|
|
11
|
-
} from '../../config/defaultPassthrough'
|
|
12
|
-
|
|
13
|
-
const props = defineProps<NavigationElementT>()
|
|
14
|
-
const pt = computed(() =>
|
|
15
|
-
combinePassthroughs(NavigationElementPt, props.pt ?? {})
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
// Update to support url vs page
|
|
19
|
-
const url = computed(() => {
|
|
20
|
-
if (props.linkRef?.page) {
|
|
21
|
-
return `/${props.linkRef?.page}`
|
|
22
|
-
}
|
|
23
|
-
return props?.linkRef?.link
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const elementTypeValue = computed(() => {
|
|
27
|
-
return NavigationElementType[props.elementType ?? 'header']
|
|
28
|
-
})
|
|
29
|
-
const showSubNavigation = ref(false)
|
|
30
|
-
const builtClassname = computed(
|
|
31
|
-
() =>
|
|
32
|
-
// TODO: Add description below or remove if classes fixed
|
|
33
|
-
// @ts-expect-error <add description>
|
|
34
|
-
`relative m-0 ${props.class ?? ''} ${props.isChild ? 'sub-' : ''}navigation-element`
|
|
35
|
-
)
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<template>
|
|
39
|
-
<component :is="isChild ? 'li' : 'div'" :class="builtClassname">
|
|
40
|
-
<component
|
|
41
|
-
:is="url || isChild ? RouterLink : 'button'"
|
|
42
|
-
v-if="
|
|
43
|
-
elementTypeValue === NavigationElementType.header ||
|
|
44
|
-
(isChild && (url || subNavigation))
|
|
45
|
-
"
|
|
46
|
-
:to="url"
|
|
47
|
-
class="flex items-center hover:underline"
|
|
48
|
-
:class="{
|
|
49
|
-
'whitespace-nowrap': elementTypeValue === NavigationElementType.header,
|
|
50
|
-
}"
|
|
51
|
-
aria-expanded="true"
|
|
52
|
-
aria-haspopup="true"
|
|
53
|
-
@click.prevent="showSubNavigation = !showSubNavigation"
|
|
54
|
-
>
|
|
55
|
-
{{ title }}
|
|
56
|
-
|
|
57
|
-
<div
|
|
58
|
-
v-if="!isChild && subNavigation && !(url || isChild)"
|
|
59
|
-
:class="pt?.icon"
|
|
60
|
-
>
|
|
61
|
-
<i v-show="!showSubNavigation" :class="`pi pi-chevron-down`"></i>
|
|
62
|
-
<i v-show="showSubNavigation" :class="`pi pi-chevron-up`"></i>
|
|
63
|
-
</div>
|
|
64
|
-
</component>
|
|
65
|
-
<h2
|
|
66
|
-
v-else-if="elementTypeValue == NavigationElementType.footer"
|
|
67
|
-
class="mb-2 font-bold"
|
|
68
|
-
>
|
|
69
|
-
{{ title }}
|
|
70
|
-
</h2>
|
|
71
|
-
|
|
72
|
-
<ul
|
|
73
|
-
v-if="!isChild && subNavigation"
|
|
74
|
-
:class="{
|
|
75
|
-
hidden:
|
|
76
|
-
!showSubNavigation &&
|
|
77
|
-
elementTypeValue == NavigationElementType.header,
|
|
78
|
-
'sm:absolute left-0 z-10 sm:mt-2 space-y-2 origin-top-right rounded-md ring-opacity-5 focus:outline-none sm:shadow-lg sm:ring-1 sm:ring-white sm:bg-white p-5':
|
|
79
|
-
elementTypeValue == NavigationElementType.header,
|
|
80
|
-
}"
|
|
81
|
-
role="menu"
|
|
82
|
-
aria-orientation="vertical"
|
|
83
|
-
aria-labelledby="menu-button"
|
|
84
|
-
tabindex="-1"
|
|
85
|
-
>
|
|
86
|
-
<NavigationElement
|
|
87
|
-
v-for="(item, index) in subNavigation"
|
|
88
|
-
:key="item.title"
|
|
89
|
-
class="ms-3 sm:ms-0"
|
|
90
|
-
:class="`sub-navigation-element-item-${index}`"
|
|
91
|
-
role="menuitem"
|
|
92
|
-
tabindex="-1"
|
|
93
|
-
:="{ ...item, elementType, isChild: true }"
|
|
94
|
-
/>
|
|
95
|
-
</ul>
|
|
96
|
-
|
|
97
|
-
<template v-if="htmlRef">
|
|
98
|
-
<div v-html="htmlRef" />
|
|
99
|
-
</template>
|
|
100
|
-
</component>
|
|
101
|
-
</template>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Image } from '../Image/Image'
|
|
2
|
-
import { NavigationElement } from '../NavigationElement/NavigationElement'
|
|
3
|
-
|
|
4
|
-
export interface PrimaryNavigation {
|
|
5
|
-
title?: string
|
|
6
|
-
logo?: Image
|
|
7
|
-
textColor?: string
|
|
8
|
-
backgroundColor?: string
|
|
9
|
-
navigation?: NavigationElement[]
|
|
10
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { PrimaryNavigation } from './PrimaryNavigation'
|
|
3
|
-
import Image from '../Image/Image.vue'
|
|
4
|
-
import NavigationElement from '../NavigationElement/NavigationElement.vue'
|
|
5
|
-
import { ref, computed } from 'vue'
|
|
6
|
-
|
|
7
|
-
const props = defineProps<PrimaryNavigation>()
|
|
8
|
-
const isOpen = ref(true)
|
|
9
|
-
const computedStyle = computed(() => {
|
|
10
|
-
return {
|
|
11
|
-
'background-color': props.backgroundColor ?? 'white',
|
|
12
|
-
color: props.textColor ?? 'inherit',
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<header
|
|
19
|
-
class="primary-navigation-header sticky top-0 z-50 p-5 shadow-2xl"
|
|
20
|
-
:style="computedStyle"
|
|
21
|
-
>
|
|
22
|
-
<div class="container sm:flex sm:justify-between sm:items-center mx-auto">
|
|
23
|
-
<div class="flex items-center justify-between py-3 sm:p-0">
|
|
24
|
-
<a
|
|
25
|
-
v-if="logo"
|
|
26
|
-
href="/"
|
|
27
|
-
class="primary-navigation-logo flex items-center h-12 sm:h-16 ps-5"
|
|
28
|
-
>
|
|
29
|
-
<Image v-bind="logo" />
|
|
30
|
-
</a>
|
|
31
|
-
<div class="sm:hidden">
|
|
32
|
-
<button type="button" class="block" @click="isOpen = !isOpen">
|
|
33
|
-
<svg class="h-6 w-6 fill-current" viewBox="0 0 24 24">
|
|
34
|
-
<!-- Hamburger SVG path-->
|
|
35
|
-
<path
|
|
36
|
-
v-if="isOpen"
|
|
37
|
-
fill-rule="evenodd"
|
|
38
|
-
d="M18.278 16.864a1 1 0 0 1-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 0 1-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 0 1 1.414-1.414l4.829 4.828 4.828-4.828a1 1 0 1 1 1.414 1.414l-4.828 4.829 4.828 4.828z"
|
|
39
|
-
/>
|
|
40
|
-
<!-- X SVG path -->
|
|
41
|
-
<path
|
|
42
|
-
v-if="!isOpen"
|
|
43
|
-
fill-rule="evenodd"
|
|
44
|
-
d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"
|
|
45
|
-
/>
|
|
46
|
-
</svg>
|
|
47
|
-
</button>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<nav
|
|
51
|
-
v-if="navigation"
|
|
52
|
-
class="primary-navigation items-center px-2 pt-2 pb-4 sm:flex gap-4 sm:justify-evenly sm:p-0"
|
|
53
|
-
:class="isOpen ? 'block' : 'hidden'"
|
|
54
|
-
>
|
|
55
|
-
<NavigationElement
|
|
56
|
-
v-for="(item, index) in navigation"
|
|
57
|
-
:key="`${item.title}-${index}`"
|
|
58
|
-
role="menuitem"
|
|
59
|
-
tabindex="-1"
|
|
60
|
-
:="{
|
|
61
|
-
...item,
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
class: `primary-nav-item-${index} ${item.class}`,
|
|
64
|
-
isChild: false,
|
|
65
|
-
elementType: 'header',
|
|
66
|
-
}"
|
|
67
|
-
/>
|
|
68
|
-
</nav>
|
|
69
|
-
</div>
|
|
70
|
-
</header>
|
|
71
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Image } from '../Image/Image'
|
|
2
|
-
import { ContentModule } from '../ContentModule/ContentModule'
|
|
3
|
-
import { Video } from '../Video/Video'
|
|
4
|
-
import { ComponentPassthrough } from '../../types'
|
|
5
|
-
|
|
6
|
-
export interface SplitModule {
|
|
7
|
-
__typename?: 'SplitModule'
|
|
8
|
-
entryTitle?: string
|
|
9
|
-
headline: string
|
|
10
|
-
start?: Image | Video | ContentModule
|
|
11
|
-
center?: Image | Video | ContentModule
|
|
12
|
-
end?: Image | Video | ContentModule
|
|
13
|
-
backgroundImage?: Image
|
|
14
|
-
backgroundColor?: string
|
|
15
|
-
pt?: ComponentPassthrough
|
|
16
|
-
isChild?: boolean
|
|
17
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { SplitModule } from './SplitModule'
|
|
4
|
-
import {
|
|
5
|
-
combinePassthroughs,
|
|
6
|
-
SplitModulePt,
|
|
7
|
-
} from '../../config/defaultPassthrough'
|
|
8
|
-
import { twMerge } from 'tailwind-merge'
|
|
9
|
-
|
|
10
|
-
const props = defineProps<SplitModule>()
|
|
11
|
-
const pt = computed(() => combinePassthroughs(SplitModulePt, props.pt ?? {}))
|
|
12
|
-
|
|
13
|
-
const computedStyle = computed(() => {
|
|
14
|
-
return {
|
|
15
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
16
|
-
'background-image': `url(${props.backgroundImage ?? ''})`,
|
|
17
|
-
'background-size': 'cover',
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
const computedClass = computed(() =>
|
|
21
|
-
// TODO: Add description below or remove if classes fixed
|
|
22
|
-
// @ts-expect-error <add description>
|
|
23
|
-
twMerge(`split-module ${props.isChild ? '' : 'py-16'}`, props.class)
|
|
24
|
-
)
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<template>
|
|
28
|
-
<component
|
|
29
|
-
:is="isChild ? 'div' : 'section'"
|
|
30
|
-
:style="computedStyle"
|
|
31
|
-
:class="computedClass"
|
|
32
|
-
>
|
|
33
|
-
<h2 :class="`headline ${pt?.headline ?? ''}`">{{ headline }}</h2>
|
|
34
|
-
<div
|
|
35
|
-
:class="`split-module-content ${twMerge('flex justify-evenly gap-4 mx-auto items-center', pt?.content ?? '')}`"
|
|
36
|
-
>
|
|
37
|
-
<component
|
|
38
|
-
:is="start.__typename"
|
|
39
|
-
v-if="start"
|
|
40
|
-
v-bind="start"
|
|
41
|
-
:class="`split-module-start ${pt?.start ?? ''}`"
|
|
42
|
-
/>
|
|
43
|
-
<component
|
|
44
|
-
:is="center.__typename"
|
|
45
|
-
v-if="center"
|
|
46
|
-
v-bind="center"
|
|
47
|
-
:class="`split-module-center ${pt?.center ?? ''}`"
|
|
48
|
-
/>
|
|
49
|
-
<component
|
|
50
|
-
:is="end.__typename"
|
|
51
|
-
v-if="end"
|
|
52
|
-
v-bind="end"
|
|
53
|
-
:class="`split-module-end ${pt?.end ?? ''}`"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</component>
|
|
57
|
-
</template>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough } from '../../types'
|
|
2
|
-
import { Image } from '../Image/Image'
|
|
3
|
-
import { Video } from '../Video/Video'
|
|
4
|
-
|
|
5
|
-
export interface TestimonialModulePassthrough extends ComponentPassthrough {
|
|
6
|
-
quote?: string
|
|
7
|
-
author?: string
|
|
8
|
-
details?: string
|
|
9
|
-
media?: string
|
|
10
|
-
text?: string
|
|
11
|
-
}
|
|
12
|
-
export interface TestimonialModule {
|
|
13
|
-
__typename?: 'TestimonialModule'
|
|
14
|
-
headline?: string
|
|
15
|
-
quote: string
|
|
16
|
-
author?: string
|
|
17
|
-
details?: string
|
|
18
|
-
media?: Video | Image
|
|
19
|
-
textColor?: string
|
|
20
|
-
backgroundColor?: string
|
|
21
|
-
pt?: TestimonialModulePassthrough
|
|
22
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { TestimonialModule } from './TestimonialModule'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import {
|
|
5
|
-
combinePassthroughs,
|
|
6
|
-
TestimonialModulePt,
|
|
7
|
-
} from '../../config/defaultPassthrough'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<TestimonialModule>()
|
|
10
|
-
const pt = computed(() =>
|
|
11
|
-
combinePassthroughs(TestimonialModulePt, props.pt ?? {})
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
const computedStyle = computed(() => {
|
|
15
|
-
return {
|
|
16
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
17
|
-
color: props.textColor ?? 'inherit',
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<div class="testimonial p-5" :style="computedStyle">
|
|
24
|
-
<div
|
|
25
|
-
:class="`container mx-auto flex flex-col lg:flex-row gap-8 ${pt?.container ?? ''}`"
|
|
26
|
-
>
|
|
27
|
-
<div v-if="media" :class="`testimonial-media ${pt?.media ?? ''}`">
|
|
28
|
-
<component :is="media.__typename" v-bind="media" />
|
|
29
|
-
</div>
|
|
30
|
-
<div :class="`testimonial-text ${pt?.text ?? ''}`">
|
|
31
|
-
<h3
|
|
32
|
-
v-if="headline"
|
|
33
|
-
:class="`testimonial-headline ${pt?.headline ?? ''}`"
|
|
34
|
-
>
|
|
35
|
-
{{ headline }}
|
|
36
|
-
</h3>
|
|
37
|
-
<p v-if="quote" :class="`testimonial-quote ${pt?.quote ?? ''}`">
|
|
38
|
-
"{{ quote }}"
|
|
39
|
-
</p>
|
|
40
|
-
|
|
41
|
-
<p v-if="author" :class="`testimonial-author ${pt?.author ?? ''}`">
|
|
42
|
-
{{ author }}
|
|
43
|
-
</p>
|
|
44
|
-
|
|
45
|
-
<p v-if="details" :class="`testimonial-details ${pt?.details ?? ''}`">
|
|
46
|
-
{{ details }}
|
|
47
|
-
</p>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</template>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough } from '../../types'
|
|
2
|
-
import { TileContent } from '../TileContent/TileContent'
|
|
3
|
-
|
|
4
|
-
export interface TileCollection {
|
|
5
|
-
__typename?: 'TileCollectionModule'
|
|
6
|
-
headline: string
|
|
7
|
-
description?: string
|
|
8
|
-
modules: TileContent[]
|
|
9
|
-
textColor?: string
|
|
10
|
-
backgroundColor?: string
|
|
11
|
-
variant:
|
|
12
|
-
| 'IconTile'
|
|
13
|
-
| 'ImageTile'
|
|
14
|
-
| 'VideoTile'
|
|
15
|
-
| 'ImageStackedAnimatedTile'
|
|
16
|
-
| 'TextTile'
|
|
17
|
-
pt?: ComponentPassthrough
|
|
18
|
-
}
|