@opensite/ui 2.2.1 → 2.2.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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React3 = require('react');
4
+ var React = require('react');
5
5
  var integration = require('@page-speed/forms/integration');
6
6
  var clsx = require('clsx');
7
7
  var tailwindMerge = require('tailwind-merge');
@@ -9,6 +9,8 @@ var jsxRuntime = require('react/jsx-runtime');
9
9
  var AccordionPrimitive = require('@radix-ui/react-accordion');
10
10
  var icon = require('@page-speed/icon');
11
11
 
12
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
+
12
14
  function _interopNamespace(e) {
13
15
  if (e && e.__esModule) return e;
14
16
  var n = Object.create(null);
@@ -27,7 +29,7 @@ function _interopNamespace(e) {
27
29
  return Object.freeze(n);
28
30
  }
29
31
 
30
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
32
+ var React__default = /*#__PURE__*/_interopDefault(React);
31
33
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
32
34
 
33
35
  // components/blocks/contact/contact-faq.tsx
@@ -130,7 +132,7 @@ var maxWidthStyles = {
130
132
  "4xl": "max-w-[1536px]",
131
133
  full: "max-w-full"
132
134
  };
133
- var Container = React3__namespace.default.forwardRef(
135
+ var Container = React__default.default.forwardRef(
134
136
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
135
137
  const Component = as;
136
138
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -435,7 +437,7 @@ var spacingStyles = {
435
437
  };
436
438
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
437
439
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
438
- var Section = React3__namespace.default.forwardRef(
440
+ var Section = React__default.default.forwardRef(
439
441
  ({
440
442
  id,
441
443
  title,
@@ -541,8 +543,6 @@ function ContactFaq({
541
543
  heading,
542
544
  description,
543
545
  formHeading,
544
- buttonText = "Submit",
545
- buttonIcon,
546
546
  items,
547
547
  itemsSlot,
548
548
  faqHeading,
@@ -567,25 +567,8 @@ function ContactFaq({
567
567
  pattern,
568
568
  patternOpacity
569
569
  }) {
570
- const formStyleRules = React3__namespace.useMemo(() => {
571
- return {
572
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
573
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
574
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
575
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
576
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
577
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
578
- };
579
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
580
- const formFields = React3__namespace.useMemo(() => {
581
- if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
582
- return formEngineSetup.fields;
583
- } else {
584
- return DEFAULT_FORM_FIELDS;
585
- }
586
- }, [formEngineSetup?.fields]);
587
570
  const hasFaqItems = itemsSlot || items && items.length > 0;
588
- const faqContent = React3.useMemo(() => {
571
+ const faqContent = React.useMemo(() => {
589
572
  if (itemsSlot) return itemsSlot;
590
573
  if (!items || items.length === 0) return null;
591
574
  return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "single", collapsible: true, className: accordionClassName, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -681,20 +664,9 @@ function ContactFaq({
681
664
  formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
682
665
  integration.FormEngine,
683
666
  {
684
- ...formEngineSetup,
685
- formLayoutSettings: {
686
- ...formEngineSetup.formLayoutSettings,
687
- formLayout: "standard",
688
- submitButtonSetup: {
689
- ...formEngineSetup.formLayoutSettings?.submitButtonSetup,
690
- submitLabel: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
691
- buttonIcon,
692
- buttonText
693
- ] })
694
- },
695
- styleRules: formStyleRules
696
- },
697
- fields: formFields
667
+ formEngineSetup,
668
+ defaultFields: DEFAULT_FORM_FIELDS,
669
+ defaultStyleRules: DEFAULT_STYLE_RULES
698
670
  }
699
671
  ) : null
700
672
  ] }) }),
@@ -25,14 +25,6 @@ interface ContactFaqProps {
25
25
  * Form section heading
26
26
  */
27
27
  formHeading?: React.ReactNode;
28
- /**
29
- * Submit button text
30
- */
31
- buttonText?: string;
32
- /**
33
- * Icon to display in submit button
34
- */
35
- buttonIcon?: React.ReactNode;
36
28
  /**
37
29
  * Array of FAQ items to display alongside the contact form
38
30
  */
@@ -129,6 +121,6 @@ interface ContactFaqProps {
129
121
  /**
130
122
  * ContactFaq - FAQ contact form with flexible field configuration
131
123
  */
132
- declare function ContactFaq({ heading, description, formHeading, buttonText, buttonIcon, items, itemsSlot, faqHeading, formEngineSetup, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formHeadingClassName, faqHeadingClassName, faqContainerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, gridClassName, background, spacing, pattern, patternOpacity, }: ContactFaqProps): React.JSX.Element;
124
+ declare function ContactFaq({ heading, description, formHeading, items, itemsSlot, faqHeading, formEngineSetup, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formHeadingClassName, faqHeadingClassName, faqContainerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, gridClassName, background, spacing, pattern, patternOpacity, }: ContactFaqProps): React.JSX.Element;
133
125
 
134
126
  export { ContactFaq, type ContactFaqProps, type FaqItem };
@@ -25,14 +25,6 @@ interface ContactFaqProps {
25
25
  * Form section heading
26
26
  */
27
27
  formHeading?: React.ReactNode;
28
- /**
29
- * Submit button text
30
- */
31
- buttonText?: string;
32
- /**
33
- * Icon to display in submit button
34
- */
35
- buttonIcon?: React.ReactNode;
36
28
  /**
37
29
  * Array of FAQ items to display alongside the contact form
38
30
  */
@@ -129,6 +121,6 @@ interface ContactFaqProps {
129
121
  /**
130
122
  * ContactFaq - FAQ contact form with flexible field configuration
131
123
  */
132
- declare function ContactFaq({ heading, description, formHeading, buttonText, buttonIcon, items, itemsSlot, faqHeading, formEngineSetup, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formHeadingClassName, faqHeadingClassName, faqContainerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, gridClassName, background, spacing, pattern, patternOpacity, }: ContactFaqProps): React.JSX.Element;
124
+ declare function ContactFaq({ heading, description, formHeading, items, itemsSlot, faqHeading, formEngineSetup, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formHeadingClassName, faqHeadingClassName, faqContainerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, gridClassName, background, spacing, pattern, patternOpacity, }: ContactFaqProps): React.JSX.Element;
133
125
 
134
126
  export { ContactFaq, type ContactFaqProps, type FaqItem };
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import * as React3 from 'react';
3
- import React3__default, { useMemo } from 'react';
2
+ import React, { useMemo } from 'react';
4
3
  import { FormEngine } from '@page-speed/forms/integration';
5
4
  import { clsx } from 'clsx';
6
5
  import { twMerge } from 'tailwind-merge';
7
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
7
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
9
8
  import { Icon } from '@page-speed/icon';
10
9
 
@@ -108,7 +107,7 @@ var maxWidthStyles = {
108
107
  "4xl": "max-w-[1536px]",
109
108
  full: "max-w-full"
110
109
  };
111
- var Container = React3__default.forwardRef(
110
+ var Container = React.forwardRef(
112
111
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
113
112
  const Component = as;
114
113
  return /* @__PURE__ */ jsx(
@@ -413,7 +412,7 @@ var spacingStyles = {
413
412
  };
414
413
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
415
414
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
416
- var Section = React3__default.forwardRef(
415
+ var Section = React.forwardRef(
417
416
  ({
418
417
  id,
419
418
  title,
@@ -519,8 +518,6 @@ function ContactFaq({
519
518
  heading,
520
519
  description,
521
520
  formHeading,
522
- buttonText = "Submit",
523
- buttonIcon,
524
521
  items,
525
522
  itemsSlot,
526
523
  faqHeading,
@@ -545,23 +542,6 @@ function ContactFaq({
545
542
  pattern,
546
543
  patternOpacity
547
544
  }) {
548
- const formStyleRules = React3.useMemo(() => {
549
- return {
550
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
551
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
552
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
553
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
554
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
555
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
556
- };
557
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
558
- const formFields = React3.useMemo(() => {
559
- if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
560
- return formEngineSetup.fields;
561
- } else {
562
- return DEFAULT_FORM_FIELDS;
563
- }
564
- }, [formEngineSetup?.fields]);
565
545
  const hasFaqItems = itemsSlot || items && items.length > 0;
566
546
  const faqContent = useMemo(() => {
567
547
  if (itemsSlot) return itemsSlot;
@@ -659,20 +639,9 @@ function ContactFaq({
659
639
  formEngineSetup ? /* @__PURE__ */ jsx(
660
640
  FormEngine,
661
641
  {
662
- ...formEngineSetup,
663
- formLayoutSettings: {
664
- ...formEngineSetup.formLayoutSettings,
665
- formLayout: "standard",
666
- submitButtonSetup: {
667
- ...formEngineSetup.formLayoutSettings?.submitButtonSetup,
668
- submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
669
- buttonIcon,
670
- buttonText
671
- ] })
672
- },
673
- styleRules: formStyleRules
674
- },
675
- fields: formFields
642
+ formEngineSetup,
643
+ defaultFields: DEFAULT_FORM_FIELDS,
644
+ defaultStyleRules: DEFAULT_STYLE_RULES
676
645
  }
677
646
  ) : null
678
647
  ] }) }),
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React3 = require('react');
4
+ var React = require('react');
5
5
  var framerMotion = require('framer-motion');
6
6
  var integration = require('@page-speed/forms/integration');
7
7
  var clsx = require('clsx');
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
28
28
  return Object.freeze(n);
29
29
  }
30
30
 
31
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
31
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
32
 
33
33
  // components/blocks/contact/contact-image.tsx
34
34
  function cn(...inputs) {
@@ -47,7 +47,7 @@ var maxWidthStyles = {
47
47
  "4xl": "max-w-[1536px]",
48
48
  full: "max-w-full"
49
49
  };
50
- var Container = React3__namespace.default.forwardRef(
50
+ var Container = React__namespace.default.forwardRef(
51
51
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
52
52
  const Component = as;
53
53
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -352,7 +352,7 @@ var spacingStyles = {
352
352
  };
353
353
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
354
354
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
355
- var Section = React3__namespace.default.forwardRef(
355
+ var Section = React__namespace.default.forwardRef(
356
356
  ({
357
357
  id,
358
358
  title,
@@ -466,8 +466,6 @@ function ContactImage({
466
466
  eyebrow,
467
467
  heading,
468
468
  description,
469
- buttonText = "Send Message",
470
- buttonIcon,
471
469
  image,
472
470
  contactOverlays,
473
471
  contactOverlaysSlot,
@@ -486,23 +484,7 @@ function ContactImage({
486
484
  patternOpacity,
487
485
  optixFlowConfig
488
486
  }) {
489
- const formStyleRules = React3__namespace.useMemo(() => {
490
- return {
491
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
492
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
493
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
494
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
495
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
496
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
497
- };
498
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
499
- const formFields = React3__namespace.useMemo(() => {
500
- if (formEngineSetup?.fields && formEngineSetup.fields.length > 0) {
501
- return formEngineSetup.fields;
502
- }
503
- return DEFAULT_FORM_FIELDS;
504
- }, [formEngineSetup?.fields]);
505
- const contactOverlaysContent = React3__namespace.useMemo(() => {
487
+ const contactOverlaysContent = React__namespace.useMemo(() => {
506
488
  if (contactOverlaysSlot) return contactOverlaysSlot;
507
489
  if (!contactOverlays || contactOverlays.length === 0) return null;
508
490
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-3", contactOverlaysClassName), children: contactOverlays.map((item, index) => {
@@ -621,20 +603,9 @@ function ContactImage({
621
603
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8", children: formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
622
604
  integration.FormEngine,
623
605
  {
624
- ...formEngineSetup,
625
- formLayoutSettings: {
626
- ...formEngineSetup.formLayoutSettings,
627
- formLayout: "standard",
628
- submitButtonSetup: {
629
- ...formEngineSetup.formLayoutSettings?.submitButtonSetup,
630
- submitLabel: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
631
- buttonIcon,
632
- buttonText
633
- ] })
634
- },
635
- styleRules: formStyleRules
636
- },
637
- fields: formFields
606
+ formEngineSetup,
607
+ defaultFields: DEFAULT_FORM_FIELDS,
608
+ defaultStyleRules: DEFAULT_STYLE_RULES
638
609
  }
639
610
  ) : null })
640
611
  ]
@@ -49,14 +49,6 @@ interface ContactImageProps {
49
49
  * Description text below heading
50
50
  */
51
51
  description?: React.ReactNode;
52
- /**
53
- * Submit button text
54
- */
55
- buttonText?: string;
56
- /**
57
- * Icon to display in submit button
58
- */
59
- buttonIcon?: React.ReactNode;
60
52
  /**
61
53
  * Image configuration for the left panel
62
54
  */
@@ -148,6 +140,6 @@ interface ContactImageProps {
148
140
  * />
149
141
  * ```
150
142
  */
151
- declare function ContactImage({ eyebrow, heading, description, buttonText, buttonIcon, image, contactOverlays, contactOverlaysSlot, formEngineSetup, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, imageClassName, contactOverlaysClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: ContactImageProps): React.JSX.Element;
143
+ declare function ContactImage({ eyebrow, heading, description, image, contactOverlays, contactOverlaysSlot, formEngineSetup, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, imageClassName, contactOverlaysClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: ContactImageProps): React.JSX.Element;
152
144
 
153
145
  export { ContactImage, type ContactImageProps, type ContactOverlayItem };
@@ -49,14 +49,6 @@ interface ContactImageProps {
49
49
  * Description text below heading
50
50
  */
51
51
  description?: React.ReactNode;
52
- /**
53
- * Submit button text
54
- */
55
- buttonText?: string;
56
- /**
57
- * Icon to display in submit button
58
- */
59
- buttonIcon?: React.ReactNode;
60
52
  /**
61
53
  * Image configuration for the left panel
62
54
  */
@@ -148,6 +140,6 @@ interface ContactImageProps {
148
140
  * />
149
141
  * ```
150
142
  */
151
- declare function ContactImage({ eyebrow, heading, description, buttonText, buttonIcon, image, contactOverlays, contactOverlaysSlot, formEngineSetup, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, imageClassName, contactOverlaysClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: ContactImageProps): React.JSX.Element;
143
+ declare function ContactImage({ eyebrow, heading, description, image, contactOverlays, contactOverlaysSlot, formEngineSetup, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, imageClassName, contactOverlaysClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: ContactImageProps): React.JSX.Element;
152
144
 
153
145
  export { ContactImage, type ContactImageProps, type ContactOverlayItem };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import * as React3 from 'react';
3
- import React3__default from 'react';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
4
  import { motion } from 'framer-motion';
5
5
  import { FormEngine } from '@page-speed/forms/integration';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
8
  import { Img } from '@page-speed/img';
9
9
  import { Icon } from '@page-speed/icon';
10
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+ import { jsx, jsxs } from 'react/jsx-runtime';
11
11
 
12
12
  // components/blocks/contact/contact-image.tsx
13
13
  function cn(...inputs) {
@@ -26,7 +26,7 @@ var maxWidthStyles = {
26
26
  "4xl": "max-w-[1536px]",
27
27
  full: "max-w-full"
28
28
  };
29
- var Container = React3__default.forwardRef(
29
+ var Container = React__default.forwardRef(
30
30
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
31
31
  const Component = as;
32
32
  return /* @__PURE__ */ jsx(
@@ -331,7 +331,7 @@ var spacingStyles = {
331
331
  };
332
332
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
333
333
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
334
- var Section = React3__default.forwardRef(
334
+ var Section = React__default.forwardRef(
335
335
  ({
336
336
  id,
337
337
  title,
@@ -445,8 +445,6 @@ function ContactImage({
445
445
  eyebrow,
446
446
  heading,
447
447
  description,
448
- buttonText = "Send Message",
449
- buttonIcon,
450
448
  image,
451
449
  contactOverlays,
452
450
  contactOverlaysSlot,
@@ -465,23 +463,7 @@ function ContactImage({
465
463
  patternOpacity,
466
464
  optixFlowConfig
467
465
  }) {
468
- const formStyleRules = React3.useMemo(() => {
469
- return {
470
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
471
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
472
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
473
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
474
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
475
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
476
- };
477
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
478
- const formFields = React3.useMemo(() => {
479
- if (formEngineSetup?.fields && formEngineSetup.fields.length > 0) {
480
- return formEngineSetup.fields;
481
- }
482
- return DEFAULT_FORM_FIELDS;
483
- }, [formEngineSetup?.fields]);
484
- const contactOverlaysContent = React3.useMemo(() => {
466
+ const contactOverlaysContent = React.useMemo(() => {
485
467
  if (contactOverlaysSlot) return contactOverlaysSlot;
486
468
  if (!contactOverlays || contactOverlays.length === 0) return null;
487
469
  return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-3", contactOverlaysClassName), children: contactOverlays.map((item, index) => {
@@ -600,20 +582,9 @@ function ContactImage({
600
582
  /* @__PURE__ */ jsx("div", { className: "mt-8", children: formEngineSetup ? /* @__PURE__ */ jsx(
601
583
  FormEngine,
602
584
  {
603
- ...formEngineSetup,
604
- formLayoutSettings: {
605
- ...formEngineSetup.formLayoutSettings,
606
- formLayout: "standard",
607
- submitButtonSetup: {
608
- ...formEngineSetup.formLayoutSettings?.submitButtonSetup,
609
- submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
610
- buttonIcon,
611
- buttonText
612
- ] })
613
- },
614
- styleRules: formStyleRules
615
- },
616
- fields: formFields
585
+ formEngineSetup,
586
+ defaultFields: DEFAULT_FORM_FIELDS,
587
+ defaultStyleRules: DEFAULT_STYLE_RULES
617
588
  }
618
589
  ) : null })
619
590
  ]
@@ -1,31 +1,15 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React3 = require('react');
5
4
  var integration = require('@page-speed/forms/integration');
6
5
  var clsx = require('clsx');
7
6
  var tailwindMerge = require('tailwind-merge');
8
7
  var jsxRuntime = require('react/jsx-runtime');
8
+ var React = require('react');
9
9
 
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
10
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
27
11
 
28
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
12
+ var React__default = /*#__PURE__*/_interopDefault(React);
29
13
 
30
14
  // components/blocks/contact/contact-vendor.tsx
31
15
  function cn(...inputs) {
@@ -63,7 +47,7 @@ var maxWidthStyles = {
63
47
  "4xl": "max-w-[1536px]",
64
48
  full: "max-w-full"
65
49
  };
66
- var Container = React3__namespace.default.forwardRef(
50
+ var Container = React__default.default.forwardRef(
67
51
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
68
52
  const Component = as;
69
53
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -368,7 +352,7 @@ var spacingStyles = {
368
352
  };
369
353
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
370
354
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
371
- var Section = React3__namespace.default.forwardRef(
355
+ var Section = React__default.default.forwardRef(
372
356
  ({
373
357
  id,
374
358
  title,
@@ -494,23 +478,6 @@ function ContactVendor({
494
478
  pattern,
495
479
  patternOpacity = 0.1
496
480
  }) {
497
- const formStyleRules = React3__namespace.useMemo(() => {
498
- return {
499
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
500
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
501
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
502
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
503
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
504
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
505
- };
506
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
507
- const formFields = React3__namespace.useMemo(() => {
508
- if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
509
- return formEngineSetup.fields;
510
- } else {
511
- return DEFAULT_FORM_FIELDS;
512
- }
513
- }, [formEngineSetup?.fields]);
514
481
  return /* @__PURE__ */ jsxRuntime.jsx(
515
482
  Section,
516
483
  {
@@ -546,12 +513,9 @@ function ContactVendor({
546
513
  /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("mx-auto max-w-xl", cardClassName), children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: cn("p-6 lg:p-8", cardContentClassName), children: formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
547
514
  integration.FormEngine,
548
515
  {
549
- ...formEngineSetup,
550
- formLayoutSettings: {
551
- ...formEngineSetup.formLayoutSettings,
552
- styleRules: formStyleRules
553
- },
554
- fields: formFields
516
+ formEngineSetup,
517
+ defaultFields: DEFAULT_FORM_FIELDS,
518
+ defaultStyleRules: DEFAULT_STYLE_RULES
555
519
  }
556
520
  ) : null }) })
557
521
  ] })
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import * as React3 from 'react';
3
- import React3__default from 'react';
4
2
  import { FormEngine } from '@page-speed/forms/integration';
5
3
  import { clsx } from 'clsx';
6
4
  import { twMerge } from 'tailwind-merge';
7
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
+ import React from 'react';
8
7
 
9
8
  // components/blocks/contact/contact-vendor.tsx
10
9
  function cn(...inputs) {
@@ -42,7 +41,7 @@ var maxWidthStyles = {
42
41
  "4xl": "max-w-[1536px]",
43
42
  full: "max-w-full"
44
43
  };
45
- var Container = React3__default.forwardRef(
44
+ var Container = React.forwardRef(
46
45
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
47
46
  const Component = as;
48
47
  return /* @__PURE__ */ jsx(
@@ -347,7 +346,7 @@ var spacingStyles = {
347
346
  };
348
347
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
349
348
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
350
- var Section = React3__default.forwardRef(
349
+ var Section = React.forwardRef(
351
350
  ({
352
351
  id,
353
352
  title,
@@ -473,23 +472,6 @@ function ContactVendor({
473
472
  pattern,
474
473
  patternOpacity = 0.1
475
474
  }) {
476
- const formStyleRules = React3.useMemo(() => {
477
- return {
478
- formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
479
- fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
480
- fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
481
- formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
482
- successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
483
- errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
484
- };
485
- }, [formEngineSetup?.formLayoutSettings?.styleRules]);
486
- const formFields = React3.useMemo(() => {
487
- if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
488
- return formEngineSetup.fields;
489
- } else {
490
- return DEFAULT_FORM_FIELDS;
491
- }
492
- }, [formEngineSetup?.fields]);
493
475
  return /* @__PURE__ */ jsx(
494
476
  Section,
495
477
  {
@@ -525,12 +507,9 @@ function ContactVendor({
525
507
  /* @__PURE__ */ jsx(Card, { className: cn("mx-auto max-w-xl", cardClassName), children: /* @__PURE__ */ jsx(CardContent, { className: cn("p-6 lg:p-8", cardContentClassName), children: formEngineSetup ? /* @__PURE__ */ jsx(
526
508
  FormEngine,
527
509
  {
528
- ...formEngineSetup,
529
- formLayoutSettings: {
530
- ...formEngineSetup.formLayoutSettings,
531
- styleRules: formStyleRules
532
- },
533
- fields: formFields
510
+ formEngineSetup,
511
+ defaultFields: DEFAULT_FORM_FIELDS,
512
+ defaultStyleRules: DEFAULT_STYLE_RULES
534
513
  }
535
514
  ) : null }) })
536
515
  ] })