@opensite/ui 1.3.2 → 1.3.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/footer-accordion-social.cjs +1344 -0
- package/dist/footer-accordion-social.d.cts +154 -0
- package/dist/footer-accordion-social.d.ts +154 -0
- package/dist/footer-accordion-social.js +1322 -0
- package/dist/footer-info-cards-accordion.cjs +1427 -0
- package/dist/footer-info-cards-accordion.d.cts +278 -0
- package/dist/footer-info-cards-accordion.d.ts +278 -0
- package/dist/footer-info-cards-accordion.js +1404 -0
- package/dist/footer-newsletter-contact.cjs +1281 -0
- package/dist/footer-newsletter-contact.d.cts +163 -0
- package/dist/footer-newsletter-contact.d.ts +163 -0
- package/dist/footer-newsletter-contact.js +1259 -0
- package/dist/footer-split-image-accordion.cjs +1395 -0
- package/dist/footer-split-image-accordion.d.cts +236 -0
- package/dist/footer-split-image-accordion.d.ts +236 -0
- package/dist/footer-split-image-accordion.js +1372 -0
- package/dist/list-achievements-showcase.cjs +1141 -0
- package/dist/list-achievements-showcase.d.cts +131 -0
- package/dist/list-achievements-showcase.d.ts +131 -0
- package/dist/list-achievements-showcase.js +1119 -0
- package/dist/list-career-timeline.cjs +531 -0
- package/dist/list-career-timeline.d.cts +153 -0
- package/dist/list-career-timeline.d.ts +153 -0
- package/dist/list-career-timeline.js +509 -0
- package/dist/list-feature-comparison.cjs +1211 -0
- package/dist/list-feature-comparison.d.cts +189 -0
- package/dist/list-feature-comparison.d.ts +189 -0
- package/dist/list-feature-comparison.js +1190 -0
- package/dist/list-metrics-dashboard.cjs +1402 -0
- package/dist/list-metrics-dashboard.d.cts +191 -0
- package/dist/list-metrics-dashboard.d.ts +191 -0
- package/dist/list-metrics-dashboard.js +1379 -0
- package/dist/list-service-category-table.cjs +762 -0
- package/dist/list-service-category-table.d.cts +135 -0
- package/dist/list-service-category-table.d.ts +135 -0
- package/dist/list-service-category-table.js +741 -0
- package/dist/offer-modal-membership-image.cjs +1361 -0
- package/dist/offer-modal-membership-image.d.cts +194 -0
- package/dist/offer-modal-membership-image.d.ts +194 -0
- package/dist/offer-modal-membership-image.js +1339 -0
- package/dist/offer-modal-newsletter-discount.cjs +1296 -0
- package/dist/offer-modal-newsletter-discount.d.cts +164 -0
- package/dist/offer-modal-newsletter-discount.d.ts +164 -0
- package/dist/offer-modal-newsletter-discount.js +1274 -0
- package/dist/offer-modal-sheet-newsletter.cjs +1360 -0
- package/dist/offer-modal-sheet-newsletter.d.cts +221 -0
- package/dist/offer-modal-sheet-newsletter.d.ts +221 -0
- package/dist/offer-modal-sheet-newsletter.js +1337 -0
- package/dist/pricing-addons-cards.cjs +1143 -0
- package/dist/pricing-addons-cards.d.cts +203 -0
- package/dist/pricing-addons-cards.d.ts +203 -0
- package/dist/pricing-addons-cards.js +1122 -0
- package/dist/pricing-addons-featured.cjs +1224 -0
- package/dist/pricing-addons-featured.d.cts +271 -0
- package/dist/pricing-addons-featured.d.ts +271 -0
- package/dist/pricing-addons-featured.js +1203 -0
- package/dist/pricing-collapsible-plans.cjs +1315 -0
- package/dist/pricing-collapsible-plans.d.cts +258 -0
- package/dist/pricing-collapsible-plans.d.ts +258 -0
- package/dist/pricing-collapsible-plans.js +1294 -0
- package/dist/pricing-columns-toggle.cjs +1234 -0
- package/dist/pricing-columns-toggle.d.cts +251 -0
- package/dist/pricing-columns-toggle.d.ts +251 -0
- package/dist/pricing-columns-toggle.js +1212 -0
- package/dist/pricing-comparison-headers.cjs +1235 -0
- package/dist/pricing-comparison-headers.d.cts +245 -0
- package/dist/pricing-comparison-headers.d.ts +245 -0
- package/dist/pricing-comparison-headers.js +1213 -0
- package/dist/pricing-comparison-table.cjs +1374 -0
- package/dist/pricing-comparison-table.d.cts +280 -0
- package/dist/pricing-comparison-table.d.ts +280 -0
- package/dist/pricing-comparison-table.js +1352 -0
- package/dist/pricing-discount-card.cjs +1217 -0
- package/dist/pricing-discount-card.d.cts +195 -0
- package/dist/pricing-discount-card.d.ts +195 -0
- package/dist/pricing-discount-card.js +1195 -0
- package/dist/pricing-enterprise-contact.cjs +1094 -0
- package/dist/pricing-enterprise-contact.d.cts +170 -0
- package/dist/pricing-enterprise-contact.d.ts +170 -0
- package/dist/pricing-enterprise-contact.js +1073 -0
- package/dist/pricing-feature-matrix.cjs +1197 -0
- package/dist/pricing-feature-matrix.d.cts +56 -0
- package/dist/pricing-feature-matrix.d.ts +56 -0
- package/dist/pricing-feature-matrix.js +1174 -0
- package/dist/pricing-four-tier-toggle.cjs +1320 -0
- package/dist/pricing-four-tier-toggle.d.cts +266 -0
- package/dist/pricing-four-tier-toggle.d.ts +266 -0
- package/dist/pricing-four-tier-toggle.js +1297 -0
- package/dist/pricing-full-comparison.cjs +1301 -0
- package/dist/pricing-full-comparison.d.cts +265 -0
- package/dist/pricing-full-comparison.d.ts +265 -0
- package/dist/pricing-full-comparison.js +1279 -0
- package/dist/pricing-gradient-cards.cjs +1248 -0
- package/dist/pricing-gradient-cards.d.cts +258 -0
- package/dist/pricing-gradient-cards.d.ts +258 -0
- package/dist/pricing-gradient-cards.js +1226 -0
- package/dist/pricing-icon-headers.cjs +1163 -0
- package/dist/pricing-icon-headers.d.cts +218 -0
- package/dist/pricing-icon-headers.d.ts +218 -0
- package/dist/pricing-icon-headers.js +1142 -0
- package/dist/pricing-minimal-cards.cjs +1146 -0
- package/dist/pricing-minimal-cards.d.cts +210 -0
- package/dist/pricing-minimal-cards.d.ts +210 -0
- package/dist/pricing-minimal-cards.js +1125 -0
- package/dist/pricing-packages-radio.cjs +1203 -0
- package/dist/pricing-packages-radio.d.cts +243 -0
- package/dist/pricing-packages-radio.d.ts +243 -0
- package/dist/pricing-packages-radio.js +1182 -0
- package/dist/pricing-popular-highlight.cjs +1293 -0
- package/dist/pricing-popular-highlight.d.cts +255 -0
- package/dist/pricing-popular-highlight.d.ts +255 -0
- package/dist/pricing-popular-highlight.js +1271 -0
- package/dist/pricing-radio-toggle.cjs +1277 -0
- package/dist/pricing-radio-toggle.d.cts +251 -0
- package/dist/pricing-radio-toggle.d.ts +251 -0
- package/dist/pricing-radio-toggle.js +1255 -0
- package/dist/pricing-responsive-table.cjs +1229 -0
- package/dist/pricing-responsive-table.d.cts +55 -0
- package/dist/pricing-responsive-table.d.ts +55 -0
- package/dist/pricing-responsive-table.js +1206 -0
- package/dist/pricing-services-cards.cjs +1209 -0
- package/dist/pricing-services-cards.d.cts +230 -0
- package/dist/pricing-services-cards.d.ts +230 -0
- package/dist/pricing-services-cards.js +1188 -0
- package/dist/pricing-simple-card.cjs +1102 -0
- package/dist/pricing-simple-card.d.cts +174 -0
- package/dist/pricing-simple-card.d.ts +174 -0
- package/dist/pricing-simple-card.js +1081 -0
- package/dist/pricing-single-card.cjs +1174 -0
- package/dist/pricing-single-card.d.cts +201 -0
- package/dist/pricing-single-card.d.ts +201 -0
- package/dist/pricing-single-card.js +1152 -0
- package/dist/pricing-split-layout.cjs +1001 -0
- package/dist/pricing-split-layout.d.cts +44 -0
- package/dist/pricing-split-layout.d.ts +44 -0
- package/dist/pricing-split-layout.js +980 -0
- package/dist/pricing-spotlight-card.cjs +1157 -0
- package/dist/pricing-spotlight-card.d.cts +201 -0
- package/dist/pricing-spotlight-card.d.ts +201 -0
- package/dist/pricing-spotlight-card.js +1136 -0
- package/dist/pricing-switch-cards.cjs +1274 -0
- package/dist/pricing-switch-cards.d.cts +254 -0
- package/dist/pricing-switch-cards.d.ts +254 -0
- package/dist/pricing-switch-cards.js +1252 -0
- package/dist/pricing-tabs-toggle.cjs +1314 -0
- package/dist/pricing-tabs-toggle.d.cts +274 -0
- package/dist/pricing-tabs-toggle.d.ts +274 -0
- package/dist/pricing-tabs-toggle.js +1291 -0
- package/dist/pricing-tier-grid.cjs +1190 -0
- package/dist/pricing-tier-grid.d.cts +224 -0
- package/dist/pricing-tier-grid.d.ts +224 -0
- package/dist/pricing-tier-grid.js +1169 -0
- package/dist/pricing-toggle-cards.cjs +1330 -0
- package/dist/pricing-toggle-cards.d.cts +267 -0
- package/dist/pricing-toggle-cards.d.ts +267 -0
- package/dist/pricing-toggle-cards.js +1307 -0
- package/dist/pricing-toggle-period.cjs +1251 -0
- package/dist/pricing-toggle-period.d.cts +265 -0
- package/dist/pricing-toggle-period.d.ts +265 -0
- package/dist/pricing-toggle-period.js +1230 -0
- package/dist/pricing-two-column-basic.cjs +1243 -0
- package/dist/pricing-two-column-basic.d.cts +244 -0
- package/dist/pricing-two-column-basic.d.ts +244 -0
- package/dist/pricing-two-column-basic.js +1222 -0
- package/dist/registry.cjs +109 -85
- package/dist/registry.js +931 -907
- package/package.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as PageSpeedFormConfig } from './forms-BCcwNFhk.cjs';
|
|
3
|
+
import { f as SectionBackground } from './community-initiatives-Bz_A5vLU.cjs';
|
|
4
|
+
import { I as ImageItem, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'class-variance-authority';
|
|
7
|
+
import './button-variants-lRElsmTc.cjs';
|
|
8
|
+
import 'class-variance-authority/types';
|
|
9
|
+
|
|
10
|
+
interface OfferModalMembershipImageProps {
|
|
11
|
+
/**
|
|
12
|
+
* Overline/eyebrow content displayed above the title
|
|
13
|
+
*/
|
|
14
|
+
overline?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Main title content for the offer
|
|
17
|
+
*/
|
|
18
|
+
title?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Description content displayed below the form
|
|
21
|
+
*/
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Image configuration for the header
|
|
25
|
+
*/
|
|
26
|
+
image?: ImageItem;
|
|
27
|
+
/**
|
|
28
|
+
* Custom slot for rendering the image (overrides image prop)
|
|
29
|
+
*/
|
|
30
|
+
imageSlot?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Placeholder text for the email input
|
|
33
|
+
*/
|
|
34
|
+
emailPlaceholder?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Text for the submit button
|
|
37
|
+
*/
|
|
38
|
+
buttonText?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Custom slot for the close button (overrides default close button)
|
|
41
|
+
*/
|
|
42
|
+
closeButtonSlot?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Custom slot for the form (overrides default form)
|
|
45
|
+
*/
|
|
46
|
+
formSlot?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Custom slot for the footer/description area (overrides description)
|
|
49
|
+
*/
|
|
50
|
+
footerSlot?: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the dialog is open (controlled mode)
|
|
53
|
+
*/
|
|
54
|
+
open?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Callback when the dialog open state changes
|
|
57
|
+
*/
|
|
58
|
+
onOpenChange?: (open: boolean) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the dialog is open by default (uncontrolled mode)
|
|
61
|
+
*/
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional custom submission handler for maximum flexibility.
|
|
65
|
+
*
|
|
66
|
+
* Use this when you need complete control over the submission logic,
|
|
67
|
+
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
68
|
+
*
|
|
69
|
+
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* onSubmit={async (email) => {
|
|
73
|
+
* await fetch("/api/subscribe", {
|
|
74
|
+
* method: "POST",
|
|
75
|
+
* body: JSON.stringify({ email, membership: "premium" })
|
|
76
|
+
* });
|
|
77
|
+
* }}
|
|
78
|
+
*/
|
|
79
|
+
onSubmit?: (email: string) => void | Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Optional form submission configuration.
|
|
82
|
+
*
|
|
83
|
+
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
84
|
+
* and the form will submit to it in JSON format.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // Works with any API
|
|
88
|
+
* formConfig={{ endpoint: "https://api.mysite.com/subscribe", format: "json" }}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* // With custom headers (e.g., authentication)
|
|
92
|
+
* formConfig={{
|
|
93
|
+
* endpoint: "/api/newsletter",
|
|
94
|
+
* headers: { "Authorization": "Bearer token123" }
|
|
95
|
+
* }}
|
|
96
|
+
*
|
|
97
|
+
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
98
|
+
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
99
|
+
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
100
|
+
*
|
|
101
|
+
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
102
|
+
*/
|
|
103
|
+
formConfig?: PageSpeedFormConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Optional success callback invoked after successful submission.
|
|
106
|
+
*
|
|
107
|
+
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
108
|
+
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
109
|
+
*/
|
|
110
|
+
onSuccess?: (data: unknown) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Optional error callback invoked if submission fails.
|
|
113
|
+
*
|
|
114
|
+
* Receives the error object for custom error handling, logging, or user notifications.
|
|
115
|
+
*/
|
|
116
|
+
onError?: (error: Error) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Additional CSS classes for the dialog content wrapper
|
|
119
|
+
*/
|
|
120
|
+
className?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Additional CSS classes for the image wrapper
|
|
123
|
+
*/
|
|
124
|
+
imageWrapperClassName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Additional CSS classes for the image element
|
|
127
|
+
*/
|
|
128
|
+
imageClassName?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Additional CSS classes for the content area (below image)
|
|
131
|
+
*/
|
|
132
|
+
contentClassName?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Additional CSS classes for the overline text
|
|
135
|
+
*/
|
|
136
|
+
overlineClassName?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Additional CSS classes for the title
|
|
139
|
+
*/
|
|
140
|
+
titleClassName?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Additional CSS classes for the description
|
|
143
|
+
*/
|
|
144
|
+
descriptionClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Additional CSS classes for the form
|
|
147
|
+
*/
|
|
148
|
+
formClassName?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Additional CSS classes for the email input
|
|
151
|
+
*/
|
|
152
|
+
inputClassName?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the submit button
|
|
155
|
+
*/
|
|
156
|
+
submitClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Additional CSS classes for the close button
|
|
159
|
+
*/
|
|
160
|
+
closeClassName?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Additional CSS classes for the footer
|
|
163
|
+
*/
|
|
164
|
+
footerClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Optional configuration for OptixFlow image optimization
|
|
167
|
+
*/
|
|
168
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
169
|
+
/**
|
|
170
|
+
* Background style variant for the section
|
|
171
|
+
* @default "default"
|
|
172
|
+
*/
|
|
173
|
+
background?: SectionBackground;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* OfferModalMembershipImage - A visually rich membership offer modal featuring a header image,
|
|
177
|
+
* overline text, compelling title, email signup form with icon, and descriptive footer text.
|
|
178
|
+
* Includes responsive design with mobile-optimized layout and hover animations on the close button.
|
|
179
|
+
* Ideal for e-commerce membership programs, exclusive offers, or premium newsletter signups.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```tsx
|
|
183
|
+
* <OfferModalMembershipImage
|
|
184
|
+
* overline="Treat Yourself!"
|
|
185
|
+
* title="Become a Member & Enjoy 20% Off"
|
|
186
|
+
* description="Sign up to receive our latest updates."
|
|
187
|
+
* image={{ src: "/promo.jpg", alt: "Promotional image" }}
|
|
188
|
+
* onSubmit={(email) => console.log('Subscribed:', email)}
|
|
189
|
+
* />
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
declare function OfferModalMembershipImage({ overline, title, description, image, imageSlot, emailPlaceholder, buttonText, closeButtonSlot, formSlot, footerSlot, open, onOpenChange, defaultOpen, onSubmit, formConfig, onSuccess, onError, className, imageWrapperClassName, imageClassName, contentClassName, overlineClassName, titleClassName, descriptionClassName, formClassName, inputClassName, submitClassName, closeClassName, footerClassName, optixFlowConfig, background, }: OfferModalMembershipImageProps): React.JSX.Element;
|
|
193
|
+
|
|
194
|
+
export { OfferModalMembershipImage, type OfferModalMembershipImageProps };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as PageSpeedFormConfig } from './forms-BCcwNFhk.js';
|
|
3
|
+
import { f as SectionBackground } from './community-initiatives-Bi_ClKrO.js';
|
|
4
|
+
import { I as ImageItem, O as OptixFlowConfig } from './blocks-k17uluAz.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'class-variance-authority';
|
|
7
|
+
import './button-variants-lRElsmTc.js';
|
|
8
|
+
import 'class-variance-authority/types';
|
|
9
|
+
|
|
10
|
+
interface OfferModalMembershipImageProps {
|
|
11
|
+
/**
|
|
12
|
+
* Overline/eyebrow content displayed above the title
|
|
13
|
+
*/
|
|
14
|
+
overline?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Main title content for the offer
|
|
17
|
+
*/
|
|
18
|
+
title?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Description content displayed below the form
|
|
21
|
+
*/
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Image configuration for the header
|
|
25
|
+
*/
|
|
26
|
+
image?: ImageItem;
|
|
27
|
+
/**
|
|
28
|
+
* Custom slot for rendering the image (overrides image prop)
|
|
29
|
+
*/
|
|
30
|
+
imageSlot?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Placeholder text for the email input
|
|
33
|
+
*/
|
|
34
|
+
emailPlaceholder?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Text for the submit button
|
|
37
|
+
*/
|
|
38
|
+
buttonText?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Custom slot for the close button (overrides default close button)
|
|
41
|
+
*/
|
|
42
|
+
closeButtonSlot?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Custom slot for the form (overrides default form)
|
|
45
|
+
*/
|
|
46
|
+
formSlot?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Custom slot for the footer/description area (overrides description)
|
|
49
|
+
*/
|
|
50
|
+
footerSlot?: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the dialog is open (controlled mode)
|
|
53
|
+
*/
|
|
54
|
+
open?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Callback when the dialog open state changes
|
|
57
|
+
*/
|
|
58
|
+
onOpenChange?: (open: boolean) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the dialog is open by default (uncontrolled mode)
|
|
61
|
+
*/
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional custom submission handler for maximum flexibility.
|
|
65
|
+
*
|
|
66
|
+
* Use this when you need complete control over the submission logic,
|
|
67
|
+
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
68
|
+
*
|
|
69
|
+
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* onSubmit={async (email) => {
|
|
73
|
+
* await fetch("/api/subscribe", {
|
|
74
|
+
* method: "POST",
|
|
75
|
+
* body: JSON.stringify({ email, membership: "premium" })
|
|
76
|
+
* });
|
|
77
|
+
* }}
|
|
78
|
+
*/
|
|
79
|
+
onSubmit?: (email: string) => void | Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Optional form submission configuration.
|
|
82
|
+
*
|
|
83
|
+
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
84
|
+
* and the form will submit to it in JSON format.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // Works with any API
|
|
88
|
+
* formConfig={{ endpoint: "https://api.mysite.com/subscribe", format: "json" }}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* // With custom headers (e.g., authentication)
|
|
92
|
+
* formConfig={{
|
|
93
|
+
* endpoint: "/api/newsletter",
|
|
94
|
+
* headers: { "Authorization": "Bearer token123" }
|
|
95
|
+
* }}
|
|
96
|
+
*
|
|
97
|
+
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
98
|
+
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
99
|
+
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
100
|
+
*
|
|
101
|
+
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
102
|
+
*/
|
|
103
|
+
formConfig?: PageSpeedFormConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Optional success callback invoked after successful submission.
|
|
106
|
+
*
|
|
107
|
+
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
108
|
+
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
109
|
+
*/
|
|
110
|
+
onSuccess?: (data: unknown) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Optional error callback invoked if submission fails.
|
|
113
|
+
*
|
|
114
|
+
* Receives the error object for custom error handling, logging, or user notifications.
|
|
115
|
+
*/
|
|
116
|
+
onError?: (error: Error) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Additional CSS classes for the dialog content wrapper
|
|
119
|
+
*/
|
|
120
|
+
className?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Additional CSS classes for the image wrapper
|
|
123
|
+
*/
|
|
124
|
+
imageWrapperClassName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Additional CSS classes for the image element
|
|
127
|
+
*/
|
|
128
|
+
imageClassName?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Additional CSS classes for the content area (below image)
|
|
131
|
+
*/
|
|
132
|
+
contentClassName?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Additional CSS classes for the overline text
|
|
135
|
+
*/
|
|
136
|
+
overlineClassName?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Additional CSS classes for the title
|
|
139
|
+
*/
|
|
140
|
+
titleClassName?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Additional CSS classes for the description
|
|
143
|
+
*/
|
|
144
|
+
descriptionClassName?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Additional CSS classes for the form
|
|
147
|
+
*/
|
|
148
|
+
formClassName?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Additional CSS classes for the email input
|
|
151
|
+
*/
|
|
152
|
+
inputClassName?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the submit button
|
|
155
|
+
*/
|
|
156
|
+
submitClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Additional CSS classes for the close button
|
|
159
|
+
*/
|
|
160
|
+
closeClassName?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Additional CSS classes for the footer
|
|
163
|
+
*/
|
|
164
|
+
footerClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Optional configuration for OptixFlow image optimization
|
|
167
|
+
*/
|
|
168
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
169
|
+
/**
|
|
170
|
+
* Background style variant for the section
|
|
171
|
+
* @default "default"
|
|
172
|
+
*/
|
|
173
|
+
background?: SectionBackground;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* OfferModalMembershipImage - A visually rich membership offer modal featuring a header image,
|
|
177
|
+
* overline text, compelling title, email signup form with icon, and descriptive footer text.
|
|
178
|
+
* Includes responsive design with mobile-optimized layout and hover animations on the close button.
|
|
179
|
+
* Ideal for e-commerce membership programs, exclusive offers, or premium newsletter signups.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```tsx
|
|
183
|
+
* <OfferModalMembershipImage
|
|
184
|
+
* overline="Treat Yourself!"
|
|
185
|
+
* title="Become a Member & Enjoy 20% Off"
|
|
186
|
+
* description="Sign up to receive our latest updates."
|
|
187
|
+
* image={{ src: "/promo.jpg", alt: "Promotional image" }}
|
|
188
|
+
* onSubmit={(email) => console.log('Subscribed:', email)}
|
|
189
|
+
* />
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
declare function OfferModalMembershipImage({ overline, title, description, image, imageSlot, emailPlaceholder, buttonText, closeButtonSlot, formSlot, footerSlot, open, onOpenChange, defaultOpen, onSubmit, formConfig, onSuccess, onError, className, imageWrapperClassName, imageClassName, contentClassName, overlineClassName, titleClassName, descriptionClassName, formClassName, inputClassName, submitClassName, closeClassName, footerClassName, optixFlowConfig, background, }: OfferModalMembershipImageProps): React.JSX.Element;
|
|
193
|
+
|
|
194
|
+
export { OfferModalMembershipImage, type OfferModalMembershipImageProps };
|