blocks-dusted 0.1.10 → 0.1.11

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 (246) hide show
  1. package/README.md +35 -0
  2. package/package.json +1 -1
  3. package/src/utils/paths.js +13 -13
  4. package/templates/blocks/DD-Accordion/Component.tsx +229 -0
  5. package/templates/blocks/DD-Accordion/README.md +3 -0
  6. package/templates/blocks/DD-Accordion/config.ts +73 -0
  7. package/templates/blocks/DD-Accordion/manifest.json +75 -0
  8. package/templates/blocks/DD-AnimText/Component.tsx +788 -0
  9. package/templates/blocks/DD-AnimText/README.md +3 -0
  10. package/templates/blocks/DD-AnimText/config.ts +295 -0
  11. package/templates/blocks/DD-AnimText/manifest.json +85 -0
  12. package/templates/blocks/DD-AsideNav/Component.tsx +321 -0
  13. package/templates/blocks/DD-AsideNav/config.ts +204 -0
  14. package/templates/blocks/DD-AsideNav/manifest.json +80 -0
  15. package/templates/blocks/DD-Banner/Component.tsx +51 -0
  16. package/templates/blocks/DD-Banner/config.ts +57 -0
  17. package/templates/blocks/DD-Banner/manifest.json +72 -0
  18. package/templates/blocks/DD-BgLightning/Component.tsx +44 -0
  19. package/templates/blocks/DD-BgLightning/README.md +3 -0
  20. package/templates/blocks/DD-BgLightning/config.ts +97 -0
  21. package/templates/blocks/DD-BgLightning/manifest.json +79 -0
  22. package/templates/blocks/DD-BookCall/Component.tsx +10 -11
  23. package/templates/blocks/DD-BookCall/config.ts +238 -238
  24. package/templates/blocks/DD-ButtonPop/Component.tsx +117 -0
  25. package/templates/blocks/DD-ButtonPop/config.ts +105 -0
  26. package/templates/blocks/DD-ButtonPop/manifest.json +88 -0
  27. package/templates/blocks/DD-ButtonPop/svg-icons/Dust2.tsx +167 -0
  28. package/templates/blocks/DD-Card/Component.tsx +251 -0
  29. package/templates/blocks/DD-Card/README.md +4 -0
  30. package/templates/blocks/DD-Card/config.ts +154 -0
  31. package/templates/blocks/DD-Card/manifest.json +82 -0
  32. package/templates/blocks/DD-CardTemplate01/Component.tsx +5 -6
  33. package/templates/blocks/DD-CardTemplate01/config.ts +106 -106
  34. package/templates/blocks/DD-Carousel-A/Component.tsx +249 -249
  35. package/templates/blocks/DD-Carousel-B/Component.tsx +403 -403
  36. package/templates/blocks/DD-Chip/Component.tsx +250 -0
  37. package/templates/blocks/DD-Chip/EXAMPLES.md +313 -0
  38. package/templates/blocks/DD-Chip/README.md +202 -0
  39. package/templates/blocks/DD-Chip/config.ts +369 -0
  40. package/templates/blocks/DD-Chip/manifest.json +74 -0
  41. package/templates/blocks/DD-ComparisonTable/Component.tsx +256 -256
  42. package/templates/blocks/DD-Contact/Component.tsx +434 -434
  43. package/templates/blocks/DD-Contact/config.ts +22 -22
  44. package/templates/blocks/DD-Counter/Component.tsx +190 -0
  45. package/templates/blocks/DD-Counter/README.md +4 -0
  46. package/templates/blocks/DD-Counter/config.ts +291 -0
  47. package/templates/blocks/DD-Counter/manifest.json +74 -0
  48. package/templates/blocks/DD-CustomCSS/Component.tsx +8 -0
  49. package/templates/blocks/DD-CustomCSS/README.md +4 -0
  50. package/templates/blocks/DD-CustomCSS/addToLayout.md +5 -0
  51. package/templates/blocks/DD-CustomCSS/config.ts +22 -0
  52. package/templates/blocks/DD-CustomCSS/manifest.json +72 -0
  53. package/templates/blocks/DD-CustomCSS/renderCustomCSS.md +7 -0
  54. package/templates/blocks/DD-FeatCat/Component.tsx +302 -302
  55. package/templates/blocks/DD-FeatCat/config.ts +201 -201
  56. package/templates/blocks/DD-FeatStrip/Component.tsx +585 -585
  57. package/templates/blocks/DD-FeatStrip/config.ts +134 -134
  58. package/templates/blocks/DD-FluidBtn/ButtonsEyeCatching.tsx +628 -0
  59. package/templates/blocks/DD-FluidBtn/Component.tsx +43 -0
  60. package/templates/blocks/DD-FluidBtn/README.md +6 -0
  61. package/templates/blocks/DD-FluidBtn/config.ts +102 -0
  62. package/templates/blocks/DD-FluidBtn/manifest.json +86 -0
  63. package/templates/blocks/DD-GooeyInfo/Component.tsx +149 -0
  64. package/templates/blocks/DD-GooeyInfo/config.ts +135 -0
  65. package/templates/blocks/DD-GooeyInfo/manifest.json +72 -0
  66. package/templates/blocks/DD-Hero/Component.tsx +40 -17
  67. package/templates/blocks/DD-Hero/config.ts +267 -267
  68. package/templates/blocks/DD-HorizontalScroll/Component.tsx +4 -2
  69. package/templates/blocks/DD-HorizontalScroll/config.ts +231 -231
  70. package/templates/blocks/DD-Icon/Component.tsx +287 -0
  71. package/templates/blocks/DD-Icon/README.md +4 -0
  72. package/templates/blocks/DD-Icon/config.ts +258 -0
  73. package/templates/blocks/DD-Icon/hooks/revalidateBlockIds.ts +66 -0
  74. package/templates/blocks/DD-Icon/manifest.json +82 -0
  75. package/templates/blocks/DD-IconButton/Component.tsx +455 -0
  76. package/templates/blocks/DD-IconButton/README.md +326 -0
  77. package/templates/blocks/DD-IconButton/config.ts +239 -0
  78. package/templates/blocks/DD-IconButton/manifest.json +85 -0
  79. package/templates/blocks/DD-IdTag/Component.tsx +21 -0
  80. package/templates/blocks/DD-IdTag/README.md +4 -0
  81. package/templates/blocks/DD-IdTag/config.ts +41 -0
  82. package/templates/blocks/DD-IdTag/manifest.json +72 -0
  83. package/templates/blocks/DD-Iframe/Component.tsx +45 -0
  84. package/templates/blocks/DD-Iframe/README.md +4 -0
  85. package/templates/blocks/DD-Iframe/config.ts +47 -0
  86. package/templates/blocks/DD-Iframe/manifest.json +72 -0
  87. package/templates/blocks/DD-IframeMedia/Component.tsx +129 -0
  88. package/templates/blocks/DD-IframeMedia/README.md +4 -0
  89. package/templates/blocks/DD-IframeMedia/config.ts +79 -0
  90. package/templates/blocks/DD-IframeMedia/manifest.json +72 -0
  91. package/templates/blocks/DD-LineAnim/Component.tsx +36 -0
  92. package/templates/blocks/DD-LineAnim/README.md +4 -0
  93. package/templates/blocks/DD-LineAnim/config.ts +90 -0
  94. package/templates/blocks/DD-LineAnim/manifest.json +80 -0
  95. package/templates/blocks/DD-LinkGrid/Component.tsx +119 -0
  96. package/templates/blocks/DD-LinkGrid/README.md +4 -0
  97. package/templates/blocks/DD-LinkGrid/config.ts +51 -0
  98. package/templates/blocks/DD-LinkGrid/manifest.json +74 -0
  99. package/templates/blocks/DD-LogoMarq/Component.tsx +132 -0
  100. package/templates/blocks/DD-LogoMarq/README.md +4 -0
  101. package/templates/blocks/DD-LogoMarq/config.ts +264 -0
  102. package/templates/blocks/DD-LogoMarq/manifest.json +82 -0
  103. package/templates/blocks/DD-Lottie/Component.tsx +459 -0
  104. package/templates/blocks/DD-Lottie/README.md +4 -0
  105. package/templates/blocks/DD-Lottie/config.ts +379 -0
  106. package/templates/blocks/DD-Lottie/index.tsx +28 -0
  107. package/templates/blocks/DD-Lottie/manifest.json +83 -0
  108. package/templates/blocks/DD-MagicBento/Component.tsx +777 -0
  109. package/templates/blocks/DD-MagicBento/README.md +4 -0
  110. package/templates/blocks/DD-MagicBento/config.ts +264 -0
  111. package/templates/blocks/DD-MagicBento/manifest.json +74 -0
  112. package/templates/blocks/DD-MasonaryMedia/Component.tsx +547 -545
  113. package/templates/blocks/DD-MasonaryMedia/config.ts +2 -2
  114. package/templates/blocks/DD-MasonaryMedia/vendor.d.ts +2 -2
  115. package/templates/blocks/DD-Masonry/Component.tsx +645 -0
  116. package/templates/blocks/DD-Masonry/README.md +4 -0
  117. package/templates/blocks/DD-Masonry/config.ts +475 -0
  118. package/templates/blocks/DD-Masonry/manifest.json +82 -0
  119. package/templates/blocks/DD-Pricing/Component.tsx +372 -372
  120. package/templates/blocks/DD-Process/Component.tsx +149 -149
  121. package/templates/blocks/DD-Process/config.ts +150 -150
  122. package/templates/blocks/DD-Progress/Component.tsx +141 -0
  123. package/templates/blocks/DD-Progress/README.md +4 -0
  124. package/templates/blocks/DD-Progress/config.ts +175 -0
  125. package/templates/blocks/DD-Progress/manifest.json +74 -0
  126. package/templates/blocks/DD-ProjHeader/Component.tsx +91 -0
  127. package/templates/blocks/DD-ProjHeader/README.md +4 -0
  128. package/templates/blocks/DD-ProjHeader/config.ts +96 -0
  129. package/templates/blocks/DD-ProjHeader/manifest.json +72 -0
  130. package/templates/blocks/DD-ProjSlider/Component.tsx +123 -0
  131. package/templates/blocks/DD-ProjSlider/README.md +4 -0
  132. package/templates/blocks/DD-ProjSlider/config.ts +64 -0
  133. package/templates/blocks/DD-ProjSlider/manifest.json +72 -0
  134. package/templates/blocks/DD-ScrollText/Component.tsx +114 -0
  135. package/templates/blocks/DD-ScrollText/README.md +4 -0
  136. package/templates/blocks/DD-ScrollText/config.ts +58 -0
  137. package/templates/blocks/DD-ScrollText/manifest.json +72 -0
  138. package/templates/blocks/DD-Section/Component.tsx +266 -266
  139. package/templates/blocks/DD-Separator/Component.tsx +66 -0
  140. package/templates/blocks/DD-Separator/README.md +4 -0
  141. package/templates/blocks/DD-Separator/config.ts +58 -0
  142. package/templates/blocks/DD-Separator/manifest.json +72 -0
  143. package/templates/blocks/DD-Services/Component.tsx +176 -176
  144. package/templates/blocks/DD-Services/config.ts +149 -149
  145. package/templates/blocks/DD-ShowcaseGrid/Component.tsx +307 -307
  146. package/templates/blocks/DD-Slider-A/Component.tsx +237 -237
  147. package/templates/blocks/DD-StackCards/Component.tsx +473 -473
  148. package/templates/blocks/DD-StackCards/config.ts +399 -399
  149. package/templates/blocks/DD-Team/Component.tsx +247 -247
  150. package/templates/blocks/DD-Team/config.ts +173 -173
  151. package/templates/blocks/DD-TeamCards/Component.tsx +251 -0
  152. package/templates/blocks/DD-TeamCards/README.md +4 -0
  153. package/templates/blocks/DD-TeamCards/config.ts +302 -0
  154. package/templates/blocks/DD-TeamCards/manifest.json +74 -0
  155. package/templates/blocks/DD-TechStack/Component.tsx +168 -162
  156. package/templates/blocks/DD-TechStack/config.ts +153 -153
  157. package/templates/blocks/DD-TestMarq/Component.tsx +132 -0
  158. package/templates/blocks/DD-TestMarq/README.md +4 -0
  159. package/templates/blocks/DD-TestMarq/RowLabel.tsx +9 -0
  160. package/templates/blocks/DD-TestMarq/config.ts +88 -0
  161. package/templates/blocks/DD-TestMarq/manifest.json +72 -0
  162. package/templates/blocks/DD-Testim/Component.tsx +247 -0
  163. package/templates/blocks/DD-Testim/README.md +4 -0
  164. package/templates/blocks/DD-Testim/config.ts +101 -0
  165. package/templates/blocks/DD-Testim/manifest.json +75 -0
  166. package/templates/blocks/DD-Testim2/Component.tsx +256 -0
  167. package/templates/blocks/DD-Testim2/README.md +4 -0
  168. package/templates/blocks/DD-Testim2/config.ts +100 -0
  169. package/templates/blocks/DD-Testim2/manifest.json +74 -0
  170. package/templates/blocks/DD-Testimonials/Component.tsx +147 -147
  171. package/templates/blocks/DD-Testimonials/config.ts +120 -120
  172. package/templates/blocks/DD-TextMarq/Component.tsx +157 -0
  173. package/templates/blocks/DD-TextMarq/README.md +4 -0
  174. package/templates/blocks/DD-TextMarq/config.ts +237 -0
  175. package/templates/blocks/DD-TextMarq/manifest.json +82 -0
  176. package/templates/blocks/DD-Thanks/Component.tsx +500 -0
  177. package/templates/blocks/DD-Thanks/README.md +4 -0
  178. package/templates/blocks/DD-Thanks/config.ts +224 -0
  179. package/templates/blocks/DD-Thanks/manifest.json +72 -0
  180. package/templates/blocks/DD-VertMarq/Component.tsx +154 -0
  181. package/templates/blocks/DD-VertMarq/README.md +4 -0
  182. package/templates/blocks/DD-VertMarq/config.ts +236 -0
  183. package/templates/blocks/DD-VertMarq/dist/index.css +6 -0
  184. package/templates/blocks/DD-VertMarq/dist/index.min.css +1 -0
  185. package/templates/blocks/DD-VertMarq/manifest.json +74 -0
  186. package/templates/blocks/DD-Work/Component.tsx +318 -315
  187. package/templates/blocks/DD-Work/config.ts +165 -165
  188. package/templates/blocks/DD-Work-B/Component.tsx +294 -294
  189. package/templates/blocks/DDHG-CTASection2/Component.tsx +185 -0
  190. package/templates/blocks/DDHG-CTASection2/config.ts +140 -0
  191. package/templates/blocks/DDHG-CTASection2/manifest.json +45 -0
  192. package/templates/blocks/DDHG-HighlightArc/Component.tsx +243 -0
  193. package/templates/blocks/DDHG-HighlightArc/config.ts +85 -0
  194. package/templates/blocks/DDHG-HighlightArc/manifest.json +46 -0
  195. package/templates/blocks/DDHG-LogoMarquee/Component.tsx +93 -0
  196. package/templates/blocks/DDHG-LogoMarquee/config.ts +66 -0
  197. package/templates/blocks/DDHG-LogoMarquee/manifest.json +39 -0
  198. package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +213 -0
  199. package/templates/blocks/DDHG-NavCodeGrid/config.ts +64 -0
  200. package/templates/blocks/DDHG-NavCodeGrid/manifest.json +45 -0
  201. package/templates/blocks/DDHG-ProcessSec/Component.tsx +575 -0
  202. package/templates/blocks/DDHG-ProcessSec/config.ts +170 -0
  203. package/templates/blocks/DDHG-ProcessSec/manifest.json +56 -0
  204. package/templates/blocks/DDHG-ServiceDetails/Component.tsx +164 -0
  205. package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +394 -0
  206. package/templates/blocks/DDHG-ServiceDetails/config.ts +77 -0
  207. package/templates/blocks/DDHG-ServiceDetails/manifest.json +50 -0
  208. package/templates/blocks/DDHG-ServiceHero/Component.tsx +234 -0
  209. package/templates/blocks/DDHG-ServiceHero/config.ts +49 -0
  210. package/templates/blocks/DDHG-ServiceHero/manifest.json +26 -0
  211. package/templates/blocks/DDHG-ServiceOverview/Component.tsx +277 -0
  212. package/templates/blocks/DDHG-ServiceOverview/config.ts +64 -0
  213. package/templates/blocks/DDHG-ServiceOverview/manifest.json +44 -0
  214. package/templates/blocks/DDHG-StatsFAQ/Component.tsx +389 -0
  215. package/templates/blocks/DDHG-StatsFAQ/config.ts +204 -0
  216. package/templates/blocks/DDHG-StatsFAQ/manifest.json +45 -0
  217. package/templates/blocks/DDHG-TeamCards/Component.tsx +131 -0
  218. package/templates/blocks/DDHG-TeamCards/config.ts +48 -0
  219. package/templates/blocks/DDHG-TeamCards/manifest.json +29 -0
  220. package/templates/shared/src/components/BgLightning/index.tsx +242 -0
  221. package/templates/shared/src/components/ui/ShareButton/index.tsx +80 -0
  222. package/templates/shared/src/components/ui/anims/FadeOnScroll.tsx +48 -0
  223. package/templates/shared/src/components/ui/anims/FadeUpOnInView.tsx +63 -0
  224. package/templates/shared/src/components/ui/anims/GlareHover.tsx +111 -0
  225. package/templates/shared/src/components/ui/anims/LineAnims.tsx +81 -0
  226. package/templates/shared/src/components/ui/anims/TitleAnims01.tsx +54 -0
  227. package/templates/shared/src/components/ui/anims/animation-container.tsx +29 -0
  228. package/templates/shared/src/components/ui/anims/blur-in.tsx +26 -0
  229. package/templates/shared/src/components/ui/anims/counter.tsx +53 -0
  230. package/templates/shared/src/components/ui/anims/fade.tsx +83 -0
  231. package/templates/shared/src/components/ui/anims/gradual-spacing.tsx +39 -0
  232. package/templates/shared/src/components/ui/anims/pull-up.tsx +93 -0
  233. package/templates/shared/src/components/ui/anims/reveal-text.tsx +76 -0
  234. package/templates/shared/src/components/ui/anims/rotate-words.tsx +43 -0
  235. package/templates/shared/src/components/ui/anims/shiny-text.tsx +58 -0
  236. package/templates/shared/src/components/ui/anims/shuffle-text.tsx +85 -0
  237. package/templates/shared/src/components/ui/anims/split-text.tsx +211 -0
  238. package/templates/shared/src/components/ui/anims/staggered-fade.tsx +133 -0
  239. package/templates/shared/src/components/ui/anims/text-scroll.tsx +111 -0
  240. package/templates/shared/src/components/ui/anims/typing-effect.tsx +112 -0
  241. package/templates/shared/src/components/ui/button-dusted-fluid/index.tsx +1521 -0
  242. package/templates/shared/src/components/ui/separator.tsx +85 -0
  243. package/templates/shared/src/hooks/useBodyScrollLock.ts +97 -0
  244. package/templates/shared/src/hooks/useClickOutside.ts +28 -0
  245. package/templates/shared/src/utilities/renderCustomCSS.ts +5 -0
  246. package/templates/shared/src/utilities/smoothScroll.ts +65 -0
@@ -0,0 +1,132 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+ import { cn } from '@/utilities/ui'
5
+ import type { Testimonial } from '@/payload-types'
6
+
7
+ type TestimonialsMarqueeBlockProps = {
8
+ heading?: string | null
9
+ testimonials?: (Testimonial | string | number)[] | null
10
+ row1Duration?: number | null
11
+ row2Duration?: number | null
12
+ sectionId?: string | null
13
+ customCSS?: string | null
14
+ }
15
+ import RichText from '@/components/RichText/index'
16
+
17
+ function TestimonialCard({ item }: { item: Testimonial }) {
18
+ const logo =
19
+ typeof item.sourceLogo === 'object' && item.sourceLogo !== null
20
+ ? (item.sourceLogo as { url?: string | null }).url
21
+ : null
22
+
23
+ return (
24
+ <div className="relative scale-90 -ml-2 -mr-2 h-fit max-w-sm shrink-0 cursor-pointer overflow-hidden rounded-xl border border-[#2A2A30] bg-[#1a1a1f] p-4 space-y-2.5">
25
+ {item.title && <h2 className="mb-2.5 text-sm font-medium text-[#8B9F6B]">{item.title}</h2>}
26
+
27
+ <div className="flex items-center gap-0">
28
+ <div className="flex items-center text-xs">
29
+ {item.ratingText && (
30
+ <span className="ml-0 font-medium text-[#E8E6E1]">{item.ratingText}</span>
31
+ )}
32
+ {item.date && <span className="ml-3 text-[#6B6860]">{item.date}</span>}
33
+ </div>
34
+ </div>
35
+
36
+ {item.content && (
37
+ <div className="text-sm text-[#9A9790]">
38
+ <RichText data={item.content} enableGutter={false} enableProse={false} />
39
+ </div>
40
+ )}
41
+
42
+ {logo && (
43
+ <img
44
+ alt={item.sourceLogoAlt || 'Source Logo'}
45
+ loading="lazy"
46
+ width={50}
47
+ height={50}
48
+ decoding="async"
49
+ src={logo}
50
+ className="mt-2 h-auto w-[50px] object-contain"
51
+ />
52
+ )}
53
+ </div>
54
+ )
55
+ }
56
+
57
+ function MarqueeRow({
58
+ items,
59
+ reverse = false,
60
+ duration = 30
61
+ }: {
62
+ items: Testimonial[]
63
+ reverse?: boolean
64
+ duration?: number
65
+ }) {
66
+ const duplicated = [...items, ...items, ...items, ...items]
67
+
68
+ return (
69
+ <div className="group flex overflow-hidden px-2 py-0 -mt-1 -mb-1 flex-row">
70
+ <div
71
+ className={cn(
72
+ 'flex scale-90 shrink-0 justify-around gap-0 flex-row will-change-transform',
73
+ reverse ? 'animate-marquee-reverse' : 'animate-marquee',
74
+ 'group-hover:[animation-play-state:paused]'
75
+ )}
76
+ style={{ animationDuration: `${duration}s` }}
77
+ >
78
+ {duplicated.map((item, idx) => (
79
+ <TestimonialCard key={idx} item={item} />
80
+ ))}
81
+ </div>
82
+ </div>
83
+ )
84
+ }
85
+
86
+ export const DDTestMarq: React.FC<TestimonialsMarqueeBlockProps> = (props) => {
87
+ const {
88
+ heading,
89
+ testimonials,
90
+ row1Duration = 35,
91
+ row2Duration = 40,
92
+ sectionId,
93
+ customCSS
94
+ } = props
95
+
96
+ const populated = (testimonials ?? []).filter(
97
+ (t: Testimonial | string | number): t is Testimonial => typeof t === 'object' && t !== null
98
+ )
99
+
100
+ if (populated.length === 0) return null
101
+
102
+ const midpoint = Math.ceil(populated.length / 2)
103
+ const row1 = populated.slice(0, midpoint)
104
+ const row2 = populated.slice(midpoint)
105
+
106
+ return (
107
+ <section id={sectionId ?? 'testimonials'} className="mx-auto max-w-8xl px-0 py-0 md:px-0">
108
+ {customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
109
+
110
+ {heading && (
111
+ <h2
112
+ className="max-w-5xl mx-auto mb-12 text-3xl font-bold tracking-tighter text-[#E8E6E1] sm:text-4xl"
113
+ style={{ fontFamily: "'Space Grotesk', sans-serif" }}
114
+ >
115
+ {heading}
116
+ </h2>
117
+ )}
118
+
119
+ <div className="relative flex w-full flex-col items-center justify-center overflow-hidden">
120
+ {row1.length > 0 && <MarqueeRow items={row1} duration={row1Duration ?? 35} />}
121
+ {row2.length > 0 && <MarqueeRow items={row2} reverse duration={row2Duration ?? 40} />}
122
+
123
+ <div className="pointer-events-none absolute inset-y-0 left-0 w-[6rem] blur-md bg-[linear-gradient(90deg,#0b0b11,#0c0b12,transparent,transparent,transparent)] mix-blend-darken" />
124
+ <div className="pointer-events-none absolute inset-y-0 left-0 w-[6rem] bg-[linear-gradient(90deg,#0b0b11,#0c0b12,transparent,transparent,transparent)] mix-blend-darken" />
125
+ <div className="pointer-events-none absolute inset-y-0 right-0 w-[6rem] blur-md bg-[linear-gradient(270deg,#09090d,#09090d,transparent,transparent,transparent)] mix-blend-darken" />
126
+ <div className="pointer-events-none absolute inset-y-0 right-0 w-[6rem] bg-[linear-gradient(270deg,#09090d,#09090d,transparent,transparent,transparent)] mix-blend-darken" />
127
+ </div>
128
+ </section>
129
+ )
130
+ }
131
+
132
+ export default DDTestMarq
@@ -0,0 +1,4 @@
1
+ # DD-TestMarq
2
+
3
+ Portable first-pass conversion of `TestimonialsMarqueeBlock` from ROUND-TWO-CONVERSION. Project-specific roots and nested unconverted block dependencies were intentionally replaced with local rendering so the template can install into a clean Payload project.
4
+
@@ -0,0 +1,9 @@
1
+ 'use client'
2
+
3
+ import React from 'react'
4
+
5
+ type RowLabelProps = { data?: { title?: string }; index?: number }
6
+
7
+ export const RowLabel: React.FC<RowLabelProps> = ({ data, index }) => {
8
+ return <div>{data?.title || `Testimonial ${String((index ?? 0) + 1).padStart(2, '0')}`}</div>
9
+ }
@@ -0,0 +1,88 @@
1
+ import type { Block } from 'payload'
2
+
3
+ export const DDTestMarq: Block = {
4
+ slug: 'DD-TestMarq',
5
+ interfaceName: 'DDTestMarq',
6
+ labels: {
7
+ singular: 'Testimonials Marquee',
8
+ plural: 'Testimonials Marquee Blocks'
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'tabs',
13
+ tabs: [
14
+ {
15
+ label: 'Content',
16
+ fields: [
17
+ {
18
+ name: 'heading',
19
+ type: 'text',
20
+ label: 'Heading',
21
+ defaultValue: 'Testimonials'
22
+ },
23
+ {
24
+ name: 'testimonials',
25
+ type: 'relationship',
26
+ relationTo: 'testimonials',
27
+ hasMany: true,
28
+ label: 'Select Testimonials',
29
+ admin: {
30
+ description:
31
+ 'Pick from the Testimonials collection. Fields used: title, quote, ratingText, date, sourceLogo, sourceLogoAlt.'
32
+ }
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ label: 'Settings',
38
+ fields: [
39
+ {
40
+ type: 'row',
41
+ fields: [
42
+ {
43
+ name: 'row1Duration',
44
+ type: 'number',
45
+ label: 'Row 1 Duration (s)',
46
+ defaultValue: 35,
47
+ min: 5,
48
+ max: 180,
49
+ admin: {
50
+ width: '50%',
51
+ description: 'Scroll speed for the first row — lower = faster.'
52
+ }
53
+ },
54
+ {
55
+ name: 'row2Duration',
56
+ type: 'number',
57
+ label: 'Row 2 Duration (s)',
58
+ defaultValue: 40,
59
+ min: 5,
60
+ max: 180,
61
+ admin: {
62
+ width: '50%',
63
+ description: 'Scroll speed for the second row — lower = faster.'
64
+ }
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ name: 'sectionId',
70
+ type: 'text',
71
+ label: 'Section ID',
72
+ defaultValue: 'testimonials',
73
+ admin: {
74
+ description: 'Unique ID for anchor linking.'
75
+ }
76
+ },
77
+ {
78
+ name: 'customCSS',
79
+ type: 'code',
80
+ label: 'Custom CSS',
81
+ admin: { language: 'css' }
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ }
87
+ ]
88
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "type": "block",
3
+ "name": "DD-TestMarq",
4
+ "label": "Testimonials Marquee",
5
+ "sourceName": "TestimonialsMarqueeBlock",
6
+ "portableName": "DD-TestMarq",
7
+ "slug": "DD-TestMarq",
8
+ "version": "0.0.1",
9
+ "source": {
10
+ "repo": "Hadizainal/DesignsDustedv3",
11
+ "originalPath": "src/blocks/ROUND-TWO-CONVERSION/TestimonialsMarqueeBlock",
12
+ "originalSlug": "testimonialsMarqueeBlock",
13
+ "originalConfigExport": "TestimonialsMarqueeBlock",
14
+ "originalComponentExport": "TestimonialsMarqueeBlock",
15
+ "originalInterfaceName": "DDTestMarq"
16
+ },
17
+ "files": [
18
+ {
19
+ "from": "Component.tsx",
20
+ "to": "src/blocks/DD-TestMarq/Component.tsx"
21
+ },
22
+ {
23
+ "from": "config.ts",
24
+ "to": "src/blocks/DD-TestMarq/config.ts"
25
+ }
26
+ ],
27
+ "dependencies": [],
28
+ "sharedFiles": [],
29
+ "requiredProjectFiles": [],
30
+ "optionalProjectFiles": [],
31
+ "collectionRegistration": {
32
+ "enabled": true,
33
+ "collections": [
34
+ "Pages",
35
+ "Posts"
36
+ ]
37
+ },
38
+ "renderBlocksRegistration": {
39
+ "enabled": true
40
+ },
41
+ "renderBlocksBehavior": {
42
+ "wrapperless": false
43
+ },
44
+ "pageRouteIntegration": {
45
+ "required": false,
46
+ "manualSteps": []
47
+ },
48
+ "manual": [
49
+ "Register DDTestMarq in Pages/Posts blocks arrays if automatic registration was skipped.",
50
+ "Register DD-TestMarq in RenderBlocks if automatic registration was skipped.",
51
+ "Run payload generate:types after schema changes."
52
+ ],
53
+ "manualSteps": [
54
+ "Register DDTestMarq in Pages/Posts blocks arrays if automatic registration was skipped.",
55
+ "Register DD-TestMarq in RenderBlocks if automatic registration was skipped.",
56
+ "Run payload generate:types after schema changes."
57
+ ],
58
+ "patchTargets": {
59
+ "blockConfigRegistration": {
60
+ "description": "Installer can add import { DDTestMarq } from '@/blocks/DD-TestMarq/config' and add DDTestMarq to clear Pages/Posts block arrays."
61
+ },
62
+ "renderBlocksRegistration": {
63
+ "description": "Installer can register DD-TestMarq in RenderBlocks."
64
+ }
65
+ },
66
+ "notes": [
67
+ "Converted from ROUND-TWO-CONVERSION as a portable Dusted template.",
68
+ "Project-specific imports were replaced with local, dependency-light rendering where required."
69
+ ],
70
+ "exportName": "DDTestMarq",
71
+ "interfaceName": "DDTestMarq"
72
+ }
@@ -0,0 +1,247 @@
1
+ 'use client'
2
+
3
+ import React, { useId, useEffect, useState } from 'react'
4
+ import { motion } from 'framer-motion'
5
+ import { Swiper, SwiperSlide } from 'swiper/react'
6
+ import { Navigation, Pagination } from 'swiper/modules'
7
+ import 'swiper/css'
8
+ import 'swiper/css/navigation'
9
+ import 'swiper/css/pagination'
10
+ import { cn } from '@/utilities/ui'
11
+ import RichText from '@/components/RichText/index'
12
+ // import { Media } from '@/components/Media'
13
+ import Image from 'next/image'
14
+
15
+ export type TestimonialItem = {
16
+ id: string
17
+ clientName: any
18
+ designation: any
19
+ company: any
20
+ content: any
21
+ companyLogo?: any
22
+ }
23
+
24
+ export type TestimonialBlockProps = {
25
+ testimonials: TestimonialItem[]
26
+ heading?: any
27
+ testimonialClass?: string
28
+ sectionId?: string
29
+ subHeader?: string
30
+ showPagination?: boolean
31
+ showNavigation?: boolean
32
+ slidesPerViewTablet?: number
33
+ slidesPerViewDesktop?: number
34
+ carouselSpeed?: number
35
+ }
36
+
37
+ export const DDTestim: React.FC<TestimonialBlockProps> = ({
38
+ testimonials,
39
+ heading,
40
+ testimonialClass,
41
+ sectionId,
42
+ subHeader,
43
+ showPagination = true,
44
+ showNavigation = true,
45
+ slidesPerViewTablet = 2,
46
+ slidesPerViewDesktop = 3,
47
+ carouselSpeed = 1000
48
+ }) => {
49
+ const uniqueId = useId().replace(/:/g, '')
50
+ const [swiperReady, setSwiperReady] = useState(false)
51
+
52
+ useEffect(() => {
53
+ setSwiperReady(true)
54
+ }, [])
55
+
56
+ if (!testimonials || testimonials.length === 0) return null
57
+
58
+ return (
59
+ <section
60
+ className={cn(
61
+ 'testimonialsSwiper relative px-0 pb-16 pt-0',
62
+ 'py-16',
63
+ '[--swiper-navigation-top-offset:82%] [--swiper-navigation-size:24px] [--swiper-navigation-sides-offset:33rem] [--swiper-navigation-color:var(--color-accent)] [--swiper-pagination-color: #5c4dfd] [--swiper-pagination-bullet-inactive-color:var(--color-alt)]',
64
+ '[&_.swiper]:min-w-[375px] [&_.swiper]:!w-full [&_.swiper]:!pb-8 [&_.swiper]:![perspective:1200px] [&_.swiper]:![transform-style:preserve-3d]',
65
+ 'max-md:[&_.swiper]:ml-0 max-md:[&_.swiper]:min-w-[300px] max-md:[&_.swiper]:scale-95',
66
+ '[&_.swiper-wrapper]:ml-[-4rem] [&_.swiper-wrapper]:scale-95 [&_.swiper-wrapper]:gap-8 [&_.swiper-wrapper]:p-0',
67
+ '[&_.swiper-pagination-fraction]:relative [&_.swiper-pagination-fraction]:top-6 [&_.swiper-pagination-fraction]:mx-auto [&_.swiper-pagination-fraction]:w-fit [&_.swiper-pagination-fraction]:max-w-[90%] [&_.swiper-pagination-fraction]:pt-4',
68
+ '[&_.swiper-pagination-custom]:relative [&_.swiper-pagination-custom]:top-6 [&_.swiper-pagination-custom]:mx-auto [&_.swiper-pagination-custom]:w-fit [&_.swiper-pagination-custom]:max-w-[90%] [&_.swiper-pagination-custom]:pt-4',
69
+ '[&_.swiper-horizontal>.swiper-pagination-bullets]:relative [&_.swiper-horizontal>.swiper-pagination-bullets]:top-6 [&_.swiper-horizontal>.swiper-pagination-bullets]:mx-auto [&_.swiper-horizontal>.swiper-pagination-bullets]:w-fit [&_.swiper-horizontal>.swiper-pagination-bullets]:max-w-[90%] [&_.swiper-horizontal>.swiper-pagination-bullets]:pt-4',
70
+ '[&_.swiper-pagination-bullets.swiper-pagination-horizontal]:relative [&_.swiper-pagination-bullets.swiper-pagination-horizontal]:top-6 [&_.swiper-pagination-bullets.swiper-pagination-horizontal]:mx-auto [&_.swiper-pagination-bullets.swiper-pagination-horizontal]:w-fit [&_.swiper-pagination-bullets.swiper-pagination-horizontal]:max-w-[90%] [&_.swiper-pagination-bullets.swiper-pagination-horizontal]:pt-4',
71
+ '[html[data-theme="light"]_&_.swiperButtonPrev]:invert [html[data-theme="light"]_&_.swiperButtonPrev]:hue-rotate-[24deg] [html[data-theme="light"]_&_.swiperButtonPrev]:transition-opacity [html[data-theme="light"]_&_.swiperButtonPrev]:duration-300',
72
+ '[html[data-theme="light"]_&_.swiperButtonNext]:invert [html[data-theme="light"]_&_.swiperButtonNext]:hue-rotate-[24deg] [html[data-theme="light"]_&_.swiperButtonNext]:transition-opacity [html[data-theme="light"]_&_.swiperButtonNext]:duration-300',
73
+ testimonialClass
74
+ )}
75
+ id={sectionId || 'testimonials'}
76
+ >
77
+ {(heading || subHeader) && (
78
+ <div className="mb-10 text-center">
79
+ {subHeader && <h6 className="text-lg font-semibold">{subHeader}</h6>}
80
+ {heading && swiperReady && (
81
+ <RichText
82
+ className="mb-6 text-2xl font-bold md:text-3xl"
83
+ data={heading}
84
+ suppressContentEditableWarning
85
+ suppressHydrationWarning
86
+ />
87
+ )}
88
+ </div>
89
+ )}
90
+
91
+ <div className="relative">
92
+ {swiperReady && (
93
+ <Swiper
94
+ modules={[Navigation, Pagination]}
95
+ pagination={showPagination ? { clickable: true } : undefined}
96
+ navigation={
97
+ showNavigation
98
+ ? {
99
+ nextEl: `.next-${uniqueId}`,
100
+ prevEl: `.prev-${uniqueId}`
101
+ }
102
+ : undefined
103
+ }
104
+ speed={carouselSpeed}
105
+ spaceBetween={20}
106
+ slidesPerView={1}
107
+ loop={testimonials.length > 1}
108
+ breakpoints={{
109
+ 768: {
110
+ slidesPerView: slidesPerViewTablet
111
+ },
112
+ 1024: {
113
+ slidesPerView: slidesPerViewDesktop
114
+ }
115
+ }}
116
+ className="swiper-container w-full lg:max-w-full"
117
+ >
118
+ {testimonials.map((testimonial) => (
119
+ <SwiperSlide key={testimonial.id} className="swiper-slide card-bottom-lit">
120
+ <motion.div
121
+ initial={{ opacity: 0, y: 30 }}
122
+ animate={{ opacity: 1, y: 0 }}
123
+ transition={{ duration: 0.4 }}
124
+ className="m-0 mt-8 flex items-center gap-0 rounded-sm bg-card px-0 shadow-xl"
125
+ >
126
+ <div className="flex-1 p-0">
127
+ <div className="relative pb-8 pt-8">
128
+ <svg
129
+ xmlns="http://www.w3.org/2000/svg"
130
+ width="256.721"
131
+ height="208.227"
132
+ viewBox="0 0 256.721 208.227"
133
+ className="absolute -left-2 -top-10 pt-8 opacity-40"
134
+ >
135
+ <path
136
+ d="M-23.723-530.169v97.327H-121.05v-68.7q0-40.076,13.359-73.472T-62.845-639.9l36.259,28.625Q-63.8-570.244-68.57-530.169Zm158.395,0v97.327H37.345v-68.7q0-40.076,13.359-73.472T95.55-639.9l36.259,28.625Q94.6-570.244,89.825-530.169Z"
137
+ transform="translate(121.55 640.568)"
138
+ fill="#fff"
139
+ stroke="#fff"
140
+ strokeWidth="1"
141
+ opacity="0.25"
142
+ />
143
+ </svg>
144
+ s
145
+ <div className="container p-4 pt-8">
146
+ {swiperReady && (
147
+ <RichText
148
+ suppressContentEditableWarning
149
+ suppressHydrationWarning
150
+ data={testimonial.content}
151
+ className={cn(
152
+ 'testimonialContent min-h-fit max-h-[50vh] text-stone-200 dark:text-stone-200 max-w-none overflow-hidden px-0 md:px-6',
153
+ '[&_.customSpan]:text-base [&_.customSpan]:leading-8 [&_.customSpan]:brightness-125',
154
+ '[&_p]:text-base [&_p]:leading-8 [&_p]:brightness-125',
155
+ 'max-md:max-h-fit max-md:[&_.customSpan]:text-base max-md:[&_.customSpan]:leading-normal'
156
+ )}
157
+ enableGutter={false}
158
+ enableProse={false}
159
+ />
160
+ )}
161
+ </div>
162
+ </div>
163
+
164
+ <div className="flex items-center pb-4 shadow-xl">
165
+ <div className="bg-4 dark:bg-1 p-4 shadow-xl">
166
+ <div className="color-base">
167
+ <div className="block">
168
+ {swiperReady && (
169
+ <RichText
170
+ suppressContentEditableWarning
171
+ suppressHydrationWarning
172
+ enableGutter={false}
173
+ enableProse={false}
174
+ className="testimonial-clientname text-lg font-semibold text-white"
175
+ data={testimonial.clientName}
176
+ />
177
+ )}
178
+ </div>
179
+ </div>
180
+
181
+ <div className="color-base font-semibold">
182
+ <div className="block">
183
+ {swiperReady && (
184
+ <RichText
185
+ suppressContentEditableWarning
186
+ suppressHydrationWarning
187
+ data={testimonial.company}
188
+ enableGutter={false}
189
+ enableProse={false}
190
+ className="testimonial-company mt-1 origin-left scale-90 text-xs text-white/80"
191
+ />
192
+ )}
193
+ </div>
194
+ </div>
195
+ </div>
196
+
197
+ {testimonial.companyLogo?.url && (
198
+ <div className="testimonialLogo relative left-2 top-2 ml-auto flex h-auto w-40 items-center justify-center pr-8 opacity-90">
199
+ {/* <Media
200
+ resource={testimonial.companyLogo}
201
+ className="max-h-32 max-w-32 object-contain"
202
+ /> */}
203
+
204
+ <Image
205
+ src={testimonial.companyLogo.url}
206
+ alt={''}
207
+ fill
208
+ sizes="40px"
209
+ className="object-cover object-top"
210
+ />
211
+ </div>
212
+ )}
213
+ </div>
214
+ </div>
215
+ </motion.div>
216
+ </SwiperSlide>
217
+ ))}
218
+ </Swiper>
219
+ )}
220
+ </div>
221
+
222
+ {showNavigation && (
223
+ <div className="swiperNavArrows relative top-[-50px] flex justify-center">
224
+ <button
225
+ className={cn(
226
+ `swiperButtonPrev swiper-button-prev prev-${uniqueId}`,
227
+ 'z-[100] h-8 w-10 translate-y-[80%] rotate-[180deg] cursor-pointer rounded-none p-2 opacity-100 transition-all duration-300',
228
+ 'bg-transparent hover:border-white/50 hover:bg-white/5 disabled:cursor-not-allowed disabled:opacity-30'
229
+ )}
230
+ >
231
+ <span className="ti-arrow-left relative left-2" />
232
+ </button>
233
+
234
+ <button
235
+ className={cn(
236
+ `swiperButtonNext swiper-button-next next-${uniqueId}`,
237
+ 'z-[100] h-8 w-10 translate-y-[80%] rotate-[180deg] cursor-pointer rounded-none p-2 opacity-100 transition-all duration-300',
238
+ 'bg-transparent hover:border-white/50 hover:bg-white/5 disabled:cursor-not-allowed disabled:opacity-30'
239
+ )}
240
+ >
241
+ <span className="ti-arrow-right relative right-2" />
242
+ </button>
243
+ </div>
244
+ )}
245
+ </section>
246
+ )
247
+ }
@@ -0,0 +1,4 @@
1
+ # DD-Testim
2
+
3
+ Portable first-pass conversion of `TestimonialBlock` from ROUND-TWO-CONVERSION. Project-specific roots and nested unconverted block dependencies were intentionally replaced with local rendering so the template can install into a clean Payload project.
4
+
@@ -0,0 +1,101 @@
1
+ import { Block } from 'payload'
2
+
3
+ export const DDTestim: Block = {
4
+ slug: 'DD-Testim',
5
+ interfaceName: 'DDTestim',
6
+ labels: {
7
+ singular: 'Testimonial Carousel',
8
+ plural: 'Testimonial Carousels',
9
+ },
10
+ fields: [
11
+ {
12
+ type: 'row',
13
+ fields: [
14
+ {
15
+ name: 'sectionId',
16
+ label: 'Section ID',
17
+ type: 'text',
18
+ admin: {
19
+ width: '50%',
20
+ description: 'Set the anchor ID for this section (e.g., "testimonials").',
21
+ },
22
+ },
23
+ {
24
+ name: 'testimonialClass',
25
+ label: 'Container Class Name',
26
+ type: 'text',
27
+ admin: {
28
+ width: '50%',
29
+ description: 'Optional extra Tailwind/custom classes for section wrapper.',
30
+ },
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ name: 'testimonials',
36
+ type: 'relationship',
37
+ relationTo: 'testimonials',
38
+ hasMany: true,
39
+ required: false,
40
+ label: 'Select Testimonials',
41
+ },
42
+ {
43
+ type: 'row',
44
+ fields: [
45
+ {
46
+ name: 'showNavigation',
47
+ type: 'checkbox',
48
+ hidden: false,
49
+ label: 'Show Navigation Arrows',
50
+ defaultValue: true,
51
+ admin: {
52
+ width: '50%',
53
+ },
54
+ },
55
+ {
56
+ name: 'showPagination',
57
+ type: 'checkbox',
58
+ label: 'Show Pagination Dots',
59
+ defaultValue: true,
60
+ admin: {
61
+ width: '50%',
62
+ },
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ type: 'row',
68
+ fields: [
69
+ {
70
+ name: 'slidesPerViewTablet',
71
+ type: 'number',
72
+ label: 'Slides Per View (Tablet ≥768px)',
73
+ defaultValue: 2,
74
+ admin: {
75
+ width: '50%',
76
+ description: 'How many slides visible on tablet screens (default 2).',
77
+ },
78
+ },
79
+ {
80
+ name: 'slidesPerViewDesktop',
81
+ type: 'number',
82
+ label: 'Slides Per View (Desktop ≥1024px)',
83
+ defaultValue: 3,
84
+ admin: {
85
+ width: '50%',
86
+ description: 'How many slides visible on desktop screens (default 3).',
87
+ },
88
+ },
89
+ ],
90
+ },
91
+ {
92
+ name: 'carouselSpeed',
93
+ type: 'number',
94
+ label: 'Carousel Speed (ms)',
95
+ defaultValue: 1000,
96
+ admin: {
97
+ description: 'Transition speed in milliseconds (default 1000ms).',
98
+ },
99
+ },
100
+ ],
101
+ }