@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.
Files changed (181) hide show
  1. package/dist/component-lib.js +6960 -0
  2. package/dist/component-lib.umd.cjs +98 -0
  3. package/dist/style.css +1 -0
  4. package/dist/vite.svg +16 -0
  5. package/package.json +93 -84
  6. package/src/assets/fonts/GT-Walsheim-Bold.woff +0 -0
  7. package/src/assets/fonts/GT-Walsheim-Bold.woff2 +0 -0
  8. package/src/assets/fonts/GT-Walsheim-LC-Bold.woff +0 -0
  9. package/src/assets/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
  10. package/src/assets/fonts/GT-Walsheim-LC-Regular.woff +0 -0
  11. package/src/assets/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
  12. package/src/assets/fonts/GT-Walsheim-Medium.woff +0 -0
  13. package/src/assets/fonts/GT-Walsheim-Medium.woff2 +0 -0
  14. package/src/assets/fonts/GT-Walsheim-Regular.woff +0 -0
  15. package/src/assets/fonts/GT-Walsheim-Regular.woff2 +0 -0
  16. package/src/assets/fonts/fonts.scss +60 -0
  17. package/src/assets/fonts/notosanssc-bold-webfont.woff +0 -0
  18. package/src/assets/fonts/notosanssc-bold-webfont.woff2 +0 -0
  19. package/src/assets/fonts/notosanssc-regular-webfont.woff +0 -0
  20. package/src/assets/fonts/notosanssc-regular-webfont.woff2 +0 -0
  21. package/src/assets/main.css +18 -114
  22. package/src/assets/theme.css +5 -1
  23. package/src/components/{types → Accordion}/Accordion.ts +8 -6
  24. package/src/components/Accordion/Accordion.vue +66 -0
  25. package/src/components/Accordion/AccordionItem.ts +25 -0
  26. package/src/components/Accordion/AccordionItem.vue +104 -0
  27. package/src/components/{AccordionItem.vue → Accordion/AccordionListItem.vue} +22 -14
  28. package/src/components/Accordion/AccordionTileItem.vue +75 -0
  29. package/src/components/CTA/CTA.ts +22 -0
  30. package/src/components/CTA/CTA.vue +65 -0
  31. package/src/components/CarouselModule/CarouselModule.ts +20 -0
  32. package/src/components/{CarouselModule.vue → CarouselModule/CarouselModule.vue} +25 -7
  33. package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +12 -0
  34. package/src/components/{ContainerCollectionModule.vue → ContainerCollectionModule/ContainerCollectionModule.vue} +12 -3
  35. package/src/components/ContainerModule/ContainerModule.ts +69 -0
  36. package/src/components/{ContainerModule.vue → ContainerModule/ContainerModule.vue} +33 -36
  37. package/src/components/ContentModule/ContentModule.ts +31 -0
  38. package/src/components/ContentModule/ContentModule.vue +65 -0
  39. package/src/components/{types → FooterNavigation}/FooterNavigation.ts +3 -2
  40. package/src/components/{FooterNavigation.vue → FooterNavigation/FooterNavigation.vue} +4 -2
  41. package/src/components/Image/Image.vue +17 -0
  42. package/src/components/{types → LogoCollectionModule}/LogoCollectionModule.ts +3 -3
  43. package/src/components/{LogoCollectionModule.vue → LogoCollectionModule/LogoCollectionModule.vue} +13 -3
  44. package/src/components/{types → NavigationElement}/NavigationElement.ts +6 -3
  45. package/src/components/{NavigationElement.vue → NavigationElement/NavigationElement.vue} +18 -9
  46. package/src/components/{types → PrimaryNavigation}/PrimaryNavigation.ts +2 -2
  47. package/src/components/{PrimaryNavigation.vue → PrimaryNavigation/PrimaryNavigation.vue} +7 -4
  48. package/src/components/{types → SplitModule}/SplitModule.ts +6 -5
  49. package/src/components/SplitModule/SplitModule.vue +57 -0
  50. package/src/components/TestimonialModule/TestimonialModule.ts +22 -0
  51. package/src/components/TestimonialModule/TestimonialModule.vue +51 -0
  52. package/src/components/TileCollectionModule/TileCollectionModule.ts +18 -0
  53. package/src/components/TileCollectionModule/TileCollectionModule.vue +58 -0
  54. package/src/components/TileContent/TileContent.ts +60 -0
  55. package/src/components/{TileContent.vue → TileContent/TileContent.vue} +25 -14
  56. package/src/components/TileContent/TileContentIconTile.vue +83 -0
  57. package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +121 -0
  58. package/src/components/TileContent/TileContentImageTile.vue +80 -0
  59. package/src/components/TileContent/TileContentTextTile.vue +63 -0
  60. package/src/components/TileContent/TileContentVideoTile.vue +81 -0
  61. package/src/components/{types → Video}/Video.ts +1 -1
  62. package/src/components/{Video.vue → Video/Video.vue} +1 -1
  63. package/src/config/defaultPassthrough.ts +261 -0
  64. package/src/assets/usercard.jpg +0 -0
  65. package/src/assets/vue.svg +0 -1
  66. package/src/components/Accordion.vue +0 -33
  67. package/src/components/CTA.vue +0 -39
  68. package/src/components/ContentAndImage.vue +0 -34
  69. package/src/components/ContentMediaModule.vue +0 -50
  70. package/src/components/ContentModule.vue +0 -51
  71. package/src/components/IconChevron.vue +0 -107
  72. package/src/components/Image.vue +0 -15
  73. package/src/components/LogoContainerModule.vue +0 -30
  74. package/src/components/SplitModule.vue +0 -42
  75. package/src/components/Testimonial.vue +0 -48
  76. package/src/components/TestimonialModule.vue +0 -48
  77. package/src/components/TileCollection.vue +0 -37
  78. package/src/components/TileCollectionModule.vue +0 -45
  79. package/src/components/types/AccordionItem.ts +0 -19
  80. package/src/components/types/CTA.ts +0 -13
  81. package/src/components/types/CarouselModule.ts +0 -21
  82. package/src/components/types/ContainerCollectionModule.ts +0 -12
  83. package/src/components/types/ContainerModule.ts +0 -35
  84. package/src/components/types/ContentAndImage.ts +0 -14
  85. package/src/components/types/ContentMediaModule.ts +0 -14
  86. package/src/components/types/ContentModule.ts +0 -21
  87. package/src/components/types/LogoContainerModule.ts +0 -12
  88. package/src/components/types/Testimonial.ts +0 -17
  89. package/src/components/types/TileCollection.ts +0 -14
  90. package/src/components/types/TileContent.ts +0 -34
  91. package/src/components/types/index.ts +0 -10
  92. package/src/presets/aura/accordion/index.js +0 -81
  93. package/src/presets/aura/autocomplete/index.js +0 -280
  94. package/src/presets/aura/avatar/index.js +0 -46
  95. package/src/presets/aura/badge/index.js +0 -43
  96. package/src/presets/aura/badgedirective/index.js +0 -49
  97. package/src/presets/aura/blockui/index.js +0 -8
  98. package/src/presets/aura/breadcrumb/index.js +0 -63
  99. package/src/presets/aura/button/index.js +0 -511
  100. package/src/presets/aura/calendar/index.js +0 -702
  101. package/src/presets/aura/card/index.js +0 -53
  102. package/src/presets/aura/carousel/index.js +0 -160
  103. package/src/presets/aura/cascadeselect/index.js +0 -220
  104. package/src/presets/aura/checkbox/index.js +0 -107
  105. package/src/presets/aura/chip/index.js +0 -45
  106. package/src/presets/aura/chips/index.js +0 -126
  107. package/src/presets/aura/colorpicker/index.js +0 -132
  108. package/src/presets/aura/confirmpopup/index.js +0 -111
  109. package/src/presets/aura/contextmenu/index.js +0 -132
  110. package/src/presets/aura/datatable/index.js +0 -1290
  111. package/src/presets/aura/dataview/index.js +0 -40
  112. package/src/presets/aura/deferred/index.js +0 -3
  113. package/src/presets/aura/dialog/index.js +0 -250
  114. package/src/presets/aura/divider/index.js +0 -72
  115. package/src/presets/aura/dock/index.js +0 -97
  116. package/src/presets/aura/dropdown/index.js +0 -297
  117. package/src/presets/aura/fieldset/index.js +0 -95
  118. package/src/presets/aura/fileupload/index.js +0 -175
  119. package/src/presets/aura/floatlabel/index.js +0 -26
  120. package/src/presets/aura/galleria/index.js +0 -353
  121. package/src/presets/aura/global.js +0 -90
  122. package/src/presets/aura/iconfield/index.js +0 -22
  123. package/src/presets/aura/image/index.js +0 -206
  124. package/src/presets/aura/index.js +0 -181
  125. package/src/presets/aura/inlinemessage/index.js +0 -46
  126. package/src/presets/aura/inplace/index.js +0 -27
  127. package/src/presets/aura/inputgroup/index.js +0 -5
  128. package/src/presets/aura/inputgroupaddon/index.js +0 -28
  129. package/src/presets/aura/inputmask/index.js +0 -47
  130. package/src/presets/aura/inputnumber/index.js +0 -293
  131. package/src/presets/aura/inputotp/index.js +0 -69
  132. package/src/presets/aura/inputswitch/index.js +0 -94
  133. package/src/presets/aura/inputtext/index.js +0 -63
  134. package/src/presets/aura/knob/index.js +0 -47
  135. package/src/presets/aura/listbox/index.js +0 -158
  136. package/src/presets/aura/megamenu/index.js +0 -206
  137. package/src/presets/aura/menu/index.js +0 -122
  138. package/src/presets/aura/menubar/index.js +0 -184
  139. package/src/presets/aura/message/index.js +0 -112
  140. package/src/presets/aura/metergroup/index.js +0 -110
  141. package/src/presets/aura/multiselect/index.js +0 -579
  142. package/src/presets/aura/orderlist/index.js +0 -281
  143. package/src/presets/aura/organizationchart/index.js +0 -142
  144. package/src/presets/aura/overlaypanel/index.js +0 -34
  145. package/src/presets/aura/paginator/index.js +0 -566
  146. package/src/presets/aura/panel/index.js +0 -102
  147. package/src/presets/aura/panelmenu/index.js +0 -130
  148. package/src/presets/aura/password/index.js +0 -143
  149. package/src/presets/aura/picklist/index.js +0 -718
  150. package/src/presets/aura/progressbar/index.js +0 -64
  151. package/src/presets/aura/progressspinner/index.js +0 -51
  152. package/src/presets/aura/radiobutton/index.js +0 -121
  153. package/src/presets/aura/rating/index.js +0 -95
  154. package/src/presets/aura/ripple/index.js +0 -6
  155. package/src/presets/aura/scrollpanel/index.js +0 -77
  156. package/src/presets/aura/scrolltop/index.js +0 -45
  157. package/src/presets/aura/selectbutton/index.js +0 -66
  158. package/src/presets/aura/sidebar/index.js +0 -160
  159. package/src/presets/aura/skeleton/index.js +0 -19
  160. package/src/presets/aura/slider/index.js +0 -144
  161. package/src/presets/aura/speeddial/index.js +0 -579
  162. package/src/presets/aura/splitbutton/index.js +0 -1185
  163. package/src/presets/aura/splitter/index.js +0 -71
  164. package/src/presets/aura/stepper/index.js +0 -183
  165. package/src/presets/aura/steps/index.js +0 -117
  166. package/src/presets/aura/tabmenu/index.js +0 -75
  167. package/src/presets/aura/tabview/index.js +0 -162
  168. package/src/presets/aura/tag/index.js +0 -44
  169. package/src/presets/aura/terminal/index.js +0 -60
  170. package/src/presets/aura/textarea/index.js +0 -49
  171. package/src/presets/aura/tieredmenu/index.js +0 -125
  172. package/src/presets/aura/timeline/index.js +0 -114
  173. package/src/presets/aura/toast/index.js +0 -151
  174. package/src/presets/aura/togglebutton/index.js +0 -98
  175. package/src/presets/aura/toolbar/index.js +0 -28
  176. package/src/presets/aura/tooltip/index.js +0 -73
  177. package/src/presets/aura/tree/index.js +0 -294
  178. package/src/presets/aura/treeselect/index.js +0 -404
  179. package/src/presets/aura/treetable/index.js +0 -513
  180. package/src/presets/aura/tristatecheckbox/index.js +0 -121
  181. /package/src/components/{types → Image}/Image.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { type FooterNavigation } from './types/FooterNavigation'
3
- import NavigationElement from './NavigationElement.vue'
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 { ClassOverrides } from '.'
2
- import { Image } from './Image'
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?: ClassOverrides
11
+ pt?: ComponentPassthrough
12
12
  }
@@ -1,8 +1,15 @@
1
1
  <script setup lang="ts">
2
- import { LogoCollectionModule } from './types/LogoCollectionModule'
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 v-for="image in modules" v-bind="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 { ClassOverrides } from '.'
2
- import { URLRef } from '../../types'
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?: ClassOverrides
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 './types/NavigationElement'
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
- <IconChevron
56
+
57
+ <div
50
58
  v-if="!isChild && subNavigation && !(url || isChild)"
51
- class="ps-2 text-xs"
52
- :orientation="showSubNavigation ? 'up' : 'down'"
53
- :bold="true"
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,5 +1,5 @@
1
- import { Image } from './Image'
2
- import { NavigationElement } from './NavigationElement'
1
+ import { Image } from '../Image/Image'
2
+ import { NavigationElement } from '../NavigationElement/NavigationElement'
3
3
 
4
4
  export interface PrimaryNavigation {
5
5
  title?: string
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
- import { PrimaryNavigation } from './types/PrimaryNavigation'
3
- import Image from './Image.vue'
4
- import NavigationElement from './NavigationElement.vue'
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" type="button" class="block">
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 './Image'
2
- import { ContentModule } from './ContentModule'
3
- import { Video } from './Video'
4
- import { ClassOverrides } from '.'
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?: ClassOverrides
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
+ &quot;{{ quote }}&quot;
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 './types/TileContent'
2
+ import { TileContent } from './TileContent'
3
3
  import { computed } from 'vue'
4
4
  import Card from 'primevue/card'
5
- import ImageComponent from './Image.vue'
6
- import VideoComponent from './Video.vue'
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 #content v-if="description || listItems">
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 v-if="Image" v-bind="Image" />
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="CTAs" #footer>
94
- <p v-if="price" :class="`${pt?.price ?? ''}`">
95
- {{ price }}
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 CTAs"
108
+ v-for="(item, index) in ctas"
109
+ :key="`${item?.title}-${index}`"
99
110
  :class="`cta-${index} ${pt?.cta}`"
100
111
  :="item"
101
112
  />