@drawbridge/components 0.0.78 → 0.1.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.
- package/README.md +23 -1
- package/components/styles.css +228 -0
- package/dist/advertisement.js +64 -1047
- package/dist/advertisement.mjs +50 -41
- package/dist/bridge/advertisements.js +230 -0
- package/dist/bridge/advertisements.mjs +201 -0
- package/dist/bridge/countdown.js +88 -0
- package/dist/bridge/countdown.mjs +59 -0
- package/dist/bridge/fields.js +306 -0
- package/dist/bridge/fields.mjs +271 -0
- package/dist/bridge/form-subdomain-embed.js +283 -0
- package/dist/bridge/form-subdomain-embed.mjs +254 -0
- package/dist/bridge/form-subdomain-header.js +118 -0
- package/dist/bridge/form-subdomain-header.mjs +85 -0
- package/dist/bridge/form-subdomain-issue.js +265 -0
- package/dist/bridge/form-subdomain-issue.mjs +236 -0
- package/dist/bridge/form-subdomain-prize.js +160 -0
- package/dist/bridge/form-subdomain-prize.mjs +131 -0
- package/dist/bridge/form-subdomain-shop-modal.js +557 -0
- package/dist/bridge/form-subdomain-shop-modal.mjs +523 -0
- package/dist/bridge/form-subdomain-shop.js +64 -0
- package/dist/bridge/form-subdomain-shop.mjs +35 -0
- package/dist/bridge/form-subdomain.js +1012 -0
- package/dist/bridge/form-subdomain.mjs +977 -0
- package/dist/bridge/lib/age-gate.js +55 -0
- package/dist/bridge/lib/age-gate.mjs +21 -0
- package/dist/bridge/lib/checkout-kit.js +141 -0
- package/dist/bridge/lib/checkout-kit.mjs +107 -0
- package/dist/bridge/lib/constants.js +24 -0
- package/dist/bridge/lib/constants.mjs +5 -0
- package/dist/bridge/lib/css.js +31 -0
- package/dist/bridge/lib/css.mjs +8 -0
- package/dist/bridge/lib/recaptcha.js +31 -0
- package/dist/bridge/lib/recaptcha.mjs +8 -0
- package/dist/bridge/lib/url.js +64 -0
- package/dist/bridge/lib/url.mjs +39 -0
- package/dist/{embla.js → bridge/lib/yup.js} +10 -10
- package/dist/bridge/lib/yup.mjs +8 -0
- package/dist/bridge/product-tile.js +122 -0
- package/dist/bridge/product-tile.mjs +93 -0
- package/dist/bridge/provider-analytics.js +184 -0
- package/dist/bridge/provider-analytics.mjs +150 -0
- package/dist/bridge/share-button.js +239 -0
- package/dist/bridge/share-button.mjs +227 -0
- package/dist/bridge/subdomain-content.js +195 -0
- package/dist/bridge/subdomain-content.mjs +166 -0
- package/dist/bridge/template-layout.js +733 -0
- package/dist/bridge/template-layout.mjs +704 -0
- package/dist/bridge/template-modal.js +638 -0
- package/dist/bridge/template-modal.mjs +609 -0
- package/dist/bridge/template-not-found.js +83 -0
- package/dist/bridge/template-not-found.mjs +54 -0
- package/dist/bridge/template-subdomain-gallery.js +524 -0
- package/dist/bridge/template-subdomain-gallery.mjs +495 -0
- package/dist/bridge/template-subdomain-link.js +134 -0
- package/dist/bridge/template-subdomain-link.mjs +105 -0
- package/dist/bridge/template-subdomain.js +423 -0
- package/dist/bridge/template-subdomain.mjs +394 -0
- package/dist/dashboard/accordion.js +141 -0
- package/dist/dashboard/accordion.mjs +112 -0
- package/dist/dashboard/avatar.js +76 -0
- package/dist/dashboard/avatar.mjs +47 -0
- package/dist/dashboard/card-affiliate.js +266 -0
- package/dist/dashboard/card-affiliate.mjs +237 -0
- package/dist/dashboard/card-connection.js +214 -0
- package/dist/dashboard/card-connection.mjs +181 -0
- package/dist/dashboard/card-data-item.js +76 -0
- package/dist/dashboard/card-data-item.mjs +57 -0
- package/dist/dashboard/card-integration.js +187 -0
- package/dist/dashboard/card-integration.mjs +158 -0
- package/dist/dashboard/card-metric.js +147 -0
- package/dist/dashboard/card-metric.mjs +118 -0
- package/dist/dashboard/card-note.js +151 -0
- package/dist/dashboard/card-note.mjs +122 -0
- package/dist/dashboard/card-order.js +236 -0
- package/dist/dashboard/card-order.mjs +207 -0
- package/dist/dashboard/card-overage.js +307 -0
- package/dist/dashboard/card-overage.mjs +278 -0
- package/dist/dashboard/card-payment-method.js +82 -0
- package/dist/dashboard/card-payment-method.mjs +63 -0
- package/dist/dashboard/card-plan.js +363 -0
- package/dist/dashboard/card-plan.mjs +334 -0
- package/dist/dashboard/card-product.js +86 -0
- package/dist/dashboard/card-product.mjs +57 -0
- package/dist/dashboard/card-score.js +201 -0
- package/dist/dashboard/card-score.mjs +172 -0
- package/dist/dashboard/card-section.js +82 -0
- package/dist/dashboard/card-section.mjs +63 -0
- package/dist/dashboard/card-setting.js +136 -0
- package/dist/dashboard/card-setting.mjs +107 -0
- package/dist/dashboard/card-task.js +133 -0
- package/dist/dashboard/card-task.mjs +104 -0
- package/dist/dashboard/card-template.js +197 -0
- package/dist/dashboard/card-template.mjs +168 -0
- package/dist/dashboard/card-tile.js +459 -0
- package/dist/dashboard/card-tile.mjs +425 -0
- package/dist/dashboard/card-utm.js +83 -0
- package/dist/dashboard/card-utm.mjs +54 -0
- package/dist/dashboard/carousel-tiles.js +64 -0
- package/dist/dashboard/carousel-tiles.mjs +35 -0
- package/dist/dashboard/code-formatter.js +134 -0
- package/dist/dashboard/code-formatter.mjs +105 -0
- package/dist/dashboard/drawer-subscription.js +762 -0
- package/dist/dashboard/drawer-subscription.mjs +733 -0
- package/dist/dashboard/drawer.js +143 -0
- package/dist/dashboard/drawer.mjs +114 -0
- package/dist/dashboard/dropdown.js +154 -0
- package/dist/dashboard/dropdown.mjs +125 -0
- package/dist/dashboard/form-action.js +120 -0
- package/dist/dashboard/form-action.mjs +91 -0
- package/dist/dashboard/form-address.js +98 -0
- package/dist/dashboard/form-address.mjs +69 -0
- package/dist/dashboard/form-admin-campaign.js +161 -0
- package/dist/dashboard/form-admin-campaign.mjs +132 -0
- package/dist/dashboard/form-admin-invoice-refund.js +153 -0
- package/dist/dashboard/form-admin-invoice-refund.mjs +124 -0
- package/dist/dashboard/form-admin-oauth.js +327 -0
- package/dist/dashboard/form-admin-oauth.mjs +298 -0
- package/dist/dashboard/form-admin-organization.js +231 -0
- package/dist/dashboard/form-admin-organization.mjs +202 -0
- package/dist/dashboard/form-admin-provider.js +286 -0
- package/dist/dashboard/form-admin-provider.mjs +257 -0
- package/dist/dashboard/form-admin-referrer.js +227 -0
- package/dist/dashboard/form-admin-referrer.mjs +198 -0
- package/dist/dashboard/form-admin-subscription-custom.js +285 -0
- package/dist/dashboard/form-admin-subscription-custom.mjs +256 -0
- package/dist/dashboard/form-admin-template.js +514 -0
- package/dist/dashboard/form-admin-template.mjs +481 -0
- package/dist/dashboard/form-admin-user-credit.js +141 -0
- package/dist/dashboard/form-admin-user-credit.mjs +112 -0
- package/dist/dashboard/form-admin-user-permissions.js +141 -0
- package/dist/dashboard/form-admin-user-permissions.mjs +112 -0
- package/dist/dashboard/form-admin-user-status.js +151 -0
- package/dist/dashboard/form-admin-user-status.mjs +122 -0
- package/dist/dashboard/form-admin-utm.js +400 -0
- package/dist/dashboard/form-admin-utm.mjs +371 -0
- package/dist/dashboard/form-ai.js +779 -0
- package/dist/dashboard/form-ai.mjs +742 -0
- package/dist/dashboard/form-auth.js +597 -0
- package/dist/dashboard/form-auth.mjs +561 -0
- package/dist/dashboard/form-credit.js +80 -0
- package/dist/dashboard/form-credit.mjs +51 -0
- package/dist/dashboard/form-file-upload.js +527 -0
- package/dist/dashboard/form-file-upload.mjs +498 -0
- package/dist/dashboard/form-file.js +367 -0
- package/dist/dashboard/form-file.mjs +338 -0
- package/dist/dashboard/form-filters-analytics.js +294 -0
- package/dist/dashboard/form-filters-analytics.mjs +265 -0
- package/dist/dashboard/form-filters.js +411 -0
- package/dist/dashboard/form-filters.mjs +382 -0
- package/dist/dashboard/form-note.js +143 -0
- package/dist/dashboard/form-note.mjs +114 -0
- package/dist/dashboard/form-notification.js +173 -0
- package/dist/dashboard/form-notification.mjs +140 -0
- package/dist/dashboard/form-organization-affiliate.js +301 -0
- package/dist/dashboard/form-organization-affiliate.mjs +268 -0
- package/dist/dashboard/form-organization-brand.js +333 -0
- package/dist/dashboard/form-organization-brand.mjs +299 -0
- package/dist/dashboard/form-organization-campaign-advertisement.js +460 -0
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +427 -0
- package/dist/dashboard/form-organization-campaign-agreement.js +251 -0
- package/dist/dashboard/form-organization-campaign-agreement.mjs +222 -0
- package/dist/dashboard/form-organization-campaign-draw.js +458 -0
- package/dist/dashboard/form-organization-campaign-draw.mjs +429 -0
- package/dist/dashboard/form-organization-campaign-field-email.js +401 -0
- package/dist/dashboard/form-organization-campaign-field-email.mjs +372 -0
- package/dist/dashboard/form-organization-campaign-field-name.js +185 -0
- package/dist/dashboard/form-organization-campaign-field-name.mjs +156 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +228 -0
- package/dist/dashboard/form-organization-campaign-field-number.mjs +199 -0
- package/dist/dashboard/form-organization-campaign-field-phone.js +229 -0
- package/dist/dashboard/form-organization-campaign-field-phone.mjs +200 -0
- package/dist/dashboard/form-organization-campaign-field-select.js +258 -0
- package/dist/dashboard/form-organization-campaign-field-select.mjs +229 -0
- package/dist/dashboard/form-organization-campaign-field-text.js +202 -0
- package/dist/dashboard/form-organization-campaign-field-text.mjs +173 -0
- package/dist/dashboard/form-organization-campaign-field-textarea.js +236 -0
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +207 -0
- package/dist/dashboard/form-organization-campaign-integration-age.js +214 -0
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +185 -0
- package/dist/dashboard/form-organization-campaign-integration-enable.js +105 -0
- package/dist/dashboard/form-organization-campaign-integration-enable.mjs +76 -0
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +188 -0
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +159 -0
- package/dist/dashboard/form-organization-campaign-integration-gtm.js +176 -0
- package/dist/dashboard/form-organization-campaign-integration-gtm.mjs +147 -0
- package/dist/dashboard/form-organization-campaign-lead.js +212 -0
- package/dist/dashboard/form-organization-campaign-lead.mjs +183 -0
- package/dist/dashboard/form-organization-campaign-link.js +241 -0
- package/dist/dashboard/form-organization-campaign-link.mjs +212 -0
- package/dist/dashboard/form-organization-campaign-page-affiliates.js +133 -0
- package/dist/dashboard/form-organization-campaign-page-affiliates.mjs +104 -0
- package/dist/dashboard/form-organization-campaign-page-embed.js +102 -0
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +73 -0
- package/dist/dashboard/form-organization-campaign-page-preview.js +245 -0
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +216 -0
- package/dist/dashboard/form-organization-campaign-page-qr.js +417 -0
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +384 -0
- package/dist/dashboard/form-organization-campaign-page-share.js +484 -0
- package/dist/dashboard/form-organization-campaign-page-share.mjs +455 -0
- package/dist/dashboard/form-organization-campaign-page-slug.js +187 -0
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +158 -0
- package/dist/dashboard/form-organization-campaign-page.js +400 -0
- package/dist/dashboard/form-organization-campaign-page.mjs +366 -0
- package/dist/dashboard/form-organization-campaign-prize-edit.js +543 -0
- package/dist/dashboard/form-organization-campaign-prize-edit.mjs +514 -0
- package/dist/dashboard/form-organization-campaign-prize.js +141 -0
- package/dist/dashboard/form-organization-campaign-prize.mjs +112 -0
- package/dist/dashboard/form-organization-campaign-range.js +269 -0
- package/dist/dashboard/form-organization-campaign-range.mjs +240 -0
- package/dist/dashboard/form-organization-campaign.js +1106 -0
- package/dist/dashboard/form-organization-campaign.mjs +1067 -0
- package/dist/dashboard/form-organization-connection.js +545 -0
- package/dist/dashboard/form-organization-connection.mjs +512 -0
- package/dist/dashboard/form-organization-export.js +289 -0
- package/dist/dashboard/form-organization-export.mjs +260 -0
- package/dist/dashboard/form-organization-file-frame.js +168 -0
- package/dist/dashboard/form-organization-file-frame.mjs +139 -0
- package/dist/dashboard/form-organization-file.js +332 -0
- package/dist/dashboard/form-organization-file.mjs +303 -0
- package/dist/dashboard/form-organization-identity.js +800 -0
- package/dist/dashboard/form-organization-identity.mjs +765 -0
- package/dist/dashboard/form-organization-member.js +332 -0
- package/dist/dashboard/form-organization-member.mjs +303 -0
- package/dist/dashboard/form-organization-segment.js +441 -0
- package/dist/dashboard/form-organization-segment.mjs +412 -0
- package/dist/dashboard/form-organization-workflow.js +1145 -0
- package/dist/dashboard/form-organization-workflow.mjs +1109 -0
- package/dist/dashboard/form-organization.js +788 -0
- package/dist/dashboard/form-organization.mjs +751 -0
- package/dist/dashboard/form-otc.js +228 -0
- package/dist/dashboard/form-otc.mjs +194 -0
- package/dist/dashboard/form-payment-methods.js +183 -0
- package/dist/dashboard/form-payment-methods.mjs +154 -0
- package/dist/dashboard/form-profile.js +281 -0
- package/dist/dashboard/form-profile.mjs +248 -0
- package/dist/dashboard/form-stripe-promotion.js +142 -0
- package/dist/dashboard/form-stripe-promotion.mjs +113 -0
- package/dist/dashboard/form-stripe.js +236 -0
- package/dist/dashboard/form-stripe.mjs +207 -0
- package/dist/dashboard/form-verify-prize.js +342 -0
- package/dist/dashboard/form-verify-prize.mjs +309 -0
- package/dist/dashboard/google.js +671 -0
- package/dist/dashboard/google.mjs +637 -0
- package/dist/dashboard/guard-navigation.js +228 -0
- package/dist/dashboard/guard-navigation.mjs +195 -0
- package/dist/dashboard/guide.js +238 -0
- package/dist/dashboard/guide.mjs +209 -0
- package/dist/dashboard/iframe.js +159 -0
- package/dist/dashboard/iframe.mjs +130 -0
- package/dist/dashboard/input-address-saved.js +288 -0
- package/dist/dashboard/input-address-saved.mjs +259 -0
- package/dist/dashboard/input-array.js +272 -0
- package/dist/dashboard/input-array.mjs +236 -0
- package/dist/dashboard/input-color.js +192 -0
- package/dist/dashboard/input-color.mjs +163 -0
- package/dist/dashboard/input-combobox.js +281 -0
- package/dist/dashboard/input-combobox.mjs +258 -0
- package/dist/dashboard/input-date.js +234 -0
- package/dist/dashboard/input-date.mjs +201 -0
- package/dist/dashboard/input-editor.js +476 -0
- package/dist/dashboard/input-editor.mjs +441 -0
- package/dist/dashboard/input-fields.js +1101 -0
- package/dist/dashboard/input-fields.mjs +1060 -0
- package/dist/dashboard/input-file.js +188 -0
- package/dist/dashboard/input-file.mjs +159 -0
- package/dist/dashboard/input-font.js +506 -0
- package/dist/dashboard/input-font.mjs +477 -0
- package/dist/dashboard/input-group-ai.js +157 -0
- package/dist/dashboard/input-group-ai.mjs +128 -0
- package/dist/dashboard/input-radio.js +126 -0
- package/dist/dashboard/input-radio.mjs +97 -0
- package/dist/dashboard/input-resource.js +206 -0
- package/dist/dashboard/input-resource.mjs +177 -0
- package/dist/dashboard/input-secret.js +221 -0
- package/dist/dashboard/input-secret.mjs +192 -0
- package/dist/dashboard/input-time.js +100 -0
- package/dist/dashboard/input-time.mjs +71 -0
- package/dist/dashboard/lib/confetti.js +70 -0
- package/dist/dashboard/lib/confetti.mjs +37 -0
- package/dist/dashboard/lib/connection-controls.js +34 -0
- package/dist/dashboard/lib/connection-controls.mjs +11 -0
- package/dist/dashboard/lib/features.js +57 -0
- package/dist/dashboard/lib/features.mjs +22 -0
- package/dist/dashboard/lib/frames.js +35 -0
- package/dist/dashboard/lib/frames.mjs +11 -0
- package/dist/dashboard/lib/geo.js +138 -0
- package/dist/dashboard/lib/geo.mjs +113 -0
- package/dist/dashboard/lib/hooks.js +426 -0
- package/dist/dashboard/lib/hooks.mjs +397 -0
- package/dist/dashboard/lib/navigation.js +46 -0
- package/dist/dashboard/lib/navigation.mjs +23 -0
- package/dist/dashboard/lib/otc.js +45 -0
- package/dist/dashboard/lib/otc.mjs +22 -0
- package/dist/dashboard/lib/overage.js +30 -0
- package/dist/dashboard/lib/overage.mjs +6 -0
- package/dist/dashboard/lib/table-actions.js +108 -0
- package/dist/dashboard/lib/table-actions.mjs +75 -0
- package/dist/dashboard/lib/time-slots.js +72 -0
- package/dist/dashboard/lib/time-slots.mjs +44 -0
- package/dist/dashboard/lib/trickle.js +31 -0
- package/dist/dashboard/lib/trickle.mjs +8 -0
- package/dist/dashboard/lib/uppy.js +202 -0
- package/dist/dashboard/lib/uppy.mjs +166 -0
- package/dist/dashboard/lib/utm.js +66 -0
- package/dist/dashboard/lib/utm.mjs +42 -0
- package/dist/dashboard/link-back.js +94 -0
- package/dist/dashboard/link-back.mjs +65 -0
- package/dist/dashboard/link.js +129 -0
- package/dist/dashboard/link.mjs +95 -0
- package/dist/dashboard/list-resource.js +184 -0
- package/dist/dashboard/list-resource.mjs +155 -0
- package/dist/dashboard/list.js +96 -0
- package/dist/dashboard/list.mjs +67 -0
- package/dist/dashboard/menu.js +778 -0
- package/dist/dashboard/menu.mjs +740 -0
- package/dist/dashboard/modal.js +194 -0
- package/dist/dashboard/modal.mjs +165 -0
- package/dist/dashboard/notes.js +169 -0
- package/dist/dashboard/notes.mjs +140 -0
- package/dist/dashboard/notice.js +138 -0
- package/dist/dashboard/notice.mjs +109 -0
- package/dist/dashboard/paged.js +430 -0
- package/dist/dashboard/paged.mjs +401 -0
- package/dist/dashboard/provider-resource.js +102 -0
- package/dist/dashboard/provider-resource.mjs +73 -0
- package/dist/dashboard/provider-ui.js +255 -0
- package/dist/dashboard/provider-ui.mjs +226 -0
- package/dist/dashboard/provider.js +79 -0
- package/dist/dashboard/provider.mjs +50 -0
- package/dist/dashboard/recharts.js +630 -0
- package/dist/dashboard/recharts.mjs +596 -0
- package/dist/dashboard/steps.js +263 -0
- package/dist/dashboard/steps.mjs +229 -0
- package/dist/dashboard/swatch.js +81 -0
- package/dist/dashboard/swatch.mjs +52 -0
- package/dist/dashboard/table-cell-title.js +207 -0
- package/dist/dashboard/table-cell-title.mjs +174 -0
- package/dist/dashboard/table.js +765 -0
- package/dist/dashboard/table.mjs +723 -0
- package/dist/dashboard/template-dashboard.js +697 -0
- package/dist/dashboard/template-dashboard.mjs +662 -0
- package/dist/dashboard/template-not-found.js +124 -0
- package/dist/dashboard/template-not-found.mjs +95 -0
- package/dist/dashboard/template-socket.js +502 -0
- package/dist/dashboard/template-socket.mjs +466 -0
- package/dist/dashboard/template-suspended.js +64 -0
- package/dist/dashboard/template-suspended.mjs +41 -0
- package/dist/dashboard/template-ui.js +535 -0
- package/dist/dashboard/template-ui.mjs +506 -0
- package/dist/dashboard/wrapper-ai.js +79 -0
- package/dist/dashboard/wrapper-ai.mjs +50 -0
- package/dist/icons/arrow-down-tray.js +1 -3
- package/dist/icons/arrow-down-tray.mjs +1 -2
- package/dist/icons/arrow-left.js +1 -3
- package/dist/icons/arrow-left.mjs +1 -2
- package/dist/icons/arrow-right.js +1 -3
- package/dist/icons/arrow-right.mjs +1 -2
- package/dist/icons/arrow-up-tray.js +1 -3
- package/dist/icons/arrow-up-tray.mjs +1 -2
- package/dist/icons/bars-arrow-down.js +1 -3
- package/dist/icons/bars-arrow-down.mjs +1 -2
- package/dist/icons/bars-arrow-up.js +1 -3
- package/dist/icons/bars-arrow-up.mjs +1 -2
- package/dist/icons/bold.js +1 -3
- package/dist/icons/bold.mjs +1 -2
- package/dist/icons/bolt.js +1 -3
- package/dist/icons/bolt.mjs +1 -2
- package/dist/icons/calendar.js +1 -3
- package/dist/icons/calendar.mjs +1 -2
- package/dist/icons/cancel.js +1 -3
- package/dist/icons/cancel.mjs +1 -2
- package/dist/icons/card.js +1 -3
- package/dist/icons/card.mjs +1 -2
- package/dist/icons/chart.js +1 -3
- package/dist/icons/chart.mjs +1 -2
- package/dist/icons/check.js +1 -3
- package/dist/icons/check.mjs +24 -3
- package/dist/icons/chevron-down.js +1 -3
- package/dist/icons/chevron-down.mjs +24 -3
- package/dist/icons/chevron-left.js +1 -3
- package/dist/icons/chevron-left.mjs +1 -2
- package/dist/icons/chevron-right.js +1 -3
- package/dist/icons/chevron-right.mjs +1 -2
- package/dist/icons/chevron-up-down.js +1 -3
- package/dist/icons/chevron-up-down.mjs +1 -2
- package/dist/icons/chevron-up.js +1 -3
- package/dist/icons/chevron-up.mjs +1 -2
- package/dist/icons/clock.js +1 -3
- package/dist/icons/clock.mjs +1 -2
- package/dist/icons/code-bracket.js +1 -3
- package/dist/icons/code-bracket.mjs +1 -2
- package/dist/icons/cog.js +1 -3
- package/dist/icons/cog.mjs +1 -2
- package/dist/icons/copy.js +1 -3
- package/dist/icons/copy.mjs +1 -2
- package/dist/icons/discord.js +1 -3
- package/dist/icons/discord.mjs +13 -3
- package/dist/icons/document.js +1 -3
- package/dist/icons/document.mjs +1 -2
- package/dist/icons/download.js +1 -3
- package/dist/icons/download.mjs +1 -2
- package/dist/icons/drag.js +1 -3
- package/dist/icons/drag.mjs +1 -2
- package/dist/icons/ellipsis.js +1 -3
- package/dist/icons/ellipsis.mjs +1 -2
- package/dist/icons/email.js +1 -3
- package/dist/icons/email.mjs +1 -2
- package/dist/icons/external.js +1 -3
- package/dist/icons/external.mjs +1 -2
- package/dist/icons/facebook.js +1 -3
- package/dist/icons/facebook.mjs +13 -3
- package/dist/icons/filter.js +1 -3
- package/dist/icons/filter.mjs +1 -2
- package/dist/icons/flag.js +1 -3
- package/dist/icons/flag.mjs +1 -2
- package/dist/icons/github.js +1 -3
- package/dist/icons/github.mjs +13 -3
- package/dist/icons/google.js +1 -3
- package/dist/icons/google.mjs +1 -2
- package/dist/icons/home.js +1 -3
- package/dist/icons/home.mjs +1 -2
- package/dist/icons/image.js +1 -3
- package/dist/icons/image.mjs +1 -2
- package/dist/icons/instagram.js +1 -3
- package/dist/icons/instagram.mjs +13 -3
- package/dist/icons/italic.js +1 -3
- package/dist/icons/italic.mjs +1 -2
- package/dist/icons/link.js +1 -3
- package/dist/icons/link.mjs +1 -2
- package/dist/icons/linkedin.js +1 -3
- package/dist/icons/linkedin.mjs +13 -3
- package/dist/icons/loader.js +1 -3
- package/dist/icons/loader.mjs +40 -3
- package/dist/icons/lock.js +1 -3
- package/dist/icons/lock.mjs +1 -2
- package/dist/icons/logo-mark.js +1 -3
- package/dist/icons/logo-mark.mjs +1 -2
- package/dist/icons/logo-tagline.js +1 -3
- package/dist/icons/logo-tagline.mjs +1 -2
- package/dist/icons/map-pin.js +1 -3
- package/dist/icons/map-pin.mjs +1 -2
- package/dist/icons/menu.js +1 -3
- package/dist/icons/menu.mjs +1 -2
- package/dist/icons/minus.js +1 -3
- package/dist/icons/minus.mjs +24 -3
- package/dist/icons/muted.js +1 -3
- package/dist/icons/muted.mjs +1 -2
- package/dist/icons/pause.js +1 -3
- package/dist/icons/pause.mjs +1 -2
- package/dist/icons/pencil.js +1 -3
- package/dist/icons/pencil.mjs +1 -2
- package/dist/icons/pinterest.js +1 -3
- package/dist/icons/pinterest.mjs +13 -3
- package/dist/icons/play.js +1 -3
- package/dist/icons/play.mjs +1 -2
- package/dist/icons/plus.js +1 -3
- package/dist/icons/plus.mjs +24 -3
- package/dist/icons/powered-by.js +1 -3
- package/dist/icons/powered-by.mjs +1 -2
- package/dist/icons/qr-code.js +1 -3
- package/dist/icons/qr-code.mjs +1 -2
- package/dist/icons/queue.js +1 -3
- package/dist/icons/queue.mjs +1 -2
- package/dist/icons/refresh.js +1 -3
- package/dist/icons/refresh.mjs +1 -2
- package/dist/icons/refund.js +1 -3
- package/dist/icons/refund.mjs +1 -2
- package/dist/icons/rocket.js +1 -3
- package/dist/icons/rocket.mjs +1 -2
- package/dist/icons/search.js +1 -3
- package/dist/icons/search.mjs +1 -2
- package/dist/icons/share.js +1 -3
- package/dist/icons/share.mjs +1 -2
- package/dist/icons/shop.js +1 -3
- package/dist/icons/shop.mjs +1 -2
- package/dist/icons/snapchat.js +1 -3
- package/dist/icons/snapchat.mjs +13 -3
- package/dist/icons/social.js +39 -229
- package/dist/icons/social.mjs +29 -59
- package/dist/icons/sparkles.js +1 -3
- package/dist/icons/sparkles.mjs +1 -2
- package/dist/icons/spotify.js +1 -3
- package/dist/icons/spotify.mjs +13 -3
- package/dist/icons/star.js +1 -3
- package/dist/icons/star.mjs +1 -2
- package/dist/icons/switch.js +1 -3
- package/dist/icons/switch.mjs +1 -2
- package/dist/icons/threads.js +1 -3
- package/dist/icons/threads.mjs +13 -3
- package/dist/icons/tiktok.js +1 -3
- package/dist/icons/tiktok.mjs +13 -3
- package/dist/icons/times.js +1 -3
- package/dist/icons/times.mjs +1 -2
- package/dist/icons/trash.js +1 -3
- package/dist/icons/trash.mjs +1 -2
- package/dist/icons/twitch.js +1 -3
- package/dist/icons/twitch.mjs +13 -3
- package/dist/icons/underline.js +1 -3
- package/dist/icons/underline.mjs +1 -2
- package/dist/icons/upload.js +1 -3
- package/dist/icons/upload.mjs +1 -2
- package/dist/icons/volume.js +1 -3
- package/dist/icons/volume.mjs +1 -2
- package/dist/icons/warning.js +1 -3
- package/dist/icons/warning.mjs +24 -3
- package/dist/icons/whatsapp.js +1 -3
- package/dist/icons/whatsapp.mjs +13 -3
- package/dist/icons/x.js +1 -3
- package/dist/icons/x.mjs +13 -3
- package/dist/icons/youtube.js +1 -3
- package/dist/icons/youtube.mjs +13 -3
- package/dist/input-checkbox.js +37 -72
- package/dist/input-checkbox.mjs +24 -19
- package/dist/input-group.js +43 -153
- package/dist/input-group.mjs +125 -6
- package/dist/input-name.js +27 -294
- package/dist/input-name.mjs +9 -18
- package/dist/input-number.js +51 -106
- package/dist/input-number.mjs +32 -31
- package/dist/input-phone.js +28 -74
- package/dist/input-phone.mjs +15 -17
- package/dist/input-select.js +27 -63
- package/dist/input-select.mjs +91 -5
- package/dist/input-text.js +3 -27
- package/dist/input-text.mjs +29 -4
- package/dist/input-textarea.js +7 -28
- package/dist/input-textarea.mjs +6 -7
- package/dist/product.js +98 -726
- package/dist/product.mjs +375 -11
- package/dist/provider-font.js +10 -26
- package/dist/provider-font.mjs +4 -10
- package/dist/shared/address-lines.js +74 -0
- package/dist/shared/address-lines.mjs +55 -0
- package/dist/shared/badge.js +88 -0
- package/dist/shared/badge.mjs +59 -0
- package/dist/shared/button.js +106 -0
- package/dist/shared/button.mjs +77 -0
- package/dist/shared/card-asset.js +139 -0
- package/dist/shared/card-asset.mjs +110 -0
- package/dist/shared/card-prize.js +188 -0
- package/dist/shared/card-prize.mjs +159 -0
- package/dist/shared/carousel.js +175 -0
- package/dist/shared/carousel.mjs +146 -0
- package/dist/shared/copy-to-clipboard.js +129 -0
- package/dist/shared/copy-to-clipboard.mjs +100 -0
- package/dist/shared/divider.js +67 -0
- package/dist/shared/divider.mjs +48 -0
- package/dist/shared/empty.js +56 -0
- package/dist/shared/empty.mjs +37 -0
- package/dist/shared/error.js +112 -0
- package/dist/shared/error.mjs +83 -0
- package/dist/shared/fieldset.js +76 -0
- package/dist/shared/fieldset.mjs +57 -0
- package/dist/shared/form.js +48 -0
- package/dist/shared/form.mjs +29 -0
- package/dist/shared/indicator.js +50 -0
- package/dist/shared/indicator.mjs +31 -0
- package/dist/shared/input-checkbox-list.js +114 -0
- package/dist/shared/input-checkbox-list.mjs +85 -0
- package/dist/shared/input-range.js +111 -0
- package/dist/shared/input-range.mjs +92 -0
- package/dist/shared/input-switch.js +111 -0
- package/dist/shared/input-switch.mjs +82 -0
- package/dist/{embla-fade.js → shared/input-url.js} +18 -13
- package/dist/shared/input-url.mjs +17 -0
- package/dist/shared/lib/form.js +85 -0
- package/dist/shared/lib/form.mjs +59 -0
- package/dist/shared/lib/helpers.js +401 -0
- package/dist/shared/lib/helpers.mjs +341 -0
- package/dist/shared/lib/icon-labels.js +53 -0
- package/dist/shared/lib/icon-labels.mjs +20 -0
- package/dist/shared/lib/yup.js +83 -0
- package/dist/shared/lib/yup.mjs +50 -0
- package/dist/shared/loader.js +124 -0
- package/dist/shared/loader.mjs +90 -0
- package/dist/shared/overlay.js +73 -0
- package/dist/shared/overlay.mjs +44 -0
- package/dist/shared/progress.js +75 -0
- package/dist/shared/progress.mjs +56 -0
- package/dist/shared/provider-recaptcha.js +43 -0
- package/dist/shared/provider-recaptcha.mjs +24 -0
- package/dist/shared/sortable.js +227 -0
- package/dist/shared/sortable.mjs +198 -0
- package/dist/shared/tabs.js +140 -0
- package/dist/shared/tabs.mjs +111 -0
- package/dist/shared/tooltip.js +108 -0
- package/dist/shared/tooltip.mjs +79 -0
- package/dist/styles.js +27 -23
- package/dist/styles.mjs +89 -18
- package/dist/video.js +16 -86
- package/dist/video.mjs +8 -14
- package/dist/wrapper-gradient.js +4 -6
- package/dist/wrapper-gradient.mjs +202 -4
- package/package.json +988 -18
- package/types/bridge/advertisements.d.ts +33 -0
- package/types/bridge/countdown.d.ts +11 -0
- package/types/bridge/fields.d.ts +29 -0
- package/types/bridge/form-subdomain-embed.d.ts +26 -0
- package/types/bridge/form-subdomain-header.d.ts +14 -0
- package/types/bridge/form-subdomain-issue.d.ts +16 -0
- package/types/bridge/form-subdomain-prize.d.ts +22 -0
- package/types/bridge/form-subdomain-shop-modal.d.ts +41 -0
- package/types/bridge/form-subdomain-shop.d.ts +14 -0
- package/types/bridge/form-subdomain.d.ts +69 -0
- package/types/bridge/lib/age-gate.d.ts +11 -0
- package/types/bridge/lib/checkout-kit.d.ts +27 -0
- package/types/bridge/lib/constants.d.ts +5 -0
- package/types/bridge/lib/css.d.ts +3 -0
- package/types/bridge/lib/recaptcha.d.ts +5 -0
- package/types/bridge/lib/url.d.ts +21 -0
- package/types/bridge/lib/yup.d.ts +20 -0
- package/types/bridge/product-tile.d.ts +26 -0
- package/types/bridge/provider-analytics.d.ts +25 -0
- package/types/bridge/share-button.d.ts +18 -0
- package/types/bridge/subdomain-content.d.ts +25 -0
- package/types/bridge/template-layout.d.ts +12 -0
- package/types/bridge/template-modal.d.ts +46 -0
- package/types/bridge/template-not-found.d.ts +9 -0
- package/types/bridge/template-subdomain-gallery.d.ts +25 -0
- package/types/bridge/template-subdomain-link.d.ts +18 -0
- package/types/bridge/template-subdomain.d.ts +22 -0
- package/types/dashboard/accordion.d.ts +25 -0
- package/types/dashboard/avatar.d.ts +17 -0
- package/types/dashboard/card-affiliate.d.ts +24 -0
- package/types/dashboard/card-connection.d.ts +23 -0
- package/types/dashboard/card-data-item.d.ts +15 -0
- package/types/dashboard/card-integration.d.ts +24 -0
- package/types/dashboard/card-metric.d.ts +16 -0
- package/types/dashboard/card-note.d.ts +24 -0
- package/types/dashboard/card-order.d.ts +25 -0
- package/types/dashboard/card-overage.d.ts +26 -0
- package/types/dashboard/card-payment-method.d.ts +16 -0
- package/types/dashboard/card-plan.d.ts +28 -0
- package/types/dashboard/card-product.d.ts +14 -0
- package/types/dashboard/card-score.d.ts +38 -0
- package/types/dashboard/card-section.d.ts +13 -0
- package/types/dashboard/card-setting.d.ts +21 -0
- package/types/dashboard/card-task.d.ts +34 -0
- package/types/dashboard/card-template.d.ts +34 -0
- package/types/dashboard/card-tile.d.ts +54 -0
- package/types/dashboard/card-utm.d.ts +20 -0
- package/types/dashboard/carousel-tiles.d.ts +13 -0
- package/types/dashboard/code-formatter.d.ts +14 -0
- package/types/dashboard/drawer-subscription.d.ts +35 -0
- package/types/dashboard/drawer.d.ts +16 -0
- package/types/dashboard/dropdown.d.ts +33 -0
- package/types/dashboard/form-action.d.ts +20 -0
- package/types/dashboard/form-address.d.ts +28 -0
- package/types/dashboard/form-admin-campaign.d.ts +19 -0
- package/types/dashboard/form-admin-invoice-refund.d.ts +16 -0
- package/types/dashboard/form-admin-oauth.d.ts +20 -0
- package/types/dashboard/form-admin-organization.d.ts +17 -0
- package/types/dashboard/form-admin-provider.d.ts +33 -0
- package/types/dashboard/form-admin-referrer.d.ts +18 -0
- package/types/dashboard/form-admin-subscription-custom.d.ts +31 -0
- package/types/dashboard/form-admin-template.d.ts +16 -0
- package/types/dashboard/form-admin-user-credit.d.ts +12 -0
- package/types/dashboard/form-admin-user-permissions.d.ts +16 -0
- package/types/dashboard/form-admin-user-status.d.ts +11 -0
- package/types/dashboard/form-admin-utm.d.ts +39 -0
- package/types/dashboard/form-ai.d.ts +64 -0
- package/types/dashboard/form-auth.d.ts +64 -0
- package/types/dashboard/form-credit.d.ts +10 -0
- package/types/dashboard/form-file-upload.d.ts +16 -0
- package/types/dashboard/form-file.d.ts +33 -0
- package/types/dashboard/form-filters-analytics.d.ts +40 -0
- package/types/dashboard/form-filters.d.ts +70 -0
- package/types/dashboard/form-note.d.ts +15 -0
- package/types/dashboard/form-notification.d.ts +30 -0
- package/types/dashboard/form-organization-affiliate.d.ts +29 -0
- package/types/dashboard/form-organization-brand.d.ts +37 -0
- package/types/dashboard/form-organization-campaign-advertisement.d.ts +49 -0
- package/types/dashboard/form-organization-campaign-agreement.d.ts +25 -0
- package/types/dashboard/form-organization-campaign-draw.d.ts +30 -0
- package/types/dashboard/form-organization-campaign-field-email.d.ts +31 -0
- package/types/dashboard/form-organization-campaign-field-name.d.ts +28 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +27 -0
- package/types/dashboard/form-organization-campaign-field-phone.d.ts +29 -0
- package/types/dashboard/form-organization-campaign-field-select.d.ts +29 -0
- package/types/dashboard/form-organization-campaign-field-text.d.ts +30 -0
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +28 -0
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +24 -0
- package/types/dashboard/form-organization-campaign-integration-enable.d.ts +24 -0
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +27 -0
- package/types/dashboard/form-organization-campaign-integration-gtm.d.ts +18 -0
- package/types/dashboard/form-organization-campaign-lead.d.ts +22 -0
- package/types/dashboard/form-organization-campaign-link.d.ts +28 -0
- package/types/dashboard/form-organization-campaign-page-affiliates.d.ts +16 -0
- package/types/dashboard/form-organization-campaign-page-embed.d.ts +14 -0
- package/types/dashboard/form-organization-campaign-page-preview.d.ts +23 -0
- package/types/dashboard/form-organization-campaign-page-qr.d.ts +44 -0
- package/types/dashboard/form-organization-campaign-page-share.d.ts +23 -0
- package/types/dashboard/form-organization-campaign-page-slug.d.ts +23 -0
- package/types/dashboard/form-organization-campaign-page.d.ts +43 -0
- package/types/dashboard/form-organization-campaign-prize-edit.d.ts +39 -0
- package/types/dashboard/form-organization-campaign-prize.d.ts +11 -0
- package/types/dashboard/form-organization-campaign-range.d.ts +24 -0
- package/types/dashboard/form-organization-campaign.d.ts +49 -0
- package/types/dashboard/form-organization-connection.d.ts +47 -0
- package/types/dashboard/form-organization-export.d.ts +21 -0
- package/types/dashboard/form-organization-file-frame.d.ts +20 -0
- package/types/dashboard/form-organization-file.d.ts +33 -0
- package/types/dashboard/form-organization-identity.d.ts +87 -0
- package/types/dashboard/form-organization-member.d.ts +25 -0
- package/types/dashboard/form-organization-segment.d.ts +32 -0
- package/types/dashboard/form-organization-workflow.d.ts +78 -0
- package/types/dashboard/form-organization.d.ts +50 -0
- package/types/dashboard/form-otc.d.ts +29 -0
- package/types/dashboard/form-payment-methods.d.ts +22 -0
- package/types/dashboard/form-profile.d.ts +23 -0
- package/types/dashboard/form-stripe-promotion.d.ts +12 -0
- package/types/dashboard/form-stripe.d.ts +20 -0
- package/types/dashboard/form-verify-prize.d.ts +40 -0
- package/types/dashboard/google.d.ts +48 -0
- package/types/dashboard/guard-navigation.d.ts +11 -0
- package/types/dashboard/guide.d.ts +23 -0
- package/types/dashboard/iframe.d.ts +18 -0
- package/types/dashboard/input-address-saved.d.ts +9 -0
- package/types/dashboard/input-array.d.ts +56 -0
- package/types/dashboard/input-color.d.ts +20 -0
- package/types/dashboard/input-combobox.d.ts +30 -0
- package/types/dashboard/input-date.d.ts +32 -0
- package/types/dashboard/input-editor.d.ts +32 -0
- package/types/dashboard/input-fields.d.ts +49 -0
- package/types/dashboard/input-file.d.ts +30 -0
- package/types/dashboard/input-font.d.ts +20 -0
- package/types/dashboard/input-group-ai.d.ts +24 -0
- package/types/dashboard/input-radio.d.ts +19 -0
- package/types/dashboard/input-resource.d.ts +33 -0
- package/types/dashboard/input-secret.d.ts +32 -0
- package/types/dashboard/input-time.d.ts +25 -0
- package/types/dashboard/lib/confetti.d.ts +2 -0
- package/types/dashboard/lib/connection-controls.d.ts +12 -0
- package/types/dashboard/lib/features.d.ts +10 -0
- package/types/dashboard/lib/frames.d.ts +12 -0
- package/types/dashboard/lib/geo.d.ts +37 -0
- package/types/dashboard/lib/hooks.d.ts +65 -0
- package/types/dashboard/lib/navigation.d.ts +24 -0
- package/types/dashboard/lib/otc.d.ts +10 -0
- package/types/dashboard/lib/overage.d.ts +9 -0
- package/types/dashboard/lib/table-actions.d.ts +18 -0
- package/types/dashboard/lib/time-slots.d.ts +34 -0
- package/types/dashboard/lib/trickle.d.ts +11 -0
- package/types/dashboard/lib/uppy.d.ts +36 -0
- package/types/dashboard/lib/utm.d.ts +32 -0
- package/types/dashboard/link-back.d.ts +15 -0
- package/types/dashboard/link.d.ts +17 -0
- package/types/dashboard/list-resource.d.ts +39 -0
- package/types/dashboard/list.d.ts +26 -0
- package/types/dashboard/menu.d.ts +65 -0
- package/types/dashboard/modal.d.ts +20 -0
- package/types/dashboard/notes.d.ts +20 -0
- package/types/dashboard/notice.d.ts +20 -0
- package/types/dashboard/paged.d.ts +57 -0
- package/types/dashboard/provider-resource.d.ts +29 -0
- package/types/dashboard/provider-ui.d.ts +17 -0
- package/types/dashboard/provider.d.ts +12 -0
- package/types/dashboard/recharts.d.ts +32 -0
- package/types/dashboard/steps.d.ts +40 -0
- package/types/dashboard/swatch.d.ts +14 -0
- package/types/dashboard/table-cell-title.d.ts +24 -0
- package/types/dashboard/table.d.ts +106 -0
- package/types/dashboard/template-dashboard.d.ts +110 -0
- package/types/dashboard/template-not-found.d.ts +14 -0
- package/types/dashboard/template-socket.d.ts +17 -0
- package/types/dashboard/template-suspended.d.ts +12 -0
- package/types/dashboard/template-ui.d.ts +14 -0
- package/types/dashboard/wrapper-ai.d.ts +12 -0
- package/types/input-group.d.ts +1 -0
- package/types/input-phone.d.ts +2 -0
- package/types/input-textarea.d.ts +2 -0
- package/types/shared/address-lines.d.ts +14 -0
- package/types/shared/badge.d.ts +14 -0
- package/types/shared/button.d.ts +29 -0
- package/types/shared/card-asset.d.ts +29 -0
- package/types/shared/card-prize.d.ts +27 -0
- package/types/shared/carousel.d.ts +21 -0
- package/types/shared/copy-to-clipboard.d.ts +23 -0
- package/types/shared/divider.d.ts +11 -0
- package/types/shared/empty.d.ts +18 -0
- package/types/shared/error.d.ts +17 -0
- package/types/shared/fieldset.d.ts +17 -0
- package/types/shared/form.d.ts +13 -0
- package/types/shared/indicator.d.ts +10 -0
- package/types/shared/input-checkbox-list.d.ts +20 -0
- package/types/shared/input-range.d.ts +19 -0
- package/types/shared/input-switch.d.ts +16 -0
- package/types/shared/input-url.d.ts +14 -0
- package/types/shared/lib/form.d.ts +28 -0
- package/types/shared/lib/helpers.d.ts +145 -0
- package/types/shared/lib/icon-labels.d.ts +6 -0
- package/types/shared/lib/yup.d.ts +19 -0
- package/types/shared/loader.d.ts +14 -0
- package/types/shared/overlay.d.ts +20 -0
- package/types/shared/progress.d.ts +14 -0
- package/types/shared/provider-recaptcha.d.ts +10 -0
- package/types/shared/sortable.d.ts +14 -0
- package/types/shared/tabs.d.ts +32 -0
- package/types/shared/tooltip.d.ts +18 -0
- package/types/styles.d.ts +4 -0
- package/dist/chunk-24RIMAX7.mjs +0 -18
- package/dist/chunk-2ZYGRSSA.mjs +0 -45
- package/dist/chunk-34VHCLEM.mjs +0 -18
- package/dist/chunk-3ZVT66SF.mjs +0 -18
- package/dist/chunk-6F23WKP2.mjs +0 -104
- package/dist/chunk-7GRIGQDC.mjs +0 -98
- package/dist/chunk-DPFPNFJT.mjs +0 -387
- package/dist/chunk-DTGGUHVT.mjs +0 -18
- package/dist/chunk-FYA7EAMR.mjs +0 -29
- package/dist/chunk-G3FIQDKF.mjs +0 -18
- package/dist/chunk-GDO334JM.mjs +0 -18
- package/dist/chunk-GFDZ7ER6.mjs +0 -29
- package/dist/chunk-HH7WF5BT.mjs +0 -29
- package/dist/chunk-KJMXWB22.mjs +0 -18
- package/dist/chunk-KSCQQUFC.mjs +0 -89
- package/dist/chunk-OSTKXL5W.mjs +0 -18
- package/dist/chunk-PLX5YT4F.mjs +0 -18
- package/dist/chunk-PT7UR6AO.mjs +0 -208
- package/dist/chunk-Q3UIVGPQ.mjs +0 -29
- package/dist/chunk-S6X5EEMX.mjs +0 -18
- package/dist/chunk-T5QQBFM3.mjs +0 -29
- package/dist/chunk-TOR3Z64G.mjs +0 -18
- package/dist/chunk-WQXZE4EX.mjs +0 -18
- package/dist/chunk-WRQM5ECM.mjs +0 -18
- package/dist/chunk-WUZE3BIA.mjs +0 -122
- package/dist/chunk-Y466XTIK.mjs +0 -37
- package/dist/chunk-YEC7KSKN.mjs +0 -18
- package/dist/embla-fade.mjs +0 -6
- package/dist/embla.mjs +0 -6
- package/dist/input-group-error.js +0 -132
- package/dist/input-group-error.mjs +0 -7
- package/types/embla-fade.d.ts +0 -2
- package/types/embla.d.ts +0 -2
- package/types/input-group-error.d.ts +0 -14
|
@@ -0,0 +1,977 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fragment, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
|
+
import { useSearchParams } from "next/navigation";
|
|
5
|
+
import { request } from "@drawbridge/drawbridge-utils/fetch";
|
|
6
|
+
import { captureException } from "@drawbridge/drawbridge-telemetry/nextjs";
|
|
7
|
+
import { useForm, Controller } from "react-hook-form";
|
|
8
|
+
import yup, { resolver } from "./lib/yup";
|
|
9
|
+
import { ageFor, ageGateSchema } from "./lib/age-gate";
|
|
10
|
+
import { useGoogleReCaptcha } from "react-google-recaptcha-v3";
|
|
11
|
+
import { assertRecaptcha } from "./lib/recaptcha";
|
|
12
|
+
import { submissionEndpoint } from "./lib/url";
|
|
13
|
+
import Form from "../shared/form";
|
|
14
|
+
import Button from "../shared/button";
|
|
15
|
+
import Fieldset from "../shared/fieldset";
|
|
16
|
+
import { components, validate } from "./fields";
|
|
17
|
+
import InputGroup from "../input-group";
|
|
18
|
+
import Error from "../shared/error";
|
|
19
|
+
import InputText from "../input-text";
|
|
20
|
+
import { FormSubdomainHeader } from "./form-subdomain-header";
|
|
21
|
+
import Loader from "../icons/loader";
|
|
22
|
+
import Warning from "../icons/warning";
|
|
23
|
+
import InputCheckbox from "../input-checkbox";
|
|
24
|
+
import Advertisements from "./advertisements";
|
|
25
|
+
import Link from "next/link";
|
|
26
|
+
const appendPreview = (endpoint, token) => {
|
|
27
|
+
if (!token) return endpoint;
|
|
28
|
+
const separator = endpoint.includes("?") ? "&" : "?";
|
|
29
|
+
return endpoint + separator + "drwbrdg_pre=" + encodeURIComponent(token);
|
|
30
|
+
};
|
|
31
|
+
const FormSubdomainSubmission = ({
|
|
32
|
+
affiliate,
|
|
33
|
+
button,
|
|
34
|
+
checkout,
|
|
35
|
+
id,
|
|
36
|
+
lead,
|
|
37
|
+
message,
|
|
38
|
+
preview,
|
|
39
|
+
slug,
|
|
40
|
+
style,
|
|
41
|
+
subdomain,
|
|
42
|
+
title,
|
|
43
|
+
tracking
|
|
44
|
+
}) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const [loading, setLoading] = useState(Boolean(id));
|
|
47
|
+
const [data, setData] = useState();
|
|
48
|
+
const [error, setError] = useState();
|
|
49
|
+
const searchParams = useSearchParams();
|
|
50
|
+
const token = searchParams.get("drwbrdg_pre");
|
|
51
|
+
const endpoint = submissionEndpoint({ affiliate, id, slug, subdomain, token });
|
|
52
|
+
const submission = useCallback(
|
|
53
|
+
async () => {
|
|
54
|
+
try {
|
|
55
|
+
const response = await request({
|
|
56
|
+
cache: "no-store",
|
|
57
|
+
endpoint,
|
|
58
|
+
method: "GET"
|
|
59
|
+
});
|
|
60
|
+
setData(response.result);
|
|
61
|
+
setLoading(false);
|
|
62
|
+
} catch ({ message: message2 }) {
|
|
63
|
+
setError(message2);
|
|
64
|
+
setLoading(false);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
[endpoint]
|
|
68
|
+
);
|
|
69
|
+
useEffect(
|
|
70
|
+
() => {
|
|
71
|
+
if (!endpoint) return;
|
|
72
|
+
submission();
|
|
73
|
+
},
|
|
74
|
+
[endpoint, submission]
|
|
75
|
+
);
|
|
76
|
+
if (error) {
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
FormSubdomainMessage,
|
|
79
|
+
{
|
|
80
|
+
...{
|
|
81
|
+
button,
|
|
82
|
+
message: error,
|
|
83
|
+
style,
|
|
84
|
+
svg: Warning,
|
|
85
|
+
title: "Error"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
;
|
|
91
|
+
if (loading) {
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
...{
|
|
96
|
+
className: "flex items-center justify-center w-full aspect-square"
|
|
97
|
+
},
|
|
98
|
+
children: /* @__PURE__ */ jsx(
|
|
99
|
+
Loader,
|
|
100
|
+
{
|
|
101
|
+
...{
|
|
102
|
+
className: "w-6 h-6 animate-spin"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return /* @__PURE__ */ jsxs(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
...{
|
|
113
|
+
className: "space-y-6"
|
|
114
|
+
},
|
|
115
|
+
children: [
|
|
116
|
+
button && /* @__PURE__ */ jsx(
|
|
117
|
+
FormSubdomainMessage,
|
|
118
|
+
{
|
|
119
|
+
...{
|
|
120
|
+
button,
|
|
121
|
+
title,
|
|
122
|
+
preview,
|
|
123
|
+
style,
|
|
124
|
+
...message && {
|
|
125
|
+
message
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
((_a = data == null ? void 0 : data.advertisements) == null ? void 0 : _a.length) > 0 && /* @__PURE__ */ jsx(
|
|
131
|
+
Advertisements,
|
|
132
|
+
{
|
|
133
|
+
...{
|
|
134
|
+
affiliate: data == null ? void 0 : data.affiliate,
|
|
135
|
+
campaign: data == null ? void 0 : data.campaign,
|
|
136
|
+
items: (data == null ? void 0 : data.advertisements) || [],
|
|
137
|
+
lead,
|
|
138
|
+
checkout,
|
|
139
|
+
organization: data == null ? void 0 : data.organization,
|
|
140
|
+
page: data == null ? void 0 : data.page,
|
|
141
|
+
preview,
|
|
142
|
+
slug,
|
|
143
|
+
style,
|
|
144
|
+
subdomain,
|
|
145
|
+
tracking
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
const FormSubdomainMessage = ({
|
|
154
|
+
button,
|
|
155
|
+
message,
|
|
156
|
+
preview,
|
|
157
|
+
style,
|
|
158
|
+
svg: Svg,
|
|
159
|
+
title
|
|
160
|
+
}) => {
|
|
161
|
+
return /* @__PURE__ */ jsxs(
|
|
162
|
+
"div",
|
|
163
|
+
{
|
|
164
|
+
...{
|
|
165
|
+
className: "space-y-6"
|
|
166
|
+
},
|
|
167
|
+
children: [
|
|
168
|
+
button && /* @__PURE__ */ jsx(
|
|
169
|
+
FormSubdomainHeader,
|
|
170
|
+
{
|
|
171
|
+
...{
|
|
172
|
+
button,
|
|
173
|
+
style,
|
|
174
|
+
title
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
Boolean(preview) && /* @__PURE__ */ jsx(
|
|
179
|
+
Error,
|
|
180
|
+
{
|
|
181
|
+
...{
|
|
182
|
+
error: "Preview mode: data not collected",
|
|
183
|
+
style
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
message && /* @__PURE__ */ jsxs(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
...{
|
|
191
|
+
className: "flex flex-col items-center justify-center space-y-2"
|
|
192
|
+
},
|
|
193
|
+
children: [
|
|
194
|
+
Svg && /* @__PURE__ */ jsx(
|
|
195
|
+
Svg,
|
|
196
|
+
{
|
|
197
|
+
...{
|
|
198
|
+
className: "w-8 h-8",
|
|
199
|
+
"aria-hidden": true
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
/* @__PURE__ */ jsx(
|
|
204
|
+
"p",
|
|
205
|
+
{
|
|
206
|
+
...{
|
|
207
|
+
className: "text-center",
|
|
208
|
+
role: "alert",
|
|
209
|
+
"aria-live": "polite"
|
|
210
|
+
},
|
|
211
|
+
children: message
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
const FormSubdomainButton = ({
|
|
222
|
+
disabled,
|
|
223
|
+
text = "Next",
|
|
224
|
+
style,
|
|
225
|
+
submitting
|
|
226
|
+
}) => {
|
|
227
|
+
return /* @__PURE__ */ jsx(
|
|
228
|
+
Fieldset,
|
|
229
|
+
{
|
|
230
|
+
...{
|
|
231
|
+
disabled: disabled || submitting
|
|
232
|
+
},
|
|
233
|
+
children: /* @__PURE__ */ jsx(
|
|
234
|
+
Button,
|
|
235
|
+
{
|
|
236
|
+
...{
|
|
237
|
+
loading: submitting,
|
|
238
|
+
style,
|
|
239
|
+
type: "submit"
|
|
240
|
+
},
|
|
241
|
+
children: text
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
};
|
|
247
|
+
const FormSubdomainGeocode = ({
|
|
248
|
+
button,
|
|
249
|
+
disabled,
|
|
250
|
+
callback,
|
|
251
|
+
preview,
|
|
252
|
+
style,
|
|
253
|
+
values
|
|
254
|
+
}) => {
|
|
255
|
+
const [error, setError] = useState(disabled ? "Campaign is not currently active" : null);
|
|
256
|
+
const searchParams = useSearchParams();
|
|
257
|
+
const token = searchParams.get("drwbrdg_pre");
|
|
258
|
+
useEffect(
|
|
259
|
+
() => {
|
|
260
|
+
if (navigator.geolocation) {
|
|
261
|
+
navigator.geolocation.getCurrentPosition(
|
|
262
|
+
async (position) => {
|
|
263
|
+
try {
|
|
264
|
+
const response = await request({
|
|
265
|
+
body: {
|
|
266
|
+
coordinates: [
|
|
267
|
+
position.coords.longitude,
|
|
268
|
+
position.coords.latitude
|
|
269
|
+
],
|
|
270
|
+
preview
|
|
271
|
+
},
|
|
272
|
+
cache: "no-store",
|
|
273
|
+
endpoint: appendPreview("/subdomain/" + (values == null ? void 0 : values.subdomain) + "/page/" + (values == null ? void 0 : values.slug) + "/location", token),
|
|
274
|
+
method: "POST"
|
|
275
|
+
});
|
|
276
|
+
callback(response);
|
|
277
|
+
} catch ({ message }) {
|
|
278
|
+
setError(message);
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
() => {
|
|
282
|
+
setError("Location services are not enabled.");
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
} else {
|
|
286
|
+
setError("Location data is not supported with your current browser and or device.");
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
[callback, preview, token, values]
|
|
290
|
+
);
|
|
291
|
+
if (error) {
|
|
292
|
+
return /* @__PURE__ */ jsx(
|
|
293
|
+
FormSubdomainMessage,
|
|
294
|
+
{
|
|
295
|
+
...{
|
|
296
|
+
button,
|
|
297
|
+
message: error,
|
|
298
|
+
style,
|
|
299
|
+
svg: Warning,
|
|
300
|
+
title: "Error"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
return /* @__PURE__ */ jsxs(
|
|
306
|
+
"div",
|
|
307
|
+
{
|
|
308
|
+
...{
|
|
309
|
+
className: "space-y-6"
|
|
310
|
+
},
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ jsx(
|
|
313
|
+
FormSubdomainHeader,
|
|
314
|
+
{
|
|
315
|
+
...{
|
|
316
|
+
button,
|
|
317
|
+
style
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
),
|
|
321
|
+
Boolean(preview) && /* @__PURE__ */ jsx(
|
|
322
|
+
Error,
|
|
323
|
+
{
|
|
324
|
+
...{
|
|
325
|
+
error: "Preview mode: data not collected",
|
|
326
|
+
style
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
/* @__PURE__ */ jsx(
|
|
331
|
+
"div",
|
|
332
|
+
{
|
|
333
|
+
...{
|
|
334
|
+
className: "flex items-center justify-center p-6"
|
|
335
|
+
},
|
|
336
|
+
children: /* @__PURE__ */ jsx(
|
|
337
|
+
Loader,
|
|
338
|
+
{
|
|
339
|
+
...{
|
|
340
|
+
className: "w-6 h-6 animate-spin"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
};
|
|
350
|
+
const FormSubdomainAge = ({
|
|
351
|
+
button,
|
|
352
|
+
callback = () => {
|
|
353
|
+
},
|
|
354
|
+
disabled,
|
|
355
|
+
preview,
|
|
356
|
+
style,
|
|
357
|
+
values
|
|
358
|
+
}) => {
|
|
359
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
360
|
+
const schema = useMemo(
|
|
361
|
+
() => ageGateSchema(values, currentYear),
|
|
362
|
+
[values == null ? void 0 : values.min, values == null ? void 0 : values.max, currentYear]
|
|
363
|
+
// eslint-disable-line react-hooks/exhaustive-deps
|
|
364
|
+
);
|
|
365
|
+
const { control, handleSubmit, formState } = useForm({
|
|
366
|
+
resolver: resolver(schema),
|
|
367
|
+
values: {}
|
|
368
|
+
});
|
|
369
|
+
const onSubmit = ({
|
|
370
|
+
object: {
|
|
371
|
+
age,
|
|
372
|
+
day,
|
|
373
|
+
month,
|
|
374
|
+
year
|
|
375
|
+
}
|
|
376
|
+
}) => {
|
|
377
|
+
callback({
|
|
378
|
+
age,
|
|
379
|
+
birthday: [month, day, year].join("/")
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
return /* @__PURE__ */ jsxs(
|
|
383
|
+
Form,
|
|
384
|
+
{
|
|
385
|
+
...{
|
|
386
|
+
className: "relative w-full space-y-6",
|
|
387
|
+
onSubmit: handleSubmit(onSubmit)
|
|
388
|
+
},
|
|
389
|
+
children: [
|
|
390
|
+
/* @__PURE__ */ jsx(
|
|
391
|
+
FormSubdomainHeader,
|
|
392
|
+
{
|
|
393
|
+
...{
|
|
394
|
+
button,
|
|
395
|
+
title: "Confirm your age",
|
|
396
|
+
style
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
Boolean(preview) && /* @__PURE__ */ jsx(
|
|
401
|
+
Error,
|
|
402
|
+
{
|
|
403
|
+
...{
|
|
404
|
+
error: "Preview mode: data not collected",
|
|
405
|
+
style
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
/* @__PURE__ */ jsx(
|
|
410
|
+
Fieldset,
|
|
411
|
+
{
|
|
412
|
+
...{
|
|
413
|
+
disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
|
|
414
|
+
},
|
|
415
|
+
children: /* @__PURE__ */ jsx(
|
|
416
|
+
Controller,
|
|
417
|
+
{
|
|
418
|
+
...{
|
|
419
|
+
control,
|
|
420
|
+
name: "object",
|
|
421
|
+
render: ({ field: { value, onChange } }) => {
|
|
422
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
423
|
+
return /* @__PURE__ */ jsx(
|
|
424
|
+
InputGroup,
|
|
425
|
+
{
|
|
426
|
+
...{
|
|
427
|
+
error: (_i = ((_b = (_a = formState == null ? void 0 : formState.errors) == null ? void 0 : _a.object) == null ? void 0 : _b.month) || ((_d = (_c = formState == null ? void 0 : formState.errors) == null ? void 0 : _c.object) == null ? void 0 : _d.day) || ((_f = (_e = formState == null ? void 0 : formState.errors) == null ? void 0 : _e.object) == null ? void 0 : _f.year) || ((_h = (_g = formState == null ? void 0 : formState.errors) == null ? void 0 : _g.object) == null ? void 0 : _h.age)) == null ? void 0 : _i.message,
|
|
428
|
+
input: /* @__PURE__ */ jsxs(
|
|
429
|
+
"div",
|
|
430
|
+
{
|
|
431
|
+
...{
|
|
432
|
+
className: "flex items-center space-x-4 w-full"
|
|
433
|
+
},
|
|
434
|
+
children: [
|
|
435
|
+
/* @__PURE__ */ jsxs(
|
|
436
|
+
"div",
|
|
437
|
+
{
|
|
438
|
+
...{
|
|
439
|
+
className: "space-y-2 w-full"
|
|
440
|
+
},
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ jsx("p", { children: "Month" }),
|
|
443
|
+
/* @__PURE__ */ jsx(
|
|
444
|
+
InputText,
|
|
445
|
+
{
|
|
446
|
+
...{
|
|
447
|
+
inputMode: "numeric",
|
|
448
|
+
"aria-label": "enter month",
|
|
449
|
+
onChange: (val) => {
|
|
450
|
+
onChange({
|
|
451
|
+
...value,
|
|
452
|
+
month: Number(val)
|
|
453
|
+
});
|
|
454
|
+
},
|
|
455
|
+
style,
|
|
456
|
+
value: (value == null ? void 0 : value.month) || ""
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
)
|
|
460
|
+
]
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ jsxs(
|
|
464
|
+
"div",
|
|
465
|
+
{
|
|
466
|
+
...{
|
|
467
|
+
className: "space-y-2 w-full"
|
|
468
|
+
},
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ jsx("p", { children: "Day" }),
|
|
471
|
+
/* @__PURE__ */ jsx(
|
|
472
|
+
InputText,
|
|
473
|
+
{
|
|
474
|
+
...{
|
|
475
|
+
inputMode: "numeric",
|
|
476
|
+
"aria-label": "enter day",
|
|
477
|
+
onChange: (val) => {
|
|
478
|
+
onChange({
|
|
479
|
+
...value,
|
|
480
|
+
day: Number(val)
|
|
481
|
+
});
|
|
482
|
+
},
|
|
483
|
+
style,
|
|
484
|
+
value: (value == null ? void 0 : value.day) || ""
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
]
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ jsxs(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
...{
|
|
495
|
+
className: "space-y-2 w-full"
|
|
496
|
+
},
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ jsx("p", { children: "Year" }),
|
|
499
|
+
/* @__PURE__ */ jsx(
|
|
500
|
+
InputText,
|
|
501
|
+
{
|
|
502
|
+
...{
|
|
503
|
+
inputMode: "numeric",
|
|
504
|
+
"aria-label": "enter year",
|
|
505
|
+
onChange: (val) => {
|
|
506
|
+
onChange({
|
|
507
|
+
...value,
|
|
508
|
+
age: ageFor(val, currentYear),
|
|
509
|
+
year: Number(val)
|
|
510
|
+
});
|
|
511
|
+
},
|
|
512
|
+
style,
|
|
513
|
+
value: (value == null ? void 0 : value.year) || ""
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
)
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
),
|
|
523
|
+
style
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
/* @__PURE__ */ jsx(
|
|
534
|
+
FormSubdomainButton,
|
|
535
|
+
{
|
|
536
|
+
...{
|
|
537
|
+
disabled,
|
|
538
|
+
style,
|
|
539
|
+
submitting: formState == null ? void 0 : formState.isSubmitting
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
)
|
|
543
|
+
]
|
|
544
|
+
}
|
|
545
|
+
);
|
|
546
|
+
};
|
|
547
|
+
const FormSubdomainInformation = ({
|
|
548
|
+
button,
|
|
549
|
+
callback = () => {
|
|
550
|
+
},
|
|
551
|
+
disabled,
|
|
552
|
+
preview,
|
|
553
|
+
style,
|
|
554
|
+
values
|
|
555
|
+
}) => {
|
|
556
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
557
|
+
const fields = [
|
|
558
|
+
...((_a = values == null ? void 0 : values.fields) == null ? void 0 : _a.lead) || [],
|
|
559
|
+
...((_b = values == null ? void 0 : values.fields) == null ? void 0 : _b.additional) || []
|
|
560
|
+
];
|
|
561
|
+
const slugs = fields.map((field) => field == null ? void 0 : field.slug);
|
|
562
|
+
const smsConsent = Boolean((_d = (_c = values == null ? void 0 : values.agreements) == null ? void 0 : _c.sms) == null ? void 0 : _d.enabled) || slugs.includes("phone");
|
|
563
|
+
const marketingConsent = Boolean((_f = (_e = values == null ? void 0 : values.agreements) == null ? void 0 : _e.marketing) == null ? void 0 : _f.enabled);
|
|
564
|
+
const schema = useMemo(
|
|
565
|
+
() => {
|
|
566
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
567
|
+
const memoFields = [
|
|
568
|
+
...((_a2 = values == null ? void 0 : values.fields) == null ? void 0 : _a2.lead) || [],
|
|
569
|
+
...((_b2 = values == null ? void 0 : values.fields) == null ? void 0 : _b2.additional) || []
|
|
570
|
+
];
|
|
571
|
+
const memoSlugs = memoFields.map((field) => field == null ? void 0 : field.slug);
|
|
572
|
+
const shape = {
|
|
573
|
+
fields: yup.object(
|
|
574
|
+
memoFields.reduce(
|
|
575
|
+
(accumulator, field) => {
|
|
576
|
+
accumulator[field.id] = validate[field == null ? void 0 : field.slug](field, yup);
|
|
577
|
+
return accumulator;
|
|
578
|
+
},
|
|
579
|
+
{}
|
|
580
|
+
)
|
|
581
|
+
)
|
|
582
|
+
};
|
|
583
|
+
const agreements = {};
|
|
584
|
+
if ((_d2 = (_c2 = values == null ? void 0 : values.agreements) == null ? void 0 : _c2.terms) == null ? void 0 : _d2.enabled) {
|
|
585
|
+
agreements.terms = validate.agreement((_e2 = values == null ? void 0 : values.agreements) == null ? void 0 : _e2.terms, yup);
|
|
586
|
+
}
|
|
587
|
+
if (Boolean((_g2 = (_f2 = values == null ? void 0 : values.agreements) == null ? void 0 : _f2.marketing) == null ? void 0 : _g2.enabled)) {
|
|
588
|
+
agreements.marketing = yup.bool();
|
|
589
|
+
}
|
|
590
|
+
if (Boolean((_i2 = (_h2 = values == null ? void 0 : values.agreements) == null ? void 0 : _h2.sms) == null ? void 0 : _i2.enabled) || memoSlugs.includes("phone")) {
|
|
591
|
+
agreements.sms = yup.bool();
|
|
592
|
+
}
|
|
593
|
+
if (Object.keys(agreements).length > 0) {
|
|
594
|
+
shape.agreements = yup.object(agreements);
|
|
595
|
+
}
|
|
596
|
+
return yup.object(shape);
|
|
597
|
+
},
|
|
598
|
+
[values]
|
|
599
|
+
);
|
|
600
|
+
const { control, handleSubmit, formState } = useForm({
|
|
601
|
+
resolver: resolver(schema),
|
|
602
|
+
values: {}
|
|
603
|
+
});
|
|
604
|
+
const checkbox = ({
|
|
605
|
+
fallback,
|
|
606
|
+
key,
|
|
607
|
+
onChange,
|
|
608
|
+
value
|
|
609
|
+
}) => {
|
|
610
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
611
|
+
return /* @__PURE__ */ jsx(
|
|
612
|
+
InputCheckbox,
|
|
613
|
+
{
|
|
614
|
+
...{
|
|
615
|
+
labelId: "checkbox-" + key,
|
|
616
|
+
label: /* @__PURE__ */ jsx(Fragment, { children: ((_b2 = (_a2 = values == null ? void 0 : values.agreements) == null ? void 0 : _a2[key]) == null ? void 0 : _b2.link) ? /* @__PURE__ */ jsx(
|
|
617
|
+
Button,
|
|
618
|
+
{
|
|
619
|
+
...{
|
|
620
|
+
element: Link,
|
|
621
|
+
href: (_d2 = (_c2 = values == null ? void 0 : values.agreements) == null ? void 0 : _c2[key]) == null ? void 0 : _d2.link,
|
|
622
|
+
inline: true,
|
|
623
|
+
target: "_blank",
|
|
624
|
+
variant: "link"
|
|
625
|
+
},
|
|
626
|
+
children: ((_f2 = (_e2 = values == null ? void 0 : values.agreements) == null ? void 0 : _e2[key]) == null ? void 0 : _f2.label) || fallback
|
|
627
|
+
}
|
|
628
|
+
) : ((_h2 = (_g2 = values == null ? void 0 : values.agreements) == null ? void 0 : _g2[key]) == null ? void 0 : _h2.label) || fallback }),
|
|
629
|
+
onChange,
|
|
630
|
+
style,
|
|
631
|
+
value
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
);
|
|
635
|
+
};
|
|
636
|
+
return /* @__PURE__ */ jsxs(
|
|
637
|
+
Form,
|
|
638
|
+
{
|
|
639
|
+
...{
|
|
640
|
+
className: "relative w-full space-y-6 @container",
|
|
641
|
+
onSubmit: handleSubmit(callback)
|
|
642
|
+
},
|
|
643
|
+
children: [
|
|
644
|
+
/* @__PURE__ */ jsx(
|
|
645
|
+
FormSubdomainHeader,
|
|
646
|
+
{
|
|
647
|
+
...{
|
|
648
|
+
button,
|
|
649
|
+
style,
|
|
650
|
+
title: "Your information"
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
Boolean(preview) && /* @__PURE__ */ jsx(
|
|
655
|
+
Error,
|
|
656
|
+
{
|
|
657
|
+
...{
|
|
658
|
+
error: "Preview mode: data not collected",
|
|
659
|
+
style
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
),
|
|
663
|
+
/* @__PURE__ */ jsxs(
|
|
664
|
+
Fieldset,
|
|
665
|
+
{
|
|
666
|
+
...{
|
|
667
|
+
className: "space-y-6",
|
|
668
|
+
disabled: disabled || (formState == null ? void 0 : formState.isSubmitting)
|
|
669
|
+
},
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ jsx(
|
|
672
|
+
"div",
|
|
673
|
+
{
|
|
674
|
+
...{
|
|
675
|
+
className: "space-y-4"
|
|
676
|
+
},
|
|
677
|
+
children: fields.map((field) => /* @__PURE__ */ jsx(
|
|
678
|
+
Controller,
|
|
679
|
+
{
|
|
680
|
+
...{
|
|
681
|
+
control,
|
|
682
|
+
name: "fields." + field.id,
|
|
683
|
+
render: ({ field: { onChange, value } }) => {
|
|
684
|
+
var _a2, _b2;
|
|
685
|
+
return components[field == null ? void 0 : field.slug]({
|
|
686
|
+
error: (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.fields) == null ? void 0 : _b2[field == null ? void 0 : field.id],
|
|
687
|
+
field,
|
|
688
|
+
onChange,
|
|
689
|
+
style,
|
|
690
|
+
value
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
field == null ? void 0 : field.id
|
|
696
|
+
))
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
(Boolean((_h = (_g = values == null ? void 0 : values.agreements) == null ? void 0 : _g.terms) == null ? void 0 : _h.enabled) || marketingConsent || smsConsent) && /* @__PURE__ */ jsxs(
|
|
700
|
+
"div",
|
|
701
|
+
{
|
|
702
|
+
...{
|
|
703
|
+
className: "space-y-4"
|
|
704
|
+
},
|
|
705
|
+
children: [
|
|
706
|
+
Boolean((_j = (_i = values == null ? void 0 : values.agreements) == null ? void 0 : _i.terms) == null ? void 0 : _j.enabled) && /* @__PURE__ */ jsx(
|
|
707
|
+
Controller,
|
|
708
|
+
{
|
|
709
|
+
...{
|
|
710
|
+
control,
|
|
711
|
+
name: "agreements.terms",
|
|
712
|
+
render: ({ field: { value, onChange } }) => {
|
|
713
|
+
var _a2, _b2, _c2;
|
|
714
|
+
return /* @__PURE__ */ jsx(
|
|
715
|
+
InputGroup,
|
|
716
|
+
{
|
|
717
|
+
...{
|
|
718
|
+
error: (_c2 = (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.agreements) == null ? void 0 : _b2.terms) == null ? void 0 : _c2.message,
|
|
719
|
+
input: checkbox({
|
|
720
|
+
key: "terms",
|
|
721
|
+
onChange,
|
|
722
|
+
value
|
|
723
|
+
}),
|
|
724
|
+
style
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
),
|
|
732
|
+
marketingConsent && /* @__PURE__ */ jsx(
|
|
733
|
+
Controller,
|
|
734
|
+
{
|
|
735
|
+
...{
|
|
736
|
+
control,
|
|
737
|
+
name: "agreements.marketing",
|
|
738
|
+
render: ({ field: { value, onChange } }) => {
|
|
739
|
+
var _a2, _b2, _c2;
|
|
740
|
+
return /* @__PURE__ */ jsx(
|
|
741
|
+
InputGroup,
|
|
742
|
+
{
|
|
743
|
+
...{
|
|
744
|
+
error: (_c2 = (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.agreements) == null ? void 0 : _b2.marketing) == null ? void 0 : _c2.message,
|
|
745
|
+
input: checkbox({
|
|
746
|
+
fallback: "I agree to receive marketing emails about this campaign. Unsubscribe any time.",
|
|
747
|
+
key: "marketing",
|
|
748
|
+
onChange,
|
|
749
|
+
value
|
|
750
|
+
}),
|
|
751
|
+
style
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
),
|
|
759
|
+
smsConsent && /* @__PURE__ */ jsx(
|
|
760
|
+
Controller,
|
|
761
|
+
{
|
|
762
|
+
...{
|
|
763
|
+
control,
|
|
764
|
+
name: "agreements.sms",
|
|
765
|
+
render: ({ field: { value, onChange } }) => {
|
|
766
|
+
var _a2, _b2, _c2;
|
|
767
|
+
return /* @__PURE__ */ jsx(
|
|
768
|
+
InputGroup,
|
|
769
|
+
{
|
|
770
|
+
...{
|
|
771
|
+
error: (_c2 = (_b2 = (_a2 = formState == null ? void 0 : formState.errors) == null ? void 0 : _a2.agreements) == null ? void 0 : _b2.sms) == null ? void 0 : _c2.message,
|
|
772
|
+
input: checkbox({
|
|
773
|
+
// The default wording carrier reviewers look
|
|
774
|
+
// for: explicit texts, rates, and STOP.
|
|
775
|
+
fallback: "I agree to receive text messages about this campaign. Message and data rates may apply. Reply STOP to opt out.",
|
|
776
|
+
key: "sms",
|
|
777
|
+
onChange,
|
|
778
|
+
value
|
|
779
|
+
}),
|
|
780
|
+
style
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
)
|
|
791
|
+
]
|
|
792
|
+
}
|
|
793
|
+
),
|
|
794
|
+
/* @__PURE__ */ jsx(
|
|
795
|
+
FormSubdomainButton,
|
|
796
|
+
{
|
|
797
|
+
...{
|
|
798
|
+
disabled,
|
|
799
|
+
style,
|
|
800
|
+
submitting: formState == null ? void 0 : formState.isSubmitting,
|
|
801
|
+
text: "Submit"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
};
|
|
809
|
+
const FormSubdomain = ({
|
|
810
|
+
agreements,
|
|
811
|
+
button,
|
|
812
|
+
disabled,
|
|
813
|
+
fields,
|
|
814
|
+
integrations,
|
|
815
|
+
onCheckout,
|
|
816
|
+
onError = () => {
|
|
817
|
+
},
|
|
818
|
+
onSuccess = () => {
|
|
819
|
+
},
|
|
820
|
+
params,
|
|
821
|
+
preview,
|
|
822
|
+
style,
|
|
823
|
+
tracking
|
|
824
|
+
}) => {
|
|
825
|
+
var _a, _b, _c;
|
|
826
|
+
const { executeRecaptcha } = useGoogleReCaptcha();
|
|
827
|
+
const searchParams = useSearchParams();
|
|
828
|
+
const token = searchParams.get("drwbrdg_pre");
|
|
829
|
+
const [data, setData] = useState({});
|
|
830
|
+
const [step, setStep] = useState(0);
|
|
831
|
+
const onSubmit = useCallback(
|
|
832
|
+
async (values) => {
|
|
833
|
+
var _a2, _b2;
|
|
834
|
+
try {
|
|
835
|
+
let recaptcha;
|
|
836
|
+
if (Boolean((_a2 = integrations == null ? void 0 : integrations.recaptcha) == null ? void 0 : _a2.enabled)) {
|
|
837
|
+
assertRecaptcha(executeRecaptcha);
|
|
838
|
+
recaptcha = await executeRecaptcha("form_subdomain_submission_submit").catch((error) => {
|
|
839
|
+
captureException(error);
|
|
840
|
+
return null;
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
;
|
|
844
|
+
const response = await request({
|
|
845
|
+
body: {
|
|
846
|
+
...values,
|
|
847
|
+
entries: 1,
|
|
848
|
+
preview,
|
|
849
|
+
recaptcha,
|
|
850
|
+
tracking: (_b2 = tracking == null ? void 0 : tracking.context) == null ? void 0 : _b2.call(tracking)
|
|
851
|
+
},
|
|
852
|
+
cache: "no-store",
|
|
853
|
+
endpoint: appendPreview("/subdomain/" + (params == null ? void 0 : params.subdomain) + "/page/" + (params == null ? void 0 : params.slug) + "/submission", token),
|
|
854
|
+
method: "POST"
|
|
855
|
+
});
|
|
856
|
+
onSuccess(response);
|
|
857
|
+
if (response == null ? void 0 : response.created) {
|
|
858
|
+
tracking == null ? void 0 : tracking.track(
|
|
859
|
+
{
|
|
860
|
+
name: "form-lead-information"
|
|
861
|
+
},
|
|
862
|
+
"submit",
|
|
863
|
+
{
|
|
864
|
+
plugins: {
|
|
865
|
+
"drawbridge-analytics": false
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
} catch (error) {
|
|
871
|
+
onError(error);
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
[executeRecaptcha, integrations, onError, onSuccess, params, preview, token, tracking]
|
|
875
|
+
);
|
|
876
|
+
const forms = [
|
|
877
|
+
...Boolean((_a = integrations == null ? void 0 : integrations.geocode) == null ? void 0 : _a.enabled) ? [
|
|
878
|
+
/* @__PURE__ */ jsx(
|
|
879
|
+
FormSubdomainGeocode,
|
|
880
|
+
{
|
|
881
|
+
...{
|
|
882
|
+
button,
|
|
883
|
+
callback: (object) => {
|
|
884
|
+
setStep(step + 1);
|
|
885
|
+
tracking.track(
|
|
886
|
+
{
|
|
887
|
+
name: "form-geocode"
|
|
888
|
+
},
|
|
889
|
+
"submit"
|
|
890
|
+
);
|
|
891
|
+
},
|
|
892
|
+
disabled,
|
|
893
|
+
style,
|
|
894
|
+
preview,
|
|
895
|
+
values: params
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
"form-subdomain-geocode"
|
|
899
|
+
)
|
|
900
|
+
] : [],
|
|
901
|
+
...Boolean((_b = integrations == null ? void 0 : integrations.age) == null ? void 0 : _b.enabled) ? [
|
|
902
|
+
/* @__PURE__ */ jsx(
|
|
903
|
+
FormSubdomainAge,
|
|
904
|
+
{
|
|
905
|
+
...{
|
|
906
|
+
button,
|
|
907
|
+
callback: (object) => {
|
|
908
|
+
setData({
|
|
909
|
+
...data,
|
|
910
|
+
integrations: {
|
|
911
|
+
...data.integrations,
|
|
912
|
+
...object
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
setStep(step + 1);
|
|
916
|
+
tracking.track(
|
|
917
|
+
{
|
|
918
|
+
name: "form-age-gate"
|
|
919
|
+
},
|
|
920
|
+
"submit"
|
|
921
|
+
);
|
|
922
|
+
},
|
|
923
|
+
disabled,
|
|
924
|
+
preview,
|
|
925
|
+
style,
|
|
926
|
+
values: (_c = integrations == null ? void 0 : integrations.age) == null ? void 0 : _c.settings
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
"form-subdomain-age"
|
|
930
|
+
)
|
|
931
|
+
] : [],
|
|
932
|
+
/* @__PURE__ */ jsx(
|
|
933
|
+
FormSubdomainInformation,
|
|
934
|
+
{
|
|
935
|
+
...{
|
|
936
|
+
button,
|
|
937
|
+
callback: async (object) => await onSubmit({
|
|
938
|
+
...data,
|
|
939
|
+
...object
|
|
940
|
+
}),
|
|
941
|
+
disabled,
|
|
942
|
+
preview,
|
|
943
|
+
style,
|
|
944
|
+
values: {
|
|
945
|
+
agreements,
|
|
946
|
+
fields
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"form-subdomain-information"
|
|
951
|
+
)
|
|
952
|
+
];
|
|
953
|
+
return /* @__PURE__ */ jsx(
|
|
954
|
+
"div",
|
|
955
|
+
{
|
|
956
|
+
...{
|
|
957
|
+
className: "space-y-6"
|
|
958
|
+
},
|
|
959
|
+
children: /* @__PURE__ */ jsx(
|
|
960
|
+
"div",
|
|
961
|
+
{
|
|
962
|
+
...{
|
|
963
|
+
className: "relative w-full space-y-6"
|
|
964
|
+
},
|
|
965
|
+
children: forms == null ? void 0 : forms[step]
|
|
966
|
+
}
|
|
967
|
+
)
|
|
968
|
+
}
|
|
969
|
+
);
|
|
970
|
+
};
|
|
971
|
+
var form_subdomain_default = FormSubdomain;
|
|
972
|
+
export {
|
|
973
|
+
FormSubdomainHeader,
|
|
974
|
+
FormSubdomainMessage,
|
|
975
|
+
FormSubdomainSubmission,
|
|
976
|
+
form_subdomain_default as default
|
|
977
|
+
};
|