@slashclick/ui 0.1.15 → 0.2.0
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/dist/components/flowbite/search-hero.cjs +3 -3
- package/dist/components/flowbite/search-hero.cjs.map +1 -1
- package/dist/components/flowbite/search-hero.js +3 -3
- package/dist/components/flowbite/search-hero.js.map +1 -1
- package/dist/components/header/header.cjs +23 -10
- package/dist/components/header/header.cjs.map +1 -1
- package/dist/components/header/header.d.ts +5 -2
- package/dist/components/header/header.d.ts.map +1 -1
- package/dist/components/header/header.js +13 -10
- package/dist/components/header/header.js.map +1 -1
- package/dist/components/header/langbutton/langbutton.cjs +17 -5
- package/dist/components/header/langbutton/langbutton.cjs.map +1 -1
- package/dist/components/header/langbutton/langbutton.d.ts +3 -1
- package/dist/components/header/langbutton/langbutton.d.ts.map +1 -1
- package/dist/components/header/langbutton/langbutton.js +17 -5
- package/dist/components/header/langbutton/langbutton.js.map +1 -1
- package/dist/components/header/userbutton/userbutton.cjs +14 -5
- package/dist/components/header/userbutton/userbutton.cjs.map +1 -1
- package/dist/components/header/userbutton/userbutton.d.ts +3 -1
- package/dist/components/header/userbutton/userbutton.d.ts.map +1 -1
- package/dist/components/header/userbutton/userbutton.js +14 -5
- package/dist/components/header/userbutton/userbutton.js.map +1 -1
- package/dist/components/icons/logo.cjs +6 -2
- package/dist/components/icons/logo.cjs.map +1 -1
- package/dist/components/icons/logo.d.ts +3 -1
- package/dist/components/icons/logo.d.ts.map +1 -1
- package/dist/components/icons/logo.js +6 -2
- package/dist/components/icons/logo.js.map +1 -1
- package/dist/components/tailwind/contact.cjs +6 -6
- package/dist/components/tailwind/contact.cjs.map +1 -1
- package/dist/components/tailwind/contact.js +6 -6
- package/dist/components/tailwind/contact.js.map +1 -1
- package/dist/components/tailwind/pricing.cjs +28 -28
- package/dist/components/tailwind/pricing.cjs.map +1 -1
- package/dist/components/tailwind/pricing.d.ts.map +1 -1
- package/dist/components/tailwind/pricing.js +28 -28
- package/dist/components/tailwind/pricing.js.map +1 -1
- package/dist/lib/nav-theme.cjs +33 -0
- package/dist/lib/nav-theme.cjs.map +1 -0
- package/dist/lib/nav-theme.d.ts +3 -0
- package/dist/lib/nav-theme.d.ts.map +1 -0
- package/dist/lib/nav-theme.js +9 -0
- package/dist/lib/nav-theme.js.map +1 -0
- package/dist/styles.css +2 -2
- package/package.json +14 -7
|
@@ -23,7 +23,11 @@ __export(logo_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(logo_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_utils = require("../../lib/utils");
|
|
26
|
-
|
|
26
|
+
var import_nav_theme = require("../../lib/nav-theme");
|
|
27
|
+
const Logo = ({
|
|
28
|
+
className,
|
|
29
|
+
navTheme = "auto"
|
|
30
|
+
}) => {
|
|
27
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
28
32
|
"svg",
|
|
29
33
|
{
|
|
@@ -31,7 +35,7 @@ const Logo = ({ className }) => {
|
|
|
31
35
|
"data-name": "Layer 1",
|
|
32
36
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
37
|
viewBox: "0 0 107.25 132.8",
|
|
34
|
-
className: (0, import_utils.cn)(
|
|
38
|
+
className: (0, import_utils.cn)(import_nav_theme.NAV_TEXT_CLASSES[navTheme], className),
|
|
35
39
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
40
|
"path",
|
|
37
41
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/icons/logo.tsx"],"sourcesContent":["import { cn } from '../../lib/utils'\n\nexport const Logo = ({
|
|
1
|
+
{"version":3,"sources":["../../../components/icons/logo.tsx"],"sourcesContent":["import { cn } from '../../lib/utils'\nimport { NAV_TEXT_CLASSES, NavTheme } from '../../lib/nav-theme'\n\nexport const Logo = ({\n className,\n navTheme = 'auto',\n}: {\n className?: string\n navTheme?: NavTheme\n}) => {\n return (\n <svg\n id=\"Layer_1\"\n data-name=\"Layer 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 107.25 132.8\"\n className={cn(NAV_TEXT_CLASSES[navTheme], className)}\n >\n <path\n d=\"M5.23,48.29A31.58,31.58,0,0,1,2.45,34.87c0-10.09,4.4-18.66,12.74-24.79C24.16,3.48,35.44,0,51.79,0a99.06,99.06,0,0,1,50.83,14L91.21,32.15c-13-7.22-28.55-11.34-41.82-11.34C24.58,20.81,7.84,30.07,5.23,48.29Zm72.17,56.3c-4.59,4.38-13.35,6.35-24.9,6.35-13.49,0-28-4.35-40.85-11.51L0,118.09c16.51,9.56,32.87,14.71,51.51,14.71,22.84,0,32.17-7.9,32.17-16C83.68,111.65,81.3,107.75,77.4,104.59Zm-17.73-49C47,51.11,36.52,45.66,31.93,40.3c-4.87,2.94-8.41,7.53-8.41,13,0,9.71,9.53,16,25.4,21.52,25.39,7.82,51.08,18.74,53.15,38.11a32.5,32.5,0,0,0,5.18-18.27C107.25,70.63,80.76,63,59.67,55.57Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBM;AAlBN,mBAAmB;AACnB,uBAA2C;AAEpC,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA,WAAW;AACb,MAGM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,aAAU;AAAA,MACV,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,eAAW,iBAAG,kCAAiB,QAAQ,GAAG,SAAS;AAAA,MAEnD;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { NavTheme } from '../../lib/nav-theme';
|
|
2
|
+
export declare const Logo: ({ className, navTheme, }: {
|
|
2
3
|
className?: string;
|
|
4
|
+
navTheme?: NavTheme;
|
|
3
5
|
}) => import("react").JSX.Element;
|
|
4
6
|
//# sourceMappingURL=logo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../components/icons/logo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../components/icons/logo.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEhE,eAAO,MAAM,IAAI,GAAI,0BAGlB;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB,gCAeA,CAAA"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../lib/utils";
|
|
3
|
-
|
|
3
|
+
import { NAV_TEXT_CLASSES } from "../../lib/nav-theme";
|
|
4
|
+
const Logo = ({
|
|
5
|
+
className,
|
|
6
|
+
navTheme = "auto"
|
|
7
|
+
}) => {
|
|
4
8
|
return /* @__PURE__ */ jsx(
|
|
5
9
|
"svg",
|
|
6
10
|
{
|
|
@@ -8,7 +12,7 @@ const Logo = ({ className }) => {
|
|
|
8
12
|
"data-name": "Layer 1",
|
|
9
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10
14
|
viewBox: "0 0 107.25 132.8",
|
|
11
|
-
className: cn(
|
|
15
|
+
className: cn(NAV_TEXT_CLASSES[navTheme], className),
|
|
12
16
|
children: /* @__PURE__ */ jsx(
|
|
13
17
|
"path",
|
|
14
18
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/icons/logo.tsx"],"sourcesContent":["import { cn } from '../../lib/utils'\n\nexport const Logo = ({
|
|
1
|
+
{"version":3,"sources":["../../../components/icons/logo.tsx"],"sourcesContent":["import { cn } from '../../lib/utils'\nimport { NAV_TEXT_CLASSES, NavTheme } from '../../lib/nav-theme'\n\nexport const Logo = ({\n className,\n navTheme = 'auto',\n}: {\n className?: string\n navTheme?: NavTheme\n}) => {\n return (\n <svg\n id=\"Layer_1\"\n data-name=\"Layer 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 107.25 132.8\"\n className={cn(NAV_TEXT_CLASSES[navTheme], className)}\n >\n <path\n d=\"M5.23,48.29A31.58,31.58,0,0,1,2.45,34.87c0-10.09,4.4-18.66,12.74-24.79C24.16,3.48,35.44,0,51.79,0a99.06,99.06,0,0,1,50.83,14L91.21,32.15c-13-7.22-28.55-11.34-41.82-11.34C24.58,20.81,7.84,30.07,5.23,48.29Zm72.17,56.3c-4.59,4.38-13.35,6.35-24.9,6.35-13.49,0-28-4.35-40.85-11.51L0,118.09c16.51,9.56,32.87,14.71,51.51,14.71,22.84,0,32.17-7.9,32.17-16C83.68,111.65,81.3,107.75,77.4,104.59Zm-17.73-49C47,51.11,36.52,45.66,31.93,40.3c-4.87,2.94-8.41,7.53-8.41,13,0,9.71,9.53,16,25.4,21.52,25.39,7.82,51.08,18.74,53.15,38.11a32.5,32.5,0,0,0,5.18-18.27C107.25,70.63,80.76,63,59.67,55.57Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n"],"mappings":"AAkBM;AAlBN,SAAS,UAAU;AACnB,SAAS,wBAAkC;AAEpC,MAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA,WAAW;AACb,MAGM;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,aAAU;AAAA,MACV,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,WAAW,GAAG,iBAAiB,QAAQ,GAAG,SAAS;AAAA,MAEnD;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -145,7 +145,7 @@ const Contact = () => {
|
|
|
145
145
|
autoComplete: "given-name",
|
|
146
146
|
required: true,
|
|
147
147
|
disabled: status === "loading",
|
|
148
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
148
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
149
149
|
}
|
|
150
150
|
) })
|
|
151
151
|
] }),
|
|
@@ -167,7 +167,7 @@ const Contact = () => {
|
|
|
167
167
|
autoComplete: "family-name",
|
|
168
168
|
required: true,
|
|
169
169
|
disabled: status === "loading",
|
|
170
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
170
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
171
171
|
}
|
|
172
172
|
) })
|
|
173
173
|
] }),
|
|
@@ -188,7 +188,7 @@ const Contact = () => {
|
|
|
188
188
|
id: "company",
|
|
189
189
|
autoComplete: "organization",
|
|
190
190
|
disabled: status === "loading",
|
|
191
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
191
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
192
192
|
}
|
|
193
193
|
) })
|
|
194
194
|
] }),
|
|
@@ -210,7 +210,7 @@ const Contact = () => {
|
|
|
210
210
|
autoComplete: "email",
|
|
211
211
|
required: true,
|
|
212
212
|
disabled: status === "loading",
|
|
213
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
213
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
214
214
|
}
|
|
215
215
|
) })
|
|
216
216
|
] }),
|
|
@@ -256,7 +256,7 @@ const Contact = () => {
|
|
|
256
256
|
id: "phone-number",
|
|
257
257
|
autoComplete: "tel",
|
|
258
258
|
disabled: status === "loading",
|
|
259
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
259
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
260
260
|
}
|
|
261
261
|
)
|
|
262
262
|
] })
|
|
@@ -278,7 +278,7 @@ const Contact = () => {
|
|
|
278
278
|
rows: 4,
|
|
279
279
|
required: true,
|
|
280
280
|
disabled: status === "loading",
|
|
281
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
281
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10",
|
|
282
282
|
defaultValue: ""
|
|
283
283
|
}
|
|
284
284
|
) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/tailwind/contact.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { ChevronDownIcon } from '@heroicons/react/20/solid'\nimport { Switch } from '@headlessui/react'\nimport { Input } from '../ui/input'\nimport { useRecaptcha } from '../../hooks/useRecaptcha'\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ntype Status = 'idle' | 'loading' | 'success' | 'error'\n\nexport const Contact = () => {\n const [agreed, setAgreed] = useState(false)\n const [status, setStatus] = useState<Status>('idle')\n const [errorMessage, setErrorMessage] = useState('')\n const { executeRecaptcha } = useRecaptcha()\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n\n if (!agreed) {\n setErrorMessage('You must agree to the privacy policy')\n return\n }\n\n const form = e.currentTarget\n const data = new FormData(form)\n\n const recaptchaToken = await executeRecaptcha('contact')\n\n const body = {\n firstName: data.get('first-name') as string,\n lastName: data.get('last-name') as string,\n company: data.get('company') as string,\n email: data.get('email') as string,\n phone: data.get('phone-number') as string,\n message: data.get('message') as string,\n agreed: true as const,\n recaptchaToken: recaptchaToken ?? undefined,\n }\n\n setStatus('loading')\n setErrorMessage('')\n\n try {\n const res = await fetch('/api/contact', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n })\n\n if (!res.ok) {\n const json = await res.json()\n throw new Error(json.error ?? 'Something went wrong')\n }\n\n setStatus('success')\n form.reset()\n setAgreed(false)\n } catch (err) {\n setStatus('error')\n setErrorMessage(\n err instanceof Error ? err.message : 'Something went wrong',\n )\n }\n }\n\n if (status === 'success') {\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Message sent\n </h2>\n <p className=\"mt-4 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Thanks for reaching out. We'll get back to you as soon as\n possible.\n </p>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div\n className=\"absolute inset-x-0 top-[-10rem] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[-20rem]\"\n aria-hidden=\"true\"\n >\n <div\n className=\"aspect-1155/678 bg-linear-to-tr relative left-1/2 -z-10 w-[36.125rem] max-w-none -translate-x-1/2 rotate-[30deg] from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-40rem)] sm:w-[72.1875rem]\"\n style={{\n clipPath:\n 'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',\n }}\n />\n </div>\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Contact us\n </h2>\n <p className=\"mt-2 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Have a question or want to learn more? Send us a message.\n </p>\n </div>\n <form onSubmit={handleSubmit} className=\"mx-auto mt-16 max-w-xl sm:mt-20\">\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2\">\n <div>\n <label\n htmlFor=\"first-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n First name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"first-name\"\n id=\"first-name\"\n autoComplete=\"given-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div>\n <label\n htmlFor=\"last-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Last name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"last-name\"\n id=\"last-name\"\n autoComplete=\"family-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"company\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Company\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"company\"\n id=\"company\"\n autoComplete=\"organization\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Email\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"email\"\n name=\"email\"\n id=\"email\"\n autoComplete=\"email\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"phone-number\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Phone number\n </label>\n <div className=\"relative mt-2.5\">\n <div className=\"absolute inset-y-0 left-0 flex items-center\">\n <label htmlFor=\"country\" className=\"sr-only\">\n Country\n </label>\n <select\n id=\"country\"\n name=\"country\"\n disabled={status === 'loading'}\n className=\"h-full rounded-md border-0 bg-transparent bg-none py-0 pl-4 pr-9 text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm\"\n >\n <option>US</option>\n <option>CA</option>\n <option>EU</option>\n </select>\n <ChevronDownIcon\n className=\"pointer-events-none absolute right-3 top-0 h-full w-5 text-gray-400\"\n aria-hidden=\"true\"\n />\n </div>\n <Input\n type=\"tel\"\n name=\"phone-number\"\n id=\"phone-number\"\n autoComplete=\"tel\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"message\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Message\n </label>\n <div className=\"mt-2.5\">\n <textarea\n name=\"message\"\n id=\"message\"\n rows={4}\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n defaultValue={''}\n />\n </div>\n </div>\n <Switch.Group as=\"div\" className=\"flex gap-x-4 sm:col-span-2\">\n <div className=\"flex h-6 items-center\">\n <Switch\n checked={agreed}\n onChange={setAgreed}\n disabled={status === 'loading'}\n className={classNames(\n agreed ? 'bg-primary-600' : 'bg-gray-200',\n 'focus-visible:outline-primary-600 flex w-8 flex-none cursor-pointer rounded-full p-px ring-1 ring-inset ring-gray-900/5 transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',\n )}\n >\n <span className=\"sr-only\">Agree to policies</span>\n <span\n aria-hidden=\"true\"\n className={classNames(\n agreed ? 'translate-x-3.5' : 'translate-x-0',\n 'shadow-2xs h-4 w-4 transform rounded-full bg-white ring-1 ring-gray-900/5 transition duration-200 ease-in-out',\n )}\n />\n </Switch>\n </div>\n <Switch.Label className=\"text-sm leading-6 text-gray-600 dark:text-white\">\n By selecting this, you agree to our{' '}\n <a\n href=\"/about/privacy\"\n className=\"text-primary-600 font-semibold\"\n >\n privacy policy\n </a>\n .\n </Switch.Label>\n </Switch.Group>\n </div>\n\n {errorMessage && (\n <p\n className=\"mt-4 text-sm text-red-600 dark:text-red-400\"\n role=\"alert\"\n >\n {errorMessage}\n </p>\n )}\n\n <div className=\"mt-10\">\n <button\n type=\"submit\"\n disabled={status === 'loading'}\n className=\"bg-primary-500 hover:bg-primary-400 focus-visible:outline-primary-500 shadow-2xs flex w-full items-center justify-center rounded-md px-3 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {status === 'loading' ? 'Sending…' : 'Send message'}\n </button>\n </div>\n <p className=\"mt-4 text-center text-xs text-gray-400 dark:text-gray-500\">\n This site is protected by reCAPTCHA and the Google{' '}\n <a\n href=\"https://policies.google.com/privacy\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Privacy Policy\n </a>{' '}\n and{' '}\n <a\n href=\"https://policies.google.com/terms\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Terms of Service\n </a>{' '}\n apply.\n </p>\n </form>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwEQ;AAvER,mBAAyB;AACzB,mBAAgC;AAChC,IAAAA,gBAAuB;AACvB,mBAAsB;AACtB,0BAA6B;AAE7B,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAIO,MAAM,UAAU,MAAM;AAC3B,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAiB,MAAM;AACnD,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,EAAE;AACnD,QAAM,EAAE,iBAAiB,QAAI,kCAAa;AAE1C,QAAM,eAAe,CAAO,MAAwC;AAnBtE;AAoBI,MAAE,eAAe;AAEjB,QAAI,CAAC,QAAQ;AACX,sBAAgB,sCAAsC;AACtD;AAAA,IACF;AAEA,UAAM,OAAO,EAAE;AACf,UAAM,OAAO,IAAI,SAAS,IAAI;AAE9B,UAAM,iBAAiB,MAAM,iBAAiB,SAAS;AAEvD,UAAM,OAAO;AAAA,MACX,WAAW,KAAK,IAAI,YAAY;AAAA,MAChC,UAAU,KAAK,IAAI,WAAW;AAAA,MAC9B,SAAS,KAAK,IAAI,SAAS;AAAA,MAC3B,OAAO,KAAK,IAAI,OAAO;AAAA,MACvB,OAAO,KAAK,IAAI,cAAc;AAAA,MAC9B,SAAS,KAAK,IAAI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AAA,KACF;AAEJ;","names":["import_react"]}
|
|
1
|
+
{"version":3,"sources":["../../../components/tailwind/contact.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { ChevronDownIcon } from '@heroicons/react/20/solid'\nimport { Switch } from '@headlessui/react'\nimport { Input } from '../ui/input'\nimport { useRecaptcha } from '../../hooks/useRecaptcha'\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ntype Status = 'idle' | 'loading' | 'success' | 'error'\n\nexport const Contact = () => {\n const [agreed, setAgreed] = useState(false)\n const [status, setStatus] = useState<Status>('idle')\n const [errorMessage, setErrorMessage] = useState('')\n const { executeRecaptcha } = useRecaptcha()\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n\n if (!agreed) {\n setErrorMessage('You must agree to the privacy policy')\n return\n }\n\n const form = e.currentTarget\n const data = new FormData(form)\n\n const recaptchaToken = await executeRecaptcha('contact')\n\n const body = {\n firstName: data.get('first-name') as string,\n lastName: data.get('last-name') as string,\n company: data.get('company') as string,\n email: data.get('email') as string,\n phone: data.get('phone-number') as string,\n message: data.get('message') as string,\n agreed: true as const,\n recaptchaToken: recaptchaToken ?? undefined,\n }\n\n setStatus('loading')\n setErrorMessage('')\n\n try {\n const res = await fetch('/api/contact', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n })\n\n if (!res.ok) {\n const json = await res.json()\n throw new Error(json.error ?? 'Something went wrong')\n }\n\n setStatus('success')\n form.reset()\n setAgreed(false)\n } catch (err) {\n setStatus('error')\n setErrorMessage(\n err instanceof Error ? err.message : 'Something went wrong',\n )\n }\n }\n\n if (status === 'success') {\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Message sent\n </h2>\n <p className=\"mt-4 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Thanks for reaching out. We'll get back to you as soon as\n possible.\n </p>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div\n className=\"absolute inset-x-0 top-[-10rem] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[-20rem]\"\n aria-hidden=\"true\"\n >\n <div\n className=\"aspect-1155/678 bg-linear-to-tr relative left-1/2 -z-10 w-[36.125rem] max-w-none -translate-x-1/2 rotate-[30deg] from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-40rem)] sm:w-[72.1875rem]\"\n style={{\n clipPath:\n 'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',\n }}\n />\n </div>\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Contact us\n </h2>\n <p className=\"mt-2 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Have a question or want to learn more? Send us a message.\n </p>\n </div>\n <form onSubmit={handleSubmit} className=\"mx-auto mt-16 max-w-xl sm:mt-20\">\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2\">\n <div>\n <label\n htmlFor=\"first-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n First name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"first-name\"\n id=\"first-name\"\n autoComplete=\"given-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div>\n <label\n htmlFor=\"last-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Last name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"last-name\"\n id=\"last-name\"\n autoComplete=\"family-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"company\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Company\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"company\"\n id=\"company\"\n autoComplete=\"organization\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Email\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"email\"\n name=\"email\"\n id=\"email\"\n autoComplete=\"email\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"phone-number\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Phone number\n </label>\n <div className=\"relative mt-2.5\">\n <div className=\"absolute inset-y-0 left-0 flex items-center\">\n <label htmlFor=\"country\" className=\"sr-only\">\n Country\n </label>\n <select\n id=\"country\"\n name=\"country\"\n disabled={status === 'loading'}\n className=\"h-full rounded-md border-0 bg-transparent bg-none py-0 pl-4 pr-9 text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm\"\n >\n <option>US</option>\n <option>CA</option>\n <option>EU</option>\n </select>\n <ChevronDownIcon\n className=\"pointer-events-none absolute right-3 top-0 h-full w-5 text-gray-400\"\n aria-hidden=\"true\"\n />\n </div>\n <Input\n type=\"tel\"\n name=\"phone-number\"\n id=\"phone-number\"\n autoComplete=\"tel\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"message\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Message\n </label>\n <div className=\"mt-2.5\">\n <textarea\n name=\"message\"\n id=\"message\"\n rows={4}\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n defaultValue={''}\n />\n </div>\n </div>\n <Switch.Group as=\"div\" className=\"flex gap-x-4 sm:col-span-2\">\n <div className=\"flex h-6 items-center\">\n <Switch\n checked={agreed}\n onChange={setAgreed}\n disabled={status === 'loading'}\n className={classNames(\n agreed ? 'bg-primary-600' : 'bg-gray-200',\n 'focus-visible:outline-primary-600 flex w-8 flex-none cursor-pointer rounded-full p-px ring-1 ring-inset ring-gray-900/5 transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',\n )}\n >\n <span className=\"sr-only\">Agree to policies</span>\n <span\n aria-hidden=\"true\"\n className={classNames(\n agreed ? 'translate-x-3.5' : 'translate-x-0',\n 'shadow-2xs h-4 w-4 transform rounded-full bg-white ring-1 ring-gray-900/5 transition duration-200 ease-in-out',\n )}\n />\n </Switch>\n </div>\n <Switch.Label className=\"text-sm leading-6 text-gray-600 dark:text-white\">\n By selecting this, you agree to our{' '}\n <a\n href=\"/about/privacy\"\n className=\"text-primary-600 font-semibold\"\n >\n privacy policy\n </a>\n .\n </Switch.Label>\n </Switch.Group>\n </div>\n\n {errorMessage && (\n <p\n className=\"mt-4 text-sm text-red-600 dark:text-red-400\"\n role=\"alert\"\n >\n {errorMessage}\n </p>\n )}\n\n <div className=\"mt-10\">\n <button\n type=\"submit\"\n disabled={status === 'loading'}\n className=\"bg-primary-500 hover:bg-primary-400 focus-visible:outline-primary-500 shadow-2xs flex w-full items-center justify-center rounded-md px-3 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {status === 'loading' ? 'Sending…' : 'Send message'}\n </button>\n </div>\n <p className=\"mt-4 text-center text-xs text-gray-400 dark:text-gray-500\">\n This site is protected by reCAPTCHA and the Google{' '}\n <a\n href=\"https://policies.google.com/privacy\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Privacy Policy\n </a>{' '}\n and{' '}\n <a\n href=\"https://policies.google.com/terms\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Terms of Service\n </a>{' '}\n apply.\n </p>\n </form>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwEQ;AAvER,mBAAyB;AACzB,mBAAgC;AAChC,IAAAA,gBAAuB;AACvB,mBAAsB;AACtB,0BAA6B;AAE7B,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAIO,MAAM,UAAU,MAAM;AAC3B,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAiB,MAAM;AACnD,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,EAAE;AACnD,QAAM,EAAE,iBAAiB,QAAI,kCAAa;AAE1C,QAAM,eAAe,CAAO,MAAwC;AAnBtE;AAoBI,MAAE,eAAe;AAEjB,QAAI,CAAC,QAAQ;AACX,sBAAgB,sCAAsC;AACtD;AAAA,IACF;AAEA,UAAM,OAAO,EAAE;AACf,UAAM,OAAO,IAAI,SAAS,IAAI;AAE9B,UAAM,iBAAiB,MAAM,iBAAiB,SAAS;AAEvD,UAAM,OAAO;AAAA,MACX,WAAW,KAAK,IAAI,YAAY;AAAA,MAChC,UAAU,KAAK,IAAI,WAAW;AAAA,MAC9B,SAAS,KAAK,IAAI,SAAS;AAAA,MAC3B,OAAO,KAAK,IAAI,OAAO;AAAA,MACvB,OAAO,KAAK,IAA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K;AAAA,QAAI;AAAA,SAEX;AAAA,OACF;AAAA,KACF;AAEJ;","names":["import_react"]}
|
|
@@ -122,7 +122,7 @@ const Contact = () => {
|
|
|
122
122
|
autoComplete: "given-name",
|
|
123
123
|
required: true,
|
|
124
124
|
disabled: status === "loading",
|
|
125
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
125
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
] }),
|
|
@@ -144,7 +144,7 @@ const Contact = () => {
|
|
|
144
144
|
autoComplete: "family-name",
|
|
145
145
|
required: true,
|
|
146
146
|
disabled: status === "loading",
|
|
147
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
147
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
148
148
|
}
|
|
149
149
|
) })
|
|
150
150
|
] }),
|
|
@@ -165,7 +165,7 @@ const Contact = () => {
|
|
|
165
165
|
id: "company",
|
|
166
166
|
autoComplete: "organization",
|
|
167
167
|
disabled: status === "loading",
|
|
168
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
168
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
169
169
|
}
|
|
170
170
|
) })
|
|
171
171
|
] }),
|
|
@@ -187,7 +187,7 @@ const Contact = () => {
|
|
|
187
187
|
autoComplete: "email",
|
|
188
188
|
required: true,
|
|
189
189
|
disabled: status === "loading",
|
|
190
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
190
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
191
191
|
}
|
|
192
192
|
) })
|
|
193
193
|
] }),
|
|
@@ -233,7 +233,7 @@ const Contact = () => {
|
|
|
233
233
|
id: "phone-number",
|
|
234
234
|
autoComplete: "tel",
|
|
235
235
|
disabled: status === "loading",
|
|
236
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
236
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10"
|
|
237
237
|
}
|
|
238
238
|
)
|
|
239
239
|
] })
|
|
@@ -255,7 +255,7 @@ const Contact = () => {
|
|
|
255
255
|
rows: 4,
|
|
256
256
|
required: true,
|
|
257
257
|
disabled: status === "loading",
|
|
258
|
-
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-
|
|
258
|
+
className: "focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10",
|
|
259
259
|
defaultValue: ""
|
|
260
260
|
}
|
|
261
261
|
) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/tailwind/contact.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { ChevronDownIcon } from '@heroicons/react/20/solid'\nimport { Switch } from '@headlessui/react'\nimport { Input } from '../ui/input'\nimport { useRecaptcha } from '../../hooks/useRecaptcha'\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ntype Status = 'idle' | 'loading' | 'success' | 'error'\n\nexport const Contact = () => {\n const [agreed, setAgreed] = useState(false)\n const [status, setStatus] = useState<Status>('idle')\n const [errorMessage, setErrorMessage] = useState('')\n const { executeRecaptcha } = useRecaptcha()\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n\n if (!agreed) {\n setErrorMessage('You must agree to the privacy policy')\n return\n }\n\n const form = e.currentTarget\n const data = new FormData(form)\n\n const recaptchaToken = await executeRecaptcha('contact')\n\n const body = {\n firstName: data.get('first-name') as string,\n lastName: data.get('last-name') as string,\n company: data.get('company') as string,\n email: data.get('email') as string,\n phone: data.get('phone-number') as string,\n message: data.get('message') as string,\n agreed: true as const,\n recaptchaToken: recaptchaToken ?? undefined,\n }\n\n setStatus('loading')\n setErrorMessage('')\n\n try {\n const res = await fetch('/api/contact', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n })\n\n if (!res.ok) {\n const json = await res.json()\n throw new Error(json.error ?? 'Something went wrong')\n }\n\n setStatus('success')\n form.reset()\n setAgreed(false)\n } catch (err) {\n setStatus('error')\n setErrorMessage(\n err instanceof Error ? err.message : 'Something went wrong',\n )\n }\n }\n\n if (status === 'success') {\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Message sent\n </h2>\n <p className=\"mt-4 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Thanks for reaching out. We'll get back to you as soon as\n possible.\n </p>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div\n className=\"absolute inset-x-0 top-[-10rem] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[-20rem]\"\n aria-hidden=\"true\"\n >\n <div\n className=\"aspect-1155/678 bg-linear-to-tr relative left-1/2 -z-10 w-[36.125rem] max-w-none -translate-x-1/2 rotate-[30deg] from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-40rem)] sm:w-[72.1875rem]\"\n style={{\n clipPath:\n 'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',\n }}\n />\n </div>\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Contact us\n </h2>\n <p className=\"mt-2 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Have a question or want to learn more? Send us a message.\n </p>\n </div>\n <form onSubmit={handleSubmit} className=\"mx-auto mt-16 max-w-xl sm:mt-20\">\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2\">\n <div>\n <label\n htmlFor=\"first-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n First name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"first-name\"\n id=\"first-name\"\n autoComplete=\"given-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div>\n <label\n htmlFor=\"last-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Last name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"last-name\"\n id=\"last-name\"\n autoComplete=\"family-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"company\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Company\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"company\"\n id=\"company\"\n autoComplete=\"organization\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Email\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"email\"\n name=\"email\"\n id=\"email\"\n autoComplete=\"email\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"phone-number\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Phone number\n </label>\n <div className=\"relative mt-2.5\">\n <div className=\"absolute inset-y-0 left-0 flex items-center\">\n <label htmlFor=\"country\" className=\"sr-only\">\n Country\n </label>\n <select\n id=\"country\"\n name=\"country\"\n disabled={status === 'loading'}\n className=\"h-full rounded-md border-0 bg-transparent bg-none py-0 pl-4 pr-9 text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm\"\n >\n <option>US</option>\n <option>CA</option>\n <option>EU</option>\n </select>\n <ChevronDownIcon\n className=\"pointer-events-none absolute right-3 top-0 h-full w-5 text-gray-400\"\n aria-hidden=\"true\"\n />\n </div>\n <Input\n type=\"tel\"\n name=\"phone-number\"\n id=\"phone-number\"\n autoComplete=\"tel\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"message\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Message\n </label>\n <div className=\"mt-2.5\">\n <textarea\n name=\"message\"\n id=\"message\"\n rows={4}\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-white/5 px-3 py-1.5 text-base text-white ring-1 ring-inset ring-white/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full\"\n defaultValue={''}\n />\n </div>\n </div>\n <Switch.Group as=\"div\" className=\"flex gap-x-4 sm:col-span-2\">\n <div className=\"flex h-6 items-center\">\n <Switch\n checked={agreed}\n onChange={setAgreed}\n disabled={status === 'loading'}\n className={classNames(\n agreed ? 'bg-primary-600' : 'bg-gray-200',\n 'focus-visible:outline-primary-600 flex w-8 flex-none cursor-pointer rounded-full p-px ring-1 ring-inset ring-gray-900/5 transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',\n )}\n >\n <span className=\"sr-only\">Agree to policies</span>\n <span\n aria-hidden=\"true\"\n className={classNames(\n agreed ? 'translate-x-3.5' : 'translate-x-0',\n 'shadow-2xs h-4 w-4 transform rounded-full bg-white ring-1 ring-gray-900/5 transition duration-200 ease-in-out',\n )}\n />\n </Switch>\n </div>\n <Switch.Label className=\"text-sm leading-6 text-gray-600 dark:text-white\">\n By selecting this, you agree to our{' '}\n <a\n href=\"/about/privacy\"\n className=\"text-primary-600 font-semibold\"\n >\n privacy policy\n </a>\n .\n </Switch.Label>\n </Switch.Group>\n </div>\n\n {errorMessage && (\n <p\n className=\"mt-4 text-sm text-red-600 dark:text-red-400\"\n role=\"alert\"\n >\n {errorMessage}\n </p>\n )}\n\n <div className=\"mt-10\">\n <button\n type=\"submit\"\n disabled={status === 'loading'}\n className=\"bg-primary-500 hover:bg-primary-400 focus-visible:outline-primary-500 shadow-2xs flex w-full items-center justify-center rounded-md px-3 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {status === 'loading' ? 'Sending…' : 'Send message'}\n </button>\n </div>\n <p className=\"mt-4 text-center text-xs text-gray-400 dark:text-gray-500\">\n This site is protected by reCAPTCHA and the Google{' '}\n <a\n href=\"https://policies.google.com/privacy\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Privacy Policy\n </a>{' '}\n and{' '}\n <a\n href=\"https://policies.google.com/terms\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Terms of Service\n </a>{' '}\n apply.\n </p>\n </form>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwEQ,SACE,KADF;AAvER,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAE7B,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAIO,MAAM,UAAU,MAAM;AAC3B,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAiB,MAAM;AACnD,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,EAAE;AACnD,QAAM,EAAE,iBAAiB,IAAI,aAAa;AAE1C,QAAM,eAAe,CAAO,MAAwC;AAnBtE;AAoBI,MAAE,eAAe;AAEjB,QAAI,CAAC,QAAQ;AACX,sBAAgB,sCAAsC;AACtD;AAAA,IACF;AAEA,UAAM,OAAO,EAAE;AACf,UAAM,OAAO,IAAI,SAAS,IAAI;AAE9B,UAAM,iBAAiB,MAAM,iBAAiB,SAAS;AAEvD,UAAM,OAAO;AAAA,MACX,WAAW,KAAK,IAAI,YAAY;AAAA,MAChC,UAAU,KAAK,IAAI,WAAW;AAAA,MAC9B,SAAS,KAAK,IAAI,SAAS;AAAA,MAC3B,OAAO,KAAK,IAAI,OAAO;AAAA,MACvB,OAAO,KAA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QAAK;AAAA,QAAI;AAAA,SAEX;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../components/tailwind/contact.tsx"],"sourcesContent":["'use client'\nimport { useState } from 'react'\nimport { ChevronDownIcon } from '@heroicons/react/20/solid'\nimport { Switch } from '@headlessui/react'\nimport { Input } from '../ui/input'\nimport { useRecaptcha } from '../../hooks/useRecaptcha'\n\nfunction classNames(...classes: string[]) {\n return classes.filter(Boolean).join(' ')\n}\n\ntype Status = 'idle' | 'loading' | 'success' | 'error'\n\nexport const Contact = () => {\n const [agreed, setAgreed] = useState(false)\n const [status, setStatus] = useState<Status>('idle')\n const [errorMessage, setErrorMessage] = useState('')\n const { executeRecaptcha } = useRecaptcha()\n\n const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n\n if (!agreed) {\n setErrorMessage('You must agree to the privacy policy')\n return\n }\n\n const form = e.currentTarget\n const data = new FormData(form)\n\n const recaptchaToken = await executeRecaptcha('contact')\n\n const body = {\n firstName: data.get('first-name') as string,\n lastName: data.get('last-name') as string,\n company: data.get('company') as string,\n email: data.get('email') as string,\n phone: data.get('phone-number') as string,\n message: data.get('message') as string,\n agreed: true as const,\n recaptchaToken: recaptchaToken ?? undefined,\n }\n\n setStatus('loading')\n setErrorMessage('')\n\n try {\n const res = await fetch('/api/contact', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n })\n\n if (!res.ok) {\n const json = await res.json()\n throw new Error(json.error ?? 'Something went wrong')\n }\n\n setStatus('success')\n form.reset()\n setAgreed(false)\n } catch (err) {\n setStatus('error')\n setErrorMessage(\n err instanceof Error ? err.message : 'Something went wrong',\n )\n }\n }\n\n if (status === 'success') {\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Message sent\n </h2>\n <p className=\"mt-4 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Thanks for reaching out. We'll get back to you as soon as\n possible.\n </p>\n </div>\n </div>\n )\n }\n\n return (\n <div className=\"isolate bg-white px-6 py-24 sm:py-32 lg:px-8 dark:bg-gray-800 dark:text-white\">\n <div\n className=\"absolute inset-x-0 top-[-10rem] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[-20rem]\"\n aria-hidden=\"true\"\n >\n <div\n className=\"aspect-1155/678 bg-linear-to-tr relative left-1/2 -z-10 w-[36.125rem] max-w-none -translate-x-1/2 rotate-[30deg] from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-40rem)] sm:w-[72.1875rem]\"\n style={{\n clipPath:\n 'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',\n }}\n />\n </div>\n <div className=\"mx-auto max-w-2xl text-center\">\n <h2 className=\"text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl dark:text-gray-100\">\n Contact us\n </h2>\n <p className=\"mt-2 text-lg leading-8 text-gray-600 dark:text-gray-400\">\n Have a question or want to learn more? Send us a message.\n </p>\n </div>\n <form onSubmit={handleSubmit} className=\"mx-auto mt-16 max-w-xl sm:mt-20\">\n <div className=\"grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2\">\n <div>\n <label\n htmlFor=\"first-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n First name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"first-name\"\n id=\"first-name\"\n autoComplete=\"given-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div>\n <label\n htmlFor=\"last-name\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Last name\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"last-name\"\n id=\"last-name\"\n autoComplete=\"family-name\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"company\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Company\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"text\"\n name=\"company\"\n id=\"company\"\n autoComplete=\"organization\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"email\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Email\n </label>\n <div className=\"mt-2.5\">\n <Input\n type=\"email\"\n name=\"email\"\n id=\"email\"\n autoComplete=\"email\"\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"phone-number\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Phone number\n </label>\n <div className=\"relative mt-2.5\">\n <div className=\"absolute inset-y-0 left-0 flex items-center\">\n <label htmlFor=\"country\" className=\"sr-only\">\n Country\n </label>\n <select\n id=\"country\"\n name=\"country\"\n disabled={status === 'loading'}\n className=\"h-full rounded-md border-0 bg-transparent bg-none py-0 pl-4 pr-9 text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm\"\n >\n <option>US</option>\n <option>CA</option>\n <option>EU</option>\n </select>\n <ChevronDownIcon\n className=\"pointer-events-none absolute right-3 top-0 h-full w-5 text-gray-400\"\n aria-hidden=\"true\"\n />\n </div>\n <Input\n type=\"tel\"\n name=\"phone-number\"\n id=\"phone-number\"\n autoComplete=\"tel\"\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n />\n </div>\n </div>\n <div className=\"sm:col-span-2\">\n <label\n htmlFor=\"message\"\n className=\"block text-sm font-semibold leading-6 text-gray-900 dark:text-white\"\n >\n Message\n </label>\n <div className=\"mt-2.5\">\n <textarea\n name=\"message\"\n id=\"message\"\n rows={4}\n required\n disabled={status === 'loading'}\n className=\"focus:ring-primary-500 shadow-2xs w-full min-w-0 appearance-none rounded-md border-0 bg-gray-900/5 px-3 py-1.5 text-base text-gray-900 ring-1 ring-inset ring-gray-900/10 placeholder:text-gray-500 focus:ring-2 focus:ring-inset sm:w-64 sm:text-sm sm:leading-6 xl:w-full dark:bg-white/5 dark:text-white dark:ring-white/10\"\n defaultValue={''}\n />\n </div>\n </div>\n <Switch.Group as=\"div\" className=\"flex gap-x-4 sm:col-span-2\">\n <div className=\"flex h-6 items-center\">\n <Switch\n checked={agreed}\n onChange={setAgreed}\n disabled={status === 'loading'}\n className={classNames(\n agreed ? 'bg-primary-600' : 'bg-gray-200',\n 'focus-visible:outline-primary-600 flex w-8 flex-none cursor-pointer rounded-full p-px ring-1 ring-inset ring-gray-900/5 transition-colors duration-200 ease-in-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',\n )}\n >\n <span className=\"sr-only\">Agree to policies</span>\n <span\n aria-hidden=\"true\"\n className={classNames(\n agreed ? 'translate-x-3.5' : 'translate-x-0',\n 'shadow-2xs h-4 w-4 transform rounded-full bg-white ring-1 ring-gray-900/5 transition duration-200 ease-in-out',\n )}\n />\n </Switch>\n </div>\n <Switch.Label className=\"text-sm leading-6 text-gray-600 dark:text-white\">\n By selecting this, you agree to our{' '}\n <a\n href=\"/about/privacy\"\n className=\"text-primary-600 font-semibold\"\n >\n privacy policy\n </a>\n .\n </Switch.Label>\n </Switch.Group>\n </div>\n\n {errorMessage && (\n <p\n className=\"mt-4 text-sm text-red-600 dark:text-red-400\"\n role=\"alert\"\n >\n {errorMessage}\n </p>\n )}\n\n <div className=\"mt-10\">\n <button\n type=\"submit\"\n disabled={status === 'loading'}\n className=\"bg-primary-500 hover:bg-primary-400 focus-visible:outline-primary-500 shadow-2xs flex w-full items-center justify-center rounded-md px-3 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-60\"\n >\n {status === 'loading' ? 'Sending…' : 'Send message'}\n </button>\n </div>\n <p className=\"mt-4 text-center text-xs text-gray-400 dark:text-gray-500\">\n This site is protected by reCAPTCHA and the Google{' '}\n <a\n href=\"https://policies.google.com/privacy\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Privacy Policy\n </a>{' '}\n and{' '}\n <a\n href=\"https://policies.google.com/terms\"\n className=\"underline hover:text-gray-600 dark:hover:text-gray-300\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Terms of Service\n </a>{' '}\n apply.\n </p>\n </form>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwEQ,SACE,KADF;AAvER,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAE7B,SAAS,cAAc,SAAmB;AACxC,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAIO,MAAM,UAAU,MAAM;AAC3B,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAiB,MAAM;AACnD,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,EAAE;AACnD,QAAM,EAAE,iBAAiB,IAAI,aAAa;AAE1C,QAAM,eAAe,CAAO,MAAwC;AAnBtE;AAoBI,MAAE,eAAe;AAEjB,QAAI,CAAC,QAAQ;AACX,sBAAgB,sCAAsC;AACtD;AAAA,IACF;AAEA,UAAM,OAAO,EAAE;AACf,UAAM,OAAO,IAAI,SAAS,IAAI;AAE9B,UAAM,iBAAiB,MAAM,iBAAiB,SAAS;AAEvD,UAAM,OAAO;AAAA,MACX,WAAW,KAAK,IAAI,YAAY;AAAA,MAChC,UAAU,KAAK,IAAI,WAAW;AAAA,MAC9B,SAAS,KAAK,IAAI,SAAS;AAAA,MAC3B,OAAO,KAAK,IAAI,OAAO;AAAA,MACvB,OAAO,K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A,QAAK;AAAA,QAAI;AAAA,SAEX;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -100,28 +100,28 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
100
100
|
setLoading(false);
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-gray-900", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8", children: [
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "bg-white dark:bg-gray-900", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto mt-16 max-w-7xl px-6 sm:mt-32 lg:px-8", children: [
|
|
104
104
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto max-w-4xl text-center", children: [
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-base font-semibold leading-7 text-indigo-400", children: "Pricing" }),
|
|
106
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-2 text-4xl font-bold tracking-tight text-
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-base font-semibold leading-7 text-indigo-600 dark:text-indigo-400", children: "Pricing" }),
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-2 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl dark:text-white", children: "Start free. Upgrade when you're ready." })
|
|
107
107
|
] }),
|
|
108
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-300", children: "Build your story bible for free. Subscribe for unlimited worlds, characters, and creative freedom." }),
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600 dark:text-gray-300", children: "Build your story bible for free. Subscribe for unlimited worlds, characters, and creative freedom." }),
|
|
109
109
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "isolate mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-8 lg:mx-0 lg:max-w-none lg:grid-cols-2", children: [
|
|
110
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-3xl p-8 ring-1 ring-
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-3xl p-8 ring-1 ring-gray-900/10 xl:p-10 dark:ring-white/10", children: [
|
|
111
111
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-semibold leading-8 text-white", children: "Preview" }),
|
|
113
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "rounded-full bg-
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-semibold leading-8 text-gray-900 dark:text-white", children: "Preview" }),
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "rounded-full bg-gray-900/5 px-2.5 py-1 text-xs font-semibold leading-5 text-gray-900 dark:bg-white/10 dark:text-white", children: "Free forever" })
|
|
114
114
|
] }),
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-4 text-sm leading-6 text-gray-300", children: "Explore Story Bible and start building your creative world with no commitment." }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-4 text-sm leading-6 text-gray-600 dark:text-gray-300", children: "Explore Story Bible and start building your creative world with no commitment." }),
|
|
116
116
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "mt-6 flex items-baseline gap-x-1", children: [
|
|
117
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight text-white", children: "$0" }),
|
|
118
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold leading-6 text-gray-300", children: "/month" })
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight text-gray-900 dark:text-white", children: "$0" }),
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold leading-6 text-gray-600 dark:text-gray-300", children: "/month" })
|
|
119
119
|
] }),
|
|
120
120
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
121
|
"a",
|
|
122
122
|
{
|
|
123
123
|
href: "/signin",
|
|
124
|
-
className: "mt-6 block rounded-md bg-
|
|
124
|
+
className: "mt-6 block rounded-md bg-gray-900/10 px-3 py-2 text-center text-sm font-semibold leading-6 text-gray-900 hover:bg-gray-900/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-900 dark:bg-white/10 dark:text-white dark:hover:bg-white/20 dark:focus-visible:outline-white",
|
|
125
125
|
children: "Get started free"
|
|
126
126
|
}
|
|
127
127
|
),
|
|
@@ -129,12 +129,12 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
129
129
|
"ul",
|
|
130
130
|
{
|
|
131
131
|
role: "list",
|
|
132
|
-
className: "mt-8 space-y-3 text-sm leading-6 text-gray-
|
|
132
|
+
className: "mt-8 space-y-3 text-sm leading-6 text-gray-600 xl:mt-10 dark:text-gray-300",
|
|
133
133
|
children: FREE_FEATURES.map((feature) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "flex gap-x-3", children: [
|
|
134
134
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
135
|
import_lucide_react.Check,
|
|
136
136
|
{
|
|
137
|
-
className: "h-6 w-5 flex-none text-white",
|
|
137
|
+
className: "h-6 w-5 flex-none text-gray-900 dark:text-white",
|
|
138
138
|
"aria-hidden": "true"
|
|
139
139
|
}
|
|
140
140
|
),
|
|
@@ -143,15 +143,15 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
143
143
|
}
|
|
144
144
|
)
|
|
145
145
|
] }),
|
|
146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-3xl bg-
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-3xl bg-gray-900/5 p-8 ring-2 ring-indigo-500 xl:p-10 dark:bg-white/5", children: [
|
|
147
147
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
148
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-semibold leading-8 text-white", children: "Pro" }),
|
|
148
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-lg font-semibold leading-8 text-gray-900 dark:text-white", children: "Pro" }),
|
|
149
149
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "rounded-full bg-indigo-500 px-2.5 py-1 text-xs font-semibold leading-5 text-white", children: "Most popular" })
|
|
150
150
|
] }),
|
|
151
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-4 text-sm leading-6 text-gray-300", children: "Unlock unlimited stories, characters, locations, and timelines. Build entire universes." }),
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-4 text-sm leading-6 text-gray-600 dark:text-gray-300", children: "Unlock unlimited stories, characters, locations, and timelines. Build entire universes." }),
|
|
152
152
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "mt-6 flex items-baseline gap-x-1", children: [
|
|
153
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight text-white", children: "$9.99" }),
|
|
154
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold leading-6 text-gray-300", children: "/month" })
|
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight text-gray-900 dark:text-white", children: "$9.99" }),
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold leading-6 text-gray-600 dark:text-gray-300", children: "/month" })
|
|
155
155
|
] }),
|
|
156
156
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
157
157
|
"button",
|
|
@@ -168,17 +168,17 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
168
168
|
]
|
|
169
169
|
}
|
|
170
170
|
),
|
|
171
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-3 text-center text-sm text-red-400", children: error }),
|
|
171
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-3 text-center text-sm text-red-600 dark:text-red-400", children: error }),
|
|
172
172
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
173
173
|
"ul",
|
|
174
174
|
{
|
|
175
175
|
role: "list",
|
|
176
|
-
className: "mt-8 space-y-3 text-sm leading-6 text-gray-
|
|
176
|
+
className: "mt-8 space-y-3 text-sm leading-6 text-gray-600 xl:mt-10 dark:text-gray-300",
|
|
177
177
|
children: PRO_FEATURES.map((feature) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "flex gap-x-3", children: [
|
|
178
178
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
179
179
|
import_lucide_react.Check,
|
|
180
180
|
{
|
|
181
|
-
className: "h-6 w-5 flex-none text-white",
|
|
181
|
+
className: "h-6 w-5 flex-none text-gray-900 dark:text-white",
|
|
182
182
|
"aria-hidden": "true"
|
|
183
183
|
}
|
|
184
184
|
),
|
|
@@ -189,19 +189,19 @@ const Pricing = ({ onSubscribe }) => {
|
|
|
189
189
|
] })
|
|
190
190
|
] }),
|
|
191
191
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-auto mt-24 max-w-2xl pb-24", children: [
|
|
192
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-2xl font-bold leading-10 tracking-tight text-white", children: "Frequently asked questions" }),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-2xl font-bold leading-10 tracking-tight text-gray-900 dark:text-white", children: "Frequently asked questions" }),
|
|
193
193
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("dl", { className: "mt-10 space-y-8", children: [
|
|
194
194
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
195
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-white", children: "Can I cancel anytime?" }),
|
|
196
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-300", children: "Yes. You can cancel at any time from the subscription management page. You retain Pro access until the end of your current billing period." })
|
|
195
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-gray-900 dark:text-white", children: "Can I cancel anytime?" }),
|
|
196
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-600 dark:text-gray-300", children: "Yes. You can cancel at any time from the subscription management page. You retain Pro access until the end of your current billing period." })
|
|
197
197
|
] }),
|
|
198
198
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
199
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-white", children: "What happens to my data if I downgrade?" }),
|
|
200
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-300", children: "Your existing stories and characters are never deleted. You'll just be unable to create new ones beyond the preview limits until you resubscribe." })
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-gray-900 dark:text-white", children: "What happens to my data if I downgrade?" }),
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-600 dark:text-gray-300", children: "Your existing stories and characters are never deleted. You'll just be unable to create new ones beyond the preview limits until you resubscribe." })
|
|
201
201
|
] }),
|
|
202
202
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
203
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-white", children: "Is billing monthly or annually?" }),
|
|
204
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-300", children: "Currently monthly only. Annual billing with a discount is coming soon." })
|
|
203
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { className: "text-base font-semibold leading-7 text-gray-900 dark:text-white", children: "Is billing monthly or annually?" }),
|
|
204
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { className: "mt-2 text-base leading-7 text-gray-600 dark:text-gray-300", children: "Currently monthly only. Annual billing with a discount is coming soon." })
|
|
205
205
|
] })
|
|
206
206
|
] })
|
|
207
207
|
] })
|