blocks-dusted 0.1.12 → 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 +1 -1
- 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 +535 -535
- 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 +139 -140
- 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-ComparisonTable/Component.tsx +255 -256
- package/templates/blocks/DD-Contact/Component.tsx +433 -435
- package/templates/blocks/DD-Counter/Component.tsx +11 -6
- 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 +296 -297
- 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 +937 -936
- 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-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 -545
- 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 +2 -3
- package/templates/blocks/DD-Pricing/config.ts +215 -215
- package/templates/blocks/DD-Process/Component.tsx +2 -2
- package/templates/blocks/DD-ProjHeader/Component.tsx +93 -91
- package/templates/blocks/DD-ProjSlider/Component.tsx +1 -1
- 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 +2 -2
- package/templates/blocks/DD-StackCards/Component.tsx +172 -171
- 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 +173 -174
- 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 -139
- package/templates/blocks/DD-Thanks/Component.tsx +1 -1
- package/templates/blocks/DD-Work/Component.tsx +318 -318
- 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 +6 -3
- package/templates/blocks/DDHG-LogoMarquee/Component.tsx +45 -8
- package/templates/blocks/DDHG-NavCodeGrid/Component.tsx +1 -3
- package/templates/blocks/DDHG-ServiceDetails/ServiceDetailCard.tsx +9 -22
- package/templates/blocks/DDHG-ServiceHero/Component.tsx +10 -10
- package/templates/blocks/DDHG-TeamCards/Component.tsx +6 -35
- 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,435 +1,433 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React, { type FormEvent, useMemo, useState } from 'react'
|
|
3
|
-
import * as LucideIcons from 'lucide-react'
|
|
4
|
-
import { Check, Loader2, Send } from 'lucide-react'
|
|
5
|
-
import { Input } from '@/components/ui/input'
|
|
6
|
-
import { getClientSideURL } from '@/utilities/getURL'
|
|
7
|
-
|
|
8
|
-
type Status = 'idle' | 'submitting' | 'success' | 'error'
|
|
9
|
-
export type DDContactProps = {
|
|
10
|
-
eyebrow?: string | null
|
|
11
|
-
headlineMain?: string | null
|
|
12
|
-
headlineAccent?: string | null
|
|
13
|
-
description?: string | null
|
|
14
|
-
infoItems?: Array<{
|
|
15
|
-
iconName?: string | null
|
|
16
|
-
title: string
|
|
17
|
-
description: string
|
|
18
|
-
}> | null
|
|
19
|
-
availabilityActive?: boolean | null
|
|
20
|
-
availabilityLabel?: string | null
|
|
21
|
-
availabilitySubtext?: string | null
|
|
22
|
-
form?: string | number | { id?: string | number } | null
|
|
23
|
-
serviceOptions?: Array<{ label: string }> | null
|
|
24
|
-
budgetOptions?: Array<{ label: string }> | null
|
|
25
|
-
timelineOptions?: Array<{ label: string }> | null
|
|
26
|
-
sectionId?: string | null
|
|
27
|
-
customCSS?: string | null
|
|
28
|
-
}
|
|
29
|
-
function DynamicIcon({
|
|
30
|
-
name,
|
|
31
|
-
size = 16,
|
|
32
|
-
...props
|
|
33
|
-
}: { name?: string | null } & Omit<LucideIcons.LucideProps, 'name'>) {
|
|
34
|
-
if (!name) return null
|
|
35
|
-
const Icon = (LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>)[name]
|
|
36
|
-
if (!Icon) return null
|
|
37
|
-
return <Icon size={size} {...props} />
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const DDContact: React.FC<DDContactProps> = ({
|
|
41
|
-
eyebrow,
|
|
42
|
-
headlineMain,
|
|
43
|
-
headlineAccent,
|
|
44
|
-
description,
|
|
45
|
-
infoItems,
|
|
46
|
-
availabilityActive,
|
|
47
|
-
availabilityLabel,
|
|
48
|
-
availabilitySubtext,
|
|
49
|
-
form,
|
|
50
|
-
serviceOptions,
|
|
51
|
-
budgetOptions,
|
|
52
|
-
timelineOptions,
|
|
53
|
-
sectionId,
|
|
54
|
-
customCSS,
|
|
55
|
-
}) => {
|
|
56
|
-
const [status, setStatus] = useState<Status>('idle')
|
|
57
|
-
const [charCount, setCharCount] = useState(0)
|
|
58
|
-
|
|
59
|
-
const formID = typeof form === 'object' && form !== null ? form.id : form
|
|
60
|
-
|
|
61
|
-
const formIdentifier = useMemo(() => {
|
|
62
|
-
const safeSection = (sectionId || 'contact').toLowerCase().replace(/[^a-z0-9-_]/g, '-')
|
|
63
|
-
|
|
64
|
-
return `studio-contact-${String(formID || 'unknown')}-${safeSection}`
|
|
65
|
-
}, [formID, sectionId])
|
|
66
|
-
|
|
67
|
-
const handleSubmit = async (e: FormEvent<HTMLFormElement>) => {
|
|
68
|
-
e.preventDefault()
|
|
69
|
-
const formElement = e.currentTarget
|
|
70
|
-
const data = new FormData(formElement)
|
|
71
|
-
|
|
72
|
-
const message = data.get('message') as string
|
|
73
|
-
if (message && message.length > 500) return
|
|
74
|
-
|
|
75
|
-
setStatus('submitting')
|
|
76
|
-
|
|
77
|
-
const submissionData = [
|
|
78
|
-
{ field: 'name', value: data.get('name') },
|
|
79
|
-
{ field: 'email', value: data.get('email') },
|
|
80
|
-
{ field: 'company', value: data.get('company') },
|
|
81
|
-
{ field: 'service', value: data.get('service') },
|
|
82
|
-
{ field: 'budget', value: data.get('budget') },
|
|
83
|
-
{ field: 'timeline', value: data.get('timeline') },
|
|
84
|
-
{ field: 'message', value: data.get('message') },
|
|
85
|
-
]
|
|
86
|
-
|
|
87
|
-
if (!formID) {
|
|
88
|
-
setStatus('success')
|
|
89
|
-
formElement.reset()
|
|
90
|
-
setCharCount(0)
|
|
91
|
-
return
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
try {
|
|
95
|
-
const res = await fetch(`${getClientSideURL()}/api/form-submissions`, {
|
|
96
|
-
method: 'POST',
|
|
97
|
-
headers: {
|
|
98
|
-
'Content-Type': 'application/json',
|
|
99
|
-
},
|
|
100
|
-
body: JSON.stringify({
|
|
101
|
-
form: formID,
|
|
102
|
-
submissionData,
|
|
103
|
-
}),
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
if (res.ok) {
|
|
107
|
-
setStatus('success')
|
|
108
|
-
formElement.reset()
|
|
109
|
-
setCharCount(0)
|
|
110
|
-
} else {
|
|
111
|
-
setStatus('error')
|
|
112
|
-
}
|
|
113
|
-
} catch {
|
|
114
|
-
setStatus('error')
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<>
|
|
120
|
-
{customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
|
|
121
|
-
|
|
122
|
-
<div id={sectionId ?? 'contact'} className="py-
|
|
123
|
-
<div className="max-w-6xl lg:max-w-7xl mx-auto px-4 md:px-6">
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<div
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { type FormEvent, useMemo, useState } from 'react'
|
|
3
|
+
import * as LucideIcons from 'lucide-react'
|
|
4
|
+
import { Check, Loader2, Send } from 'lucide-react'
|
|
5
|
+
import { Input } from '@/components/ui/input'
|
|
6
|
+
import { getClientSideURL } from '@/utilities/getURL'
|
|
7
|
+
|
|
8
|
+
type Status = 'idle' | 'submitting' | 'success' | 'error'
|
|
9
|
+
export type DDContactProps = {
|
|
10
|
+
eyebrow?: string | null
|
|
11
|
+
headlineMain?: string | null
|
|
12
|
+
headlineAccent?: string | null
|
|
13
|
+
description?: string | null
|
|
14
|
+
infoItems?: Array<{
|
|
15
|
+
iconName?: string | null
|
|
16
|
+
title: string
|
|
17
|
+
description: string
|
|
18
|
+
}> | null
|
|
19
|
+
availabilityActive?: boolean | null
|
|
20
|
+
availabilityLabel?: string | null
|
|
21
|
+
availabilitySubtext?: string | null
|
|
22
|
+
form?: string | number | { id?: string | number } | null
|
|
23
|
+
serviceOptions?: Array<{ label: string }> | null
|
|
24
|
+
budgetOptions?: Array<{ label: string }> | null
|
|
25
|
+
timelineOptions?: Array<{ label: string }> | null
|
|
26
|
+
sectionId?: string | null
|
|
27
|
+
customCSS?: string | null
|
|
28
|
+
}
|
|
29
|
+
function DynamicIcon({
|
|
30
|
+
name,
|
|
31
|
+
size = 16,
|
|
32
|
+
...props
|
|
33
|
+
}: { name?: string | null } & Omit<LucideIcons.LucideProps, 'name'>) {
|
|
34
|
+
if (!name) return null
|
|
35
|
+
const Icon = (LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>)[name]
|
|
36
|
+
if (!Icon) return null
|
|
37
|
+
return <Icon size={size} {...props} />
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const DDContact: React.FC<DDContactProps> = ({
|
|
41
|
+
eyebrow,
|
|
42
|
+
headlineMain,
|
|
43
|
+
headlineAccent,
|
|
44
|
+
description,
|
|
45
|
+
infoItems,
|
|
46
|
+
availabilityActive,
|
|
47
|
+
availabilityLabel,
|
|
48
|
+
availabilitySubtext,
|
|
49
|
+
form,
|
|
50
|
+
serviceOptions,
|
|
51
|
+
budgetOptions,
|
|
52
|
+
timelineOptions,
|
|
53
|
+
sectionId,
|
|
54
|
+
customCSS,
|
|
55
|
+
}) => {
|
|
56
|
+
const [status, setStatus] = useState<Status>('idle')
|
|
57
|
+
const [charCount, setCharCount] = useState(0)
|
|
58
|
+
|
|
59
|
+
const formID = typeof form === 'object' && form !== null ? form.id : form
|
|
60
|
+
|
|
61
|
+
const formIdentifier = useMemo(() => {
|
|
62
|
+
const safeSection = (sectionId || 'contact').toLowerCase().replace(/[^a-z0-9-_]/g, '-')
|
|
63
|
+
|
|
64
|
+
return `studio-contact-${String(formID || 'unknown')}-${safeSection}`
|
|
65
|
+
}, [formID, sectionId])
|
|
66
|
+
|
|
67
|
+
const handleSubmit = async (e: FormEvent<HTMLFormElement>) => {
|
|
68
|
+
e.preventDefault()
|
|
69
|
+
const formElement = e.currentTarget
|
|
70
|
+
const data = new FormData(formElement)
|
|
71
|
+
|
|
72
|
+
const message = data.get('message') as string
|
|
73
|
+
if (message && message.length > 500) return
|
|
74
|
+
|
|
75
|
+
setStatus('submitting')
|
|
76
|
+
|
|
77
|
+
const submissionData = [
|
|
78
|
+
{ field: 'name', value: data.get('name') },
|
|
79
|
+
{ field: 'email', value: data.get('email') },
|
|
80
|
+
{ field: 'company', value: data.get('company') },
|
|
81
|
+
{ field: 'service', value: data.get('service') },
|
|
82
|
+
{ field: 'budget', value: data.get('budget') },
|
|
83
|
+
{ field: 'timeline', value: data.get('timeline') },
|
|
84
|
+
{ field: 'message', value: data.get('message') },
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
if (!formID) {
|
|
88
|
+
setStatus('success')
|
|
89
|
+
formElement.reset()
|
|
90
|
+
setCharCount(0)
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
const res = await fetch(`${getClientSideURL()}/api/form-submissions`, {
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: {
|
|
98
|
+
'Content-Type': 'application/json',
|
|
99
|
+
},
|
|
100
|
+
body: JSON.stringify({
|
|
101
|
+
form: formID,
|
|
102
|
+
submissionData,
|
|
103
|
+
}),
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
if (res.ok) {
|
|
107
|
+
setStatus('success')
|
|
108
|
+
formElement.reset()
|
|
109
|
+
setCharCount(0)
|
|
110
|
+
} else {
|
|
111
|
+
setStatus('error')
|
|
112
|
+
}
|
|
113
|
+
} catch {
|
|
114
|
+
setStatus('error')
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<>
|
|
120
|
+
{customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
|
|
121
|
+
|
|
122
|
+
<div id={sectionId ?? 'contact'} className="py-4">
|
|
123
|
+
<div className="max-w-6xl lg:max-w-7xl mx-auto px-4 md:px-6">
|
|
124
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-16 items-start">
|
|
125
|
+
<div>
|
|
126
|
+
{eyebrow && (
|
|
127
|
+
<p className="text-[11.5px] font-semibold text-stone-400 tracking-widest uppercase mb-3 top-caption">
|
|
128
|
+
{eyebrow}
|
|
129
|
+
</p>
|
|
130
|
+
)}
|
|
131
|
+
|
|
132
|
+
<h2 className="text-4xl md:text-5xl font-semibold text-stone-900 dark:text-stone-50 leading-tight mb-6">
|
|
133
|
+
{headlineMain}
|
|
134
|
+
<br />
|
|
135
|
+
<span className="text-stone-400">{headlineAccent}</span>
|
|
136
|
+
</h2>
|
|
137
|
+
|
|
138
|
+
{description && (
|
|
139
|
+
<p className="text-stone-700 dark:text-stone-300 text-base leading-relaxed mb-10">
|
|
140
|
+
{description}
|
|
141
|
+
</p>
|
|
142
|
+
)}
|
|
143
|
+
|
|
144
|
+
{infoItems && infoItems.length > 0 && (
|
|
145
|
+
<div className="space-y-4 mb-10">
|
|
146
|
+
{infoItems.map((item, i) => (
|
|
147
|
+
<div key={i} className="flex gap-4">
|
|
148
|
+
<div className="w-9 h-9 flex items-center justify-center rounded-lg lime-glass border border-indigo-400 bg-stone-100/50 dark:bg-stone-900/80 shrink-0 mt-0.5">
|
|
149
|
+
<DynamicIcon
|
|
150
|
+
className="text-indigo-500 dark:text-lime-500"
|
|
151
|
+
name={item.iconName}
|
|
152
|
+
size={15}
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
<div>
|
|
156
|
+
<div className="text-sm font-semibold text-stone-800 dark:text-stone-50 mb-0.5">
|
|
157
|
+
{item.title}
|
|
158
|
+
</div>
|
|
159
|
+
<div className="text-xs text-stone-600 dark:text-stone-300">
|
|
160
|
+
{item.description}
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
))}
|
|
165
|
+
</div>
|
|
166
|
+
)}
|
|
167
|
+
|
|
168
|
+
{availabilityActive && (
|
|
169
|
+
<div
|
|
170
|
+
className="flex items-center gap-3 p-4 bg-indigo-50 dark:bg-indigo-950/80 border border-indigo-200 dark:border-indigo-500 shadow-sm dark:shadow-xl backdrop-blur-sm rounded-2xl pressable relative z-10 h-full w-full text-[32px] font-medium tracking-[.001em] transition-all duration-300"
|
|
171
|
+
style={{ cornerShape: 'squircle' } as React.CSSProperties}
|
|
172
|
+
>
|
|
173
|
+
<div className="w-3.5 h-3.5 rounded-full bg-lime-700 border-2 border-lime-500 animate-pulse shrink-0 shadow-2xl" />
|
|
174
|
+
<div>
|
|
175
|
+
{availabilityLabel && (
|
|
176
|
+
<div className="text-md font-semibold text-indigo-900 dark:text-stone-50">
|
|
177
|
+
{availabilityLabel}
|
|
178
|
+
</div>
|
|
179
|
+
)}
|
|
180
|
+
|
|
181
|
+
{availabilitySubtext && (
|
|
182
|
+
<div className="text-xs font-normal! text-stone-600 dark:text-stone-300 pt-1">
|
|
183
|
+
{availabilitySubtext}
|
|
184
|
+
</div>
|
|
185
|
+
)}
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
)}
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div className="rounded-2xl bg-stone-100 dark:bg-stone-950 border border-stone-100 dark:border-stone-800 dark:hover:border-indigo-800 px-3 md:px-8 py-8 shadow-sm hover:shadow-2xl transition-all duration-300">
|
|
192
|
+
{status === 'success' ? (
|
|
193
|
+
<div className="flex flex-col items-center justify-center text-center py-12">
|
|
194
|
+
<div className="w-16 h-16 flex items-center justify-center rounded-full bg-lime-400/10 border border-emerald-400/30 mb-5">
|
|
195
|
+
<Check size={28} className="text-lime-400" />
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<h3 className="text-xl font-semibold text-stone-900 dark:text-stone-50 mb-2">
|
|
199
|
+
Message sent!
|
|
200
|
+
</h3>
|
|
201
|
+
|
|
202
|
+
<p className="text-sm text-stone-600 dark:text-stone-400 max-w-xs">
|
|
203
|
+
Thanks for reaching out. We'll review your project details and get back to you
|
|
204
|
+
within one business day.
|
|
205
|
+
</p>
|
|
206
|
+
|
|
207
|
+
<button
|
|
208
|
+
onClick={() => setStatus('idle')}
|
|
209
|
+
className="mt-6 px-5 py-2.5 rounded-lg bg-stone-900 text-stone-50 dark:bg-stone-700 dark:text-stone-200 text-sm font-medium hover:bg-stone-800 dark:hover:bg-stone-600 transition-colors cursor-pointer"
|
|
210
|
+
>
|
|
211
|
+
Send another message
|
|
212
|
+
</button>
|
|
213
|
+
</div>
|
|
214
|
+
) : (
|
|
215
|
+
<form
|
|
216
|
+
id={formIdentifier}
|
|
217
|
+
name={formIdentifier}
|
|
218
|
+
data-form-id={String(formID || '')}
|
|
219
|
+
onSubmit={handleSubmit}
|
|
220
|
+
className="space-y-5"
|
|
221
|
+
>
|
|
222
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
223
|
+
<div>
|
|
224
|
+
<label
|
|
225
|
+
htmlFor={`${formIdentifier}-name`}
|
|
226
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
227
|
+
>
|
|
228
|
+
Your Name *
|
|
229
|
+
</label>
|
|
230
|
+
|
|
231
|
+
<Input
|
|
232
|
+
id={`${formIdentifier}-name`}
|
|
233
|
+
type="text"
|
|
234
|
+
name="name"
|
|
235
|
+
autoComplete="name"
|
|
236
|
+
required
|
|
237
|
+
placeholder="Marcus Holt"
|
|
238
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
239
|
+
/>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<div>
|
|
243
|
+
<label
|
|
244
|
+
htmlFor={`${formIdentifier}-email`}
|
|
245
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
246
|
+
>
|
|
247
|
+
Email Address *
|
|
248
|
+
</label>
|
|
249
|
+
|
|
250
|
+
<Input
|
|
251
|
+
id={`${formIdentifier}-email`}
|
|
252
|
+
type="email"
|
|
253
|
+
name="email"
|
|
254
|
+
autoComplete="email"
|
|
255
|
+
required
|
|
256
|
+
placeholder="you@company.com"
|
|
257
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<div>
|
|
263
|
+
<label
|
|
264
|
+
htmlFor={`${formIdentifier}-company`}
|
|
265
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
266
|
+
>
|
|
267
|
+
Company / Project Name
|
|
268
|
+
</label>
|
|
269
|
+
|
|
270
|
+
<Input
|
|
271
|
+
id={`${formIdentifier}-company`}
|
|
272
|
+
type="text"
|
|
273
|
+
name="company"
|
|
274
|
+
autoComplete="organization"
|
|
275
|
+
placeholder="Acme Inc."
|
|
276
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
277
|
+
/>
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
{serviceOptions && serviceOptions.length > 0 && (
|
|
281
|
+
<div>
|
|
282
|
+
<label
|
|
283
|
+
htmlFor={`${formIdentifier}-service`}
|
|
284
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
285
|
+
>
|
|
286
|
+
Service Needed *
|
|
287
|
+
</label>
|
|
288
|
+
|
|
289
|
+
<select
|
|
290
|
+
id={`${formIdentifier}-service`}
|
|
291
|
+
name="service"
|
|
292
|
+
autoComplete="off"
|
|
293
|
+
required
|
|
294
|
+
defaultValue=""
|
|
295
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
296
|
+
>
|
|
297
|
+
<option value="" disabled>
|
|
298
|
+
Select a service...
|
|
299
|
+
</option>
|
|
300
|
+
|
|
301
|
+
{serviceOptions.map((s, i) => (
|
|
302
|
+
<option key={i} value={s.label}>
|
|
303
|
+
{s.label}
|
|
304
|
+
</option>
|
|
305
|
+
))}
|
|
306
|
+
</select>
|
|
307
|
+
</div>
|
|
308
|
+
)}
|
|
309
|
+
|
|
310
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
311
|
+
{budgetOptions && budgetOptions.length > 0 && (
|
|
312
|
+
<div>
|
|
313
|
+
<label
|
|
314
|
+
htmlFor={`${formIdentifier}-budget`}
|
|
315
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
316
|
+
>
|
|
317
|
+
Budget Range *
|
|
318
|
+
</label>
|
|
319
|
+
|
|
320
|
+
<select
|
|
321
|
+
id={`${formIdentifier}-budget`}
|
|
322
|
+
name="budget"
|
|
323
|
+
autoComplete="off"
|
|
324
|
+
required
|
|
325
|
+
defaultValue=""
|
|
326
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
327
|
+
>
|
|
328
|
+
<option value="" disabled>
|
|
329
|
+
Select budget...
|
|
330
|
+
</option>
|
|
331
|
+
|
|
332
|
+
{budgetOptions.map((b, i) => (
|
|
333
|
+
<option key={i} value={b.label}>
|
|
334
|
+
{b.label}
|
|
335
|
+
</option>
|
|
336
|
+
))}
|
|
337
|
+
</select>
|
|
338
|
+
</div>
|
|
339
|
+
)}
|
|
340
|
+
|
|
341
|
+
{timelineOptions && timelineOptions.length > 0 && (
|
|
342
|
+
<div>
|
|
343
|
+
<label
|
|
344
|
+
htmlFor={`${formIdentifier}-timeline`}
|
|
345
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
346
|
+
>
|
|
347
|
+
Timeline
|
|
348
|
+
</label>
|
|
349
|
+
|
|
350
|
+
<select
|
|
351
|
+
id={`${formIdentifier}-timeline`}
|
|
352
|
+
name="timeline"
|
|
353
|
+
autoComplete="off"
|
|
354
|
+
defaultValue=""
|
|
355
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
356
|
+
>
|
|
357
|
+
<option value="" disabled>
|
|
358
|
+
Select timeline...
|
|
359
|
+
</option>
|
|
360
|
+
|
|
361
|
+
{timelineOptions.map((t, i) => (
|
|
362
|
+
<option key={i} value={t.label}>
|
|
363
|
+
{t.label}
|
|
364
|
+
</option>
|
|
365
|
+
))}
|
|
366
|
+
</select>
|
|
367
|
+
</div>
|
|
368
|
+
)}
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<div>
|
|
372
|
+
<label
|
|
373
|
+
htmlFor={`${formIdentifier}-message`}
|
|
374
|
+
className="block text-xs font-medium text-stone-400 mb-1.5"
|
|
375
|
+
>
|
|
376
|
+
Project Description *
|
|
377
|
+
<span
|
|
378
|
+
className={`ml-2 font-normal ${charCount > 500 ? 'text-red-400' : 'text-stone-400'}`}
|
|
379
|
+
>
|
|
380
|
+
{charCount}/500
|
|
381
|
+
</span>
|
|
382
|
+
</label>
|
|
383
|
+
|
|
384
|
+
<textarea
|
|
385
|
+
id={`${formIdentifier}-message`}
|
|
386
|
+
name="message"
|
|
387
|
+
autoComplete="off"
|
|
388
|
+
required
|
|
389
|
+
rows={4}
|
|
390
|
+
maxLength={500}
|
|
391
|
+
placeholder="Tell us about your project — what you're building, what problem it solves, and any technical constraints..."
|
|
392
|
+
onChange={(e) => setCharCount(e.target.value.length)}
|
|
393
|
+
className="glass-input squircle relative flex w-full items-center overflow-hidden rounded-sm border border-stone-300 dark:border-stone-700 bg-white dark:bg-black/80 px-3 py-2 text-sm text-stone-800 dark:text-stone-50 placeholder:text-stone-400 outline-none backdrop-blur-[22px] transition-all duration-300 focus:border-stone-400 dark:focus:border-lime-500 focus:ring-2 focus:ring-offset-2 focus:ring-stone-300/50 dark:focus:ring-lime-500/10"
|
|
394
|
+
/>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
{status === 'error' && (
|
|
398
|
+
<p className="text-xs text-red-400">Something went wrong. Please try again.</p>
|
|
399
|
+
)}
|
|
400
|
+
|
|
401
|
+
<button
|
|
402
|
+
type="submit"
|
|
403
|
+
disabled={status === 'submitting' || charCount > 500}
|
|
404
|
+
className="glass-button-white group relative isolate flex w-full cursor-pointer items-center justify-center gap-2 overflow-hidden rounded-4xl! border border-stone-300 dark:border-white bg-stone-950/90 dark:bg-stone-100/80 px-6 py-3 text-sm font-semibold text-stone-50 dark:text-stone-900 outline-offset-0 hover:bg-stone-900 dark:hover:bg-stone-100 hover:shadow-2xl hover:-translate-y-0.5 hover:outline-4 hover:outline-indigo-500 hover:-outline-offset-1 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-300"
|
|
405
|
+
style={{ cornerShape: 'squircle' } as React.CSSProperties}
|
|
406
|
+
>
|
|
407
|
+
<span className="relative z-2 flex items-center gap-2">
|
|
408
|
+
{status === 'submitting' ? (
|
|
409
|
+
<>
|
|
410
|
+
<Loader2 size={15} className="animate-spin" />
|
|
411
|
+
Sending...
|
|
412
|
+
</>
|
|
413
|
+
) : (
|
|
414
|
+
<>
|
|
415
|
+
<Send size={15} />
|
|
416
|
+
Send Project Brief
|
|
417
|
+
</>
|
|
418
|
+
)}
|
|
419
|
+
</span>
|
|
420
|
+
</button>
|
|
421
|
+
|
|
422
|
+
<p className="text-xs text-stone-700 dark:text-stone-400 text-center">
|
|
423
|
+
We'll respond within 1 business day. No spam, ever.
|
|
424
|
+
</p>
|
|
425
|
+
</form>
|
|
426
|
+
)}
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
</>
|
|
432
|
+
)
|
|
433
|
+
}
|