@burdenoff/website-sdk 2026.520.2 → 2026.520.3
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.d.mts +69 -2
- package/dist/components/contact.d.ts +69 -2
- package/dist/components/contact.js +83 -0
- package/dist/components/contact.js.map +1 -1
- package/dist/components/contact.mjs +83 -1
- package/dist/components/contact.mjs.map +1 -1
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -483,6 +483,28 @@ var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
483
483
|
}
|
|
484
484
|
));
|
|
485
485
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
486
|
+
var Select = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
487
|
+
return /* @__PURE__ */ jsx(
|
|
488
|
+
"select",
|
|
489
|
+
{
|
|
490
|
+
className: cn(
|
|
491
|
+
"flex h-9 w-full appearance-none rounded-md border border-input bg-transparent bg-[length:1rem_1rem] bg-[right_0.75rem_center] bg-no-repeat px-3 py-1 pr-8 text-base shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
492
|
+
// Inline SVG chevron: SVG inside a `background-image: url(data:…)`
|
|
493
|
+
// does NOT inherit `currentColor` from the host element (the SVG is
|
|
494
|
+
// its own document with no parent CSS context), so the stroke is
|
|
495
|
+
// hardcoded to a muted slate-400 (#94a3b8). Matches the muted
|
|
496
|
+
// foreground token visually in both light and dark themes well
|
|
497
|
+
// enough for a passive chevron — addresses #9 review feedback.
|
|
498
|
+
`bg-[url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")]`,
|
|
499
|
+
className
|
|
500
|
+
),
|
|
501
|
+
ref,
|
|
502
|
+
...props,
|
|
503
|
+
children
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
});
|
|
507
|
+
Select.displayName = "Select";
|
|
486
508
|
var Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
487
509
|
return /* @__PURE__ */ jsx(
|
|
488
510
|
"textarea",
|
|
@@ -497,6 +519,15 @@ var Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
497
519
|
);
|
|
498
520
|
});
|
|
499
521
|
Textarea.displayName = "Textarea";
|
|
522
|
+
var DEFAULT_CONTACT_CATEGORIES = [
|
|
523
|
+
{ value: "general", label: "General enquiry" },
|
|
524
|
+
{ value: "sales", label: "Sales" },
|
|
525
|
+
{ value: "support", label: "Support" },
|
|
526
|
+
{ value: "partnership", label: "Partnership" },
|
|
527
|
+
{ value: "press", label: "Press / media" },
|
|
528
|
+
{ value: "careers", label: "Careers" },
|
|
529
|
+
{ value: "security", label: "Security disclosure" }
|
|
530
|
+
];
|
|
500
531
|
var SUBMIT_CONTACT_INQUIRY_MUTATION = (
|
|
501
532
|
/* GraphQL */
|
|
502
533
|
`
|
|
@@ -518,6 +549,12 @@ async function submitContactForm(client, data, productId) {
|
|
|
518
549
|
subject: data.subject,
|
|
519
550
|
message: data.message,
|
|
520
551
|
productId,
|
|
552
|
+
// Send `category` only when the user actually picked one. Older
|
|
553
|
+
// backend deployments without the `category` field in the
|
|
554
|
+
// `SubmitContactInquiryInput` schema would reject any unknown
|
|
555
|
+
// field; spreading conditionally keeps the SDK forward-
|
|
556
|
+
// compatible.
|
|
557
|
+
...data.category ? { category: data.category } : {},
|
|
521
558
|
...data.recaptchaToken ? { recaptchaToken: data.recaptchaToken } : {}
|
|
522
559
|
}
|
|
523
560
|
});
|
|
@@ -556,6 +593,16 @@ function ContactPage({
|
|
|
556
593
|
responseTime = "We typically respond within 24 hours",
|
|
557
594
|
heroTitle = "Get in Touch",
|
|
558
595
|
heroDescription = "Have questions about {productName}? We're here to help. Reach out to our team and we'll get back to you as soon as possible.",
|
|
596
|
+
// Backward-compatibility: default to `[]` so existing consumers
|
|
597
|
+
// (fluidgrids/burdenoff/algoshred websites) that don't pass
|
|
598
|
+
// `categories` continue to render with NO dropdown — same behavior
|
|
599
|
+
// they had before this SDK version. To opt in, pass an explicit
|
|
600
|
+
// `categories={…}` array (or the exported `DEFAULT_CONTACT_CATEGORIES`
|
|
601
|
+
// constant for the sane Burdenoff-generic vocabulary).
|
|
602
|
+
categories = [],
|
|
603
|
+
categoryLabel = "Category",
|
|
604
|
+
categoryPlaceholder = "Select a category",
|
|
605
|
+
categoryRequired = true,
|
|
559
606
|
additionalOptions = [
|
|
560
607
|
{
|
|
561
608
|
title: "Sales Inquiries",
|
|
@@ -599,11 +646,19 @@ function ContactPage({
|
|
|
599
646
|
const form = e.currentTarget;
|
|
600
647
|
try {
|
|
601
648
|
const formData = new FormData(form);
|
|
649
|
+
const showCategory = categories.length > 0;
|
|
650
|
+
const rawCategory = showCategory ? (formData.get("category") ?? "").trim() : "";
|
|
651
|
+
if (showCategory && categoryRequired && !rawCategory) {
|
|
652
|
+
toast.error("Please select a category");
|
|
653
|
+
setIsSubmitting(false);
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
602
656
|
const contactData = {
|
|
603
657
|
firstName: formData.get("firstName"),
|
|
604
658
|
lastName: formData.get("lastName"),
|
|
605
659
|
email: formData.get("email"),
|
|
606
660
|
company: formData.get("company"),
|
|
661
|
+
category: rawCategory || void 0,
|
|
607
662
|
subject: formData.get("subject"),
|
|
608
663
|
message: formData.get("message"),
|
|
609
664
|
recaptchaToken
|
|
@@ -772,6 +827,33 @@ function ContactPage({
|
|
|
772
827
|
}
|
|
773
828
|
)
|
|
774
829
|
] }),
|
|
830
|
+
categories.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
831
|
+
/* @__PURE__ */ jsxs(
|
|
832
|
+
Label,
|
|
833
|
+
{
|
|
834
|
+
htmlFor: "category",
|
|
835
|
+
className: "text-sm sm:text-base",
|
|
836
|
+
children: [
|
|
837
|
+
categoryLabel,
|
|
838
|
+
categoryRequired ? " *" : ""
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
/* @__PURE__ */ jsxs(
|
|
843
|
+
Select,
|
|
844
|
+
{
|
|
845
|
+
id: "category",
|
|
846
|
+
name: "category",
|
|
847
|
+
required: categoryRequired,
|
|
848
|
+
defaultValue: "",
|
|
849
|
+
className: "text-sm sm:text-base",
|
|
850
|
+
children: [
|
|
851
|
+
/* @__PURE__ */ jsx("option", { value: "", disabled: categoryRequired, children: categoryPlaceholder }),
|
|
852
|
+
categories.map((c) => /* @__PURE__ */ jsx("option", { value: c.value, children: c.label }, c.value))
|
|
853
|
+
]
|
|
854
|
+
}
|
|
855
|
+
)
|
|
856
|
+
] }),
|
|
775
857
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
776
858
|
/* @__PURE__ */ jsx(Label, { htmlFor: "subject", className: "text-sm sm:text-base", children: "Subject *" }),
|
|
777
859
|
/* @__PURE__ */ jsx(
|
|
@@ -3911,6 +3993,6 @@ function PressKitPage(props) {
|
|
|
3911
3993
|
] });
|
|
3912
3994
|
}
|
|
3913
3995
|
|
|
3914
|
-
export { BlogListPage, BlogPostPage, Button, ContactPage, ContentRenderer, Input, Label, NewsletterForm, NewsletterPage, PageHead, PressKitPage, PricingPage, PricingSection, ProductProvider, RybbitAnalytics, Textarea, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, buttonVariants, cn, useContentPage, useContentPages, useProduct, useProductConfig, useWebSDK, useWebSDKConfig };
|
|
3996
|
+
export { BlogListPage, BlogPostPage, Button, ContactPage, ContentRenderer, DEFAULT_CONTACT_CATEGORIES, Input, Label, NewsletterForm, NewsletterPage, PageHead, PressKitPage, PricingPage, PricingSection, ProductProvider, RybbitAnalytics, Select, Textarea, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, buttonVariants, cn, useContentPage, useContentPages, useProduct, useProductConfig, useWebSDK, useWebSDKConfig };
|
|
3915
3997
|
//# sourceMappingURL=index.mjs.map
|
|
3916
3998
|
//# sourceMappingURL=index.mjs.map
|