@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,25 +0,0 @@
|
|
|
1
|
-
import { ComponentPassthrough } from '../../types'
|
|
2
|
-
import { Image } from '../Image/Image'
|
|
3
|
-
|
|
4
|
-
export interface AccordionItemPassthrough extends ComponentPassthrough {
|
|
5
|
-
icon?: string
|
|
6
|
-
button?: string
|
|
7
|
-
image?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface AccordionItem {
|
|
11
|
-
__typename?: 'AccordionItem'
|
|
12
|
-
itemNumber?: number
|
|
13
|
-
title?: string
|
|
14
|
-
content?: string
|
|
15
|
-
pt?: AccordionItemPassthrough
|
|
16
|
-
isFirst?: boolean
|
|
17
|
-
isLast?: boolean
|
|
18
|
-
iconActive?: string
|
|
19
|
-
iconDefault?: string
|
|
20
|
-
totalItems?: number
|
|
21
|
-
isListType?: boolean
|
|
22
|
-
openAccordionIndex?: number | null
|
|
23
|
-
toggleAccordion?: (index: number) => void
|
|
24
|
-
Image?: Image
|
|
25
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { type AccordionItem } from './AccordionItem'
|
|
3
|
-
import { computed, ref } from 'vue'
|
|
4
|
-
import {
|
|
5
|
-
combinePassthroughs,
|
|
6
|
-
AccordionItemPt,
|
|
7
|
-
} from '../../config/defaultPassthrough'
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<AccordionItem>(), { totalItems: 4 })
|
|
10
|
-
const pt = computed(() => combinePassthroughs(AccordionItemPt, props.pt ?? {}))
|
|
11
|
-
const showDescription = ref(false)
|
|
12
|
-
|
|
13
|
-
const emit = defineEmits(['toggleAccordion'])
|
|
14
|
-
|
|
15
|
-
const toggleAccordion = (index: number) => {
|
|
16
|
-
emit('toggleAccordion', index)
|
|
17
|
-
}
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template isListType>
|
|
21
|
-
<div
|
|
22
|
-
v-if="isListType"
|
|
23
|
-
:class="{
|
|
24
|
-
[`accordion-item-${itemNumber}`]: true,
|
|
25
|
-
active: showDescription,
|
|
26
|
-
first: isFirst,
|
|
27
|
-
last: isLast,
|
|
28
|
-
}"
|
|
29
|
-
class="accordion-item group"
|
|
30
|
-
>
|
|
31
|
-
<h3
|
|
32
|
-
:id="`accordion-collapse-headline-${itemNumber}`"
|
|
33
|
-
:class="`flex accordion-item-headline ${pt?.headline ?? ''}`"
|
|
34
|
-
>
|
|
35
|
-
<button
|
|
36
|
-
type="button"
|
|
37
|
-
:class="`flex items-center w-full ${pt?.button ?? ''} justify-between`"
|
|
38
|
-
data-accordion-target="#accordion-collapse-body-1"
|
|
39
|
-
:aria-expanded="true"
|
|
40
|
-
:aria-controls="`accordion-collapse-body-${itemNumber}`"
|
|
41
|
-
@click.prevent="showDescription = !showDescription"
|
|
42
|
-
>
|
|
43
|
-
<span>{{ title }}</span>
|
|
44
|
-
<div :class="`${pt?.icon ?? ''}`">
|
|
45
|
-
<i v-show="!showDescription" :class="`pi ${iconDefault}`"></i>
|
|
46
|
-
<i v-show="showDescription" :class="`pi ${iconActive}`"></i>
|
|
47
|
-
</div>
|
|
48
|
-
</button>
|
|
49
|
-
</h3>
|
|
50
|
-
<div
|
|
51
|
-
:id="`accordion-collapse-body-${itemNumber}`"
|
|
52
|
-
:class="`accordion-item-body ${showDescription ? 'show' : 'hidden'} ${pt?.content ?? ''}`"
|
|
53
|
-
:aria-labelledby="`accordion-collapse-heading-${itemNumber}`"
|
|
54
|
-
>
|
|
55
|
-
{{ content }}
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div
|
|
60
|
-
v-else
|
|
61
|
-
:class="{
|
|
62
|
-
[`accordion-item-${itemNumber}`]: true,
|
|
63
|
-
active: openAccordionIndex === itemNumber,
|
|
64
|
-
first: isFirst,
|
|
65
|
-
last: isLast,
|
|
66
|
-
[`accordion-item-width-${Math.floor(100 / props.totalItems)}`]: true,
|
|
67
|
-
}"
|
|
68
|
-
class="accordion-item group"
|
|
69
|
-
>
|
|
70
|
-
<h3
|
|
71
|
-
:id="`accordion-collapse-headline-${itemNumber}`"
|
|
72
|
-
:class="`flex accordion-item-headline ${pt?.headline ?? ''}`"
|
|
73
|
-
>
|
|
74
|
-
<button
|
|
75
|
-
type="button"
|
|
76
|
-
:class="`flex items-center w-full ${pt?.button ?? ''} ${props.isListType ? 'justify-between' : 'justify-center'}`"
|
|
77
|
-
data-accordion-target="#accordion-collapse-body-1"
|
|
78
|
-
:aria-expanded="openAccordionIndex === itemNumber"
|
|
79
|
-
:aria-controls="`accordion-collapse-body-${itemNumber}`"
|
|
80
|
-
@click.prevent="toggleAccordion(itemNumber as number)"
|
|
81
|
-
>
|
|
82
|
-
<span>{{ title }}</span>
|
|
83
|
-
|
|
84
|
-
<div :class="`${pt?.icon ?? ''}`">
|
|
85
|
-
<i
|
|
86
|
-
v-show="openAccordionIndex !== itemNumber"
|
|
87
|
-
:class="`pi ${iconDefault}`"
|
|
88
|
-
></i>
|
|
89
|
-
<i
|
|
90
|
-
v-show="openAccordionIndex === itemNumber"
|
|
91
|
-
:class="`pi ${iconActive}`"
|
|
92
|
-
></i>
|
|
93
|
-
</div>
|
|
94
|
-
</button>
|
|
95
|
-
</h3>
|
|
96
|
-
<div
|
|
97
|
-
:id="`accordion-collapse-body-${itemNumber}`"
|
|
98
|
-
:class="`accordion-item-body ${openAccordionIndex !== itemNumber ? 'hidden' : 'active'} ${pt?.content ?? ''}`"
|
|
99
|
-
:aria-labelledby="`accordion-collapse-heading-${itemNumber}`"
|
|
100
|
-
>
|
|
101
|
-
{{ content }}
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { type AccordionItem } from './AccordionItem'
|
|
3
|
-
import { computed, ref } from 'vue'
|
|
4
|
-
import ImageComponent from '../Image/Image.vue'
|
|
5
|
-
import {
|
|
6
|
-
combinePassthroughs,
|
|
7
|
-
AccordionListItemPt,
|
|
8
|
-
} from '../../config/defaultPassthrough'
|
|
9
|
-
|
|
10
|
-
const props = defineProps<AccordionItem>()
|
|
11
|
-
const pt = computed(() =>
|
|
12
|
-
combinePassthroughs(AccordionListItemPt, props.pt ?? {})
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
const showDescription = ref(false)
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<div
|
|
20
|
-
:class="{
|
|
21
|
-
[`${pt?.root ?? ''}`]: true,
|
|
22
|
-
[`accordion-item-${itemNumber}`]: true,
|
|
23
|
-
active: showDescription,
|
|
24
|
-
first: isFirst,
|
|
25
|
-
last: isLast,
|
|
26
|
-
}"
|
|
27
|
-
class="accordion-item group"
|
|
28
|
-
>
|
|
29
|
-
<div
|
|
30
|
-
:id="`accordion-collapse-headline-${itemNumber}`"
|
|
31
|
-
:class="`flex accordion-item-headline ${pt?.headline ?? ''}`"
|
|
32
|
-
>
|
|
33
|
-
<ImageComponent
|
|
34
|
-
v-if="Image"
|
|
35
|
-
v-bind="Image"
|
|
36
|
-
:class="`${pt?.image ?? ''}`"
|
|
37
|
-
/>
|
|
38
|
-
<button
|
|
39
|
-
type="button"
|
|
40
|
-
:class="`flex items-center justify-between w-full ${pt?.button ?? ''}`"
|
|
41
|
-
data-accordion-target="#accordion-collapse-body-1"
|
|
42
|
-
aria-expanded="true"
|
|
43
|
-
:aria-controls="`accordion-collapse-body-${itemNumber}`"
|
|
44
|
-
@click.prevent="showDescription = !showDescription"
|
|
45
|
-
>
|
|
46
|
-
<span>{{ title }}</span>
|
|
47
|
-
<div :class="pt?.icon">
|
|
48
|
-
<i v-show="!showDescription" :class="`pi pi-chevron-down`"></i>
|
|
49
|
-
<i v-show="showDescription" :class="`pi pi-chevron-up`"></i>
|
|
50
|
-
</div>
|
|
51
|
-
</button>
|
|
52
|
-
</div>
|
|
53
|
-
<div
|
|
54
|
-
:id="`accordion-collapse-body-${itemNumber}`"
|
|
55
|
-
:class="`accordion-item-body ${!showDescription ? 'hidden' : 'active'} ${pt?.content ?? ''}`"
|
|
56
|
-
:aria-labelledby="`accordion-collapse-heading-${itemNumber}`"
|
|
57
|
-
>
|
|
58
|
-
{{ content }}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
@@ -1,75 +0,0 @@
|
|
|
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>
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
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>
|
|
@@ -1,20 +0,0 @@
|
|
|
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,64 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { Carousel as CarouselType } from './CarouselModule'
|
|
3
|
-
import Carousel from 'primevue/carousel'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import {
|
|
6
|
-
combinePassthroughs,
|
|
7
|
-
CarouselModulePt,
|
|
8
|
-
} from '../../config/defaultPassthrough'
|
|
9
|
-
import { twMerge } from 'tailwind-merge'
|
|
10
|
-
|
|
11
|
-
// Still need to figure out how to configure where buttons go
|
|
12
|
-
// as defaults do not match cordblood site.
|
|
13
|
-
|
|
14
|
-
const props = withDefaults(defineProps<CarouselType>(), {
|
|
15
|
-
variant: 'Default',
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const pt = computed(() => combinePassthroughs(CarouselModulePt, props.pt ?? {}))
|
|
19
|
-
|
|
20
|
-
const computedStyle = computed(() => {
|
|
21
|
-
return {
|
|
22
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
23
|
-
'background-image': `url(${props.backgroundImage ?? ''})`,
|
|
24
|
-
'background-size': 'cover',
|
|
25
|
-
color: props.textColor ?? 'inherit',
|
|
26
|
-
}
|
|
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
|
-
)
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<template>
|
|
37
|
-
<Carousel
|
|
38
|
-
:value="modules"
|
|
39
|
-
:num-visible="1"
|
|
40
|
-
:num-scroll="1"
|
|
41
|
-
:style="computedStyle"
|
|
42
|
-
:class="computedClass"
|
|
43
|
-
:pt:item:class="`carousel-item w-full ${pt?.item ?? ''}`"
|
|
44
|
-
>
|
|
45
|
-
<template v-if="headline" #header>
|
|
46
|
-
<h2 :class="`carousel-headline ${pt?.headline ?? ''}`">{{ headline }}</h2>
|
|
47
|
-
</template>
|
|
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
|
-
>
|
|
55
|
-
<component
|
|
56
|
-
v-bind="slotProps.data"
|
|
57
|
-
:is="slotProps.data.__typename"
|
|
58
|
-
:is-child="true"
|
|
59
|
-
/>
|
|
60
|
-
</template>
|
|
61
|
-
<template #footer></template>
|
|
62
|
-
<template #nexticon></template>
|
|
63
|
-
</Carousel>
|
|
64
|
-
</template>
|
|
@@ -1,12 +0,0 @@
|
|
|
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,42 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import { ContainerCollectionModule } from './ContainerCollectionModule'
|
|
4
|
-
import {
|
|
5
|
-
combinePassthroughs,
|
|
6
|
-
ContainerCollectionModulePt,
|
|
7
|
-
} from '../../config/defaultPassthrough'
|
|
8
|
-
|
|
9
|
-
const props = defineProps<ContainerCollectionModule>()
|
|
10
|
-
|
|
11
|
-
const pt = computed(() =>
|
|
12
|
-
combinePassthroughs(ContainerCollectionModulePt, props.pt ?? {})
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
const computedStyle = computed(() => {
|
|
16
|
-
return {
|
|
17
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<section class="container-collection" :style="computedStyle">
|
|
24
|
-
<h2
|
|
25
|
-
v-if="headline"
|
|
26
|
-
:class="`container-collection-headline ${pt?.headline}`"
|
|
27
|
-
>
|
|
28
|
-
{{ headline }}
|
|
29
|
-
</h2>
|
|
30
|
-
<div
|
|
31
|
-
:class="`container-collection-content mx-auto container ${pt?.content}`"
|
|
32
|
-
>
|
|
33
|
-
<component
|
|
34
|
-
:is="subModule.__typename"
|
|
35
|
-
v-for="(subModule, index) in modules"
|
|
36
|
-
v-bind="subModule"
|
|
37
|
-
:key="`${subModule?.__typename}-${index}`"
|
|
38
|
-
:is-child="true"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</section>
|
|
42
|
-
</template>
|
|
@@ -1,69 +0,0 @@
|
|
|
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,113 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ContainerModule as ContainerModuleType } from './ContainerModule'
|
|
3
|
-
import { VariantOptions } from '../../types'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import { twMerge } from 'tailwind-merge'
|
|
6
|
-
import {
|
|
7
|
-
combinePassthroughs,
|
|
8
|
-
ContainerModulePt,
|
|
9
|
-
} from '../../config/defaultPassthrough'
|
|
10
|
-
|
|
11
|
-
const props = withDefaults(defineProps<ContainerModuleType>(), {
|
|
12
|
-
isChild: false,
|
|
13
|
-
variant: 'Centered',
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
const pt = computed(() =>
|
|
17
|
-
combinePassthroughs(ContainerModulePt[props.variant], props.pt ?? {})
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
const isHero = computed(() => {
|
|
21
|
-
return VariantOptions[props.variant] === VariantOptions.Hero
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
const isCentered = computed(() => {
|
|
25
|
-
return VariantOptions[props.variant] === VariantOptions.Centered
|
|
26
|
-
})
|
|
27
|
-
|
|
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
|
-
)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
const computedStyle = computed(() => {
|
|
38
|
-
return {
|
|
39
|
-
'background-color': props.backgroundColor ?? 'transparent',
|
|
40
|
-
color: props.textColor ?? 'inherit',
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<component
|
|
47
|
-
:is="isChild ? 'div' : 'section'"
|
|
48
|
-
:style="computedStyle"
|
|
49
|
-
:class="computedClass"
|
|
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
|
-
/>
|
|
56
|
-
<div
|
|
57
|
-
:class="`container-module-inner relative z-10 ${isHero ? 'container' : ''} ${pt?.inner ?? ''}`"
|
|
58
|
-
>
|
|
59
|
-
<h2
|
|
60
|
-
v-if="headline"
|
|
61
|
-
:class="`container-module-headline ${isCentered ? 'text-center' : ''} ${pt?.headline ?? ''}`"
|
|
62
|
-
>
|
|
63
|
-
{{ headline }}
|
|
64
|
-
</h2>
|
|
65
|
-
|
|
66
|
-
<p
|
|
67
|
-
v-if="subHeadline"
|
|
68
|
-
:class="`container-module-subheadline ${isCentered ? 'text-center' : ''} ${pt?.subheadline ?? ''}`"
|
|
69
|
-
>
|
|
70
|
-
{{ subHeadline }}
|
|
71
|
-
</p>
|
|
72
|
-
|
|
73
|
-
<div
|
|
74
|
-
:class="`container-module-content flex flex-col-reverse md:flex-row gap-5 h-full ${pt?.content ?? ''}`"
|
|
75
|
-
>
|
|
76
|
-
<template v-if="fullWidthContent">
|
|
77
|
-
<div
|
|
78
|
-
:class="`container-module-full-width-content ${pt?.fullWidthContent ?? ''} ${isCentered ? 'mx-auto' : ''}`"
|
|
79
|
-
>
|
|
80
|
-
<template v-if="fullWidthContent.__typename">
|
|
81
|
-
<component
|
|
82
|
-
v-bind="fullWidthContent"
|
|
83
|
-
:is="fullWidthContent.__typename"
|
|
84
|
-
:is-child="true"
|
|
85
|
-
/>
|
|
86
|
-
</template>
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
<template v-else>
|
|
90
|
-
<div
|
|
91
|
-
v-if="start"
|
|
92
|
-
:class="`container-module-start basis-1/2 ${pt?.start ?? ''}`"
|
|
93
|
-
>
|
|
94
|
-
<template v-if="start?.__typename">
|
|
95
|
-
<component
|
|
96
|
-
v-bind="start"
|
|
97
|
-
:is="start.__typename"
|
|
98
|
-
:is-child="true"
|
|
99
|
-
/>
|
|
100
|
-
</template>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<div :class="`container-module-end basis-1/2 ${pt?.end ?? ''}`">
|
|
104
|
-
<template v-if="end?.__typename">
|
|
105
|
-
<component v-bind="end" :is="end.__typename" :is-child="true" />
|
|
106
|
-
</template>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<slot />
|
|
112
|
-
</component>
|
|
113
|
-
</template>
|