@limetry/ui 1.2.93 → 1.2.94
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/contact-form.d.ts +13 -0
- package/dist/components/contact-form.d.ts.map +1 -0
- package/dist/components/contact-form.types.d.ts +27 -0
- package/dist/components/contact-form.types.d.ts.map +1 -0
- package/dist/components/contact-form.web.d.ts +14 -0
- package/dist/components/contact-form.web.d.ts.map +1 -0
- package/dist/components/site-footer.d.ts +1 -1
- package/dist/components/site-footer.d.ts.map +1 -1
- package/dist/components/site-footer.types.d.ts +5 -1
- package/dist/components/site-footer.types.d.ts.map +1 -1
- package/dist/components/site-footer.web.d.ts +1 -1
- package/dist/components/site-footer.web.d.ts.map +1 -1
- package/dist/index.cjs +14 -1
- package/dist/index.js +14 -1
- package/dist/lib/site-footer-links.d.ts.map +1 -1
- package/package.json +8 -1
- package/src/components/contact-form.tsx +131 -0
- package/src/components/contact-form.types.ts +28 -0
- package/src/components/contact-form.web.tsx +207 -0
- package/src/components/site-footer.tsx +19 -4
- package/src/components/site-footer.types.ts +5 -1
- package/src/components/site-footer.web.tsx +21 -10
- package/src/lib/site-footer-links.test.ts +2 -2
- package/src/lib/site-footer-links.ts +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NativeWind contact form for Expo / React Native hosts.
|
|
3
|
+
*/
|
|
4
|
+
import { type JSX } from "react";
|
|
5
|
+
import type { ContactFormProps } from "./contact-form.types";
|
|
6
|
+
export type { ContactFormFields, ContactFormProps } from "./contact-form.types";
|
|
7
|
+
/**
|
|
8
|
+
* Interactive contact form backed by a host-provided submit handler.
|
|
9
|
+
*
|
|
10
|
+
* @param props - Layout options and {@link ContactFormProps.onSubmit}.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ContactForm({ className, source, compact, onSubmit, }: ContactFormProps): JSX.Element;
|
|
13
|
+
//# sourceMappingURL=contact-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form.d.ts","sourceRoot":"","sources":["../../src/components/contact-form.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAI1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAG5D,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAI/E;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,MAAuB,EACvB,OAAe,EACf,QAAQ,GACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAyGhC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared contact-form props for DOM and NativeWind implementations.
|
|
3
|
+
*/
|
|
4
|
+
export type ContactFormFields = {
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
company?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
source: string;
|
|
10
|
+
};
|
|
11
|
+
export type ContactFormProps = {
|
|
12
|
+
className?: string;
|
|
13
|
+
idPrefix?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Analytics / attribution source stamped onto the submission payload.
|
|
16
|
+
*/
|
|
17
|
+
source?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Compact layout for footer strips (two-column name/email, shorter message).
|
|
20
|
+
*/
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Host-provided submit handler (posts to that site's contact API).
|
|
24
|
+
*/
|
|
25
|
+
onSubmit: (fields: ContactFormFields) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=contact-form.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form.types.d.ts","sourceRoot":"","sources":["../../src/components/contact-form.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACvD,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared DOM contact form for Limetry marketing sites (OSS + Cloud).
|
|
3
|
+
*/
|
|
4
|
+
import { type JSX } from "react";
|
|
5
|
+
import type { ContactFormProps } from "./contact-form.types";
|
|
6
|
+
export type { ContactFormFields, ContactFormProps } from "./contact-form.types";
|
|
7
|
+
/**
|
|
8
|
+
* Client contact form with validation, success state, and host-backed submit.
|
|
9
|
+
*
|
|
10
|
+
* @param props - Layout options and {@link ContactFormProps.onSubmit}.
|
|
11
|
+
* @returns Interactive contact form.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ContactForm({ className, idPrefix, source, compact, onSubmit, }: ContactFormProps): JSX.Element;
|
|
14
|
+
//# sourceMappingURL=contact-form.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form.web.d.ts","sourceRoot":"","sources":["../../src/components/contact-form.web.tsx"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAkB,KAAK,GAAG,EAAY,MAAM,OAAO,CAAA;AAG1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAW/E;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,QAAoB,EACpB,MAAuB,EACvB,OAAe,EACf,QAAQ,GACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA4KhC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SiteFooterProps } from "./site-footer.types";
|
|
2
2
|
export type { SiteFooterLink, SiteFooterLinks, SiteFooterProps } from "./site-footer.types";
|
|
3
3
|
/** Shared NativeWind footer used by Expo web and native-compatible shells. */
|
|
4
|
-
export declare function SiteFooter({ links, brand, LinkComponent, version, discordHref, }: SiteFooterProps): React.JSX.Element;
|
|
4
|
+
export declare function SiteFooter({ links, brand, LinkComponent, version, contactHref, discordHref, }: SiteFooterProps): React.JSX.Element;
|
|
5
5
|
//# sourceMappingURL=site-footer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-footer.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE3F,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,GACZ,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"site-footer.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE3F,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,WAAW,GACZ,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqDrC"}
|
|
@@ -11,7 +11,11 @@ export type SiteFooterProps = {
|
|
|
11
11
|
LinkComponent: ComponentType<DrawerLinkProps>;
|
|
12
12
|
/** Product version displayed in the legal bar. */
|
|
13
13
|
version?: string;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Same-product contact page (shown above Discord in the brand column).
|
|
16
|
+
*/
|
|
17
|
+
contactHref?: string;
|
|
18
|
+
/** Optional Discord invite URL. */
|
|
15
19
|
discordHref?: string;
|
|
16
20
|
/** Additional classes for the footer root. */
|
|
17
21
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-footer.types.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EAAE,cAAc,EAAC,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,mDAAmD;IACnD,KAAK,EAAE,eAAe,CAAA;IACtB,yCAAyC;IACzC,KAAK,EAAE,SAAS,CAAA;IAChB,+CAA+C;IAC/C,aAAa,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IAC7C,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,
|
|
1
|
+
{"version":3,"file":"site-footer.types.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,KAAK,EAAE,cAAc,EAAC,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA;AAE/C,MAAM,MAAM,eAAe,GAAG;IAC5B,mDAAmD;IACnD,KAAK,EAAE,eAAe,CAAA;IACtB,yCAAyC;IACzC,KAAK,EAAE,SAAS,CAAA;IAChB,+CAA+C;IAC/C,aAAa,EAAE,aAAa,CAAC,eAAe,CAAC,CAAA;IAC7C,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA"}
|
|
@@ -3,5 +3,5 @@ import type { SiteFooterProps } from "./site-footer.types";
|
|
|
3
3
|
export type { SiteFooterLink, SiteFooterLinks } from "./site-footer.types";
|
|
4
4
|
export type { SiteFooterProps } from "./site-footer.types";
|
|
5
5
|
/** Shared DOM footer used by OSS and Cloud marketing hosts. */
|
|
6
|
-
export declare function SiteFooter({ links, brand, LinkComponent, version, discordHref, className, }: SiteFooterProps): JSX.Element;
|
|
6
|
+
export declare function SiteFooter({ links, brand, LinkComponent, version, contactHref, discordHref, className, }: SiteFooterProps): JSX.Element;
|
|
7
7
|
//# sourceMappingURL=site-footer.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-footer.web.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqB1D,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,SAAS,GACV,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"site-footer.web.d.ts","sourceRoot":"","sources":["../../src/components/site-footer.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAqB1D,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,WAAW,EACX,SAAS,GACV,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAoD/B"}
|
package/dist/index.cjs
CHANGED
|
@@ -406,6 +406,7 @@ function SiteFooter({
|
|
|
406
406
|
brand,
|
|
407
407
|
LinkComponent,
|
|
408
408
|
version,
|
|
409
|
+
contactHref,
|
|
409
410
|
discordHref
|
|
410
411
|
}) {
|
|
411
412
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.View, { className: "border-t border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-950", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { className: "mx-auto w-full max-w-7xl px-4 py-12 sm:px-6 lg:px-8", children: [
|
|
@@ -413,7 +414,19 @@ function SiteFooter({
|
|
|
413
414
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { className: "col-span-2 max-w-xs md:col-span-1", children: [
|
|
414
415
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LinkComponent, { href: "/", className: "inline-flex", children: brand }),
|
|
415
416
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { className: "mt-3 text-sm leading-relaxed text-slate-500 dark:text-slate-400", children: links.blurb }),
|
|
416
|
-
|
|
417
|
+
contactHref || discordHref ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native8.View, { className: "mt-4 gap-2", children: [
|
|
418
|
+
contactHref ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LinkComponent, { href: contactHref, className: "inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { className: "text-sm text-slate-500 dark:text-slate-400", children: "Contact" }) }) : null,
|
|
419
|
+
discordHref ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
420
|
+
LinkComponent,
|
|
421
|
+
{
|
|
422
|
+
href: discordHref,
|
|
423
|
+
target: "_blank",
|
|
424
|
+
rel: "noopener noreferrer",
|
|
425
|
+
className: "inline-flex",
|
|
426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { className: "text-sm text-slate-500 dark:text-slate-400", children: "Discord" })
|
|
427
|
+
}
|
|
428
|
+
) : null
|
|
429
|
+
] }) : null
|
|
417
430
|
] }),
|
|
418
431
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FooterColumn, { title: "Product", links: links.product, LinkComponent }),
|
|
419
432
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FooterColumn, { title: "Open Source", links: links.opensource, LinkComponent }),
|
package/dist/index.js
CHANGED
|
@@ -362,6 +362,7 @@ function SiteFooter({
|
|
|
362
362
|
brand,
|
|
363
363
|
LinkComponent,
|
|
364
364
|
version,
|
|
365
|
+
contactHref,
|
|
365
366
|
discordHref
|
|
366
367
|
}) {
|
|
367
368
|
return /* @__PURE__ */ jsx8(View7, { className: "border-t border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-950", children: /* @__PURE__ */ jsxs5(View7, { className: "mx-auto w-full max-w-7xl px-4 py-12 sm:px-6 lg:px-8", children: [
|
|
@@ -369,7 +370,19 @@ function SiteFooter({
|
|
|
369
370
|
/* @__PURE__ */ jsxs5(View7, { className: "col-span-2 max-w-xs md:col-span-1", children: [
|
|
370
371
|
/* @__PURE__ */ jsx8(LinkComponent, { href: "/", className: "inline-flex", children: brand }),
|
|
371
372
|
/* @__PURE__ */ jsx8(Text7, { className: "mt-3 text-sm leading-relaxed text-slate-500 dark:text-slate-400", children: links.blurb }),
|
|
372
|
-
discordHref ? /* @__PURE__ */
|
|
373
|
+
contactHref || discordHref ? /* @__PURE__ */ jsxs5(View7, { className: "mt-4 gap-2", children: [
|
|
374
|
+
contactHref ? /* @__PURE__ */ jsx8(LinkComponent, { href: contactHref, className: "inline-flex", children: /* @__PURE__ */ jsx8(Text7, { className: "text-sm text-slate-500 dark:text-slate-400", children: "Contact" }) }) : null,
|
|
375
|
+
discordHref ? /* @__PURE__ */ jsx8(
|
|
376
|
+
LinkComponent,
|
|
377
|
+
{
|
|
378
|
+
href: discordHref,
|
|
379
|
+
target: "_blank",
|
|
380
|
+
rel: "noopener noreferrer",
|
|
381
|
+
className: "inline-flex",
|
|
382
|
+
children: /* @__PURE__ */ jsx8(Text7, { className: "text-sm text-slate-500 dark:text-slate-400", children: "Discord" })
|
|
383
|
+
}
|
|
384
|
+
) : null
|
|
385
|
+
] }) : null
|
|
373
386
|
] }),
|
|
374
387
|
/* @__PURE__ */ jsx8(FooterColumn, { title: "Product", links: links.product, LinkComponent }),
|
|
375
388
|
/* @__PURE__ */ jsx8(FooterColumn, { title: "Open Source", links: links.opensource, LinkComponent }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-footer-links.d.ts","sourceRoot":"","sources":["../../src/lib/site-footer-links.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,IAAI,EAAE,cAAc,EAAE,CAAA;IACtB,KAAK,EAAE;QACL,OAAO,EAAE,cAAc,CAAA;QACvB,KAAK,EAAE,cAAc,CAAA;KACtB,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AA0CD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"site-footer-links.d.ts","sourceRoot":"","sources":["../../src/lib/site-footer-links.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,IAAI,EAAE,cAAc,EAAE,CAAA;IACtB,KAAK,EAAE;QACL,OAAO,EAAE,cAAc,CAAA;QACvB,KAAK,EAAE,cAAc,CAAA;KACtB,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AA0CD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,eAAe,CAgDtF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetry/ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.94",
|
|
4
4
|
"description": "Shared design system for Limetry — components, icons, and design tokens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
"import": "./src/lib/site-footer-links.ts",
|
|
48
48
|
"default": "./src/lib/site-footer-links.ts"
|
|
49
49
|
},
|
|
50
|
+
"./contact-form": {
|
|
51
|
+
"types": "./dist/components/contact-form.web.d.ts",
|
|
52
|
+
"react-native": "./src/components/contact-form.tsx",
|
|
53
|
+
"browser": "./src/components/contact-form.web.tsx",
|
|
54
|
+
"import": "./src/components/contact-form.web.tsx",
|
|
55
|
+
"default": "./src/components/contact-form.web.tsx"
|
|
56
|
+
},
|
|
50
57
|
"./theme-toggle": {
|
|
51
58
|
"types": "./dist/components/theme-toggle.web.d.ts",
|
|
52
59
|
"react-native": "./src/components/theme-toggle.tsx",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NativeWind contact form for Expo / React Native hosts.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, type JSX } from "react"
|
|
6
|
+
import { Text, View } from "react-native"
|
|
7
|
+
|
|
8
|
+
import { Button } from "./button"
|
|
9
|
+
import type { ContactFormProps } from "./contact-form.types"
|
|
10
|
+
import { Input, TextArea } from "./input"
|
|
11
|
+
|
|
12
|
+
export type { ContactFormFields, ContactFormProps } from "./contact-form.types"
|
|
13
|
+
|
|
14
|
+
type SubmitState = "idle" | "submitting" | "success" | "error"
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Interactive contact form backed by a host-provided submit handler.
|
|
18
|
+
*
|
|
19
|
+
* @param props - Layout options and {@link ContactFormProps.onSubmit}.
|
|
20
|
+
*/
|
|
21
|
+
export function ContactForm({
|
|
22
|
+
className,
|
|
23
|
+
source = "contact-page",
|
|
24
|
+
compact = false,
|
|
25
|
+
onSubmit,
|
|
26
|
+
}: ContactFormProps): JSX.Element {
|
|
27
|
+
const [name, setName] = useState("")
|
|
28
|
+
const [email, setEmail] = useState("")
|
|
29
|
+
const [company, setCompany] = useState("")
|
|
30
|
+
const [message, setMessage] = useState("")
|
|
31
|
+
const [state, setState] = useState<SubmitState>("idle")
|
|
32
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null)
|
|
33
|
+
|
|
34
|
+
async function handleSubmit(): Promise<void> {
|
|
35
|
+
setState("submitting")
|
|
36
|
+
setErrorMessage(null)
|
|
37
|
+
try {
|
|
38
|
+
await onSubmit({
|
|
39
|
+
name,
|
|
40
|
+
email,
|
|
41
|
+
company: company.trim() || undefined,
|
|
42
|
+
message,
|
|
43
|
+
source,
|
|
44
|
+
})
|
|
45
|
+
setName("")
|
|
46
|
+
setEmail("")
|
|
47
|
+
setCompany("")
|
|
48
|
+
setMessage("")
|
|
49
|
+
setState("success")
|
|
50
|
+
} catch (error) {
|
|
51
|
+
setState("error")
|
|
52
|
+
setErrorMessage(
|
|
53
|
+
error instanceof Error ? error.message : "Could not send your message",
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (state === "success") {
|
|
59
|
+
return (
|
|
60
|
+
<View className={className} accessibilityRole="text">
|
|
61
|
+
<Text className="rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-3 text-sm font-medium text-slate-900 dark:text-slate-100">
|
|
62
|
+
Message sent. We will get back to you soon.
|
|
63
|
+
</Text>
|
|
64
|
+
</View>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<View className={className}>
|
|
70
|
+
<View className={compact ? "gap-4 md:flex-row md:flex-wrap" : "gap-4"}>
|
|
71
|
+
<View className={compact ? "md:w-[calc(50%-0.5rem)]" : undefined}>
|
|
72
|
+
<Input
|
|
73
|
+
label="Name"
|
|
74
|
+
value={name}
|
|
75
|
+
onChangeText={setName}
|
|
76
|
+
placeholder="Your name"
|
|
77
|
+
autoComplete="off"
|
|
78
|
+
/>
|
|
79
|
+
</View>
|
|
80
|
+
<View className={compact ? "md:w-[calc(50%-0.5rem)]" : undefined}>
|
|
81
|
+
<Input
|
|
82
|
+
label="Email"
|
|
83
|
+
value={email}
|
|
84
|
+
onChangeText={setEmail}
|
|
85
|
+
placeholder="you@company.com"
|
|
86
|
+
keyboardType="email-address"
|
|
87
|
+
autoCapitalize="none"
|
|
88
|
+
autoComplete="off"
|
|
89
|
+
/>
|
|
90
|
+
</View>
|
|
91
|
+
{!compact ? (
|
|
92
|
+
<Input
|
|
93
|
+
label="Company (optional)"
|
|
94
|
+
value={company}
|
|
95
|
+
onChangeText={setCompany}
|
|
96
|
+
placeholder="Organization"
|
|
97
|
+
autoComplete="off"
|
|
98
|
+
/>
|
|
99
|
+
) : null}
|
|
100
|
+
<TextArea
|
|
101
|
+
label="Message"
|
|
102
|
+
value={message}
|
|
103
|
+
onChangeText={setMessage}
|
|
104
|
+
placeholder={
|
|
105
|
+
compact ? "How can we help?" : "Tell us about your agents or workspace."
|
|
106
|
+
}
|
|
107
|
+
rows={compact ? 3 : 5}
|
|
108
|
+
/>
|
|
109
|
+
{errorMessage ? (
|
|
110
|
+
<Text
|
|
111
|
+
className="rounded-lg border border-red-500/25 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-700 dark:text-red-400"
|
|
112
|
+
accessibilityRole="alert"
|
|
113
|
+
>
|
|
114
|
+
{errorMessage}
|
|
115
|
+
</Text>
|
|
116
|
+
) : null}
|
|
117
|
+
<View className="w-full items-start">
|
|
118
|
+
<Button
|
|
119
|
+
size="lg"
|
|
120
|
+
disabled={state === "submitting"}
|
|
121
|
+
onPress={() => {
|
|
122
|
+
void handleSubmit()
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
{state === "submitting" ? "Sending…" : "Send message"}
|
|
126
|
+
</Button>
|
|
127
|
+
</View>
|
|
128
|
+
</View>
|
|
129
|
+
</View>
|
|
130
|
+
)
|
|
131
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared contact-form props for DOM and NativeWind implementations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type ContactFormFields = {
|
|
6
|
+
name: string
|
|
7
|
+
email: string
|
|
8
|
+
company?: string
|
|
9
|
+
message: string
|
|
10
|
+
source: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ContactFormProps = {
|
|
14
|
+
className?: string
|
|
15
|
+
idPrefix?: string
|
|
16
|
+
/**
|
|
17
|
+
* Analytics / attribution source stamped onto the submission payload.
|
|
18
|
+
*/
|
|
19
|
+
source?: string
|
|
20
|
+
/**
|
|
21
|
+
* Compact layout for footer strips (two-column name/email, shorter message).
|
|
22
|
+
*/
|
|
23
|
+
compact?: boolean
|
|
24
|
+
/**
|
|
25
|
+
* Host-provided submit handler (posts to that site's contact API).
|
|
26
|
+
*/
|
|
27
|
+
onSubmit: (fields: ContactFormFields) => Promise<void>
|
|
28
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared DOM contact form for Limetry marketing sites (OSS + Cloud).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { type FormEvent, type JSX, useState } from "react"
|
|
8
|
+
|
|
9
|
+
import { cn } from "../lib/cn"
|
|
10
|
+
import type { ContactFormProps } from "./contact-form.types"
|
|
11
|
+
|
|
12
|
+
export type { ContactFormFields, ContactFormProps } from "./contact-form.types"
|
|
13
|
+
|
|
14
|
+
type SubmitState = "idle" | "submitting" | "success" | "error"
|
|
15
|
+
|
|
16
|
+
const fieldClassName = cn(
|
|
17
|
+
"w-full rounded-xl border border-border bg-background px-4 py-3 text-sm",
|
|
18
|
+
"text-foreground shadow-sm outline-none transition",
|
|
19
|
+
"placeholder:text-muted-foreground",
|
|
20
|
+
"focus-visible:border-primary/50 focus-visible:ring-2 focus-visible:ring-primary/25",
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Client contact form with validation, success state, and host-backed submit.
|
|
25
|
+
*
|
|
26
|
+
* @param props - Layout options and {@link ContactFormProps.onSubmit}.
|
|
27
|
+
* @returns Interactive contact form.
|
|
28
|
+
*/
|
|
29
|
+
export function ContactForm({
|
|
30
|
+
className,
|
|
31
|
+
idPrefix = "contact",
|
|
32
|
+
source = "contact-page",
|
|
33
|
+
compact = false,
|
|
34
|
+
onSubmit,
|
|
35
|
+
}: ContactFormProps): JSX.Element {
|
|
36
|
+
const [state, setState] = useState<SubmitState>("idle")
|
|
37
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null)
|
|
38
|
+
|
|
39
|
+
async function handleSubmit(event: FormEvent<HTMLFormElement>): Promise<void> {
|
|
40
|
+
event.preventDefault()
|
|
41
|
+
setState("submitting")
|
|
42
|
+
setErrorMessage(null)
|
|
43
|
+
|
|
44
|
+
const form = event.currentTarget
|
|
45
|
+
const data = new FormData(form)
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
await onSubmit({
|
|
49
|
+
name: String(data.get("name") ?? ""),
|
|
50
|
+
email: String(data.get("email") ?? ""),
|
|
51
|
+
company: String(data.get("company") ?? "") || undefined,
|
|
52
|
+
message: String(data.get("message") ?? ""),
|
|
53
|
+
source,
|
|
54
|
+
})
|
|
55
|
+
form.reset()
|
|
56
|
+
setState("success")
|
|
57
|
+
} catch (error) {
|
|
58
|
+
setState("error")
|
|
59
|
+
setErrorMessage(
|
|
60
|
+
error instanceof Error ? error.message : "Could not send your message",
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (state === "success") {
|
|
66
|
+
return (
|
|
67
|
+
<div className={className} role="status" aria-live="polite">
|
|
68
|
+
<p className="rounded-xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-3 text-sm font-medium text-foreground">
|
|
69
|
+
Message sent. We'll get back to you soon.
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<form
|
|
77
|
+
onSubmit={(event) => {
|
|
78
|
+
void handleSubmit(event)
|
|
79
|
+
}}
|
|
80
|
+
className={className}
|
|
81
|
+
autoComplete="off"
|
|
82
|
+
data-1p-ignore
|
|
83
|
+
data-lpignore="true"
|
|
84
|
+
data-bwignore
|
|
85
|
+
data-form-type="other"
|
|
86
|
+
>
|
|
87
|
+
<div className={compact ? "grid gap-4 sm:grid-cols-2" : "space-y-5"}>
|
|
88
|
+
<div className="space-y-2">
|
|
89
|
+
<label
|
|
90
|
+
htmlFor={`${idPrefix}-name`}
|
|
91
|
+
className="text-sm font-medium text-foreground"
|
|
92
|
+
>
|
|
93
|
+
Name
|
|
94
|
+
</label>
|
|
95
|
+
<input
|
|
96
|
+
id={`${idPrefix}-name`}
|
|
97
|
+
name="name"
|
|
98
|
+
type="text"
|
|
99
|
+
autoComplete="off"
|
|
100
|
+
data-1p-ignore
|
|
101
|
+
data-lpignore="true"
|
|
102
|
+
required
|
|
103
|
+
minLength={2}
|
|
104
|
+
maxLength={120}
|
|
105
|
+
className={fieldClassName}
|
|
106
|
+
placeholder="Your name"
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
<div className="space-y-2">
|
|
110
|
+
<label
|
|
111
|
+
htmlFor={`${idPrefix}-email`}
|
|
112
|
+
className="text-sm font-medium text-foreground"
|
|
113
|
+
>
|
|
114
|
+
Email
|
|
115
|
+
</label>
|
|
116
|
+
<input
|
|
117
|
+
id={`${idPrefix}-email`}
|
|
118
|
+
name="email"
|
|
119
|
+
type="email"
|
|
120
|
+
inputMode="email"
|
|
121
|
+
autoComplete="off"
|
|
122
|
+
data-1p-ignore
|
|
123
|
+
data-lpignore="true"
|
|
124
|
+
required
|
|
125
|
+
maxLength={254}
|
|
126
|
+
className={fieldClassName}
|
|
127
|
+
placeholder="you@company.com"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
{!compact ? (
|
|
131
|
+
<div className="space-y-2">
|
|
132
|
+
<label
|
|
133
|
+
htmlFor={`${idPrefix}-company`}
|
|
134
|
+
className="text-sm font-medium text-foreground"
|
|
135
|
+
>
|
|
136
|
+
Company
|
|
137
|
+
<span className="ml-1 font-normal text-muted-foreground">(optional)</span>
|
|
138
|
+
</label>
|
|
139
|
+
<input
|
|
140
|
+
id={`${idPrefix}-company`}
|
|
141
|
+
name="company"
|
|
142
|
+
type="text"
|
|
143
|
+
autoComplete="off"
|
|
144
|
+
data-1p-ignore
|
|
145
|
+
data-lpignore="true"
|
|
146
|
+
maxLength={160}
|
|
147
|
+
className={fieldClassName}
|
|
148
|
+
placeholder="Organization"
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
) : null}
|
|
152
|
+
<div className={`space-y-2 ${compact ? "sm:col-span-2" : ""}`}>
|
|
153
|
+
<label
|
|
154
|
+
htmlFor={`${idPrefix}-message`}
|
|
155
|
+
className="text-sm font-medium text-foreground"
|
|
156
|
+
>
|
|
157
|
+
Message
|
|
158
|
+
</label>
|
|
159
|
+
<textarea
|
|
160
|
+
id={`${idPrefix}-message`}
|
|
161
|
+
name="message"
|
|
162
|
+
autoComplete="off"
|
|
163
|
+
data-1p-ignore
|
|
164
|
+
data-lpignore="true"
|
|
165
|
+
required
|
|
166
|
+
minLength={10}
|
|
167
|
+
maxLength={5_000}
|
|
168
|
+
rows={compact ? 3 : 5}
|
|
169
|
+
className={cn(fieldClassName, "resize-y")}
|
|
170
|
+
placeholder={
|
|
171
|
+
compact
|
|
172
|
+
? "How can we help?"
|
|
173
|
+
: "Tell us about your agents, policies, or a partnership idea."
|
|
174
|
+
}
|
|
175
|
+
/>
|
|
176
|
+
</div>
|
|
177
|
+
{errorMessage ? (
|
|
178
|
+
<p
|
|
179
|
+
className={cn(
|
|
180
|
+
"rounded-lg border border-red-500/25 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-600 dark:text-red-400",
|
|
181
|
+
compact && "sm:col-span-2",
|
|
182
|
+
)}
|
|
183
|
+
role="alert"
|
|
184
|
+
>
|
|
185
|
+
{errorMessage}
|
|
186
|
+
</p>
|
|
187
|
+
) : null}
|
|
188
|
+
<div className={compact ? "sm:col-span-2" : ""}>
|
|
189
|
+
<button
|
|
190
|
+
type="submit"
|
|
191
|
+
disabled={state === "submitting"}
|
|
192
|
+
className={cn(
|
|
193
|
+
"inline-flex w-full items-center justify-center whitespace-nowrap rounded-xl",
|
|
194
|
+
"bg-primary px-6 py-3 text-sm font-semibold text-primary-foreground",
|
|
195
|
+
"shadow-lg shadow-primary/25 transition-all",
|
|
196
|
+
"hover:-translate-y-0.5 hover:bg-primary/90",
|
|
197
|
+
"disabled:pointer-events-none disabled:opacity-60",
|
|
198
|
+
"sm:w-auto",
|
|
199
|
+
)}
|
|
200
|
+
>
|
|
201
|
+
{state === "submitting" ? "Sending…" : "Send message"}
|
|
202
|
+
</button>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</form>
|
|
206
|
+
)
|
|
207
|
+
}
|
|
@@ -10,6 +10,7 @@ export function SiteFooter({
|
|
|
10
10
|
brand,
|
|
11
11
|
LinkComponent,
|
|
12
12
|
version,
|
|
13
|
+
contactHref,
|
|
13
14
|
discordHref,
|
|
14
15
|
}: SiteFooterProps): React.JSX.Element {
|
|
15
16
|
return (
|
|
@@ -23,10 +24,24 @@ export function SiteFooter({
|
|
|
23
24
|
<Text className="mt-3 text-sm leading-relaxed text-slate-500 dark:text-slate-400">
|
|
24
25
|
{links.blurb}
|
|
25
26
|
</Text>
|
|
26
|
-
{discordHref ? (
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
{contactHref || discordHref ? (
|
|
28
|
+
<View className="mt-4 gap-2">
|
|
29
|
+
{contactHref ? (
|
|
30
|
+
<LinkComponent href={contactHref} className="inline-flex">
|
|
31
|
+
<Text className="text-sm text-slate-500 dark:text-slate-400">Contact</Text>
|
|
32
|
+
</LinkComponent>
|
|
33
|
+
) : null}
|
|
34
|
+
{discordHref ? (
|
|
35
|
+
<LinkComponent
|
|
36
|
+
href={discordHref}
|
|
37
|
+
target="_blank"
|
|
38
|
+
rel="noopener noreferrer"
|
|
39
|
+
className="inline-flex"
|
|
40
|
+
>
|
|
41
|
+
<Text className="text-sm text-slate-500 dark:text-slate-400">Discord</Text>
|
|
42
|
+
</LinkComponent>
|
|
43
|
+
) : null}
|
|
44
|
+
</View>
|
|
30
45
|
) : null}
|
|
31
46
|
</View>
|
|
32
47
|
<FooterColumn title="Product" links={links.product} LinkComponent={LinkComponent} />
|
|
@@ -14,7 +14,11 @@ export type SiteFooterProps = {
|
|
|
14
14
|
LinkComponent: ComponentType<DrawerLinkProps>
|
|
15
15
|
/** Product version displayed in the legal bar. */
|
|
16
16
|
version?: string
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Same-product contact page (shown above Discord in the brand column).
|
|
19
|
+
*/
|
|
20
|
+
contactHref?: string
|
|
21
|
+
/** Optional Discord invite URL. */
|
|
18
22
|
discordHref?: string
|
|
19
23
|
/** Additional classes for the footer root. */
|
|
20
24
|
className?: string
|
|
@@ -31,6 +31,7 @@ export function SiteFooter({
|
|
|
31
31
|
brand,
|
|
32
32
|
LinkComponent,
|
|
33
33
|
version,
|
|
34
|
+
contactHref,
|
|
34
35
|
discordHref,
|
|
35
36
|
className,
|
|
36
37
|
}: SiteFooterProps): JSX.Element {
|
|
@@ -43,16 +44,26 @@ export function SiteFooter({
|
|
|
43
44
|
{brand}
|
|
44
45
|
</LinkComponent>
|
|
45
46
|
<p className="mt-3 text-sm leading-relaxed text-muted-foreground">{links.blurb}</p>
|
|
46
|
-
{discordHref ? (
|
|
47
|
-
<div className="mt-4">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
{contactHref || discordHref ? (
|
|
48
|
+
<div className="mt-4 flex flex-col gap-2">
|
|
49
|
+
{contactHref ? (
|
|
50
|
+
<LinkComponent
|
|
51
|
+
href={contactHref}
|
|
52
|
+
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
|
|
53
|
+
>
|
|
54
|
+
Contact
|
|
55
|
+
</LinkComponent>
|
|
56
|
+
) : null}
|
|
57
|
+
{discordHref ? (
|
|
58
|
+
<LinkComponent
|
|
59
|
+
href={discordHref}
|
|
60
|
+
target="_blank"
|
|
61
|
+
rel="noopener noreferrer"
|
|
62
|
+
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
|
|
63
|
+
>
|
|
64
|
+
Discord
|
|
65
|
+
</LinkComponent>
|
|
66
|
+
) : null}
|
|
56
67
|
</div>
|
|
57
68
|
) : null}
|
|
58
69
|
</div>
|
|
@@ -13,7 +13,7 @@ describe("buildSiteFooterLinks", () => {
|
|
|
13
13
|
ossLinksRelative: true,
|
|
14
14
|
})
|
|
15
15
|
expect(links.product[0]?.href).toBe("/docs/introduction")
|
|
16
|
-
expect(links.product.find((l) => l.label === "Contact")
|
|
16
|
+
expect(links.product.find((l) => l.label === "Contact")).toBeUndefined()
|
|
17
17
|
expect(links.opensource.find((l) => l.label === "Changelog")?.href).toBe("/changelog")
|
|
18
18
|
expect(links.legal.privacy.href).toBe("/privacy")
|
|
19
19
|
expect(links.legal.terms.href).toBe("/terms")
|
|
@@ -27,7 +27,7 @@ describe("buildSiteFooterLinks", () => {
|
|
|
27
27
|
ossWebOrigin: "http://localhost:3800",
|
|
28
28
|
cloudAppOrigin: "http://localhost:3830",
|
|
29
29
|
openApiHref: "/openapi",
|
|
30
|
-
githubUrl: "https://github.com/limetry/
|
|
30
|
+
githubUrl: "https://github.com/limetry/limetry",
|
|
31
31
|
includeCloudLink: true,
|
|
32
32
|
ossLinksRelative: false,
|
|
33
33
|
})
|
|
@@ -115,7 +115,6 @@ export function buildSiteFooterLinks(input: BuildSiteFooterLinksInput): SiteFoot
|
|
|
115
115
|
const product: SiteFooterLink[] = [
|
|
116
116
|
{ label: "Docs", ...ossHref("/docs/introduction", input) },
|
|
117
117
|
{ label: "Examples", ...ossHref("/examples", input) },
|
|
118
|
-
{ label: "Contact", ...ossHref("/contact", input) },
|
|
119
118
|
{ label: "Quick start", ...ossHref("/docs/quick-start", input) },
|
|
120
119
|
]
|
|
121
120
|
if (input.includeCloudLink) {
|