@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
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default
|
|
4
|
-
import {
|
|
5
|
-
import { useFileUpload, useContactForm, getColumnSpanClass, DynamicFormField } from '@page-speed/forms/integration';
|
|
3
|
+
import React__default from 'react';
|
|
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';
|
|
@@ -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,36 @@ 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
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
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
|
-
});
|
|
906
|
+
const formStyleRules = React.useMemo(() => {
|
|
907
|
+
return {
|
|
908
|
+
formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
|
|
909
|
+
fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
|
|
910
|
+
fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
|
|
911
|
+
formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
|
|
912
|
+
successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
|
|
913
|
+
errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
|
|
914
|
+
};
|
|
915
|
+
}, [formEngineSetup?.formLayoutSettings?.styleRules]);
|
|
916
|
+
const formFields = React.useMemo(() => {
|
|
917
|
+
if (formEngineSetup?.fields && formEngineSetup.fields.length > 0) {
|
|
918
|
+
return formEngineSetup.fields;
|
|
986
919
|
}
|
|
987
|
-
return
|
|
988
|
-
}, [
|
|
920
|
+
return DEFAULT_FORM_FIELDS;
|
|
921
|
+
}, [formEngineSetup?.fields]);
|
|
989
922
|
return /* @__PURE__ */ jsx(
|
|
990
923
|
Section,
|
|
991
924
|
{
|
|
@@ -995,126 +928,87 @@ function ContactEmergency({
|
|
|
995
928
|
patternOpacity,
|
|
996
929
|
className,
|
|
997
930
|
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
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
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: [
|
|
1109
|
-
buttonIcon,
|
|
1110
|
-
buttonText
|
|
1111
|
-
]
|
|
1112
|
-
}
|
|
1113
|
-
)
|
|
1114
|
-
] }) })
|
|
1115
|
-
]
|
|
1116
|
-
}
|
|
1117
|
-
) })
|
|
931
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid md:grid-cols-2 gap-12 md:gap-28", children: [
|
|
932
|
+
/* @__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: [
|
|
933
|
+
/* @__PURE__ */ jsxs(
|
|
934
|
+
"div",
|
|
935
|
+
{
|
|
936
|
+
className: cn(
|
|
937
|
+
"flex flex-col items-start gap-4 text-left",
|
|
938
|
+
headerClassName
|
|
939
|
+
),
|
|
940
|
+
children: [
|
|
941
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
942
|
+
"h2",
|
|
943
|
+
{
|
|
944
|
+
className: cn(
|
|
945
|
+
"text-4xl lg:text-5xl xl:text-6xl font-bold text-pretty",
|
|
946
|
+
headingClassName
|
|
947
|
+
),
|
|
948
|
+
children: heading
|
|
949
|
+
}
|
|
950
|
+
) : heading),
|
|
951
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
952
|
+
"p",
|
|
953
|
+
{
|
|
954
|
+
className: cn(
|
|
955
|
+
"leading-relaxed text-pretty md:text-balance text-lg",
|
|
956
|
+
descriptionClassName
|
|
957
|
+
),
|
|
958
|
+
children: description
|
|
959
|
+
}
|
|
960
|
+
) : description)
|
|
961
|
+
]
|
|
962
|
+
}
|
|
963
|
+
),
|
|
964
|
+
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(
|
|
965
|
+
Pressable,
|
|
966
|
+
{
|
|
967
|
+
href: item.href,
|
|
968
|
+
className: cn(
|
|
969
|
+
"rounded-xl border bg-transparent hover:bg-muted ring-2",
|
|
970
|
+
"px-4 py-4 flex",
|
|
971
|
+
"justify-start items-start transition-all",
|
|
972
|
+
"duration-500 hover:text-muted-foreground",
|
|
973
|
+
item.className
|
|
974
|
+
),
|
|
975
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
976
|
+
item.icon ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-2 rounded-xl border bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx(
|
|
977
|
+
DynamicIcon,
|
|
978
|
+
{
|
|
979
|
+
name: item.icon,
|
|
980
|
+
size: item.iconSize ?? 24
|
|
981
|
+
}
|
|
982
|
+
) }) : null,
|
|
983
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
984
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-xs uppercase opacity-70", children: item.title }),
|
|
985
|
+
/* @__PURE__ */ jsx("p", { className: "text-md font-medium", children: item.subtitle })
|
|
986
|
+
] })
|
|
987
|
+
] })
|
|
988
|
+
},
|
|
989
|
+
index
|
|
990
|
+
)) })
|
|
991
|
+
] }) }),
|
|
992
|
+
/* @__PURE__ */ jsx("div", { className: "p-6", children: formEngineSetup ? /* @__PURE__ */ jsx(
|
|
993
|
+
FormEngine,
|
|
994
|
+
{
|
|
995
|
+
...formEngineSetup,
|
|
996
|
+
formLayoutSettings: {
|
|
997
|
+
...formEngineSetup.formLayoutSettings,
|
|
998
|
+
formLayout: "standard",
|
|
999
|
+
submitButtonSetup: {
|
|
1000
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
1001
|
+
submitLabel: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1002
|
+
buttonIcon,
|
|
1003
|
+
buttonText
|
|
1004
|
+
] })
|
|
1005
|
+
},
|
|
1006
|
+
styleRules: formStyleRules
|
|
1007
|
+
},
|
|
1008
|
+
fields: formFields
|
|
1009
|
+
}
|
|
1010
|
+
) : null })
|
|
1011
|
+
] })
|
|
1118
1012
|
}
|
|
1119
1013
|
);
|
|
1120
1014
|
}
|
package/dist/contact-faq.cjs
CHANGED
|
@@ -677,7 +677,7 @@ function ContactFaq({
|
|
|
677
677
|
),
|
|
678
678
|
children: formHeading
|
|
679
679
|
}
|
|
680
|
-
) :
|
|
680
|
+
) : formHeading),
|
|
681
681
|
formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
682
682
|
integration.FormEngine,
|
|
683
683
|
{
|
package/dist/contact-faq.js
CHANGED