@opensite/ui 1.5.4 → 1.5.5
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/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/feature-integration-cards.cjs +65 -217
- package/dist/feature-integration-cards.js +65 -217
- package/dist/footer-accordion-social.cjs +39 -37
- package/dist/footer-accordion-social.d.cts +4 -1
- package/dist/footer-accordion-social.d.ts +4 -1
- package/dist/footer-accordion-social.js +39 -37
- package/dist/footer-newsletter-contact.cjs +1 -1
- package/dist/footer-newsletter-contact.d.cts +4 -1
- package/dist/footer-newsletter-contact.d.ts +4 -1
- package/dist/footer-newsletter-contact.js +1 -1
- package/dist/footer-newsletter-minimal.cjs +1 -1
- package/dist/footer-newsletter-minimal.d.cts +4 -1
- package/dist/footer-newsletter-minimal.d.ts +4 -1
- package/dist/footer-newsletter-minimal.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/registry.cjs +105 -98
- package/dist/registry.js +105 -98
- package/package.json +1 -1
package/dist/components.cjs
CHANGED
|
@@ -5414,7 +5414,7 @@ function FooterNewsletterMinimal({
|
|
|
5414
5414
|
] })
|
|
5415
5415
|
] }),
|
|
5416
5416
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-20 flex flex-col justify-between gap-15 lg:flex-row", newsletterSectionClassName), children: [
|
|
5417
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full max-w-md flex-col gap-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-sm font-light tracking-tight lg:text-base", children: [
|
|
5417
|
+
formConfig?.token && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full max-w-md flex-col gap-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-sm font-light tracking-tight lg:text-base", children: [
|
|
5418
5418
|
newsletterLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { children: newsletterLabel }),
|
|
5419
5419
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5420
5420
|
forms.Form,
|
package/dist/components.js
CHANGED
|
@@ -5391,7 +5391,7 @@ function FooterNewsletterMinimal({
|
|
|
5391
5391
|
] })
|
|
5392
5392
|
] }),
|
|
5393
5393
|
/* @__PURE__ */ jsxs("div", { className: cn("mt-20 flex flex-col justify-between gap-15 lg:flex-row", newsletterSectionClassName), children: [
|
|
5394
|
-
/* @__PURE__ */ jsx("div", { className: "flex w-full max-w-md flex-col gap-10", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1 text-sm font-light tracking-tight lg:text-base", children: [
|
|
5394
|
+
formConfig?.token && /* @__PURE__ */ jsx("div", { className: "flex w-full max-w-md flex-col gap-10", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1 text-sm font-light tracking-tight lg:text-base", children: [
|
|
5395
5395
|
newsletterLabel && /* @__PURE__ */ jsx("p", { children: newsletterLabel }),
|
|
5396
5396
|
/* @__PURE__ */ jsxs(
|
|
5397
5397
|
Form,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var img = require('@page-speed/img');
|
|
10
10
|
|
|
11
11
|
function _interopNamespace(e) {
|
|
@@ -32,163 +32,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
|
32
32
|
function cn(...inputs) {
|
|
33
33
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
34
|
}
|
|
35
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
36
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
37
|
-
if (isDark) {
|
|
38
|
-
switch (variant) {
|
|
39
|
-
case "default":
|
|
40
|
-
return "text-foreground";
|
|
41
|
-
case "muted":
|
|
42
|
-
return "text-foreground/80";
|
|
43
|
-
case "subtle":
|
|
44
|
-
return "text-foreground/60";
|
|
45
|
-
case "accent":
|
|
46
|
-
return "text-accent-foreground";
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
switch (variant) {
|
|
50
|
-
case "default":
|
|
51
|
-
return "text-foreground";
|
|
52
|
-
case "muted":
|
|
53
|
-
return "text-muted-foreground";
|
|
54
|
-
case "subtle":
|
|
55
|
-
return "text-muted-foreground/70";
|
|
56
|
-
case "accent":
|
|
57
|
-
return "text-primary";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function getAccentColor(parentBg, options) {
|
|
62
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
63
|
-
return isDark ? "text-accent-foreground" : "text-primary";
|
|
64
|
-
}
|
|
65
|
-
function getBorderColor(parentBg, variant = "default", options) {
|
|
66
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
67
|
-
if (isDark) {
|
|
68
|
-
switch (variant) {
|
|
69
|
-
case "default":
|
|
70
|
-
return "border-foreground/20";
|
|
71
|
-
case "muted":
|
|
72
|
-
return "border-foreground/10";
|
|
73
|
-
case "accent":
|
|
74
|
-
return "border-accent-foreground";
|
|
75
|
-
}
|
|
76
|
-
} else {
|
|
77
|
-
switch (variant) {
|
|
78
|
-
case "default":
|
|
79
|
-
return "border-border";
|
|
80
|
-
case "muted":
|
|
81
|
-
return "border-muted";
|
|
82
|
-
case "accent":
|
|
83
|
-
return "border-primary";
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
var svgCache = /* @__PURE__ */ new Map();
|
|
88
|
-
function DynamicIcon({
|
|
89
|
-
name,
|
|
90
|
-
size = 28,
|
|
91
|
-
color,
|
|
92
|
-
className,
|
|
93
|
-
alt
|
|
94
|
-
}) {
|
|
95
|
-
const [svgContent, setSvgContent] = React__namespace.useState(null);
|
|
96
|
-
const [isLoading, setIsLoading] = React__namespace.useState(true);
|
|
97
|
-
const [error, setError] = React__namespace.useState(null);
|
|
98
|
-
const { url, iconName } = React__namespace.useMemo(() => {
|
|
99
|
-
const separator = name.includes("/") ? "/" : ":";
|
|
100
|
-
const [prefix, iconName2] = name.split(separator);
|
|
101
|
-
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}&key=au382bi7fsh96w9h9xlrnat2jglx`;
|
|
102
|
-
return {
|
|
103
|
-
url: baseUrl,
|
|
104
|
-
iconName: iconName2
|
|
105
|
-
};
|
|
106
|
-
}, [name, size]);
|
|
107
|
-
React__namespace.useEffect(() => {
|
|
108
|
-
let isMounted = true;
|
|
109
|
-
const fetchSvg = async () => {
|
|
110
|
-
const cached = svgCache.get(url);
|
|
111
|
-
if (cached) {
|
|
112
|
-
if (isMounted) {
|
|
113
|
-
setSvgContent(cached);
|
|
114
|
-
setIsLoading(false);
|
|
115
|
-
}
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
try {
|
|
119
|
-
setIsLoading(true);
|
|
120
|
-
setError(null);
|
|
121
|
-
const response = await fetch(url);
|
|
122
|
-
if (!response.ok) {
|
|
123
|
-
throw new Error(`Failed to fetch icon: ${response.status}`);
|
|
124
|
-
}
|
|
125
|
-
let svg = await response.text();
|
|
126
|
-
svg = processSvgForCurrentColor(svg);
|
|
127
|
-
svgCache.set(url, svg);
|
|
128
|
-
if (isMounted) {
|
|
129
|
-
setSvgContent(svg);
|
|
130
|
-
setIsLoading(false);
|
|
131
|
-
}
|
|
132
|
-
} catch (err) {
|
|
133
|
-
if (isMounted) {
|
|
134
|
-
setError(err instanceof Error ? err.message : "Failed to load icon");
|
|
135
|
-
setIsLoading(false);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
fetchSvg();
|
|
140
|
-
return () => {
|
|
141
|
-
isMounted = false;
|
|
142
|
-
};
|
|
143
|
-
}, [url]);
|
|
144
|
-
if (isLoading) {
|
|
145
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
146
|
-
"span",
|
|
147
|
-
{
|
|
148
|
-
className: cn("inline-block", className),
|
|
149
|
-
style: { width: size, height: size },
|
|
150
|
-
"aria-hidden": "true"
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
if (error || !svgContent) {
|
|
155
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
156
|
-
"span",
|
|
157
|
-
{
|
|
158
|
-
className: cn("inline-block", className),
|
|
159
|
-
style: { width: size, height: size },
|
|
160
|
-
role: "img",
|
|
161
|
-
"aria-label": alt || iconName
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
166
|
-
"span",
|
|
167
|
-
{
|
|
168
|
-
className: cn("inline-flex items-center justify-center", className),
|
|
169
|
-
style: {
|
|
170
|
-
width: size,
|
|
171
|
-
height: size,
|
|
172
|
-
color: color || "inherit"
|
|
173
|
-
},
|
|
174
|
-
role: "img",
|
|
175
|
-
"aria-label": alt || iconName,
|
|
176
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
177
|
-
}
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
function processSvgForCurrentColor(svg) {
|
|
181
|
-
let processed = svg;
|
|
182
|
-
processed = processed.replace(
|
|
183
|
-
/stroke=["'](#000000|#000|black)["']/gi,
|
|
184
|
-
'stroke="currentColor"'
|
|
185
|
-
);
|
|
186
|
-
processed = processed.replace(
|
|
187
|
-
/fill=["'](#000000|#000|black)["']/gi,
|
|
188
|
-
'fill="currentColor"'
|
|
189
|
-
);
|
|
190
|
-
return processed;
|
|
191
|
-
}
|
|
192
35
|
function normalizePhoneNumber(input) {
|
|
193
36
|
const trimmed = input.trim();
|
|
194
37
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -1001,66 +844,39 @@ function FeatureIntegrationCards({
|
|
|
1001
844
|
patternOpacity,
|
|
1002
845
|
patternClassName
|
|
1003
846
|
}) {
|
|
1004
|
-
const renderIntegrationIcon = React.useCallback(
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
className: cn(
|
|
1025
|
-
"flex items-center gap-1.5 rounded-full border px-3 py-2 text-sm font-medium transition-colors",
|
|
1026
|
-
getBorderColor(background),
|
|
1027
|
-
getAccentColor(background),
|
|
1028
|
-
integration.linkLabelClassName
|
|
1029
|
-
),
|
|
1030
|
-
children: [
|
|
1031
|
-
integration.linkLabel,
|
|
1032
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-right", size: 14 })
|
|
1033
|
-
]
|
|
1034
|
-
}
|
|
1035
|
-
);
|
|
1036
|
-
}, [background]);
|
|
847
|
+
const renderIntegrationIcon = React.useCallback(
|
|
848
|
+
(integration) => {
|
|
849
|
+
if (integration.iconSlot) return integration.iconSlot;
|
|
850
|
+
if (!integration.icon) return null;
|
|
851
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
852
|
+
img.Img,
|
|
853
|
+
{
|
|
854
|
+
src: integration.icon,
|
|
855
|
+
alt: integration.iconAlt || (typeof integration.title === "string" ? integration.title : "Integration icon"),
|
|
856
|
+
className: cn(
|
|
857
|
+
"min-h-12 h-auto w-auto object-contain",
|
|
858
|
+
integration.iconClassName
|
|
859
|
+
),
|
|
860
|
+
loading: "lazy",
|
|
861
|
+
optixFlowConfig
|
|
862
|
+
}
|
|
863
|
+
);
|
|
864
|
+
},
|
|
865
|
+
[optixFlowConfig]
|
|
866
|
+
);
|
|
1037
867
|
const integrationsContent = React.useMemo(() => {
|
|
1038
868
|
if (integrationsSlot) return integrationsSlot;
|
|
1039
869
|
if (!integrations || integrations.length === 0) return null;
|
|
1040
870
|
return integrations.map((integration, index) => {
|
|
1041
871
|
const iconContent = renderIntegrationIcon(integration);
|
|
1042
|
-
const linkLabelContent = renderLinkLabel(integration);
|
|
1043
872
|
const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1044
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1045
|
-
iconContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1046
|
-
"span",
|
|
1047
|
-
{
|
|
1048
|
-
className: cn(
|
|
1049
|
-
"grid size-12 shrink-0 place-content-center rounded-lg border bg-background/50",
|
|
1050
|
-
getBorderColor(background)
|
|
1051
|
-
),
|
|
1052
|
-
children: iconContent
|
|
1053
|
-
}
|
|
1054
|
-
),
|
|
1055
|
-
linkLabelContent
|
|
1056
|
-
] }),
|
|
873
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-2 justify-between", children: iconContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex"), children: iconContent }) }),
|
|
1057
874
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
1058
875
|
integration.title && (typeof integration.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1059
876
|
"h3",
|
|
1060
877
|
{
|
|
1061
878
|
className: cn(
|
|
1062
879
|
"font-semibold md:text-lg",
|
|
1063
|
-
getTextColor(background),
|
|
1064
880
|
integration.titleClassName
|
|
1065
881
|
),
|
|
1066
882
|
children: integration.title
|
|
@@ -1070,7 +886,6 @@ function FeatureIntegrationCards({
|
|
|
1070
886
|
{
|
|
1071
887
|
className: cn(
|
|
1072
888
|
"font-semibold md:text-lg",
|
|
1073
|
-
getTextColor(background),
|
|
1074
889
|
integration.titleClassName
|
|
1075
890
|
),
|
|
1076
891
|
children: integration.title
|
|
@@ -1081,7 +896,6 @@ function FeatureIntegrationCards({
|
|
|
1081
896
|
{
|
|
1082
897
|
className: cn(
|
|
1083
898
|
"text-sm leading-relaxed md:text-base",
|
|
1084
|
-
getTextColor(background, "muted"),
|
|
1085
899
|
integration.descriptionClassName
|
|
1086
900
|
),
|
|
1087
901
|
children: integration.description
|
|
@@ -1091,7 +905,6 @@ function FeatureIntegrationCards({
|
|
|
1091
905
|
{
|
|
1092
906
|
className: cn(
|
|
1093
907
|
"text-sm leading-relaxed md:text-base",
|
|
1094
|
-
getTextColor(background, "muted"),
|
|
1095
908
|
integration.descriptionClassName
|
|
1096
909
|
),
|
|
1097
910
|
children: integration.description
|
|
@@ -1100,8 +913,7 @@ function FeatureIntegrationCards({
|
|
|
1100
913
|
] })
|
|
1101
914
|
] });
|
|
1102
915
|
const cardClasses = cn(
|
|
1103
|
-
"flex flex-col gap-5 rounded-xl border p-6 transition-all duration-300",
|
|
1104
|
-
getBorderColor(background),
|
|
916
|
+
"flex flex-col gap-5 rounded-xl border p-6 transition-all duration-300 bg-card card-text-foreground",
|
|
1105
917
|
"hover:shadow-lg",
|
|
1106
918
|
cardClassName,
|
|
1107
919
|
integration.className
|
|
@@ -1119,7 +931,7 @@ function FeatureIntegrationCards({
|
|
|
1119
931
|
}
|
|
1120
932
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cardClasses, children: cardContent }, index);
|
|
1121
933
|
});
|
|
1122
|
-
}, [integrationsSlot, integrations, cardClassName, renderIntegrationIcon
|
|
934
|
+
}, [integrationsSlot, integrations, cardClassName, renderIntegrationIcon]);
|
|
1123
935
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1124
936
|
Section,
|
|
1125
937
|
{
|
|
@@ -1131,11 +943,47 @@ function FeatureIntegrationCards({
|
|
|
1131
943
|
className,
|
|
1132
944
|
containerClassName,
|
|
1133
945
|
children: [
|
|
1134
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
946
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
947
|
+
"div",
|
|
948
|
+
{
|
|
949
|
+
className: cn(
|
|
950
|
+
"mx-auto mb-12 flex max-w-3xl flex-col items-center gap-4 text-center",
|
|
951
|
+
headerClassName
|
|
952
|
+
),
|
|
953
|
+
children: [
|
|
954
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
955
|
+
"h2",
|
|
956
|
+
{
|
|
957
|
+
className: cn(
|
|
958
|
+
"text-3xl font-semibold md:text-4xl",
|
|
959
|
+
titleClassName
|
|
960
|
+
),
|
|
961
|
+
children: title
|
|
962
|
+
}
|
|
963
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
964
|
+
"div",
|
|
965
|
+
{
|
|
966
|
+
className: cn(
|
|
967
|
+
"text-3xl font-semibold md:text-4xl",
|
|
968
|
+
titleClassName
|
|
969
|
+
),
|
|
970
|
+
children: title
|
|
971
|
+
}
|
|
972
|
+
)),
|
|
973
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(descriptionClassName), children: description }))
|
|
974
|
+
]
|
|
975
|
+
}
|
|
976
|
+
),
|
|
977
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
978
|
+
"div",
|
|
979
|
+
{
|
|
980
|
+
className: cn(
|
|
981
|
+
"grid gap-6 sm:grid-cols-2 lg:grid-cols-4",
|
|
982
|
+
gridClassName
|
|
983
|
+
),
|
|
984
|
+
children: integrationsContent
|
|
985
|
+
}
|
|
986
|
+
)
|
|
1139
987
|
]
|
|
1140
988
|
}
|
|
1141
989
|
);
|