@cooperco/cooper-component-library 0.1.1 → 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.
Files changed (117) hide show
  1. package/dist/{component-lib.js → lib/component-lib.js} +1924 -1488
  2. package/dist/lib/component-lib.umd.cjs +98 -0
  3. package/{src/assets → dist/lib/css}/main.css +3 -2
  4. package/dist/lib/style.css +1 -0
  5. package/dist/types/App.vue.d.ts +2 -0
  6. package/dist/types/components/Accordion/Accordion.d.ts +17 -0
  7. package/dist/types/components/Accordion/Accordion.vue.d.ts +29 -0
  8. package/dist/types/components/Accordion/AccordionItem.d.ts +23 -0
  9. package/dist/types/components/Accordion/AccordionItem.vue.d.ts +30 -0
  10. package/dist/types/components/Accordion/AccordionListItem.vue.d.ts +12 -0
  11. package/dist/types/components/Accordion/AccordionTileItem.vue.d.ts +16 -0
  12. package/dist/types/components/CTA/CTA.d.ts +19 -0
  13. package/dist/types/components/CTA/CTA.vue.d.ts +12 -0
  14. package/dist/types/components/CarouselModule/CarouselModule.d.ts +24 -0
  15. package/dist/types/components/CarouselModule/CarouselModule.vue.d.ts +26 -0
  16. package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.d.ts +11 -0
  17. package/dist/types/components/ContainerCollectionModule/ContainerCollectionModule.vue.d.ts +12 -0
  18. package/dist/types/components/ContainerModule/ContainerModule.d.ts +26 -0
  19. package/dist/types/components/ContainerModule/ContainerModule.vue.d.ts +36 -0
  20. package/dist/types/components/ContentModule/ContentModule.d.ts +28 -0
  21. package/dist/types/components/ContentModule/ContentModule.vue.d.ts +29 -0
  22. package/dist/types/components/FooterNavigation/FooterNavigation.d.ts +12 -0
  23. package/dist/types/components/FooterNavigation/FooterNavigation.vue.d.ts +12 -0
  24. package/dist/types/components/Image/Image.d.ts +13 -0
  25. package/dist/types/components/Image/Image.vue.d.ts +26 -0
  26. package/dist/types/components/LogoCollectionModule/LogoCollectionModule.d.ts +10 -0
  27. package/dist/types/components/LogoCollectionModule/LogoCollectionModule.vue.d.ts +12 -0
  28. package/dist/types/components/NavigationElement/NavigationElement.d.ts +17 -0
  29. package/dist/types/components/NavigationElement/NavigationElement.vue.d.ts +12 -0
  30. package/dist/types/components/PrimaryNavigation/PrimaryNavigation.d.ts +11 -0
  31. package/dist/types/components/PrimaryNavigation/PrimaryNavigation.vue.d.ts +12 -0
  32. package/dist/types/components/SplitModule/SplitModule.d.ts +16 -0
  33. package/dist/types/components/SplitModule/SplitModule.vue.d.ts +12 -0
  34. package/dist/types/components/TestimonialModule/TestimonialModule.d.ts +21 -0
  35. package/dist/types/components/TestimonialModule/TestimonialModule.vue.d.ts +12 -0
  36. package/dist/types/components/TileCollectionModule/TileCollectionModule.d.ts +14 -0
  37. package/dist/types/components/TileCollectionModule/TileCollectionModule.vue.d.ts +12 -0
  38. package/dist/types/components/TileContent/TileContent.d.ts +53 -0
  39. package/dist/types/components/TileContent/TileContentIconTile.vue.d.ts +12 -0
  40. package/dist/types/components/TileContent/TileContentImageStackedAnimatedTile.vue.d.ts +12 -0
  41. package/dist/types/components/TileContent/TileContentImageTile.vue.d.ts +12 -0
  42. package/dist/types/components/TileContent/TileContentTextTile.vue.d.ts +12 -0
  43. package/dist/types/components/TileContent/TileContentVideoTile.vue.d.ts +12 -0
  44. package/dist/types/components/TileLabel/TileLabel.d.ts +13 -0
  45. package/dist/types/components/TileLabel/TileLabel.vue.d.ts +29 -0
  46. package/dist/types/components/Video/Video.d.ts +8 -0
  47. package/dist/types/components/Video/Video.vue.d.ts +26 -0
  48. package/dist/types/components/components.d.ts +23 -0
  49. package/dist/types/components/types.d.ts +16 -0
  50. package/dist/types/config/defaultPassthrough.d.ts +96 -0
  51. package/dist/types/index.d.ts +8 -0
  52. package/dist/types/init.d.ts +3 -0
  53. package/dist/types/pages/index.vue.d.ts +2 -0
  54. package/dist/types/router.d.ts +5 -0
  55. package/dist/types/types.d.ts +49 -0
  56. package/package.json +21 -18
  57. package/dist/component-lib.umd.cjs +0 -98
  58. package/dist/style.css +0 -1
  59. package/src/components/Accordion/Accordion.ts +0 -20
  60. package/src/components/Accordion/Accordion.vue +0 -66
  61. package/src/components/Accordion/AccordionItem.ts +0 -25
  62. package/src/components/Accordion/AccordionItem.vue +0 -104
  63. package/src/components/Accordion/AccordionListItem.vue +0 -61
  64. package/src/components/Accordion/AccordionTileItem.vue +0 -75
  65. package/src/components/CTA/CTA.ts +0 -22
  66. package/src/components/CTA/CTA.vue +0 -65
  67. package/src/components/CarouselModule/CarouselModule.ts +0 -20
  68. package/src/components/CarouselModule/CarouselModule.vue +0 -64
  69. package/src/components/ContainerCollectionModule/ContainerCollectionModule.ts +0 -12
  70. package/src/components/ContainerCollectionModule/ContainerCollectionModule.vue +0 -42
  71. package/src/components/ContainerModule/ContainerModule.ts +0 -69
  72. package/src/components/ContainerModule/ContainerModule.vue +0 -113
  73. package/src/components/ContentModule/ContentModule.ts +0 -31
  74. package/src/components/ContentModule/ContentModule.vue +0 -65
  75. package/src/components/FooterNavigation/FooterNavigation.ts +0 -13
  76. package/src/components/FooterNavigation/FooterNavigation.vue +0 -59
  77. package/src/components/Image/Image.ts +0 -12
  78. package/src/components/Image/Image.vue +0 -17
  79. package/src/components/LogoCollectionModule/LogoCollectionModule.ts +0 -12
  80. package/src/components/LogoCollectionModule/LogoCollectionModule.vue +0 -40
  81. package/src/components/NavigationElement/NavigationElement.ts +0 -22
  82. package/src/components/NavigationElement/NavigationElement.vue +0 -101
  83. package/src/components/PrimaryNavigation/PrimaryNavigation.ts +0 -10
  84. package/src/components/PrimaryNavigation/PrimaryNavigation.vue +0 -71
  85. package/src/components/SplitModule/SplitModule.ts +0 -17
  86. package/src/components/SplitModule/SplitModule.vue +0 -57
  87. package/src/components/TestimonialModule/TestimonialModule.ts +0 -22
  88. package/src/components/TestimonialModule/TestimonialModule.vue +0 -51
  89. package/src/components/TileCollectionModule/TileCollectionModule.ts +0 -18
  90. package/src/components/TileCollectionModule/TileCollectionModule.vue +0 -58
  91. package/src/components/TileContent/TileContent.ts +0 -60
  92. package/src/components/TileContent/TileContent.vue +0 -116
  93. package/src/components/TileContent/TileContentIconTile.vue +0 -83
  94. package/src/components/TileContent/TileContentImageStackedAnimatedTile.vue +0 -121
  95. package/src/components/TileContent/TileContentImageTile.vue +0 -80
  96. package/src/components/TileContent/TileContentTextTile.vue +0 -63
  97. package/src/components/TileContent/TileContentVideoTile.vue +0 -81
  98. package/src/components/Video/Video.ts +0 -8
  99. package/src/components/Video/Video.vue +0 -18
  100. package/src/config/defaultPassthrough.ts +0 -261
  101. /package/{src/assets → dist/lib/css}/theme.css +0 -0
  102. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Bold.woff +0 -0
  103. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Bold.woff2 +0 -0
  104. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Bold.woff +0 -0
  105. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Bold.woff2 +0 -0
  106. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Regular.woff +0 -0
  107. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-LC-Regular.woff2 +0 -0
  108. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Medium.woff +0 -0
  109. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Medium.woff2 +0 -0
  110. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Regular.woff +0 -0
  111. /package/{src/assets → dist/lib}/fonts/GT-Walsheim-Regular.woff2 +0 -0
  112. /package/{src/assets → dist/lib}/fonts/fonts.scss +0 -0
  113. /package/{src/assets → dist/lib}/fonts/notosanssc-bold-webfont.woff +0 -0
  114. /package/{src/assets → dist/lib}/fonts/notosanssc-bold-webfont.woff2 +0 -0
  115. /package/{src/assets → dist/lib}/fonts/notosanssc-regular-webfont.woff +0 -0
  116. /package/{src/assets → dist/lib}/fonts/notosanssc-regular-webfont.woff2 +0 -0
  117. /package/dist/{vite.svg → lib/vite.svg} +0 -0
@@ -1,66 +0,0 @@
1
- <script setup lang="ts">
2
- // Can potentially merge this and TestimonialModule
3
- import { type Accordion } from './Accordion'
4
- import { computed, ref } from 'vue'
5
- import {
6
- combinePassthroughs,
7
- AccordionPt,
8
- } from '../../config/defaultPassthrough'
9
-
10
- const props = withDefaults(defineProps<Accordion>(), {
11
- iconDefault: 'pi-chevron-down',
12
- iconActive: 'pi-chevron-up',
13
- })
14
-
15
- const computedIconDefault = computed(() => {
16
- return props.type === 'List' ? 'pi-chevron-down' : 'pi-plus-circle'
17
- })
18
-
19
- const computedIconActive = computed(() => {
20
- return props.type === 'List' ? 'pi-chevron-up' : 'pi-times-circle'
21
- })
22
-
23
- const pt = computed(() =>
24
- combinePassthroughs(AccordionPt[props.type], props.pt ?? {})
25
- )
26
- const openAccordionIndex = ref<number | null>(null)
27
- const toggleAccordion = (index: number) => {
28
- openAccordionIndex.value = openAccordionIndex.value === index ? null : index
29
- }
30
- </script>
31
-
32
- <template>
33
- <component
34
- :is="isChild ? 'div' : 'section'"
35
- :class="`accordion-module ${pt?.root ?? ''}`"
36
- >
37
- <h3
38
- v-if="headline"
39
- :class="`accordion-module-headline ${pt?.headline ?? ''}`"
40
- >
41
- {{ headline }}
42
- </h3>
43
- <div
44
- v-if="modules"
45
- :class="`accordion-module-container flex ${pt?.container ?? ''}`"
46
- >
47
- <template
48
- v-for="(item, index) in modules"
49
- :key="`${item.title}-${index}`"
50
- >
51
- <component
52
- :is="`Accordion${type}Item`"
53
- v-bind="item"
54
- :item-number="index"
55
- :is-first="index === 0"
56
- :is-last="index === modules.length - 1"
57
- :icon-default="computedIconDefault"
58
- :icon-active="computedIconActive"
59
- :total-items="modules.length"
60
- :open-accordion-index="openAccordionIndex"
61
- @toggle-accordion="toggleAccordion(index)"
62
- />
63
- </template>
64
- </div>
65
- </component>
66
- </template>
@@ -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
- }