@shipsite.dev/components 0.2.55 → 0.2.64
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/components.json +102 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/use-form-submit.d.ts +7 -0
- package/dist/lib/use-form-submit.d.ts.map +1 -0
- package/dist/lib/use-form-submit.js +47 -0
- package/dist/lib/use-form-submit.js.map +1 -0
- package/dist/marketing/ContactForm.d.ts +16 -0
- package/dist/marketing/ContactForm.d.ts.map +1 -0
- package/dist/marketing/ContactForm.js +29 -0
- package/dist/marketing/ContactForm.js.map +1 -0
- package/dist/marketing/Form.d.ts +25 -0
- package/dist/marketing/Form.d.ts.map +1 -0
- package/dist/marketing/Form.js +18 -0
- package/dist/marketing/Form.js.map +1 -0
- package/dist/marketing/FormClient.d.ts +23 -0
- package/dist/marketing/FormClient.d.ts.map +1 -0
- package/dist/marketing/FormClient.js +41 -0
- package/dist/marketing/FormClient.js.map +1 -0
- package/dist/marketing/FormEmbed.d.ts +13 -0
- package/dist/marketing/FormEmbed.d.ts.map +1 -0
- package/dist/marketing/FormEmbed.js +27 -0
- package/dist/marketing/FormEmbed.js.map +1 -0
- package/dist/marketing/NewsletterForm.d.ts +13 -0
- package/dist/marketing/NewsletterForm.d.ts.map +1 -0
- package/dist/marketing/NewsletterForm.js +23 -0
- package/dist/marketing/NewsletterForm.js.map +1 -0
- package/dist/marketing/WaitlistForm.d.ts +16 -0
- package/dist/marketing/WaitlistForm.d.ts.map +1 -0
- package/dist/marketing/WaitlistForm.js +27 -0
- package/dist/marketing/WaitlistForm.js.map +1 -0
- package/dist/ui/input.d.ts +5 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +9 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/select.d.ts +14 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +28 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/textarea.d.ts +5 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/textarea.js.map +1 -0
- package/package.json +3 -1
- package/src/index.ts +7 -0
- package/src/lib/use-form-submit.ts +53 -0
- package/src/marketing/ContactForm.tsx +157 -0
- package/src/marketing/Form.tsx +41 -0
- package/src/marketing/FormClient.tsx +194 -0
- package/src/marketing/FormEmbed.tsx +118 -0
- package/src/marketing/NewsletterForm.tsx +102 -0
- package/src/marketing/WaitlistForm.tsx +145 -0
- package/src/ui/input.tsx +21 -0
- package/src/ui/label.tsx +24 -0
- package/src/ui/select.tsx +160 -0
- package/src/ui/textarea.tsx +20 -0
package/components.json
CHANGED
|
@@ -473,6 +473,108 @@
|
|
|
473
473
|
{ "name": "children", "type": "React.ReactNode", "required": true, "description": "ContentSection children and other content." }
|
|
474
474
|
],
|
|
475
475
|
"example": "<ContentPage title=\"About Us\">\n <ContentSection title=\"Our Mission\">\n We build tools that help developers ship faster.\n </ContentSection>\n</ContentPage>"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "ContactForm",
|
|
479
|
+
"category": "marketing",
|
|
480
|
+
"description": "Contact form section with name, email, and message fields. Submits JSON to an external form backend (Formspree, Getform, Basin, etc.). Shows inline success/error states.",
|
|
481
|
+
"props": [
|
|
482
|
+
{ "name": "id", "type": "string", "required": false, "description": "HTML id for anchor links." },
|
|
483
|
+
{ "name": "action", "type": "string", "required": true, "description": "Form backend URL to POST JSON to (e.g. 'https://formspree.io/f/xpwzabcd')." },
|
|
484
|
+
{ "name": "title", "type": "string", "required": false, "description": "Section heading. Defaults to 'Get in Touch'." },
|
|
485
|
+
{ "name": "description", "type": "string", "required": false, "description": "Section subheading text." },
|
|
486
|
+
{ "name": "nameLabel", "type": "string", "required": false, "description": "Label for the name field. Defaults to 'Name'." },
|
|
487
|
+
{ "name": "emailLabel", "type": "string", "required": false, "description": "Label for the email field. Defaults to 'Email'." },
|
|
488
|
+
{ "name": "messageLabel", "type": "string", "required": false, "description": "Label for the message field. Defaults to 'Message'." },
|
|
489
|
+
{ "name": "submitLabel", "type": "string", "required": false, "description": "Submit button text. Defaults to 'Send Message'." },
|
|
490
|
+
{ "name": "successTitle", "type": "string", "required": false, "description": "Heading shown after successful submission. Defaults to 'Message Sent!'." },
|
|
491
|
+
{ "name": "successMessage", "type": "string", "required": false, "description": "Text shown after successful submission. Defaults to 'We'll get back to you as soon as possible.'." },
|
|
492
|
+
{ "name": "variant", "type": "'section' | 'card'", "required": false, "description": "Layout variant. 'section' renders a full Section with glass-1 card. 'card' renders only the glass-2 card without a Section wrapper (for embedding inside other sections). Defaults to 'section'." }
|
|
493
|
+
],
|
|
494
|
+
"example": "<ContactForm\n action=\"https://formspree.io/f/xpwzabcd\"\n title=\"Get in Touch\"\n description=\"Have a question? We'd love to hear from you.\"\n/>"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "NewsletterForm",
|
|
498
|
+
"category": "marketing",
|
|
499
|
+
"description": "Compact email signup form with a single email input and submit button. Supports a full section layout or an inline layout for embedding inside BannerCTA or other components.",
|
|
500
|
+
"props": [
|
|
501
|
+
{ "name": "id", "type": "string", "required": false, "description": "HTML id for anchor links." },
|
|
502
|
+
{ "name": "action", "type": "string", "required": true, "description": "Form backend URL to POST JSON to (e.g. 'https://formspree.io/f/xpwzabcd')." },
|
|
503
|
+
{ "name": "title", "type": "string", "required": false, "description": "Section heading." },
|
|
504
|
+
{ "name": "description", "type": "string", "required": false, "description": "Section subheading text." },
|
|
505
|
+
{ "name": "placeholder", "type": "string", "required": false, "description": "Email input placeholder. Defaults to 'Enter your email'." },
|
|
506
|
+
{ "name": "submitLabel", "type": "string", "required": false, "description": "Submit button text. Defaults to 'Subscribe'." },
|
|
507
|
+
{ "name": "successMessage", "type": "string", "required": false, "description": "Inline text shown after success. Defaults to 'You're subscribed!'." },
|
|
508
|
+
{ "name": "variant", "type": "'section' | 'inline'", "required": false, "description": "Layout variant. 'section' renders a full Section. 'inline' renders only the form row (for use inside BannerCTA). Defaults to 'section'." }
|
|
509
|
+
],
|
|
510
|
+
"example": "<NewsletterForm\n action=\"https://formspree.io/f/xpwzabcd\"\n title=\"Never miss an update\"\n description=\"Join 5,000 developers getting our weekly newsletter.\"\n/>"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "WaitlistForm",
|
|
514
|
+
"category": "marketing",
|
|
515
|
+
"description": "Waitlist signup form with optional name field and badge. Displays a centered section with a glass-1 card form and a success state after submission.",
|
|
516
|
+
"props": [
|
|
517
|
+
{ "name": "id", "type": "string", "required": false, "description": "HTML id for anchor links." },
|
|
518
|
+
{ "name": "action", "type": "string", "required": true, "description": "Form backend URL to POST JSON to (e.g. 'https://formspree.io/f/xpwzabcd')." },
|
|
519
|
+
{ "name": "title", "type": "string", "required": false, "description": "Section heading. Defaults to 'Join the Waitlist'." },
|
|
520
|
+
{ "name": "description", "type": "string", "required": false, "description": "Section subheading text." },
|
|
521
|
+
{ "name": "badge", "type": "string", "required": false, "description": "Badge text shown above the title (e.g. '2,400+ signups')." },
|
|
522
|
+
{ "name": "showName", "type": "boolean", "required": false, "description": "Show a name input field in addition to email. Defaults to false." },
|
|
523
|
+
{ "name": "nameLabel", "type": "string", "required": false, "description": "Label for the name field. Defaults to 'Name'." },
|
|
524
|
+
{ "name": "emailLabel", "type": "string", "required": false, "description": "Label for the email field. Defaults to 'Email'." },
|
|
525
|
+
{ "name": "submitLabel", "type": "string", "required": false, "description": "Submit button text. Defaults to 'Join Waitlist'." },
|
|
526
|
+
{ "name": "successTitle", "type": "string", "required": false, "description": "Heading shown after success. Defaults to 'You're on the list!'." },
|
|
527
|
+
{ "name": "successMessage", "type": "string", "required": false, "description": "Text shown after success. Defaults to 'We'll notify you when it's your turn.'." }
|
|
528
|
+
],
|
|
529
|
+
"example": "<WaitlistForm\n action=\"https://formspree.io/f/xpwzabcd\"\n title=\"Be the first in line\"\n description=\"Join the waitlist for early access.\"\n badge=\"2,400+ signups\"\n showName={true}\n/>"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "FormField",
|
|
533
|
+
"category": "marketing",
|
|
534
|
+
"description": "Data-only child component of Form. Defines a single field in a generic form. Renders nothing on its own — the parent Form component reads its props to build the form UI.",
|
|
535
|
+
"props": [
|
|
536
|
+
{ "name": "name", "type": "string", "required": true, "description": "Field name used as the key in the submitted JSON payload." },
|
|
537
|
+
{ "name": "label", "type": "string", "required": true, "description": "Visible label text for the field." },
|
|
538
|
+
{ "name": "type", "type": "'text' | 'email' | 'tel' | 'url' | 'textarea' | 'select'", "required": false, "description": "Input type. Defaults to 'text'." },
|
|
539
|
+
{ "name": "placeholder", "type": "string", "required": false, "description": "Placeholder text." },
|
|
540
|
+
{ "name": "required", "type": "boolean", "required": false, "description": "Whether the field is required." },
|
|
541
|
+
{ "name": "options", "type": "string[]", "required": false, "description": "Options for select-type fields." },
|
|
542
|
+
{ "name": "colSpan", "type": "number", "required": false, "description": "Number of grid columns this field spans (use with Form columns prop). E.g. colSpan={2} makes the field span the full width in a 2-column layout." }
|
|
543
|
+
],
|
|
544
|
+
"example": "<FormField name=\"email\" type=\"email\" label=\"Work Email\" required={true} colSpan={2} />"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "Form",
|
|
548
|
+
"category": "marketing",
|
|
549
|
+
"description": "Generic form section that renders a configurable form from FormField children. Supports multi-column layouts, various input types including select, and submits JSON to an external form backend. Uses the server-shell + client-island pattern.",
|
|
550
|
+
"props": [
|
|
551
|
+
{ "name": "id", "type": "string", "required": false, "description": "HTML id for anchor links." },
|
|
552
|
+
{ "name": "action", "type": "string", "required": true, "description": "Form backend URL to POST JSON to (e.g. 'https://formspree.io/f/xpwzabcd')." },
|
|
553
|
+
{ "name": "title", "type": "string", "required": false, "description": "Section heading." },
|
|
554
|
+
{ "name": "description", "type": "string", "required": false, "description": "Section subheading text." },
|
|
555
|
+
{ "name": "columns", "type": "number", "required": false, "description": "Number of grid columns (1, 2, 3, or 4). Defaults to 1." },
|
|
556
|
+
{ "name": "submitLabel", "type": "string", "required": false, "description": "Submit button text. Defaults to 'Submit'." },
|
|
557
|
+
{ "name": "successTitle", "type": "string", "required": false, "description": "Heading shown after success. Defaults to 'Submitted!'." },
|
|
558
|
+
{ "name": "successMessage", "type": "string", "required": false, "description": "Text shown after success. Defaults to 'Thank you. We'll be in touch soon.'." },
|
|
559
|
+
{ "name": "children", "type": "React.ReactNode", "required": true, "description": "FormField children defining the form fields." }
|
|
560
|
+
],
|
|
561
|
+
"example": "<Form action=\"https://formspree.io/f/xpwzabcd\" title=\"Book a Demo\" columns={2}>\n <FormField name=\"firstName\" label=\"First Name\" required={true} />\n <FormField name=\"lastName\" label=\"Last Name\" required={true} />\n <FormField name=\"email\" type=\"email\" label=\"Work Email\" required={true} colSpan={2} />\n <FormField name=\"teamSize\" type=\"select\" label=\"Team Size\" options={[\"1-10\", \"11-50\", \"51-200\", \"200+\"]} />\n <FormField name=\"message\" type=\"textarea\" label=\"Message\" colSpan={2} />\n</Form>"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "FormEmbed",
|
|
565
|
+
"category": "marketing",
|
|
566
|
+
"description": "Embeds an external form (Tally, Typeform, or custom URL) via iframe. Supports an inline iframe mode or a popup mode that opens the form in a centered dialog.",
|
|
567
|
+
"props": [
|
|
568
|
+
{ "name": "id", "type": "string", "required": false, "description": "HTML id for anchor links." },
|
|
569
|
+
{ "name": "src", "type": "string", "required": true, "description": "Form ID or full URL. For Tally, pass the form ID (e.g. 'wMxKqA'). For Typeform, pass the form ID. For custom, pass the full URL." },
|
|
570
|
+
{ "name": "provider", "type": "'tally' | 'typeform' | 'custom'", "required": false, "description": "Form provider. Determines URL resolution. Defaults to 'custom'." },
|
|
571
|
+
{ "name": "title", "type": "string", "required": false, "description": "Section heading (iframe mode only)." },
|
|
572
|
+
{ "name": "description", "type": "string", "required": false, "description": "Section subheading text (iframe mode only)." },
|
|
573
|
+
{ "name": "height", "type": "number", "required": false, "description": "iframe height in pixels. Defaults to 500." },
|
|
574
|
+
{ "name": "mode", "type": "'iframe' | 'popup'", "required": false, "description": "Display mode. 'iframe' embeds inline. 'popup' shows a button that opens a dialog. Defaults to 'iframe'." },
|
|
575
|
+
{ "name": "buttonLabel", "type": "string", "required": false, "description": "Button text for popup mode. Defaults to 'Open Form'." }
|
|
576
|
+
],
|
|
577
|
+
"example": "<FormEmbed src=\"wMxKqA\" provider=\"tally\" title=\"Contact Us\" height={500} />"
|
|
476
578
|
}
|
|
477
579
|
]
|
|
478
580
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export { Gallery, GalleryItem } from './marketing/Gallery';
|
|
|
24
24
|
export { SocialProof } from './marketing/SocialProof';
|
|
25
25
|
export { Carousel, CarouselItem } from './marketing/Carousel';
|
|
26
26
|
export { TabsSection, TabItem } from './marketing/TabsSection';
|
|
27
|
+
export { ContactForm } from './marketing/ContactForm';
|
|
28
|
+
export { NewsletterForm } from './marketing/NewsletterForm';
|
|
29
|
+
export { WaitlistForm } from './marketing/WaitlistForm';
|
|
30
|
+
export { Form, FormField } from './marketing/Form';
|
|
31
|
+
export { FormEmbed } from './marketing/FormEmbed';
|
|
27
32
|
export { BlogArticle } from './blog/BlogArticle';
|
|
28
33
|
export { BlogIndex } from './blog/BlogIndex';
|
|
29
34
|
export { ThemeImage } from './ui/theme-image';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB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W,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3J,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,12 @@ export { Gallery, GalleryItem } from './marketing/Gallery';
|
|
|
28
28
|
export { SocialProof } from './marketing/SocialProof';
|
|
29
29
|
export { Carousel, CarouselItem } from './marketing/Carousel';
|
|
30
30
|
export { TabsSection, TabItem } from './marketing/TabsSection';
|
|
31
|
+
// Forms
|
|
32
|
+
export { ContactForm } from './marketing/ContactForm';
|
|
33
|
+
export { NewsletterForm } from './marketing/NewsletterForm';
|
|
34
|
+
export { WaitlistForm } from './marketing/WaitlistForm';
|
|
35
|
+
export { Form, FormField } from './marketing/Form';
|
|
36
|
+
export { FormEmbed } from './marketing/FormEmbed';
|
|
31
37
|
// Blog
|
|
32
38
|
export { BlogArticle } from './blog/BlogArticle';
|
|
33
39
|
export { BlogIndex } from './blog/BlogIndex';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,UAAU;AACV,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAGpC,QAAQ;AACR,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,SAAS;AACT,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,cAAc,EACd,WAAW,EACX,aAAa,EACb,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,GAAG,EAAE,OAA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CAAC;AAE3J,UAAU;AACV,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type FormStatus = "idle" | "loading" | "success" | "error";
|
|
2
|
+
export declare function useFormSubmit(action: string): {
|
|
3
|
+
status: FormStatus;
|
|
4
|
+
errorMsg: string;
|
|
5
|
+
submit: (data: Record<string, string>) => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=use-form-submit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form-submit.d.ts","sourceRoot":"","sources":["../../src/lib/use-form-submit.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAElE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM;;;mBAK3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;EAyCtC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
export function useFormSubmit(action) {
|
|
4
|
+
const [status, setStatus] = useState("idle");
|
|
5
|
+
const [errorMsg, setErrorMsg] = useState("");
|
|
6
|
+
const submit = useCallback(async (data) => {
|
|
7
|
+
setStatus("loading");
|
|
8
|
+
setErrorMsg("");
|
|
9
|
+
try {
|
|
10
|
+
const res = await fetch(action, {
|
|
11
|
+
method: "POST",
|
|
12
|
+
headers: {
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
Accept: "application/json",
|
|
15
|
+
},
|
|
16
|
+
body: JSON.stringify(data),
|
|
17
|
+
});
|
|
18
|
+
if (!res.ok) {
|
|
19
|
+
let msg = "Something went wrong. Please try again.";
|
|
20
|
+
try {
|
|
21
|
+
const body = await res.json();
|
|
22
|
+
// Formspree returns { errors: [{ message }] }
|
|
23
|
+
// Getform/Basin return { message }
|
|
24
|
+
if (body.errors?.[0]?.message)
|
|
25
|
+
msg = body.errors[0].message;
|
|
26
|
+
else if (body.error)
|
|
27
|
+
msg = body.error;
|
|
28
|
+
else if (body.message)
|
|
29
|
+
msg = body.message;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
// ignore JSON parse errors
|
|
33
|
+
}
|
|
34
|
+
setErrorMsg(msg);
|
|
35
|
+
setStatus("error");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
setStatus("success");
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
setErrorMsg("Network error. Please check your connection and try again.");
|
|
42
|
+
setStatus("error");
|
|
43
|
+
}
|
|
44
|
+
}, [action]);
|
|
45
|
+
return { status, errorMsg, submit };
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=use-form-submit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-form-submit.js","sourceRoot":"","sources":["../../src/lib/use-form-submit.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAa,MAAM,CAAC,CAAC;IACzD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAE7C,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,IAA4B,EAAE,EAAE;QACrC,SAAS,CAAC,SAAS,CAAC,CAAC;QACrB,WAAW,CAAC,EAAE,CAAC,CAAC;QAEhB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE;gBAC9B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,MAAM,EAAE,kBAAkB;iBAC3B;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CAAC,CAAC;YAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;gBACZ,IAAI,GAAG,GAAG,yCAAyC,CAAC;gBACpD,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;oBAC9B,8CAA8C;oBAC9C,mCAAmC;oBACnC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO;wBAAE,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;yBACvD,IAAI,IAAI,CAAC,KAAK;wBAAE,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;yBACjC,IAAI,IAAI,CAAC,OAAO;wBAAE,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC;gBAC5C,CAAC;gBAAC,MAAM,CAAC;oBACP,2BAA2B;gBAC7B,CAAC;gBACD,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,SAAS,CAAC,OAAO,CAAC,CAAC;gBACnB,OAAO;YACT,CAAC;YAED,SAAS,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC;QAAC,MAAM,CAAC;YACP,WAAW,CAAC,4DAA4D,CAAC,CAAC;YAC1E,SAAS,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface ContactFormProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
action: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
nameLabel?: string;
|
|
7
|
+
emailLabel?: string;
|
|
8
|
+
messageLabel?: string;
|
|
9
|
+
submitLabel?: string;
|
|
10
|
+
successTitle?: string;
|
|
11
|
+
successMessage?: string;
|
|
12
|
+
variant?: "section" | "card";
|
|
13
|
+
}
|
|
14
|
+
export declare function ContactForm({ id, action, title, description, nameLabel, emailLabel, messageLabel, submitLabel, successTitle, successMessage, variant, }: ContactFormProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ContactForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactForm.d.ts","sourceRoot":"","sources":["../../src/marketing/ContactForm.tsx"],"names":[],"mappings":"AAWA,UAAU,gBAAgB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,MAAM,EACN,KAAsB,EACtB,WAAW,EACX,SAAkB,EAClB,UAAoB,EACpB,YAAwB,EACxB,WAA4B,EAC5B,YAA8B,EAC9B,cAA6D,EAC7D,OAAmB,GACpB,EAAE,gBAAgB,2CAuHlB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { CheckCircle, Loader2 } from "lucide-react";
|
|
5
|
+
import { Section } from "../ui/section";
|
|
6
|
+
import { Input } from "../ui/input";
|
|
7
|
+
import { Textarea } from "../ui/textarea";
|
|
8
|
+
import { Label } from "../ui/label";
|
|
9
|
+
import { Button } from "../ui/button";
|
|
10
|
+
import { useFormSubmit } from "../lib/use-form-submit";
|
|
11
|
+
export function ContactForm({ id, action, title = "Get in Touch", description, nameLabel = "Name", emailLabel = "Email", messageLabel = "Message", submitLabel = "Send Message", successTitle = "Message Sent!", successMessage = "We'll get back to you as soon as possible.", variant = "section", }) {
|
|
12
|
+
const uid = useId();
|
|
13
|
+
const { status, errorMsg, submit } = useFormSubmit(action);
|
|
14
|
+
const [fields, setFields] = useState({ name: "", email: "", message: "" });
|
|
15
|
+
function update(key, value) {
|
|
16
|
+
setFields((prev) => ({ ...prev, [key]: value }));
|
|
17
|
+
}
|
|
18
|
+
function handleSubmit(e) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
submit(fields);
|
|
21
|
+
}
|
|
22
|
+
const successContent = (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] }));
|
|
23
|
+
const formContent = status === "success" ? (successContent) : (_jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-name`, children: nameLabel }), _jsx(Input, { id: `${uid}-name`, name: "name", placeholder: "Your name", value: fields.name, onChange: (e) => update("name", e.target.value), required: true, disabled: status === "loading" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-email`, children: emailLabel }), _jsx(Input, { id: `${uid}-email`, name: "email", type: "email", placeholder: "you@example.com", value: fields.email, onChange: (e) => update("email", e.target.value), required: true, disabled: status === "loading" })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-message`, children: messageLabel }), _jsx(Textarea, { id: `${uid}-message`, name: "message", placeholder: "Your message...", value: fields.message, onChange: (e) => update("message", e.target.value), required: true, disabled: status === "loading" })] }), _jsx(Button, { type: "submit", variant: "default", size: "lg", className: "w-full mt-2", disabled: status === "loading", children: status === "loading" ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "size-4 animate-spin mr-2" }), "Sending..."] })) : (submitLabel) }), status === "error" && (_jsx("p", { className: "text-sm text-destructive", "aria-live": "polite", children: errorMsg }))] }));
|
|
24
|
+
if (variant === "card") {
|
|
25
|
+
return (_jsx("div", { className: "glass-2 rounded-2xl p-8", children: formContent }));
|
|
26
|
+
}
|
|
27
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-2xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), _jsx("div", { className: "glass-1 rounded-2xl p-8", children: formContent })] }) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ContactForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactForm.js","sourceRoot":"","sources":["../../src/marketing/ContactForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAa,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OA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
4
|
+
label: string;
|
|
5
|
+
type?: "text" | "email" | "tel" | "url" | "textarea" | "select";
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
options?: string[];
|
|
9
|
+
colSpan?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function FormField(_props: FormFieldProps): null;
|
|
12
|
+
interface FormProps {
|
|
13
|
+
id?: string;
|
|
14
|
+
action: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
columns?: number;
|
|
18
|
+
submitLabel?: string;
|
|
19
|
+
successTitle?: string;
|
|
20
|
+
successMessage?: string;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function Form({ children, ...rest }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/marketing/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AAGxD,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,QAE/C;AAED,UAAU,SAAS;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAWpD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement } from "react";
|
|
3
|
+
import { FormClient } from "./FormClient";
|
|
4
|
+
export function FormField(_props) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
export function Form({ children, ...rest }) {
|
|
8
|
+
const fields = [];
|
|
9
|
+
Children.forEach(children, (child) => {
|
|
10
|
+
if (!isValidElement(child))
|
|
11
|
+
return;
|
|
12
|
+
if (child.type === FormField) {
|
|
13
|
+
fields.push(child.props);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return _jsx(FormClient, { ...rest, fields: fields });
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=Form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../src/marketing/Form.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAY7D,MAAM,UAAU,SAAS,CAAC,MAAsB;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAcD,MAAM,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAa;IACnD,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QACnC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;YAAE,OAAO;QACnC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAqB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,KAAC,UAAU,OAAK,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface FormFieldDef {
|
|
2
|
+
name: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type?: "text" | "email" | "tel" | "url" | "textarea" | "select";
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
options?: string[];
|
|
8
|
+
colSpan?: number;
|
|
9
|
+
}
|
|
10
|
+
interface FormClientProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
action: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
columns?: number;
|
|
16
|
+
submitLabel?: string;
|
|
17
|
+
successTitle?: string;
|
|
18
|
+
successMessage?: string;
|
|
19
|
+
fields: FormFieldDef[];
|
|
20
|
+
}
|
|
21
|
+
export declare function FormClient({ id, action, title, description, columns, submitLabel, successTitle, successMessage, fields, }: FormClientProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=FormClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormClient.d.ts","sourceRoot":"","sources":["../../src/marketing/FormClient.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAe;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAED,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAW,EACX,WAAsB,EACtB,YAA2B,EAC3B,cAAqD,EACrD,MAAM,GACP,EAAE,eAAe,2CAkIjB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { CheckCircle, Loader2 } from "lucide-react";
|
|
5
|
+
import { Section } from "../ui/section";
|
|
6
|
+
import { Input } from "../ui/input";
|
|
7
|
+
import { Textarea } from "../ui/textarea";
|
|
8
|
+
import { Label } from "../ui/label";
|
|
9
|
+
import { Button } from "../ui/button";
|
|
10
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../ui/select";
|
|
11
|
+
import { cn } from "../lib/utils";
|
|
12
|
+
import { useFormSubmit } from "../lib/use-form-submit";
|
|
13
|
+
const gridColsMap = {
|
|
14
|
+
2: "md:grid-cols-2",
|
|
15
|
+
3: "md:grid-cols-3",
|
|
16
|
+
4: "md:grid-cols-2 lg:grid-cols-4",
|
|
17
|
+
};
|
|
18
|
+
const colSpanMap = {
|
|
19
|
+
2: "md:col-span-2",
|
|
20
|
+
3: "md:col-span-3",
|
|
21
|
+
4: "md:col-span-4",
|
|
22
|
+
};
|
|
23
|
+
export function FormClient({ id, action, title, description, columns = 1, submitLabel = "Submit", successTitle = "Submitted!", successMessage = "Thank you. We'll be in touch soon.", fields, }) {
|
|
24
|
+
const uid = useId();
|
|
25
|
+
const { status, errorMsg, submit } = useFormSubmit(action);
|
|
26
|
+
const [values, setValues] = useState(() => {
|
|
27
|
+
const init = {};
|
|
28
|
+
for (const f of fields)
|
|
29
|
+
init[f.name] = "";
|
|
30
|
+
return init;
|
|
31
|
+
});
|
|
32
|
+
function update(name, value) {
|
|
33
|
+
setValues((prev) => ({ ...prev, [name]: value }));
|
|
34
|
+
}
|
|
35
|
+
function handleSubmit(e) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
submit(values);
|
|
38
|
+
}
|
|
39
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-3xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), status === "success" ? (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "glass-1 rounded-2xl p-8", children: [_jsx("div", { className: cn("grid grid-cols-1 gap-6", gridColsMap[columns]), children: fields.map((field) => (_jsxs("div", { className: cn("space-y-2", field.colSpan && colSpanMap[field.colSpan]), children: [_jsx(Label, { htmlFor: `${uid}-${field.name}`, children: field.label }), field.type === "textarea" ? (_jsx(Textarea, { id: `${uid}-${field.name}`, name: field.name, placeholder: field.placeholder, required: field.required, value: values[field.name] ?? "", onChange: (e) => update(field.name, e.target.value), disabled: status === "loading" })) : field.type === "select" && field.options ? (_jsxs(Select, { value: values[field.name] ?? "", onValueChange: (v) => update(field.name, v), required: field.required, disabled: status === "loading", children: [_jsx(SelectTrigger, { id: `${uid}-${field.name}`, children: _jsx(SelectValue, { placeholder: field.placeholder || "Select..." }) }), _jsx(SelectContent, { children: field.options.map((opt) => (_jsx(SelectItem, { value: opt, children: opt }, opt))) })] })) : (_jsx(Input, { id: `${uid}-${field.name}`, name: field.name, type: field.type || "text", placeholder: field.placeholder, required: field.required, value: values[field.name] ?? "", onChange: (e) => update(field.name, e.target.value), disabled: status === "loading" }))] }, field.name))) }), _jsxs("div", { className: "mt-8", children: [_jsx(Button, { type: "submit", variant: "default", size: "lg", className: "w-full", disabled: status === "loading", children: status === "loading" ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "size-4 animate-spin mr-2" }), "Submitting..."] })) : (submitLabel) }), status === "error" && (_jsx("p", { className: "text-sm text-destructive mt-2", "aria-live": "polite", children: errorMsg }))] })] }))] }) }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=FormClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormClient.js","sourceRoot":"","sources":["../../src/marketing/FormClient.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAa,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,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,IAAI,IAAI,MAAM,EAC1B,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAC/B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACnD,QAAQ,EAAE,MAAM,KAAK,SAAS,GAC9B,CACH,KA7CI,KAAK,CAAC,IAAI,CA8CX,CACP,CAAC,GACE,EACN,eAAK,SAAS,EAAC,MAAM,aACnB,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAE,MAAM,KAAK,SAAS,YAE7B,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CACtB,8BACE,KAAC,OAAO,IAAC,SAAS,EAAC,0BAA0B,GAAG,qBAE/C,CACJ,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,GACM,EACR,MAAM,KAAK,OAAO,IAAI,CACrB,YAAG,SAAS,EAAC,+BAA+B,eAAW,QAAQ,YAC5D,QAAQ,GACP,CACL,IACG,IACD,CACR,IACG,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface FormEmbedProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
src: string;
|
|
4
|
+
provider?: "tally" | "typeform" | "custom";
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
height?: number;
|
|
8
|
+
mode?: "iframe" | "popup";
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function FormEmbed({ id, src, provider, title, description, height, mode, buttonLabel, }: FormEmbedProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=FormEmbed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormEmbed.d.ts","sourceRoot":"","sources":["../../src/marketing/FormEmbed.tsx"],"names":[],"mappings":"AAmBA,UAAU,cAAc;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,EACxB,EAAE,EACF,GAAG,EACH,QAAmB,EACnB,KAAK,EACL,WAAW,EACX,MAAY,EACZ,IAAe,EACf,WAAyB,GAC1B,EAAE,cAAc,2CAoChB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { Section } from "../ui/section";
|
|
6
|
+
import { Button } from "../ui/button";
|
|
7
|
+
function resolveUrl(src, provider) {
|
|
8
|
+
switch (provider) {
|
|
9
|
+
case "tally":
|
|
10
|
+
return `https://tally.so/embed/${src}?transparentBackground=1`;
|
|
11
|
+
case "typeform":
|
|
12
|
+
return `https://form.typeform.com/to/${src}`;
|
|
13
|
+
case "custom":
|
|
14
|
+
return src;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function FormEmbed({ id, src, provider = "custom", title, description, height = 500, mode = "iframe", buttonLabel = "Open Form", }) {
|
|
18
|
+
const resolvedUrl = resolveUrl(src, provider);
|
|
19
|
+
if (mode === "popup") {
|
|
20
|
+
return _jsx(FormEmbedPopup, { url: resolvedUrl, buttonLabel: buttonLabel, height: height });
|
|
21
|
+
}
|
|
22
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-3xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), _jsx("div", { className: "glass-1 rounded-2xl overflow-hidden", children: _jsx("iframe", { src: resolvedUrl, height: height, className: "w-full border-0", loading: "lazy", title: title || "Embedded form" }) })] }) }));
|
|
23
|
+
}
|
|
24
|
+
function FormEmbedPopup({ url, buttonLabel, height, }) {
|
|
25
|
+
return (_jsxs(DialogPrimitive.Root, { children: [_jsx(DialogPrimitive.Trigger, { asChild: true, children: _jsx(Button, { variant: "default", size: "lg", children: buttonLabel }) }), _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80" }), _jsxs(DialogPrimitive.Content, { className: "bg-background border-border dark:border-border/15 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-2xl -translate-x-1/2 -translate-y-1/2 rounded-2xl border p-0 shadow-lg overflow-hidden", children: [_jsx(DialogPrimitive.Title, { className: "sr-only", children: buttonLabel }), _jsx(DialogPrimitive.Description, { className: "sr-only", children: "Embedded form" }), _jsx("iframe", { src: url, height: height, className: "w-full border-0", loading: "lazy", title: buttonLabel }), _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring absolute top-4 right-4 z-[100] rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden", children: [_jsx(XIcon, { className: "size-5" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })] }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=FormEmbed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormEmbed.js","sourceRoot":"","sources":["../../src/marketing/FormEmbed.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,SAAS,UAAU,CAAC,GAAW,EAAE,QAAyC;IACxE,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,0BAA0B,GAAG,0BAA0B,CAAC;QACjE,KAAK,UAAU;YACb,OAAO,gCAAgC,GAAG,EAAE,CAAC;QAC/C,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAaD,MAAM,UAAU,SAAS,CAAC,EACxB,EAAE,EACF,GAAG,EACH,QAAQ,GAAG,QAAQ,EACnB,KAAK,EACL,WAAW,EACX,MAAM,GAAG,GAAG,EACZ,IAAI,GAAG,QAAQ,EACf,WAAW,GAAG,WAAW,GACV;IACf,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAE9C,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,OAAO,KAAC,cAAc,IAAC,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IACxF,CAAC;IAED,OAAO,CACL,KAAC,OAAO,IAAC,EAAE,EAAE,EAAE,YACb,eAAK,SAAS,E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S,EAAC,SAAS,sBAAa,IAChB,IACA,IACH,IACJ,CACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface NewsletterFormProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
action: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
submitLabel?: string;
|
|
8
|
+
successMessage?: string;
|
|
9
|
+
variant?: "section" | "inline";
|
|
10
|
+
}
|
|
11
|
+
export declare function NewsletterForm({ id, action, title, description, placeholder, submitLabel, successMessage, variant, }: NewsletterFormProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=NewsletterForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewsletterForm.d.ts","sourceRoot":"","sources":["../../src/marketing/NewsletterForm.tsx"],"names":[],"mappings":"AASA,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC;AAED,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,MAAM,EACN,KAAK,EACL,WAAW,EACX,WAAgC,EAChC,WAAyB,EACzB,cAAqC,EACrC,OAAmB,GACpB,EAAE,mBAAmB,2CAwErB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { CheckCircle, Loader2 } from "lucide-react";
|
|
5
|
+
import { Section } from "../ui/section";
|
|
6
|
+
import { Input } from "../ui/input";
|
|
7
|
+
import { Button } from "../ui/button";
|
|
8
|
+
import { useFormSubmit } from "../lib/use-form-submit";
|
|
9
|
+
export function NewsletterForm({ id, action, title, description, placeholder = "Enter your email", submitLabel = "Subscribe", successMessage = "You're subscribed!", variant = "section", }) {
|
|
10
|
+
const { status, errorMsg, submit } = useFormSubmit(action);
|
|
11
|
+
const [email, setEmail] = useState("");
|
|
12
|
+
function handleSubmit(e) {
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
submit({ email });
|
|
15
|
+
}
|
|
16
|
+
const successContent = (_jsxs("div", { className: "flex items-center justify-center gap-2 text-sm text-primary", children: [_jsx(CheckCircle, { className: "size-4" }), _jsx("span", { children: successMessage })] }));
|
|
17
|
+
const formContent = status === "success" ? (successContent) : (_jsxs(_Fragment, { children: [_jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col sm:flex-row gap-3 max-w-md mx-auto", children: [_jsx(Input, { type: "email", placeholder: placeholder, value: email, onChange: (e) => setEmail(e.target.value), required: true, className: "flex-1", disabled: status === "loading" }), _jsx(Button, { type: "submit", variant: "default", disabled: status === "loading", children: status === "loading" ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (submitLabel) })] }), status === "error" && (_jsx("p", { className: "text-sm text-destructive text-center mt-2", "aria-live": "polite", children: errorMsg }))] }));
|
|
18
|
+
if (variant === "inline") {
|
|
19
|
+
return formContent;
|
|
20
|
+
}
|
|
21
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-2xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), formContent] }) }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=NewsletterForm.js.map
|
|
@@ -0,0 +1 @@
|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,EAAC,OAAO,EACZ,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,QAAQ,QACR,SAAS,EAAC,QAAQ,EAClB,QAAQ,EAAE,MAAM,KAAK,SAAS,GAC9B,EACF,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,YACnE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CACtB,KAAC,OAAO,IAAC,SAAS,EAAC,qBAAqB,GAAG,CAC5C,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,GACM,IACJ,EACN,MAAM,KAAK,OAAO,IAAI,CACrB,YAAG,SAAS,EAAC,2CAA2C,eAAW,QAAQ,YACxE,QAAQ,GACP,CACL,IACA,CACJ,CAAC;IAEJ,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,OAAO,CACL,KAAC,OAAO,IAAC,EAAE,EAAE,EAAE,YACb,eAAK,SAAS,EAAC,0BAA0B,aACtC,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACzB,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,IAAI,CACR,aAAI,SAAS,EAAC,qDAAqD,YAChE,KAAK,GACH,CACN,EACA,WAAW,IAAI,CACd,YAAG,SAAS,EAAC,iDAAiD,YAC3D,WAAW,GACV,CACL,IACG,CACP,EACA,WAAW,IACR,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface WaitlistFormProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
action: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
showName?: boolean;
|
|
8
|
+
nameLabel?: string;
|
|
9
|
+
emailLabel?: string;
|
|
10
|
+
submitLabel?: string;
|
|
11
|
+
successTitle?: string;
|
|
12
|
+
successMessage?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function WaitlistForm({ id, action, title, description, badge, showName, nameLabel, emailLabel, submitLabel, successTitle, successMessage, }: WaitlistFormProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=WaitlistForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaitlistForm.d.ts","sourceRoot":"","sources":["../../src/marketing/WaitlistForm.tsx"],"names":[],"mappings":"AAWA,UAAU,iBAAiB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,MAAM,EACN,KAA2B,EAC3B,WAAW,EACX,KAAK,EACL,QAAgB,EAChB,SAAkB,EAClB,UAAoB,EACpB,WAA6B,EAC7B,YAAoC,EACpC,cAAwD,GACzD,EAAE,iBAAiB,2CA2GnB"}
|