@opensite/ui 2.1.9 → 2.2.1

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,57 +1,113 @@
1
1
  import * as React from 'react';
2
- import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
2
+ import { FormEngineProps } from '@page-speed/forms/integration';
3
3
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bz_A5vLU.cjs';
4
- import { A as ActionConfig } from './blocks-Cohq4eio.cjs';
4
+ import { O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
5
5
  import 'react/jsx-runtime';
6
6
  import 'class-variance-authority';
7
7
  import './button-variants-lRElsmTc.cjs';
8
8
  import 'class-variance-authority/types';
9
9
 
10
+ /**
11
+ * Configuration for a contact overlay item displayed over the image.
12
+ */
13
+ interface ContactOverlayItem {
14
+ /**
15
+ * Icon name for DynamicIcon (e.g., "lucide/phone")
16
+ */
17
+ icon: string;
18
+ /**
19
+ * Eyebrow label above the title (e.g., "PHONE", "EMAIL")
20
+ */
21
+ label: string;
22
+ /**
23
+ * Main title text (e.g., phone number, email address)
24
+ */
25
+ title: string;
26
+ /**
27
+ * Optional description text
28
+ */
29
+ description?: string;
30
+ /**
31
+ * Optional link URL (e.g., "tel:+15551234567", "mailto:support@example.com")
32
+ */
33
+ href?: string;
34
+ /**
35
+ * Additional CSS classes for the item container
36
+ */
37
+ className?: string;
38
+ }
10
39
  interface ContactImageProps {
11
- /** Main heading text */
40
+ /**
41
+ * Eyebrow label above the heading
42
+ */
43
+ eyebrow?: React.ReactNode;
44
+ /**
45
+ * Main heading text
46
+ */
12
47
  heading?: React.ReactNode;
13
- /** Description text below heading */
48
+ /**
49
+ * Description text below heading
50
+ */
14
51
  description?: React.ReactNode;
15
- /** Submit button text */
52
+ /**
53
+ * Submit button text
54
+ */
16
55
  buttonText?: string;
17
- /** Icon to display in submit button */
56
+ /**
57
+ * Icon to display in submit button
58
+ */
18
59
  buttonIcon?: React.ReactNode;
19
- /** Array of action configurations for custom buttons */
20
- actions?: ActionConfig[];
21
- /** Custom slot for rendering actions (overrides actions array) */
22
- actionsSlot?: React.ReactNode;
23
60
  /**
24
- * Array of form field configurations
25
- * If not provided, defaults to: first_name, last_name, email, phone, message
61
+ * Image configuration for the left panel
62
+ */
63
+ image?: {
64
+ src: string;
65
+ alt: string;
66
+ };
67
+ /**
68
+ * Contact overlay items displayed over the image
69
+ */
70
+ contactOverlays?: ContactOverlayItem[];
71
+ /**
72
+ * Custom slot for rendering contact overlays (overrides contactOverlays array)
26
73
  */
27
- formFields?: FormFieldConfig[];
74
+ contactOverlaysSlot?: React.ReactNode;
28
75
  /**
29
- * Success message to display after form submission
30
- * @default "Thank you! Your message has been sent successfully."
76
+ * Full form engine setup and props
77
+ */
78
+ formEngineSetup?: FormEngineProps;
79
+ /**
80
+ * Additional CSS classes for the section
31
81
  */
32
- successMessage?: React.ReactNode;
33
- /** Additional CSS classes for the section */
34
82
  className?: string;
35
- /** Additional CSS classes for the container */
83
+ /**
84
+ * Additional CSS classes for the container
85
+ */
36
86
  containerClassName?: string;
37
- /** Additional CSS classes for the header */
38
- headerClassName?: string;
39
- /** Additional CSS classes for the heading */
87
+ /**
88
+ * Additional CSS classes for the content grid
89
+ */
90
+ contentClassName?: string;
91
+ /**
92
+ * Additional CSS classes for the eyebrow text
93
+ */
94
+ eyebrowClassName?: string;
95
+ /**
96
+ * Additional CSS classes for the heading
97
+ */
40
98
  headingClassName?: string;
41
- /** Additional CSS classes for the description */
99
+ /**
100
+ * Additional CSS classes for the description
101
+ */
42
102
  descriptionClassName?: string;
43
- /** Additional CSS classes for the card */
44
- cardClassName?: string;
45
- /** Additional CSS classes for the card content */
46
- cardContentClassName?: string;
47
- /** Additional CSS classes for the form */
48
- formClassName?: string;
49
- /** Additional CSS classes for the submit button */
50
- submitClassName?: string;
51
- /** Additional CSS classes for the success message */
52
- successMessageClassName?: string;
53
- /** Additional CSS classes for the error message */
54
- errorMessageClassName?: string;
103
+ /**
104
+ * Additional CSS classes for the image
105
+ */
106
+ imageClassName?: string;
107
+ /**
108
+ * Additional CSS classes for the contact overlays container
109
+ */
110
+ contactOverlaysClassName?: string;
55
111
  /**
56
112
  * Background style for the section
57
113
  */
@@ -68,41 +124,30 @@ interface ContactImageProps {
68
124
  * Pattern overlay opacity (0-1)
69
125
  */
70
126
  patternOpacity?: number;
71
- /** Form configuration for PageSpeed forms */
72
- formConfig?: PageSpeedFormConfig;
73
- /** Custom submit handler */
74
- onSubmit?: (values: Record<string, any>) => void | Promise<void>;
75
- /** Success callback */
76
- onSuccess?: (data: unknown) => void;
77
- /** Error callback */
78
- onError?: (error: Error) => void;
79
- /**
80
- * Additional CSS classes for the content container
81
- */
82
- contentClassName?: string;
83
- /**
84
- * Background image URL
85
- */
86
- backgroundImage?: string;
87
127
  /**
88
128
  * Optional Optix Flow configuration for image optimization
89
129
  */
90
- optixFlowConfig?: {
91
- apiKey: string;
92
- compression?: number;
93
- };
130
+ optixFlowConfig?: OptixFlowConfig;
94
131
  }
95
132
  /**
96
- * ContactImage - Contact form with flexible field configuration
133
+ * ContactImage - Split-layout contact form with image panel and overlay contact items.
134
+ * Features a large image on the left with contact info overlays and form on the right.
97
135
  *
98
136
  * @example
99
137
  * ```tsx
100
138
  * <ContactImage
101
- * heading="Get in Touch"
102
- * formConfig={{ endpoint: "/api/contact", format: "json" }}
139
+ * eyebrow="Get in Touch"
140
+ * heading="Contact Us"
141
+ * description="We'd love to hear from you."
142
+ * image={{ src: "/office.jpg", alt: "Our office" }}
143
+ * contactOverlays={[
144
+ * { icon: "lucide/phone", label: "Phone", title: "+1 (555) 987-6543" },
145
+ * { icon: "lucide/mail", label: "Email", title: "support@example.com" },
146
+ * ]}
147
+ * formEngineSetup={{ formConfig: { endpoint: "/api/contact", format: "json" } }}
103
148
  * />
104
149
  * ```
105
150
  */
106
- declare function ContactImage({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, backgroundImage, background, optixFlowConfig, spacing, className, containerClassName, contentClassName, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactImageProps): React.JSX.Element;
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;
107
152
 
108
- export { ContactImage, type ContactImageProps };
153
+ export { ContactImage, type ContactImageProps, type ContactOverlayItem };
@@ -1,57 +1,113 @@
1
1
  import * as React from 'react';
2
- import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
2
+ import { FormEngineProps } from '@page-speed/forms/integration';
3
3
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bi_ClKrO.js';
4
- import { A as ActionConfig } from './blocks-k17uluAz.js';
4
+ import { O as OptixFlowConfig } from './blocks-k17uluAz.js';
5
5
  import 'react/jsx-runtime';
6
6
  import 'class-variance-authority';
7
7
  import './button-variants-lRElsmTc.js';
8
8
  import 'class-variance-authority/types';
9
9
 
10
+ /**
11
+ * Configuration for a contact overlay item displayed over the image.
12
+ */
13
+ interface ContactOverlayItem {
14
+ /**
15
+ * Icon name for DynamicIcon (e.g., "lucide/phone")
16
+ */
17
+ icon: string;
18
+ /**
19
+ * Eyebrow label above the title (e.g., "PHONE", "EMAIL")
20
+ */
21
+ label: string;
22
+ /**
23
+ * Main title text (e.g., phone number, email address)
24
+ */
25
+ title: string;
26
+ /**
27
+ * Optional description text
28
+ */
29
+ description?: string;
30
+ /**
31
+ * Optional link URL (e.g., "tel:+15551234567", "mailto:support@example.com")
32
+ */
33
+ href?: string;
34
+ /**
35
+ * Additional CSS classes for the item container
36
+ */
37
+ className?: string;
38
+ }
10
39
  interface ContactImageProps {
11
- /** Main heading text */
40
+ /**
41
+ * Eyebrow label above the heading
42
+ */
43
+ eyebrow?: React.ReactNode;
44
+ /**
45
+ * Main heading text
46
+ */
12
47
  heading?: React.ReactNode;
13
- /** Description text below heading */
48
+ /**
49
+ * Description text below heading
50
+ */
14
51
  description?: React.ReactNode;
15
- /** Submit button text */
52
+ /**
53
+ * Submit button text
54
+ */
16
55
  buttonText?: string;
17
- /** Icon to display in submit button */
56
+ /**
57
+ * Icon to display in submit button
58
+ */
18
59
  buttonIcon?: React.ReactNode;
19
- /** Array of action configurations for custom buttons */
20
- actions?: ActionConfig[];
21
- /** Custom slot for rendering actions (overrides actions array) */
22
- actionsSlot?: React.ReactNode;
23
60
  /**
24
- * Array of form field configurations
25
- * If not provided, defaults to: first_name, last_name, email, phone, message
61
+ * Image configuration for the left panel
62
+ */
63
+ image?: {
64
+ src: string;
65
+ alt: string;
66
+ };
67
+ /**
68
+ * Contact overlay items displayed over the image
69
+ */
70
+ contactOverlays?: ContactOverlayItem[];
71
+ /**
72
+ * Custom slot for rendering contact overlays (overrides contactOverlays array)
26
73
  */
27
- formFields?: FormFieldConfig[];
74
+ contactOverlaysSlot?: React.ReactNode;
28
75
  /**
29
- * Success message to display after form submission
30
- * @default "Thank you! Your message has been sent successfully."
76
+ * Full form engine setup and props
77
+ */
78
+ formEngineSetup?: FormEngineProps;
79
+ /**
80
+ * Additional CSS classes for the section
31
81
  */
32
- successMessage?: React.ReactNode;
33
- /** Additional CSS classes for the section */
34
82
  className?: string;
35
- /** Additional CSS classes for the container */
83
+ /**
84
+ * Additional CSS classes for the container
85
+ */
36
86
  containerClassName?: string;
37
- /** Additional CSS classes for the header */
38
- headerClassName?: string;
39
- /** Additional CSS classes for the heading */
87
+ /**
88
+ * Additional CSS classes for the content grid
89
+ */
90
+ contentClassName?: string;
91
+ /**
92
+ * Additional CSS classes for the eyebrow text
93
+ */
94
+ eyebrowClassName?: string;
95
+ /**
96
+ * Additional CSS classes for the heading
97
+ */
40
98
  headingClassName?: string;
41
- /** Additional CSS classes for the description */
99
+ /**
100
+ * Additional CSS classes for the description
101
+ */
42
102
  descriptionClassName?: string;
43
- /** Additional CSS classes for the card */
44
- cardClassName?: string;
45
- /** Additional CSS classes for the card content */
46
- cardContentClassName?: string;
47
- /** Additional CSS classes for the form */
48
- formClassName?: string;
49
- /** Additional CSS classes for the submit button */
50
- submitClassName?: string;
51
- /** Additional CSS classes for the success message */
52
- successMessageClassName?: string;
53
- /** Additional CSS classes for the error message */
54
- errorMessageClassName?: string;
103
+ /**
104
+ * Additional CSS classes for the image
105
+ */
106
+ imageClassName?: string;
107
+ /**
108
+ * Additional CSS classes for the contact overlays container
109
+ */
110
+ contactOverlaysClassName?: string;
55
111
  /**
56
112
  * Background style for the section
57
113
  */
@@ -68,41 +124,30 @@ interface ContactImageProps {
68
124
  * Pattern overlay opacity (0-1)
69
125
  */
70
126
  patternOpacity?: number;
71
- /** Form configuration for PageSpeed forms */
72
- formConfig?: PageSpeedFormConfig;
73
- /** Custom submit handler */
74
- onSubmit?: (values: Record<string, any>) => void | Promise<void>;
75
- /** Success callback */
76
- onSuccess?: (data: unknown) => void;
77
- /** Error callback */
78
- onError?: (error: Error) => void;
79
- /**
80
- * Additional CSS classes for the content container
81
- */
82
- contentClassName?: string;
83
- /**
84
- * Background image URL
85
- */
86
- backgroundImage?: string;
87
127
  /**
88
128
  * Optional Optix Flow configuration for image optimization
89
129
  */
90
- optixFlowConfig?: {
91
- apiKey: string;
92
- compression?: number;
93
- };
130
+ optixFlowConfig?: OptixFlowConfig;
94
131
  }
95
132
  /**
96
- * ContactImage - Contact form with flexible field configuration
133
+ * ContactImage - Split-layout contact form with image panel and overlay contact items.
134
+ * Features a large image on the left with contact info overlays and form on the right.
97
135
  *
98
136
  * @example
99
137
  * ```tsx
100
138
  * <ContactImage
101
- * heading="Get in Touch"
102
- * formConfig={{ endpoint: "/api/contact", format: "json" }}
139
+ * eyebrow="Get in Touch"
140
+ * heading="Contact Us"
141
+ * description="We'd love to hear from you."
142
+ * image={{ src: "/office.jpg", alt: "Our office" }}
143
+ * contactOverlays={[
144
+ * { icon: "lucide/phone", label: "Phone", title: "+1 (555) 987-6543" },
145
+ * { icon: "lucide/mail", label: "Email", title: "support@example.com" },
146
+ * ]}
147
+ * formEngineSetup={{ formConfig: { endpoint: "/api/contact", format: "json" } }}
103
148
  * />
104
149
  * ```
105
150
  */
106
- declare function ContactImage({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, backgroundImage, background, optixFlowConfig, spacing, className, containerClassName, contentClassName, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactImageProps): React.JSX.Element;
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;
107
152
 
108
- export { ContactImage, type ContactImageProps };
153
+ export { ContactImage, type ContactImageProps, type ContactOverlayItem };