@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
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var forms = require('@page-speed/forms');
|
|
6
5
|
var integration = require('@page-speed/forms/integration');
|
|
7
6
|
var clsx = require('clsx');
|
|
8
7
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -831,32 +830,12 @@ var Section = React__namespace.default.forwardRef(
|
|
|
831
830
|
}
|
|
832
831
|
);
|
|
833
832
|
Section.displayName = "Section";
|
|
834
|
-
var
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
},
|
|
841
|
-
{
|
|
842
|
-
icon: "lucide/mail",
|
|
843
|
-
title: "Email Support",
|
|
844
|
-
subtitle: "emergency@support.com",
|
|
845
|
-
href: "mailto:emergency@support.com"
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
icon: "lucide/message-circle",
|
|
849
|
-
title: "Live Chat",
|
|
850
|
-
subtitle: "24/7 Available",
|
|
851
|
-
href: "#chat"
|
|
852
|
-
},
|
|
853
|
-
{
|
|
854
|
-
icon: "lucide/map-pin",
|
|
855
|
-
title: "Visit Us",
|
|
856
|
-
subtitle: "123 Support Lane",
|
|
857
|
-
href: "#location"
|
|
858
|
-
}
|
|
859
|
-
];
|
|
833
|
+
var DEFAULT_STYLE_RULES = {
|
|
834
|
+
formContainer: "",
|
|
835
|
+
fieldsContainer: "",
|
|
836
|
+
fieldClassName: "",
|
|
837
|
+
formClassName: "space-y-4"
|
|
838
|
+
};
|
|
860
839
|
var PRIORITIES = [
|
|
861
840
|
{
|
|
862
841
|
value: "critical",
|
|
@@ -931,82 +910,36 @@ var DEFAULT_FORM_FIELDS = [
|
|
|
931
910
|
function ContactEmergency({
|
|
932
911
|
heading,
|
|
933
912
|
description,
|
|
934
|
-
contactItems
|
|
913
|
+
contactItems,
|
|
935
914
|
buttonText = "Submit Emergency Request",
|
|
936
915
|
buttonIcon,
|
|
937
|
-
|
|
938
|
-
actionsSlot,
|
|
939
|
-
formFields = DEFAULT_FORM_FIELDS,
|
|
940
|
-
successMessage = "Thank you! Your emergency request has been received.",
|
|
916
|
+
formEngineSetup,
|
|
941
917
|
className,
|
|
942
918
|
headerClassName,
|
|
943
919
|
headingClassName,
|
|
944
920
|
descriptionClassName,
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
successMessageClassName,
|
|
948
|
-
errorMessageClassName,
|
|
949
|
-
spacing = "py-8 md:py-32",
|
|
950
|
-
containerClassName = "w-full max-w-full relative z-10 px-6 sm:px-6 md:px-8 lg:px-8",
|
|
921
|
+
spacing = "py-16 md:py-32",
|
|
922
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
951
923
|
background,
|
|
952
924
|
pattern,
|
|
953
|
-
patternOpacity
|
|
954
|
-
formConfig,
|
|
955
|
-
onSubmit,
|
|
956
|
-
onSuccess,
|
|
957
|
-
onError
|
|
925
|
+
patternOpacity
|
|
958
926
|
}) {
|
|
959
|
-
const {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
resetUpload();
|
|
973
|
-
onSuccess?.(data);
|
|
974
|
-
},
|
|
975
|
-
onError,
|
|
976
|
-
resetOnSuccess: formConfig?.resetOnSuccess !== false,
|
|
977
|
-
uploadTokens
|
|
978
|
-
});
|
|
979
|
-
const otherFields = formFields.filter((f) => f.name !== "priority");
|
|
980
|
-
const actionsContent = React.useMemo(() => {
|
|
981
|
-
if (actionsSlot) return actionsSlot;
|
|
982
|
-
if (actions && actions.length > 0) {
|
|
983
|
-
return actions.map((action, index) => {
|
|
984
|
-
const {
|
|
985
|
-
label,
|
|
986
|
-
icon,
|
|
987
|
-
iconAfter,
|
|
988
|
-
children,
|
|
989
|
-
className: actionClassName,
|
|
990
|
-
...pressableProps
|
|
991
|
-
} = action;
|
|
992
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
993
|
-
Pressable,
|
|
994
|
-
{
|
|
995
|
-
asButton: true,
|
|
996
|
-
className: actionClassName,
|
|
997
|
-
...pressableProps,
|
|
998
|
-
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
999
|
-
icon,
|
|
1000
|
-
label,
|
|
1001
|
-
iconAfter
|
|
1002
|
-
] })
|
|
1003
|
-
},
|
|
1004
|
-
index
|
|
1005
|
-
);
|
|
1006
|
-
});
|
|
927
|
+
const formStyleRules = React__namespace.useMemo(() => {
|
|
928
|
+
return {
|
|
929
|
+
formContainer: formEngineSetup?.formLayoutSettings?.styleRules?.formContainer ?? DEFAULT_STYLE_RULES.formContainer,
|
|
930
|
+
fieldsContainer: formEngineSetup?.formLayoutSettings?.styleRules?.fieldsContainer ?? DEFAULT_STYLE_RULES.fieldsContainer,
|
|
931
|
+
fieldClassName: formEngineSetup?.formLayoutSettings?.styleRules?.fieldClassName ?? DEFAULT_STYLE_RULES.fieldClassName,
|
|
932
|
+
formClassName: formEngineSetup?.formLayoutSettings?.styleRules?.formClassName ?? DEFAULT_STYLE_RULES.formClassName,
|
|
933
|
+
successMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.successMessageClassName ?? DEFAULT_STYLE_RULES.successMessageClassName,
|
|
934
|
+
errorMessageClassName: formEngineSetup?.formLayoutSettings?.styleRules?.errorMessageClassName ?? DEFAULT_STYLE_RULES.errorMessageClassName
|
|
935
|
+
};
|
|
936
|
+
}, [formEngineSetup?.formLayoutSettings?.styleRules]);
|
|
937
|
+
const formFields = React__namespace.useMemo(() => {
|
|
938
|
+
if (formEngineSetup?.fields && formEngineSetup.fields.length > 0) {
|
|
939
|
+
return formEngineSetup.fields;
|
|
1007
940
|
}
|
|
1008
|
-
return
|
|
1009
|
-
}, [
|
|
941
|
+
return DEFAULT_FORM_FIELDS;
|
|
942
|
+
}, [formEngineSetup?.fields]);
|
|
1010
943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
944
|
Section,
|
|
1012
945
|
{
|
|
@@ -1016,126 +949,87 @@ function ContactEmergency({
|
|
|
1016
949
|
patternOpacity,
|
|
1017
950
|
className,
|
|
1018
951
|
containerClassName,
|
|
1019
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
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
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
)) })
|
|
1101
|
-
] }) }),
|
|
1102
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1103
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-4", children: otherFields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1104
|
-
"div",
|
|
1105
|
-
{
|
|
1106
|
-
className: integration.getColumnSpanClass(field.columnSpan),
|
|
1107
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1108
|
-
integration.DynamicFormField,
|
|
1109
|
-
{
|
|
1110
|
-
field,
|
|
1111
|
-
uploadProgress,
|
|
1112
|
-
onFileUpload: uploadFiles,
|
|
1113
|
-
onFileRemove: removeFile,
|
|
1114
|
-
isUploading
|
|
1115
|
-
}
|
|
1116
|
-
)
|
|
1117
|
-
},
|
|
1118
|
-
field.name
|
|
1119
|
-
)) }),
|
|
1120
|
-
actionsSlot || actions && actions.length > 0 ? actionsContent : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1121
|
-
Pressable,
|
|
1122
|
-
{
|
|
1123
|
-
componentType: "button",
|
|
1124
|
-
type: "submit",
|
|
1125
|
-
className: cn("w-full", submitClassName),
|
|
1126
|
-
size: "lg",
|
|
1127
|
-
asButton: true,
|
|
1128
|
-
disabled: form.isSubmitting,
|
|
1129
|
-
children: [
|
|
1130
|
-
buttonIcon,
|
|
1131
|
-
buttonText
|
|
1132
|
-
]
|
|
1133
|
-
}
|
|
1134
|
-
)
|
|
1135
|
-
] }) })
|
|
1136
|
-
]
|
|
1137
|
-
}
|
|
1138
|
-
) })
|
|
952
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid md:grid-cols-2 gap-12 md:gap-28", children: [
|
|
953
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start justify-between h-full gap-8 md:gap-12", children: [
|
|
954
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
955
|
+
"div",
|
|
956
|
+
{
|
|
957
|
+
className: cn(
|
|
958
|
+
"flex flex-col items-start gap-4 text-left",
|
|
959
|
+
headerClassName
|
|
960
|
+
),
|
|
961
|
+
children: [
|
|
962
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
963
|
+
"h2",
|
|
964
|
+
{
|
|
965
|
+
className: cn(
|
|
966
|
+
"text-4xl lg:text-5xl xl:text-6xl font-bold text-pretty",
|
|
967
|
+
headingClassName
|
|
968
|
+
),
|
|
969
|
+
children: heading
|
|
970
|
+
}
|
|
971
|
+
) : heading),
|
|
972
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
973
|
+
"p",
|
|
974
|
+
{
|
|
975
|
+
className: cn(
|
|
976
|
+
"leading-relaxed text-pretty md:text-balance text-lg",
|
|
977
|
+
descriptionClassName
|
|
978
|
+
),
|
|
979
|
+
children: description
|
|
980
|
+
}
|
|
981
|
+
) : description)
|
|
982
|
+
]
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
contactItems && contactItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-4 md:gap-6 w-full", children: contactItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
986
|
+
Pressable,
|
|
987
|
+
{
|
|
988
|
+
href: item.href,
|
|
989
|
+
className: cn(
|
|
990
|
+
"rounded-xl border bg-transparent hover:bg-muted ring-2",
|
|
991
|
+
"px-4 py-4 flex",
|
|
992
|
+
"justify-start items-start transition-all",
|
|
993
|
+
"duration-500 hover:text-muted-foreground",
|
|
994
|
+
item.className
|
|
995
|
+
),
|
|
996
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
997
|
+
item.icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center p-2 rounded-xl border bg-primary text-primary-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
998
|
+
DynamicIcon,
|
|
999
|
+
{
|
|
1000
|
+
name: item.icon,
|
|
1001
|
+
size: item.iconSize ?? 24
|
|
1002
|
+
}
|
|
1003
|
+
) }) : null,
|
|
1004
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1005
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-bold text-xs uppercase opacity-70", children: item.title }),
|
|
1006
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-md font-medium", children: item.subtitle })
|
|
1007
|
+
] })
|
|
1008
|
+
] })
|
|
1009
|
+
},
|
|
1010
|
+
index
|
|
1011
|
+
)) })
|
|
1012
|
+
] }) }),
|
|
1013
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: formEngineSetup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1014
|
+
integration.FormEngine,
|
|
1015
|
+
{
|
|
1016
|
+
...formEngineSetup,
|
|
1017
|
+
formLayoutSettings: {
|
|
1018
|
+
...formEngineSetup.formLayoutSettings,
|
|
1019
|
+
formLayout: "standard",
|
|
1020
|
+
submitButtonSetup: {
|
|
1021
|
+
...formEngineSetup.formLayoutSettings?.submitButtonSetup,
|
|
1022
|
+
submitLabel: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1023
|
+
buttonIcon,
|
|
1024
|
+
buttonText
|
|
1025
|
+
] })
|
|
1026
|
+
},
|
|
1027
|
+
styleRules: formStyleRules
|
|
1028
|
+
},
|
|
1029
|
+
fields: formFields
|
|
1030
|
+
}
|
|
1031
|
+
) : null })
|
|
1032
|
+
] })
|
|
1139
1033
|
}
|
|
1140
1034
|
);
|
|
1141
1035
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormEngineProps } from '@page-speed/forms/integration';
|
|
3
3
|
import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bz_A5vLU.cjs';
|
|
4
|
-
import { A as ActionConfig } from './blocks-Cohq4eio.cjs';
|
|
5
4
|
import 'react/jsx-runtime';
|
|
5
|
+
import './blocks-Cohq4eio.cjs';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
import './button-variants-lRElsmTc.cjs';
|
|
8
8
|
import 'class-variance-authority/types';
|
|
@@ -59,23 +59,9 @@ interface ContactEmergencyProps {
|
|
|
59
59
|
*/
|
|
60
60
|
buttonIcon?: React.ReactNode;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Full form engine setup and props
|
|
63
63
|
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Custom slot for rendering actions (overrides actions array)
|
|
67
|
-
*/
|
|
68
|
-
actionsSlot?: React.ReactNode;
|
|
69
|
-
/**
|
|
70
|
-
* Array of form field configurations
|
|
71
|
-
* If not provided, defaults to: priority, name, email, phone, subject, description
|
|
72
|
-
*/
|
|
73
|
-
formFields?: FormFieldConfig[];
|
|
74
|
-
/**
|
|
75
|
-
* Success message to display after form submission
|
|
76
|
-
* @default "Thank you! Your emergency request has been received."
|
|
77
|
-
*/
|
|
78
|
-
successMessage?: React.ReactNode;
|
|
64
|
+
formEngineSetup?: FormEngineProps;
|
|
79
65
|
/**
|
|
80
66
|
* Additional CSS classes for the section
|
|
81
67
|
*/
|
|
@@ -96,22 +82,6 @@ interface ContactEmergencyProps {
|
|
|
96
82
|
* Additional CSS classes for the description
|
|
97
83
|
*/
|
|
98
84
|
descriptionClassName?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Additional CSS classes for the form
|
|
101
|
-
*/
|
|
102
|
-
formClassName?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Additional CSS classes for the submit button
|
|
105
|
-
*/
|
|
106
|
-
submitClassName?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Additional CSS classes for the success message
|
|
109
|
-
*/
|
|
110
|
-
successMessageClassName?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Additional CSS classes for the error message
|
|
113
|
-
*/
|
|
114
|
-
errorMessageClassName?: string;
|
|
115
85
|
/**
|
|
116
86
|
* Background style for the section
|
|
117
87
|
*/
|
|
@@ -128,22 +98,6 @@ interface ContactEmergencyProps {
|
|
|
128
98
|
* Pattern overlay opacity (0-1)
|
|
129
99
|
*/
|
|
130
100
|
patternOpacity?: number;
|
|
131
|
-
/**
|
|
132
|
-
* Form configuration for PageSpeed forms
|
|
133
|
-
*/
|
|
134
|
-
formConfig?: PageSpeedFormConfig;
|
|
135
|
-
/**
|
|
136
|
-
* Custom submit handler
|
|
137
|
-
*/
|
|
138
|
-
onSubmit?: (values: Record<string, any>) => void | Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Success callback
|
|
141
|
-
*/
|
|
142
|
-
onSuccess?: (data: unknown) => void;
|
|
143
|
-
/**
|
|
144
|
-
* Error callback
|
|
145
|
-
*/
|
|
146
|
-
onError?: (error: Error) => void;
|
|
147
101
|
}
|
|
148
102
|
/**
|
|
149
103
|
* ContactEmergency - Urgent support form with priority level selection.
|
|
@@ -153,10 +107,10 @@ interface ContactEmergencyProps {
|
|
|
153
107
|
* ```tsx
|
|
154
108
|
* <ContactEmergency
|
|
155
109
|
* heading="Urgent Support"
|
|
156
|
-
*
|
|
110
|
+
* formEngineSetup={{ formConfig: { endpoint: "/api/emergency", format: "json" } }}
|
|
157
111
|
* />
|
|
158
112
|
* ```
|
|
159
113
|
*/
|
|
160
|
-
declare function ContactEmergency({ heading, description, contactItems, buttonText, buttonIcon,
|
|
114
|
+
declare function ContactEmergency({ heading, description, contactItems, buttonText, buttonIcon, formEngineSetup, className, headerClassName, headingClassName, descriptionClassName, spacing, containerClassName, background, pattern, patternOpacity, }: ContactEmergencyProps): React.JSX.Element;
|
|
161
115
|
|
|
162
116
|
export { ContactEmergency, type ContactEmergencyProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormEngineProps } from '@page-speed/forms/integration';
|
|
3
3
|
import { f as SectionBackground, g as SectionSpacing, t as PatternName } from './community-initiatives-Bi_ClKrO.js';
|
|
4
|
-
import { A as ActionConfig } from './blocks-k17uluAz.js';
|
|
5
4
|
import 'react/jsx-runtime';
|
|
5
|
+
import './blocks-k17uluAz.js';
|
|
6
6
|
import 'class-variance-authority';
|
|
7
7
|
import './button-variants-lRElsmTc.js';
|
|
8
8
|
import 'class-variance-authority/types';
|
|
@@ -59,23 +59,9 @@ interface ContactEmergencyProps {
|
|
|
59
59
|
*/
|
|
60
60
|
buttonIcon?: React.ReactNode;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Full form engine setup and props
|
|
63
63
|
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Custom slot for rendering actions (overrides actions array)
|
|
67
|
-
*/
|
|
68
|
-
actionsSlot?: React.ReactNode;
|
|
69
|
-
/**
|
|
70
|
-
* Array of form field configurations
|
|
71
|
-
* If not provided, defaults to: priority, name, email, phone, subject, description
|
|
72
|
-
*/
|
|
73
|
-
formFields?: FormFieldConfig[];
|
|
74
|
-
/**
|
|
75
|
-
* Success message to display after form submission
|
|
76
|
-
* @default "Thank you! Your emergency request has been received."
|
|
77
|
-
*/
|
|
78
|
-
successMessage?: React.ReactNode;
|
|
64
|
+
formEngineSetup?: FormEngineProps;
|
|
79
65
|
/**
|
|
80
66
|
* Additional CSS classes for the section
|
|
81
67
|
*/
|
|
@@ -96,22 +82,6 @@ interface ContactEmergencyProps {
|
|
|
96
82
|
* Additional CSS classes for the description
|
|
97
83
|
*/
|
|
98
84
|
descriptionClassName?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Additional CSS classes for the form
|
|
101
|
-
*/
|
|
102
|
-
formClassName?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Additional CSS classes for the submit button
|
|
105
|
-
*/
|
|
106
|
-
submitClassName?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Additional CSS classes for the success message
|
|
109
|
-
*/
|
|
110
|
-
successMessageClassName?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Additional CSS classes for the error message
|
|
113
|
-
*/
|
|
114
|
-
errorMessageClassName?: string;
|
|
115
85
|
/**
|
|
116
86
|
* Background style for the section
|
|
117
87
|
*/
|
|
@@ -128,22 +98,6 @@ interface ContactEmergencyProps {
|
|
|
128
98
|
* Pattern overlay opacity (0-1)
|
|
129
99
|
*/
|
|
130
100
|
patternOpacity?: number;
|
|
131
|
-
/**
|
|
132
|
-
* Form configuration for PageSpeed forms
|
|
133
|
-
*/
|
|
134
|
-
formConfig?: PageSpeedFormConfig;
|
|
135
|
-
/**
|
|
136
|
-
* Custom submit handler
|
|
137
|
-
*/
|
|
138
|
-
onSubmit?: (values: Record<string, any>) => void | Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Success callback
|
|
141
|
-
*/
|
|
142
|
-
onSuccess?: (data: unknown) => void;
|
|
143
|
-
/**
|
|
144
|
-
* Error callback
|
|
145
|
-
*/
|
|
146
|
-
onError?: (error: Error) => void;
|
|
147
101
|
}
|
|
148
102
|
/**
|
|
149
103
|
* ContactEmergency - Urgent support form with priority level selection.
|
|
@@ -153,10 +107,10 @@ interface ContactEmergencyProps {
|
|
|
153
107
|
* ```tsx
|
|
154
108
|
* <ContactEmergency
|
|
155
109
|
* heading="Urgent Support"
|
|
156
|
-
*
|
|
110
|
+
* formEngineSetup={{ formConfig: { endpoint: "/api/emergency", format: "json" } }}
|
|
157
111
|
* />
|
|
158
112
|
* ```
|
|
159
113
|
*/
|
|
160
|
-
declare function ContactEmergency({ heading, description, contactItems, buttonText, buttonIcon,
|
|
114
|
+
declare function ContactEmergency({ heading, description, contactItems, buttonText, buttonIcon, formEngineSetup, className, headerClassName, headingClassName, descriptionClassName, spacing, containerClassName, background, pattern, patternOpacity, }: ContactEmergencyProps): React.JSX.Element;
|
|
161
115
|
|
|
162
116
|
export { ContactEmergency, type ContactEmergencyProps };
|