@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.
- package/dist/about-story-gallery.cjs +3 -30
- package/dist/about-story-gallery.d.cts +1 -1
- package/dist/about-story-gallery.d.ts +1 -1
- package/dist/about-story-gallery.js +3 -30
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/contact-callback.cjs +526 -273
- package/dist/contact-callback.d.cts +39 -59
- package/dist/contact-callback.d.ts +39 -59
- package/dist/contact-callback.js +528 -274
- package/dist/contact-card.cjs +459 -183
- package/dist/contact-card.d.cts +26 -49
- package/dist/contact-card.d.ts +26 -49
- package/dist/contact-card.js +461 -183
- package/dist/contact-careers.cjs +614 -510
- package/dist/contact-careers.d.cts +32 -55
- package/dist/contact-careers.d.ts +32 -55
- package/dist/contact-careers.js +616 -510
- package/dist/contact-catering.cjs +507 -501
- package/dist/contact-catering.d.cts +27 -61
- package/dist/contact-catering.d.ts +27 -61
- package/dist/contact-catering.js +509 -500
- package/dist/contact-consultation.cjs +484 -253
- package/dist/contact-consultation.d.cts +29 -56
- package/dist/contact-consultation.d.ts +29 -56
- package/dist/contact-consultation.js +486 -253
- package/dist/contact-dark.cjs +296 -296
- package/dist/contact-dark.d.cts +1 -1
- package/dist/contact-dark.d.ts +1 -1
- package/dist/contact-dark.js +297 -296
- package/dist/contact-demo.d.cts +1 -1
- package/dist/contact-demo.d.ts +1 -1
- package/dist/contact-emergency.d.cts +1 -1
- package/dist/contact-emergency.d.ts +1 -1
- package/dist/contact-event.d.cts +1 -1
- package/dist/contact-event.d.ts +1 -1
- package/dist/contact-faq.cjs +247 -250
- package/dist/contact-faq.d.cts +1 -1
- package/dist/contact-faq.d.ts +1 -1
- package/dist/contact-faq.js +248 -250
- package/dist/contact-feedback.d.cts +1 -1
- package/dist/contact-feedback.d.ts +1 -1
- package/dist/contact-fitness.d.cts +1 -1
- package/dist/contact-fitness.d.ts +1 -1
- package/dist/contact-guest.d.cts +1 -1
- package/dist/contact-guest.d.ts +1 -1
- package/dist/contact-image.d.cts +1 -1
- package/dist/contact-image.d.ts +1 -1
- package/dist/contact-insurance.d.cts +1 -1
- package/dist/contact-insurance.d.ts +1 -1
- package/dist/contact-interview.d.cts +1 -1
- package/dist/contact-interview.d.ts +1 -1
- package/dist/contact-locations.d.cts +1 -1
- package/dist/contact-locations.d.ts +1 -1
- package/dist/contact-maintenance.d.cts +1 -1
- package/dist/contact-maintenance.d.ts +1 -1
- package/dist/contact-map.d.cts +1 -1
- package/dist/contact-map.d.ts +1 -1
- package/dist/contact-minimal.d.cts +1 -1
- package/dist/contact-minimal.d.ts +1 -1
- package/dist/contact-moving.d.cts +1 -1
- package/dist/contact-moving.d.ts +1 -1
- package/dist/contact-multistep.d.cts +1 -1
- package/dist/contact-multistep.d.ts +1 -1
- package/dist/contact-partnership.d.cts +1 -1
- package/dist/contact-partnership.d.ts +1 -1
- package/dist/contact-photography.cjs +247 -250
- package/dist/contact-photography.d.cts +1 -1
- package/dist/contact-photography.d.ts +1 -1
- package/dist/contact-photography.js +248 -250
- package/dist/contact-press.d.cts +1 -1
- package/dist/contact-press.d.ts +1 -1
- package/dist/contact-quote.d.cts +1 -1
- package/dist/contact-quote.d.ts +1 -1
- package/dist/contact-referral.d.cts +1 -1
- package/dist/contact-referral.d.ts +1 -1
- package/dist/contact-report.d.cts +1 -1
- package/dist/contact-report.d.ts +1 -1
- package/dist/contact-reservation.d.cts +1 -1
- package/dist/contact-reservation.d.ts +1 -1
- package/dist/contact-retreat.d.cts +1 -1
- package/dist/contact-retreat.d.ts +1 -1
- package/dist/contact-rsvp.d.cts +1 -1
- package/dist/contact-rsvp.d.ts +1 -1
- package/dist/contact-sales.d.cts +1 -1
- package/dist/contact-sales.d.ts +1 -1
- package/dist/contact-schedule.d.cts +1 -1
- package/dist/contact-schedule.d.ts +1 -1
- package/dist/contact-sponsorship.d.cts +1 -1
- package/dist/contact-sponsorship.d.ts +1 -1
- package/dist/contact-support.d.cts +1 -1
- package/dist/contact-support.d.ts +1 -1
- package/dist/contact-tenant.d.cts +1 -1
- package/dist/contact-tenant.d.ts +1 -1
- package/dist/contact-vendor.d.cts +1 -1
- package/dist/contact-vendor.d.ts +1 -1
- package/dist/contact-volunteer.d.cts +1 -1
- package/dist/contact-volunteer.d.ts +1 -1
- package/dist/contact-warranty.d.cts +1 -1
- package/dist/contact-warranty.d.ts +1 -1
- package/dist/contact-wedding.d.cts +1 -1
- package/dist/contact-wedding.d.ts +1 -1
- package/dist/cta-app-download-newsletter.d.cts +1 -1
- package/dist/cta-app-download-newsletter.d.ts +1 -1
- package/dist/cta-newsletter-features.d.cts +1 -1
- package/dist/cta-newsletter-features.d.ts +1 -1
- package/dist/footer-accordion-social.d.cts +1 -1
- package/dist/footer-accordion-social.d.ts +1 -1
- package/dist/footer-newsletter-contact.d.cts +1 -1
- package/dist/footer-newsletter-contact.d.ts +1 -1
- package/dist/footer-newsletter-minimal.d.cts +1 -1
- package/dist/footer-newsletter-minimal.d.ts +1 -1
- package/dist/footer-split-image-accordion.d.cts +1 -1
- package/dist/footer-split-image-accordion.d.ts +1 -1
- package/dist/{forms-nGgHUTBw.d.cts → forms-CStlFhnh.d.cts} +41 -0
- package/dist/{forms-nGgHUTBw.d.ts → forms-CStlFhnh.d.ts} +41 -0
- package/dist/hero-conversation-intelligence.cjs +1 -2
- package/dist/hero-conversation-intelligence.d.cts +1 -5
- package/dist/hero-conversation-intelligence.d.ts +1 -5
- package/dist/hero-conversation-intelligence.js +1 -2
- package/dist/hero-conversion-video-play.cjs +2 -2
- package/dist/hero-conversion-video-play.js +2 -2
- package/dist/hero-design-system-3d.cjs +162 -82
- package/dist/hero-design-system-3d.js +162 -82
- package/dist/hero-ecommerce-product-showcase.cjs +103 -81
- package/dist/hero-ecommerce-product-showcase.d.cts +5 -1
- package/dist/hero-ecommerce-product-showcase.d.ts +5 -1
- package/dist/hero-ecommerce-product-showcase.js +103 -81
- package/dist/hero-floating-images.cjs +1 -1
- package/dist/hero-floating-images.js +1 -1
- package/dist/hero-hiring-animated-text.cjs +4 -4
- package/dist/hero-hiring-animated-text.js +4 -4
- package/dist/hero-minimal-centered-dark.cjs +111 -82
- package/dist/hero-minimal-centered-dark.d.cts +1 -1
- package/dist/hero-minimal-centered-dark.d.ts +1 -1
- package/dist/hero-minimal-centered-dark.js +111 -82
- package/dist/hero-mobile-app-download.cjs +1 -1
- package/dist/hero-mobile-app-download.js +1 -1
- package/dist/hero-overlay-cta-grid.cjs +1 -1
- package/dist/hero-overlay-cta-grid.js +1 -1
- package/dist/hero-spiral-pattern-cards.cjs +1 -1
- package/dist/hero-spiral-pattern-cards.js +1 -1
- package/dist/hero-startup-launch-cta.cjs +1 -1
- package/dist/hero-startup-launch-cta.js +1 -1
- package/dist/hero-stats-social-proof.cjs +106 -90
- package/dist/hero-stats-social-proof.js +106 -90
- package/dist/hero-testimonial-image-grid.cjs +1 -1
- package/dist/hero-testimonial-image-grid.js +1 -1
- package/dist/hero-therapy-testimonial-grid.cjs +1 -1
- package/dist/hero-therapy-testimonial-grid.js +1 -1
- package/dist/hero-ui-library-showcase.cjs +63 -15
- package/dist/hero-ui-library-showcase.d.cts +5 -1
- package/dist/hero-ui-library-showcase.d.ts +5 -1
- package/dist/hero-ui-library-showcase.js +63 -15
- package/dist/index.cjs +44 -6
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +44 -6
- package/dist/link-page-newsletter-social.d.cts +1 -1
- package/dist/link-page-newsletter-social.d.ts +1 -1
- package/dist/offer-modal-membership-image.d.cts +1 -1
- package/dist/offer-modal-membership-image.d.ts +1 -1
- package/dist/offer-modal-newsletter-discount.d.cts +1 -1
- package/dist/offer-modal-newsletter-discount.d.ts +1 -1
- package/dist/offer-modal-sheet-newsletter.d.cts +1 -1
- package/dist/offer-modal-sheet-newsletter.d.ts +1 -1
- package/dist/registry.cjs +14465 -14767
- package/dist/registry.js +12664 -12966
- package/dist/resource-list-hero-filter.d.cts +1 -1
- package/dist/resource-list-hero-filter.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { F as FormFieldConfig } from './form-field-types-flMXhIjG.cjs';
|
|
3
|
+
import { P as PageSpeedFormConfig } from './forms-CStlFhnh.cjs';
|
|
3
4
|
import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-k1_FqqBQ.cjs';
|
|
4
5
|
import { A as ActionConfig } from './blocks-rgCERYOC.cjs';
|
|
5
6
|
import '@page-speed/forms/integration';
|
|
@@ -8,23 +9,6 @@ import 'class-variance-authority';
|
|
|
8
9
|
import './button-variants-lRElsmTc.cjs';
|
|
9
10
|
import 'class-variance-authority/types';
|
|
10
11
|
|
|
11
|
-
interface CateringFormValues {
|
|
12
|
-
eventType: string;
|
|
13
|
-
eventDate: string;
|
|
14
|
-
guestCount: string;
|
|
15
|
-
startTime: string;
|
|
16
|
-
endTime: string;
|
|
17
|
-
venue: string;
|
|
18
|
-
serviceStyle: string;
|
|
19
|
-
cuisinePreferences: string[];
|
|
20
|
-
dietaryAccommodations: string[];
|
|
21
|
-
budget: string;
|
|
22
|
-
name: string;
|
|
23
|
-
phone: string;
|
|
24
|
-
email: string;
|
|
25
|
-
details: string;
|
|
26
|
-
tasting: boolean;
|
|
27
|
-
}
|
|
28
12
|
interface ContactCateringProps {
|
|
29
13
|
/**
|
|
30
14
|
* Main heading content
|
|
@@ -50,12 +34,23 @@ interface ContactCateringProps {
|
|
|
50
34
|
* Custom slot for rendering actions (overrides actions array and default submit)
|
|
51
35
|
*/
|
|
52
36
|
actionsSlot?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Array of form field configurations
|
|
39
|
+
* If not provided, defaults to: eventType, eventDate, guestCount, budget, serviceStyle, cuisinePreferences, dietaryAccommodations, name, email, phone, venue, details, tasting
|
|
40
|
+
*/
|
|
41
|
+
formFields?: FormFieldConfig[];
|
|
42
|
+
/**
|
|
43
|
+
* Success message to display after form submission
|
|
44
|
+
* @default "Thank you for your inquiry! We'll get back to you within 24 hours with a custom proposal."
|
|
45
|
+
*/
|
|
46
|
+
successMessage?: React.ReactNode;
|
|
53
47
|
/**
|
|
54
48
|
* Additional CSS classes for the section
|
|
55
49
|
*/
|
|
56
50
|
className?: string;
|
|
57
51
|
/**
|
|
58
52
|
* Additional CSS classes for the container
|
|
53
|
+
* @default "px-6 sm:px-6 md:px-8 lg:px-8"
|
|
59
54
|
*/
|
|
60
55
|
containerClassName?: string;
|
|
61
56
|
/**
|
|
@@ -82,6 +77,14 @@ interface ContactCateringProps {
|
|
|
82
77
|
* Additional CSS classes for the form
|
|
83
78
|
*/
|
|
84
79
|
formClassName?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Additional CSS classes for success message
|
|
82
|
+
*/
|
|
83
|
+
successMessageClassName?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Additional CSS classes for error message
|
|
86
|
+
*/
|
|
87
|
+
errorMessageClassName?: string;
|
|
85
88
|
/**
|
|
86
89
|
* Additional CSS classes for the submit button
|
|
87
90
|
*/
|
|
@@ -92,6 +95,7 @@ interface ContactCateringProps {
|
|
|
92
95
|
background?: SectionBackground;
|
|
93
96
|
/**
|
|
94
97
|
* Vertical spacing for the section
|
|
98
|
+
* @default "py-8 md:py-32"
|
|
95
99
|
*/
|
|
96
100
|
spacing?: SectionSpacing;
|
|
97
101
|
/**
|
|
@@ -103,57 +107,19 @@ interface ContactCateringProps {
|
|
|
103
107
|
*/
|
|
104
108
|
patternOpacity?: number;
|
|
105
109
|
/**
|
|
106
|
-
* Optional form submission configuration.
|
|
107
|
-
*
|
|
108
|
-
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
109
|
-
* and the form will submit to it in JSON format.
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* // Works with any API
|
|
113
|
-
* formConfig={{ endpoint: "https://api.mysite.com/catering", format: "json" }}
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* // With custom headers (e.g., authentication)
|
|
117
|
-
* formConfig={{
|
|
118
|
-
* endpoint: "/api/catering",
|
|
119
|
-
* headers: { "Authorization": "Bearer token123" }
|
|
120
|
-
* }}
|
|
121
|
-
*
|
|
122
|
-
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
123
|
-
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
124
|
-
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
125
|
-
*
|
|
126
|
-
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
110
|
+
* Optional form submission configuration. See FORMS_INTEGRATION_GUIDE.md for complete examples.
|
|
127
111
|
*/
|
|
128
112
|
formConfig?: PageSpeedFormConfig;
|
|
129
113
|
/**
|
|
130
|
-
* Optional custom submission handler
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
134
|
-
*
|
|
135
|
-
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* onSubmit={async (values) => {
|
|
139
|
-
* await fetch("/api/catering", {
|
|
140
|
-
* method: "POST",
|
|
141
|
-
* body: JSON.stringify(values)
|
|
142
|
-
* });
|
|
143
|
-
* }}
|
|
144
|
-
*/
|
|
145
|
-
onSubmit?: (values: CateringFormValues) => void | Promise<void>;
|
|
114
|
+
* Optional custom submission handler.
|
|
115
|
+
*/
|
|
116
|
+
onSubmit?: (values: Record<string, unknown>) => void | Promise<void>;
|
|
146
117
|
/**
|
|
147
118
|
* Optional success callback invoked after successful submission.
|
|
148
|
-
*
|
|
149
|
-
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
150
|
-
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
151
119
|
*/
|
|
152
120
|
onSuccess?: (data: unknown) => void;
|
|
153
121
|
/**
|
|
154
122
|
* Optional error callback invoked if submission fails.
|
|
155
|
-
*
|
|
156
|
-
* Receives the error object for custom error handling, logging, or user notifications.
|
|
157
123
|
*/
|
|
158
124
|
onError?: (error: Error) => void;
|
|
159
125
|
}
|
|
@@ -172,6 +138,6 @@ interface ContactCateringProps {
|
|
|
172
138
|
* />
|
|
173
139
|
* ```
|
|
174
140
|
*/
|
|
175
|
-
declare function ContactCatering({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, spacing, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactCateringProps): React.JSX.Element;
|
|
141
|
+
declare function ContactCatering({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, className, spacing, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, successMessageClassName, errorMessageClassName, submitClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactCateringProps): React.JSX.Element;
|
|
176
142
|
|
|
177
143
|
export { ContactCatering, type ContactCateringProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { F as FormFieldConfig } from './form-field-types-flMXhIjG.js';
|
|
3
|
+
import { P as PageSpeedFormConfig } from './forms-CStlFhnh.js';
|
|
3
4
|
import { f as SectionBackground, g as SectionSpacing, s as PatternName } from './community-initiatives-AwBlQu1a.js';
|
|
4
5
|
import { A as ActionConfig } from './blocks-ClXAGlHQ.js';
|
|
5
6
|
import '@page-speed/forms/integration';
|
|
@@ -8,23 +9,6 @@ import 'class-variance-authority';
|
|
|
8
9
|
import './button-variants-lRElsmTc.js';
|
|
9
10
|
import 'class-variance-authority/types';
|
|
10
11
|
|
|
11
|
-
interface CateringFormValues {
|
|
12
|
-
eventType: string;
|
|
13
|
-
eventDate: string;
|
|
14
|
-
guestCount: string;
|
|
15
|
-
startTime: string;
|
|
16
|
-
endTime: string;
|
|
17
|
-
venue: string;
|
|
18
|
-
serviceStyle: string;
|
|
19
|
-
cuisinePreferences: string[];
|
|
20
|
-
dietaryAccommodations: string[];
|
|
21
|
-
budget: string;
|
|
22
|
-
name: string;
|
|
23
|
-
phone: string;
|
|
24
|
-
email: string;
|
|
25
|
-
details: string;
|
|
26
|
-
tasting: boolean;
|
|
27
|
-
}
|
|
28
12
|
interface ContactCateringProps {
|
|
29
13
|
/**
|
|
30
14
|
* Main heading content
|
|
@@ -50,12 +34,23 @@ interface ContactCateringProps {
|
|
|
50
34
|
* Custom slot for rendering actions (overrides actions array and default submit)
|
|
51
35
|
*/
|
|
52
36
|
actionsSlot?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Array of form field configurations
|
|
39
|
+
* If not provided, defaults to: eventType, eventDate, guestCount, budget, serviceStyle, cuisinePreferences, dietaryAccommodations, name, email, phone, venue, details, tasting
|
|
40
|
+
*/
|
|
41
|
+
formFields?: FormFieldConfig[];
|
|
42
|
+
/**
|
|
43
|
+
* Success message to display after form submission
|
|
44
|
+
* @default "Thank you for your inquiry! We'll get back to you within 24 hours with a custom proposal."
|
|
45
|
+
*/
|
|
46
|
+
successMessage?: React.ReactNode;
|
|
53
47
|
/**
|
|
54
48
|
* Additional CSS classes for the section
|
|
55
49
|
*/
|
|
56
50
|
className?: string;
|
|
57
51
|
/**
|
|
58
52
|
* Additional CSS classes for the container
|
|
53
|
+
* @default "px-6 sm:px-6 md:px-8 lg:px-8"
|
|
59
54
|
*/
|
|
60
55
|
containerClassName?: string;
|
|
61
56
|
/**
|
|
@@ -82,6 +77,14 @@ interface ContactCateringProps {
|
|
|
82
77
|
* Additional CSS classes for the form
|
|
83
78
|
*/
|
|
84
79
|
formClassName?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Additional CSS classes for success message
|
|
82
|
+
*/
|
|
83
|
+
successMessageClassName?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Additional CSS classes for error message
|
|
86
|
+
*/
|
|
87
|
+
errorMessageClassName?: string;
|
|
85
88
|
/**
|
|
86
89
|
* Additional CSS classes for the submit button
|
|
87
90
|
*/
|
|
@@ -92,6 +95,7 @@ interface ContactCateringProps {
|
|
|
92
95
|
background?: SectionBackground;
|
|
93
96
|
/**
|
|
94
97
|
* Vertical spacing for the section
|
|
98
|
+
* @default "py-8 md:py-32"
|
|
95
99
|
*/
|
|
96
100
|
spacing?: SectionSpacing;
|
|
97
101
|
/**
|
|
@@ -103,57 +107,19 @@ interface ContactCateringProps {
|
|
|
103
107
|
*/
|
|
104
108
|
patternOpacity?: number;
|
|
105
109
|
/**
|
|
106
|
-
* Optional form submission configuration.
|
|
107
|
-
*
|
|
108
|
-
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
109
|
-
* and the form will submit to it in JSON format.
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* // Works with any API
|
|
113
|
-
* formConfig={{ endpoint: "https://api.mysite.com/catering", format: "json" }}
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* // With custom headers (e.g., authentication)
|
|
117
|
-
* formConfig={{
|
|
118
|
-
* endpoint: "/api/catering",
|
|
119
|
-
* headers: { "Authorization": "Bearer token123" }
|
|
120
|
-
* }}
|
|
121
|
-
*
|
|
122
|
-
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
123
|
-
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
124
|
-
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
125
|
-
*
|
|
126
|
-
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
110
|
+
* Optional form submission configuration. See FORMS_INTEGRATION_GUIDE.md for complete examples.
|
|
127
111
|
*/
|
|
128
112
|
formConfig?: PageSpeedFormConfig;
|
|
129
113
|
/**
|
|
130
|
-
* Optional custom submission handler
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
134
|
-
*
|
|
135
|
-
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* onSubmit={async (values) => {
|
|
139
|
-
* await fetch("/api/catering", {
|
|
140
|
-
* method: "POST",
|
|
141
|
-
* body: JSON.stringify(values)
|
|
142
|
-
* });
|
|
143
|
-
* }}
|
|
144
|
-
*/
|
|
145
|
-
onSubmit?: (values: CateringFormValues) => void | Promise<void>;
|
|
114
|
+
* Optional custom submission handler.
|
|
115
|
+
*/
|
|
116
|
+
onSubmit?: (values: Record<string, unknown>) => void | Promise<void>;
|
|
146
117
|
/**
|
|
147
118
|
* Optional success callback invoked after successful submission.
|
|
148
|
-
*
|
|
149
|
-
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
150
|
-
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
151
119
|
*/
|
|
152
120
|
onSuccess?: (data: unknown) => void;
|
|
153
121
|
/**
|
|
154
122
|
* Optional error callback invoked if submission fails.
|
|
155
|
-
*
|
|
156
|
-
* Receives the error object for custom error handling, logging, or user notifications.
|
|
157
123
|
*/
|
|
158
124
|
onError?: (error: Error) => void;
|
|
159
125
|
}
|
|
@@ -172,6 +138,6 @@ interface ContactCateringProps {
|
|
|
172
138
|
* />
|
|
173
139
|
* ```
|
|
174
140
|
*/
|
|
175
|
-
declare function ContactCatering({ heading, description, buttonText, buttonIcon, actions, actionsSlot, className, spacing, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, submitClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactCateringProps): React.JSX.Element;
|
|
141
|
+
declare function ContactCatering({ heading, description, buttonText, buttonIcon, actions, actionsSlot, formFields, successMessage, className, spacing, containerClassName, headerClassName, headingClassName, descriptionClassName, cardClassName, cardContentClassName, formClassName, successMessageClassName, errorMessageClassName, submitClassName, background, pattern, patternOpacity, formConfig, onSubmit, onSuccess, onError, }: ContactCateringProps): React.JSX.Element;
|
|
176
142
|
|
|
177
143
|
export { ContactCatering, type ContactCateringProps };
|