@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
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,26 @@ 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
|
-
uploadTokens,
|
|
901
|
-
uploadProgress,
|
|
902
|
-
isUploading,
|
|
903
|
-
uploadFiles,
|
|
904
|
-
removeFile,
|
|
905
|
-
resetUpload
|
|
906
|
-
} = useFileUpload({ onError });
|
|
907
|
-
const { form, submissionError, formMethod, resetSubmissionState } = useContactForm({
|
|
908
|
-
formFields,
|
|
909
|
-
formConfig,
|
|
910
|
-
onSubmit,
|
|
911
|
-
onSuccess: (data) => {
|
|
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
|
-
});
|
|
946
|
-
}
|
|
947
|
-
return null;
|
|
948
|
-
}, [actionsSlot, actions]);
|
|
949
893
|
const contactOptionsContent = React.useMemo(() => {
|
|
950
894
|
if (contactOptionsSlot) return contactOptionsSlot;
|
|
951
895
|
if (contactOptions && contactOptions.length > 0) {
|
|
@@ -1000,124 +944,104 @@ function ContactDark({
|
|
|
1000
944
|
patternOpacity,
|
|
1001
945
|
className,
|
|
1002
946
|
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
|
-
|
|
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
|
-
submissionConfig: formConfig?.submissionConfig
|
|
1051
|
-
},
|
|
1052
|
-
onNewSubmission: () => {
|
|
1053
|
-
resetUpload();
|
|
1054
|
-
resetSubmissionState();
|
|
1055
|
-
},
|
|
1056
|
-
children: [
|
|
1057
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-6", children: formFields.map((field) => /* @__PURE__ */ jsx(
|
|
1058
|
-
"div",
|
|
1059
|
-
{
|
|
1060
|
-
className: getColumnSpanClass(field.columnSpan),
|
|
1061
|
-
children: /* @__PURE__ */ jsx(
|
|
1062
|
-
DynamicFormField,
|
|
947
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(
|
|
948
|
+
Card,
|
|
949
|
+
{
|
|
950
|
+
className: cn(
|
|
951
|
+
"grid gap-0 overflow-hidden grid-cols-1 lg:grid-cols-2 pt-0 pb-0",
|
|
952
|
+
cardClassName
|
|
953
|
+
),
|
|
954
|
+
children: [
|
|
955
|
+
/* @__PURE__ */ jsx("div", { className: cn("p-6 lg:p-12", formPanelClassName), children: formEngineSetup ? /* @__PURE__ */ jsx(
|
|
956
|
+
FormEngine,
|
|
957
|
+
{
|
|
958
|
+
formEngineSetup: {
|
|
959
|
+
...formEngineSetup,
|
|
960
|
+
formLayoutSettings: {
|
|
961
|
+
...formEngineSetup.formLayoutSettings,
|
|
962
|
+
formLayout: "standard",
|
|
963
|
+
submitButtonSetup: {
|
|
964
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
965
|
+
submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
966
|
+
buttonIcon,
|
|
967
|
+
buttonText
|
|
968
|
+
] })
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
defaultFields: DEFAULT_FORM_FIELDS,
|
|
973
|
+
defaultStyleRules: DEFAULT_STYLE_RULES
|
|
974
|
+
}
|
|
975
|
+
) : null }),
|
|
976
|
+
/* @__PURE__ */ jsxs(
|
|
977
|
+
"div",
|
|
978
|
+
{
|
|
979
|
+
className: cn(
|
|
980
|
+
"flex flex-col justify-between bg-primary p-6 text-primary-foreground lg:p-8",
|
|
981
|
+
infoPanelClassName
|
|
982
|
+
),
|
|
983
|
+
children: [
|
|
984
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
985
|
+
"div",
|
|
986
|
+
{
|
|
987
|
+
className: cn(
|
|
988
|
+
"pb-6 md:pb-8 border-b-2 border-border/50 mb-6 md:mb-8 text-left",
|
|
989
|
+
headerClassName
|
|
990
|
+
),
|
|
991
|
+
children: [
|
|
992
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
993
|
+
"h2",
|
|
1063
994
|
{
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
995
|
+
className: cn(
|
|
996
|
+
"text-3xl font-bold tracking-tight text-pretty md:text-5xl",
|
|
997
|
+
headingClassName
|
|
998
|
+
),
|
|
999
|
+
children: heading
|
|
1069
1000
|
}
|
|
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
|
-
] }),
|
|
1001
|
+
) : heading),
|
|
1002
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
1003
|
+
"p",
|
|
1004
|
+
{
|
|
1005
|
+
className: cn(
|
|
1006
|
+
"leading-relaxed text-balance",
|
|
1007
|
+
descriptionClassName
|
|
1008
|
+
),
|
|
1009
|
+
children: description
|
|
1010
|
+
}
|
|
1011
|
+
) : description)
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
) }),
|
|
1015
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-4", children: [
|
|
1016
|
+
contactHeading && (typeof contactHeading === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-xl font-semibold", children: contactHeading }) : contactHeading),
|
|
1017
|
+
contactDescription && (typeof contactDescription === "string" ? /* @__PURE__ */ jsx("p", { className: "text-sm text-primary-foreground/80", children: contactDescription }) : contactDescription),
|
|
1104
1018
|
/* @__PURE__ */ jsx(
|
|
1105
1019
|
"div",
|
|
1106
1020
|
{
|
|
1107
1021
|
className: cn(
|
|
1108
|
-
"
|
|
1109
|
-
|
|
1022
|
+
"pt-6 md:pt-8 space-y-4",
|
|
1023
|
+
contactOptionsClassName
|
|
1110
1024
|
),
|
|
1111
|
-
children:
|
|
1025
|
+
children: contactOptionsContent
|
|
1112
1026
|
}
|
|
1113
1027
|
)
|
|
1114
|
-
]
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1028
|
+
] }),
|
|
1029
|
+
/* @__PURE__ */ jsx(
|
|
1030
|
+
"div",
|
|
1031
|
+
{
|
|
1032
|
+
className: cn(
|
|
1033
|
+
"mt-8 flex items-center gap-4",
|
|
1034
|
+
socialLinksClassName
|
|
1035
|
+
),
|
|
1036
|
+
children: socialLinksContent
|
|
1037
|
+
}
|
|
1038
|
+
)
|
|
1039
|
+
]
|
|
1040
|
+
}
|
|
1041
|
+
)
|
|
1042
|
+
]
|
|
1043
|
+
}
|
|
1044
|
+
) })
|
|
1121
1045
|
}
|
|
1122
1046
|
);
|
|
1123
1047
|
}
|