@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,221 @@
|
|
|
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 { L as LogoItem, 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 OfferModalSheetNewsletterProps {
|
|
11
|
+
/**
|
|
12
|
+
* Logo configuration
|
|
13
|
+
*/
|
|
14
|
+
logo?: LogoItem;
|
|
15
|
+
/**
|
|
16
|
+
* Custom slot for rendering the logo (overrides logo prop)
|
|
17
|
+
*/
|
|
18
|
+
logoSlot?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Main title content for the offer
|
|
21
|
+
*/
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Description content below the title
|
|
25
|
+
*/
|
|
26
|
+
description?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Image configuration for the bottom section
|
|
29
|
+
*/
|
|
30
|
+
image?: ImageItem;
|
|
31
|
+
/**
|
|
32
|
+
* Custom slot for rendering the image (overrides image prop)
|
|
33
|
+
*/
|
|
34
|
+
imageSlot?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Placeholder text for the email input
|
|
37
|
+
*/
|
|
38
|
+
emailPlaceholder?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Text/content for the submit button
|
|
41
|
+
*/
|
|
42
|
+
buttonText?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Terms of use link URL
|
|
45
|
+
*/
|
|
46
|
+
termsUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Terms of use link text
|
|
49
|
+
*/
|
|
50
|
+
termsText?: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Privacy policy link URL
|
|
53
|
+
*/
|
|
54
|
+
privacyUrl?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Privacy policy link text
|
|
57
|
+
*/
|
|
58
|
+
privacyText?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Custom slot for the legal text area (overrides terms/privacy links)
|
|
61
|
+
*/
|
|
62
|
+
legalSlot?: React.ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* Custom slot for the close button (overrides default close button)
|
|
65
|
+
*/
|
|
66
|
+
closeButtonSlot?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Custom slot for the form (overrides default form)
|
|
69
|
+
*/
|
|
70
|
+
formSlot?: React.ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Custom slot for the header area (overrides logo, title, description)
|
|
73
|
+
*/
|
|
74
|
+
headerSlot?: React.ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the sheet is open (controlled mode)
|
|
77
|
+
*/
|
|
78
|
+
open?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Callback when the sheet open state changes
|
|
81
|
+
*/
|
|
82
|
+
onOpenChange?: (open: boolean) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the sheet is open by default (uncontrolled mode)
|
|
85
|
+
*/
|
|
86
|
+
defaultOpen?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Optional custom submission handler for maximum flexibility.
|
|
89
|
+
*
|
|
90
|
+
* Use this when you need complete control over the submission logic,
|
|
91
|
+
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
92
|
+
*
|
|
93
|
+
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* onSubmit={async (email) => {
|
|
97
|
+
* await fetch("/api/subscribe", {
|
|
98
|
+
* method: "POST",
|
|
99
|
+
* body: JSON.stringify({ email, source: "offer-modal" })
|
|
100
|
+
* });
|
|
101
|
+
* }}
|
|
102
|
+
*/
|
|
103
|
+
onSubmit?: (email: string) => void | Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Optional form submission configuration.
|
|
106
|
+
*
|
|
107
|
+
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
108
|
+
* and the form will submit to it in JSON format.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* // Works with any API
|
|
112
|
+
* formConfig={{ endpoint: "https://api.mysite.com/subscribe", format: "json" }}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* // With custom headers (e.g., authentication)
|
|
116
|
+
* formConfig={{
|
|
117
|
+
* endpoint: "/api/newsletter",
|
|
118
|
+
* headers: { "Authorization": "Bearer token123" }
|
|
119
|
+
* }}
|
|
120
|
+
*
|
|
121
|
+
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
122
|
+
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
123
|
+
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
124
|
+
*
|
|
125
|
+
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
126
|
+
*/
|
|
127
|
+
formConfig?: PageSpeedFormConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Optional success callback invoked after successful submission.
|
|
130
|
+
*
|
|
131
|
+
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
132
|
+
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
133
|
+
*/
|
|
134
|
+
onSuccess?: (data: unknown) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Optional error callback invoked if submission fails.
|
|
137
|
+
*
|
|
138
|
+
* Receives the error object for custom error handling, logging, or user notifications.
|
|
139
|
+
*/
|
|
140
|
+
onError?: (error: Error) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Additional CSS classes for the sheet content wrapper
|
|
143
|
+
*/
|
|
144
|
+
className?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Additional CSS classes for the content area
|
|
147
|
+
*/
|
|
148
|
+
contentClassName?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Additional CSS classes for the header
|
|
151
|
+
*/
|
|
152
|
+
headerClassName?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the logo
|
|
155
|
+
*/
|
|
156
|
+
logoClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Additional CSS classes for the title
|
|
159
|
+
*/
|
|
160
|
+
titleClassName?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Additional CSS classes for the description
|
|
163
|
+
*/
|
|
164
|
+
descriptionClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Additional CSS classes for the form
|
|
167
|
+
*/
|
|
168
|
+
formClassName?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Additional CSS classes for the email input
|
|
171
|
+
*/
|
|
172
|
+
inputClassName?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Additional CSS classes for the submit button
|
|
175
|
+
*/
|
|
176
|
+
submitClassName?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Additional CSS classes for the legal text
|
|
179
|
+
*/
|
|
180
|
+
legalClassName?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Additional CSS classes for the image wrapper
|
|
183
|
+
*/
|
|
184
|
+
imageWrapperClassName?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Additional CSS classes for the image element
|
|
187
|
+
*/
|
|
188
|
+
imageClassName?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Optional configuration for OptixFlow image optimization
|
|
191
|
+
*/
|
|
192
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
193
|
+
/**
|
|
194
|
+
* Background style variant for the section
|
|
195
|
+
* @default "default"
|
|
196
|
+
*/
|
|
197
|
+
background?: SectionBackground;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* OfferModalSheetNewsletter - A side-sheet style newsletter signup modal that slides in from
|
|
201
|
+
* the right. Features a logo, compelling headline, description, email signup form with rounded
|
|
202
|
+
* inputs, legal consent links, and a square aspect ratio promotional image. The sheet design
|
|
203
|
+
* provides a more immersive experience while maintaining easy dismissal. Perfect for premium
|
|
204
|
+
* brands, lifestyle products, or any site wanting a sophisticated newsletter capture experience.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```tsx
|
|
208
|
+
* <OfferModalSheetNewsletter
|
|
209
|
+
* logo={{ src: "/logo.png", alt: "Brand Logo" }}
|
|
210
|
+
* title="Join Now & Enjoy 20% Off"
|
|
211
|
+
* description="Join our mailing list for updates and offers."
|
|
212
|
+
* image={{ src: "/promo.jpg", alt: "Promotional image" }}
|
|
213
|
+
* termsUrl="/terms"
|
|
214
|
+
* privacyUrl="/privacy"
|
|
215
|
+
* onSubmit={(email) => console.log('Subscribed:', email)}
|
|
216
|
+
* />
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
declare function OfferModalSheetNewsletter({ logo, logoSlot, title, description, image, imageSlot, emailPlaceholder, buttonText, termsUrl, termsText, privacyUrl, privacyText, legalSlot, closeButtonSlot, formSlot, headerSlot, open, onOpenChange, defaultOpen, onSubmit, formConfig, onSuccess, onError, className, contentClassName, headerClassName, logoClassName, titleClassName, descriptionClassName, formClassName, inputClassName, submitClassName, legalClassName, imageWrapperClassName, imageClassName, optixFlowConfig, background, }: OfferModalSheetNewsletterProps): React.JSX.Element;
|
|
220
|
+
|
|
221
|
+
export { OfferModalSheetNewsletter, type OfferModalSheetNewsletterProps };
|
|
@@ -0,0 +1,221 @@
|
|
|
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 { L as LogoItem, 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 OfferModalSheetNewsletterProps {
|
|
11
|
+
/**
|
|
12
|
+
* Logo configuration
|
|
13
|
+
*/
|
|
14
|
+
logo?: LogoItem;
|
|
15
|
+
/**
|
|
16
|
+
* Custom slot for rendering the logo (overrides logo prop)
|
|
17
|
+
*/
|
|
18
|
+
logoSlot?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Main title content for the offer
|
|
21
|
+
*/
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Description content below the title
|
|
25
|
+
*/
|
|
26
|
+
description?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Image configuration for the bottom section
|
|
29
|
+
*/
|
|
30
|
+
image?: ImageItem;
|
|
31
|
+
/**
|
|
32
|
+
* Custom slot for rendering the image (overrides image prop)
|
|
33
|
+
*/
|
|
34
|
+
imageSlot?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Placeholder text for the email input
|
|
37
|
+
*/
|
|
38
|
+
emailPlaceholder?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Text/content for the submit button
|
|
41
|
+
*/
|
|
42
|
+
buttonText?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Terms of use link URL
|
|
45
|
+
*/
|
|
46
|
+
termsUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Terms of use link text
|
|
49
|
+
*/
|
|
50
|
+
termsText?: React.ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Privacy policy link URL
|
|
53
|
+
*/
|
|
54
|
+
privacyUrl?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Privacy policy link text
|
|
57
|
+
*/
|
|
58
|
+
privacyText?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Custom slot for the legal text area (overrides terms/privacy links)
|
|
61
|
+
*/
|
|
62
|
+
legalSlot?: React.ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* Custom slot for the close button (overrides default close button)
|
|
65
|
+
*/
|
|
66
|
+
closeButtonSlot?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Custom slot for the form (overrides default form)
|
|
69
|
+
*/
|
|
70
|
+
formSlot?: React.ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Custom slot for the header area (overrides logo, title, description)
|
|
73
|
+
*/
|
|
74
|
+
headerSlot?: React.ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the sheet is open (controlled mode)
|
|
77
|
+
*/
|
|
78
|
+
open?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Callback when the sheet open state changes
|
|
81
|
+
*/
|
|
82
|
+
onOpenChange?: (open: boolean) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the sheet is open by default (uncontrolled mode)
|
|
85
|
+
*/
|
|
86
|
+
defaultOpen?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Optional custom submission handler for maximum flexibility.
|
|
89
|
+
*
|
|
90
|
+
* Use this when you need complete control over the submission logic,
|
|
91
|
+
* such as custom API calls, analytics tracking, or multi-step workflows.
|
|
92
|
+
*
|
|
93
|
+
* Can be used alone or in combination with `formConfig` for hybrid approaches.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* onSubmit={async (email) => {
|
|
97
|
+
* await fetch("/api/subscribe", {
|
|
98
|
+
* method: "POST",
|
|
99
|
+
* body: JSON.stringify({ email, source: "offer-modal" })
|
|
100
|
+
* });
|
|
101
|
+
* }}
|
|
102
|
+
*/
|
|
103
|
+
onSubmit?: (email: string) => void | Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Optional form submission configuration.
|
|
106
|
+
*
|
|
107
|
+
* **Universal Usage**: Works with ANY REST API endpoint. Simply provide an `endpoint` URL
|
|
108
|
+
* and the form will submit to it in JSON format.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* // Works with any API
|
|
112
|
+
* formConfig={{ endpoint: "https://api.mysite.com/subscribe", format: "json" }}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* // With custom headers (e.g., authentication)
|
|
116
|
+
* formConfig={{
|
|
117
|
+
* endpoint: "/api/newsletter",
|
|
118
|
+
* headers: { "Authorization": "Bearer token123" }
|
|
119
|
+
* }}
|
|
120
|
+
*
|
|
121
|
+
* **Note**: The `apiKey`, `contactCategoryToken`, and other platform-specific fields
|
|
122
|
+
* are OPTIONAL and only needed when integrating with DashTrack's Rails backend.
|
|
123
|
+
* For generic REST APIs, just use `endpoint`, `method`, `format`, and `headers`.
|
|
124
|
+
*
|
|
125
|
+
* See `FORMS_INTEGRATION_GUIDE.md` for complete examples with Next.js, React, and more.
|
|
126
|
+
*/
|
|
127
|
+
formConfig?: PageSpeedFormConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Optional success callback invoked after successful submission.
|
|
130
|
+
*
|
|
131
|
+
* Called after `formConfig` submission and/or `onSubmit` completes successfully.
|
|
132
|
+
* Use for showing success messages, redirecting, analytics tracking, etc.
|
|
133
|
+
*/
|
|
134
|
+
onSuccess?: (data: unknown) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Optional error callback invoked if submission fails.
|
|
137
|
+
*
|
|
138
|
+
* Receives the error object for custom error handling, logging, or user notifications.
|
|
139
|
+
*/
|
|
140
|
+
onError?: (error: Error) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Additional CSS classes for the sheet content wrapper
|
|
143
|
+
*/
|
|
144
|
+
className?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Additional CSS classes for the content area
|
|
147
|
+
*/
|
|
148
|
+
contentClassName?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Additional CSS classes for the header
|
|
151
|
+
*/
|
|
152
|
+
headerClassName?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes for the logo
|
|
155
|
+
*/
|
|
156
|
+
logoClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Additional CSS classes for the title
|
|
159
|
+
*/
|
|
160
|
+
titleClassName?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Additional CSS classes for the description
|
|
163
|
+
*/
|
|
164
|
+
descriptionClassName?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Additional CSS classes for the form
|
|
167
|
+
*/
|
|
168
|
+
formClassName?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Additional CSS classes for the email input
|
|
171
|
+
*/
|
|
172
|
+
inputClassName?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Additional CSS classes for the submit button
|
|
175
|
+
*/
|
|
176
|
+
submitClassName?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Additional CSS classes for the legal text
|
|
179
|
+
*/
|
|
180
|
+
legalClassName?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Additional CSS classes for the image wrapper
|
|
183
|
+
*/
|
|
184
|
+
imageWrapperClassName?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Additional CSS classes for the image element
|
|
187
|
+
*/
|
|
188
|
+
imageClassName?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Optional configuration for OptixFlow image optimization
|
|
191
|
+
*/
|
|
192
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
193
|
+
/**
|
|
194
|
+
* Background style variant for the section
|
|
195
|
+
* @default "default"
|
|
196
|
+
*/
|
|
197
|
+
background?: SectionBackground;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* OfferModalSheetNewsletter - A side-sheet style newsletter signup modal that slides in from
|
|
201
|
+
* the right. Features a logo, compelling headline, description, email signup form with rounded
|
|
202
|
+
* inputs, legal consent links, and a square aspect ratio promotional image. The sheet design
|
|
203
|
+
* provides a more immersive experience while maintaining easy dismissal. Perfect for premium
|
|
204
|
+
* brands, lifestyle products, or any site wanting a sophisticated newsletter capture experience.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```tsx
|
|
208
|
+
* <OfferModalSheetNewsletter
|
|
209
|
+
* logo={{ src: "/logo.png", alt: "Brand Logo" }}
|
|
210
|
+
* title="Join Now & Enjoy 20% Off"
|
|
211
|
+
* description="Join our mailing list for updates and offers."
|
|
212
|
+
* image={{ src: "/promo.jpg", alt: "Promotional image" }}
|
|
213
|
+
* termsUrl="/terms"
|
|
214
|
+
* privacyUrl="/privacy"
|
|
215
|
+
* onSubmit={(email) => console.log('Subscribed:', email)}
|
|
216
|
+
* />
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
declare function OfferModalSheetNewsletter({ logo, logoSlot, title, description, image, imageSlot, emailPlaceholder, buttonText, termsUrl, termsText, privacyUrl, privacyText, legalSlot, closeButtonSlot, formSlot, headerSlot, open, onOpenChange, defaultOpen, onSubmit, formConfig, onSuccess, onError, className, contentClassName, headerClassName, logoClassName, titleClassName, descriptionClassName, formClassName, inputClassName, submitClassName, legalClassName, imageWrapperClassName, imageClassName, optixFlowConfig, background, }: OfferModalSheetNewsletterProps): React.JSX.Element;
|
|
220
|
+
|
|
221
|
+
export { OfferModalSheetNewsletter, type OfferModalSheetNewsletterProps };
|