@opensite/ui 1.6.3 → 1.6.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 +155 -75
- package/dist/components.js +155 -75
- package/dist/feature-utility-cards-grid.cjs +1 -1
- package/dist/feature-utility-cards-grid.js +1 -1
- package/dist/footer-cta-banner.cjs +155 -75
- package/dist/footer-cta-banner.d.cts +5 -1
- package/dist/footer-cta-banner.d.ts +5 -1
- package/dist/footer-cta-banner.js +155 -75
- package/dist/hero-overlay-cta-grid.cjs +85 -90
- package/dist/hero-overlay-cta-grid.js +85 -90
- package/dist/hero-pattern-badge-logos.cjs +28 -9
- package/dist/hero-pattern-badge-logos.js +28 -9
- package/dist/hero-pattern-logo-tech-stack.cjs +133 -105
- package/dist/hero-pattern-logo-tech-stack.d.cts +1 -4
- package/dist/hero-pattern-logo-tech-stack.d.ts +1 -4
- package/dist/hero-pattern-logo-tech-stack.js +133 -105
- package/dist/index.cjs +155 -75
- package/dist/index.js +155 -75
- package/dist/link-page-newsletter-social.cjs +75 -137
- package/dist/link-page-newsletter-social.d.cts +1 -1
- package/dist/link-page-newsletter-social.d.ts +1 -1
- package/dist/link-page-newsletter-social.js +75 -137
- package/dist/link-tree-block.cjs +31 -32
- package/dist/link-tree-block.d.cts +1 -5
- package/dist/link-tree-block.d.ts +1 -5
- package/dist/link-tree-block.js +31 -32
- package/dist/registry.cjs +465 -317
- package/dist/registry.js +465 -317
- package/package.json +1 -1
|
@@ -36,62 +36,6 @@ var TextInput = inputs.TextInput;
|
|
|
36
36
|
function cn(...inputs) {
|
|
37
37
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
38
38
|
}
|
|
39
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
40
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
41
|
-
if (isDark) {
|
|
42
|
-
switch (variant) {
|
|
43
|
-
case "muted":
|
|
44
|
-
return "bg-background";
|
|
45
|
-
case "card":
|
|
46
|
-
return "bg-card";
|
|
47
|
-
case "accent":
|
|
48
|
-
return "bg-accent";
|
|
49
|
-
case "subtle":
|
|
50
|
-
return "bg-background/50";
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
switch (variant) {
|
|
54
|
-
case "muted":
|
|
55
|
-
return "bg-muted";
|
|
56
|
-
case "card":
|
|
57
|
-
return "bg-card";
|
|
58
|
-
case "accent":
|
|
59
|
-
return "bg-accent";
|
|
60
|
-
case "subtle":
|
|
61
|
-
return "bg-muted/50";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function getNestedCardTextColor(parentBg, options) {
|
|
66
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
67
|
-
return isDark ? "text-foreground" : "";
|
|
68
|
-
}
|
|
69
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
70
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
71
|
-
if (isDark) {
|
|
72
|
-
switch (variant) {
|
|
73
|
-
case "default":
|
|
74
|
-
return "text-foreground";
|
|
75
|
-
case "muted":
|
|
76
|
-
return "text-foreground/80";
|
|
77
|
-
case "subtle":
|
|
78
|
-
return "text-foreground/60";
|
|
79
|
-
case "accent":
|
|
80
|
-
return "text-accent-foreground";
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
switch (variant) {
|
|
84
|
-
case "default":
|
|
85
|
-
return "text-foreground";
|
|
86
|
-
case "muted":
|
|
87
|
-
return "text-muted-foreground";
|
|
88
|
-
case "subtle":
|
|
89
|
-
return "text-muted-foreground/70";
|
|
90
|
-
case "accent":
|
|
91
|
-
return "text-primary";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
39
|
function normalizePhoneNumber(input) {
|
|
96
40
|
const trimmed = input.trim();
|
|
97
41
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -615,10 +559,6 @@ function processSvgForCurrentColor(svg) {
|
|
|
615
559
|
);
|
|
616
560
|
return processed;
|
|
617
561
|
}
|
|
618
|
-
|
|
619
|
-
// lib/blockBrandedIconsAndPlaceholders.ts
|
|
620
|
-
var blockBrandedIconsAndPlaceholders = {
|
|
621
|
-
avatar3: "https://cdn.ing/assets/i/r/286241/05vbqt3lls0q974r8fv4zn0njllq/avatar-3.webp"};
|
|
622
562
|
var PageSpeedFormSubmissionError = class extends Error {
|
|
623
563
|
constructor(message, options = {}) {
|
|
624
564
|
super(message);
|
|
@@ -1117,7 +1057,7 @@ function LinkPageNewsletterSocial({
|
|
|
1117
1057
|
name,
|
|
1118
1058
|
bio,
|
|
1119
1059
|
avatar,
|
|
1120
|
-
avatarUrl
|
|
1060
|
+
avatarUrl,
|
|
1121
1061
|
profileSlot,
|
|
1122
1062
|
newsletterHeading,
|
|
1123
1063
|
newsletterDescription,
|
|
@@ -1136,7 +1076,6 @@ function LinkPageNewsletterSocial({
|
|
|
1136
1076
|
footerAction,
|
|
1137
1077
|
footerSlot,
|
|
1138
1078
|
className,
|
|
1139
|
-
containerClassName,
|
|
1140
1079
|
contentClassName,
|
|
1141
1080
|
headerClassName,
|
|
1142
1081
|
avatarClassName,
|
|
@@ -1157,8 +1096,9 @@ function LinkPageNewsletterSocial({
|
|
|
1157
1096
|
linkLabelClassName,
|
|
1158
1097
|
linkChevronClassName,
|
|
1159
1098
|
footerClassName,
|
|
1160
|
-
background
|
|
1161
|
-
|
|
1099
|
+
background,
|
|
1100
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1101
|
+
spacing = "py-12 md:py-32",
|
|
1162
1102
|
pattern,
|
|
1163
1103
|
patternOpacity,
|
|
1164
1104
|
patternClassName,
|
|
@@ -1248,32 +1188,24 @@ function LinkPageNewsletterSocial({
|
|
|
1248
1188
|
}
|
|
1249
1189
|
),
|
|
1250
1190
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
1251
|
-
name && (typeof name === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1252
|
-
|
|
1253
|
-
{
|
|
1254
|
-
className: cn(
|
|
1255
|
-
"text-2xl font-bold",
|
|
1256
|
-
nameClassName
|
|
1257
|
-
),
|
|
1258
|
-
children: name
|
|
1259
|
-
}
|
|
1260
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: nameClassName, children: name })),
|
|
1261
|
-
bio && (typeof bio === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1262
|
-
"p",
|
|
1263
|
-
{
|
|
1264
|
-
className: cn(
|
|
1265
|
-
"max-w-xs text-sm",
|
|
1266
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1267
|
-
bioClassName
|
|
1268
|
-
),
|
|
1269
|
-
children: bio
|
|
1270
|
-
}
|
|
1271
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: bioClassName, children: bio }))
|
|
1191
|
+
name && (typeof name === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("text-2xl font-bold", nameClassName), children: name }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: nameClassName, children: name })),
|
|
1192
|
+
bio && (typeof bio === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("max-w-xs text-sm text-balance", bioClassName), children: bio }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: bioClassName, children: bio }))
|
|
1272
1193
|
] })
|
|
1273
1194
|
]
|
|
1274
1195
|
}
|
|
1275
1196
|
);
|
|
1276
|
-
}, [
|
|
1197
|
+
}, [
|
|
1198
|
+
profileSlot,
|
|
1199
|
+
resolvedAvatar,
|
|
1200
|
+
avatarClassName,
|
|
1201
|
+
optixFlowConfig,
|
|
1202
|
+
name,
|
|
1203
|
+
resolvedBackground,
|
|
1204
|
+
nameClassName,
|
|
1205
|
+
bio,
|
|
1206
|
+
bioClassName,
|
|
1207
|
+
headerClassName
|
|
1208
|
+
]);
|
|
1277
1209
|
const renderSocialLinks = React.useMemo(() => {
|
|
1278
1210
|
if (socialLinksSlot) return socialLinksSlot;
|
|
1279
1211
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
@@ -1300,12 +1232,10 @@ function LinkPageNewsletterSocial({
|
|
|
1300
1232
|
{
|
|
1301
1233
|
...socialPressableProps,
|
|
1302
1234
|
"aria-label": ariaLabel,
|
|
1235
|
+
asButton: true,
|
|
1236
|
+
size: "icon-lg",
|
|
1303
1237
|
className: cn(
|
|
1304
1238
|
"rounded-full p-2.5 transition-all duration-200",
|
|
1305
|
-
"hover:scale-110 active:scale-95",
|
|
1306
|
-
getNestedCardBg(resolvedBackground),
|
|
1307
|
-
getNestedCardTextColor(resolvedBackground),
|
|
1308
|
-
"hover:opacity-80",
|
|
1309
1239
|
socialLinkClassName,
|
|
1310
1240
|
social.className
|
|
1311
1241
|
),
|
|
@@ -1316,7 +1246,14 @@ function LinkPageNewsletterSocial({
|
|
|
1316
1246
|
})
|
|
1317
1247
|
}
|
|
1318
1248
|
);
|
|
1319
|
-
}, [
|
|
1249
|
+
}, [
|
|
1250
|
+
socialLinksSlot,
|
|
1251
|
+
socialLinks,
|
|
1252
|
+
socialLinksClassName,
|
|
1253
|
+
socialIconClassName,
|
|
1254
|
+
resolvedBackground,
|
|
1255
|
+
socialLinkClassName
|
|
1256
|
+
]);
|
|
1320
1257
|
const renderFormFields = React.useMemo(() => {
|
|
1321
1258
|
if (formSlot) return formSlot;
|
|
1322
1259
|
const {
|
|
@@ -1335,10 +1272,7 @@ function LinkPageNewsletterSocial({
|
|
|
1335
1272
|
type: "email",
|
|
1336
1273
|
placeholder: emailPlaceholder,
|
|
1337
1274
|
error: meta.touched && !!meta.error,
|
|
1338
|
-
className: cn(
|
|
1339
|
-
"w-full",
|
|
1340
|
-
inputClassName
|
|
1341
|
-
),
|
|
1275
|
+
className: cn("w-full", inputClassName),
|
|
1342
1276
|
"aria-label": emailPlaceholder || "Email address"
|
|
1343
1277
|
}
|
|
1344
1278
|
) }),
|
|
@@ -1364,7 +1298,16 @@ function LinkPageNewsletterSocial({
|
|
|
1364
1298
|
}
|
|
1365
1299
|
)
|
|
1366
1300
|
] });
|
|
1367
|
-
}, [
|
|
1301
|
+
}, [
|
|
1302
|
+
formSlot,
|
|
1303
|
+
resolvedSubmitAction,
|
|
1304
|
+
emailPlaceholder,
|
|
1305
|
+
inputClassName,
|
|
1306
|
+
submitButtonClassName,
|
|
1307
|
+
form.isSubmitting,
|
|
1308
|
+
submittingIcon,
|
|
1309
|
+
submittingLabel
|
|
1310
|
+
]);
|
|
1368
1311
|
const renderNewsletter = React.useMemo(() => {
|
|
1369
1312
|
if (newsletterSlot) return newsletterSlot;
|
|
1370
1313
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1387,17 +1330,7 @@ function LinkPageNewsletterSocial({
|
|
|
1387
1330
|
children: newsletterHeading
|
|
1388
1331
|
}
|
|
1389
1332
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: newsletterHeadingClassName, children: newsletterHeading })),
|
|
1390
|
-
newsletterDescription && (typeof newsletterDescription === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
-
"p",
|
|
1392
|
-
{
|
|
1393
|
-
className: cn(
|
|
1394
|
-
"text-sm",
|
|
1395
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1396
|
-
newsletterDescriptionClassName
|
|
1397
|
-
),
|
|
1398
|
-
children: newsletterDescription
|
|
1399
|
-
}
|
|
1400
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: newsletterDescriptionClassName, children: newsletterDescription }))
|
|
1333
|
+
newsletterDescription && (typeof newsletterDescription === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm", newsletterDescriptionClassName), children: newsletterDescription }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: newsletterDescriptionClassName, children: newsletterDescription }))
|
|
1401
1334
|
] }),
|
|
1402
1335
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
1336
|
forms.Form,
|
|
@@ -1412,7 +1345,20 @@ function LinkPageNewsletterSocial({
|
|
|
1412
1345
|
]
|
|
1413
1346
|
}
|
|
1414
1347
|
);
|
|
1415
|
-
}, [
|
|
1348
|
+
}, [
|
|
1349
|
+
newsletterSlot,
|
|
1350
|
+
newsletterCardClassName,
|
|
1351
|
+
newsletterHeading,
|
|
1352
|
+
newsletterHeadingClassName,
|
|
1353
|
+
newsletterDescription,
|
|
1354
|
+
resolvedBackground,
|
|
1355
|
+
newsletterDescriptionClassName,
|
|
1356
|
+
form,
|
|
1357
|
+
formConfig?.endpoint,
|
|
1358
|
+
formMethod,
|
|
1359
|
+
formClassName,
|
|
1360
|
+
renderFormFields
|
|
1361
|
+
]);
|
|
1416
1362
|
const renderLinks = React.useMemo(() => {
|
|
1417
1363
|
if (linksSlot) return linksSlot;
|
|
1418
1364
|
if (!links || links.length === 0) return null;
|
|
@@ -1454,7 +1400,7 @@ function LinkPageNewsletterSocial({
|
|
|
1454
1400
|
Pressable,
|
|
1455
1401
|
{
|
|
1456
1402
|
className: cn(
|
|
1457
|
-
"flex w-full items-center gap-3 rounded-xl px-4 py-3 transition-all duration-200",
|
|
1403
|
+
"flex w-full bg-card text-card-foreground items-center gap-3 rounded-xl px-4 py-3 transition-all duration-200",
|
|
1458
1404
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1459
1405
|
"border border-border bg-card hover:opacity-80",
|
|
1460
1406
|
linkClassName,
|
|
@@ -1473,22 +1419,23 @@ function LinkPageNewsletterSocial({
|
|
|
1473
1419
|
children: label
|
|
1474
1420
|
}
|
|
1475
1421
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-1", linkLabelClassName), children: label })),
|
|
1476
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1477
|
-
"span",
|
|
1478
|
-
{
|
|
1479
|
-
className: cn(
|
|
1480
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1481
|
-
linkChevronClassName
|
|
1482
|
-
),
|
|
1483
|
-
children: resolvedChevronIcon
|
|
1484
|
-
}
|
|
1485
|
-
)
|
|
1422
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(linkChevronClassName), children: resolvedChevronIcon })
|
|
1486
1423
|
]
|
|
1487
1424
|
},
|
|
1488
1425
|
link.id ?? index
|
|
1489
1426
|
);
|
|
1490
1427
|
}) });
|
|
1491
|
-
}, [
|
|
1428
|
+
}, [
|
|
1429
|
+
linksSlot,
|
|
1430
|
+
links,
|
|
1431
|
+
linksClassName,
|
|
1432
|
+
linkIconClassName,
|
|
1433
|
+
resolvedBackground,
|
|
1434
|
+
linkClassName,
|
|
1435
|
+
linkLabelClassName,
|
|
1436
|
+
linkChevronClassName,
|
|
1437
|
+
resolvedChevronIcon
|
|
1438
|
+
]);
|
|
1492
1439
|
const renderFooter = React.useMemo(() => {
|
|
1493
1440
|
if (footerSlot) return footerSlot;
|
|
1494
1441
|
if (!footerAction) return null;
|
|
@@ -1507,7 +1454,6 @@ function LinkPageNewsletterSocial({
|
|
|
1507
1454
|
{
|
|
1508
1455
|
className: cn(
|
|
1509
1456
|
"flex items-center justify-center gap-1.5 text-xs transition-opacity hover:opacity-80",
|
|
1510
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1511
1457
|
"opacity-50",
|
|
1512
1458
|
footerClassName,
|
|
1513
1459
|
actionClassName
|
|
@@ -1530,22 +1476,14 @@ function LinkPageNewsletterSocial({
|
|
|
1530
1476
|
pattern,
|
|
1531
1477
|
patternOpacity,
|
|
1532
1478
|
patternClassName,
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
renderProfile,
|
|
1542
|
-
renderSocialLinks,
|
|
1543
|
-
renderNewsletter,
|
|
1544
|
-
renderLinks,
|
|
1545
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4", children: renderFooter })
|
|
1546
|
-
] })
|
|
1547
|
-
}
|
|
1548
|
-
)
|
|
1479
|
+
containerClassName,
|
|
1480
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen w-full items-start justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full space-y-8", contentClassName), children: [
|
|
1481
|
+
renderProfile,
|
|
1482
|
+
renderSocialLinks,
|
|
1483
|
+
renderNewsletter,
|
|
1484
|
+
renderLinks,
|
|
1485
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-4", children: renderFooter })
|
|
1486
|
+
] }) })
|
|
1549
1487
|
}
|
|
1550
1488
|
);
|
|
1551
1489
|
}
|
|
@@ -313,6 +313,6 @@ interface LinkPageNewsletterSocialProps {
|
|
|
313
313
|
* />
|
|
314
314
|
* ```
|
|
315
315
|
*/
|
|
316
|
-
declare function LinkPageNewsletterSocial({ name, bio, avatar, avatarUrl, profileSlot, newsletterHeading, newsletterDescription, emailPlaceholder, buttonText, submitAction, newsletterSlot, formSlot, submittingLabel, submittingIcon, links, linksSlot, linkChevronIcon, socialLinks, socialLinksSlot, footerAction, footerSlot, className,
|
|
316
|
+
declare function LinkPageNewsletterSocial({ name, bio, avatar, avatarUrl, profileSlot, newsletterHeading, newsletterDescription, emailPlaceholder, buttonText, submitAction, newsletterSlot, formSlot, submittingLabel, submittingIcon, links, linksSlot, linkChevronIcon, socialLinks, socialLinksSlot, footerAction, footerSlot, className, contentClassName, headerClassName, avatarClassName, nameClassName, bioClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, newsletterCardClassName, newsletterHeadingClassName, newsletterDescriptionClassName, formClassName, inputClassName, submitButtonClassName, linksClassName, linkClassName, linkIconClassName, linkLabelClassName, linkChevronClassName, footerClassName, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, formConfig, onSubmit, onSuccess, onError, optixFlowConfig, }: LinkPageNewsletterSocialProps): React.JSX.Element;
|
|
317
317
|
|
|
318
318
|
export { LinkPageNewsletterSocial, type LinkPageNewsletterSocialProps, type NewsletterSocialLink, type NewsletterSocialSocialLink };
|
|
@@ -313,6 +313,6 @@ interface LinkPageNewsletterSocialProps {
|
|
|
313
313
|
* />
|
|
314
314
|
* ```
|
|
315
315
|
*/
|
|
316
|
-
declare function LinkPageNewsletterSocial({ name, bio, avatar, avatarUrl, profileSlot, newsletterHeading, newsletterDescription, emailPlaceholder, buttonText, submitAction, newsletterSlot, formSlot, submittingLabel, submittingIcon, links, linksSlot, linkChevronIcon, socialLinks, socialLinksSlot, footerAction, footerSlot, className,
|
|
316
|
+
declare function LinkPageNewsletterSocial({ name, bio, avatar, avatarUrl, profileSlot, newsletterHeading, newsletterDescription, emailPlaceholder, buttonText, submitAction, newsletterSlot, formSlot, submittingLabel, submittingIcon, links, linksSlot, linkChevronIcon, socialLinks, socialLinksSlot, footerAction, footerSlot, className, contentClassName, headerClassName, avatarClassName, nameClassName, bioClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, newsletterCardClassName, newsletterHeadingClassName, newsletterDescriptionClassName, formClassName, inputClassName, submitButtonClassName, linksClassName, linkClassName, linkIconClassName, linkLabelClassName, linkChevronClassName, footerClassName, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, formConfig, onSubmit, onSuccess, onError, optixFlowConfig, }: LinkPageNewsletterSocialProps): React.JSX.Element;
|
|
317
317
|
|
|
318
318
|
export { LinkPageNewsletterSocial, type LinkPageNewsletterSocialProps, type NewsletterSocialLink, type NewsletterSocialSocialLink };
|
|
@@ -15,62 +15,6 @@ var TextInput = TextInput$1;
|
|
|
15
15
|
function cn(...inputs) {
|
|
16
16
|
return twMerge(clsx(inputs));
|
|
17
17
|
}
|
|
18
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
19
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
20
|
-
if (isDark) {
|
|
21
|
-
switch (variant) {
|
|
22
|
-
case "muted":
|
|
23
|
-
return "bg-background";
|
|
24
|
-
case "card":
|
|
25
|
-
return "bg-card";
|
|
26
|
-
case "accent":
|
|
27
|
-
return "bg-accent";
|
|
28
|
-
case "subtle":
|
|
29
|
-
return "bg-background/50";
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
switch (variant) {
|
|
33
|
-
case "muted":
|
|
34
|
-
return "bg-muted";
|
|
35
|
-
case "card":
|
|
36
|
-
return "bg-card";
|
|
37
|
-
case "accent":
|
|
38
|
-
return "bg-accent";
|
|
39
|
-
case "subtle":
|
|
40
|
-
return "bg-muted/50";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function getNestedCardTextColor(parentBg, options) {
|
|
45
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
46
|
-
return isDark ? "text-foreground" : "";
|
|
47
|
-
}
|
|
48
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
49
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
50
|
-
if (isDark) {
|
|
51
|
-
switch (variant) {
|
|
52
|
-
case "default":
|
|
53
|
-
return "text-foreground";
|
|
54
|
-
case "muted":
|
|
55
|
-
return "text-foreground/80";
|
|
56
|
-
case "subtle":
|
|
57
|
-
return "text-foreground/60";
|
|
58
|
-
case "accent":
|
|
59
|
-
return "text-accent-foreground";
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
switch (variant) {
|
|
63
|
-
case "default":
|
|
64
|
-
return "text-foreground";
|
|
65
|
-
case "muted":
|
|
66
|
-
return "text-muted-foreground";
|
|
67
|
-
case "subtle":
|
|
68
|
-
return "text-muted-foreground/70";
|
|
69
|
-
case "accent":
|
|
70
|
-
return "text-primary";
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
18
|
function normalizePhoneNumber(input) {
|
|
75
19
|
const trimmed = input.trim();
|
|
76
20
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -594,10 +538,6 @@ function processSvgForCurrentColor(svg) {
|
|
|
594
538
|
);
|
|
595
539
|
return processed;
|
|
596
540
|
}
|
|
597
|
-
|
|
598
|
-
// lib/blockBrandedIconsAndPlaceholders.ts
|
|
599
|
-
var blockBrandedIconsAndPlaceholders = {
|
|
600
|
-
avatar3: "https://cdn.ing/assets/i/r/286241/05vbqt3lls0q974r8fv4zn0njllq/avatar-3.webp"};
|
|
601
541
|
var PageSpeedFormSubmissionError = class extends Error {
|
|
602
542
|
constructor(message, options = {}) {
|
|
603
543
|
super(message);
|
|
@@ -1096,7 +1036,7 @@ function LinkPageNewsletterSocial({
|
|
|
1096
1036
|
name,
|
|
1097
1037
|
bio,
|
|
1098
1038
|
avatar,
|
|
1099
|
-
avatarUrl
|
|
1039
|
+
avatarUrl,
|
|
1100
1040
|
profileSlot,
|
|
1101
1041
|
newsletterHeading,
|
|
1102
1042
|
newsletterDescription,
|
|
@@ -1115,7 +1055,6 @@ function LinkPageNewsletterSocial({
|
|
|
1115
1055
|
footerAction,
|
|
1116
1056
|
footerSlot,
|
|
1117
1057
|
className,
|
|
1118
|
-
containerClassName,
|
|
1119
1058
|
contentClassName,
|
|
1120
1059
|
headerClassName,
|
|
1121
1060
|
avatarClassName,
|
|
@@ -1136,8 +1075,9 @@ function LinkPageNewsletterSocial({
|
|
|
1136
1075
|
linkLabelClassName,
|
|
1137
1076
|
linkChevronClassName,
|
|
1138
1077
|
footerClassName,
|
|
1139
|
-
background
|
|
1140
|
-
|
|
1078
|
+
background,
|
|
1079
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1080
|
+
spacing = "py-12 md:py-32",
|
|
1141
1081
|
pattern,
|
|
1142
1082
|
patternOpacity,
|
|
1143
1083
|
patternClassName,
|
|
@@ -1227,32 +1167,24 @@ function LinkPageNewsletterSocial({
|
|
|
1227
1167
|
}
|
|
1228
1168
|
),
|
|
1229
1169
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
1230
|
-
name && (typeof name === "string" ? /* @__PURE__ */ jsx(
|
|
1231
|
-
|
|
1232
|
-
{
|
|
1233
|
-
className: cn(
|
|
1234
|
-
"text-2xl font-bold",
|
|
1235
|
-
nameClassName
|
|
1236
|
-
),
|
|
1237
|
-
children: name
|
|
1238
|
-
}
|
|
1239
|
-
) : /* @__PURE__ */ jsx("div", { className: nameClassName, children: name })),
|
|
1240
|
-
bio && (typeof bio === "string" ? /* @__PURE__ */ jsx(
|
|
1241
|
-
"p",
|
|
1242
|
-
{
|
|
1243
|
-
className: cn(
|
|
1244
|
-
"max-w-xs text-sm",
|
|
1245
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1246
|
-
bioClassName
|
|
1247
|
-
),
|
|
1248
|
-
children: bio
|
|
1249
|
-
}
|
|
1250
|
-
) : /* @__PURE__ */ jsx("div", { className: bioClassName, children: bio }))
|
|
1170
|
+
name && (typeof name === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-2xl font-bold", nameClassName), children: name }) : /* @__PURE__ */ jsx("div", { className: nameClassName, children: name })),
|
|
1171
|
+
bio && (typeof bio === "string" ? /* @__PURE__ */ jsx("p", { className: cn("max-w-xs text-sm text-balance", bioClassName), children: bio }) : /* @__PURE__ */ jsx("div", { className: bioClassName, children: bio }))
|
|
1251
1172
|
] })
|
|
1252
1173
|
]
|
|
1253
1174
|
}
|
|
1254
1175
|
);
|
|
1255
|
-
}, [
|
|
1176
|
+
}, [
|
|
1177
|
+
profileSlot,
|
|
1178
|
+
resolvedAvatar,
|
|
1179
|
+
avatarClassName,
|
|
1180
|
+
optixFlowConfig,
|
|
1181
|
+
name,
|
|
1182
|
+
resolvedBackground,
|
|
1183
|
+
nameClassName,
|
|
1184
|
+
bio,
|
|
1185
|
+
bioClassName,
|
|
1186
|
+
headerClassName
|
|
1187
|
+
]);
|
|
1256
1188
|
const renderSocialLinks = useMemo(() => {
|
|
1257
1189
|
if (socialLinksSlot) return socialLinksSlot;
|
|
1258
1190
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
@@ -1279,12 +1211,10 @@ function LinkPageNewsletterSocial({
|
|
|
1279
1211
|
{
|
|
1280
1212
|
...socialPressableProps,
|
|
1281
1213
|
"aria-label": ariaLabel,
|
|
1214
|
+
asButton: true,
|
|
1215
|
+
size: "icon-lg",
|
|
1282
1216
|
className: cn(
|
|
1283
1217
|
"rounded-full p-2.5 transition-all duration-200",
|
|
1284
|
-
"hover:scale-110 active:scale-95",
|
|
1285
|
-
getNestedCardBg(resolvedBackground),
|
|
1286
|
-
getNestedCardTextColor(resolvedBackground),
|
|
1287
|
-
"hover:opacity-80",
|
|
1288
1218
|
socialLinkClassName,
|
|
1289
1219
|
social.className
|
|
1290
1220
|
),
|
|
@@ -1295,7 +1225,14 @@ function LinkPageNewsletterSocial({
|
|
|
1295
1225
|
})
|
|
1296
1226
|
}
|
|
1297
1227
|
);
|
|
1298
|
-
}, [
|
|
1228
|
+
}, [
|
|
1229
|
+
socialLinksSlot,
|
|
1230
|
+
socialLinks,
|
|
1231
|
+
socialLinksClassName,
|
|
1232
|
+
socialIconClassName,
|
|
1233
|
+
resolvedBackground,
|
|
1234
|
+
socialLinkClassName
|
|
1235
|
+
]);
|
|
1299
1236
|
const renderFormFields = useMemo(() => {
|
|
1300
1237
|
if (formSlot) return formSlot;
|
|
1301
1238
|
const {
|
|
@@ -1314,10 +1251,7 @@ function LinkPageNewsletterSocial({
|
|
|
1314
1251
|
type: "email",
|
|
1315
1252
|
placeholder: emailPlaceholder,
|
|
1316
1253
|
error: meta.touched && !!meta.error,
|
|
1317
|
-
className: cn(
|
|
1318
|
-
"w-full",
|
|
1319
|
-
inputClassName
|
|
1320
|
-
),
|
|
1254
|
+
className: cn("w-full", inputClassName),
|
|
1321
1255
|
"aria-label": emailPlaceholder || "Email address"
|
|
1322
1256
|
}
|
|
1323
1257
|
) }),
|
|
@@ -1343,7 +1277,16 @@ function LinkPageNewsletterSocial({
|
|
|
1343
1277
|
}
|
|
1344
1278
|
)
|
|
1345
1279
|
] });
|
|
1346
|
-
}, [
|
|
1280
|
+
}, [
|
|
1281
|
+
formSlot,
|
|
1282
|
+
resolvedSubmitAction,
|
|
1283
|
+
emailPlaceholder,
|
|
1284
|
+
inputClassName,
|
|
1285
|
+
submitButtonClassName,
|
|
1286
|
+
form.isSubmitting,
|
|
1287
|
+
submittingIcon,
|
|
1288
|
+
submittingLabel
|
|
1289
|
+
]);
|
|
1347
1290
|
const renderNewsletter = useMemo(() => {
|
|
1348
1291
|
if (newsletterSlot) return newsletterSlot;
|
|
1349
1292
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1366,17 +1309,7 @@ function LinkPageNewsletterSocial({
|
|
|
1366
1309
|
children: newsletterHeading
|
|
1367
1310
|
}
|
|
1368
1311
|
) : /* @__PURE__ */ jsx("div", { className: newsletterHeadingClassName, children: newsletterHeading })),
|
|
1369
|
-
newsletterDescription && (typeof newsletterDescription === "string" ? /* @__PURE__ */ jsx(
|
|
1370
|
-
"p",
|
|
1371
|
-
{
|
|
1372
|
-
className: cn(
|
|
1373
|
-
"text-sm",
|
|
1374
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1375
|
-
newsletterDescriptionClassName
|
|
1376
|
-
),
|
|
1377
|
-
children: newsletterDescription
|
|
1378
|
-
}
|
|
1379
|
-
) : /* @__PURE__ */ jsx("div", { className: newsletterDescriptionClassName, children: newsletterDescription }))
|
|
1312
|
+
newsletterDescription && (typeof newsletterDescription === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm", newsletterDescriptionClassName), children: newsletterDescription }) : /* @__PURE__ */ jsx("div", { className: newsletterDescriptionClassName, children: newsletterDescription }))
|
|
1380
1313
|
] }),
|
|
1381
1314
|
/* @__PURE__ */ jsx(
|
|
1382
1315
|
Form,
|
|
@@ -1391,7 +1324,20 @@ function LinkPageNewsletterSocial({
|
|
|
1391
1324
|
]
|
|
1392
1325
|
}
|
|
1393
1326
|
);
|
|
1394
|
-
}, [
|
|
1327
|
+
}, [
|
|
1328
|
+
newsletterSlot,
|
|
1329
|
+
newsletterCardClassName,
|
|
1330
|
+
newsletterHeading,
|
|
1331
|
+
newsletterHeadingClassName,
|
|
1332
|
+
newsletterDescription,
|
|
1333
|
+
resolvedBackground,
|
|
1334
|
+
newsletterDescriptionClassName,
|
|
1335
|
+
form,
|
|
1336
|
+
formConfig?.endpoint,
|
|
1337
|
+
formMethod,
|
|
1338
|
+
formClassName,
|
|
1339
|
+
renderFormFields
|
|
1340
|
+
]);
|
|
1395
1341
|
const renderLinks = useMemo(() => {
|
|
1396
1342
|
if (linksSlot) return linksSlot;
|
|
1397
1343
|
if (!links || links.length === 0) return null;
|
|
@@ -1433,7 +1379,7 @@ function LinkPageNewsletterSocial({
|
|
|
1433
1379
|
Pressable,
|
|
1434
1380
|
{
|
|
1435
1381
|
className: cn(
|
|
1436
|
-
"flex w-full items-center gap-3 rounded-xl px-4 py-3 transition-all duration-200",
|
|
1382
|
+
"flex w-full bg-card text-card-foreground items-center gap-3 rounded-xl px-4 py-3 transition-all duration-200",
|
|
1437
1383
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1438
1384
|
"border border-border bg-card hover:opacity-80",
|
|
1439
1385
|
linkClassName,
|
|
@@ -1452,22 +1398,23 @@ function LinkPageNewsletterSocial({
|
|
|
1452
1398
|
children: label
|
|
1453
1399
|
}
|
|
1454
1400
|
) : /* @__PURE__ */ jsx("div", { className: cn("flex-1", linkLabelClassName), children: label })),
|
|
1455
|
-
/* @__PURE__ */ jsx(
|
|
1456
|
-
"span",
|
|
1457
|
-
{
|
|
1458
|
-
className: cn(
|
|
1459
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1460
|
-
linkChevronClassName
|
|
1461
|
-
),
|
|
1462
|
-
children: resolvedChevronIcon
|
|
1463
|
-
}
|
|
1464
|
-
)
|
|
1401
|
+
/* @__PURE__ */ jsx("span", { className: cn(linkChevronClassName), children: resolvedChevronIcon })
|
|
1465
1402
|
]
|
|
1466
1403
|
},
|
|
1467
1404
|
link.id ?? index
|
|
1468
1405
|
);
|
|
1469
1406
|
}) });
|
|
1470
|
-
}, [
|
|
1407
|
+
}, [
|
|
1408
|
+
linksSlot,
|
|
1409
|
+
links,
|
|
1410
|
+
linksClassName,
|
|
1411
|
+
linkIconClassName,
|
|
1412
|
+
resolvedBackground,
|
|
1413
|
+
linkClassName,
|
|
1414
|
+
linkLabelClassName,
|
|
1415
|
+
linkChevronClassName,
|
|
1416
|
+
resolvedChevronIcon
|
|
1417
|
+
]);
|
|
1471
1418
|
const renderFooter = useMemo(() => {
|
|
1472
1419
|
if (footerSlot) return footerSlot;
|
|
1473
1420
|
if (!footerAction) return null;
|
|
@@ -1486,7 +1433,6 @@ function LinkPageNewsletterSocial({
|
|
|
1486
1433
|
{
|
|
1487
1434
|
className: cn(
|
|
1488
1435
|
"flex items-center justify-center gap-1.5 text-xs transition-opacity hover:opacity-80",
|
|
1489
|
-
getTextColor(resolvedBackground, "muted"),
|
|
1490
1436
|
"opacity-50",
|
|
1491
1437
|
footerClassName,
|
|
1492
1438
|
actionClassName
|
|
@@ -1509,22 +1455,14 @@ function LinkPageNewsletterSocial({
|
|
|
1509
1455
|
pattern,
|
|
1510
1456
|
patternOpacity,
|
|
1511
1457
|
patternClassName,
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
renderProfile,
|
|
1521
|
-
renderSocialLinks,
|
|
1522
|
-
renderNewsletter,
|
|
1523
|
-
renderLinks,
|
|
1524
|
-
/* @__PURE__ */ jsx("div", { className: "pt-4", children: renderFooter })
|
|
1525
|
-
] })
|
|
1526
|
-
}
|
|
1527
|
-
)
|
|
1458
|
+
containerClassName,
|
|
1459
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex min-h-screen w-full items-start justify-center py-12", children: /* @__PURE__ */ jsxs("div", { className: cn("w-full space-y-8", contentClassName), children: [
|
|
1460
|
+
renderProfile,
|
|
1461
|
+
renderSocialLinks,
|
|
1462
|
+
renderNewsletter,
|
|
1463
|
+
renderLinks,
|
|
1464
|
+
/* @__PURE__ */ jsx("div", { className: "pt-4", children: renderFooter })
|
|
1465
|
+
] }) })
|
|
1528
1466
|
}
|
|
1529
1467
|
);
|
|
1530
1468
|
}
|