@cooperco/cooper-component-library 0.0.10 → 0.1.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.
- package/dist/component-lib.js +6947 -0
- package/dist/component-lib.umd.cjs +98 -0
- package/package.json +29 -20
- package/src/assets/fonts/GT-Walsheim-Bold.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Bold.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Bold.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Regular.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-Medium.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Medium.woff2 +0 -0
- package/src/assets/fonts/GT-Walsheim-Regular.woff +0 -0
- package/src/assets/fonts/GT-Walsheim-Regular.woff2 +0 -0
- package/src/assets/fonts/fonts.scss +60 -0
- package/src/assets/fonts/notosanssc-bold-webfont.woff +0 -0
- package/src/assets/fonts/notosanssc-bold-webfont.woff2 +0 -0
- package/src/assets/fonts/notosanssc-regular-webfont.woff +0 -0
- package/src/assets/fonts/notosanssc-regular-webfont.woff2 +0 -0
- package/src/assets/main.css +18 -114
- package/src/assets/theme.css +5 -1
- package/src/components/{types → Accordion}/Accordion.ts +8 -6
- package/src/components/Accordion/Accordion.vue +66 -0
- package/src/components/Accordion/AccordionItem.ts +25 -0
- package/src/components/Accordion/AccordionItem.vue +104 -0
- package/src/components/{AccordionItem.vue → Accordion/AccordionListItem.vue} +22 -14
- package/src/components/Accordion/AccordionTileItem.vue +75 -0
- package/src/components/CTA/CTA.ts +22 -0
- package/src/components/CTA/CTA.vue +65 -0
- package/src/components/CarouselModule/CarouselModule.ts +20 -0
- package/src/components/{CarouselModule.vue → CarouselModule/CarouselModule.vue} +25 -7
- package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +12 -0
- package/src/components/{ContainerCollectionModule.vue → ContainerCollectionModule/ContainerCollectionModule.vue} +12 -3
- package/src/components/ContainerModule/ContainerModule.ts +69 -0
- package/src/components/{ContainerModule.vue → ContainerModule/ContainerModule.vue} +33 -36
- package/src/components/ContentModule/ContentModule.ts +31 -0
- package/src/components/ContentModule/ContentModule.vue +65 -0
- package/src/components/{types → FooterNavigation}/FooterNavigation.ts +3 -2
- package/src/components/{FooterNavigation.vue → FooterNavigation/FooterNavigation.vue} +4 -2
- package/src/components/Image/Image.vue +17 -0
- package/src/components/{types → LogoCollectionModule}/LogoCollectionModule.ts +3 -3
- package/src/components/{LogoCollectionModule.vue → LogoCollectionModule/LogoCollectionModule.vue} +13 -3
- package/src/components/{types → NavigationElement}/NavigationElement.ts +6 -3
- package/src/components/{NavigationElement.vue → NavigationElement/NavigationElement.vue} +18 -9
- package/src/components/{types → PrimaryNavigation}/PrimaryNavigation.ts +2 -2
- package/src/components/{PrimaryNavigation.vue → PrimaryNavigation/PrimaryNavigation.vue} +7 -4
- package/src/components/{types → SplitModule}/SplitModule.ts +6 -5
- package/src/components/SplitModule/SplitModule.vue +57 -0
- package/src/components/TestimonialModule/TestimonialModule.ts +22 -0
- package/src/components/TestimonialModule/TestimonialModule.vue +51 -0
- package/src/components/TileCollectionModule/TileCollectionModule.ts +18 -0
- package/src/components/TileCollectionModule/TileCollectionModule.vue +58 -0
- package/src/components/TileContent/TileContent.ts +60 -0
- package/src/components/{TileContent.vue → TileContent/TileContent.vue} +25 -14
- package/src/components/TileContent/TileContentIconTile.vue +83 -0
- package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +121 -0
- package/src/components/TileContent/TileContentImageTile.vue +80 -0
- package/src/components/TileContent/TileContentTextTile.vue +63 -0
- package/src/components/TileContent/TileContentVideoTile.vue +81 -0
- package/src/components/{types → Video}/Video.ts +1 -1
- package/src/components/{Video.vue → Video/Video.vue} +1 -1
- package/src/assets/usercard.jpg +0 -0
- package/src/assets/vue.svg +0 -1
- package/src/components/Accordion.vue +0 -33
- package/src/components/CTA.vue +0 -39
- package/src/components/ContentAndImage.vue +0 -34
- package/src/components/ContentMediaModule.vue +0 -50
- package/src/components/ContentModule.vue +0 -51
- package/src/components/IconChevron.vue +0 -107
- package/src/components/Image.vue +0 -15
- package/src/components/LogoContainerModule.vue +0 -30
- package/src/components/SplitModule.vue +0 -42
- package/src/components/Testimonial.vue +0 -48
- package/src/components/TestimonialModule.vue +0 -48
- package/src/components/TileCollection.vue +0 -37
- package/src/components/TileCollectionModule.vue +0 -45
- package/src/components/types/AccordionItem.ts +0 -19
- package/src/components/types/CTA.ts +0 -13
- package/src/components/types/CarouselModule.ts +0 -21
- package/src/components/types/ContainerCollectionModule.ts +0 -12
- package/src/components/types/ContainerModule.ts +0 -35
- package/src/components/types/ContentAndImage.ts +0 -14
- package/src/components/types/ContentMediaModule.ts +0 -14
- package/src/components/types/ContentModule.ts +0 -21
- package/src/components/types/LogoContainerModule.ts +0 -12
- package/src/components/types/Testimonial.ts +0 -17
- package/src/components/types/TileCollection.ts +0 -14
- package/src/components/types/TileContent.ts +0 -34
- package/src/components/types/index.ts +0 -10
- package/src/presets/aura/accordion/index.js +0 -81
- package/src/presets/aura/autocomplete/index.js +0 -280
- package/src/presets/aura/avatar/index.js +0 -46
- package/src/presets/aura/badge/index.js +0 -43
- package/src/presets/aura/badgedirective/index.js +0 -49
- package/src/presets/aura/blockui/index.js +0 -8
- package/src/presets/aura/breadcrumb/index.js +0 -63
- package/src/presets/aura/button/index.js +0 -511
- package/src/presets/aura/calendar/index.js +0 -702
- package/src/presets/aura/card/index.js +0 -53
- package/src/presets/aura/carousel/index.js +0 -160
- package/src/presets/aura/cascadeselect/index.js +0 -220
- package/src/presets/aura/checkbox/index.js +0 -107
- package/src/presets/aura/chip/index.js +0 -45
- package/src/presets/aura/chips/index.js +0 -126
- package/src/presets/aura/colorpicker/index.js +0 -132
- package/src/presets/aura/confirmpopup/index.js +0 -111
- package/src/presets/aura/contextmenu/index.js +0 -132
- package/src/presets/aura/datatable/index.js +0 -1290
- package/src/presets/aura/dataview/index.js +0 -40
- package/src/presets/aura/deferred/index.js +0 -3
- package/src/presets/aura/dialog/index.js +0 -250
- package/src/presets/aura/divider/index.js +0 -72
- package/src/presets/aura/dock/index.js +0 -97
- package/src/presets/aura/dropdown/index.js +0 -297
- package/src/presets/aura/fieldset/index.js +0 -95
- package/src/presets/aura/fileupload/index.js +0 -175
- package/src/presets/aura/floatlabel/index.js +0 -26
- package/src/presets/aura/galleria/index.js +0 -353
- package/src/presets/aura/global.js +0 -90
- package/src/presets/aura/iconfield/index.js +0 -22
- package/src/presets/aura/image/index.js +0 -206
- package/src/presets/aura/index.js +0 -181
- package/src/presets/aura/inlinemessage/index.js +0 -46
- package/src/presets/aura/inplace/index.js +0 -27
- package/src/presets/aura/inputgroup/index.js +0 -5
- package/src/presets/aura/inputgroupaddon/index.js +0 -28
- package/src/presets/aura/inputmask/index.js +0 -47
- package/src/presets/aura/inputnumber/index.js +0 -293
- package/src/presets/aura/inputotp/index.js +0 -69
- package/src/presets/aura/inputswitch/index.js +0 -94
- package/src/presets/aura/inputtext/index.js +0 -63
- package/src/presets/aura/knob/index.js +0 -47
- package/src/presets/aura/listbox/index.js +0 -158
- package/src/presets/aura/megamenu/index.js +0 -206
- package/src/presets/aura/menu/index.js +0 -122
- package/src/presets/aura/menubar/index.js +0 -184
- package/src/presets/aura/message/index.js +0 -112
- package/src/presets/aura/metergroup/index.js +0 -110
- package/src/presets/aura/multiselect/index.js +0 -579
- package/src/presets/aura/orderlist/index.js +0 -281
- package/src/presets/aura/organizationchart/index.js +0 -142
- package/src/presets/aura/overlaypanel/index.js +0 -34
- package/src/presets/aura/paginator/index.js +0 -566
- package/src/presets/aura/panel/index.js +0 -102
- package/src/presets/aura/panelmenu/index.js +0 -130
- package/src/presets/aura/password/index.js +0 -143
- package/src/presets/aura/picklist/index.js +0 -718
- package/src/presets/aura/progressbar/index.js +0 -64
- package/src/presets/aura/progressspinner/index.js +0 -51
- package/src/presets/aura/radiobutton/index.js +0 -121
- package/src/presets/aura/rating/index.js +0 -95
- package/src/presets/aura/ripple/index.js +0 -6
- package/src/presets/aura/scrollpanel/index.js +0 -77
- package/src/presets/aura/scrolltop/index.js +0 -45
- package/src/presets/aura/selectbutton/index.js +0 -66
- package/src/presets/aura/sidebar/index.js +0 -160
- package/src/presets/aura/skeleton/index.js +0 -19
- package/src/presets/aura/slider/index.js +0 -144
- package/src/presets/aura/speeddial/index.js +0 -579
- package/src/presets/aura/splitbutton/index.js +0 -1185
- package/src/presets/aura/splitter/index.js +0 -71
- package/src/presets/aura/stepper/index.js +0 -183
- package/src/presets/aura/steps/index.js +0 -117
- package/src/presets/aura/tabmenu/index.js +0 -75
- package/src/presets/aura/tabview/index.js +0 -162
- package/src/presets/aura/tag/index.js +0 -44
- package/src/presets/aura/terminal/index.js +0 -60
- package/src/presets/aura/textarea/index.js +0 -49
- package/src/presets/aura/tieredmenu/index.js +0 -125
- package/src/presets/aura/timeline/index.js +0 -114
- package/src/presets/aura/toast/index.js +0 -151
- package/src/presets/aura/togglebutton/index.js +0 -98
- package/src/presets/aura/toolbar/index.js +0 -28
- package/src/presets/aura/tooltip/index.js +0 -73
- package/src/presets/aura/tree/index.js +0 -294
- package/src/presets/aura/treeselect/index.js +0 -404
- package/src/presets/aura/treetable/index.js +0 -513
- package/src/presets/aura/tristatecheckbox/index.js +0 -121
- /package/src/components/{types → Image}/Image.ts +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type AccordionItem } from './AccordionItem'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import ImageComponent from '../Image/Image.vue'
|
|
5
|
+
import {
|
|
6
|
+
combinePassthroughs,
|
|
7
|
+
AccordionTileItemPt,
|
|
8
|
+
} from '../../config/defaultPassthrough'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<AccordionItem>()
|
|
11
|
+
const pt = computed(() =>
|
|
12
|
+
combinePassthroughs(AccordionTileItemPt, props.pt ?? {})
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
const isExpanded = computed(() => {
|
|
16
|
+
return props.openAccordionIndex === props.itemNumber
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits(['toggleAccordion'])
|
|
20
|
+
|
|
21
|
+
const toggleAccordion = (index: number) => {
|
|
22
|
+
emit('toggleAccordion', index)
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div
|
|
28
|
+
:class="{
|
|
29
|
+
[`accordion-item-${itemNumber}`]: true,
|
|
30
|
+
[pt?.root ?? '']: true,
|
|
31
|
+
active: isExpanded,
|
|
32
|
+
first: isFirst,
|
|
33
|
+
last: isLast,
|
|
34
|
+
}"
|
|
35
|
+
class="accordion-item group"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
:id="`accordion-collapse-headline-${itemNumber}`"
|
|
39
|
+
:class="`flex accordion-item-headline ${pt?.headline ?? ''}`"
|
|
40
|
+
>
|
|
41
|
+
<ImageComponent
|
|
42
|
+
v-if="Image"
|
|
43
|
+
v-bind="Image"
|
|
44
|
+
:class="`${pt?.image ?? ''}`"
|
|
45
|
+
/>
|
|
46
|
+
<button
|
|
47
|
+
type="button"
|
|
48
|
+
:class="`flex items-center w-full ${pt?.button ?? ''}`"
|
|
49
|
+
data-accordion-target="#accordion-collapse-body-1"
|
|
50
|
+
aria-expanded="true"
|
|
51
|
+
:aria-controls="`accordion-collapse-body-${itemNumber}`"
|
|
52
|
+
@click.prevent="toggleAccordion(itemNumber as number)"
|
|
53
|
+
>
|
|
54
|
+
<span>{{ title }}</span>
|
|
55
|
+
<div :class="pt?.icon">
|
|
56
|
+
<i
|
|
57
|
+
v-show="openAccordionIndex !== itemNumber"
|
|
58
|
+
:class="`pi pi-plus-circle`"
|
|
59
|
+
></i>
|
|
60
|
+
<i
|
|
61
|
+
v-show="openAccordionIndex === itemNumber"
|
|
62
|
+
:class="`pi pi-times-circle`"
|
|
63
|
+
></i>
|
|
64
|
+
</div>
|
|
65
|
+
</button>
|
|
66
|
+
</div>
|
|
67
|
+
<div
|
|
68
|
+
:id="`accordion-collapse-body-${itemNumber}`"
|
|
69
|
+
:class="`accordion-item-body ${!isExpanded ? 'hidden' : 'active'} ${pt?.content ?? ''}`"
|
|
70
|
+
:aria-labelledby="`accordion-collapse-heading-${itemNumber}`"
|
|
71
|
+
>
|
|
72
|
+
{{ content }}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { URLRef } from '../../types'
|
|
2
|
+
import { Image } from '../Image/Image'
|
|
3
|
+
|
|
4
|
+
export interface CTAPassthrough {
|
|
5
|
+
logo?: string
|
|
6
|
+
title?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CTA {
|
|
10
|
+
__typename?: 'CTA'
|
|
11
|
+
title: string
|
|
12
|
+
url: URLRef
|
|
13
|
+
color: string
|
|
14
|
+
textColor: string
|
|
15
|
+
buttonType: 'fill' | 'outline' | 'link' | 'logo'
|
|
16
|
+
Logo?: Image | string // could be a css class for an icon
|
|
17
|
+
pt?: CTAPassthrough
|
|
18
|
+
ariaLabel: string
|
|
19
|
+
anchor?: string
|
|
20
|
+
target?: string
|
|
21
|
+
class?: string
|
|
22
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { CTA } from './CTA'
|
|
3
|
+
import { CTAOptions } from '../../types'
|
|
4
|
+
import Button from 'primevue/button'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { twMerge } from 'tailwind-merge'
|
|
7
|
+
import { combinePassthroughs, CTAPt } from '../../config/defaultPassthrough'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<CTA>()
|
|
10
|
+
|
|
11
|
+
const pt = computed(() =>
|
|
12
|
+
combinePassthroughs(CTAPt[props.buttonType], props.pt ?? {})
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
const buttonTypeValue = computed(() => {
|
|
16
|
+
return CTAOptions[props?.buttonType]
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const isLink = computed(() => {
|
|
20
|
+
return props.buttonType === 'link' || props.buttonType === 'logo'
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const fullClassname = computed(
|
|
24
|
+
() =>
|
|
25
|
+
`cta ${props.class ?? ''} ${props.buttonType === 'link' || props.buttonType === 'logo' ? 'hover:underline' : ''} flex items-center gap-4`
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const computedStyle = computed(() => {
|
|
29
|
+
return {
|
|
30
|
+
color: props.textColor,
|
|
31
|
+
'background-color':
|
|
32
|
+
buttonTypeValue.value == CTAOptions.fill ? props.color : 'transparent',
|
|
33
|
+
'border-color':
|
|
34
|
+
buttonTypeValue.value != CTAOptions.link &&
|
|
35
|
+
buttonTypeValue.value != CTAOptions.logo
|
|
36
|
+
? props.color
|
|
37
|
+
: 'transparent',
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
// Update to support url vs page
|
|
42
|
+
const url = computed(() => {
|
|
43
|
+
return props?.url?.link
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<Button
|
|
49
|
+
:class="fullClassname"
|
|
50
|
+
:style="computedStyle"
|
|
51
|
+
:aria-label="ariaLabel"
|
|
52
|
+
:link="isLink"
|
|
53
|
+
:href="url"
|
|
54
|
+
>
|
|
55
|
+
<div v-if="Logo" :class="pt?.logo ?? ''">
|
|
56
|
+
<template v-if="typeof Logo !== 'string' && Logo?.__typename">
|
|
57
|
+
<Image v-bind="Logo" />
|
|
58
|
+
</template>
|
|
59
|
+
<template v-else-if="typeof Logo === 'string'">
|
|
60
|
+
<div :class="twMerge(Logo, pt?.logo)"></div>
|
|
61
|
+
</template>
|
|
62
|
+
</div>
|
|
63
|
+
<p :class="twMerge('pointer-events-none', pt?.title ?? '')">{{ title }}</p>
|
|
64
|
+
</Button>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPassthrough } from '../../types'
|
|
2
|
+
import { ContainerModule } from '../ContainerModule/ContainerModule'
|
|
3
|
+
import { TestimonialModule } from '../TestimonialModule/TestimonialModule'
|
|
4
|
+
import { TileContent } from '../TileContent/TileContent'
|
|
5
|
+
|
|
6
|
+
export interface CarouselPassthrough extends ComponentPassthrough {
|
|
7
|
+
item?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Carousel
|
|
11
|
+
export interface Carousel {
|
|
12
|
+
__typename?: 'CarouselModule'
|
|
13
|
+
headline: string
|
|
14
|
+
modules: (TestimonialModule | TileContent | ContainerModule)[]
|
|
15
|
+
textColor?: string
|
|
16
|
+
backgroundColor?: string
|
|
17
|
+
backgroundImage?: string
|
|
18
|
+
pt?: CarouselPassthrough
|
|
19
|
+
variant?: 'Hero' | 'Default'
|
|
20
|
+
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { Carousel as CarouselType } from './
|
|
2
|
+
import { Carousel as CarouselType } from './CarouselModule'
|
|
3
3
|
import Carousel from 'primevue/carousel'
|
|
4
4
|
import { computed } from 'vue'
|
|
5
|
-
|
|
5
|
+
import {
|
|
6
|
+
combinePassthroughs,
|
|
7
|
+
CarouselModulePt,
|
|
8
|
+
} from '../../config/defaultPassthrough'
|
|
9
|
+
import { twMerge } from 'tailwind-merge'
|
|
6
10
|
|
|
7
11
|
// Still need to figure out how to configure where buttons go
|
|
8
12
|
// as defaults do not match cordblood site.
|
|
@@ -11,6 +15,8 @@ const props = withDefaults(defineProps<CarouselType>(), {
|
|
|
11
15
|
variant: 'Default',
|
|
12
16
|
})
|
|
13
17
|
|
|
18
|
+
const pt = computed(() => combinePassthroughs(CarouselModulePt, props.pt ?? {}))
|
|
19
|
+
|
|
14
20
|
const computedStyle = computed(() => {
|
|
15
21
|
return {
|
|
16
22
|
'background-color': props.backgroundColor ?? 'transparent',
|
|
@@ -19,25 +25,37 @@ const computedStyle = computed(() => {
|
|
|
19
25
|
color: props.textColor ?? 'inherit',
|
|
20
26
|
}
|
|
21
27
|
})
|
|
28
|
+
const computedClass = computed(
|
|
29
|
+
() =>
|
|
30
|
+
// TODO: Add description below or remove if classes fixed
|
|
31
|
+
// @ts-expect-error <add description>
|
|
32
|
+
`${twMerge('py-16 px-8', props.class)} ${props.variant.toLowerCase()} carousel`
|
|
33
|
+
)
|
|
22
34
|
</script>
|
|
23
35
|
|
|
24
36
|
<template>
|
|
25
37
|
<Carousel
|
|
26
38
|
:value="modules"
|
|
27
|
-
:
|
|
28
|
-
:
|
|
39
|
+
:num-visible="1"
|
|
40
|
+
:num-scroll="1"
|
|
29
41
|
:style="computedStyle"
|
|
30
|
-
:class="
|
|
42
|
+
:class="computedClass"
|
|
31
43
|
:pt:item:class="`carousel-item w-full ${pt?.item ?? ''}`"
|
|
32
44
|
>
|
|
33
45
|
<template v-if="headline" #header>
|
|
34
46
|
<h2 :class="`carousel-headline ${pt?.headline ?? ''}`">{{ headline }}</h2>
|
|
35
47
|
</template>
|
|
36
|
-
|
|
48
|
+
<!-- eslint-disable -->
|
|
49
|
+
<!-- remove ^^ when valid-v-slot error is fixed -->
|
|
50
|
+
<template
|
|
51
|
+
v-for="(item, index) in modules"
|
|
52
|
+
:key="`${item?.__typename}-${index}`"
|
|
53
|
+
#item="slotProps"
|
|
54
|
+
>
|
|
37
55
|
<component
|
|
38
56
|
v-bind="slotProps.data"
|
|
39
57
|
:is="slotProps.data.__typename"
|
|
40
|
-
:
|
|
58
|
+
:is-child="true"
|
|
41
59
|
/>
|
|
42
60
|
</template>
|
|
43
61
|
<template #footer></template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPassthrough } from '../../types'
|
|
2
|
+
import { ContainerModule } from '../ContainerModule/ContainerModule'
|
|
3
|
+
import { SplitModule } from '../SplitModule/SplitModule'
|
|
4
|
+
|
|
5
|
+
export interface ContainerCollectionModule {
|
|
6
|
+
__typename?: 'ContainerCollection'
|
|
7
|
+
entryTitle?: string
|
|
8
|
+
headline: string
|
|
9
|
+
modules: Array<ContainerModule | SplitModule>
|
|
10
|
+
backgroundColor?: string
|
|
11
|
+
pt?: ComponentPassthrough
|
|
12
|
+
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
-
import { ContainerCollectionModule } from './
|
|
3
|
+
import { ContainerCollectionModule } from './ContainerCollectionModule'
|
|
4
|
+
import {
|
|
5
|
+
combinePassthroughs,
|
|
6
|
+
ContainerCollectionModulePt,
|
|
7
|
+
} from '../../config/defaultPassthrough'
|
|
4
8
|
|
|
5
9
|
const props = defineProps<ContainerCollectionModule>()
|
|
6
10
|
|
|
11
|
+
const pt = computed(() =>
|
|
12
|
+
combinePassthroughs(ContainerCollectionModulePt, props.pt ?? {})
|
|
13
|
+
)
|
|
14
|
+
|
|
7
15
|
const computedStyle = computed(() => {
|
|
8
16
|
return {
|
|
9
17
|
'background-color': props.backgroundColor ?? 'transparent',
|
|
@@ -23,10 +31,11 @@ const computedStyle = computed(() => {
|
|
|
23
31
|
:class="`container-collection-content mx-auto container ${pt?.content}`"
|
|
24
32
|
>
|
|
25
33
|
<component
|
|
26
|
-
v-for="subModule in modules"
|
|
27
34
|
:is="subModule.__typename"
|
|
35
|
+
v-for="(subModule, index) in modules"
|
|
28
36
|
v-bind="subModule"
|
|
29
|
-
:
|
|
37
|
+
:key="`${subModule?.__typename}-${index}`"
|
|
38
|
+
:is-child="true"
|
|
30
39
|
/>
|
|
31
40
|
</div>
|
|
32
41
|
</section>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Image } from '../Image/Image'
|
|
2
|
+
import { Video } from '../Video/Video'
|
|
3
|
+
import { Accordion } from '../Accordion/Accordion'
|
|
4
|
+
import { ContentModule } from '../ContentModule/ContentModule'
|
|
5
|
+
import { TestimonialModule } from '../TestimonialModule/TestimonialModule'
|
|
6
|
+
import { TileCollection } from '../TileCollectionModule/TileCollectionModule'
|
|
7
|
+
import {
|
|
8
|
+
TileContent,
|
|
9
|
+
TileContentIconTile,
|
|
10
|
+
TileContentImageStackedAnimatedTile,
|
|
11
|
+
TileContentImageTile,
|
|
12
|
+
TileContentTextTile,
|
|
13
|
+
TileContentVideoTile,
|
|
14
|
+
} from '../TileContent/TileContent'
|
|
15
|
+
import { ComponentPassthrough } from '../../types'
|
|
16
|
+
|
|
17
|
+
export interface ContainerModulePassthrough extends ComponentPassthrough {
|
|
18
|
+
inner?: string
|
|
19
|
+
fullWidthContent?: string
|
|
20
|
+
}
|
|
21
|
+
export interface ContainerModule {
|
|
22
|
+
__typename?: 'ContainerModule'
|
|
23
|
+
headline: string
|
|
24
|
+
subHeadline?: string
|
|
25
|
+
fullWidthContent?:
|
|
26
|
+
| Image
|
|
27
|
+
| Video
|
|
28
|
+
| ContentModule
|
|
29
|
+
| ContainerModule
|
|
30
|
+
| TileCollection
|
|
31
|
+
| TileContent
|
|
32
|
+
| TileContentImageStackedAnimatedTile
|
|
33
|
+
| TileContentIconTile
|
|
34
|
+
| TileContentTextTile
|
|
35
|
+
| TileContentImageTile
|
|
36
|
+
| TileContentVideoTile
|
|
37
|
+
| Accordion
|
|
38
|
+
start?:
|
|
39
|
+
| Image
|
|
40
|
+
| Video
|
|
41
|
+
| ContentModule
|
|
42
|
+
| TileContent
|
|
43
|
+
| TileContentImageStackedAnimatedTile
|
|
44
|
+
| TileContentIconTile
|
|
45
|
+
| TileContentTextTile
|
|
46
|
+
| TileContentImageTile
|
|
47
|
+
| TileContentVideoTile
|
|
48
|
+
| Accordion
|
|
49
|
+
| TestimonialModule
|
|
50
|
+
end?:
|
|
51
|
+
| Image
|
|
52
|
+
| Video
|
|
53
|
+
| ContentModule
|
|
54
|
+
| TileContent
|
|
55
|
+
| TileContentImageStackedAnimatedTile
|
|
56
|
+
| TileContentIconTile
|
|
57
|
+
| TileContentTextTile
|
|
58
|
+
| TileContentImageTile
|
|
59
|
+
| TileContentVideoTile
|
|
60
|
+
| Accordion
|
|
61
|
+
| TestimonialModule
|
|
62
|
+
textColor?: string
|
|
63
|
+
backgroundColor?: string
|
|
64
|
+
backgroundImage?: string
|
|
65
|
+
variant?: 'Centered' | 'Hero'
|
|
66
|
+
// types only used in code, based on placement from contentful
|
|
67
|
+
isChild?: boolean
|
|
68
|
+
pt?: ContainerModulePassthrough
|
|
69
|
+
}
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ContainerModule as ContainerModuleType } from './
|
|
3
|
-
import { VariantOptions
|
|
2
|
+
import { ContainerModule as ContainerModuleType } from './ContainerModule'
|
|
3
|
+
import { VariantOptions } from '../../types'
|
|
4
4
|
import { computed } from 'vue'
|
|
5
|
+
import { twMerge } from 'tailwind-merge'
|
|
6
|
+
import {
|
|
7
|
+
combinePassthroughs,
|
|
8
|
+
ContainerModulePt,
|
|
9
|
+
} from '../../config/defaultPassthrough'
|
|
5
10
|
|
|
6
11
|
const props = withDefaults(defineProps<ContainerModuleType>(), {
|
|
7
12
|
isChild: false,
|
|
8
13
|
variant: 'Centered',
|
|
9
14
|
})
|
|
10
15
|
|
|
16
|
+
const pt = computed(() =>
|
|
17
|
+
combinePassthroughs(ContainerModulePt[props.variant], props.pt ?? {})
|
|
18
|
+
)
|
|
19
|
+
|
|
11
20
|
const isHero = computed(() => {
|
|
12
21
|
return VariantOptions[props.variant] === VariantOptions.Hero
|
|
13
22
|
})
|
|
@@ -16,25 +25,18 @@ const isCentered = computed(() => {
|
|
|
16
25
|
return VariantOptions[props.variant] === VariantOptions.Centered
|
|
17
26
|
})
|
|
18
27
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const mediaTypeRightValue = computed(() => {
|
|
27
|
-
if (!props?.end?.mediaType) {
|
|
28
|
-
return null
|
|
29
|
-
}
|
|
30
|
-
return MediaOptions[props.end.mediaType]
|
|
28
|
+
const computedClass = computed(() => {
|
|
29
|
+
return twMerge(
|
|
30
|
+
`container-module relative ${pt.value?.root} ${isHero.value || props.isChild ? '' : 'py-16 px-8'}`,
|
|
31
|
+
// TODO: Add description below or remove if classes fixed
|
|
32
|
+
// @ts-expect-error <add description>
|
|
33
|
+
props.class ?? ''
|
|
34
|
+
)
|
|
31
35
|
})
|
|
32
36
|
|
|
33
37
|
const computedStyle = computed(() => {
|
|
34
38
|
return {
|
|
35
39
|
'background-color': props.backgroundColor ?? 'transparent',
|
|
36
|
-
'background-image': `url(${props.backgroundImage ?? ''})`,
|
|
37
|
-
'background-size': 'cover',
|
|
38
40
|
color: props.textColor ?? 'inherit',
|
|
39
41
|
}
|
|
40
42
|
})
|
|
@@ -44,10 +46,15 @@ const computedStyle = computed(() => {
|
|
|
44
46
|
<component
|
|
45
47
|
:is="isChild ? 'div' : 'section'"
|
|
46
48
|
:style="computedStyle"
|
|
47
|
-
class="
|
|
49
|
+
:class="computedClass"
|
|
48
50
|
>
|
|
51
|
+
<Image
|
|
52
|
+
v-if="backgroundImage"
|
|
53
|
+
:media="{ src: backgroundImage }"
|
|
54
|
+
class="md:absolute md:top-0 md:right-0 object-cover w-full h-full z-0"
|
|
55
|
+
/>
|
|
49
56
|
<div
|
|
50
|
-
:class="`container-module-inner
|
|
57
|
+
:class="`container-module-inner relative z-10 ${isHero ? 'container' : ''} ${pt?.inner ?? ''}`"
|
|
51
58
|
>
|
|
52
59
|
<h2
|
|
53
60
|
v-if="headline"
|
|
@@ -64,48 +71,38 @@ const computedStyle = computed(() => {
|
|
|
64
71
|
</p>
|
|
65
72
|
|
|
66
73
|
<div
|
|
67
|
-
:class="`container-module-content flex flex-row gap-5 h-full ${pt?.content ?? ''}`"
|
|
74
|
+
:class="`container-module-content flex flex-col-reverse md:flex-row gap-5 h-full ${pt?.content ?? ''}`"
|
|
68
75
|
>
|
|
69
76
|
<template v-if="fullWidthContent">
|
|
70
77
|
<div
|
|
71
|
-
:class="`container-module ${pt?.fullWidthContent ?? ''} ${isCentered ? 'mx-auto' : ''}`"
|
|
78
|
+
:class="`container-module-full-width-content ${pt?.fullWidthContent ?? ''} ${isCentered ? 'mx-auto' : ''}`"
|
|
72
79
|
>
|
|
73
|
-
<template v-if="fullWidthContent
|
|
74
|
-
<component :is="mediaTypeLeftValue" :="fullWidthContent" />
|
|
75
|
-
</template>
|
|
76
|
-
<template v-else-if="fullWidthContent.__typename">
|
|
80
|
+
<template v-if="fullWidthContent.__typename">
|
|
77
81
|
<component
|
|
78
82
|
v-bind="fullWidthContent"
|
|
79
83
|
:is="fullWidthContent.__typename"
|
|
80
|
-
:
|
|
84
|
+
:is-child="true"
|
|
81
85
|
/>
|
|
82
86
|
</template>
|
|
83
87
|
</div>
|
|
84
88
|
</template>
|
|
85
|
-
|
|
86
89
|
<template v-else>
|
|
87
90
|
<div
|
|
88
91
|
v-if="start"
|
|
89
92
|
:class="`container-module-start basis-1/2 ${pt?.start ?? ''}`"
|
|
90
93
|
>
|
|
91
|
-
<template v-if="start?.
|
|
92
|
-
<component :is="mediaTypeLeftValue" :="start" />
|
|
93
|
-
</template>
|
|
94
|
-
<template v-else-if="start?.__typename">
|
|
94
|
+
<template v-if="start?.__typename">
|
|
95
95
|
<component
|
|
96
96
|
v-bind="start"
|
|
97
97
|
:is="start.__typename"
|
|
98
|
-
:
|
|
98
|
+
:is-child="true"
|
|
99
99
|
/>
|
|
100
100
|
</template>
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
103
|
<div :class="`container-module-end basis-1/2 ${pt?.end ?? ''}`">
|
|
104
|
-
<template v-if="end?.
|
|
105
|
-
<component :is="
|
|
106
|
-
</template>
|
|
107
|
-
<template v-else-if="end?.__typename">
|
|
108
|
-
<component v-bind="end" :is="end.__typename" :isChild="true" />
|
|
104
|
+
<template v-if="end?.__typename">
|
|
105
|
+
<component v-bind="end" :is="end.__typename" :is-child="true" />
|
|
109
106
|
</template>
|
|
110
107
|
</div>
|
|
111
108
|
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { socialMedia } from '../../types'
|
|
2
|
+
import { Image } from '../Image/Image'
|
|
3
|
+
import { NavigationElement } from '../NavigationElement/NavigationElement'
|
|
3
4
|
|
|
4
5
|
export interface FooterNavigation {
|
|
5
6
|
title?: string
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { type FooterNavigation } from './
|
|
3
|
-
import NavigationElement from '
|
|
2
|
+
import { type FooterNavigation } from './FooterNavigation'
|
|
3
|
+
import NavigationElement from '../NavigationElement/NavigationElement.vue'
|
|
4
4
|
import { computed } from 'vue'
|
|
5
5
|
|
|
6
6
|
const props = defineProps<FooterNavigation>()
|
|
@@ -30,6 +30,7 @@ const computedStyle = computed(() => {
|
|
|
30
30
|
>
|
|
31
31
|
<NavigationElement
|
|
32
32
|
v-for="(item, index) in navigation"
|
|
33
|
+
:key="`footer-nav-item-${item.title}-${index}`"
|
|
33
34
|
:class="`footer-nav-item-${index}`"
|
|
34
35
|
role="menuitem"
|
|
35
36
|
tabindex="-1"
|
|
@@ -42,6 +43,7 @@ const computedStyle = computed(() => {
|
|
|
42
43
|
>
|
|
43
44
|
<a
|
|
44
45
|
v-for="(item, index) in socialMediaRef"
|
|
46
|
+
:key="`footer-social-item-${item.icon.altTag}-${index}`"
|
|
45
47
|
:class="`footer-social-item-${index}`"
|
|
46
48
|
:href="item?.url?.link"
|
|
47
49
|
>
|
|
@@ -0,0 +1,17 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Image } from '
|
|
1
|
+
import { ComponentPassthrough } from '../../types'
|
|
2
|
+
import { Image } from '../Image/Image'
|
|
3
3
|
|
|
4
4
|
// Logos
|
|
5
5
|
export interface LogoCollectionModule {
|
|
@@ -8,5 +8,5 @@ export interface LogoCollectionModule {
|
|
|
8
8
|
modules: Image[]
|
|
9
9
|
textColor?: string
|
|
10
10
|
backgroundColor?: string
|
|
11
|
-
pt?:
|
|
11
|
+
pt?: ComponentPassthrough
|
|
12
12
|
}
|