@opensite/ui 2.1.2 → 2.1.3

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/registry.js CHANGED
@@ -12,7 +12,7 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
12
12
  import { usePlatformFromUrl } from '@opensite/hooks/usePlatformFromUrl';
13
13
  import * as TabsPrimitive from '@radix-ui/react-tabs';
14
14
  import { Form, useForm, Field } from '@page-speed/forms';
15
- import { useFileUpload, useContactForm, DynamicFormField, submitPageSpeedForm, PageSpeedFormSubmissionError, isValidEmail, getColumnSpanClass } from '@page-speed/forms/integration';
15
+ import { useFileUpload, useContactForm, DynamicFormField, submitPageSpeedForm, PageSpeedFormSubmissionError, isValidEmail, getColumnSpanClass, FormEngine } from '@page-speed/forms/integration';
16
16
  import { AnimatePresence, motion, useMotionValue, useMotionTemplate, useSpring, useTransform, useInView, useScroll, useMotionValueEvent } from 'framer-motion';
17
17
  import { TextInput as TextInput$1 } from '@page-speed/forms/inputs';
18
18
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
@@ -14888,8 +14888,6 @@ function ContactFaq({
14888
14888
  formHeading,
14889
14889
  buttonText = "Submit",
14890
14890
  buttonIcon,
14891
- actions,
14892
- actionsSlot,
14893
14891
  items,
14894
14892
  itemsSlot,
14895
14893
  faqHeading,
@@ -14904,7 +14902,6 @@ function ContactFaq({
14904
14902
  cardContentClassName,
14905
14903
  formHeadingClassName,
14906
14904
  formClassName,
14907
- submitClassName,
14908
14905
  faqHeadingClassName,
14909
14906
  faqContainerClassName,
14910
14907
  accordionClassName,
@@ -14931,48 +14928,6 @@ function ContactFaq({
14931
14928
  removeFile,
14932
14929
  resetUpload
14933
14930
  } = useFileUpload({ onError });
14934
- const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
14935
- formFields,
14936
- formConfig,
14937
- onSubmit,
14938
- onSuccess: (data) => {
14939
- resetUpload();
14940
- onSuccess?.(data);
14941
- },
14942
- onError,
14943
- resetOnSuccess: formConfig?.resetOnSuccess !== false,
14944
- uploadTokens
14945
- });
14946
- const actionsContent = useMemo(() => {
14947
- if (actionsSlot) return actionsSlot;
14948
- if (actions && actions.length > 0) {
14949
- return actions.map((action, index) => {
14950
- const {
14951
- label,
14952
- icon,
14953
- iconAfter,
14954
- children,
14955
- className: actionClassName,
14956
- ...pressableProps
14957
- } = action;
14958
- return /* @__PURE__ */ jsx(
14959
- Pressable,
14960
- {
14961
- asButton: true,
14962
- className: actionClassName,
14963
- ...pressableProps,
14964
- children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
14965
- icon,
14966
- label,
14967
- iconAfter
14968
- ] })
14969
- },
14970
- index
14971
- );
14972
- });
14973
- }
14974
- return null;
14975
- }, [actionsSlot, actions]);
14976
14931
  const hasFaqItems = itemsSlot || items && items.length > 0;
14977
14932
  const faqContent = useMemo(() => {
14978
14933
  if (itemsSlot) return itemsSlot;
@@ -15033,7 +14988,7 @@ function ContactFaq({
15033
14988
  ),
15034
14989
  children: heading
15035
14990
  }
15036
- ) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
14991
+ ) : heading),
15037
14992
  description && (typeof description === "string" ? /* @__PURE__ */ jsx(
15038
14993
  "p",
15039
14994
  {
@@ -15043,7 +14998,7 @@ function ContactFaq({
15043
14998
  ),
15044
14999
  children: description
15045
15000
  }
15046
- ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
15001
+ ) : description)
15047
15002
  ]
15048
15003
  }
15049
15004
  ),
@@ -15067,62 +15022,38 @@ function ContactFaq({
15067
15022
  children: formHeading
15068
15023
  }
15069
15024
  ) : /* @__PURE__ */ jsx("div", { className: formHeadingClassName, children: formHeading })),
15070
- /* @__PURE__ */ jsxs(
15071
- Form,
15025
+ /* @__PURE__ */ jsx(
15026
+ FormEngine,
15072
15027
  {
15073
- form,
15074
- notificationConfig: {
15075
- submissionError,
15076
- successMessage
15077
- },
15078
- styleConfig: {
15079
- formClassName: cn("space-y-6", formClassName),
15080
- successMessageClassName,
15081
- errorMessageClassName
15082
- },
15083
- formConfig: {
15084
- endpoint: formConfig?.endpoint,
15085
- method: formMethod,
15086
- submissionConfig: formConfig?.submissionConfig
15028
+ api: formConfig,
15029
+ fields: formFields,
15030
+ formLayoutSettings: {
15031
+ formLayout: "standard",
15032
+ submitButtonSetup: {
15033
+ submitLabel: /* @__PURE__ */ jsxs(Fragment$1, { children: [
15034
+ buttonIcon,
15035
+ buttonText
15036
+ ] })
15037
+ },
15038
+ styleRules: {
15039
+ formClassName: cn("space-y-6", formClassName),
15040
+ successMessageClassName,
15041
+ errorMessageClassName
15042
+ }
15087
15043
  },
15088
- onNewSubmission: () => {
15044
+ successMessage,
15045
+ onSubmit,
15046
+ onSuccess: (data) => {
15089
15047
  resetUpload();
15090
- resetSubmissionState();
15048
+ onSuccess?.(data);
15091
15049
  },
15092
- children: [
15093
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
15094
- "div",
15095
- {
15096
- className: getColumnSpanClass(field.columnSpan),
15097
- children: /* @__PURE__ */ jsx(
15098
- DynamicFormField,
15099
- {
15100
- field,
15101
- uploadProgress,
15102
- onFileUpload: uploadFiles,
15103
- onFileRemove: removeFile,
15104
- isUploading
15105
- }
15106
- )
15107
- },
15108
- field.name
15109
- )) }),
15110
- actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
15111
- Pressable,
15112
- {
15113
- componentType: "button",
15114
- type: "submit",
15115
- className: cn("w-full", submitClassName),
15116
- size: "lg",
15117
- asButton: true,
15118
- disabled: form.isSubmitting,
15119
- children: [
15120
- buttonIcon,
15121
- buttonText
15122
- ]
15123
- }
15124
- )
15125
- ]
15050
+ onError,
15051
+ resetOnSuccess: formConfig?.resetOnSuccess !== false,
15052
+ uploadTokens,
15053
+ uploadProgress,
15054
+ onFileUpload: uploadFiles,
15055
+ onFileRemove: removeFile,
15056
+ isUploading
15126
15057
  }
15127
15058
  )
15128
15059
  ] }) }),
@@ -20867,48 +20798,6 @@ function ContactVendor({
20867
20798
  removeFile,
20868
20799
  resetUpload
20869
20800
  } = useFileUpload({ onError });
20870
- const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
20871
- formFields,
20872
- formConfig,
20873
- onSubmit,
20874
- onSuccess: (data) => {
20875
- resetUpload();
20876
- onSuccess?.(data);
20877
- },
20878
- onError,
20879
- resetOnSuccess: formConfig?.resetOnSuccess !== false,
20880
- uploadTokens
20881
- });
20882
- const actionsContent = useMemo(() => {
20883
- if (actionsSlot) return actionsSlot;
20884
- if (actions && actions.length > 0) {
20885
- return actions.map((action, index) => {
20886
- const {
20887
- label,
20888
- icon,
20889
- iconAfter,
20890
- children,
20891
- className: actionClassName,
20892
- ...pressableProps
20893
- } = action;
20894
- return /* @__PURE__ */ jsx(
20895
- Pressable,
20896
- {
20897
- asButton: true,
20898
- className: actionClassName,
20899
- ...pressableProps,
20900
- children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
20901
- icon,
20902
- label,
20903
- iconAfter
20904
- ] })
20905
- },
20906
- index
20907
- );
20908
- });
20909
- }
20910
- return null;
20911
- }, [actionsSlot, actions]);
20912
20801
  return /* @__PURE__ */ jsx(
20913
20802
  Section,
20914
20803
  {
@@ -20941,62 +20830,38 @@ function ContactVendor({
20941
20830
  }
20942
20831
  ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
20943
20832
  ] }),
20944
- /* @__PURE__ */ jsx(Card, { className: cn("mx-auto max-w-xl", cardClassName), children: /* @__PURE__ */ jsx(CardContent, { className: cn("p-6 lg:p-8", cardContentClassName), children: /* @__PURE__ */ jsxs(
20945
- Form,
20946
- {
20947
- form,
20948
- notificationConfig: {
20949
- submissionError,
20950
- successMessage
20951
- },
20952
- styleConfig: {
20953
- formClassName: cn("space-y-4", formClassName),
20954
- successMessageClassName,
20955
- errorMessageClassName
20956
- },
20957
- formConfig: {
20958
- endpoint: formConfig?.endpoint,
20959
- method: formMethod,
20960
- submissionConfig: formConfig?.submissionConfig
20833
+ /* @__PURE__ */ jsx(Card, { className: cn("mx-auto max-w-xl", cardClassName), children: /* @__PURE__ */ jsx(CardContent, { className: cn("p-6 lg:p-8", cardContentClassName), children: /* @__PURE__ */ jsx(
20834
+ FormEngine,
20835
+ {
20836
+ api: formConfig,
20837
+ fields: formFields,
20838
+ formLayoutSettings: {
20839
+ formLayout: "standard",
20840
+ submitButtonSetup: {
20841
+ submitLabel: /* @__PURE__ */ jsxs(Fragment$1, { children: [
20842
+ buttonIcon,
20843
+ buttonText
20844
+ ] })
20845
+ },
20846
+ styleRules: {
20847
+ formClassName: cn("space-y-4", formClassName),
20848
+ successMessageClassName,
20849
+ errorMessageClassName
20850
+ }
20961
20851
  },
20962
- onNewSubmission: () => {
20852
+ successMessage,
20853
+ onSubmit,
20854
+ onSuccess: (data) => {
20963
20855
  resetUpload();
20964
- resetSubmissionState();
20856
+ onSuccess?.(data);
20965
20857
  },
20966
- children: [
20967
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
20968
- "div",
20969
- {
20970
- className: getColumnSpanClass(field.columnSpan),
20971
- children: /* @__PURE__ */ jsx(
20972
- DynamicFormField,
20973
- {
20974
- field,
20975
- uploadProgress,
20976
- onFileUpload: uploadFiles,
20977
- onFileRemove: removeFile,
20978
- isUploading
20979
- }
20980
- )
20981
- },
20982
- field.name
20983
- )) }),
20984
- actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
20985
- Pressable,
20986
- {
20987
- componentType: "button",
20988
- type: "submit",
20989
- className: cn("w-full", submitClassName),
20990
- size: "lg",
20991
- asButton: true,
20992
- disabled: form.isSubmitting,
20993
- children: [
20994
- buttonIcon,
20995
- buttonText
20996
- ]
20997
- }
20998
- )
20999
- ]
20858
+ onError,
20859
+ resetOnSuccess: formConfig?.resetOnSuccess !== false,
20860
+ uploadTokens,
20861
+ uploadProgress,
20862
+ onFileUpload: uploadFiles,
20863
+ onFileRemove: removeFile,
20864
+ isUploading
21000
20865
  }
21001
20866
  ) }) })
21002
20867
  ] })
@@ -57578,7 +57443,7 @@ function HeroSaasDashboardPreview({
57578
57443
  className: "h-12"
57579
57444
  };
57580
57445
  const action = buttonAction || defaultButtonAction;
57581
- return /* @__PURE__ */ jsxs(
57446
+ return /* @__PURE__ */ jsx("div", { className: "mt-12 w-full flex items-center justify-center", children: /* @__PURE__ */ jsxs(
57582
57447
  Form,
57583
57448
  {
57584
57449
  form,
@@ -57601,7 +57466,7 @@ function HeroSaasDashboardPreview({
57601
57466
  resetSubmissionState();
57602
57467
  },
57603
57468
  children: [
57604
- /* @__PURE__ */ jsx("div", { className: "mt-10 flex flex-col items-center gap-4 sm:flex-row sm:justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center gap-2", children: [
57469
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-4 sm:flex-row sm:justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-md items-center gap-2", children: [
57605
57470
  formFields.map((field) => /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
57606
57471
  DynamicFormField,
57607
57472
  {
@@ -57627,7 +57492,7 @@ function HeroSaasDashboardPreview({
57627
57492
  helperText && (typeof helperText === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm text-center mt-4"), children: helperText }) : helperText)
57628
57493
  ]
57629
57494
  }
57630
- );
57495
+ ) });
57631
57496
  }, [
57632
57497
  formSlot,
57633
57498
  formFields,
@@ -57697,39 +57562,39 @@ function HeroSaasDashboardPreview({
57697
57562
  className: cn(className),
57698
57563
  containerClassName,
57699
57564
  children: /* @__PURE__ */ jsxs("div", { className: "pt-10 md:pt-0", children: [
57700
- /* @__PURE__ */ jsxs("div", { className: cn("mx-auto max-w-4xl text-center", headerClassName), children: [
57701
- renderBadge,
57702
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
57703
- "h1",
57704
- {
57705
- className: cn(
57706
- "mt-8 text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance",
57707
- headingClassName
57708
- ),
57709
- children: heading
57710
- }
57711
- ) : /* @__PURE__ */ jsx(
57712
- "h1",
57713
- {
57714
- className: cn(
57715
- "mt-8 text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance",
57716
- headingClassName
57717
- ),
57718
- children: heading
57719
- }
57720
- )),
57721
- description && (typeof description === "string" ? /* @__PURE__ */ jsx(
57722
- "p",
57723
- {
57724
- className: cn(
57725
- "mt-6 text-lg md:text-xl text-balance",
57726
- descriptionClassName
57727
- ),
57728
- children: description
57729
- }
57730
- ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
57731
- renderForm
57732
- ] }),
57565
+ /* @__PURE__ */ jsxs(
57566
+ "div",
57567
+ {
57568
+ className: cn(
57569
+ "mmx-auto text-center flex flex-col items-center gap-6 md:gap-8 max-w-full md:max-w-md",
57570
+ headerClassName
57571
+ ),
57572
+ children: [
57573
+ renderBadge,
57574
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
57575
+ "h1",
57576
+ {
57577
+ className: cn(
57578
+ "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance",
57579
+ headingClassName
57580
+ ),
57581
+ children: heading
57582
+ }
57583
+ ) : heading),
57584
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
57585
+ "p",
57586
+ {
57587
+ className: cn(
57588
+ "text-lg md:text-xl text-balance",
57589
+ descriptionClassName
57590
+ ),
57591
+ children: description
57592
+ }
57593
+ ) : description),
57594
+ renderForm
57595
+ ]
57596
+ }
57597
+ ),
57733
57598
  renderBrowserPreview
57734
57599
  ] })
57735
57600
  }
@@ -60348,17 +60213,6 @@ function HeroNewsletterMinimal({
60348
60213
  removeFile,
60349
60214
  resetUpload
60350
60215
  } = useFileUpload({ onError });
60351
- const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
60352
- formFields,
60353
- formConfig,
60354
- onSubmit,
60355
- onSuccess: (data) => {
60356
- resetUpload();
60357
- onSuccess?.(data);
60358
- },
60359
- onError,
60360
- uploadTokens
60361
- });
60362
60216
  const renderStats = React23.useMemo(() => {
60363
60217
  if (statsSlot) return statsSlot;
60364
60218
  if (!stats || stats.length === 0) return null;
@@ -60389,77 +60243,58 @@ function HeroNewsletterMinimal({
60389
60243
  if (formSlot) return formSlot;
60390
60244
  const defaultButtonAction = {
60391
60245
  label: "Subscribe",
60392
- variant: "default",
60393
- className: "h-12"
60246
+ variant: "default"
60394
60247
  };
60395
60248
  const action = buttonAction || defaultButtonAction;
60396
- return /* @__PURE__ */ jsxs(
60397
- Form,
60398
- {
60399
- form,
60400
- fields: formFields,
60401
- notificationConfig: {
60402
- submissionError,
60403
- successMessage
60404
- },
60405
- formConfig: {
60406
- endpoint: formConfig?.endpoint,
60407
- method: formMethod,
60408
- submissionConfig: formConfig?.submissionConfig,
60409
- formLayout: "button-group",
60410
- buttonGroupSize: "lg",
60411
- submitLabel: action.label,
60412
- submitVariant: action.variant || "default"
60413
- },
60414
- onNewSubmission: () => {
60415
- resetUpload();
60416
- resetSubmissionState();
60417
- },
60418
- children: [
60419
- formFields.map((field) => /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
60420
- DynamicFormField,
60421
- {
60422
- field,
60423
- uploadProgress,
60424
- onFileUpload: uploadFiles,
60425
- onFileRemove: removeFile,
60426
- isUploading
60427
- }
60428
- ) }, field.name)),
60429
- /* @__PURE__ */ jsxs(
60430
- Pressable,
60431
- {
60432
- onClick: form.handleSubmit,
60433
- asButton: true,
60434
- variant: action.variant,
60435
- className: cn("h-12", action.className),
60436
- disabled: form.isSubmitting,
60437
- children: [
60249
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
60250
+ /* @__PURE__ */ jsx(
60251
+ FormEngine,
60252
+ {
60253
+ api: formConfig,
60254
+ fields: formFields,
60255
+ formLayoutSettings: {
60256
+ formLayout: "button-group",
60257
+ buttonGroupSetup: {
60258
+ size: "lg",
60259
+ submitLabel: /* @__PURE__ */ jsxs(Fragment$1, { children: [
60438
60260
  action.label,
60439
60261
  action.iconAfter
60440
- ]
60262
+ ] }),
60263
+ submitVariant: action.variant || "default"
60441
60264
  }
60442
- ),
60443
- helperText && (typeof helperText === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm mt-2 text-center"), children: helperText }) : helperText)
60444
- ]
60445
- }
60446
- );
60265
+ },
60266
+ successMessage,
60267
+ onSubmit,
60268
+ onSuccess: (data) => {
60269
+ resetUpload();
60270
+ onSuccess?.(data);
60271
+ },
60272
+ onError,
60273
+ uploadTokens,
60274
+ uploadProgress,
60275
+ onFileUpload: uploadFiles,
60276
+ onFileRemove: removeFile,
60277
+ isUploading
60278
+ }
60279
+ ),
60280
+ helperText && (typeof helperText === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm mt-2 text-center"), children: helperText }) : helperText)
60281
+ ] });
60447
60282
  }, [
60448
60283
  formSlot,
60449
60284
  formFields,
60450
- form,
60451
60285
  formConfig,
60452
- formMethod,
60453
60286
  buttonAction,
60287
+ uploadTokens,
60454
60288
  uploadProgress,
60455
60289
  uploadFiles,
60456
60290
  removeFile,
60457
60291
  isUploading,
60458
- submissionError,
60459
60292
  successMessage,
60293
+ onSubmit,
60294
+ onSuccess,
60295
+ onError,
60460
60296
  helperText,
60461
- resetUpload,
60462
- resetSubmissionState
60297
+ resetUpload
60463
60298
  ]);
60464
60299
  return /* @__PURE__ */ jsx(
60465
60300
  Section,
@@ -84410,7 +84245,7 @@ function ListSearchableGrid({
84410
84245
  }
84411
84246
  );
84412
84247
  }
84413
- var { useMemo: useMemo432 } = React23;
84248
+ var { useMemo: useMemo431 } = React23;
84414
84249
  function OfferModalNewsletterDiscount({
84415
84250
  title,
84416
84251
  emailPlaceholder,
@@ -84478,7 +84313,7 @@ function OfferModalNewsletterDiscount({
84478
84313
  });
84479
84314
  const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
84480
84315
  const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
84481
- const renderCloseButton = useMemo432(() => {
84316
+ const renderCloseButton = useMemo431(() => {
84482
84317
  if (closeButtonSlot) return closeButtonSlot;
84483
84318
  if (!closeButtonText) return null;
84484
84319
  return /* @__PURE__ */ jsx("div", { className: "absolute end-1.5 top-1.5", children: /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
@@ -84492,12 +84327,12 @@ function OfferModalNewsletterDiscount({
84492
84327
  }
84493
84328
  ) }) });
84494
84329
  }, [closeButtonSlot, closeButtonText, closeClassName]);
84495
- const renderHeader = useMemo432(() => {
84330
+ const renderHeader = useMemo431(() => {
84496
84331
  if (headerSlot) return headerSlot;
84497
84332
  if (!title) return null;
84498
84333
  return /* @__PURE__ */ jsx(DialogHeader, { className: headerClassName, children: typeof title === "string" ? /* @__PURE__ */ jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) : /* @__PURE__ */ jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) });
84499
84334
  }, [headerSlot, title, headerClassName, titleClassName]);
84500
- const renderForm = useMemo432(() => {
84335
+ const renderForm = useMemo431(() => {
84501
84336
  if (formSlot) return formSlot;
84502
84337
  return /* @__PURE__ */ jsxs(
84503
84338
  Form,
@@ -84559,7 +84394,7 @@ function OfferModalNewsletterDiscount({
84559
84394
  }
84560
84395
  ) });
84561
84396
  }
84562
- var { useMemo: useMemo433 } = React23;
84397
+ var { useMemo: useMemo432 } = React23;
84563
84398
  function OfferModalMembershipImage({
84564
84399
  overline,
84565
84400
  title,
@@ -84636,7 +84471,7 @@ function OfferModalMembershipImage({
84636
84471
  });
84637
84472
  const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
84638
84473
  const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
84639
- const renderImage = useMemo433(() => {
84474
+ const renderImage = useMemo432(() => {
84640
84475
  if (imageSlot) return imageSlot;
84641
84476
  if (!image) return null;
84642
84477
  return /* @__PURE__ */ jsx("div", { className: cn("max-h-[290px] h-full overflow-hidden max-lg:hidden", imageWrapperClassName), children: /* @__PURE__ */ jsx(
@@ -84649,7 +84484,7 @@ function OfferModalMembershipImage({
84649
84484
  }
84650
84485
  ) });
84651
84486
  }, [imageSlot, image, imageWrapperClassName, imageClassName, optixFlowConfig]);
84652
- const renderCloseButton = useMemo433(() => {
84487
+ const renderCloseButton = useMemo432(() => {
84653
84488
  if (closeButtonSlot) return closeButtonSlot;
84654
84489
  return /* @__PURE__ */ jsx("div", { className: "absolute -end-px -top-px z-10", children: /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
84655
84490
  Pressable,
@@ -84665,7 +84500,7 @@ function OfferModalMembershipImage({
84665
84500
  }
84666
84501
  ) }) });
84667
84502
  }, [closeButtonSlot, closeClassName]);
84668
- const renderForm = useMemo433(() => {
84503
+ const renderForm = useMemo432(() => {
84669
84504
  if (formSlot) return formSlot;
84670
84505
  return /* @__PURE__ */ jsxs(
84671
84506
  Form,
@@ -84728,7 +84563,7 @@ function OfferModalMembershipImage({
84728
84563
  }
84729
84564
  );
84730
84565
  }, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
84731
- const renderFooter = useMemo433(() => {
84566
+ const renderFooter = useMemo432(() => {
84732
84567
  if (footerSlot) return footerSlot;
84733
84568
  if (!description) return null;
84734
84569
  return /* @__PURE__ */ jsx(DialogFooter, { className: footerClassName, children: /* @__PURE__ */ jsx(DialogDescription, { className: cn("text-muted-foreground text-center text-xs leading-relaxed", descriptionClassName), children: description }) });
@@ -84848,7 +84683,7 @@ function SheetDescription({
84848
84683
  }
84849
84684
  );
84850
84685
  }
84851
- var { useMemo: useMemo434 } = React23;
84686
+ var { useMemo: useMemo433 } = React23;
84852
84687
  function OfferModalSheetNewsletter({
84853
84688
  logo,
84854
84689
  logoSlot,
@@ -84931,7 +84766,7 @@ function OfferModalSheetNewsletter({
84931
84766
  });
84932
84767
  const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
84933
84768
  const sheetProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
84934
- const renderLogo = useMemo434(() => {
84769
+ const renderLogo = useMemo433(() => {
84935
84770
  if (logoSlot) return logoSlot;
84936
84771
  if (!logo) return null;
84937
84772
  const logoSrc = typeof logo.src === "string" ? logo.src : logo.src.light;
@@ -84945,7 +84780,7 @@ function OfferModalSheetNewsletter({
84945
84780
  }
84946
84781
  );
84947
84782
  }, [logoSlot, logo, logoClassName, optixFlowConfig]);
84948
- const renderHeader = useMemo434(() => {
84783
+ const renderHeader = useMemo433(() => {
84949
84784
  if (headerSlot) return headerSlot;
84950
84785
  return /* @__PURE__ */ jsxs(SheetHeader, { className: cn("gap-8 p-0", headerClassName), children: [
84951
84786
  renderLogo,
@@ -84955,7 +84790,7 @@ function OfferModalSheetNewsletter({
84955
84790
  ] })
84956
84791
  ] });
84957
84792
  }, [headerSlot, renderLogo, headerClassName, title, titleClassName, description, descriptionClassName]);
84958
- const renderForm = useMemo434(() => {
84793
+ const renderForm = useMemo433(() => {
84959
84794
  if (formSlot) return formSlot;
84960
84795
  return /* @__PURE__ */ jsx(
84961
84796
  Form,
@@ -85003,7 +84838,7 @@ function OfferModalSheetNewsletter({
85003
84838
  }
85004
84839
  );
85005
84840
  }, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
85006
- const renderLegal = useMemo434(() => {
84841
+ const renderLegal = useMemo433(() => {
85007
84842
  if (legalSlot) return legalSlot;
85008
84843
  if (!termsUrl || !termsText || !privacyUrl || !privacyText) return null;
85009
84844
  return /* @__PURE__ */ jsxs("p", { className: cn("text-muted-foreground text-xs", legalClassName), children: [
@@ -85017,7 +84852,7 @@ function OfferModalSheetNewsletter({
85017
84852
  "."
85018
84853
  ] });
85019
84854
  }, [legalSlot, termsUrl, termsText, privacyUrl, privacyText, legalClassName]);
85020
- const renderImage = useMemo434(() => {
84855
+ const renderImage = useMemo433(() => {
85021
84856
  if (imageSlot) return imageSlot;
85022
84857
  if (!image) return null;
85023
84858
  return /* @__PURE__ */ jsx("div", { className: cn("h-1/2 basis-1/2", imageWrapperClassName), children: /* @__PURE__ */ jsx(AspectRatio, { ratio: 1, className: "overflow-hidden", children: /* @__PURE__ */ jsx(