@opensite/ui 1.7.5 → 1.7.6

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,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { F as FormFieldConfig } from './form-field-types-BYdJNOsW.cjs';
2
3
  import { P as PageSpeedFormConfig } from './forms-BCcwNFhk.cjs';
3
4
  import { f as SectionBackground, t as PatternName } from './community-initiatives-Bz_A5vLU.cjs';
4
5
  import { A as ActionConfig, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
@@ -11,13 +12,6 @@ interface DirectionConfig {
11
12
  desktop: "mediaRight" | "mediaLeft";
12
13
  mobile: "mediaTop" | "mediaBottom";
13
14
  }
14
- interface ContactPhotographyFormValues {
15
- first_name: string;
16
- last_name: string;
17
- email: string;
18
- phone: string;
19
- message: string;
20
- }
21
15
  interface ContactPhotographyProps {
22
16
  /** Main heading text */
23
17
  heading?: React.ReactNode;
@@ -31,6 +25,21 @@ interface ContactPhotographyProps {
31
25
  actions?: ActionConfig[];
32
26
  /** Custom slot for rendering actions (overrides actions array) */
33
27
  actionsSlot?: React.ReactNode;
28
+ /**
29
+ * Array of form field configurations
30
+ * If not provided, defaults to: first_name, last_name, email, phone, message
31
+ */
32
+ formFields?: FormFieldConfig[];
33
+ /**
34
+ * Success message to display after form submission
35
+ * @default "Thank you! Your message has been sent successfully."
36
+ */
37
+ successMessage?: React.ReactNode;
38
+ /**
39
+ * Error message to display if submission fails
40
+ * @default "There was an error sending your message. Please try again."
41
+ */
42
+ errorMessage?: React.ReactNode;
34
43
  /** Additional CSS classes for the section */
35
44
  className?: string;
36
45
  /** Additional CSS classes for the heading */
@@ -43,6 +52,10 @@ interface ContactPhotographyProps {
43
52
  formClassName?: string;
44
53
  /** Additional CSS classes for the submit button */
45
54
  submitClassName?: string;
55
+ /** Additional CSS classes for the success message */
56
+ successMessageClassName?: string;
57
+ /** Additional CSS classes for the error message */
58
+ errorMessageClassName?: string;
46
59
  /** Section background variant */
47
60
  background?: SectionBackground;
48
61
  /** Pattern background key or URL */
@@ -65,7 +78,7 @@ interface ContactPhotographyProps {
65
78
  /** Form configuration for PageSpeed forms */
66
79
  formConfig?: PageSpeedFormConfig;
67
80
  /** Custom submit handler */
68
- onSubmit?: (values: ContactPhotographyFormValues) => void | Promise<void>;
81
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
69
82
  /** Success callback */
70
83
  onSuccess?: (data: unknown) => void;
71
84
  /** Error callback */
@@ -93,6 +106,6 @@ interface ContactPhotographyProps {
93
106
  * />
94
107
  * ```
95
108
  */
96
- declare function ContactPhotography({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, headingClassName, descriptionClassName, contentClassName, formClassName, submitClassName, background, pattern, patternOpacity, imageSrc, imageAlt, imageClassName, optixFlowConfig, directionConfig, formConfig, onSubmit, onSuccess, onError, }: ContactPhotographyProps): React.JSX.Element;
109
+ declare function ContactPhotography({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, errorMessage, className, headingClassName, descriptionClassName, contentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, background, pattern, patternOpacity, imageSrc, imageAlt, imageClassName, optixFlowConfig, directionConfig, formConfig, onSubmit, onSuccess, onError, }: ContactPhotographyProps): React.JSX.Element;
97
110
 
98
111
  export { ContactPhotography, type ContactPhotographyProps, type DirectionConfig };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { F as FormFieldConfig } from './form-field-types-BYdJNOsW.js';
2
3
  import { P as PageSpeedFormConfig } from './forms-BCcwNFhk.js';
3
4
  import { f as SectionBackground, t as PatternName } from './community-initiatives-Bi_ClKrO.js';
4
5
  import { A as ActionConfig, O as OptixFlowConfig } from './blocks-k17uluAz.js';
@@ -11,13 +12,6 @@ interface DirectionConfig {
11
12
  desktop: "mediaRight" | "mediaLeft";
12
13
  mobile: "mediaTop" | "mediaBottom";
13
14
  }
14
- interface ContactPhotographyFormValues {
15
- first_name: string;
16
- last_name: string;
17
- email: string;
18
- phone: string;
19
- message: string;
20
- }
21
15
  interface ContactPhotographyProps {
22
16
  /** Main heading text */
23
17
  heading?: React.ReactNode;
@@ -31,6 +25,21 @@ interface ContactPhotographyProps {
31
25
  actions?: ActionConfig[];
32
26
  /** Custom slot for rendering actions (overrides actions array) */
33
27
  actionsSlot?: React.ReactNode;
28
+ /**
29
+ * Array of form field configurations
30
+ * If not provided, defaults to: first_name, last_name, email, phone, message
31
+ */
32
+ formFields?: FormFieldConfig[];
33
+ /**
34
+ * Success message to display after form submission
35
+ * @default "Thank you! Your message has been sent successfully."
36
+ */
37
+ successMessage?: React.ReactNode;
38
+ /**
39
+ * Error message to display if submission fails
40
+ * @default "There was an error sending your message. Please try again."
41
+ */
42
+ errorMessage?: React.ReactNode;
34
43
  /** Additional CSS classes for the section */
35
44
  className?: string;
36
45
  /** Additional CSS classes for the heading */
@@ -43,6 +52,10 @@ interface ContactPhotographyProps {
43
52
  formClassName?: string;
44
53
  /** Additional CSS classes for the submit button */
45
54
  submitClassName?: string;
55
+ /** Additional CSS classes for the success message */
56
+ successMessageClassName?: string;
57
+ /** Additional CSS classes for the error message */
58
+ errorMessageClassName?: string;
46
59
  /** Section background variant */
47
60
  background?: SectionBackground;
48
61
  /** Pattern background key or URL */
@@ -65,7 +78,7 @@ interface ContactPhotographyProps {
65
78
  /** Form configuration for PageSpeed forms */
66
79
  formConfig?: PageSpeedFormConfig;
67
80
  /** Custom submit handler */
68
- onSubmit?: (values: ContactPhotographyFormValues) => void | Promise<void>;
81
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
69
82
  /** Success callback */
70
83
  onSuccess?: (data: unknown) => void;
71
84
  /** Error callback */
@@ -93,6 +106,6 @@ interface ContactPhotographyProps {
93
106
  * />
94
107
  * ```
95
108
  */
96
- declare function ContactPhotography({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, headingClassName, descriptionClassName, contentClassName, formClassName, submitClassName, background, pattern, patternOpacity, imageSrc, imageAlt, imageClassName, optixFlowConfig, directionConfig, formConfig, onSubmit, onSuccess, onError, }: ContactPhotographyProps): React.JSX.Element;
109
+ declare function ContactPhotography({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, errorMessage, className, headingClassName, descriptionClassName, contentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, background, pattern, patternOpacity, imageSrc, imageAlt, imageClassName, optixFlowConfig, directionConfig, formConfig, onSubmit, onSuccess, onError, }: ContactPhotographyProps): React.JSX.Element;
97
110
 
98
111
  export { ContactPhotography, type ContactPhotographyProps, type DirectionConfig };