@opensite/ui 1.9.8 → 2.0.0

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 (131) hide show
  1. package/dist/contact-demo.cjs +106 -406
  2. package/dist/contact-demo.d.cts +36 -111
  3. package/dist/contact-demo.d.ts +36 -111
  4. package/dist/contact-demo.js +108 -405
  5. package/dist/contact-emergency.cjs +129 -158
  6. package/dist/contact-emergency.d.cts +23 -12
  7. package/dist/contact-emergency.d.ts +23 -12
  8. package/dist/contact-emergency.js +131 -159
  9. package/dist/contact-event.cjs +106 -147
  10. package/dist/contact-event.d.cts +36 -66
  11. package/dist/contact-event.d.ts +36 -66
  12. package/dist/contact-event.js +108 -148
  13. package/dist/contact-feedback.cjs +109 -102
  14. package/dist/contact-feedback.d.cts +36 -63
  15. package/dist/contact-feedback.d.ts +36 -63
  16. package/dist/contact-feedback.js +111 -103
  17. package/dist/contact-fitness.cjs +107 -148
  18. package/dist/contact-fitness.d.cts +36 -66
  19. package/dist/contact-fitness.d.ts +36 -66
  20. package/dist/contact-fitness.js +109 -149
  21. package/dist/contact-guest.cjs +107 -148
  22. package/dist/contact-guest.d.cts +35 -65
  23. package/dist/contact-guest.d.ts +35 -65
  24. package/dist/contact-guest.js +109 -149
  25. package/dist/contact-image.cjs +108 -149
  26. package/dist/contact-image.d.cts +35 -65
  27. package/dist/contact-image.d.ts +35 -65
  28. package/dist/contact-image.js +110 -150
  29. package/dist/contact-insurance.cjs +107 -148
  30. package/dist/contact-insurance.d.cts +36 -66
  31. package/dist/contact-insurance.d.ts +36 -66
  32. package/dist/contact-insurance.js +109 -149
  33. package/dist/contact-interview.cjs +106 -147
  34. package/dist/contact-interview.d.cts +20 -12
  35. package/dist/contact-interview.d.ts +20 -12
  36. package/dist/contact-interview.js +108 -148
  37. package/dist/contact-locations.cjs +106 -147
  38. package/dist/contact-locations.d.cts +21 -13
  39. package/dist/contact-locations.d.ts +21 -13
  40. package/dist/contact-locations.js +108 -148
  41. package/dist/contact-maintenance.cjs +103 -143
  42. package/dist/contact-maintenance.d.cts +21 -13
  43. package/dist/contact-maintenance.d.ts +21 -13
  44. package/dist/contact-maintenance.js +105 -144
  45. package/dist/contact-map.cjs +103 -143
  46. package/dist/contact-map.d.cts +20 -12
  47. package/dist/contact-map.d.ts +20 -12
  48. package/dist/contact-map.js +105 -144
  49. package/dist/contact-minimal.cjs +126 -242
  50. package/dist/contact-minimal.d.cts +36 -70
  51. package/dist/contact-minimal.d.ts +36 -70
  52. package/dist/contact-minimal.js +128 -243
  53. package/dist/contact-moving.cjs +103 -143
  54. package/dist/contact-moving.d.cts +20 -12
  55. package/dist/contact-moving.d.ts +20 -12
  56. package/dist/contact-moving.js +105 -144
  57. package/dist/contact-multistep.cjs +104 -144
  58. package/dist/contact-multistep.d.cts +21 -13
  59. package/dist/contact-multistep.d.ts +21 -13
  60. package/dist/contact-multistep.js +106 -145
  61. package/dist/contact-partnership.cjs +103 -143
  62. package/dist/contact-partnership.d.cts +19 -11
  63. package/dist/contact-partnership.d.ts +19 -11
  64. package/dist/contact-partnership.js +105 -144
  65. package/dist/contact-press.cjs +144 -150
  66. package/dist/contact-press.d.cts +21 -13
  67. package/dist/contact-press.d.ts +21 -13
  68. package/dist/contact-press.js +146 -151
  69. package/dist/contact-quote.cjs +144 -150
  70. package/dist/contact-quote.d.cts +19 -11
  71. package/dist/contact-quote.d.ts +19 -11
  72. package/dist/contact-quote.js +146 -151
  73. package/dist/contact-referral.cjs +144 -150
  74. package/dist/contact-referral.d.cts +20 -12
  75. package/dist/contact-referral.d.ts +20 -12
  76. package/dist/contact-referral.js +146 -151
  77. package/dist/contact-report.cjs +144 -150
  78. package/dist/contact-report.d.cts +21 -13
  79. package/dist/contact-report.d.ts +21 -13
  80. package/dist/contact-report.js +146 -151
  81. package/dist/contact-reservation.cjs +144 -150
  82. package/dist/contact-reservation.d.cts +20 -12
  83. package/dist/contact-reservation.d.ts +20 -12
  84. package/dist/contact-reservation.js +146 -151
  85. package/dist/contact-retreat.cjs +144 -150
  86. package/dist/contact-retreat.d.cts +21 -13
  87. package/dist/contact-retreat.d.ts +21 -13
  88. package/dist/contact-retreat.js +146 -151
  89. package/dist/contact-rsvp.cjs +144 -150
  90. package/dist/contact-rsvp.d.cts +20 -12
  91. package/dist/contact-rsvp.d.ts +20 -12
  92. package/dist/contact-rsvp.js +146 -151
  93. package/dist/contact-sales.cjs +131 -146
  94. package/dist/contact-sales.d.cts +34 -65
  95. package/dist/contact-sales.d.ts +34 -65
  96. package/dist/contact-sales.js +133 -147
  97. package/dist/contact-schedule.cjs +144 -150
  98. package/dist/contact-schedule.d.cts +20 -12
  99. package/dist/contact-schedule.d.ts +20 -12
  100. package/dist/contact-schedule.js +146 -151
  101. package/dist/contact-sponsorship.cjs +144 -150
  102. package/dist/contact-sponsorship.d.cts +21 -13
  103. package/dist/contact-sponsorship.d.ts +21 -13
  104. package/dist/contact-sponsorship.js +146 -151
  105. package/dist/contact-support.cjs +147 -120
  106. package/dist/contact-support.d.cts +21 -12
  107. package/dist/contact-support.d.ts +21 -12
  108. package/dist/contact-support.js +149 -121
  109. package/dist/contact-tenant.cjs +144 -150
  110. package/dist/contact-tenant.d.cts +20 -12
  111. package/dist/contact-tenant.d.ts +20 -12
  112. package/dist/contact-tenant.js +146 -151
  113. package/dist/contact-vendor.cjs +144 -150
  114. package/dist/contact-vendor.d.cts +20 -12
  115. package/dist/contact-vendor.d.ts +20 -12
  116. package/dist/contact-vendor.js +146 -151
  117. package/dist/contact-volunteer.cjs +144 -150
  118. package/dist/contact-volunteer.d.cts +20 -12
  119. package/dist/contact-volunteer.d.ts +20 -12
  120. package/dist/contact-volunteer.js +146 -151
  121. package/dist/contact-warranty.cjs +144 -150
  122. package/dist/contact-warranty.d.cts +20 -12
  123. package/dist/contact-warranty.d.ts +20 -12
  124. package/dist/contact-warranty.js +146 -151
  125. package/dist/contact-wedding.cjs +144 -150
  126. package/dist/contact-wedding.d.cts +20 -12
  127. package/dist/contact-wedding.d.ts +20 -12
  128. package/dist/contact-wedding.js +146 -151
  129. package/dist/registry.cjs +5791 -5883
  130. package/dist/registry.js +4527 -4619
  131. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PageSpeedFormConfig } from '@page-speed/forms/integration';
2
+ import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
3
3
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bz_A5vLU.cjs';
4
4
  import { A as ActionConfig } from './blocks-Cohq4eio.cjs';
5
5
  import 'react/jsx-runtime';
@@ -7,78 +7,52 @@ import 'class-variance-authority';
7
7
  import './button-variants-lRElsmTc.cjs';
8
8
  import 'class-variance-authority/types';
9
9
 
10
- interface DemoFormValues {
11
- useCase: string;
12
- teamSize: string;
13
- timeline: string;
14
- firstName: string;
15
- lastName: string;
16
- email: string;
17
- company: string;
18
- jobTitle: string;
19
- updates: boolean;
20
- }
21
10
  interface ContactDemoProps {
22
- /**
23
- * Main heading content
24
- */
11
+ /** Main heading text */
25
12
  heading?: React.ReactNode;
26
- /**
27
- * Description text below the heading
28
- */
13
+ /** Description text below heading */
29
14
  description?: React.ReactNode;
30
- /**
31
- * Submit button text
32
- */
15
+ /** Submit button text */
33
16
  buttonText?: string;
34
- /**
35
- * Submit button icon (displayed before text)
36
- */
17
+ /** Icon to display in submit button */
37
18
  buttonIcon?: React.ReactNode;
38
- /**
39
- * Array of action configurations for additional buttons
40
- */
19
+ /** Array of action configurations for custom buttons */
41
20
  actions?: ActionConfig[];
42
- /**
43
- * Custom slot for rendering actions (overrides actions array and default submit)
44
- */
21
+ /** Custom slot for rendering actions (overrides actions array) */
45
22
  actionsSlot?: React.ReactNode;
46
23
  /**
47
- * Additional CSS classes for the section
24
+ * Array of form field configurations
25
+ * If not provided, defaults to: first_name, last_name, email, phone, message
48
26
  */
49
- className?: string;
27
+ formFields?: FormFieldConfig[];
50
28
  /**
51
- * Additional CSS classes for the container
29
+ * Success message to display after form submission
30
+ * @default "Thank you! Your message has been sent successfully."
52
31
  */
32
+ successMessage?: React.ReactNode;
33
+ /** Additional CSS classes for the section */
34
+ className?: string;
35
+ /** Additional CSS classes for the container */
53
36
  containerClassName?: string;
54
- /**
55
- * Additional CSS classes for the header wrapper
56
- */
37
+ /** Additional CSS classes for the header */
57
38
  headerClassName?: string;
58
- /**
59
- * Additional CSS classes for the heading
60
- */
39
+ /** Additional CSS classes for the heading */
61
40
  headingClassName?: string;
62
- /**
63
- * Additional CSS classes for the description
64
- */
41
+ /** Additional CSS classes for the description */
65
42
  descriptionClassName?: string;
66
- /**
67
- * Additional CSS classes for the card
68
- */
43
+ /** Additional CSS classes for the card */
69
44
  cardClassName?: string;
70
- /**
71
- * Additional CSS classes for the card content
72
- */
45
+ /** Additional CSS classes for the card content */
73
46
  cardContentClassName?: string;
74
- /**
75
- * Additional CSS classes for the form
76
- */
47
+ /** Additional CSS classes for the form */
77
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;
78
55
  /**
79
- * Additional CSS classes for the submit button
80
- */
81
- submitClassName?: string; /**
82
56
  * Background style for the section
83
57
  */
84
58
  background?: SectionBackground;
@@ -94,75 +68,26 @@ interface ContactDemoProps {
94
68
  * Pattern overlay opacity (0-1)
95
69
  */
96
70
  patternOpacity?: number;
97
- /**
98
- * Optional form submission configuration.
99
- *
100
- * **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
101
- * and the form will submit to it in JSON format.
102
- *
103
- * @example
104
- * // Works with any API
105
- * formConfig={{ endpoint: "https://api.mysite.com/demo", format: "json" }}
106
- *
107
- * @example
108
- * // With custom headers (e.g., authentication)
109
- * formConfig={{
110
- * endpoint: "/api/demo",
111
- * headers: { "Authorization": "Bearer token123" }
112
- * }}
113
- *
114
- * **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
115
- * are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
116
- * For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
117
- *
118
- * See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
119
- */
71
+ /** Form configuration for PageSpeed forms */
120
72
  formConfig?: PageSpeedFormConfig;
121
- /**
122
- * Optional custom submission handler for maximum flexibility.
123
- *
124
- * Use this when you need complete control over the submission logic,
125
- * such as custom API calls, analytics tracking, or multi-step workflows.
126
- *
127
- * Can be used alone or in combination with `formConfig` for hybrid approaches.
128
- *
129
- * @example
130
- * onSubmit={async (values) => {
131
- * await fetch("/api/demo", {
132
- * method: "POST",
133
- * body: JSON.stringify(values)
134
- * });
135
- * }}
136
- */
137
- onSubmit?: (values: DemoFormValues) => void | Promise<void>;
138
- /**
139
- * Optional success callback invoked after successful submission.
140
- *
141
- * Called after `formConfig` submission and/or `onSubmit` completes successfully.
142
- * Use for showing success messages, redirecting, analytics tracking, etc.
143
- */
73
+ /** Custom submit handler */
74
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
75
+ /** Success callback */
144
76
  onSuccess?: (data: unknown) => void;
145
- /**
146
- * Optional error callback invoked if submission fails.
147
- *
148
- * Receives the error object for custom error handling, logging, or user notifications.
149
- */
77
+ /** Error callback */
150
78
  onError?: (error: Error) => void;
151
79
  }
152
80
  /**
153
- * ContactDemo - A demo request form with use case selection, team size,
154
- * and timeline information. Perfect for SaaS products and B2B services.
81
+ * ContactDemo - Contact form with flexible field configuration
155
82
  *
156
83
  * @example
157
84
  * ```tsx
158
85
  * <ContactDemo
159
86
  * heading="Request a Demo"
160
- * description="See how we can help your team work smarter."
161
- * buttonText="Request Demo"
162
- * formConfig={{ endpoint: "/api/demo", format: "json" }}
87
+ * formConfig={{ endpoint: "/api/contact", format: "json" }}
163
88
  * />
164
89
  * ```
165
90
  */
166
- declare function ContactDemo({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, spacing, containerClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactDemoProps): React.JSX.Element;
91
+ declare function ContactDemo({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, background, spacing, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactDemoProps): React.JSX.Element;
167
92
 
168
93
  export { ContactDemo, type ContactDemoProps };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PageSpeedFormConfig } from '@page-speed/forms/integration';
2
+ import { FormFieldConfig, PageSpeedFormConfig } from '@page-speed/forms/integration';
3
3
  import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bi_ClKrO.js';
4
4
  import { A as ActionConfig } from './blocks-k17uluAz.js';
5
5
  import 'react/jsx-runtime';
@@ -7,78 +7,52 @@ import 'class-variance-authority';
7
7
  import './button-variants-lRElsmTc.js';
8
8
  import 'class-variance-authority/types';
9
9
 
10
- interface DemoFormValues {
11
- useCase: string;
12
- teamSize: string;
13
- timeline: string;
14
- firstName: string;
15
- lastName: string;
16
- email: string;
17
- company: string;
18
- jobTitle: string;
19
- updates: boolean;
20
- }
21
10
  interface ContactDemoProps {
22
- /**
23
- * Main heading content
24
- */
11
+ /** Main heading text */
25
12
  heading?: React.ReactNode;
26
- /**
27
- * Description text below the heading
28
- */
13
+ /** Description text below heading */
29
14
  description?: React.ReactNode;
30
- /**
31
- * Submit button text
32
- */
15
+ /** Submit button text */
33
16
  buttonText?: string;
34
- /**
35
- * Submit button icon (displayed before text)
36
- */
17
+ /** Icon to display in submit button */
37
18
  buttonIcon?: React.ReactNode;
38
- /**
39
- * Array of action configurations for additional buttons
40
- */
19
+ /** Array of action configurations for custom buttons */
41
20
  actions?: ActionConfig[];
42
- /**
43
- * Custom slot for rendering actions (overrides actions array and default submit)
44
- */
21
+ /** Custom slot for rendering actions (overrides actions array) */
45
22
  actionsSlot?: React.ReactNode;
46
23
  /**
47
- * Additional CSS classes for the section
24
+ * Array of form field configurations
25
+ * If not provided, defaults to: first_name, last_name, email, phone, message
48
26
  */
49
- className?: string;
27
+ formFields?: FormFieldConfig[];
50
28
  /**
51
- * Additional CSS classes for the container
29
+ * Success message to display after form submission
30
+ * @default "Thank you! Your message has been sent successfully."
52
31
  */
32
+ successMessage?: React.ReactNode;
33
+ /** Additional CSS classes for the section */
34
+ className?: string;
35
+ /** Additional CSS classes for the container */
53
36
  containerClassName?: string;
54
- /**
55
- * Additional CSS classes for the header wrapper
56
- */
37
+ /** Additional CSS classes for the header */
57
38
  headerClassName?: string;
58
- /**
59
- * Additional CSS classes for the heading
60
- */
39
+ /** Additional CSS classes for the heading */
61
40
  headingClassName?: string;
62
- /**
63
- * Additional CSS classes for the description
64
- */
41
+ /** Additional CSS classes for the description */
65
42
  descriptionClassName?: string;
66
- /**
67
- * Additional CSS classes for the card
68
- */
43
+ /** Additional CSS classes for the card */
69
44
  cardClassName?: string;
70
- /**
71
- * Additional CSS classes for the card content
72
- */
45
+ /** Additional CSS classes for the card content */
73
46
  cardContentClassName?: string;
74
- /**
75
- * Additional CSS classes for the form
76
- */
47
+ /** Additional CSS classes for the form */
77
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;
78
55
  /**
79
- * Additional CSS classes for the submit button
80
- */
81
- submitClassName?: string; /**
82
56
  * Background style for the section
83
57
  */
84
58
  background?: SectionBackground;
@@ -94,75 +68,26 @@ interface ContactDemoProps {
94
68
  * Pattern overlay opacity (0-1)
95
69
  */
96
70
  patternOpacity?: number;
97
- /**
98
- * Optional form submission configuration.
99
- *
100
- * **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
101
- * and the form will submit to it in JSON format.
102
- *
103
- * @example
104
- * // Works with any API
105
- * formConfig={{ endpoint: "https://api.mysite.com/demo", format: "json" }}
106
- *
107
- * @example
108
- * // With custom headers (e.g., authentication)
109
- * formConfig={{
110
- * endpoint: "/api/demo",
111
- * headers: { "Authorization": "Bearer token123" }
112
- * }}
113
- *
114
- * **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
115
- * are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
116
- * For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
117
- *
118
- * See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
119
- */
71
+ /** Form configuration for PageSpeed forms */
120
72
  formConfig?: PageSpeedFormConfig;
121
- /**
122
- * Optional custom submission handler for maximum flexibility.
123
- *
124
- * Use this when you need complete control over the submission logic,
125
- * such as custom API calls, analytics tracking, or multi-step workflows.
126
- *
127
- * Can be used alone or in combination with `formConfig` for hybrid approaches.
128
- *
129
- * @example
130
- * onSubmit={async (values) => {
131
- * await fetch("/api/demo", {
132
- * method: "POST",
133
- * body: JSON.stringify(values)
134
- * });
135
- * }}
136
- */
137
- onSubmit?: (values: DemoFormValues) => void | Promise<void>;
138
- /**
139
- * Optional success callback invoked after successful submission.
140
- *
141
- * Called after `formConfig` submission and/or `onSubmit` completes successfully.
142
- * Use for showing success messages, redirecting, analytics tracking, etc.
143
- */
73
+ /** Custom submit handler */
74
+ onSubmit?: (values: Record<string, any>) => void | Promise<void>;
75
+ /** Success callback */
144
76
  onSuccess?: (data: unknown) => void;
145
- /**
146
- * Optional error callback invoked if submission fails.
147
- *
148
- * Receives the error object for custom error handling, logging, or user notifications.
149
- */
77
+ /** Error callback */
150
78
  onError?: (error: Error) => void;
151
79
  }
152
80
  /**
153
- * ContactDemo - A demo request form with use case selection, team size,
154
- * and timeline information. Perfect for SaaS products and B2B services.
81
+ * ContactDemo - Contact form with flexible field configuration
155
82
  *
156
83
  * @example
157
84
  * ```tsx
158
85
  * <ContactDemo
159
86
  * heading="Request a Demo"
160
- * description="See how we can help your team work smarter."
161
- * buttonText="Request Demo"
162
- * formConfig={{ endpoint: "/api/demo", format: "json" }}
87
+ * formConfig={{ endpoint: "/api/contact", format: "json" }}
163
88
  * />
164
89
  * ```
165
90
  */
166
- declare function ContactDemo({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, spacing, containerClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactDemoProps): React.JSX.Element;
91
+ declare function ContactDemo({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, className, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, successMessageClassName, errorMessageClassName, background, spacing, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactDemoProps): React.JSX.Element;
167
92
 
168
93
  export { ContactDemo, type ContactDemoProps };