@cooperco/cooper-component-library 0.0.10
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/README.md +11 -0
- package/package.json +85 -0
- package/src/assets/main.css +155 -0
- package/src/assets/theme.css +67 -0
- package/src/assets/usercard.jpg +0 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/Accordion.vue +33 -0
- package/src/components/AccordionItem.vue +53 -0
- package/src/components/CTA.vue +39 -0
- package/src/components/CarouselModule.vue +46 -0
- package/src/components/ContainerCollectionModule.vue +33 -0
- package/src/components/ContainerModule.vue +116 -0
- package/src/components/ContentAndImage.vue +34 -0
- package/src/components/ContentMediaModule.vue +50 -0
- package/src/components/ContentModule.vue +51 -0
- package/src/components/FooterNavigation.vue +57 -0
- package/src/components/IconChevron.vue +107 -0
- package/src/components/Image.vue +15 -0
- package/src/components/LogoCollectionModule.vue +30 -0
- package/src/components/LogoContainerModule.vue +30 -0
- package/src/components/NavigationElement.vue +92 -0
- package/src/components/PrimaryNavigation.vue +68 -0
- package/src/components/SplitModule.vue +42 -0
- package/src/components/Testimonial.vue +48 -0
- package/src/components/TestimonialModule.vue +48 -0
- package/src/components/TileCollection.vue +37 -0
- package/src/components/TileCollectionModule.vue +45 -0
- package/src/components/TileContent.vue +105 -0
- package/src/components/Video.vue +18 -0
- package/src/components/types/Accordion.ts +18 -0
- package/src/components/types/AccordionItem.ts +19 -0
- package/src/components/types/CTA.ts +13 -0
- package/src/components/types/CarouselModule.ts +21 -0
- package/src/components/types/ContainerCollectionModule.ts +12 -0
- package/src/components/types/ContainerModule.ts +35 -0
- package/src/components/types/ContentAndImage.ts +14 -0
- package/src/components/types/ContentMediaModule.ts +14 -0
- package/src/components/types/ContentModule.ts +21 -0
- package/src/components/types/FooterNavigation.ts +12 -0
- package/src/components/types/Image.ts +12 -0
- package/src/components/types/LogoCollectionModule.ts +12 -0
- package/src/components/types/LogoContainerModule.ts +12 -0
- package/src/components/types/NavigationElement.ts +19 -0
- package/src/components/types/PrimaryNavigation.ts +10 -0
- package/src/components/types/SplitModule.ts +16 -0
- package/src/components/types/Testimonial.ts +17 -0
- package/src/components/types/TileCollection.ts +14 -0
- package/src/components/types/TileContent.ts +34 -0
- package/src/components/types/Video.ts +8 -0
- package/src/components/types/index.ts +10 -0
- package/src/presets/aura/accordion/index.js +81 -0
- package/src/presets/aura/autocomplete/index.js +280 -0
- package/src/presets/aura/avatar/index.js +46 -0
- package/src/presets/aura/badge/index.js +43 -0
- package/src/presets/aura/badgedirective/index.js +49 -0
- package/src/presets/aura/blockui/index.js +8 -0
- package/src/presets/aura/breadcrumb/index.js +63 -0
- package/src/presets/aura/button/index.js +511 -0
- package/src/presets/aura/calendar/index.js +702 -0
- package/src/presets/aura/card/index.js +53 -0
- package/src/presets/aura/carousel/index.js +160 -0
- package/src/presets/aura/cascadeselect/index.js +220 -0
- package/src/presets/aura/checkbox/index.js +107 -0
- package/src/presets/aura/chip/index.js +45 -0
- package/src/presets/aura/chips/index.js +126 -0
- package/src/presets/aura/colorpicker/index.js +132 -0
- package/src/presets/aura/confirmpopup/index.js +111 -0
- package/src/presets/aura/contextmenu/index.js +132 -0
- package/src/presets/aura/datatable/index.js +1290 -0
- package/src/presets/aura/dataview/index.js +40 -0
- package/src/presets/aura/deferred/index.js +3 -0
- package/src/presets/aura/dialog/index.js +250 -0
- package/src/presets/aura/divider/index.js +72 -0
- package/src/presets/aura/dock/index.js +97 -0
- package/src/presets/aura/dropdown/index.js +297 -0
- package/src/presets/aura/fieldset/index.js +95 -0
- package/src/presets/aura/fileupload/index.js +175 -0
- package/src/presets/aura/floatlabel/index.js +26 -0
- package/src/presets/aura/galleria/index.js +353 -0
- package/src/presets/aura/global.js +90 -0
- package/src/presets/aura/iconfield/index.js +22 -0
- package/src/presets/aura/image/index.js +206 -0
- package/src/presets/aura/index.js +181 -0
- package/src/presets/aura/inlinemessage/index.js +46 -0
- package/src/presets/aura/inplace/index.js +27 -0
- package/src/presets/aura/inputgroup/index.js +5 -0
- package/src/presets/aura/inputgroupaddon/index.js +28 -0
- package/src/presets/aura/inputmask/index.js +47 -0
- package/src/presets/aura/inputnumber/index.js +293 -0
- package/src/presets/aura/inputotp/index.js +69 -0
- package/src/presets/aura/inputswitch/index.js +94 -0
- package/src/presets/aura/inputtext/index.js +63 -0
- package/src/presets/aura/knob/index.js +47 -0
- package/src/presets/aura/listbox/index.js +158 -0
- package/src/presets/aura/megamenu/index.js +206 -0
- package/src/presets/aura/menu/index.js +122 -0
- package/src/presets/aura/menubar/index.js +184 -0
- package/src/presets/aura/message/index.js +112 -0
- package/src/presets/aura/metergroup/index.js +110 -0
- package/src/presets/aura/multiselect/index.js +579 -0
- package/src/presets/aura/orderlist/index.js +281 -0
- package/src/presets/aura/organizationchart/index.js +142 -0
- package/src/presets/aura/overlaypanel/index.js +34 -0
- package/src/presets/aura/paginator/index.js +566 -0
- package/src/presets/aura/panel/index.js +102 -0
- package/src/presets/aura/panelmenu/index.js +130 -0
- package/src/presets/aura/password/index.js +143 -0
- package/src/presets/aura/picklist/index.js +718 -0
- package/src/presets/aura/progressbar/index.js +64 -0
- package/src/presets/aura/progressspinner/index.js +51 -0
- package/src/presets/aura/radiobutton/index.js +121 -0
- package/src/presets/aura/rating/index.js +95 -0
- package/src/presets/aura/ripple/index.js +6 -0
- package/src/presets/aura/scrollpanel/index.js +77 -0
- package/src/presets/aura/scrolltop/index.js +45 -0
- package/src/presets/aura/selectbutton/index.js +66 -0
- package/src/presets/aura/sidebar/index.js +160 -0
- package/src/presets/aura/skeleton/index.js +19 -0
- package/src/presets/aura/slider/index.js +144 -0
- package/src/presets/aura/speeddial/index.js +579 -0
- package/src/presets/aura/splitbutton/index.js +1185 -0
- package/src/presets/aura/splitter/index.js +71 -0
- package/src/presets/aura/stepper/index.js +183 -0
- package/src/presets/aura/steps/index.js +117 -0
- package/src/presets/aura/tabmenu/index.js +75 -0
- package/src/presets/aura/tabview/index.js +162 -0
- package/src/presets/aura/tag/index.js +44 -0
- package/src/presets/aura/terminal/index.js +60 -0
- package/src/presets/aura/textarea/index.js +49 -0
- package/src/presets/aura/tieredmenu/index.js +125 -0
- package/src/presets/aura/timeline/index.js +114 -0
- package/src/presets/aura/toast/index.js +151 -0
- package/src/presets/aura/togglebutton/index.js +98 -0
- package/src/presets/aura/toolbar/index.js +28 -0
- package/src/presets/aura/tooltip/index.js +73 -0
- package/src/presets/aura/tree/index.js +294 -0
- package/src/presets/aura/treeselect/index.js +404 -0
- package/src/presets/aura/treetable/index.js +513 -0
- package/src/presets/aura/tristatecheckbox/index.js +121 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Vue 3 + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur
|
|
8
|
+
|
|
9
|
+
### TODO issues
|
|
10
|
+
|
|
11
|
+
- There are many places where `class` is not recognized by Typescript. Examples are "start"/"end" in ContainerModule. This is because we are not defining `class` on the component types. Defining them explicitly overrides the default Attribute Inheritance behavior of Vue. Need to find a way to get around this
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cooperco/cooper-component-library",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.10",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"src/components/",
|
|
9
|
+
"src/presets/",
|
|
10
|
+
"src/assets/"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist/component-lib.umd.cjs",
|
|
13
|
+
"module": "./dist/component-lib.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/component-lib.js",
|
|
17
|
+
"require": "./dist/component-lib.umd.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./dist/style.css": {
|
|
20
|
+
"import": "./dist/style.css",
|
|
21
|
+
"require": "./dist/style.css"
|
|
22
|
+
},
|
|
23
|
+
"./components/*": "./dist/components/*",
|
|
24
|
+
"./presets/*": "./dist/presets/*",
|
|
25
|
+
"./assets/*": "./dist/assets/*"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "vite build",
|
|
30
|
+
"preview": "vite preview",
|
|
31
|
+
"tail": "tailwind-config-viewer -o",
|
|
32
|
+
"storybook": "storybook dev -p 6006",
|
|
33
|
+
"build-storybook": "storybook build",
|
|
34
|
+
"chromatic": "chromatic --exit-zero-on-changes",
|
|
35
|
+
"prepare": "husky install"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@primevue/themes": "^4.0.0",
|
|
39
|
+
"primevue": "^3.0.0",
|
|
40
|
+
"vite-plugin-turbosnap": "^1.0.3",
|
|
41
|
+
"vue": "^3.0.0",
|
|
42
|
+
"vue-router": "^4.4.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@chromatic-com/storybook": "^1.4.0",
|
|
46
|
+
"@eslint/js": "^9.4.0",
|
|
47
|
+
"@storybook/addon-essentials": "^8.1.2",
|
|
48
|
+
"@storybook/addon-interactions": "^8.1.2",
|
|
49
|
+
"@storybook/addon-links": "^8.1.2",
|
|
50
|
+
"@storybook/blocks": "^8.1.2",
|
|
51
|
+
"@storybook/builder-vite": "^8.1.2",
|
|
52
|
+
"@storybook/test": "^8.1.2",
|
|
53
|
+
"@storybook/vue3": "^8.1.2",
|
|
54
|
+
"@storybook/vue3-vite": "^8.1.2",
|
|
55
|
+
"@tsconfig/node18": "^18.2.4",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
57
|
+
"@vue/tsconfig": "^0.5.1",
|
|
58
|
+
"autoprefixer": "^10.4.19",
|
|
59
|
+
"chromatic": "^11.4.0",
|
|
60
|
+
"eslint": "^8.56.0",
|
|
61
|
+
"eslint-plugin-vue": "^9.20.1",
|
|
62
|
+
"globals": "^15.3.0",
|
|
63
|
+
"husky": "^9.1.4",
|
|
64
|
+
"jsdom": "^24.1.0",
|
|
65
|
+
"lint-staged": "^15.2.8",
|
|
66
|
+
"postcss": "^8.4.38",
|
|
67
|
+
"prettier": "3.3.1",
|
|
68
|
+
"storybook": "^8.1.2",
|
|
69
|
+
"storybook-vue3-router": "^5.0.0",
|
|
70
|
+
"tailwind-config-viewer": "^2.0.2",
|
|
71
|
+
"tailwindcss": "^3.4.3",
|
|
72
|
+
"typescript": "~5.3.3",
|
|
73
|
+
"typescript-eslint": "^7.17.0",
|
|
74
|
+
"unplugin-vue-components": "^0.27.0",
|
|
75
|
+
"vite": "^5.2.0"
|
|
76
|
+
},
|
|
77
|
+
"peerDependencies": {
|
|
78
|
+
"primevue": "^3.0.0",
|
|
79
|
+
"tailwindcss": "^3.0.0",
|
|
80
|
+
"vue": "^3.0.0"
|
|
81
|
+
},
|
|
82
|
+
"lint-staged": {
|
|
83
|
+
"*.{js,css,md,ts,vue}": "prettier --write"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
img {
|
|
6
|
+
height: inherit;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
p,
|
|
10
|
+
h1,
|
|
11
|
+
h2,
|
|
12
|
+
h3,
|
|
13
|
+
h4,
|
|
14
|
+
h5,
|
|
15
|
+
div {
|
|
16
|
+
white-space: pre-wrap;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
Tile Collection variant styles.
|
|
21
|
+
The `variant` is appended to the container class.
|
|
22
|
+
*/
|
|
23
|
+
.tile-collection.IconCard,
|
|
24
|
+
.tile-collection.ImageCard {
|
|
25
|
+
.tile-content-media {
|
|
26
|
+
@apply order-1 mb-4;
|
|
27
|
+
img {
|
|
28
|
+
@apply mx-auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.tile-content-headline {
|
|
32
|
+
@apply order-2;
|
|
33
|
+
}
|
|
34
|
+
.tile-content-description {
|
|
35
|
+
@apply order-3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tile-collection.VideoCard {
|
|
40
|
+
.p-card-title {
|
|
41
|
+
@apply order-1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.p-card-header {
|
|
45
|
+
@apply order-2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.p-card-content {
|
|
49
|
+
@apply order-3;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tile-collection.ImageStackedAnimated {
|
|
54
|
+
.tile-collection-content {
|
|
55
|
+
@apply flex-col gap-36;
|
|
56
|
+
}
|
|
57
|
+
p {
|
|
58
|
+
@apply leading-snug;
|
|
59
|
+
word-wrap: break-word;
|
|
60
|
+
}
|
|
61
|
+
.tile-content-inner {
|
|
62
|
+
@apply max-h-80 !flex-row justify-center items-center gap-16;
|
|
63
|
+
.tile-content-subheadline {
|
|
64
|
+
@apply hidden;
|
|
65
|
+
}
|
|
66
|
+
.tile-content-text {
|
|
67
|
+
@apply max-w-[450px] space-y-4;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.tile-content-container {
|
|
72
|
+
@apply flex flex-row items-center justify-center;
|
|
73
|
+
}
|
|
74
|
+
img {
|
|
75
|
+
@apply rounded-full min-w-80;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.tile-content-media {
|
|
79
|
+
@apply relative;
|
|
80
|
+
img {
|
|
81
|
+
@apply relative z-10;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.tile-content:nth-child(odd) {
|
|
85
|
+
.tile-content-inner {
|
|
86
|
+
.tile-content-text {
|
|
87
|
+
@apply *:text-left order-2;
|
|
88
|
+
}
|
|
89
|
+
.tile-content-media {
|
|
90
|
+
@apply order-1;
|
|
91
|
+
.tile-label {
|
|
92
|
+
@apply right-0 top-4;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&::before {
|
|
96
|
+
@apply absolute z-0;
|
|
97
|
+
bottom: -22%;
|
|
98
|
+
left: -16%;
|
|
99
|
+
background-repeat: no-repeat;
|
|
100
|
+
background-position: 0 100%;
|
|
101
|
+
content: url(https://images.ctfassets.net/qqblaiss500w/5Bp3ySaz0pqR5gLtdxOQoi/db01031466deed9b7b959c08c17e5681/circles1.f3eead2.svg);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.tile-content:nth-child(even) {
|
|
108
|
+
.tile-content-inner {
|
|
109
|
+
.tile-content-text {
|
|
110
|
+
@apply *:text-right order-1;
|
|
111
|
+
}
|
|
112
|
+
.tile-content-media {
|
|
113
|
+
.tile-label {
|
|
114
|
+
@apply left-0 top-4;
|
|
115
|
+
}
|
|
116
|
+
@apply order-2;
|
|
117
|
+
&::before {
|
|
118
|
+
@apply absolute z-0;
|
|
119
|
+
top: -12%;
|
|
120
|
+
left: -28%;
|
|
121
|
+
background-repeat: no-repeat;
|
|
122
|
+
background-position: 0 100%;
|
|
123
|
+
transform: rotate(90deg);
|
|
124
|
+
content: url(https://images.ctfassets.net/qqblaiss500w/5Bp3ySaz0pqR5gLtdxOQoi/db01031466deed9b7b959c08c17e5681/circles1.f3eead2.svg);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
.tile-content-media {
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.carousel.hero {
|
|
134
|
+
/*
|
|
135
|
+
This with the content override below puts the indicators
|
|
136
|
+
above the content, so that the content is full width. (no padding around it)
|
|
137
|
+
*/
|
|
138
|
+
.p-carousel-prev,
|
|
139
|
+
.p-carousel-next {
|
|
140
|
+
z-index: 10;
|
|
141
|
+
position: relative;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.p-carousel-items-content {
|
|
145
|
+
width: 100%;
|
|
146
|
+
margin: 0 -48px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Remove the space below the content */
|
|
150
|
+
.p-carousel-indicators {
|
|
151
|
+
position: relative;
|
|
152
|
+
margin-top: -32px;
|
|
153
|
+
z-index: 10;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--primary-50: #a88fed;
|
|
3
|
+
--primary-100: #9d82de;
|
|
4
|
+
--primary-200: #9375ce;
|
|
5
|
+
--primary-300: #8869bf;
|
|
6
|
+
--primary-400: #7d5caf;
|
|
7
|
+
--primary-500: #734fa0;
|
|
8
|
+
--primary-600: #684291;
|
|
9
|
+
--primary-700: #5d3581;
|
|
10
|
+
--primary-800: #522972;
|
|
11
|
+
--primary-900: #481c62;
|
|
12
|
+
--primary-950: #3d0f53;
|
|
13
|
+
--surface-0: rgb(255 255 255);
|
|
14
|
+
--surface-50: rgb(250 250 250);
|
|
15
|
+
--surface-100: rgb(244 244 245);
|
|
16
|
+
--surface-200: rgb(228 228 231);
|
|
17
|
+
--surface-300: rgb(212 212 216);
|
|
18
|
+
--surface-400: rgb(161 161 170);
|
|
19
|
+
--surface-500: rgb(113 113 122);
|
|
20
|
+
--surface-600: rgb(82 82 91);
|
|
21
|
+
--surface-700: rgb(63 63 70);
|
|
22
|
+
--surface-800: rgb(39 39 42);
|
|
23
|
+
--surface-900: rgb(24 24 27);
|
|
24
|
+
--surface-950: rgb(9 9 11);
|
|
25
|
+
|
|
26
|
+
--primary: var(--primary-500);
|
|
27
|
+
--primary-inverse: var(--surface-0);
|
|
28
|
+
--primary-hover: var(--primary-600);
|
|
29
|
+
--primary-active-color: var(--primary-600);
|
|
30
|
+
|
|
31
|
+
--primary-highlight-opacity: 0.1;
|
|
32
|
+
--primary-highlight-inverse: var(--primary-700);
|
|
33
|
+
--primary-highlight-hover-opacity: 0.2;
|
|
34
|
+
}
|
|
35
|
+
.dark {
|
|
36
|
+
--primary: var(--primary-400);
|
|
37
|
+
--primary-inverse: var(--surface-900);
|
|
38
|
+
--primary-hover: var(--primary-300);
|
|
39
|
+
--primary-active-color: var(--primary-300);
|
|
40
|
+
|
|
41
|
+
--primary-highlight-opacity: 0.2;
|
|
42
|
+
--primary-highlight-inverse: var(--surface-0);
|
|
43
|
+
--primary-highlight-hover-opacity: 0.3;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.customized-primary {
|
|
47
|
+
&:not(.dark) {
|
|
48
|
+
--primary: var(--primary-950);
|
|
49
|
+
--primary-inverse: var(--surface-0);
|
|
50
|
+
--primary-hover: var(--primary-800);
|
|
51
|
+
--primary-active-color: var(--primary-900);
|
|
52
|
+
|
|
53
|
+
--primary-highlight-opacity: 1;
|
|
54
|
+
--primary-highlight-inverse: var(--surface-0);
|
|
55
|
+
--primary-highlight-hover-opacity: 0.8;
|
|
56
|
+
}
|
|
57
|
+
&.dark {
|
|
58
|
+
--primary: var(--primary-50);
|
|
59
|
+
--primary-inverse: var(--surface-950);
|
|
60
|
+
--primary-hover: var(--primary-100);
|
|
61
|
+
--primary-active-color: var(--primary-100);
|
|
62
|
+
|
|
63
|
+
--primary-highlight-opacity: 0.1;
|
|
64
|
+
--primary-highlight-inverse: var(--surface-0);
|
|
65
|
+
--primary-highlight-hover-opacity: 0.2;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Can potentially merge this and Testimonial
|
|
3
|
+
import { type Accordion } from './types/Accordion'
|
|
4
|
+
import AccordionItem from './AccordionItem.vue'
|
|
5
|
+
|
|
6
|
+
defineProps<Accordion>()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<component :is="isChild ? 'div' : 'section'" class="accordion-module">
|
|
11
|
+
<h3
|
|
12
|
+
v-if="headline"
|
|
13
|
+
:class="`accordion-module-headline ${pt?.headline ?? ''}`"
|
|
14
|
+
>
|
|
15
|
+
{{ headline }}
|
|
16
|
+
</h3>
|
|
17
|
+
<div
|
|
18
|
+
v-if="modules"
|
|
19
|
+
:class="`accordion-module-container container ${type === 'List' ? 'flex-col' : ''} flex ${pt?.container ?? ''}`"
|
|
20
|
+
>
|
|
21
|
+
<template v-for="(item, index) in modules">
|
|
22
|
+
<AccordionItem
|
|
23
|
+
:itemNumber="index"
|
|
24
|
+
:isFirst="index === 0"
|
|
25
|
+
:isLast="index === modules.length - 1"
|
|
26
|
+
v-bind="item"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
</div>
|
|
30
|
+
</component>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style></style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type AccordionItem } from './types/AccordionItem'
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<AccordionItem>()
|
|
6
|
+
const showDescription = ref(false)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div
|
|
11
|
+
:class="{
|
|
12
|
+
[`accordion-item-${itemNumber}`]: true,
|
|
13
|
+
active: showDescription,
|
|
14
|
+
first: isFirst,
|
|
15
|
+
last: isLast,
|
|
16
|
+
}"
|
|
17
|
+
class="accordion-item group"
|
|
18
|
+
>
|
|
19
|
+
<h3
|
|
20
|
+
:class="`flex accordion-item-headline ${pt?.headline ?? ''}`"
|
|
21
|
+
:id="`accordion-collapse-headline-${itemNumber}`"
|
|
22
|
+
>
|
|
23
|
+
<img
|
|
24
|
+
v-if="imageIcon"
|
|
25
|
+
:src="imageIcon.src"
|
|
26
|
+
alt="imageIcon.alt"
|
|
27
|
+
:class="` ${pt.imageIcon}`"
|
|
28
|
+
/>
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
:class="`flex items-center justify-between w-full ${pt?.button ?? ''}`"
|
|
32
|
+
data-accordion-target="#accordion-collapse-body-1"
|
|
33
|
+
aria-expanded="true"
|
|
34
|
+
:aria-controls="`accordion-collapse-body-${itemNumber}`"
|
|
35
|
+
@click.prevent="showDescription = !showDescription"
|
|
36
|
+
>
|
|
37
|
+
<span>{{ title }}</span>
|
|
38
|
+
<IconChevron
|
|
39
|
+
:class="`accordion-icon ps-5 ${pt?.icon ?? ''}`"
|
|
40
|
+
:orientation="showDescription ? 'up' : 'down'"
|
|
41
|
+
:bold="true"
|
|
42
|
+
/>
|
|
43
|
+
</button>
|
|
44
|
+
</h3>
|
|
45
|
+
<div
|
|
46
|
+
:id="`accordion-collapse-body-${itemNumber}`"
|
|
47
|
+
:class="`accordion-item-body ${!showDescription ? 'hidden' : 'active'} ${pt?.content ?? ''}`"
|
|
48
|
+
:aria-labelledby="`accordion-collapse-heading-${itemNumber}`"
|
|
49
|
+
>
|
|
50
|
+
{{ content }}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { CTA } from './types/CTA'
|
|
3
|
+
import { CTAOptions } from '../types'
|
|
4
|
+
import Button from 'primevue/button'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<CTA>()
|
|
8
|
+
|
|
9
|
+
const buttonTypeValue = computed(() => {
|
|
10
|
+
return CTAOptions[props?.buttonType]
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const fullClassname = computed(() => `cta ${props.class ?? ''}`)
|
|
14
|
+
|
|
15
|
+
const computedStyle = computed(() => {
|
|
16
|
+
return {
|
|
17
|
+
color: props.textColor,
|
|
18
|
+
'background-color':
|
|
19
|
+
buttonTypeValue.value == CTAOptions.fill ? props.color : 'transparent',
|
|
20
|
+
'border-color':
|
|
21
|
+
buttonTypeValue.value != CTAOptions.link ? props.color : 'transparent',
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
// Update to support url vs page
|
|
26
|
+
const url = computed(() => {
|
|
27
|
+
return props?.url?.link
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<Button
|
|
33
|
+
:class="fullClassname"
|
|
34
|
+
:label="title"
|
|
35
|
+
:style="computedStyle"
|
|
36
|
+
:aria-label="ariaLabel"
|
|
37
|
+
:link="buttonTypeValue == CTAOptions.link"
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Carousel as CarouselType } from './types/CarouselModule'
|
|
3
|
+
import Carousel from 'primevue/carousel'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
// import { getComponent } from '../utils/getComponent'
|
|
6
|
+
|
|
7
|
+
// Still need to figure out how to configure where buttons go
|
|
8
|
+
// as defaults do not match cordblood site.
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<CarouselType>(), {
|
|
11
|
+
variant: 'Default',
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const computedStyle = computed(() => {
|
|
15
|
+
return {
|
|
16
|
+
'background-color': props.backgroundColor ?? 'transparent',
|
|
17
|
+
'background-image': `url(${props.backgroundImage ?? ''})`,
|
|
18
|
+
'background-size': 'cover',
|
|
19
|
+
color: props.textColor ?? 'inherit',
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<Carousel
|
|
26
|
+
:value="modules"
|
|
27
|
+
:numVisible="1"
|
|
28
|
+
:numScroll="1"
|
|
29
|
+
:style="computedStyle"
|
|
30
|
+
:class="`carousel ${variant.toLowerCase()}`"
|
|
31
|
+
:pt:item:class="`carousel-item w-full ${pt?.item ?? ''}`"
|
|
32
|
+
>
|
|
33
|
+
<template v-if="headline" #header>
|
|
34
|
+
<h2 :class="`carousel-headline ${pt?.headline ?? ''}`">{{ headline }}</h2>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-for="(item, index) in modules" #item="slotProps">
|
|
37
|
+
<component
|
|
38
|
+
v-bind="slotProps.data"
|
|
39
|
+
:is="slotProps.data.__typename"
|
|
40
|
+
:isChild="true"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
<template #footer></template>
|
|
44
|
+
<template #nexticon></template>
|
|
45
|
+
</Carousel>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { ContainerCollectionModule } from './types/ContainerCollectionModule'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<ContainerCollectionModule>()
|
|
6
|
+
|
|
7
|
+
const computedStyle = computed(() => {
|
|
8
|
+
return {
|
|
9
|
+
'background-color': props.backgroundColor ?? 'transparent',
|
|
10
|
+
}
|
|
11
|
+
})
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<section class="container-collection" :style="computedStyle">
|
|
16
|
+
<h2
|
|
17
|
+
v-if="headline"
|
|
18
|
+
:class="`container-collection-headline ${pt?.headline}`"
|
|
19
|
+
>
|
|
20
|
+
{{ headline }}
|
|
21
|
+
</h2>
|
|
22
|
+
<div
|
|
23
|
+
:class="`container-collection-content mx-auto container ${pt?.content}`"
|
|
24
|
+
>
|
|
25
|
+
<component
|
|
26
|
+
v-for="subModule in modules"
|
|
27
|
+
:is="subModule.__typename"
|
|
28
|
+
v-bind="subModule"
|
|
29
|
+
:isChild="true"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</section>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ContainerModule as ContainerModuleType } from './types/ContainerModule'
|
|
3
|
+
import { VariantOptions, MediaOptions } from '../types'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<ContainerModuleType>(), {
|
|
7
|
+
isChild: false,
|
|
8
|
+
variant: 'Centered',
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const isHero = computed(() => {
|
|
12
|
+
return VariantOptions[props.variant] === VariantOptions.Hero
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const isCentered = computed(() => {
|
|
16
|
+
return VariantOptions[props.variant] === VariantOptions.Centered
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const mediaTypeLeftValue = computed(() => {
|
|
20
|
+
if (!props?.start?.mediaType) {
|
|
21
|
+
return null
|
|
22
|
+
}
|
|
23
|
+
return MediaOptions[props.start.mediaType]
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const mediaTypeRightValue = computed(() => {
|
|
27
|
+
if (!props?.end?.mediaType) {
|
|
28
|
+
return null
|
|
29
|
+
}
|
|
30
|
+
return MediaOptions[props.end.mediaType]
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const computedStyle = computed(() => {
|
|
34
|
+
return {
|
|
35
|
+
'background-color': props.backgroundColor ?? 'transparent',
|
|
36
|
+
'background-image': `url(${props.backgroundImage ?? ''})`,
|
|
37
|
+
'background-size': 'cover',
|
|
38
|
+
color: props.textColor ?? 'inherit',
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<component
|
|
45
|
+
:is="isChild ? 'div' : 'section'"
|
|
46
|
+
:style="computedStyle"
|
|
47
|
+
class="container-module"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
:class="`container-module-inner h-full ${isHero ? 'container' : ''} mx-auto ${pt?.inner ?? ''}`"
|
|
51
|
+
>
|
|
52
|
+
<h2
|
|
53
|
+
v-if="headline"
|
|
54
|
+
:class="`container-module-headline ${isCentered ? 'text-center' : ''} ${pt?.headline ?? ''}`"
|
|
55
|
+
>
|
|
56
|
+
{{ headline }}
|
|
57
|
+
</h2>
|
|
58
|
+
|
|
59
|
+
<p
|
|
60
|
+
v-if="subHeadline"
|
|
61
|
+
:class="`container-module-subheadline ${isCentered ? 'text-center' : ''} ${pt?.subheadline ?? ''}`"
|
|
62
|
+
>
|
|
63
|
+
{{ subHeadline }}
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<div
|
|
67
|
+
:class="`container-module-content flex flex-row gap-5 h-full ${pt?.content ?? ''}`"
|
|
68
|
+
>
|
|
69
|
+
<template v-if="fullWidthContent">
|
|
70
|
+
<div
|
|
71
|
+
:class="`container-module ${pt?.fullWidthContent ?? ''} ${isCentered ? 'mx-auto' : ''}`"
|
|
72
|
+
>
|
|
73
|
+
<template v-if="fullWidthContent?.mediaType">
|
|
74
|
+
<component :is="mediaTypeLeftValue" :="fullWidthContent" />
|
|
75
|
+
</template>
|
|
76
|
+
<template v-else-if="fullWidthContent.__typename">
|
|
77
|
+
<component
|
|
78
|
+
v-bind="fullWidthContent"
|
|
79
|
+
:is="fullWidthContent.__typename"
|
|
80
|
+
:isChild="true"
|
|
81
|
+
/>
|
|
82
|
+
</template>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<template v-else>
|
|
87
|
+
<div
|
|
88
|
+
v-if="start"
|
|
89
|
+
:class="`container-module-start basis-1/2 ${pt?.start ?? ''}`"
|
|
90
|
+
>
|
|
91
|
+
<template v-if="start?.mediaType">
|
|
92
|
+
<component :is="mediaTypeLeftValue" :="start" />
|
|
93
|
+
</template>
|
|
94
|
+
<template v-else-if="start?.__typename">
|
|
95
|
+
<component
|
|
96
|
+
v-bind="start"
|
|
97
|
+
:is="start.__typename"
|
|
98
|
+
:isChild="true"
|
|
99
|
+
/>
|
|
100
|
+
</template>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div :class="`container-module-end basis-1/2 ${pt?.end ?? ''}`">
|
|
104
|
+
<template v-if="end?.mediaType">
|
|
105
|
+
<component :is="mediaTypeRightValue" :="end" />
|
|
106
|
+
</template>
|
|
107
|
+
<template v-else-if="end?.__typename">
|
|
108
|
+
<component v-bind="end" :is="end.__typename" :isChild="true" />
|
|
109
|
+
</template>
|
|
110
|
+
</div>
|
|
111
|
+
</template>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<slot />
|
|
115
|
+
</component>
|
|
116
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Can potentially merge this and Testimonial
|
|
3
|
+
import { type ContentAndImage } from './types/ContentAndImage'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import ContentModule from './ContentModule.vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<ContentAndImage>()
|
|
8
|
+
|
|
9
|
+
const computedStyle = computed(() => {
|
|
10
|
+
return {
|
|
11
|
+
'background-color': props.backgroundColor ?? 'transparent',
|
|
12
|
+
color: props.textColor ?? 'inherit',
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<component
|
|
19
|
+
:is="isChild ? 'div' : 'section'"
|
|
20
|
+
:style="computedStyle"
|
|
21
|
+
class="content-and-image"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
class="content-and-image-inner container flex flex-col lg:flex-row content-between justify-between mx-auto"
|
|
25
|
+
:class="{ 'text-center': fullWidthContent }"
|
|
26
|
+
>
|
|
27
|
+
<div v-if="content" class="content">
|
|
28
|
+
<ContentModule :="content" />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<img v-if="image" class="image" :="image" />
|
|
32
|
+
</div>
|
|
33
|
+
</component>
|
|
34
|
+
</template>
|