@opensite/ui 1.8.2 → 1.8.4

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.
Files changed (171) hide show
  1. package/dist/about-story-gallery.cjs +3 -30
  2. package/dist/about-story-gallery.d.cts +1 -1
  3. package/dist/about-story-gallery.d.ts +1 -1
  4. package/dist/about-story-gallery.js +3 -30
  5. package/dist/components.d.cts +1 -1
  6. package/dist/components.d.ts +1 -1
  7. package/dist/contact-callback.cjs +526 -273
  8. package/dist/contact-callback.d.cts +39 -59
  9. package/dist/contact-callback.d.ts +39 -59
  10. package/dist/contact-callback.js +528 -274
  11. package/dist/contact-card.cjs +459 -183
  12. package/dist/contact-card.d.cts +26 -49
  13. package/dist/contact-card.d.ts +26 -49
  14. package/dist/contact-card.js +461 -183
  15. package/dist/contact-careers.cjs +614 -510
  16. package/dist/contact-careers.d.cts +32 -55
  17. package/dist/contact-careers.d.ts +32 -55
  18. package/dist/contact-careers.js +616 -510
  19. package/dist/contact-catering.cjs +507 -501
  20. package/dist/contact-catering.d.cts +27 -61
  21. package/dist/contact-catering.d.ts +27 -61
  22. package/dist/contact-catering.js +509 -500
  23. package/dist/contact-consultation.cjs +484 -253
  24. package/dist/contact-consultation.d.cts +29 -56
  25. package/dist/contact-consultation.d.ts +29 -56
  26. package/dist/contact-consultation.js +486 -253
  27. package/dist/contact-dark.cjs +296 -296
  28. package/dist/contact-dark.d.cts +1 -1
  29. package/dist/contact-dark.d.ts +1 -1
  30. package/dist/contact-dark.js +297 -296
  31. package/dist/contact-demo.d.cts +1 -1
  32. package/dist/contact-demo.d.ts +1 -1
  33. package/dist/contact-emergency.d.cts +1 -1
  34. package/dist/contact-emergency.d.ts +1 -1
  35. package/dist/contact-event.d.cts +1 -1
  36. package/dist/contact-event.d.ts +1 -1
  37. package/dist/contact-faq.cjs +247 -250
  38. package/dist/contact-faq.d.cts +1 -1
  39. package/dist/contact-faq.d.ts +1 -1
  40. package/dist/contact-faq.js +248 -250
  41. package/dist/contact-feedback.d.cts +1 -1
  42. package/dist/contact-feedback.d.ts +1 -1
  43. package/dist/contact-fitness.d.cts +1 -1
  44. package/dist/contact-fitness.d.ts +1 -1
  45. package/dist/contact-guest.d.cts +1 -1
  46. package/dist/contact-guest.d.ts +1 -1
  47. package/dist/contact-image.d.cts +1 -1
  48. package/dist/contact-image.d.ts +1 -1
  49. package/dist/contact-insurance.d.cts +1 -1
  50. package/dist/contact-insurance.d.ts +1 -1
  51. package/dist/contact-interview.d.cts +1 -1
  52. package/dist/contact-interview.d.ts +1 -1
  53. package/dist/contact-locations.d.cts +1 -1
  54. package/dist/contact-locations.d.ts +1 -1
  55. package/dist/contact-maintenance.d.cts +1 -1
  56. package/dist/contact-maintenance.d.ts +1 -1
  57. package/dist/contact-map.d.cts +1 -1
  58. package/dist/contact-map.d.ts +1 -1
  59. package/dist/contact-minimal.d.cts +1 -1
  60. package/dist/contact-minimal.d.ts +1 -1
  61. package/dist/contact-moving.d.cts +1 -1
  62. package/dist/contact-moving.d.ts +1 -1
  63. package/dist/contact-multistep.d.cts +1 -1
  64. package/dist/contact-multistep.d.ts +1 -1
  65. package/dist/contact-partnership.d.cts +1 -1
  66. package/dist/contact-partnership.d.ts +1 -1
  67. package/dist/contact-photography.cjs +247 -250
  68. package/dist/contact-photography.d.cts +1 -1
  69. package/dist/contact-photography.d.ts +1 -1
  70. package/dist/contact-photography.js +248 -250
  71. package/dist/contact-press.d.cts +1 -1
  72. package/dist/contact-press.d.ts +1 -1
  73. package/dist/contact-quote.d.cts +1 -1
  74. package/dist/contact-quote.d.ts +1 -1
  75. package/dist/contact-referral.d.cts +1 -1
  76. package/dist/contact-referral.d.ts +1 -1
  77. package/dist/contact-report.d.cts +1 -1
  78. package/dist/contact-report.d.ts +1 -1
  79. package/dist/contact-reservation.d.cts +1 -1
  80. package/dist/contact-reservation.d.ts +1 -1
  81. package/dist/contact-retreat.d.cts +1 -1
  82. package/dist/contact-retreat.d.ts +1 -1
  83. package/dist/contact-rsvp.d.cts +1 -1
  84. package/dist/contact-rsvp.d.ts +1 -1
  85. package/dist/contact-sales.d.cts +1 -1
  86. package/dist/contact-sales.d.ts +1 -1
  87. package/dist/contact-schedule.d.cts +1 -1
  88. package/dist/contact-schedule.d.ts +1 -1
  89. package/dist/contact-sponsorship.d.cts +1 -1
  90. package/dist/contact-sponsorship.d.ts +1 -1
  91. package/dist/contact-support.d.cts +1 -1
  92. package/dist/contact-support.d.ts +1 -1
  93. package/dist/contact-tenant.d.cts +1 -1
  94. package/dist/contact-tenant.d.ts +1 -1
  95. package/dist/contact-vendor.d.cts +1 -1
  96. package/dist/contact-vendor.d.ts +1 -1
  97. package/dist/contact-volunteer.d.cts +1 -1
  98. package/dist/contact-volunteer.d.ts +1 -1
  99. package/dist/contact-warranty.d.cts +1 -1
  100. package/dist/contact-warranty.d.ts +1 -1
  101. package/dist/contact-wedding.d.cts +1 -1
  102. package/dist/contact-wedding.d.ts +1 -1
  103. package/dist/cta-app-download-newsletter.d.cts +1 -1
  104. package/dist/cta-app-download-newsletter.d.ts +1 -1
  105. package/dist/cta-newsletter-features.d.cts +1 -1
  106. package/dist/cta-newsletter-features.d.ts +1 -1
  107. package/dist/footer-accordion-social.d.cts +1 -1
  108. package/dist/footer-accordion-social.d.ts +1 -1
  109. package/dist/footer-newsletter-contact.d.cts +1 -1
  110. package/dist/footer-newsletter-contact.d.ts +1 -1
  111. package/dist/footer-newsletter-minimal.d.cts +1 -1
  112. package/dist/footer-newsletter-minimal.d.ts +1 -1
  113. package/dist/footer-split-image-accordion.d.cts +1 -1
  114. package/dist/footer-split-image-accordion.d.ts +1 -1
  115. package/dist/{forms-nGgHUTBw.d.cts → forms-CStlFhnh.d.cts} +41 -0
  116. package/dist/{forms-nGgHUTBw.d.ts → forms-CStlFhnh.d.ts} +41 -0
  117. package/dist/hero-conversation-intelligence.cjs +1 -2
  118. package/dist/hero-conversation-intelligence.d.cts +1 -5
  119. package/dist/hero-conversation-intelligence.d.ts +1 -5
  120. package/dist/hero-conversation-intelligence.js +1 -2
  121. package/dist/hero-conversion-video-play.cjs +2 -2
  122. package/dist/hero-conversion-video-play.js +2 -2
  123. package/dist/hero-design-system-3d.cjs +162 -82
  124. package/dist/hero-design-system-3d.js +162 -82
  125. package/dist/hero-ecommerce-product-showcase.cjs +103 -81
  126. package/dist/hero-ecommerce-product-showcase.d.cts +5 -1
  127. package/dist/hero-ecommerce-product-showcase.d.ts +5 -1
  128. package/dist/hero-ecommerce-product-showcase.js +103 -81
  129. package/dist/hero-floating-images.cjs +1 -1
  130. package/dist/hero-floating-images.js +1 -1
  131. package/dist/hero-hiring-animated-text.cjs +4 -4
  132. package/dist/hero-hiring-animated-text.js +4 -4
  133. package/dist/hero-minimal-centered-dark.cjs +111 -82
  134. package/dist/hero-minimal-centered-dark.d.cts +1 -1
  135. package/dist/hero-minimal-centered-dark.d.ts +1 -1
  136. package/dist/hero-minimal-centered-dark.js +111 -82
  137. package/dist/hero-mobile-app-download.cjs +1 -1
  138. package/dist/hero-mobile-app-download.js +1 -1
  139. package/dist/hero-overlay-cta-grid.cjs +1 -1
  140. package/dist/hero-overlay-cta-grid.js +1 -1
  141. package/dist/hero-spiral-pattern-cards.cjs +1 -1
  142. package/dist/hero-spiral-pattern-cards.js +1 -1
  143. package/dist/hero-startup-launch-cta.cjs +1 -1
  144. package/dist/hero-startup-launch-cta.js +1 -1
  145. package/dist/hero-stats-social-proof.cjs +106 -90
  146. package/dist/hero-stats-social-proof.js +106 -90
  147. package/dist/hero-testimonial-image-grid.cjs +1 -1
  148. package/dist/hero-testimonial-image-grid.js +1 -1
  149. package/dist/hero-therapy-testimonial-grid.cjs +1 -1
  150. package/dist/hero-therapy-testimonial-grid.js +1 -1
  151. package/dist/hero-ui-library-showcase.cjs +63 -15
  152. package/dist/hero-ui-library-showcase.d.cts +5 -1
  153. package/dist/hero-ui-library-showcase.d.ts +5 -1
  154. package/dist/hero-ui-library-showcase.js +63 -15
  155. package/dist/index.cjs +44 -6
  156. package/dist/index.d.cts +3 -2
  157. package/dist/index.d.ts +3 -2
  158. package/dist/index.js +44 -6
  159. package/dist/link-page-newsletter-social.d.cts +1 -1
  160. package/dist/link-page-newsletter-social.d.ts +1 -1
  161. package/dist/offer-modal-membership-image.d.cts +1 -1
  162. package/dist/offer-modal-membership-image.d.ts +1 -1
  163. package/dist/offer-modal-newsletter-discount.d.cts +1 -1
  164. package/dist/offer-modal-newsletter-discount.d.ts +1 -1
  165. package/dist/offer-modal-sheet-newsletter.d.cts +1 -1
  166. package/dist/offer-modal-sheet-newsletter.d.ts +1 -1
  167. package/dist/registry.cjs +14465 -14767
  168. package/dist/registry.js +12664 -12966
  169. package/dist/resource-list-hero-filter.d.cts +1 -1
  170. package/dist/resource-list-hero-filter.d.ts +1 -1
  171. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.cjs';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.cjs';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-k1_FqqBQ.cjs';
4
4
  import { A as ActionConfig } from './blocks-rgCERYOC.cjs';
5
5
  import '@page-speed/forms/integration';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.js';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.js';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-AwBlQu1a.js';
4
4
  import { A as ActionConfig } from './blocks-ClXAGlHQ.js';
5
5
  import '@page-speed/forms/integration';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.cjs';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.cjs';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-k1_FqqBQ.cjs';
4
4
  import { A as ActionConfig } from './blocks-rgCERYOC.cjs';
5
5
  import '@page-speed/forms/integration';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.js';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.js';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-AwBlQu1a.js';
4
4
  import { A as ActionConfig } from './blocks-ClXAGlHQ.js';
5
5
  import '@page-speed/forms/integration';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.cjs';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.cjs';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-k1_FqqBQ.cjs';
4
4
  import { A as ActionConfig } from './blocks-rgCERYOC.cjs';
5
5
  import '@page-speed/forms/integration';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.js';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.js';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-AwBlQu1a.js';
4
4
  import { A as ActionConfig } from './blocks-ClXAGlHQ.js';
5
5
  import '@page-speed/forms/integration';
@@ -8,7 +8,6 @@ var tailwindMerge = require('tailwind-merge');
8
8
  var classVarianceAuthority = require('class-variance-authority');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var inputs = require('@page-speed/forms/inputs');
11
- var LabelPrimitive = require('@radix-ui/react-label');
12
11
  var AccordionPrimitive = require('@radix-ui/react-accordion');
13
12
  var integration = require('@page-speed/forms/integration');
14
13
 
@@ -31,7 +30,6 @@ function _interopNamespace(e) {
31
30
  }
32
31
 
33
32
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
34
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
35
33
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
36
34
 
37
35
  // components/blocks/contact/contact-faq.tsx
@@ -381,6 +379,7 @@ var Pressable = React__namespace.forwardRef(
381
379
  rel,
382
380
  linkType,
383
381
  isInternal,
382
+ isExternal,
384
383
  handleClick
385
384
  } = navigation;
386
385
  const shouldRenderLink = normalizedHref && linkType !== "none";
@@ -479,22 +478,6 @@ function CardContent({ className, ...props }) {
479
478
  }
480
479
  );
481
480
  }
482
- function Label({
483
- className,
484
- ...props
485
- }) {
486
- return /* @__PURE__ */ jsxRuntime.jsx(
487
- LabelPrimitive__namespace.Root,
488
- {
489
- "data-slot": "label",
490
- className: cn(
491
- "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
492
- className
493
- ),
494
- ...props
495
- }
496
- );
497
- }
498
481
  function DynamicFormField({
499
482
  field,
500
483
  className,
@@ -503,190 +486,199 @@ function DynamicFormField({
503
486
  onFileRemove,
504
487
  isUploading = false
505
488
  }) {
506
- const fieldId = `field-${field.name}`;
507
- return /* @__PURE__ */ jsxRuntime.jsx(forms.Field, { name: field.name, children: ({ field: formField, meta }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", className), children: [
508
- field.type !== "checkbox" && /* @__PURE__ */ jsxRuntime.jsxs(Label, { htmlFor: fieldId, children: [
509
- field.label,
510
- field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
511
- ] }),
512
- (field.type === "text" || field.type === "email" || field.type === "tel" || field.type === "search" || field.type === "password" || field.type === "url") && /* @__PURE__ */ jsxRuntime.jsx(
513
- inputs.TextInput,
514
- {
515
- ...formField,
516
- id: fieldId,
517
- type: field.type,
518
- placeholder: field.placeholder,
519
- error: meta.touched && !!meta.error,
520
- disabled: field.disabled,
521
- "aria-label": field.label
522
- }
523
- ),
524
- field.type === "number" && /* @__PURE__ */ jsxRuntime.jsx(
525
- inputs.TextInput,
526
- {
527
- ...formField,
528
- id: fieldId,
529
- type: "text",
530
- placeholder: field.placeholder,
531
- error: meta.touched && !!meta.error,
532
- disabled: field.disabled,
533
- "aria-label": field.label
534
- }
535
- ),
536
- field.type === "textarea" && /* @__PURE__ */ jsxRuntime.jsx(
537
- inputs.TextArea,
538
- {
539
- ...formField,
540
- id: fieldId,
541
- placeholder: field.placeholder,
542
- rows: field.rows || 4,
543
- error: meta.touched && !!meta.error,
544
- disabled: field.disabled,
545
- "aria-label": field.label
546
- }
547
- ),
548
- field.type === "select" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
549
- inputs.Select,
550
- {
551
- ...formField,
552
- id: fieldId,
553
- options: field.options,
554
- placeholder: field.placeholder || `Select ${field.label.toLowerCase()}`,
555
- error: meta.touched && !!meta.error,
556
- disabled: field.disabled,
557
- "aria-label": field.label
558
- }
559
- ),
560
- field.type === "multi-select" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
561
- inputs.Select,
562
- {
563
- ...formField,
564
- id: fieldId,
565
- options: field.options,
566
- placeholder: field.placeholder || `Select ${field.label.toLowerCase()}`,
567
- error: meta.touched && !!meta.error,
568
- disabled: field.disabled,
569
- "aria-label": field.label,
570
- multiple: true
571
- }
572
- ),
573
- field.type === "radio" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
574
- inputs.Radio,
575
- {
576
- ...formField,
577
- id: fieldId,
578
- options: field.options,
579
- disabled: field.disabled,
580
- layout: field.layout || "stacked",
581
- error: meta.touched && !!meta.error,
582
- "aria-label": field.label
583
- }
584
- ),
585
- field.type === "checkbox" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start space-x-2", children: [
586
- /* @__PURE__ */ jsxRuntime.jsx(
587
- inputs.Checkbox,
588
- {
589
- ...formField,
590
- id: fieldId,
591
- value: formField.value === true || formField.value === "true",
592
- onChange: (checked) => formField.onChange(checked),
593
- disabled: field.disabled,
594
- error: meta.touched && !!meta.error,
595
- "aria-label": field.label
596
- }
597
- ),
598
- /* @__PURE__ */ jsxRuntime.jsxs(
599
- Label,
600
- {
601
- htmlFor: fieldId,
602
- className: "font-normal cursor-pointer leading-relaxed",
603
- children: [
604
- field.label,
605
- field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" })
606
- ]
607
- }
608
- )
609
- ] }),
610
- field.type === "checkbox-group" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
611
- inputs.CheckboxGroup,
612
- {
613
- ...formField,
614
- id: fieldId,
615
- options: field.options,
616
- disabled: field.disabled,
617
- layout: field.layout || "stacked",
618
- error: meta.touched && !!meta.error,
619
- "aria-label": field.label
620
- }
621
- ),
622
- (field.type === "date-picker" || field.type === "date") && /* @__PURE__ */ jsxRuntime.jsx(
623
- inputs.DatePicker,
624
- {
625
- ...formField,
626
- id: fieldId,
627
- placeholder: field.placeholder,
628
- error: meta.touched && !!meta.error,
629
- disabled: field.disabled,
630
- "aria-label": field.label
631
- }
632
- ),
633
- field.type === "date-range" && /* @__PURE__ */ jsxRuntime.jsx(
634
- inputs.DateRangePicker,
635
- {
636
- ...formField,
637
- id: fieldId,
638
- error: meta.touched && !!meta.error,
639
- disabled: field.disabled,
640
- "aria-label": field.label
641
- }
642
- ),
643
- field.type === "time" && /* @__PURE__ */ jsxRuntime.jsx(
644
- inputs.TimePicker,
645
- {
646
- ...formField,
647
- id: fieldId,
648
- placeholder: field.placeholder,
649
- error: meta.touched && !!meta.error,
650
- disabled: field.disabled,
651
- "aria-label": field.label
652
- }
653
- ),
654
- field.type === "file" && /* @__PURE__ */ jsxRuntime.jsx(
655
- inputs.FileInput,
656
- {
657
- ...formField,
658
- id: fieldId,
659
- accept: field.accept,
660
- maxSize: field.maxSize || 5 * 1024 * 1024,
661
- maxFiles: field.maxFiles || 1,
662
- multiple: field.multiple || false,
663
- placeholder: field.placeholder || "Choose file(s)...",
664
- error: meta.touched && !!meta.error,
665
- disabled: field.disabled || isUploading,
666
- showProgress: true,
667
- uploadProgress,
668
- onChange: (files) => {
669
- formField.onChange(files);
670
- if (files.length > 0 && onFileUpload) {
671
- onFileUpload(files);
489
+ const fieldId = field.name;
490
+ const usesGroupLegend = field.type === "radio" || field.type === "checkbox-group";
491
+ const usesInlineCheckboxLabel = field.type === "checkbox";
492
+ const shouldRenderFieldLabel = !usesGroupLegend && !usesInlineCheckboxLabel;
493
+ const checkboxLabel = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
494
+ field.label,
495
+ field.required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive ml-1", children: "*" }) : null
496
+ ] });
497
+ return /* @__PURE__ */ jsxRuntime.jsx(
498
+ forms.Field,
499
+ {
500
+ name: field.name,
501
+ label: shouldRenderFieldLabel ? field.label : void 0,
502
+ description: shouldRenderFieldLabel ? field.description : void 0,
503
+ required: field.required,
504
+ className: cn("space-y-2", className),
505
+ children: ({ field: formField, meta }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
506
+ (field.type === "text" || field.type === "email" || field.type === "tel" || field.type === "search" || field.type === "password" || field.type === "url") && /* @__PURE__ */ jsxRuntime.jsx(
507
+ inputs.TextInput,
508
+ {
509
+ ...formField,
510
+ id: fieldId,
511
+ type: field.type,
512
+ placeholder: field.placeholder,
513
+ error: meta.touched && !!meta.error,
514
+ disabled: field.disabled,
515
+ "aria-label": field.label
672
516
  }
673
- },
674
- onFileRemove,
675
- "aria-label": field.label
676
- }
677
- ),
678
- field.type === "rich-text" && /* @__PURE__ */ jsxRuntime.jsx(
679
- inputs.RichTextEditor,
680
- {
681
- ...formField,
682
- id: fieldId,
683
- placeholder: field.placeholder,
684
- error: meta.touched && !!meta.error,
685
- disabled: field.disabled,
686
- "aria-label": field.label
687
- }
688
- )
689
- ] }) });
517
+ ),
518
+ field.type === "number" && /* @__PURE__ */ jsxRuntime.jsx(
519
+ inputs.TextInput,
520
+ {
521
+ ...formField,
522
+ id: fieldId,
523
+ type: "text",
524
+ placeholder: field.placeholder,
525
+ error: meta.touched && !!meta.error,
526
+ disabled: field.disabled,
527
+ "aria-label": field.label
528
+ }
529
+ ),
530
+ field.type === "textarea" && /* @__PURE__ */ jsxRuntime.jsx(
531
+ inputs.TextArea,
532
+ {
533
+ ...formField,
534
+ id: fieldId,
535
+ placeholder: field.placeholder,
536
+ rows: field.rows || 4,
537
+ error: meta.touched && !!meta.error,
538
+ disabled: field.disabled,
539
+ "aria-label": field.label
540
+ }
541
+ ),
542
+ field.type === "select" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
543
+ inputs.Select,
544
+ {
545
+ ...formField,
546
+ id: fieldId,
547
+ options: field.options,
548
+ placeholder: field.placeholder || `Select ${field.label.toLowerCase()}`,
549
+ error: meta.touched && !!meta.error,
550
+ disabled: field.disabled,
551
+ "aria-label": field.label
552
+ }
553
+ ),
554
+ field.type === "multi-select" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
555
+ inputs.MultiSelect,
556
+ {
557
+ ...formField,
558
+ id: fieldId,
559
+ options: field.options,
560
+ placeholder: field.placeholder || `Select ${field.label.toLowerCase()}`,
561
+ error: meta.touched && !!meta.error,
562
+ disabled: field.disabled,
563
+ "aria-label": field.label
564
+ }
565
+ ),
566
+ field.type === "radio" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
567
+ inputs.Radio,
568
+ {
569
+ ...formField,
570
+ id: fieldId,
571
+ options: field.options,
572
+ label: field.label,
573
+ description: field.description,
574
+ required: field.required,
575
+ disabled: field.disabled,
576
+ layout: field.layout || "stacked",
577
+ error: meta.touched && !!meta.error,
578
+ "aria-label": field.label
579
+ }
580
+ ),
581
+ field.type === "checkbox" && /* @__PURE__ */ jsxRuntime.jsx(
582
+ inputs.Checkbox,
583
+ {
584
+ ...formField,
585
+ id: fieldId,
586
+ value: formField.value === true || formField.value === "true",
587
+ onChange: (checked) => formField.onChange(checked),
588
+ label: checkboxLabel,
589
+ description: field.description,
590
+ disabled: field.disabled,
591
+ required: field.required,
592
+ error: meta.touched && !!meta.error,
593
+ "aria-label": field.label
594
+ }
595
+ ),
596
+ field.type === "checkbox-group" && field.options && /* @__PURE__ */ jsxRuntime.jsx(
597
+ inputs.CheckboxGroup,
598
+ {
599
+ ...formField,
600
+ id: fieldId,
601
+ options: field.options,
602
+ label: field.label,
603
+ description: field.description,
604
+ required: field.required,
605
+ disabled: field.disabled,
606
+ layout: field.layout || "stacked",
607
+ error: meta.touched && !!meta.error,
608
+ "aria-label": field.label
609
+ }
610
+ ),
611
+ (field.type === "date-picker" || field.type === "date") && /* @__PURE__ */ jsxRuntime.jsx(
612
+ inputs.DatePicker,
613
+ {
614
+ ...formField,
615
+ id: fieldId,
616
+ placeholder: field.placeholder,
617
+ error: meta.touched && !!meta.error,
618
+ disabled: field.disabled,
619
+ "aria-label": field.label
620
+ }
621
+ ),
622
+ field.type === "date-range" && /* @__PURE__ */ jsxRuntime.jsx(
623
+ inputs.DateRangePicker,
624
+ {
625
+ ...formField,
626
+ id: fieldId,
627
+ placeholder: field.placeholder,
628
+ error: meta.touched && !!meta.error,
629
+ disabled: field.disabled,
630
+ "aria-label": field.label
631
+ }
632
+ ),
633
+ field.type === "time" && /* @__PURE__ */ jsxRuntime.jsx(
634
+ inputs.TimePicker,
635
+ {
636
+ ...formField,
637
+ id: fieldId,
638
+ placeholder: field.placeholder,
639
+ error: meta.touched && !!meta.error,
640
+ disabled: field.disabled,
641
+ "aria-label": field.label
642
+ }
643
+ ),
644
+ field.type === "file" && /* @__PURE__ */ jsxRuntime.jsx(
645
+ inputs.FileInput,
646
+ {
647
+ ...formField,
648
+ id: fieldId,
649
+ accept: field.accept,
650
+ maxSize: field.maxSize || 5 * 1024 * 1024,
651
+ maxFiles: field.maxFiles || 1,
652
+ multiple: field.multiple || false,
653
+ placeholder: field.placeholder || "Choose file(s)...",
654
+ error: meta.touched && !!meta.error,
655
+ disabled: field.disabled || isUploading,
656
+ showProgress: true,
657
+ uploadProgress,
658
+ onChange: (files) => {
659
+ formField.onChange(files);
660
+ if (files.length > 0 && onFileUpload) {
661
+ onFileUpload(files);
662
+ }
663
+ },
664
+ onFileRemove,
665
+ "aria-label": field.label
666
+ }
667
+ ),
668
+ field.type === "rich-text" && /* @__PURE__ */ jsxRuntime.jsx(
669
+ inputs.RichTextEditor,
670
+ {
671
+ ...formField,
672
+ id: fieldId,
673
+ placeholder: field.placeholder,
674
+ error: meta.touched && !!meta.error,
675
+ disabled: field.disabled,
676
+ "aria-label": field.label
677
+ }
678
+ )
679
+ ] })
680
+ }
681
+ );
690
682
  }
691
683
  var svgCache = /* @__PURE__ */ new Map();
692
684
  function DynamicIcon({
@@ -985,8 +977,36 @@ function useContactForm(options) {
985
977
  resetOnSuccess = true,
986
978
  uploadTokens = []
987
979
  } = options;
988
- const [isSubmitted, setIsSubmitted] = React.useState(false);
989
980
  const [submissionError, setSubmissionError] = React.useState(null);
981
+ const submissionConfig = formConfig?.submissionConfig;
982
+ const redirectUrl = submissionConfig?.redirectUrl;
983
+ const redirectNavigation = useNavigation({ href: redirectUrl });
984
+ const resetSubmissionState = React.useCallback(() => {
985
+ setSubmissionError(null);
986
+ }, []);
987
+ const performRedirect = React.useCallback(() => {
988
+ if (!redirectUrl || typeof window === "undefined") {
989
+ return;
990
+ }
991
+ const navigate = () => {
992
+ if (redirectNavigation.shouldUseRouter && redirectNavigation.normalizedHref) {
993
+ const handler = window.__opensiteNavigationHandler;
994
+ if (typeof handler === "function") {
995
+ try {
996
+ const handled = handler(redirectNavigation.normalizedHref, void 0);
997
+ if (handled !== false) {
998
+ return;
999
+ }
1000
+ } catch (error) {
1001
+ console.error("Internal redirect handler failed:", error);
1002
+ }
1003
+ }
1004
+ }
1005
+ const destination = redirectNavigation.normalizedHref || redirectUrl;
1006
+ window.location.assign(destination);
1007
+ };
1008
+ window.setTimeout(navigate, 150);
1009
+ }, [redirectNavigation, redirectUrl]);
990
1010
  const form = forms.useForm({
991
1011
  initialValues: React.useMemo(
992
1012
  () => generateInitialValues(formFields),
@@ -997,7 +1017,7 @@ function useContactForm(options) {
997
1017
  [formFields]
998
1018
  ),
999
1019
  onSubmit: async (values, helpers) => {
1000
- setSubmissionError(null);
1020
+ resetSubmissionState();
1001
1021
  const shouldAutoSubmit = Boolean(formConfig?.endpoint);
1002
1022
  if (!shouldAutoSubmit && !onSubmit) {
1003
1023
  return;
@@ -1017,12 +1037,21 @@ function useContactForm(options) {
1017
1037
  await onSubmit(submissionValues);
1018
1038
  }
1019
1039
  if (shouldAutoSubmit || onSubmit) {
1020
- setIsSubmitted(true);
1040
+ try {
1041
+ await submissionConfig?.handleFormSubmission?.({
1042
+ formData: submissionValues,
1043
+ responseData: result
1044
+ });
1045
+ } catch (callbackError) {
1046
+ console.error("handleFormSubmission callback failed:", callbackError);
1047
+ }
1021
1048
  if (resetOnSuccess) {
1022
1049
  helpers.resetForm();
1023
1050
  }
1024
1051
  onSuccess?.(result);
1025
- setTimeout(() => setIsSubmitted(false), 1e4);
1052
+ if (submissionConfig?.behavior === "redirect" && submissionConfig.redirectUrl) {
1053
+ performRedirect();
1054
+ }
1026
1055
  }
1027
1056
  } catch (error) {
1028
1057
  if (error instanceof PageSpeedFormSubmissionError && error.formErrors) {
@@ -1037,9 +1066,10 @@ function useContactForm(options) {
1037
1066
  const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
1038
1067
  return {
1039
1068
  form,
1040
- isSubmitted,
1069
+ isSubmitted: form.status === "success",
1041
1070
  submissionError,
1042
- formMethod
1071
+ formMethod,
1072
+ resetSubmissionState
1043
1073
  };
1044
1074
  }
1045
1075
 
@@ -1534,38 +1564,6 @@ var Section = React__namespace.default.forwardRef(
1534
1564
  }
1535
1565
  );
1536
1566
  Section.displayName = "Section";
1537
- var FormFeedback = ({
1538
- isSubmitted,
1539
- successMessageClassName,
1540
- successMessage,
1541
- submissionError,
1542
- errorMessageClassName
1543
- }) => {
1544
- if (!isSubmitted && !submissionError) return null;
1545
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1546
- isSubmitted && !submissionError && /* @__PURE__ */ jsxRuntime.jsx(
1547
- "div",
1548
- {
1549
- className: cn(
1550
- "mb-6 p-4 bg-primary/10 border border-primary rounded-md",
1551
- successMessageClassName
1552
- ),
1553
- children: typeof successMessage === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-primary-foreground/90 text-center", children: successMessage }) : successMessage
1554
- }
1555
- ),
1556
- submissionError && /* @__PURE__ */ jsxRuntime.jsx(
1557
- "div",
1558
- {
1559
- className: cn(
1560
- "mb-6 p-4 bg-destructive/10 border border-destructive rounded-md",
1561
- errorMessageClassName
1562
- ),
1563
- children: typeof submissionError === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive text-center", children: submissionError }) : submissionError
1564
- }
1565
- )
1566
- ] });
1567
- };
1568
- var form_feedback_default = FormFeedback;
1569
1567
  var DEFAULT_FORM_FIELDS = [
1570
1568
  {
1571
1569
  name: "name",
@@ -1650,7 +1648,7 @@ function ContactFaq({
1650
1648
  removeFile,
1651
1649
  resetUpload
1652
1650
  } = useFileUpload({ onError });
1653
- const { form, isSubmitted, submissionError, formMethod } = useContactForm({
1651
+ const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
1654
1652
  formFields,
1655
1653
  formConfig,
1656
1654
  onSubmit,
@@ -1786,22 +1784,21 @@ function ContactFaq({
1786
1784
  children: formHeading
1787
1785
  }
1788
1786
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: formHeadingClassName, children: formHeading })),
1789
- /* @__PURE__ */ jsxRuntime.jsx(
1790
- form_feedback_default,
1791
- {
1792
- isSubmitted,
1793
- successMessageClassName,
1794
- successMessage,
1795
- submissionError,
1796
- errorMessageClassName
1797
- }
1798
- ),
1799
1787
  /* @__PURE__ */ jsxRuntime.jsxs(
1800
1788
  forms.Form,
1801
1789
  {
1802
1790
  form,
1803
1791
  action: formConfig?.endpoint,
1804
1792
  method: formMethod,
1793
+ submissionError,
1794
+ successMessage,
1795
+ successMessageClassName,
1796
+ errorMessageClassName,
1797
+ submissionConfig: formConfig?.submissionConfig,
1798
+ onNewSubmission: () => {
1799
+ resetUpload();
1800
+ resetSubmissionState();
1801
+ },
1805
1802
  className: cn("space-y-4", formClassName),
1806
1803
  children: [
1807
1804
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.cjs';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.cjs';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-k1_FqqBQ.cjs';
4
4
  import { F as FormFieldConfig } from './form-field-types-flMXhIjG.cjs';
5
5
  import { A as ActionConfig } from './blocks-rgCERYOC.cjs';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { P as PageSpeedFormConfig } from './forms-nGgHUTBw.js';
2
+ import { P as PageSpeedFormConfig } from './forms-CStlFhnh.js';
3
3
  import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-AwBlQu1a.js';
4
4
  import { F as FormFieldConfig } from './form-field-types-flMXhIjG.js';
5
5
  import { A as ActionConfig } from './blocks-ClXAGlHQ.js';