@opensite/ui 2.1.9 → 2.2.1
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 +170 -193
- package/dist/contact-card.d.cts +33 -69
- package/dist/contact-card.d.ts +33 -69
- package/dist/contact-card.js +171 -194
- package/dist/contact-dark-VpMwwNkH.d.cts +152 -0
- package/dist/contact-dark-tweUQnN1.d.ts +152 -0
- package/dist/contact-dark.cjs +109 -171
- package/dist/contact-dark.d.cts +5 -237
- package/dist/contact-dark.d.ts +5 -237
- package/dist/contact-dark.js +110 -172
- package/dist/contact-emergency.cjs +107 -213
- package/dist/contact-emergency.d.cts +6 -52
- package/dist/contact-emergency.d.ts +6 -52
- package/dist/contact-emergency.js +109 -215
- package/dist/contact-faq.cjs +1 -1
- package/dist/contact-faq.js +1 -1
- package/dist/contact-image.cjs +175 -627
- package/dist/contact-image.d.cts +104 -59
- package/dist/contact-image.d.ts +104 -59
- package/dist/contact-image.js +176 -628
- package/dist/registry.cjs +2400 -2533
- package/dist/registry.js +1159 -1292
- package/dist/team-social-grid.cjs +40 -82
- package/dist/team-social-grid.js +40 -82
- package/package.json +1 -1
package/dist/contact-dark.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { useFileUpload, useContactForm, getColumnSpanClass, DynamicFormField } from '@page-speed/forms/integration';
|
|
4
|
+
import { FormEngine } from '@page-speed/forms/integration';
|
|
6
5
|
import { clsx } from 'clsx';
|
|
7
6
|
import { twMerge } from 'tailwind-merge';
|
|
8
7
|
import { cva } from 'class-variance-authority';
|
|
@@ -823,6 +822,12 @@ var Section = React__default.forwardRef(
|
|
|
823
822
|
}
|
|
824
823
|
);
|
|
825
824
|
Section.displayName = "Section";
|
|
825
|
+
var DEFAULT_STYLE_RULES = {
|
|
826
|
+
formContainer: "",
|
|
827
|
+
fieldsContainer: "",
|
|
828
|
+
fieldClassName: "",
|
|
829
|
+
formClassName: "space-y-6"
|
|
830
|
+
};
|
|
826
831
|
var DEFAULT_FORM_FIELDS = [
|
|
827
832
|
{
|
|
828
833
|
name: "firstName",
|
|
@@ -865,87 +870,42 @@ function ContactDark({
|
|
|
865
870
|
contactDescription = "Fill up the form and our team will get back to you within 24 hours.",
|
|
866
871
|
buttonText = "Submit",
|
|
867
872
|
buttonIcon,
|
|
868
|
-
actions,
|
|
869
|
-
actionsSlot,
|
|
870
873
|
contactOptions,
|
|
871
874
|
contactOptionsSlot,
|
|
872
875
|
socialLinks,
|
|
873
876
|
socialLinksSlot,
|
|
874
|
-
|
|
875
|
-
successMessage = "Thank you! Your message has been sent successfully.",
|
|
877
|
+
formEngineSetup,
|
|
876
878
|
className,
|
|
877
879
|
headerClassName,
|
|
878
880
|
headingClassName,
|
|
879
881
|
descriptionClassName,
|
|
880
882
|
cardClassName,
|
|
881
883
|
formPanelClassName,
|
|
882
|
-
formClassName,
|
|
883
|
-
submitClassName,
|
|
884
884
|
infoPanelClassName,
|
|
885
885
|
contactOptionsClassName,
|
|
886
886
|
socialLinksClassName,
|
|
887
|
-
successMessageClassName,
|
|
888
|
-
errorMessageClassName,
|
|
889
887
|
background,
|
|
890
888
|
spacing = "py-8 md:py-32",
|
|
891
889
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
892
890
|
pattern,
|
|
893
|
-
patternOpacity
|
|
894
|
-
formConfig,
|
|
895
|
-
onSubmit,
|
|
896
|
-
onSuccess,
|
|
897
|
-
onError
|
|
891
|
+
patternOpacity
|
|
898
892
|
}) {
|
|
899
|
-
const {
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
resetUpload();
|
|
913
|
-
onSuccess?.(data);
|
|
914
|
-
},
|
|
915
|
-
onError,
|
|
916
|
-
resetOnSuccess: formConfig?.resetOnSuccess !== false,
|
|
917
|
-
uploadTokens
|
|
918
|
-
});
|
|
919
|
-
const actionsContent = React.useMemo(() => {
|
|
920
|
-
if (actionsSlot) return actionsSlot;
|
|
921
|
-
if (actions && actions.length > 0) {
|
|
922
|
-
return actions.map((action, index) => {
|
|
923
|
-
const {
|
|
924
|
-
label,
|
|
925
|
-
icon,
|
|
926
|
-
iconAfter,
|
|
927
|
-
children,
|
|
928
|
-
className: actionClassName,
|
|
929
|
-
...pressableProps
|
|
930
|
-
} = action;
|
|
931
|
-
return /* @__PURE__ */ jsx(
|
|
932
|
-
Pressable,
|
|
933
|
-
{
|
|
934
|
-
asButton: true,
|
|
935
|
-
className: actionClassName,
|
|
936
|
-
...pressableProps,
|
|
937
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
938
|
-
icon,
|
|
939
|
-
label,
|
|
940
|
-
iconAfter
|
|
941
|
-
] })
|
|
942
|
-
},
|
|
943
|
-
index
|
|
944
|
-
);
|
|
945
|
-
});
|
|
893
|
+
const formStyleRules = React.useMemo(() => {
|
|
894
|
+
return {
|
|
895
|
+
formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
|
|
896
|
+
fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
|
|
897
|
+
fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
|
|
898
|
+
formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
|
|
899
|
+
successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
|
|
900
|
+
errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
|
|
901
|
+
};
|
|
902
|
+
}, [formEngineSetup?.formLayoutSettings?.styleRules]);
|
|
903
|
+
const formFields = React.useMemo(() => {
|
|
904
|
+
if (formEngineSetup?.fields && formEngineSetup.fields.length > 0) {
|
|
905
|
+
return formEngineSetup.fields;
|
|
946
906
|
}
|
|
947
|
-
return
|
|
948
|
-
}, [
|
|
907
|
+
return DEFAULT_FORM_FIELDS;
|
|
908
|
+
}, [formEngineSetup?.fields]);
|
|
949
909
|
const contactOptionsContent = React.useMemo(() => {
|
|
950
910
|
if (contactOptionsSlot) return contactOptionsSlot;
|
|
951
911
|
if (contactOptions && contactOptions.length > 0) {
|
|
@@ -1000,124 +960,102 @@ function ContactDark({
|
|
|
1000
960
|
patternOpacity,
|
|
1001
961
|
className,
|
|
1002
962
|
containerClassName,
|
|
1003
|
-
children: /* @__PURE__ */
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
|
|
1025
|
-
] }),
|
|
1026
|
-
/* @__PURE__ */ jsxs(
|
|
1027
|
-
Card,
|
|
1028
|
-
{
|
|
1029
|
-
className: cn(
|
|
1030
|
-
"grid gap-0 overflow-hidden grid-cols-1 lg:grid-cols-2 pt-0 pb-0",
|
|
1031
|
-
cardClassName
|
|
1032
|
-
),
|
|
1033
|
-
children: [
|
|
1034
|
-
/* @__PURE__ */ jsx("div", { className: cn("p-6 lg:p-12", formPanelClassName), children: /* @__PURE__ */ jsxs(
|
|
1035
|
-
Form,
|
|
1036
|
-
{
|
|
1037
|
-
form,
|
|
1038
|
-
notificationConfig: {
|
|
1039
|
-
submissionError,
|
|
1040
|
-
successMessage
|
|
1041
|
-
},
|
|
1042
|
-
styleConfig: {
|
|
1043
|
-
formClassName: cn("space-y-6", formClassName),
|
|
1044
|
-
successMessageClassName,
|
|
1045
|
-
errorMessageClassName
|
|
1046
|
-
},
|
|
1047
|
-
formConfig: {
|
|
1048
|
-
endpoint: formConfig?.endpoint,
|
|
1049
|
-
method: formMethod,
|
|
1050
|
-
submissionConfig: formConfig?.submissionConfig
|
|
1051
|
-
},
|
|
1052
|
-
onNewSubmission: () => {
|
|
1053
|
-
resetUpload();
|
|
1054
|
-
resetSubmissionState();
|
|
963
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(
|
|
964
|
+
Card,
|
|
965
|
+
{
|
|
966
|
+
className: cn(
|
|
967
|
+
"grid gap-0 overflow-hidden grid-cols-1 lg:grid-cols-2 pt-0 pb-0",
|
|
968
|
+
cardClassName
|
|
969
|
+
),
|
|
970
|
+
children: [
|
|
971
|
+
/* @__PURE__ */ jsx("div", { className: cn("p-6 lg:p-12", formPanelClassName), children: formEngineSetup ? /* @__PURE__ */ jsx(
|
|
972
|
+
FormEngine,
|
|
973
|
+
{
|
|
974
|
+
...formEngineSetup,
|
|
975
|
+
formLayoutSettings: {
|
|
976
|
+
...formEngineSetup.formLayoutSettings,
|
|
977
|
+
formLayout: "standard",
|
|
978
|
+
submitButtonSetup: {
|
|
979
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
980
|
+
submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
981
|
+
buttonIcon,
|
|
982
|
+
buttonText
|
|
983
|
+
] })
|
|
1055
984
|
},
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
985
|
+
styleRules: formStyleRules
|
|
986
|
+
},
|
|
987
|
+
fields: formFields
|
|
988
|
+
}
|
|
989
|
+
) : null }),
|
|
990
|
+
/* @__PURE__ */ jsxs(
|
|
991
|
+
"div",
|
|
992
|
+
{
|
|
993
|
+
className: cn(
|
|
994
|
+
"flex flex-col justify-between bg-primary p-6 text-primary-foreground lg:p-8",
|
|
995
|
+
infoPanelClassName
|
|
996
|
+
),
|
|
997
|
+
children: [
|
|
998
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
999
|
+
"div",
|
|
1000
|
+
{
|
|
1001
|
+
className: cn(
|
|
1002
|
+
"pb-6 md:pb-8 border-b-2 border-border/50 mb-6 md:mb-8 text-left",
|
|
1003
|
+
headerClassName
|
|
1004
|
+
),
|
|
1005
|
+
children: [
|
|
1006
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
1007
|
+
"h2",
|
|
1063
1008
|
{
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1009
|
+
className: cn(
|
|
1010
|
+
"text-3xl font-bold tracking-tight text-pretty md:text-5xl",
|
|
1011
|
+
headingClassName
|
|
1012
|
+
),
|
|
1013
|
+
children: heading
|
|
1069
1014
|
}
|
|
1070
|
-
)
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
)
|
|
1088
|
-
]
|
|
1089
|
-
}
|
|
1090
|
-
) }),
|
|
1091
|
-
/* @__PURE__ */ jsxs(
|
|
1092
|
-
"div",
|
|
1093
|
-
{
|
|
1094
|
-
className: cn(
|
|
1095
|
-
"flex flex-col justify-between bg-primary p-6 text-primary-foreground lg:p-8",
|
|
1096
|
-
infoPanelClassName
|
|
1097
|
-
),
|
|
1098
|
-
children: [
|
|
1099
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1100
|
-
contactHeading && (typeof contactHeading === "string" ? /* @__PURE__ */ jsx("h3", { className: "mb-3 text-xl font-semibold", children: contactHeading }) : /* @__PURE__ */ jsx("div", { className: "mb-3", children: contactHeading })),
|
|
1101
|
-
contactDescription && (typeof contactDescription === "string" ? /* @__PURE__ */ jsx("p", { className: "mb-8 text-sm text-primary-foreground/80", children: contactDescription }) : /* @__PURE__ */ jsx("div", { className: "mb-8", children: contactDescription })),
|
|
1102
|
-
/* @__PURE__ */ jsx("div", { className: cn("space-y-4", contactOptionsClassName), children: contactOptionsContent })
|
|
1103
|
-
] }),
|
|
1015
|
+
) : heading),
|
|
1016
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
1017
|
+
"p",
|
|
1018
|
+
{
|
|
1019
|
+
className: cn(
|
|
1020
|
+
"leading-relaxed text-balance",
|
|
1021
|
+
descriptionClassName
|
|
1022
|
+
),
|
|
1023
|
+
children: description
|
|
1024
|
+
}
|
|
1025
|
+
) : description)
|
|
1026
|
+
]
|
|
1027
|
+
}
|
|
1028
|
+
) }),
|
|
1029
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-4", children: [
|
|
1030
|
+
contactHeading && (typeof contactHeading === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold", children: contactHeading }) : contactHeading),
|
|
1031
|
+
contactDescription && (typeof contactDescription === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm text-primary-foreground/80", children: contactDescription }) : contactDescription),
|
|
1104
1032
|
/* @__PURE__ */ jsx(
|
|
1105
1033
|
"div",
|
|
1106
1034
|
{
|
|
1107
1035
|
className: cn(
|
|
1108
|
-
"
|
|
1109
|
-
|
|
1036
|
+
"pt-6 md:pt-8 space-y-4",
|
|
1037
|
+
contactOptionsClassName
|
|
1110
1038
|
),
|
|
1111
|
-
children:
|
|
1039
|
+
children: contactOptionsContent
|
|
1112
1040
|
}
|
|
1113
1041
|
)
|
|
1114
|
-
]
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1042
|
+
] }),
|
|
1043
|
+
/* @__PURE__ */ jsx(
|
|
1044
|
+
"div",
|
|
1045
|
+
{
|
|
1046
|
+
className: cn(
|
|
1047
|
+
"mt-8 flex items-center gap-4",
|
|
1048
|
+
socialLinksClassName
|
|
1049
|
+
),
|
|
1050
|
+
children: socialLinksContent
|
|
1051
|
+
}
|
|
1052
|
+
)
|
|
1053
|
+
]
|
|
1054
|
+
}
|
|
1055
|
+
)
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
) })
|
|
1121
1059
|
}
|
|
1122
1060
|
);
|
|
1123
1061
|
}
|