@opensite/ui 2.1.9 → 2.2.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/about-network-spotlight.cjs +84 -14
- package/dist/about-network-spotlight.d.cts +5 -1
- package/dist/about-network-spotlight.d.ts +5 -1
- package/dist/about-network-spotlight.js +84 -14
- package/dist/contact-card.cjs +156 -193
- package/dist/contact-card.d.cts +33 -69
- package/dist/contact-card.d.ts +33 -69
- package/dist/contact-card.js +157 -194
- package/dist/contact-dark-VpMwwNkH.d.cts +152 -0
- package/dist/contact-dark-tweUQnN1.d.ts +152 -0
- package/dist/contact-dark.cjs +97 -173
- package/dist/contact-dark.d.cts +5 -237
- package/dist/contact-dark.d.ts +5 -237
- package/dist/contact-dark.js +98 -174
- package/dist/contact-emergency.cjs +92 -212
- package/dist/contact-emergency.d.cts +6 -52
- package/dist/contact-emergency.d.ts +6 -52
- package/dist/contact-emergency.js +94 -214
- package/dist/contact-faq.cjs +23 -36
- package/dist/contact-faq.js +19 -35
- package/dist/contact-image.cjs +156 -622
- package/dist/contact-image.d.cts +104 -59
- package/dist/contact-image.d.ts +104 -59
- package/dist/contact-image.js +158 -624
- package/dist/contact-vendor.cjs +8 -44
- package/dist/contact-vendor.js +6 -27
- package/dist/hero-image-slider.cjs +15 -30
- package/dist/hero-image-slider.js +15 -30
- package/dist/hero-newsletter-minimal.cjs +17 -34
- package/dist/hero-newsletter-minimal.js +17 -34
- package/dist/registry.cjs +731 -987
- package/dist/registry.js +731 -987
- package/dist/team-social-grid.cjs +40 -82
- package/dist/team-social-grid.js +40 -82
- package/package.json +2 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import React__default, { useMemo } from 'react';
|
|
4
|
-
import { Form } from '@page-speed/forms';
|
|
5
|
-
import { useFileUpload, useContactForm, getColumnSpanClass, DynamicFormField } from '@page-speed/forms/integration';
|
|
2
|
+
import { FormEngine } from '@page-speed/forms/integration';
|
|
6
3
|
import { clsx } from 'clsx';
|
|
7
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import React__default from 'react';
|
|
8
7
|
import { cva } from 'class-variance-authority';
|
|
9
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
9
|
import { Icon } from '@page-speed/icon';
|
|
@@ -810,32 +809,12 @@ var Section = React__default.forwardRef(
|
|
|
810
809
|
}
|
|
811
810
|
);
|
|
812
811
|
Section.displayName = "Section";
|
|
813
|
-
var
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
icon: "lucide/mail",
|
|
822
|
-
title: "Email Support",
|
|
823
|
-
subtitle: "emergency@support.com",
|
|
824
|
-
href: "mailto:emergency@support.com"
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
icon: "lucide/message-circle",
|
|
828
|
-
title: "Live Chat",
|
|
829
|
-
subtitle: "24/7 Available",
|
|
830
|
-
href: "#chat"
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
icon: "lucide/map-pin",
|
|
834
|
-
title: "Visit Us",
|
|
835
|
-
subtitle: "123 Support Lane",
|
|
836
|
-
href: "#location"
|
|
837
|
-
}
|
|
838
|
-
];
|
|
812
|
+
var DEFAULT_STYLE_RULES = {
|
|
813
|
+
formContainer: "",
|
|
814
|
+
fieldsContainer: "",
|
|
815
|
+
fieldClassName: "",
|
|
816
|
+
formClassName: "space-y-4"
|
|
817
|
+
};
|
|
839
818
|
var PRIORITIES = [
|
|
840
819
|
{
|
|
841
820
|
value: "critical",
|
|
@@ -910,82 +889,20 @@ var DEFAULT_FORM_FIELDS = [
|
|
|
910
889
|
function ContactEmergency({
|
|
911
890
|
heading,
|
|
912
891
|
description,
|
|
913
|
-
contactItems
|
|
892
|
+
contactItems,
|
|
914
893
|
buttonText = "Submit Emergency Request",
|
|
915
894
|
buttonIcon,
|
|
916
|
-
|
|
917
|
-
actionsSlot,
|
|
918
|
-
formFields = DEFAULT_FORM_FIELDS,
|
|
919
|
-
successMessage = "Thank you! Your emergency request has been received.",
|
|
895
|
+
formEngineSetup,
|
|
920
896
|
className,
|
|
921
897
|
headerClassName,
|
|
922
898
|
headingClassName,
|
|
923
899
|
descriptionClassName,
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
successMessageClassName,
|
|
927
|
-
errorMessageClassName,
|
|
928
|
-
spacing = "py-8 md:py-32",
|
|
929
|
-
containerClassName = "w-full max-w-full relative z-10 px-6 sm:px-6 md:px-8 lg:px-8",
|
|
900
|
+
spacing = "py-16 md:py-32",
|
|
901
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
930
902
|
background,
|
|
931
903
|
pattern,
|
|
932
|
-
patternOpacity
|
|
933
|
-
formConfig,
|
|
934
|
-
onSubmit,
|
|
935
|
-
onSuccess,
|
|
936
|
-
onError
|
|
904
|
+
patternOpacity
|
|
937
905
|
}) {
|
|
938
|
-
const {
|
|
939
|
-
uploadTokens,
|
|
940
|
-
uploadProgress,
|
|
941
|
-
isUploading,
|
|
942
|
-
uploadFiles,
|
|
943
|
-
removeFile,
|
|
944
|
-
resetUpload
|
|
945
|
-
} = useFileUpload({ onError });
|
|
946
|
-
const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
|
|
947
|
-
formFields,
|
|
948
|
-
formConfig,
|
|
949
|
-
onSubmit,
|
|
950
|
-
onSuccess: (data) => {
|
|
951
|
-
resetUpload();
|
|
952
|
-
onSuccess?.(data);
|
|
953
|
-
},
|
|
954
|
-
onError,
|
|
955
|
-
resetOnSuccess: formConfig?.resetOnSuccess !== false,
|
|
956
|
-
uploadTokens
|
|
957
|
-
});
|
|
958
|
-
const otherFields = formFields.filter((f) => f.name !== "priority");
|
|
959
|
-
const actionsContent = useMemo(() => {
|
|
960
|
-
if (actionsSlot) return actionsSlot;
|
|
961
|
-
if (actions && actions.length > 0) {
|
|
962
|
-
return actions.map((action, index) => {
|
|
963
|
-
const {
|
|
964
|
-
label,
|
|
965
|
-
icon,
|
|
966
|
-
iconAfter,
|
|
967
|
-
children,
|
|
968
|
-
className: actionClassName,
|
|
969
|
-
...pressableProps
|
|
970
|
-
} = action;
|
|
971
|
-
return /* @__PURE__ */ jsx(
|
|
972
|
-
Pressable,
|
|
973
|
-
{
|
|
974
|
-
asButton: true,
|
|
975
|
-
className: actionClassName,
|
|
976
|
-
...pressableProps,
|
|
977
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
978
|
-
icon,
|
|
979
|
-
label,
|
|
980
|
-
iconAfter
|
|
981
|
-
] })
|
|
982
|
-
},
|
|
983
|
-
index
|
|
984
|
-
);
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
return null;
|
|
988
|
-
}, [actionsSlot, actions]);
|
|
989
906
|
return /* @__PURE__ */ jsx(
|
|
990
907
|
Section,
|
|
991
908
|
{
|
|
@@ -995,126 +912,89 @@ function ContactEmergency({
|
|
|
995
912
|
patternOpacity,
|
|
996
913
|
className,
|
|
997
914
|
containerClassName,
|
|
998
|
-
children: /* @__PURE__ */
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
}
|
|
1071
|
-
) }) : null,
|
|
1072
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1073
|
-
/* @__PURE__ */ jsx("p", { className: "font-bold text-xs uppercase opacity-70", children: item.title }),
|
|
1074
|
-
/* @__PURE__ */ jsx("p", { className: "text-md font-semibold", children: item.subtitle })
|
|
1075
|
-
] })
|
|
1076
|
-
] })
|
|
1077
|
-
},
|
|
1078
|
-
index
|
|
1079
|
-
)) })
|
|
1080
|
-
] }) }),
|
|
1081
|
-
/* @__PURE__ */ jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
1082
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-4", children: otherFields.map((field) => /* @__PURE__ */ jsx(
|
|
1083
|
-
"div",
|
|
1084
|
-
{
|
|
1085
|
-
className: getColumnSpanClass(field.columnSpan),
|
|
1086
|
-
children: /* @__PURE__ */ jsx(
|
|
1087
|
-
DynamicFormField,
|
|
1088
|
-
{
|
|
1089
|
-
field,
|
|
1090
|
-
uploadProgress,
|
|
1091
|
-
onFileUpload: uploadFiles,
|
|
1092
|
-
onFileRemove: removeFile,
|
|
1093
|
-
isUploading
|
|
1094
|
-
}
|
|
1095
|
-
)
|
|
1096
|
-
},
|
|
1097
|
-
field.name
|
|
1098
|
-
)) }),
|
|
1099
|
-
actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxs(
|
|
1100
|
-
Pressable,
|
|
1101
|
-
{
|
|
1102
|
-
componentType: "button",
|
|
1103
|
-
type: "submit",
|
|
1104
|
-
className: cn("w-full", submitClassName),
|
|
1105
|
-
size: "lg",
|
|
1106
|
-
asButton: true,
|
|
1107
|
-
disabled: form.isSubmitting,
|
|
1108
|
-
children: [
|
|
915
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-2 gap-12 md:gap-28", children: [
|
|
916
|
+
/* @__PURE__ */ jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start justify-between h-full gap-8 md:gap-12", children: [
|
|
917
|
+
/* @__PURE__ */ jsxs(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
className: cn(
|
|
921
|
+
"flex flex-col items-start gap-4 text-left",
|
|
922
|
+
headerClassName
|
|
923
|
+
),
|
|
924
|
+
children: [
|
|
925
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
926
|
+
"h2",
|
|
927
|
+
{
|
|
928
|
+
className: cn(
|
|
929
|
+
"text-4xl lg:text-5xl xl:text-6xl font-bold text-pretty",
|
|
930
|
+
headingClassName
|
|
931
|
+
),
|
|
932
|
+
children: heading
|
|
933
|
+
}
|
|
934
|
+
) : heading),
|
|
935
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
936
|
+
"p",
|
|
937
|
+
{
|
|
938
|
+
className: cn(
|
|
939
|
+
"leading-relaxed text-pretty md:text-balance text-lg",
|
|
940
|
+
descriptionClassName
|
|
941
|
+
),
|
|
942
|
+
children: description
|
|
943
|
+
}
|
|
944
|
+
) : description)
|
|
945
|
+
]
|
|
946
|
+
}
|
|
947
|
+
),
|
|
948
|
+
contactItems && contactItems.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 md:gap-6 w-full", children: contactItems.map((item, index) => /* @__PURE__ */ jsx(
|
|
949
|
+
Pressable,
|
|
950
|
+
{
|
|
951
|
+
href: item.href,
|
|
952
|
+
className: cn(
|
|
953
|
+
"rounded-xl border bg-transparent hover:bg-muted ring-2",
|
|
954
|
+
"px-4 py-4 flex",
|
|
955
|
+
"justify-start items-start transition-all",
|
|
956
|
+
"duration-500 hover:text-muted-foreground",
|
|
957
|
+
item.className
|
|
958
|
+
),
|
|
959
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
960
|
+
item.icon ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-2 rounded-xl border bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx(
|
|
961
|
+
DynamicIcon,
|
|
962
|
+
{
|
|
963
|
+
name: item.icon,
|
|
964
|
+
size: item.iconSize ?? 24
|
|
965
|
+
}
|
|
966
|
+
) }) : null,
|
|
967
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
968
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-xs uppercase opacity-70", children: item.title }),
|
|
969
|
+
/* @__PURE__ */ jsx("p", { className: "text-md font-medium", children: item.subtitle })
|
|
970
|
+
] })
|
|
971
|
+
] })
|
|
972
|
+
},
|
|
973
|
+
index
|
|
974
|
+
)) })
|
|
975
|
+
] }) }),
|
|
976
|
+
/* @__PURE__ */ jsx("div", { className: "p-6", children: formEngineSetup ? /* @__PURE__ */ jsx(
|
|
977
|
+
FormEngine,
|
|
978
|
+
{
|
|
979
|
+
formEngineSetup: {
|
|
980
|
+
...formEngineSetup,
|
|
981
|
+
formLayoutSettings: {
|
|
982
|
+
...formEngineSetup.formLayoutSettings,
|
|
983
|
+
formLayout: "standard",
|
|
984
|
+
submitButtonSetup: {
|
|
985
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
986
|
+
submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1109
987
|
buttonIcon,
|
|
1110
988
|
buttonText
|
|
1111
|
-
]
|
|
989
|
+
] })
|
|
1112
990
|
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
994
|
+
defaultStyleRules: DEFAULT_STYLE_RULES
|
|
995
|
+
}
|
|
996
|
+
) : null })
|
|
997
|
+
] })
|
|
1118
998
|
}
|
|
1119
999
|
);
|
|
1120
1000
|
}
|
package/dist/contact-faq.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var integration = require('@page-speed/forms/integration');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -9,6 +9,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
9
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
10
10
|
var icon = require('@page-speed/icon');
|
|
11
11
|
|
|
12
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
|
|
12
14
|
function _interopNamespace(e) {
|
|
13
15
|
if (e && e.__esModule) return e;
|
|
14
16
|
var n = Object.create(null);
|
|
@@ -27,7 +29,7 @@ function _interopNamespace(e) {
|
|
|
27
29
|
return Object.freeze(n);
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
var
|
|
32
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
31
33
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
32
34
|
|
|
33
35
|
// components/blocks/contact/contact-faq.tsx
|
|
@@ -130,7 +132,7 @@ var maxWidthStyles = {
|
|
|
130
132
|
"4xl": "max-w-[1536px]",
|
|
131
133
|
full: "max-w-full"
|
|
132
134
|
};
|
|
133
|
-
var Container =
|
|
135
|
+
var Container = React__default.default.forwardRef(
|
|
134
136
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
135
137
|
const Component = as;
|
|
136
138
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -435,7 +437,7 @@ var spacingStyles = {
|
|
|
435
437
|
};
|
|
436
438
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
437
439
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
438
|
-
var Section =
|
|
440
|
+
var Section = React__default.default.forwardRef(
|
|
439
441
|
({
|
|
440
442
|
id,
|
|
441
443
|
title,
|
|
@@ -567,25 +569,8 @@ function ContactFaq({
|
|
|
567
569
|
pattern,
|
|
568
570
|
patternOpacity
|
|
569
571
|
}) {
|
|
570
|
-
const formStyleRules = React3__namespace.useMemo(() => {
|
|
571
|
-
return {
|
|
572
|
-
formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
|
|
573
|
-
fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
|
|
574
|
-
fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
|
|
575
|
-
formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
|
|
576
|
-
successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
|
|
577
|
-
errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
|
|
578
|
-
};
|
|
579
|
-
}, [formEngineSetup?.formLayoutSettings?.styleRules]);
|
|
580
|
-
const formFields = React3__namespace.useMemo(() => {
|
|
581
|
-
if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
|
|
582
|
-
return formEngineSetup.fields;
|
|
583
|
-
} else {
|
|
584
|
-
return DEFAULT_FORM_FIELDS;
|
|
585
|
-
}
|
|
586
|
-
}, [formEngineSetup?.fields]);
|
|
587
572
|
const hasFaqItems = itemsSlot || items && items.length > 0;
|
|
588
|
-
const faqContent =
|
|
573
|
+
const faqContent = React.useMemo(() => {
|
|
589
574
|
if (itemsSlot) return itemsSlot;
|
|
590
575
|
if (!items || items.length === 0) return null;
|
|
591
576
|
return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "single", collapsible: true, className: accordionClassName, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -677,24 +662,26 @@ function ContactFaq({
|
|
|
677
662
|
),
|
|
678
663
|
children: formHeading
|
|
679
664
|
}
|
|
680
|
-
) :
|
|
665
|
+
) : formHeading),
|
|
681
666
|
formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
682
667
|
integration.FormEngine,
|
|
683
668
|
{
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
669
|
+
formEngineSetup: {
|
|
670
|
+
...formEngineSetup,
|
|
671
|
+
formLayoutSettings: {
|
|
672
|
+
...formEngineSetup.formLayoutSettings,
|
|
673
|
+
formLayout: "standard",
|
|
674
|
+
submitButtonSetup: {
|
|
675
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
676
|
+
submitLabel: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
677
|
+
buttonIcon,
|
|
678
|
+
buttonText
|
|
679
|
+
] })
|
|
680
|
+
}
|
|
681
|
+
}
|
|
696
682
|
},
|
|
697
|
-
|
|
683
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
684
|
+
defaultStyleRules: DEFAULT_STYLE_RULES
|
|
698
685
|
}
|
|
699
686
|
) : null
|
|
700
687
|
] }) }),
|
package/dist/contact-faq.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import React3__default, { useMemo } from 'react';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
4
3
|
import { FormEngine } from '@page-speed/forms/integration';
|
|
5
4
|
import { clsx } from 'clsx';
|
|
6
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -108,7 +107,7 @@ var maxWidthStyles = {
|
|
|
108
107
|
"4xl": "max-w-[1536px]",
|
|
109
108
|
full: "max-w-full"
|
|
110
109
|
};
|
|
111
|
-
var Container =
|
|
110
|
+
var Container = React.forwardRef(
|
|
112
111
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
113
112
|
const Component = as;
|
|
114
113
|
return /* @__PURE__ */ jsx(
|
|
@@ -413,7 +412,7 @@ var spacingStyles = {
|
|
|
413
412
|
};
|
|
414
413
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
415
414
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
416
|
-
var Section =
|
|
415
|
+
var Section = React.forwardRef(
|
|
417
416
|
({
|
|
418
417
|
id,
|
|
419
418
|
title,
|
|
@@ -545,23 +544,6 @@ function ContactFaq({
|
|
|
545
544
|
pattern,
|
|
546
545
|
patternOpacity
|
|
547
546
|
}) {
|
|
548
|
-
const formStyleRules = React3.useMemo(() => {
|
|
549
|
-
return {
|
|
550
|
-
formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
|
|
551
|
-
fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
|
|
552
|
-
fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
|
|
553
|
-
formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
|
|
554
|
-
successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
|
|
555
|
-
errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
|
|
556
|
-
};
|
|
557
|
-
}, [formEngineSetup?.formLayoutSettings?.styleRules]);
|
|
558
|
-
const formFields = React3.useMemo(() => {
|
|
559
|
-
if (formEngineSetup && formEngineSetup?.fields && formEngineSetup?.fields?.length > 0) {
|
|
560
|
-
return formEngineSetup.fields;
|
|
561
|
-
} else {
|
|
562
|
-
return DEFAULT_FORM_FIELDS;
|
|
563
|
-
}
|
|
564
|
-
}, [formEngineSetup?.fields]);
|
|
565
547
|
const hasFaqItems = itemsSlot || items && items.length > 0;
|
|
566
548
|
const faqContent = useMemo(() => {
|
|
567
549
|
if (itemsSlot) return itemsSlot;
|
|
@@ -655,24 +637,26 @@ function ContactFaq({
|
|
|
655
637
|
),
|
|
656
638
|
children: formHeading
|
|
657
639
|
}
|
|
658
|
-
) :
|
|
640
|
+
) : formHeading),
|
|
659
641
|
formEngineSetup ? /* @__PURE__ */ jsx(
|
|
660
642
|
FormEngine,
|
|
661
643
|
{
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
644
|
+
formEngineSetup: {
|
|
645
|
+
...formEngineSetup,
|
|
646
|
+
formLayoutSettings: {
|
|
647
|
+
...formEngineSetup.formLayoutSettings,
|
|
648
|
+
formLayout: "standard",
|
|
649
|
+
submitButtonSetup: {
|
|
650
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
651
|
+
submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
652
|
+
buttonIcon,
|
|
653
|
+
buttonText
|
|
654
|
+
] })
|
|
655
|
+
}
|
|
656
|
+
}
|
|
674
657
|
},
|
|
675
|
-
|
|
658
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
659
|
+
defaultStyleRules: DEFAULT_STYLE_RULES
|
|
676
660
|
}
|
|
677
661
|
) : null
|
|
678
662
|
] }) }),
|