@cooperco/cooper-component-library 0.0.10 → 0.1.1
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 +6960 -0
- package/dist/component-lib.umd.cjs +98 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +16 -0
- package/package.json +93 -84
- 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/config/defaultPassthrough.ts +261 -0
- 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
|
@@ -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
|
}
|
package/src/components/{LogoCollectionModule.vue → LogoCollectionModule/LogoCollectionModule.vue}
RENAMED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { LogoCollectionModule } from './
|
|
2
|
+
import { LogoCollectionModule } from './LogoCollectionModule'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
+
import {
|
|
5
|
+
combinePassthroughs,
|
|
6
|
+
LogoCollectionModulePt,
|
|
7
|
+
} from '../../config/defaultPassthrough'
|
|
4
8
|
|
|
5
9
|
const props = defineProps<LogoCollectionModule>()
|
|
10
|
+
const pt = computed(() =>
|
|
11
|
+
combinePassthroughs(LogoCollectionModulePt, props.pt ?? {})
|
|
12
|
+
)
|
|
6
13
|
|
|
7
14
|
const computedStyle = computed(() => {
|
|
8
15
|
return {
|
|
@@ -22,9 +29,12 @@ const computedStyle = computed(() => {
|
|
|
22
29
|
v-if="modules"
|
|
23
30
|
:class="`logo-module-content flex flex-wrap justify-evenly gap-2 ${pt?.content ?? ''}`"
|
|
24
31
|
>
|
|
25
|
-
<Image
|
|
32
|
+
<Image
|
|
33
|
+
v-for="(image, index) in modules"
|
|
34
|
+
v-bind="image"
|
|
35
|
+
:key="`cta-${image.altTag}-${index}`"
|
|
36
|
+
/>
|
|
26
37
|
</div>
|
|
27
38
|
</div>
|
|
28
39
|
</section>
|
|
29
40
|
</template>
|
|
30
|
-
./types/LogoCollectionModule
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentPassthrough, URLRef } from '../../types'
|
|
2
|
+
|
|
3
|
+
export interface NavigationElementPt extends ComponentPassthrough {
|
|
4
|
+
icon?: string
|
|
5
|
+
}
|
|
3
6
|
|
|
4
7
|
export interface NavigationElement {
|
|
5
8
|
elementType?: 'header' | 'footer'
|
|
@@ -9,7 +12,7 @@ export interface NavigationElement {
|
|
|
9
12
|
subNavigation?: NavigationElement[]
|
|
10
13
|
// types only used in code, based on placement from contentful
|
|
11
14
|
isChild?: boolean
|
|
12
|
-
pt?:
|
|
15
|
+
pt?: NavigationElementPt
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
// Navigation
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
NavigationElement as NavigationElementT,
|
|
4
4
|
NavigationElementType,
|
|
5
|
-
} from './
|
|
5
|
+
} from './NavigationElement'
|
|
6
6
|
import { computed, ref } from 'vue'
|
|
7
|
-
import IconChevron from './IconChevron.vue'
|
|
8
7
|
import { RouterLink } from 'vue-router'
|
|
8
|
+
import {
|
|
9
|
+
combinePassthroughs,
|
|
10
|
+
NavigationElementPt,
|
|
11
|
+
} from '../../config/defaultPassthrough'
|
|
9
12
|
|
|
10
13
|
const props = defineProps<NavigationElementT>()
|
|
14
|
+
const pt = computed(() =>
|
|
15
|
+
combinePassthroughs(NavigationElementPt, props.pt ?? {})
|
|
16
|
+
)
|
|
11
17
|
|
|
12
18
|
// Update to support url vs page
|
|
13
19
|
const url = computed(() => {
|
|
@@ -18,12 +24,13 @@ const url = computed(() => {
|
|
|
18
24
|
})
|
|
19
25
|
|
|
20
26
|
const elementTypeValue = computed(() => {
|
|
21
|
-
console.log(props.title, props.isChild)
|
|
22
27
|
return NavigationElementType[props.elementType ?? 'header']
|
|
23
28
|
})
|
|
24
29
|
const showSubNavigation = ref(false)
|
|
25
30
|
const builtClassname = computed(
|
|
26
31
|
() =>
|
|
32
|
+
// TODO: Add description below or remove if classes fixed
|
|
33
|
+
// @ts-expect-error <add description>
|
|
27
34
|
`relative m-0 ${props.class ?? ''} ${props.isChild ? 'sub-' : ''}navigation-element`
|
|
28
35
|
)
|
|
29
36
|
</script>
|
|
@@ -31,11 +38,11 @@ const builtClassname = computed(
|
|
|
31
38
|
<template>
|
|
32
39
|
<component :is="isChild ? 'li' : 'div'" :class="builtClassname">
|
|
33
40
|
<component
|
|
41
|
+
:is="url || isChild ? RouterLink : 'button'"
|
|
34
42
|
v-if="
|
|
35
43
|
elementTypeValue === NavigationElementType.header ||
|
|
36
44
|
(isChild && (url || subNavigation))
|
|
37
45
|
"
|
|
38
|
-
:is="url || isChild ? RouterLink : 'button'"
|
|
39
46
|
:to="url"
|
|
40
47
|
class="flex items-center hover:underline"
|
|
41
48
|
:class="{
|
|
@@ -46,12 +53,14 @@ const builtClassname = computed(
|
|
|
46
53
|
@click.prevent="showSubNavigation = !showSubNavigation"
|
|
47
54
|
>
|
|
48
55
|
{{ title }}
|
|
49
|
-
|
|
56
|
+
|
|
57
|
+
<div
|
|
50
58
|
v-if="!isChild && subNavigation && !(url || isChild)"
|
|
51
|
-
class="
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
|
|
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>
|
|
55
64
|
</component>
|
|
56
65
|
<h2
|
|
57
66
|
v-else-if="elementTypeValue == NavigationElementType.footer"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { PrimaryNavigation } from './
|
|
3
|
-
import Image from '
|
|
4
|
-
import NavigationElement from '
|
|
2
|
+
import { PrimaryNavigation } from './PrimaryNavigation'
|
|
3
|
+
import Image from '../Image/Image.vue'
|
|
4
|
+
import NavigationElement from '../NavigationElement/NavigationElement.vue'
|
|
5
5
|
import { ref, computed } from 'vue'
|
|
6
6
|
|
|
7
7
|
const props = defineProps<PrimaryNavigation>()
|
|
@@ -22,13 +22,14 @@ const computedStyle = computed(() => {
|
|
|
22
22
|
<div class="container sm:flex sm:justify-between sm:items-center mx-auto">
|
|
23
23
|
<div class="flex items-center justify-between py-3 sm:p-0">
|
|
24
24
|
<a
|
|
25
|
+
v-if="logo"
|
|
25
26
|
href="/"
|
|
26
27
|
class="primary-navigation-logo flex items-center h-12 sm:h-16 ps-5"
|
|
27
28
|
>
|
|
28
29
|
<Image v-bind="logo" />
|
|
29
30
|
</a>
|
|
30
31
|
<div class="sm:hidden">
|
|
31
|
-
<button @click="isOpen = !isOpen"
|
|
32
|
+
<button type="button" class="block" @click="isOpen = !isOpen">
|
|
32
33
|
<svg class="h-6 w-6 fill-current" viewBox="0 0 24 24">
|
|
33
34
|
<!-- Hamburger SVG path-->
|
|
34
35
|
<path
|
|
@@ -53,10 +54,12 @@ const computedStyle = computed(() => {
|
|
|
53
54
|
>
|
|
54
55
|
<NavigationElement
|
|
55
56
|
v-for="(item, index) in navigation"
|
|
57
|
+
:key="`${item.title}-${index}`"
|
|
56
58
|
role="menuitem"
|
|
57
59
|
tabindex="-1"
|
|
58
60
|
:="{
|
|
59
61
|
...item,
|
|
62
|
+
// @ts-ignore
|
|
60
63
|
class: `primary-nav-item-${index} ${item.class}`,
|
|
61
64
|
isChild: false,
|
|
62
65
|
elementType: 'header',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Image } from '
|
|
2
|
-
import { ContentModule } from '
|
|
3
|
-
import { Video } from '
|
|
4
|
-
import {
|
|
1
|
+
import { Image } from '../Image/Image'
|
|
2
|
+
import { ContentModule } from '../ContentModule/ContentModule'
|
|
3
|
+
import { Video } from '../Video/Video'
|
|
4
|
+
import { ComponentPassthrough } from '../../types'
|
|
5
5
|
|
|
6
6
|
export interface SplitModule {
|
|
7
7
|
__typename?: 'SplitModule'
|
|
@@ -12,5 +12,6 @@ export interface SplitModule {
|
|
|
12
12
|
end?: Image | Video | ContentModule
|
|
13
13
|
backgroundImage?: Image
|
|
14
14
|
backgroundColor?: string
|
|
15
|
-
pt?:
|
|
15
|
+
pt?: ComponentPassthrough
|
|
16
|
+
isChild?: boolean
|
|
16
17
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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>
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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>
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { TileCollection } from './TileCollectionModule'
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { twMerge } from 'tailwind-merge'
|
|
5
|
+
import {
|
|
6
|
+
combinePassthroughs,
|
|
7
|
+
TileCollectionModulePt,
|
|
8
|
+
} from '../../config/defaultPassthrough'
|
|
9
|
+
|
|
10
|
+
const props = defineProps<TileCollection>()
|
|
11
|
+
const pt = computed(() =>
|
|
12
|
+
combinePassthroughs(TileCollectionModulePt, props.pt ?? {})
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
const computedStyle = computed(() => {
|
|
16
|
+
return {
|
|
17
|
+
'background-color': props.backgroundColor ?? 'transparent',
|
|
18
|
+
color: props.textColor ?? 'inherit',
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<section
|
|
25
|
+
:class="`tile-collection overflow-hidden ${pt?.root ?? ''} py-16 ${variant}`"
|
|
26
|
+
:style="computedStyle"
|
|
27
|
+
>
|
|
28
|
+
<div :class="`container mx-auto ${pt?.container ?? ''}`">
|
|
29
|
+
<h2
|
|
30
|
+
v-if="headline"
|
|
31
|
+
:class="`tile-collection-headline ${pt?.headline ?? ''}`"
|
|
32
|
+
>
|
|
33
|
+
{{ headline }}
|
|
34
|
+
</h2>
|
|
35
|
+
<h3
|
|
36
|
+
v-if="description"
|
|
37
|
+
:class="`tile-collection-description ${pt?.description ?? ''}`"
|
|
38
|
+
>
|
|
39
|
+
{{ description }}
|
|
40
|
+
</h3>
|
|
41
|
+
<ul
|
|
42
|
+
v-if="modules"
|
|
43
|
+
:class="`tile-collection-content ${twMerge(`flex flex-col ${variant !== 'ImageStackedAnimatedTile' ? 'md:flex-row flex-wrap gap-12 md:gap-6' : 'gap-12'} justify-center`, pt?.content ?? '')}`"
|
|
44
|
+
>
|
|
45
|
+
<!-- TODO: Fix suppressed ts error "${(item as any).class}" -->
|
|
46
|
+
<component
|
|
47
|
+
:is="`TileContent${variant}`"
|
|
48
|
+
v-for="(item, index) in modules"
|
|
49
|
+
:key="`${item?.headline}-${index}`"
|
|
50
|
+
:class="`tile-collection-content-item-${index} ${pt?.item ?? ''} ${(item as any).class}`"
|
|
51
|
+
v-bind="item"
|
|
52
|
+
:index="index"
|
|
53
|
+
/>
|
|
54
|
+
</ul>
|
|
55
|
+
<!-- TODO: need to add the CTA -->
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ComponentPassthrough } from '../../types'
|
|
2
|
+
import { CardLabel } from '../../types'
|
|
3
|
+
import { CTA } from '../CTA/CTA'
|
|
4
|
+
import { Image } from '../Image/Image'
|
|
5
|
+
import { Video } from '../Video/Video'
|
|
6
|
+
|
|
7
|
+
export interface TileContentPassthrough extends ComponentPassthrough {
|
|
8
|
+
media?: string
|
|
9
|
+
mediaContainer?: string
|
|
10
|
+
ctas?: string
|
|
11
|
+
label?: string
|
|
12
|
+
numericLabel?: string
|
|
13
|
+
cta?: string
|
|
14
|
+
body?: string
|
|
15
|
+
text?: string
|
|
16
|
+
list?: string
|
|
17
|
+
listItem?: string
|
|
18
|
+
footer?: string
|
|
19
|
+
footerContent?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TileContent {
|
|
23
|
+
__typename?: 'TileContent'
|
|
24
|
+
index?: number
|
|
25
|
+
Image?: Image
|
|
26
|
+
Video?: Video
|
|
27
|
+
headline?: string
|
|
28
|
+
subheadline?: string
|
|
29
|
+
description?: string
|
|
30
|
+
ctas?: CTA[]
|
|
31
|
+
textColor?: string
|
|
32
|
+
backgroundColor?: string
|
|
33
|
+
cardLabel?: CardLabel
|
|
34
|
+
alignment?: 'left' | 'center' | 'right'
|
|
35
|
+
isImageStacked?: boolean
|
|
36
|
+
pt?: TileContentPassthrough
|
|
37
|
+
listItems?: string[]
|
|
38
|
+
footer?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface TileContentTextTile extends Omit<TileContent, '__typename'> {
|
|
42
|
+
__typename?: 'TileContentTextTile'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface TileContentIconTile extends Omit<TileContent, '__typename'> {
|
|
46
|
+
__typename?: 'TileContentIconTile'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface TileContentImageTile extends Omit<TileContent, '__typename'> {
|
|
50
|
+
__typename?: 'TileContentImageTile'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface TileContentVideoTile extends Omit<TileContent, '__typename'> {
|
|
54
|
+
__typename?: 'TileContentVideoTile'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface TileContentImageStackedAnimatedTile
|
|
58
|
+
extends Omit<TileContent, '__typename'> {
|
|
59
|
+
__typename?: 'TileContentImageStackedAnimatedTile'
|
|
60
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { TileContent } from './
|
|
2
|
+
import { TileContent } from './TileContent'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
4
|
import Card from 'primevue/card'
|
|
5
|
-
import ImageComponent from '
|
|
6
|
-
import VideoComponent from '
|
|
5
|
+
import ImageComponent from '../Image/Image.vue'
|
|
6
|
+
import VideoComponent from '../Video/Video.vue'
|
|
7
|
+
import { twMerge } from 'tailwind-merge'
|
|
8
|
+
import {
|
|
9
|
+
combinePassthroughs,
|
|
10
|
+
TileContentPt,
|
|
11
|
+
} from '../../config/defaultPassthrough'
|
|
7
12
|
|
|
8
13
|
const props = defineProps<TileContent>()
|
|
14
|
+
const pt = computed(() => combinePassthroughs(TileContentPt, props.pt ?? {}))
|
|
9
15
|
|
|
10
16
|
const computedStyle = computed(() => {
|
|
11
17
|
return {
|
|
@@ -24,10 +30,7 @@ const computedCardLabelStyle = computed(() => {
|
|
|
24
30
|
</script>
|
|
25
31
|
|
|
26
32
|
<template>
|
|
27
|
-
<div
|
|
28
|
-
class="tile-content relative text-center list-none p-5 flex-auto rounded overflow-visible mx-auto shadow-none"
|
|
29
|
-
:style="computedStyle"
|
|
30
|
-
>
|
|
33
|
+
<div :class="`tile-content ${pt?.root ?? ''}`" :style="computedStyle">
|
|
31
34
|
<div
|
|
32
35
|
v-if="cardLabel && !isImageStacked"
|
|
33
36
|
:style="computedCardLabelStyle"
|
|
@@ -41,7 +44,7 @@ const computedCardLabelStyle = computed(() => {
|
|
|
41
44
|
:pt:footer:class="`tile-content-ctas ${pt?.ctas ?? ''}`"
|
|
42
45
|
:pt:body:class="pt?.body ?? ''"
|
|
43
46
|
>
|
|
44
|
-
<template
|
|
47
|
+
<template v-if="description || listItems" #content>
|
|
45
48
|
<div :class="`flex flex-col tile-content-inner ${pt?.content ?? ''}`">
|
|
46
49
|
<div v-if="isImageStacked" class="tile-content-text">
|
|
47
50
|
<h3
|
|
@@ -78,24 +81,32 @@ const computedCardLabelStyle = computed(() => {
|
|
|
78
81
|
{{ cardLabel.content }}
|
|
79
82
|
</div>
|
|
80
83
|
<div class="tile-content-media-background"></div>
|
|
81
|
-
<ImageComponent
|
|
84
|
+
<ImageComponent
|
|
85
|
+
v-if="Image"
|
|
86
|
+
v-bind="Image"
|
|
87
|
+
:class="
|
|
88
|
+
// @ts-ignore
|
|
89
|
+
twMerge('w-full', Image.class)
|
|
90
|
+
"
|
|
91
|
+
/>
|
|
82
92
|
<VideoComponent v-if="Video" v-bind="Video" />
|
|
83
93
|
</div>
|
|
84
94
|
<p
|
|
85
|
-
:class="`tile-content-description ${pt?.description ?? ''}`"
|
|
86
95
|
v-if="!isImageStacked"
|
|
96
|
+
:class="`tile-content-description ${pt?.description ?? ''}`"
|
|
87
97
|
>
|
|
88
98
|
{{ description }}
|
|
89
99
|
</p>
|
|
90
100
|
</div>
|
|
91
101
|
</template>
|
|
92
102
|
|
|
93
|
-
<template v-if="
|
|
94
|
-
<p v-if="
|
|
95
|
-
{{
|
|
103
|
+
<template v-if="ctas || footer" #footer>
|
|
104
|
+
<p v-if="footer" :class="`${pt?.footer ?? ''}`">
|
|
105
|
+
{{ footer }}
|
|
96
106
|
</p>
|
|
97
107
|
<CTA
|
|
98
|
-
v-for="(item, index) in
|
|
108
|
+
v-for="(item, index) in ctas"
|
|
109
|
+
:key="`${item?.title}-${index}`"
|
|
99
110
|
:class="`cta-${index} ${pt?.cta}`"
|
|
100
111
|
:="item"
|
|
101
112
|
/>
|