blocks-dusted 0.1.11 → 0.1.13
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/package.json +5 -2
- package/src/cli.js +39 -3
- package/src/commands/shop.js +59 -0
- package/src/commands/warehouse.js +73 -0
- package/src/installers/patchRenderBlocks.js +1 -1
- package/src/registry/validateTemplateManifest.js +2 -1
- package/templates/blocks/BannerDD790432/Component.tsx +63 -0
- package/templates/blocks/BannerDD790432/config.ts +54 -0
- package/templates/blocks/BannerDD790432/manifest.json +80 -0
- package/templates/blocks/Button47/Component.tsx +124 -0
- package/templates/blocks/Button47/config.ts +75 -0
- package/templates/blocks/Button47/link.ts +22 -0
- package/templates/blocks/Button47/manifest.json +105 -0
- package/templates/blocks/Button47/styles.module.scss +75 -0
- package/templates/blocks/DD-Accordion/Component.tsx +55 -36
- package/templates/blocks/DD-Accordion/config.ts +71 -59
- package/templates/blocks/DD-AnimText/Component.tsx +50 -32
- package/templates/blocks/DD-AnimText/config.ts +296 -295
- package/templates/blocks/DD-AsideNav/Component.tsx +323 -319
- package/templates/blocks/DD-Banner/Component.tsx +54 -51
- package/templates/blocks/DD-BookCall/Component.tsx +10 -9
- package/templates/blocks/DD-ButtonPop/Component.tsx +118 -117
- package/templates/blocks/DD-Card/Component.tsx +4 -4
- package/templates/blocks/DD-CardTemplate01/Component.tsx +5 -5
- package/templates/blocks/DD-CardsWithVariantV3/Component.tsx +472 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/index.tsx +203 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/styles.ts +87 -0
- package/templates/blocks/DD-CardsWithVariantV3/ElectricBorder/useInjectStyle.ts +39 -0
- package/templates/blocks/DD-CardsWithVariantV3/config.ts +326 -0
- package/templates/blocks/DD-CardsWithVariantV3/manifest.json +110 -0
- package/templates/blocks/DD-Carousel-A/Component.tsx +251 -249
- package/templates/blocks/DD-Carousel-B/Component.tsx +405 -403
- package/templates/blocks/DD-Chip/Component.tsx +14 -14
- package/templates/blocks/DD-ComparisonTable/Component.tsx +255 -256
- package/templates/blocks/DD-Contact/Component.tsx +433 -434
- package/templates/blocks/DD-Counter/Component.tsx +18 -13
- package/templates/blocks/DD-DeliCard/Component.tsx +303 -0
- package/templates/blocks/DD-DeliCard/config.ts +186 -0
- package/templates/blocks/DD-DeliCard/manifest.json +94 -0
- package/templates/blocks/DD-FeatCat/Component.tsx +302 -302
- package/templates/blocks/DD-FeatProd/CircularGallery.tsx +1179 -0
- package/templates/blocks/DD-FeatProd/Component.tsx +484 -0
- package/templates/blocks/DD-FeatProd/config.ts +173 -0
- package/templates/blocks/DD-FeatProd/manifest.json +93 -0
- package/templates/blocks/DD-FeatServ/Component.tsx +607 -0
- package/templates/blocks/DD-FeatServ/config.ts +213 -0
- package/templates/blocks/DD-FeatServ/manifest.json +113 -0
- package/templates/blocks/DD-FeatStrip/Component.tsx +584 -585
- package/templates/blocks/DD-FluidBtn/ButtonsEyeCatching.tsx +627 -628
- package/templates/blocks/DD-FluidBtn/Component.tsx +46 -43
- package/templates/blocks/DD-GooeyInfo/Component.tsx +150 -149
- package/templates/blocks/DD-GooeyInfo/config.ts +136 -135
- package/templates/blocks/DD-Hero/Component.tsx +16 -40
- package/templates/blocks/DD-HeroPlas/Component.tsx +50 -0
- package/templates/blocks/DD-HeroPlas/ThreeScene.tsx +109 -0
- package/templates/blocks/DD-HeroPlas/config.ts +33 -0
- package/templates/blocks/DD-HeroPlas/manifest.json +88 -0
- package/templates/blocks/DD-HorizontalScroll/Component.tsx +4 -5
- package/templates/blocks/DD-Icon/Component.tsx +46 -81
- package/templates/blocks/DD-IconButton/Component.tsx +13 -20
- package/templates/blocks/DD-IdTag/Component.tsx +22 -21
- package/templates/blocks/DD-IframeMedia/Component.tsx +14 -10
- package/templates/blocks/DD-LineAnim/Component.tsx +42 -36
- package/templates/blocks/DD-LogoMarq/Component.tsx +38 -48
- package/templates/blocks/DD-Lottie/Component.tsx +11 -3
- package/templates/blocks/DD-MasonaryMedia/Component.tsx +544 -547
- package/templates/blocks/DD-MasonaryMedia/config.ts +389 -389
- package/templates/blocks/DD-Masonry/Component.tsx +654 -644
- package/templates/blocks/DD-Masonry/config.ts +475 -475
- package/templates/blocks/DD-MaterialSwatches/Component.tsx +85 -0
- package/templates/blocks/DD-MaterialSwatches/config.ts +232 -0
- package/templates/blocks/DD-MaterialSwatches/manifest.json +84 -0
- package/templates/blocks/DD-MaterialSwatches/material.ts +107 -0
- package/templates/blocks/DD-NineCanvas/Component.tsx +129 -0
- package/templates/blocks/DD-NineCanvas/RenderBlocks.tsx +244 -0
- package/templates/blocks/DD-NineCanvas/allowedCanvasBlocks.ts +6 -0
- package/templates/blocks/DD-NineCanvas/blockComponents.tsx +8 -0
- package/templates/blocks/DD-NineCanvas/canvas/CanvasGrid.tsx +316 -0
- package/templates/blocks/DD-NineCanvas/canvas/RadialNav.tsx +432 -0
- package/templates/blocks/DD-NineCanvas/canvas/canvas-panels.css +889 -0
- package/templates/blocks/DD-NineCanvas/canvas/icons/custom-icons.tsx +364 -0
- package/templates/blocks/DD-NineCanvas/config.ts +61 -0
- package/templates/blocks/DD-NineCanvas/manifest.json +165 -0
- package/templates/blocks/DD-NineCanvas/styles.scss +152 -0
- package/templates/blocks/DD-NineCanvas/tooltip/get-strict-context.tsx +26 -0
- package/templates/blocks/DD-NineCanvas/tooltip/primitives.tsx +178 -0
- package/templates/blocks/DD-NineCanvas/tooltip/tooltip.tsx +71 -0
- package/templates/blocks/DD-NineCanvas/tooltip/use-controlled-state.tsx +33 -0
- package/templates/blocks/DD-NineCanvas/utilities/FadeOnScroll.tsx +68 -0
- package/templates/blocks/DD-NineCanvas/utilities/ParallaxWrapper.tsx +157 -0
- package/templates/blocks/DD-NineCanvas/utilities/renderCustomCSS.ts +5 -0
- package/templates/blocks/DD-NineCanvas/utilities/webglCleanup.ts +27 -0
- package/templates/blocks/DD-PayloadAIAssistant/Component.tsx +78 -0
- package/templates/blocks/DD-PayloadAIAssistant/DustedBot.tsx +590 -0
- package/templates/blocks/DD-PayloadAIAssistant/config.ts +37 -0
- package/templates/blocks/DD-PayloadAIAssistant/demo.css +125 -0
- package/templates/blocks/DD-PayloadAIAssistant/manifest.json +93 -0
- package/templates/blocks/DD-PayloadAIAssistant/source-defaults.ts +17 -0
- package/templates/blocks/DD-PayloadAIAssistant/styles.ts +306 -0
- package/templates/blocks/DD-Pricing/Component.tsx +368 -372
- package/templates/blocks/DD-Pricing/config.ts +215 -215
- package/templates/blocks/DD-Process/Component.tsx +147 -149
- package/templates/blocks/DD-Progress/Component.tsx +156 -141
- package/templates/blocks/DD-ProjHeader/Component.tsx +93 -91
- package/templates/blocks/DD-ProjSlider/Component.tsx +1 -1
- package/templates/blocks/DD-ProjSlider/config.ts +2 -2
- package/templates/blocks/DD-Section/Component.tsx +265 -266
- package/templates/blocks/DD-Separator/Component.tsx +66 -66
- package/templates/blocks/DD-Services/Component.tsx +176 -176
- package/templates/blocks/DD-ShowcaseGrid/Component.tsx +306 -307
- package/templates/blocks/DD-Slider-A/Component.tsx +237 -237
- package/templates/blocks/DD-StackCards/Component.tsx +474 -473
- package/templates/blocks/DD-Team/Component.tsx +247 -247
- package/templates/blocks/DD-TeamCards/Component.tsx +251 -251
- package/templates/blocks/DD-TechStack/Component.tsx +161 -168
- package/templates/blocks/DD-TestMarq/Component.tsx +158 -132
- package/templates/blocks/DD-Testim/Component.tsx +247 -247
- package/templates/blocks/DD-Testim2/Component.tsx +265 -256
- package/templates/blocks/DD-Testimonials/Component.tsx +139 -147
- package/templates/blocks/DD-TextMarq/Component.tsx +157 -157
- package/templates/blocks/DD-Thanks/Component.tsx +501 -500
- package/templates/blocks/DD-Work/Component.tsx +315 -315
- package/templates/blocks/DD-Work-B/Component.tsx +294 -294
- package/templates/blocks/DDHG-CTASection2/Component.tsx +183 -184
- package/templates/blocks/DDHG-HighlightArc/Component.tsx +246 -243
- package/templates/blocks/DDHG-LogoMarquee/Component.tsx +180 -93
- package/templates/blocks/DDHG-LogoMarquee/config.ts +154 -66
- package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +225 -213
- package/templates/blocks/DDHG-ProcessSec/Component.tsx +38 -39
- package/templates/blocks/DDHG-ServiceDetails/Component.tsx +11 -11
- package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +30 -47
- package/templates/blocks/DDHG-ServiceHero/Component.tsx +10 -10
- package/templates/blocks/DDHG-ServiceOverview/Component.tsx +23 -23
- package/templates/blocks/DDHG-StatsFAQ/Component.tsx +40 -40
- package/templates/blocks/DDHG-TeamCards/Component.tsx +140 -131
- package/templates/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/blocks/Form/Component.tsx +163 -0
- package/templates/blocks/Form/Country/index.tsx +65 -0
- package/templates/blocks/Form/Country/options.ts +982 -0
- package/templates/blocks/Form/Email/index.tsx +38 -0
- package/templates/blocks/Form/Error/index.tsx +15 -0
- package/templates/blocks/Form/Message/index.tsx +13 -0
- package/templates/blocks/Form/Number/index.tsx +36 -0
- package/templates/blocks/Form/Select/index.tsx +63 -0
- package/templates/blocks/Form/State/index.tsx +64 -0
- package/templates/blocks/Form/State/options.ts +52 -0
- package/templates/blocks/Form/Text/index.tsx +32 -0
- package/templates/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/blocks/Form/Width/index.tsx +13 -0
- package/templates/blocks/Form/config.ts +51 -0
- package/templates/blocks/Form/fields.tsx +21 -0
- package/templates/blocks/Form/manifest.json +168 -0
- package/templates/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/blocks/MediaBlock/config.ts +14 -0
- package/templates/blocks/MediaBlock/manifest.json +92 -0
- package/templates/blocks/TransitionsDustedShowcase/Component.tsx +9 -0
- package/templates/blocks/TransitionsDustedShowcase/config.ts +13 -0
- package/templates/blocks/TransitionsDustedShowcase/manifest.json +80 -0
- package/templates/blocks/rawHtml/Component.tsx +25 -0
- package/templates/blocks/rawHtml/config.ts +56 -0
- package/templates/blocks/rawHtml/manifest.json +80 -0
|
@@ -1,251 +1,251 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React, { useRef } from 'react'
|
|
4
|
-
import Image from 'next/image'
|
|
5
|
-
import Link from 'next/link'
|
|
6
|
-
import { cn } from '@/utilities/ui'
|
|
7
|
-
import type { Media } from '@/payload-types'
|
|
8
|
-
import { motion, useScroll, useTransform, useSpring } from 'framer-motion'
|
|
9
|
-
|
|
10
|
-
export interface TeamMember {
|
|
11
|
-
id?: string
|
|
12
|
-
name: string
|
|
13
|
-
position: string
|
|
14
|
-
image: Media | string
|
|
15
|
-
bio?: string
|
|
16
|
-
socialLinks?: {
|
|
17
|
-
facebook?: string
|
|
18
|
-
linkedin?: string
|
|
19
|
-
twitter?: string
|
|
20
|
-
instagram?: string
|
|
21
|
-
behance?: string
|
|
22
|
-
website?: string
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface TeamCardsBlockProps {
|
|
27
|
-
blockName?: string
|
|
28
|
-
teamMembers: TeamMember[]
|
|
29
|
-
columnsPerRow?: '2' | '3' | '4'
|
|
30
|
-
cardStyle?: 'default' | 'rounded' | 'shadow' | 'bordered'
|
|
31
|
-
showBio?: boolean
|
|
32
|
-
showSocialLinks?: boolean
|
|
33
|
-
centerAlign?: boolean
|
|
34
|
-
equalHeight?: boolean
|
|
35
|
-
containerClass?: string
|
|
36
|
-
cardClass?: string
|
|
37
|
-
customContainerStyle?: React.CSSProperties
|
|
38
|
-
customCardStyle?: React.CSSProperties
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const TeamCardsComponent: React.FC<TeamCardsBlockProps> = ({
|
|
42
|
-
teamMembers = [],
|
|
43
|
-
columnsPerRow = '3',
|
|
44
|
-
cardStyle = 'default',
|
|
45
|
-
showBio = true,
|
|
46
|
-
showSocialLinks = true,
|
|
47
|
-
centerAlign = true,
|
|
48
|
-
equalHeight = true,
|
|
49
|
-
containerClass,
|
|
50
|
-
cardClass,
|
|
51
|
-
customContainerStyle,
|
|
52
|
-
customCardStyle
|
|
53
|
-
}) => {
|
|
54
|
-
const ref = useRef<HTMLDivElement>(null)
|
|
55
|
-
|
|
56
|
-
const { scrollYProgress } = useScroll({
|
|
57
|
-
target: ref,
|
|
58
|
-
offset: ['start end', 'end start']
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
const y = useTransform(scrollYProgress, [0, 1], [-50, 50])
|
|
62
|
-
const smoothY = useSpring(y, {
|
|
63
|
-
stiffness: 100,
|
|
64
|
-
damping: 30,
|
|
65
|
-
restDelta: 0.001
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
if (!teamMembers || teamMembers.length === 0) {
|
|
69
|
-
return null
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const getImageUrl = (image: Media | string): string => {
|
|
73
|
-
if (typeof image === 'string') return image
|
|
74
|
-
if (image && typeof image === 'object' && 'url' in image) {
|
|
75
|
-
return image.url || ''
|
|
76
|
-
}
|
|
77
|
-
return '/placeholder.webp'
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const getGridColumns = () => {
|
|
81
|
-
switch (columnsPerRow) {
|
|
82
|
-
case '2':
|
|
83
|
-
return 'grid-cols-1 md:grid-cols-2'
|
|
84
|
-
case '3':
|
|
85
|
-
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
|
86
|
-
case '4':
|
|
87
|
-
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4'
|
|
88
|
-
default:
|
|
89
|
-
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const getCardStyleClasses = () => {
|
|
94
|
-
switch (cardStyle) {
|
|
95
|
-
case 'rounded':
|
|
96
|
-
return 'overflow-hidden rounded-xl'
|
|
97
|
-
case 'shadow':
|
|
98
|
-
return 'shadow-lg transition-shadow duration-300 hover:shadow-xl'
|
|
99
|
-
case 'bordered':
|
|
100
|
-
return 'border border-gray-200 transition-colors hover:border-gray-300'
|
|
101
|
-
default:
|
|
102
|
-
return ''
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const getSocialIcon = (platform: string) => {
|
|
107
|
-
const icons = {
|
|
108
|
-
facebook: (
|
|
109
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
110
|
-
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
|
|
111
|
-
</svg>
|
|
112
|
-
),
|
|
113
|
-
linkedin: (
|
|
114
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
115
|
-
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
|
|
116
|
-
</svg>
|
|
117
|
-
),
|
|
118
|
-
twitter: (
|
|
119
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
120
|
-
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" />
|
|
121
|
-
</svg>
|
|
122
|
-
),
|
|
123
|
-
instagram: (
|
|
124
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
125
|
-
<path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 6.62 5.367 11.987 11.988 11.987 6.62 0 11.987-5.367 11.987-11.987C24.014 5.367 18.637.001 12.017.001zM8.449 16.988c-1.297 0-2.348-1.051-2.348-2.348s1.051-2.348 2.348-2.348 2.348 1.051 2.348 2.348-1.051 2.348-2.348 2.348zm7.718 0c-1.297 0-2.348-1.051-2.348-2.348s1.051-2.348 2.348-2.348 2.348 1.051 2.348 2.348-1.051 2.348-2.348 2.348z" />
|
|
126
|
-
</svg>
|
|
127
|
-
),
|
|
128
|
-
behance: (
|
|
129
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
130
|
-
<path d="M22 7h-7v-2h7v2zm1.726 10c-.442 1.297-2.029 2-5.101 2-2.981 0-5.329-1.058-5.329-4.437 0-3.329 2.212-4.663 5.329-4.663 3.329 0 5.329 1.334 5.329 4.663 0 .191-.007.381-.014.572h-8.198c.039 1.674.98 2.511 2.329 2.511 1.297 0 1.985-.3 2.329-1.297h2.329c-.726 2.329-2.726 2.651-5.329 2.651-2.726 0-5.329-1.297-5.329-4.664 0-3.329 2.212-4.664 5.329-4.664 3.329 0 5.329 1.334 5.329 4.664 0 .191-.007.381-.014.572h-8.198c.039 1.674.98 2.511 2.329 2.511 1.297 0 1.985-.3 2.329-1.297h2.329zm-11.726-9h-9v2h9v-2z" />
|
|
131
|
-
</svg>
|
|
132
|
-
),
|
|
133
|
-
website: (
|
|
134
|
-
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
135
|
-
<path d="M12
|
|
136
|
-
</svg>
|
|
137
|
-
)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return icons[platform as keyof typeof icons] || null
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<section
|
|
145
|
-
ref={ref}
|
|
146
|
-
className={cn('team-cards w-full py-8 md:py-10 lg:py-12', containerClass)}
|
|
147
|
-
style={customContainerStyle}
|
|
148
|
-
>
|
|
149
|
-
<div className="mx-auto w-full max-w-6xl px-4">
|
|
150
|
-
<div
|
|
151
|
-
className={cn('grid gap-8 p-0', getGridColumns(), equalHeight && 'items-stretch')}
|
|
152
|
-
style={{
|
|
153
|
-
padding: '0rem'
|
|
154
|
-
}}
|
|
155
|
-
>
|
|
156
|
-
{teamMembers.map((member, index) => (
|
|
157
|
-
<div
|
|
158
|
-
key={member.id || index}
|
|
159
|
-
className={cn(
|
|
160
|
-
'team-card group relative min-h-[520px] cursor-pointer overflow-hidden bg-transparent transition-all duration-300 ease-in-out hover:-translate-y-2 hover:shadow-[0_4px_12px_rgba(0,0,0,0.1)]',
|
|
161
|
-
'[&_.card-name-title]:translate-y-24 [&_.card-name-title]:text-white [&_.card-name-title]:
|
|
162
|
-
'hover:[&_.card-name-title]
|
|
163
|
-
'[&_.hover-bio-container]:bg-[#f0f8ff1c] [&_.hover-bio-container]:backdrop-blur-lg [&_.hover-bio-container]:invert-0',
|
|
164
|
-
'[&_.bg-overlay-pattern]:bottom-0 [&_.bg-overlay-pattern]:z-[1] [&_.bg-overlay-pattern]:mt-auto [&_.bg-overlay-pattern]:h-48',
|
|
165
|
-
getCardStyleClasses(),
|
|
166
|
-
equalHeight && 'h-full',
|
|
167
|
-
'h-[30rem] md:h-[32rem]',
|
|
168
|
-
cardClass
|
|
169
|
-
)}
|
|
170
|
-
style={customCardStyle}
|
|
171
|
-
>
|
|
172
|
-
<div
|
|
173
|
-
className="relative h-full w-full overflow-hidden"
|
|
174
|
-
style={{ mixBlendMode: 'darken' }}
|
|
175
|
-
>
|
|
176
|
-
<motion.div style={{ y: smoothY }} className="relative h-[110%] w-full">
|
|
177
|
-
<Image
|
|
178
|
-
src={getImageUrl(member.image)}
|
|
179
|
-
alt={member.name}
|
|
180
|
-
fill
|
|
181
|
-
className="object-cover transition-transform duration-500 ease-out group-hover:scale-110"
|
|
182
|
-
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
183
|
-
/>
|
|
184
|
-
</motion.div>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
<div className="bg-overlay-pattern absolute inset-x-0 bg-lines" />
|
|
188
|
-
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent transition-all duration-300 group-hover:from-black/90" />
|
|
189
|
-
|
|
190
|
-
<div className="absolute inset-0 flex flex-col justify-end p-2 text-white">
|
|
191
|
-
<div
|
|
192
|
-
className={cn(
|
|
193
|
-
'card-name-title z-10 bg-lines-light',
|
|
194
|
-
centerAlign && 'text-center'
|
|
195
|
-
)}
|
|
196
|
-
>
|
|
197
|
-
<h3 className="mb-1 bg-lines-light text-xl font-bold text-white drop-shadow-lg md:text-xl">
|
|
198
|
-
{member.name}
|
|
199
|
-
</h3>
|
|
200
|
-
<p
|
|
201
|
-
className="
|
|
202
|
-
style={{ textShadow: '1px 1px 16px #000000' }}
|
|
203
|
-
>
|
|
204
|
-
{member.position}
|
|
205
|
-
</p>
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<div className="hover-bio-container translate-y-full p-4 leading-relaxed shadow-xl transition-transform duration-300 ease-out group-hover:translate-y-0 group-hover:shadow-2xl">
|
|
209
|
-
{showBio && member.bio && (
|
|
210
|
-
<p className="hg-color-50 mb-4 text-xs leading-relaxed opacity-0 transition-opacity delay-100 duration-300 group-hover:opacity-100">
|
|
211
|
-
{member.bio}
|
|
212
|
-
</p>
|
|
213
|
-
)}
|
|
214
|
-
|
|
215
|
-
{showSocialLinks && member.socialLinks && (
|
|
216
|
-
<div
|
|
217
|
-
className={cn(
|
|
218
|
-
'flex scale-90 gap-3 opacity-0 transition-opacity delay-200 duration-300 group-hover:opacity-100',
|
|
219
|
-
centerAlign ? 'justify-center' : 'justify-start'
|
|
220
|
-
)}
|
|
221
|
-
>
|
|
222
|
-
{Object.entries(member.socialLinks).map(([platform, url]) => {
|
|
223
|
-
if (!url) return null
|
|
224
|
-
|
|
225
|
-
return (
|
|
226
|
-
<Link
|
|
227
|
-
key={platform}
|
|
228
|
-
href={url}
|
|
229
|
-
target="_blank"
|
|
230
|
-
rel="noopener noreferrer"
|
|
231
|
-
className="rounded-full bg-white/10 p-2 text-white/80 backdrop-blur-sm transition-all duration-200 hover:scale-110 hover:bg-white/20 hover:text-white"
|
|
232
|
-
aria-label={`${member.name} on ${platform}`}
|
|
233
|
-
>
|
|
234
|
-
{getSocialIcon(platform)}
|
|
235
|
-
</Link>
|
|
236
|
-
)
|
|
237
|
-
})}
|
|
238
|
-
</div>
|
|
239
|
-
)}
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
))}
|
|
244
|
-
</div>
|
|
245
|
-
</div>
|
|
246
|
-
</section>
|
|
247
|
-
)
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export const DDTeamCards = TeamCardsComponent
|
|
251
|
-
export default TeamCardsComponent
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { useRef } from 'react'
|
|
4
|
+
import Image from 'next/image'
|
|
5
|
+
import Link from 'next/link'
|
|
6
|
+
import { cn } from '@/utilities/ui'
|
|
7
|
+
import type { Media } from '@/payload-types'
|
|
8
|
+
import { motion, useScroll, useTransform, useSpring } from 'framer-motion'
|
|
9
|
+
|
|
10
|
+
export interface TeamMember {
|
|
11
|
+
id?: string
|
|
12
|
+
name: string
|
|
13
|
+
position: string
|
|
14
|
+
image: Media | string
|
|
15
|
+
bio?: string
|
|
16
|
+
socialLinks?: {
|
|
17
|
+
facebook?: string
|
|
18
|
+
linkedin?: string
|
|
19
|
+
twitter?: string
|
|
20
|
+
instagram?: string
|
|
21
|
+
behance?: string
|
|
22
|
+
website?: string
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface TeamCardsBlockProps {
|
|
27
|
+
blockName?: string
|
|
28
|
+
teamMembers: TeamMember[]
|
|
29
|
+
columnsPerRow?: '2' | '3' | '4'
|
|
30
|
+
cardStyle?: 'default' | 'rounded' | 'shadow' | 'bordered'
|
|
31
|
+
showBio?: boolean
|
|
32
|
+
showSocialLinks?: boolean
|
|
33
|
+
centerAlign?: boolean
|
|
34
|
+
equalHeight?: boolean
|
|
35
|
+
containerClass?: string
|
|
36
|
+
cardClass?: string
|
|
37
|
+
customContainerStyle?: React.CSSProperties
|
|
38
|
+
customCardStyle?: React.CSSProperties
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const TeamCardsComponent: React.FC<TeamCardsBlockProps> = ({
|
|
42
|
+
teamMembers = [],
|
|
43
|
+
columnsPerRow = '3',
|
|
44
|
+
cardStyle = 'default',
|
|
45
|
+
showBio = true,
|
|
46
|
+
showSocialLinks = true,
|
|
47
|
+
centerAlign = true,
|
|
48
|
+
equalHeight = true,
|
|
49
|
+
containerClass,
|
|
50
|
+
cardClass,
|
|
51
|
+
customContainerStyle,
|
|
52
|
+
customCardStyle,
|
|
53
|
+
}) => {
|
|
54
|
+
const ref = useRef<HTMLDivElement>(null)
|
|
55
|
+
|
|
56
|
+
const { scrollYProgress } = useScroll({
|
|
57
|
+
target: ref,
|
|
58
|
+
offset: ['start end', 'end start'],
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
const y = useTransform(scrollYProgress, [0, 1], [-50, 50])
|
|
62
|
+
const smoothY = useSpring(y, {
|
|
63
|
+
stiffness: 100,
|
|
64
|
+
damping: 30,
|
|
65
|
+
restDelta: 0.001,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
if (!teamMembers || teamMembers.length === 0) {
|
|
69
|
+
return null
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const getImageUrl = (image: Media | string): string => {
|
|
73
|
+
if (typeof image === 'string') return image
|
|
74
|
+
if (image && typeof image === 'object' && 'url' in image) {
|
|
75
|
+
return image.url || ''
|
|
76
|
+
}
|
|
77
|
+
return '/placeholder.webp'
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const getGridColumns = () => {
|
|
81
|
+
switch (columnsPerRow) {
|
|
82
|
+
case '2':
|
|
83
|
+
return 'grid-cols-1 md:grid-cols-2'
|
|
84
|
+
case '3':
|
|
85
|
+
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
|
86
|
+
case '4':
|
|
87
|
+
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4'
|
|
88
|
+
default:
|
|
89
|
+
return 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const getCardStyleClasses = () => {
|
|
94
|
+
switch (cardStyle) {
|
|
95
|
+
case 'rounded':
|
|
96
|
+
return 'overflow-hidden rounded-xl'
|
|
97
|
+
case 'shadow':
|
|
98
|
+
return 'shadow-lg transition-shadow duration-300 hover:shadow-xl'
|
|
99
|
+
case 'bordered':
|
|
100
|
+
return 'border border-gray-200 transition-colors hover:border-gray-300'
|
|
101
|
+
default:
|
|
102
|
+
return ''
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const getSocialIcon = (platform: string) => {
|
|
107
|
+
const icons = {
|
|
108
|
+
facebook: (
|
|
109
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
110
|
+
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
|
|
111
|
+
</svg>
|
|
112
|
+
),
|
|
113
|
+
linkedin: (
|
|
114
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
115
|
+
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
|
|
116
|
+
</svg>
|
|
117
|
+
),
|
|
118
|
+
twitter: (
|
|
119
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
120
|
+
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" />
|
|
121
|
+
</svg>
|
|
122
|
+
),
|
|
123
|
+
instagram: (
|
|
124
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
125
|
+
<path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 6.62 5.367 11.987 11.988 11.987 6.62 0 11.987-5.367 11.987-11.987C24.014 5.367 18.637.001 12.017.001zM8.449 16.988c-1.297 0-2.348-1.051-2.348-2.348s1.051-2.348 2.348-2.348 2.348 1.051 2.348 2.348-1.051 2.348-2.348 2.348zm7.718 0c-1.297 0-2.348-1.051-2.348-2.348s1.051-2.348 2.348-2.348 2.348 1.051 2.348 2.348-1.051 2.348-2.348 2.348z" />
|
|
126
|
+
</svg>
|
|
127
|
+
),
|
|
128
|
+
behance: (
|
|
129
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
130
|
+
<path d="M22 7h-7v-2h7v2zm1.726 10c-.442 1.297-2.029 2-5.101 2-2.981 0-5.329-1.058-5.329-4.437 0-3.329 2.212-4.663 5.329-4.663 3.329 0 5.329 1.334 5.329 4.663 0 .191-.007.381-.014.572h-8.198c.039 1.674.98 2.511 2.329 2.511 1.297 0 1.985-.3 2.329-1.297h2.329c-.726 2.329-2.726 2.651-5.329 2.651-2.726 0-5.329-1.297-5.329-4.664 0-3.329 2.212-4.664 5.329-4.664 3.329 0 5.329 1.334 5.329 4.664 0 .191-.007.381-.014.572h-8.198c.039 1.674.98 2.511 2.329 2.511 1.297 0 1.985-.3 2.329-1.297h2.329zm-11.726-9h-9v2h9v-2z" />
|
|
131
|
+
</svg>
|
|
132
|
+
),
|
|
133
|
+
website: (
|
|
134
|
+
<svg className="h-5 w-5" fill="currentColor" viewBox="0 0 24 24">
|
|
135
|
+
<path d="M12 .7a11.3 11.3 0 0 0-3.57 22.03c.57.1.78-.25.78-.55v-2.16c-3.18.69-3.85-1.35-3.85-1.35-.52-1.32-1.27-1.67-1.27-1.67-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.68 1.25 3.33.96.1-.74.4-1.25.73-1.54-2.54-.29-5.21-1.27-5.21-5.65 0-1.25.45-2.27 1.18-3.07-.12-.29-.51-1.45.11-3.02 0 0 .96-.31 3.14 1.17A10.9 10.9 0 0 1 12 6.01c.97 0 1.94.13 2.85.38 2.18-1.48 3.14-1.17 3.14-1.17.62 1.57.23 2.73.11 3.02.73.8 1.18 1.82 1.18 3.07 0 4.39-2.68 5.35-5.22 5.64.41.35.77 1.04.77 2.1v3.12c0 .3.21.66.79.55A11.3 11.3 0 0 0 12 .7Z" />
|
|
136
|
+
</svg>
|
|
137
|
+
),
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return icons[platform as keyof typeof icons] || null
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<section
|
|
145
|
+
ref={ref}
|
|
146
|
+
className={cn('team-cards w-full py-8 md:py-10 lg:py-12', containerClass)}
|
|
147
|
+
style={customContainerStyle}
|
|
148
|
+
>
|
|
149
|
+
<div className="mx-auto w-full max-w-6xl px-4">
|
|
150
|
+
<div
|
|
151
|
+
className={cn('grid gap-8 p-0', getGridColumns(), equalHeight && 'items-stretch')}
|
|
152
|
+
style={{
|
|
153
|
+
padding: '0rem',
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
{teamMembers.map((member, index) => (
|
|
157
|
+
<div
|
|
158
|
+
key={member.id || index}
|
|
159
|
+
className={cn(
|
|
160
|
+
'team-card group relative min-h-[520px] cursor-pointer overflow-hidden bg-transparent transition-all duration-300 ease-in-out hover:-translate-y-2 hover:shadow-[0_4px_12px_rgba(0,0,0,0.1)]',
|
|
161
|
+
'[&_.card-name-title]:translate-y-24 [&_.card-name-title]:text-white [&_.card-name-title]:transition-all [&_.card-name-title]:duration-300 [&_.card-name-title]:ease-in-out',
|
|
162
|
+
'hover:[&_.card-name-title]:translate-y-0 hover:[&_.card-name-title]:bg-black/75 hover:[&_.card-name-title]:px-4 hover:[&_.card-name-title]:py-3 hover:[&_.card-name-title]:backdrop-blur-sm',
|
|
163
|
+
'[&_.hover-bio-container]:bg-[#f0f8ff1c] [&_.hover-bio-container]:backdrop-blur-lg [&_.hover-bio-container]:invert-0',
|
|
164
|
+
'[&_.bg-overlay-pattern]:bottom-0 [&_.bg-overlay-pattern]:z-[1] [&_.bg-overlay-pattern]:mt-auto [&_.bg-overlay-pattern]:h-48',
|
|
165
|
+
getCardStyleClasses(),
|
|
166
|
+
equalHeight && 'h-full',
|
|
167
|
+
'h-[30rem] md:h-[32rem]',
|
|
168
|
+
cardClass,
|
|
169
|
+
)}
|
|
170
|
+
style={customCardStyle}
|
|
171
|
+
>
|
|
172
|
+
<div
|
|
173
|
+
className="relative h-full w-full overflow-hidden"
|
|
174
|
+
style={{ mixBlendMode: 'darken' }}
|
|
175
|
+
>
|
|
176
|
+
<motion.div style={{ y: smoothY }} className="relative h-[110%] w-full">
|
|
177
|
+
<Image
|
|
178
|
+
src={getImageUrl(member.image)}
|
|
179
|
+
alt={member.name}
|
|
180
|
+
fill
|
|
181
|
+
className="object-cover transition-transform duration-500 ease-out group-hover:scale-110"
|
|
182
|
+
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
|
183
|
+
/>
|
|
184
|
+
</motion.div>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<div className="bg-overlay-pattern absolute inset-x-0 bg-lines" />
|
|
188
|
+
<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent transition-all duration-300 group-hover:from-black/90" />
|
|
189
|
+
|
|
190
|
+
<div className="absolute inset-0 flex flex-col justify-end p-2 text-white">
|
|
191
|
+
<div
|
|
192
|
+
className={cn(
|
|
193
|
+
'card-name-title z-10 bg-lines-light',
|
|
194
|
+
centerAlign && 'text-center',
|
|
195
|
+
)}
|
|
196
|
+
>
|
|
197
|
+
<h3 className="mb-1 bg-lines-light text-xl font-bold text-white drop-shadow-lg md:text-xl">
|
|
198
|
+
{member.name}
|
|
199
|
+
</h3>
|
|
200
|
+
<p
|
|
201
|
+
className="text-shadow mb-4 bg-lines-light text-sm font-bold uppercase text-white drop-shadow-[0_2px_8px_rgba(0,0,0,0.95)] md:text-base"
|
|
202
|
+
style={{ textShadow: '1px 1px 16px #000000' }}
|
|
203
|
+
>
|
|
204
|
+
{member.position}
|
|
205
|
+
</p>
|
|
206
|
+
</div>
|
|
207
|
+
|
|
208
|
+
<div className="hover-bio-container translate-y-full p-4 leading-relaxed shadow-xl transition-transform duration-300 ease-out group-hover:translate-y-0 group-hover:shadow-2xl">
|
|
209
|
+
{showBio && member.bio && (
|
|
210
|
+
<p className="hg-color-50 mb-4 text-xs leading-relaxed opacity-0 transition-opacity delay-100 duration-300 group-hover:opacity-100">
|
|
211
|
+
{member.bio}
|
|
212
|
+
</p>
|
|
213
|
+
)}
|
|
214
|
+
|
|
215
|
+
{showSocialLinks && member.socialLinks && (
|
|
216
|
+
<div
|
|
217
|
+
className={cn(
|
|
218
|
+
'flex scale-90 gap-3 opacity-0 transition-opacity delay-200 duration-300 group-hover:opacity-100',
|
|
219
|
+
centerAlign ? 'justify-center' : 'justify-start',
|
|
220
|
+
)}
|
|
221
|
+
>
|
|
222
|
+
{Object.entries(member.socialLinks).map(([platform, url]) => {
|
|
223
|
+
if (!url) return null
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<Link
|
|
227
|
+
key={platform}
|
|
228
|
+
href={url}
|
|
229
|
+
target="_blank"
|
|
230
|
+
rel="noopener noreferrer"
|
|
231
|
+
className="rounded-full bg-white/10 p-2 text-white/80 backdrop-blur-sm transition-all duration-200 hover:scale-110 hover:bg-white/20 hover:text-white"
|
|
232
|
+
aria-label={`${member.name} on ${platform === 'website' ? 'GitHub' : platform}`}
|
|
233
|
+
>
|
|
234
|
+
{getSocialIcon(platform)}
|
|
235
|
+
</Link>
|
|
236
|
+
)
|
|
237
|
+
})}
|
|
238
|
+
</div>
|
|
239
|
+
)}
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
))}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</section>
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export const DDTeamCards = TeamCardsComponent
|
|
251
|
+
export default TeamCardsComponent
|