@opensite/ui 2.5.0 → 2.5.2
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/components.cjs +133 -162
- package/dist/components.js +134 -163
- package/dist/footer-accordion-social.cjs +22 -104
- package/dist/footer-accordion-social.d.cts +8 -18
- package/dist/footer-accordion-social.d.ts +8 -18
- package/dist/footer-accordion-social.js +23 -105
- package/dist/footer-newsletter-contact.cjs +8 -8
- package/dist/footer-newsletter-contact.d.cts +2 -2
- package/dist/footer-newsletter-contact.d.ts +2 -2
- package/dist/footer-newsletter-contact.js +8 -8
- package/dist/footer-newsletter-minimal.cjs +81 -42
- package/dist/footer-newsletter-minimal.d.cts +3 -1
- package/dist/footer-newsletter-minimal.d.ts +3 -1
- package/dist/footer-newsletter-minimal.js +81 -42
- package/dist/footer-social-newsletter.cjs +619 -758
- package/dist/footer-social-newsletter.d.cts +17 -54
- package/dist/footer-social-newsletter.d.ts +17 -54
- package/dist/footer-social-newsletter.js +620 -759
- package/dist/index.cjs +133 -162
- package/dist/index.js +134 -163
- package/dist/registry.cjs +272 -311
- package/dist/registry.js +273 -312
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -15,7 +15,6 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
|
15
15
|
var icon = require('@page-speed/icon');
|
|
16
16
|
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
17
17
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
18
|
-
var forms = require('@page-speed/forms');
|
|
19
18
|
var integration = require('@page-speed/forms/integration');
|
|
20
19
|
|
|
21
20
|
function _interopNamespace(e) {
|
|
@@ -4663,12 +4662,18 @@ function FooterLinksGrid({
|
|
|
4663
4662
|
}
|
|
4664
4663
|
);
|
|
4665
4664
|
}
|
|
4665
|
+
var DEFAULT_STYLE_RULES = {
|
|
4666
|
+
formContainer: "flex items-stretch w-full",
|
|
4667
|
+
fieldsContainer: "",
|
|
4668
|
+
fieldClassName: "",
|
|
4669
|
+
formClassName: ""
|
|
4670
|
+
};
|
|
4666
4671
|
var DEFAULT_FORM_FIELDS = [
|
|
4667
4672
|
{
|
|
4668
4673
|
name: "email",
|
|
4669
4674
|
type: "email",
|
|
4670
4675
|
label: "Email Address",
|
|
4671
|
-
placeholder: "
|
|
4676
|
+
placeholder: "Email Address",
|
|
4672
4677
|
required: true,
|
|
4673
4678
|
columnSpan: 12
|
|
4674
4679
|
}
|
|
@@ -4681,7 +4686,6 @@ function FooterSocialNewsletter({
|
|
|
4681
4686
|
className,
|
|
4682
4687
|
contentClassName,
|
|
4683
4688
|
logoWrapperClassName,
|
|
4684
|
-
logoClassName,
|
|
4685
4689
|
gridClassName,
|
|
4686
4690
|
navSectionClassName,
|
|
4687
4691
|
navTitleClassName,
|
|
@@ -4690,16 +4694,7 @@ function FooterSocialNewsletter({
|
|
|
4690
4694
|
socialColumnClassName,
|
|
4691
4695
|
socialLinksClassName,
|
|
4692
4696
|
socialLinkClassName,
|
|
4693
|
-
|
|
4694
|
-
formConfig,
|
|
4695
|
-
onSubmit,
|
|
4696
|
-
onSuccess,
|
|
4697
|
-
onError,
|
|
4698
|
-
successMessage,
|
|
4699
|
-
buttonAction,
|
|
4700
|
-
helperText,
|
|
4701
|
-
formSlot,
|
|
4702
|
-
privacyClassName,
|
|
4697
|
+
formEngineSetup,
|
|
4703
4698
|
bottomClassName,
|
|
4704
4699
|
copyrightClassName,
|
|
4705
4700
|
background,
|
|
@@ -4709,104 +4704,36 @@ function FooterSocialNewsletter({
|
|
|
4709
4704
|
patternOpacity,
|
|
4710
4705
|
optixFlowConfig
|
|
4711
4706
|
}) {
|
|
4712
|
-
const {
|
|
4713
|
-
uploadTokens,
|
|
4714
|
-
uploadProgress,
|
|
4715
|
-
isUploading,
|
|
4716
|
-
uploadFiles,
|
|
4717
|
-
removeFile,
|
|
4718
|
-
resetUpload
|
|
4719
|
-
} = integration.useFileUpload({ onError });
|
|
4720
|
-
const { form, submissionError, formMethod, resetSubmissionState } = integration.useContactForm({
|
|
4721
|
-
formFields,
|
|
4722
|
-
formConfig,
|
|
4723
|
-
onSubmit,
|
|
4724
|
-
onSuccess: (data) => {
|
|
4725
|
-
resetUpload();
|
|
4726
|
-
onSuccess?.(data);
|
|
4727
|
-
},
|
|
4728
|
-
onError,
|
|
4729
|
-
uploadTokens
|
|
4730
|
-
});
|
|
4731
4707
|
const renderForm = React4__namespace.useMemo(() => {
|
|
4732
|
-
if (
|
|
4733
|
-
const
|
|
4734
|
-
label: "Subscribe",
|
|
4708
|
+
if (!formEngineSetup) return null;
|
|
4709
|
+
const action = {
|
|
4735
4710
|
variant: "default",
|
|
4736
|
-
|
|
4711
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-right", size: 16 })
|
|
4737
4712
|
};
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
forms.Form,
|
|
4713
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4714
|
+
integration.FormEngine,
|
|
4741
4715
|
{
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
submitLabel: action.label,
|
|
4755
|
-
submitVariant: action.variant || "default",
|
|
4756
|
-
submitIconComponent: action.icon || /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/send" })
|
|
4757
|
-
},
|
|
4758
|
-
onNewSubmission: () => {
|
|
4759
|
-
resetUpload();
|
|
4760
|
-
resetSubmissionState();
|
|
4716
|
+
formEngineSetup: {
|
|
4717
|
+
...formEngineSetup,
|
|
4718
|
+
formLayoutSettings: {
|
|
4719
|
+
...formEngineSetup.formLayoutSettings,
|
|
4720
|
+
formLayout: "button-group",
|
|
4721
|
+
buttonGroupSetup: {
|
|
4722
|
+
...formEngineSetup.formLayoutSettings?.buttonGroupSetup,
|
|
4723
|
+
size: "default",
|
|
4724
|
+
submitLabel: action.icon || action.label,
|
|
4725
|
+
submitVariant: action.variant
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4761
4728
|
},
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
field,
|
|
4768
|
-
uploadProgress,
|
|
4769
|
-
onFileUpload: uploadFiles,
|
|
4770
|
-
onFileRemove: removeFile,
|
|
4771
|
-
isUploading
|
|
4772
|
-
}
|
|
4773
|
-
) }, field.name)),
|
|
4774
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4775
|
-
Pressable,
|
|
4776
|
-
{
|
|
4777
|
-
onClick: form.handleSubmit,
|
|
4778
|
-
asButton: true,
|
|
4779
|
-
variant: action.variant,
|
|
4780
|
-
className: cn("h-12", action.className),
|
|
4781
|
-
disabled: form.isSubmitting,
|
|
4782
|
-
children: [
|
|
4783
|
-
action.label,
|
|
4784
|
-
action.iconAfter
|
|
4785
|
-
]
|
|
4786
|
-
}
|
|
4787
|
-
)
|
|
4788
|
-
] }),
|
|
4789
|
-
helperText && (typeof helperText === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm mt-2"), children: helperText }) : helperText)
|
|
4790
|
-
]
|
|
4729
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
4730
|
+
defaultStyleRules: {
|
|
4731
|
+
...DEFAULT_STYLE_RULES,
|
|
4732
|
+
formContainer: cn(DEFAULT_STYLE_RULES.formContainer)
|
|
4733
|
+
}
|
|
4791
4734
|
}
|
|
4792
4735
|
);
|
|
4793
|
-
}, [
|
|
4794
|
-
formSlot,
|
|
4795
|
-
formFields,
|
|
4796
|
-
form,
|
|
4797
|
-
formConfig,
|
|
4798
|
-
formMethod,
|
|
4799
|
-
buttonAction,
|
|
4800
|
-
uploadProgress,
|
|
4801
|
-
uploadFiles,
|
|
4802
|
-
removeFile,
|
|
4803
|
-
isUploading,
|
|
4804
|
-
submissionError,
|
|
4805
|
-
successMessage,
|
|
4806
|
-
helperText,
|
|
4807
|
-
resetUpload,
|
|
4808
|
-
resetSubmissionState
|
|
4809
|
-
]);
|
|
4736
|
+
}, [formEngineSetup]);
|
|
4810
4737
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4811
4738
|
Section,
|
|
4812
4739
|
{
|
|
@@ -4814,20 +4741,26 @@ function FooterSocialNewsletter({
|
|
|
4814
4741
|
spacing,
|
|
4815
4742
|
pattern,
|
|
4816
4743
|
patternOpacity,
|
|
4817
|
-
className
|
|
4744
|
+
className,
|
|
4818
4745
|
containerClassName,
|
|
4819
4746
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(contentClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("footer", { children: [
|
|
4820
4747
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-20", children: [
|
|
4821
4748
|
logo && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4822
|
-
|
|
4749
|
+
Pressable,
|
|
4823
4750
|
{
|
|
4824
|
-
logo,
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4751
|
+
href: logo.url || "/",
|
|
4752
|
+
className: cn("block mb-8 md:mb-12", logoWrapperClassName),
|
|
4753
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4754
|
+
img.Img,
|
|
4755
|
+
{
|
|
4756
|
+
src: logo.src,
|
|
4757
|
+
className: cn(
|
|
4758
|
+
"h-16 object-contain w-auto max-w-full",
|
|
4759
|
+
logo.className
|
|
4760
|
+
),
|
|
4761
|
+
optixFlowConfig
|
|
4762
|
+
}
|
|
4763
|
+
)
|
|
4831
4764
|
}
|
|
4832
4765
|
),
|
|
4833
4766
|
socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-6", socialColumnClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4840,10 +4773,9 @@ function FooterSocialNewsletter({
|
|
|
4840
4773
|
children: socialLinks.map((social, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4841
4774
|
SocialLinkIcon,
|
|
4842
4775
|
{
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
iconSize: 20,
|
|
4776
|
+
size: "icon-lg",
|
|
4777
|
+
variant: "ghost",
|
|
4778
|
+
...social,
|
|
4847
4779
|
className: cn(
|
|
4848
4780
|
"opacity-80 transition-colors hover:opacity-100",
|
|
4849
4781
|
socialLinkClassName
|
|
@@ -6353,7 +6285,7 @@ function FooterAnimatedSocial({
|
|
|
6353
6285
|
}
|
|
6354
6286
|
);
|
|
6355
6287
|
}
|
|
6356
|
-
var
|
|
6288
|
+
var DEFAULT_STYLE_RULES2 = {
|
|
6357
6289
|
formContainer: "flex w-full items-end border-b border-b-foreground/10",
|
|
6358
6290
|
fieldsContainer: "",
|
|
6359
6291
|
fieldClassName: "",
|
|
@@ -6391,6 +6323,7 @@ function FooterNewsletterMinimal({
|
|
|
6391
6323
|
socialLinksClassName,
|
|
6392
6324
|
socialLinkClassName,
|
|
6393
6325
|
newsletterSectionClassName,
|
|
6326
|
+
newsletterLabelClassName,
|
|
6394
6327
|
newsletterFormClassName,
|
|
6395
6328
|
bottomGridClassName,
|
|
6396
6329
|
locationClassName,
|
|
@@ -6476,9 +6409,9 @@ function FooterNewsletterMinimal({
|
|
|
6476
6409
|
},
|
|
6477
6410
|
defaultFields: DEFAULT_FORM_FIELDS2,
|
|
6478
6411
|
defaultStyleRules: {
|
|
6479
|
-
...
|
|
6412
|
+
...DEFAULT_STYLE_RULES2,
|
|
6480
6413
|
formContainer: cn(
|
|
6481
|
-
|
|
6414
|
+
DEFAULT_STYLE_RULES2.formContainer,
|
|
6482
6415
|
newsletterFormClassName
|
|
6483
6416
|
)
|
|
6484
6417
|
}
|
|
@@ -6504,29 +6437,41 @@ function FooterNewsletterMinimal({
|
|
|
6504
6437
|
),
|
|
6505
6438
|
children: [
|
|
6506
6439
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-10", children: [
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6440
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
6441
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6442
|
+
"h2",
|
|
6443
|
+
{
|
|
6444
|
+
className: cn(
|
|
6445
|
+
"relative text-4xl font-semibold tracking-tight lg:text-5xl text-balance",
|
|
6446
|
+
headingClassName
|
|
6447
|
+
),
|
|
6448
|
+
children: heading
|
|
6449
|
+
}
|
|
6450
|
+
),
|
|
6451
|
+
location && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6452
|
+
"div",
|
|
6453
|
+
{
|
|
6454
|
+
className: cn(
|
|
6455
|
+
"font-semibold text-lg opacity-75",
|
|
6456
|
+
locationClassName
|
|
6457
|
+
),
|
|
6458
|
+
children: location
|
|
6459
|
+
}
|
|
6460
|
+
)
|
|
6461
|
+
] }),
|
|
6462
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4", children: (supportLabel || supportEmail) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6518
6463
|
"div",
|
|
6519
6464
|
{
|
|
6520
6465
|
className: cn(
|
|
6521
|
-
"space-y-1 text-sm
|
|
6466
|
+
"space-y-1 text-sm tracking-tight lg:text-base",
|
|
6522
6467
|
supportClassName
|
|
6523
6468
|
),
|
|
6524
6469
|
children: [
|
|
6525
|
-
supportLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { children: supportLabel }),
|
|
6526
|
-
supportEmail && /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href:
|
|
6470
|
+
supportLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-light opacity-75", children: supportLabel }),
|
|
6471
|
+
supportEmail && /* @__PURE__ */ jsxRuntime.jsx(Pressable, { className: "font-semibold", href: supportEmail, children: supportEmail })
|
|
6527
6472
|
]
|
|
6528
6473
|
}
|
|
6529
|
-
)
|
|
6474
|
+
) })
|
|
6530
6475
|
] }),
|
|
6531
6476
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6532
6477
|
"div",
|
|
@@ -6544,41 +6489,35 @@ function FooterNewsletterMinimal({
|
|
|
6544
6489
|
]
|
|
6545
6490
|
}
|
|
6546
6491
|
),
|
|
6547
|
-
/* @__PURE__ */ jsxRuntime.
|
|
6492
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6548
6493
|
"div",
|
|
6549
6494
|
{
|
|
6550
6495
|
className: cn(
|
|
6551
6496
|
"mt-20 flex flex-col justify-between gap-15 lg:flex-row",
|
|
6552
6497
|
newsletterSectionClassName
|
|
6553
6498
|
),
|
|
6554
|
-
children: [
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
renderForm
|
|
6558
|
-
] }) }),
|
|
6559
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6560
|
-
"div",
|
|
6499
|
+
children: formEngineSetup && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full max-w-md flex-col gap-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
6500
|
+
newsletterLabel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6501
|
+
"p",
|
|
6561
6502
|
{
|
|
6562
6503
|
className: cn(
|
|
6563
|
-
"
|
|
6564
|
-
|
|
6504
|
+
"text-xl font-light tracking-tight",
|
|
6505
|
+
newsletterLabelClassName
|
|
6565
6506
|
),
|
|
6566
|
-
children:
|
|
6567
|
-
location && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-32", locationClassName), children: location }),
|
|
6568
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("space-y-1", footerLinksClassName), children: footerLinksContent })
|
|
6569
|
-
]
|
|
6507
|
+
children: newsletterLabel
|
|
6570
6508
|
}
|
|
6571
|
-
)
|
|
6572
|
-
|
|
6509
|
+
),
|
|
6510
|
+
renderForm
|
|
6511
|
+
] }) })
|
|
6573
6512
|
}
|
|
6574
6513
|
),
|
|
6575
6514
|
brandText && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-20 w-full lg:mt-32", brandSectionClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6576
6515
|
framerMotion.motion.div,
|
|
6577
6516
|
{
|
|
6578
|
-
initial: { opacity: 0, y:
|
|
6517
|
+
initial: { opacity: 0, y: 80 },
|
|
6579
6518
|
whileInView: { opacity: 1, y: 0 },
|
|
6580
|
-
viewport: { once: true },
|
|
6581
|
-
transition: { duration: 0.
|
|
6519
|
+
viewport: { once: true, amount: 0.5 },
|
|
6520
|
+
transition: { duration: 0.9, ease: [0.16, 1, 0.3, 1] },
|
|
6582
6521
|
className: "text-center",
|
|
6583
6522
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6584
6523
|
"span",
|
|
@@ -6596,19 +6535,51 @@ function FooterNewsletterMinimal({
|
|
|
6596
6535
|
"div",
|
|
6597
6536
|
{
|
|
6598
6537
|
className: cn(
|
|
6599
|
-
"
|
|
6538
|
+
"flex flex-col items-center space-y-6",
|
|
6539
|
+
brandText ? "mb-24" : "mt-8",
|
|
6600
6540
|
copyrightClassName
|
|
6601
6541
|
),
|
|
6602
6542
|
children: [
|
|
6603
|
-
/* @__PURE__ */ jsxRuntime.jsx(FooterCopyright, { copyright }),
|
|
6604
6543
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6605
|
-
|
|
6544
|
+
"div",
|
|
6545
|
+
{
|
|
6546
|
+
className: cn(
|
|
6547
|
+
"flex items-center justify-center",
|
|
6548
|
+
bottomGridClassName
|
|
6549
|
+
),
|
|
6550
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6551
|
+
"div",
|
|
6552
|
+
{
|
|
6553
|
+
className: cn(
|
|
6554
|
+
"flex gap-4 md:gap-6 text-sm font-light lg:text-base",
|
|
6555
|
+
"text-center items-center justify-center flex-wrap",
|
|
6556
|
+
footerLinksClassName
|
|
6557
|
+
),
|
|
6558
|
+
children: footerLinksContent
|
|
6559
|
+
}
|
|
6560
|
+
)
|
|
6561
|
+
}
|
|
6562
|
+
),
|
|
6563
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6564
|
+
"div",
|
|
6606
6565
|
{
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6566
|
+
className: cn(
|
|
6567
|
+
"mt-8 text-center text-sm opacity-50",
|
|
6568
|
+
copyrightClassName
|
|
6569
|
+
),
|
|
6570
|
+
children: [
|
|
6571
|
+
/* @__PURE__ */ jsxRuntime.jsx(FooterCopyright, { copyright }),
|
|
6572
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6573
|
+
BrandAttribution,
|
|
6574
|
+
{
|
|
6575
|
+
internalBrandSlug: "open_site_ai",
|
|
6576
|
+
optionIndex: 4,
|
|
6577
|
+
variant: "div",
|
|
6578
|
+
containerClassName: "mt-2",
|
|
6579
|
+
linkClassName: "underline underline-offset-4 transition-colors hover:opacity-100"
|
|
6580
|
+
}
|
|
6581
|
+
)
|
|
6582
|
+
]
|
|
6612
6583
|
}
|
|
6613
6584
|
)
|
|
6614
6585
|
]
|