@opensite/ui 2.3.3 → 2.3.4
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/footer-split-image-accordion.cjs +73 -85
- package/dist/footer-split-image-accordion.d.cts +25 -26
- package/dist/footer-split-image-accordion.d.ts +25 -26
- package/dist/footer-split-image-accordion.js +74 -86
- package/dist/link-page-bento-layout.cjs +98 -28
- package/dist/link-page-bento-layout.js +98 -28
- package/dist/link-page-grid-cards.cjs +98 -28
- package/dist/link-page-grid-cards.js +98 -28
- package/dist/link-page-minimal-profile.cjs +92 -27
- package/dist/link-page-minimal-profile.d.cts +2 -9
- package/dist/link-page-minimal-profile.d.ts +2 -9
- package/dist/link-page-minimal-profile.js +92 -27
- package/dist/link-page-newsletter-social.cjs +98 -28
- package/dist/link-page-newsletter-social.js +98 -28
- package/dist/link-tree-block.cjs +116 -46
- package/dist/link-tree-block.js +116 -46
- package/dist/registry.cjs +180 -253
- package/dist/registry.js +180 -253
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ var classVarianceAuthority = require('class-variance-authority');
|
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var icon = require('@page-speed/icon');
|
|
10
10
|
var img = require('@page-speed/img');
|
|
11
|
+
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
11
12
|
|
|
12
13
|
function _interopNamespace(e) {
|
|
13
14
|
if (e && e.__esModule) return e;
|
|
@@ -830,6 +831,87 @@ var Section = React__namespace.default.forwardRef(
|
|
|
830
831
|
}
|
|
831
832
|
);
|
|
832
833
|
Section.displayName = "Section";
|
|
834
|
+
var platformIconMap = {
|
|
835
|
+
instagram: "cib/instagram",
|
|
836
|
+
linkedin: "cib/linkedin",
|
|
837
|
+
google: "cib/google",
|
|
838
|
+
facebook: "cib/facebook",
|
|
839
|
+
tiktok: "cib/tiktok",
|
|
840
|
+
youtube: "cib/youtube",
|
|
841
|
+
yelp: "cib/yelp",
|
|
842
|
+
spotify: "cib/spotify",
|
|
843
|
+
apple: "cib/apple",
|
|
844
|
+
x: "line-md/twitter-x-alt",
|
|
845
|
+
github: "cib/github",
|
|
846
|
+
snapchat: "cib/snapchat",
|
|
847
|
+
discord: "cib/discord",
|
|
848
|
+
dev: "simple-icons/devdotto",
|
|
849
|
+
substack: "simple-icons/substack",
|
|
850
|
+
reddit: "cib/reddit",
|
|
851
|
+
pinterest: "cib/pinterest",
|
|
852
|
+
threads: "simple-icons/threads",
|
|
853
|
+
twitch: "cib/twitch",
|
|
854
|
+
whatsapp: "cib/whatsapp",
|
|
855
|
+
telegram: "cib/telegram",
|
|
856
|
+
medium: "simple-icons/medium",
|
|
857
|
+
patreon: "cib/patreon",
|
|
858
|
+
onlyfans: "simple-icons/onlyfans",
|
|
859
|
+
eventbrite: "cib/eventbrite",
|
|
860
|
+
npmjs: "simple-icons/npm",
|
|
861
|
+
crates: "cib/rust",
|
|
862
|
+
rubygems: "cib/rubygems",
|
|
863
|
+
behance: "cib/behance",
|
|
864
|
+
dribbble: "cib/dribbble",
|
|
865
|
+
unknown: "icon-park-solid/circular-connection"
|
|
866
|
+
};
|
|
867
|
+
var SocialLinkIcon = React__namespace.forwardRef(
|
|
868
|
+
({
|
|
869
|
+
platformName,
|
|
870
|
+
label,
|
|
871
|
+
iconSize = 20,
|
|
872
|
+
iconColor,
|
|
873
|
+
href,
|
|
874
|
+
iconClassName,
|
|
875
|
+
className,
|
|
876
|
+
iconNameOverride,
|
|
877
|
+
...pressableProps
|
|
878
|
+
}, ref) => {
|
|
879
|
+
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
880
|
+
const smartPlatformName = React__namespace.useMemo(() => {
|
|
881
|
+
return platform || platformName;
|
|
882
|
+
}, [platform, platformName]);
|
|
883
|
+
const iconName = React__namespace.useMemo(() => {
|
|
884
|
+
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
885
|
+
}, [iconNameOverride, smartPlatformName]);
|
|
886
|
+
const accessibleLabel = React__namespace.useMemo(() => {
|
|
887
|
+
return label || platformName;
|
|
888
|
+
}, [label, platformName]);
|
|
889
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
890
|
+
Pressable,
|
|
891
|
+
{
|
|
892
|
+
ref,
|
|
893
|
+
href,
|
|
894
|
+
"aria-label": accessibleLabel,
|
|
895
|
+
className: cn(
|
|
896
|
+
"inline-flex items-center justify-center transition-colors",
|
|
897
|
+
className
|
|
898
|
+
),
|
|
899
|
+
...pressableProps,
|
|
900
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
901
|
+
DynamicIcon,
|
|
902
|
+
{
|
|
903
|
+
name: iconName,
|
|
904
|
+
size: iconSize,
|
|
905
|
+
color: iconColor,
|
|
906
|
+
className: iconClassName,
|
|
907
|
+
alt: accessibleLabel
|
|
908
|
+
}
|
|
909
|
+
)
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
SocialLinkIcon.displayName = "SocialLinkIcon";
|
|
833
915
|
function LinkPageMinimalProfile({
|
|
834
916
|
name,
|
|
835
917
|
bio,
|
|
@@ -995,33 +1077,16 @@ function LinkPageMinimalProfile({
|
|
|
995
1077
|
"flex items-center justify-center gap-4 pt-4",
|
|
996
1078
|
socialLinksClassName
|
|
997
1079
|
),
|
|
998
|
-
children: socialLinks.map((social, index) =>
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
const ariaLabel = social["aria-label"] || (typeof social.label === "string" ? social.label : void 0) || social.platform;
|
|
1009
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1010
|
-
Pressable,
|
|
1011
|
-
{
|
|
1012
|
-
href: social.href,
|
|
1013
|
-
"aria-label": ariaLabel,
|
|
1014
|
-
className: cn(
|
|
1015
|
-
"rounded-full p-2 transition-colors",
|
|
1016
|
-
"hover:opacity-80",
|
|
1017
|
-
socialLinkClassName,
|
|
1018
|
-
social.className
|
|
1019
|
-
),
|
|
1020
|
-
children: icon
|
|
1021
|
-
},
|
|
1022
|
-
social.id ?? index
|
|
1023
|
-
);
|
|
1024
|
-
})
|
|
1080
|
+
children: socialLinks.map((social, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1081
|
+
SocialLinkIcon,
|
|
1082
|
+
{
|
|
1083
|
+
href: social.href,
|
|
1084
|
+
label: social["aria-label"] || (typeof social.label === "string" ? social.label : void 0),
|
|
1085
|
+
className: cn(socialLinkClassName, social.className),
|
|
1086
|
+
iconClassName: socialIconClassName
|
|
1087
|
+
},
|
|
1088
|
+
social.href || index
|
|
1089
|
+
))
|
|
1025
1090
|
}
|
|
1026
1091
|
);
|
|
1027
1092
|
}, [
|
|
@@ -13,13 +13,6 @@ interface MinimalProfileLink extends ActionConfig {
|
|
|
13
13
|
id?: string;
|
|
14
14
|
iconName?: string;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Social link for the minimal profile link page
|
|
18
|
-
*/
|
|
19
|
-
interface MinimalProfileSocialLink extends SocialLinkItem {
|
|
20
|
-
id?: string;
|
|
21
|
-
iconName?: string;
|
|
22
|
-
}
|
|
23
16
|
/**
|
|
24
17
|
* Props for the LinkPageMinimalProfile component
|
|
25
18
|
*/
|
|
@@ -55,7 +48,7 @@ interface LinkPageMinimalProfileProps {
|
|
|
55
48
|
/**
|
|
56
49
|
* Array of social media links
|
|
57
50
|
*/
|
|
58
|
-
socialLinks?:
|
|
51
|
+
socialLinks?: SocialLinkItem[];
|
|
59
52
|
/**
|
|
60
53
|
* Custom slot for rendering social links (overrides socialLinks array)
|
|
61
54
|
*/
|
|
@@ -179,4 +172,4 @@ interface LinkPageMinimalProfileProps {
|
|
|
179
172
|
*/
|
|
180
173
|
declare function LinkPageMinimalProfile({ name, bio, avatar, avatarUrl, profileSlot, links, linksSlot, socialLinks, socialLinksSlot, footerAction, footerSlot, className, contentClassName, headerClassName, avatarClassName, nameClassName, bioClassName, linksClassName, linkClassName, linkIconClassName, linkLabelClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, optixFlowConfig, }: LinkPageMinimalProfileProps): React.JSX.Element;
|
|
181
174
|
|
|
182
|
-
export { LinkPageMinimalProfile, type LinkPageMinimalProfileProps, type MinimalProfileLink
|
|
175
|
+
export { LinkPageMinimalProfile, type LinkPageMinimalProfileProps, type MinimalProfileLink };
|
|
@@ -13,13 +13,6 @@ interface MinimalProfileLink extends ActionConfig {
|
|
|
13
13
|
id?: string;
|
|
14
14
|
iconName?: string;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Social link for the minimal profile link page
|
|
18
|
-
*/
|
|
19
|
-
interface MinimalProfileSocialLink extends SocialLinkItem {
|
|
20
|
-
id?: string;
|
|
21
|
-
iconName?: string;
|
|
22
|
-
}
|
|
23
16
|
/**
|
|
24
17
|
* Props for the LinkPageMinimalProfile component
|
|
25
18
|
*/
|
|
@@ -55,7 +48,7 @@ interface LinkPageMinimalProfileProps {
|
|
|
55
48
|
/**
|
|
56
49
|
* Array of social media links
|
|
57
50
|
*/
|
|
58
|
-
socialLinks?:
|
|
51
|
+
socialLinks?: SocialLinkItem[];
|
|
59
52
|
/**
|
|
60
53
|
* Custom slot for rendering social links (overrides socialLinks array)
|
|
61
54
|
*/
|
|
@@ -179,4 +172,4 @@ interface LinkPageMinimalProfileProps {
|
|
|
179
172
|
*/
|
|
180
173
|
declare function LinkPageMinimalProfile({ name, bio, avatar, avatarUrl, profileSlot, links, linksSlot, socialLinks, socialLinksSlot, footerAction, footerSlot, className, contentClassName, headerClassName, avatarClassName, nameClassName, bioClassName, linksClassName, linkClassName, linkIconClassName, linkLabelClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, optixFlowConfig, }: LinkPageMinimalProfileProps): React.JSX.Element;
|
|
181
174
|
|
|
182
|
-
export { LinkPageMinimalProfile, type LinkPageMinimalProfileProps, type MinimalProfileLink
|
|
175
|
+
export { LinkPageMinimalProfile, type LinkPageMinimalProfileProps, type MinimalProfileLink };
|
|
@@ -7,6 +7,7 @@ import { cva } from 'class-variance-authority';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Icon } from '@page-speed/icon';
|
|
9
9
|
import { Img } from '@page-speed/img';
|
|
10
|
+
import { usePlatformFromUrl } from '@opensite/hooks/usePlatformFromUrl';
|
|
10
11
|
|
|
11
12
|
// components/blocks/link-page/link-page-minimal-profile.tsx
|
|
12
13
|
function cn(...inputs) {
|
|
@@ -809,6 +810,87 @@ var Section = React__default.forwardRef(
|
|
|
809
810
|
}
|
|
810
811
|
);
|
|
811
812
|
Section.displayName = "Section";
|
|
813
|
+
var platformIconMap = {
|
|
814
|
+
instagram: "cib/instagram",
|
|
815
|
+
linkedin: "cib/linkedin",
|
|
816
|
+
google: "cib/google",
|
|
817
|
+
facebook: "cib/facebook",
|
|
818
|
+
tiktok: "cib/tiktok",
|
|
819
|
+
youtube: "cib/youtube",
|
|
820
|
+
yelp: "cib/yelp",
|
|
821
|
+
spotify: "cib/spotify",
|
|
822
|
+
apple: "cib/apple",
|
|
823
|
+
x: "line-md/twitter-x-alt",
|
|
824
|
+
github: "cib/github",
|
|
825
|
+
snapchat: "cib/snapchat",
|
|
826
|
+
discord: "cib/discord",
|
|
827
|
+
dev: "simple-icons/devdotto",
|
|
828
|
+
substack: "simple-icons/substack",
|
|
829
|
+
reddit: "cib/reddit",
|
|
830
|
+
pinterest: "cib/pinterest",
|
|
831
|
+
threads: "simple-icons/threads",
|
|
832
|
+
twitch: "cib/twitch",
|
|
833
|
+
whatsapp: "cib/whatsapp",
|
|
834
|
+
telegram: "cib/telegram",
|
|
835
|
+
medium: "simple-icons/medium",
|
|
836
|
+
patreon: "cib/patreon",
|
|
837
|
+
onlyfans: "simple-icons/onlyfans",
|
|
838
|
+
eventbrite: "cib/eventbrite",
|
|
839
|
+
npmjs: "simple-icons/npm",
|
|
840
|
+
crates: "cib/rust",
|
|
841
|
+
rubygems: "cib/rubygems",
|
|
842
|
+
behance: "cib/behance",
|
|
843
|
+
dribbble: "cib/dribbble",
|
|
844
|
+
unknown: "icon-park-solid/circular-connection"
|
|
845
|
+
};
|
|
846
|
+
var SocialLinkIcon = React.forwardRef(
|
|
847
|
+
({
|
|
848
|
+
platformName,
|
|
849
|
+
label,
|
|
850
|
+
iconSize = 20,
|
|
851
|
+
iconColor,
|
|
852
|
+
href,
|
|
853
|
+
iconClassName,
|
|
854
|
+
className,
|
|
855
|
+
iconNameOverride,
|
|
856
|
+
...pressableProps
|
|
857
|
+
}, ref) => {
|
|
858
|
+
const platform = usePlatformFromUrl(href);
|
|
859
|
+
const smartPlatformName = React.useMemo(() => {
|
|
860
|
+
return platform || platformName;
|
|
861
|
+
}, [platform, platformName]);
|
|
862
|
+
const iconName = React.useMemo(() => {
|
|
863
|
+
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
864
|
+
}, [iconNameOverride, smartPlatformName]);
|
|
865
|
+
const accessibleLabel = React.useMemo(() => {
|
|
866
|
+
return label || platformName;
|
|
867
|
+
}, [label, platformName]);
|
|
868
|
+
return /* @__PURE__ */ jsx(
|
|
869
|
+
Pressable,
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
href,
|
|
873
|
+
"aria-label": accessibleLabel,
|
|
874
|
+
className: cn(
|
|
875
|
+
"inline-flex items-center justify-center transition-colors",
|
|
876
|
+
className
|
|
877
|
+
),
|
|
878
|
+
...pressableProps,
|
|
879
|
+
children: /* @__PURE__ */ jsx(
|
|
880
|
+
DynamicIcon,
|
|
881
|
+
{
|
|
882
|
+
name: iconName,
|
|
883
|
+
size: iconSize,
|
|
884
|
+
color: iconColor,
|
|
885
|
+
className: iconClassName,
|
|
886
|
+
alt: accessibleLabel
|
|
887
|
+
}
|
|
888
|
+
)
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
);
|
|
893
|
+
SocialLinkIcon.displayName = "SocialLinkIcon";
|
|
812
894
|
function LinkPageMinimalProfile({
|
|
813
895
|
name,
|
|
814
896
|
bio,
|
|
@@ -974,33 +1056,16 @@ function LinkPageMinimalProfile({
|
|
|
974
1056
|
"flex items-center justify-center gap-4 pt-4",
|
|
975
1057
|
socialLinksClassName
|
|
976
1058
|
),
|
|
977
|
-
children: socialLinks.map((social, index) =>
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
const ariaLabel = social["aria-label"] || (typeof social.label === "string" ? social.label : void 0) || social.platform;
|
|
988
|
-
return /* @__PURE__ */ jsx(
|
|
989
|
-
Pressable,
|
|
990
|
-
{
|
|
991
|
-
href: social.href,
|
|
992
|
-
"aria-label": ariaLabel,
|
|
993
|
-
className: cn(
|
|
994
|
-
"rounded-full p-2 transition-colors",
|
|
995
|
-
"hover:opacity-80",
|
|
996
|
-
socialLinkClassName,
|
|
997
|
-
social.className
|
|
998
|
-
),
|
|
999
|
-
children: icon
|
|
1000
|
-
},
|
|
1001
|
-
social.id ?? index
|
|
1002
|
-
);
|
|
1003
|
-
})
|
|
1059
|
+
children: socialLinks.map((social, index) => /* @__PURE__ */ jsx(
|
|
1060
|
+
SocialLinkIcon,
|
|
1061
|
+
{
|
|
1062
|
+
href: social.href,
|
|
1063
|
+
label: social["aria-label"] || (typeof social.label === "string" ? social.label : void 0),
|
|
1064
|
+
className: cn(socialLinkClassName, social.className),
|
|
1065
|
+
iconClassName: socialIconClassName
|
|
1066
|
+
},
|
|
1067
|
+
social.href || index
|
|
1068
|
+
))
|
|
1004
1069
|
}
|
|
1005
1070
|
);
|
|
1006
1071
|
}, [
|
|
@@ -8,6 +8,7 @@ var classVarianceAuthority = require('class-variance-authority');
|
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var icon = require('@page-speed/icon');
|
|
10
10
|
var img = require('@page-speed/img');
|
|
11
|
+
var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
|
|
11
12
|
var integration = require('@page-speed/forms/integration');
|
|
12
13
|
|
|
13
14
|
function _interopNamespace(e) {
|
|
@@ -831,6 +832,87 @@ var Section = React__namespace.default.forwardRef(
|
|
|
831
832
|
}
|
|
832
833
|
);
|
|
833
834
|
Section.displayName = "Section";
|
|
835
|
+
var platformIconMap = {
|
|
836
|
+
instagram: "cib/instagram",
|
|
837
|
+
linkedin: "cib/linkedin",
|
|
838
|
+
google: "cib/google",
|
|
839
|
+
facebook: "cib/facebook",
|
|
840
|
+
tiktok: "cib/tiktok",
|
|
841
|
+
youtube: "cib/youtube",
|
|
842
|
+
yelp: "cib/yelp",
|
|
843
|
+
spotify: "cib/spotify",
|
|
844
|
+
apple: "cib/apple",
|
|
845
|
+
x: "line-md/twitter-x-alt",
|
|
846
|
+
github: "cib/github",
|
|
847
|
+
snapchat: "cib/snapchat",
|
|
848
|
+
discord: "cib/discord",
|
|
849
|
+
dev: "simple-icons/devdotto",
|
|
850
|
+
substack: "simple-icons/substack",
|
|
851
|
+
reddit: "cib/reddit",
|
|
852
|
+
pinterest: "cib/pinterest",
|
|
853
|
+
threads: "simple-icons/threads",
|
|
854
|
+
twitch: "cib/twitch",
|
|
855
|
+
whatsapp: "cib/whatsapp",
|
|
856
|
+
telegram: "cib/telegram",
|
|
857
|
+
medium: "simple-icons/medium",
|
|
858
|
+
patreon: "cib/patreon",
|
|
859
|
+
onlyfans: "simple-icons/onlyfans",
|
|
860
|
+
eventbrite: "cib/eventbrite",
|
|
861
|
+
npmjs: "simple-icons/npm",
|
|
862
|
+
crates: "cib/rust",
|
|
863
|
+
rubygems: "cib/rubygems",
|
|
864
|
+
behance: "cib/behance",
|
|
865
|
+
dribbble: "cib/dribbble",
|
|
866
|
+
unknown: "icon-park-solid/circular-connection"
|
|
867
|
+
};
|
|
868
|
+
var SocialLinkIcon = React__namespace.forwardRef(
|
|
869
|
+
({
|
|
870
|
+
platformName,
|
|
871
|
+
label,
|
|
872
|
+
iconSize = 20,
|
|
873
|
+
iconColor,
|
|
874
|
+
href,
|
|
875
|
+
iconClassName,
|
|
876
|
+
className,
|
|
877
|
+
iconNameOverride,
|
|
878
|
+
...pressableProps
|
|
879
|
+
}, ref) => {
|
|
880
|
+
const platform = usePlatformFromUrl.usePlatformFromUrl(href);
|
|
881
|
+
const smartPlatformName = React__namespace.useMemo(() => {
|
|
882
|
+
return platform || platformName;
|
|
883
|
+
}, [platform, platformName]);
|
|
884
|
+
const iconName = React__namespace.useMemo(() => {
|
|
885
|
+
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
886
|
+
}, [iconNameOverride, smartPlatformName]);
|
|
887
|
+
const accessibleLabel = React__namespace.useMemo(() => {
|
|
888
|
+
return label || platformName;
|
|
889
|
+
}, [label, platformName]);
|
|
890
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
|
+
Pressable,
|
|
892
|
+
{
|
|
893
|
+
ref,
|
|
894
|
+
href,
|
|
895
|
+
"aria-label": accessibleLabel,
|
|
896
|
+
className: cn(
|
|
897
|
+
"inline-flex items-center justify-center transition-colors",
|
|
898
|
+
className
|
|
899
|
+
),
|
|
900
|
+
...pressableProps,
|
|
901
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
902
|
+
DynamicIcon,
|
|
903
|
+
{
|
|
904
|
+
name: iconName,
|
|
905
|
+
size: iconSize,
|
|
906
|
+
color: iconColor,
|
|
907
|
+
className: iconClassName,
|
|
908
|
+
alt: accessibleLabel
|
|
909
|
+
}
|
|
910
|
+
)
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
);
|
|
915
|
+
SocialLinkIcon.displayName = "SocialLinkIcon";
|
|
834
916
|
var DEFAULT_STYLE_RULES = {
|
|
835
917
|
formContainer: "w-full flex flex-col gap-3 justify-center items-center",
|
|
836
918
|
fieldsContainer: "",
|
|
@@ -955,34 +1037,22 @@ function LinkPageNewsletterSocial({
|
|
|
955
1037
|
"flex items-center justify-center gap-3",
|
|
956
1038
|
socialLinksClassName
|
|
957
1039
|
),
|
|
958
|
-
children: socialLinks.map((social, index) =>
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
asButton: true,
|
|
975
|
-
size: "icon-lg",
|
|
976
|
-
className: cn(
|
|
977
|
-
"rounded-full p-2.5 transition-all duration-200",
|
|
978
|
-
socialLinkClassName,
|
|
979
|
-
social.className
|
|
980
|
-
),
|
|
981
|
-
children: icon
|
|
982
|
-
},
|
|
983
|
-
social.id ?? index
|
|
984
|
-
);
|
|
985
|
-
})
|
|
1040
|
+
children: socialLinks.map((social, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
+
SocialLinkIcon,
|
|
1042
|
+
{
|
|
1043
|
+
href: social.href,
|
|
1044
|
+
label: social["aria-label"] || (typeof social.label === "string" ? social.label : void 0),
|
|
1045
|
+
asButton: true,
|
|
1046
|
+
size: "icon-lg",
|
|
1047
|
+
className: cn(
|
|
1048
|
+
"rounded-full p-2.5 transition-all duration-200",
|
|
1049
|
+
socialLinkClassName,
|
|
1050
|
+
social.className
|
|
1051
|
+
),
|
|
1052
|
+
iconClassName: socialIconClassName
|
|
1053
|
+
},
|
|
1054
|
+
social.id ?? social.href ?? index
|
|
1055
|
+
))
|
|
986
1056
|
}
|
|
987
1057
|
);
|
|
988
1058
|
}, [
|
|
@@ -7,6 +7,7 @@ import { cva } from 'class-variance-authority';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { Icon } from '@page-speed/icon';
|
|
9
9
|
import { Img } from '@page-speed/img';
|
|
10
|
+
import { usePlatformFromUrl } from '@opensite/hooks/usePlatformFromUrl';
|
|
10
11
|
import { FormEngine } from '@page-speed/forms/integration';
|
|
11
12
|
|
|
12
13
|
// components/blocks/link-page/link-page-newsletter-social.tsx
|
|
@@ -810,6 +811,87 @@ var Section = React__default.forwardRef(
|
|
|
810
811
|
}
|
|
811
812
|
);
|
|
812
813
|
Section.displayName = "Section";
|
|
814
|
+
var platformIconMap = {
|
|
815
|
+
instagram: "cib/instagram",
|
|
816
|
+
linkedin: "cib/linkedin",
|
|
817
|
+
google: "cib/google",
|
|
818
|
+
facebook: "cib/facebook",
|
|
819
|
+
tiktok: "cib/tiktok",
|
|
820
|
+
youtube: "cib/youtube",
|
|
821
|
+
yelp: "cib/yelp",
|
|
822
|
+
spotify: "cib/spotify",
|
|
823
|
+
apple: "cib/apple",
|
|
824
|
+
x: "line-md/twitter-x-alt",
|
|
825
|
+
github: "cib/github",
|
|
826
|
+
snapchat: "cib/snapchat",
|
|
827
|
+
discord: "cib/discord",
|
|
828
|
+
dev: "simple-icons/devdotto",
|
|
829
|
+
substack: "simple-icons/substack",
|
|
830
|
+
reddit: "cib/reddit",
|
|
831
|
+
pinterest: "cib/pinterest",
|
|
832
|
+
threads: "simple-icons/threads",
|
|
833
|
+
twitch: "cib/twitch",
|
|
834
|
+
whatsapp: "cib/whatsapp",
|
|
835
|
+
telegram: "cib/telegram",
|
|
836
|
+
medium: "simple-icons/medium",
|
|
837
|
+
patreon: "cib/patreon",
|
|
838
|
+
onlyfans: "simple-icons/onlyfans",
|
|
839
|
+
eventbrite: "cib/eventbrite",
|
|
840
|
+
npmjs: "simple-icons/npm",
|
|
841
|
+
crates: "cib/rust",
|
|
842
|
+
rubygems: "cib/rubygems",
|
|
843
|
+
behance: "cib/behance",
|
|
844
|
+
dribbble: "cib/dribbble",
|
|
845
|
+
unknown: "icon-park-solid/circular-connection"
|
|
846
|
+
};
|
|
847
|
+
var SocialLinkIcon = React.forwardRef(
|
|
848
|
+
({
|
|
849
|
+
platformName,
|
|
850
|
+
label,
|
|
851
|
+
iconSize = 20,
|
|
852
|
+
iconColor,
|
|
853
|
+
href,
|
|
854
|
+
iconClassName,
|
|
855
|
+
className,
|
|
856
|
+
iconNameOverride,
|
|
857
|
+
...pressableProps
|
|
858
|
+
}, ref) => {
|
|
859
|
+
const platform = usePlatformFromUrl(href);
|
|
860
|
+
const smartPlatformName = React.useMemo(() => {
|
|
861
|
+
return platform || platformName;
|
|
862
|
+
}, [platform, platformName]);
|
|
863
|
+
const iconName = React.useMemo(() => {
|
|
864
|
+
return iconNameOverride || platformIconMap[smartPlatformName];
|
|
865
|
+
}, [iconNameOverride, smartPlatformName]);
|
|
866
|
+
const accessibleLabel = React.useMemo(() => {
|
|
867
|
+
return label || platformName;
|
|
868
|
+
}, [label, platformName]);
|
|
869
|
+
return /* @__PURE__ */ jsx(
|
|
870
|
+
Pressable,
|
|
871
|
+
{
|
|
872
|
+
ref,
|
|
873
|
+
href,
|
|
874
|
+
"aria-label": accessibleLabel,
|
|
875
|
+
className: cn(
|
|
876
|
+
"inline-flex items-center justify-center transition-colors",
|
|
877
|
+
className
|
|
878
|
+
),
|
|
879
|
+
...pressableProps,
|
|
880
|
+
children: /* @__PURE__ */ jsx(
|
|
881
|
+
DynamicIcon,
|
|
882
|
+
{
|
|
883
|
+
name: iconName,
|
|
884
|
+
size: iconSize,
|
|
885
|
+
color: iconColor,
|
|
886
|
+
className: iconClassName,
|
|
887
|
+
alt: accessibleLabel
|
|
888
|
+
}
|
|
889
|
+
)
|
|
890
|
+
}
|
|
891
|
+
);
|
|
892
|
+
}
|
|
893
|
+
);
|
|
894
|
+
SocialLinkIcon.displayName = "SocialLinkIcon";
|
|
813
895
|
var DEFAULT_STYLE_RULES = {
|
|
814
896
|
formContainer: "w-full flex flex-col gap-3 justify-center items-center",
|
|
815
897
|
fieldsContainer: "",
|
|
@@ -934,34 +1016,22 @@ function LinkPageNewsletterSocial({
|
|
|
934
1016
|
"flex items-center justify-center gap-3",
|
|
935
1017
|
socialLinksClassName
|
|
936
1018
|
),
|
|
937
|
-
children: socialLinks.map((social, index) =>
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
asButton: true,
|
|
954
|
-
size: "icon-lg",
|
|
955
|
-
className: cn(
|
|
956
|
-
"rounded-full p-2.5 transition-all duration-200",
|
|
957
|
-
socialLinkClassName,
|
|
958
|
-
social.className
|
|
959
|
-
),
|
|
960
|
-
children: icon
|
|
961
|
-
},
|
|
962
|
-
social.id ?? index
|
|
963
|
-
);
|
|
964
|
-
})
|
|
1019
|
+
children: socialLinks.map((social, index) => /* @__PURE__ */ jsx(
|
|
1020
|
+
SocialLinkIcon,
|
|
1021
|
+
{
|
|
1022
|
+
href: social.href,
|
|
1023
|
+
label: social["aria-label"] || (typeof social.label === "string" ? social.label : void 0),
|
|
1024
|
+
asButton: true,
|
|
1025
|
+
size: "icon-lg",
|
|
1026
|
+
className: cn(
|
|
1027
|
+
"rounded-full p-2.5 transition-all duration-200",
|
|
1028
|
+
socialLinkClassName,
|
|
1029
|
+
social.className
|
|
1030
|
+
),
|
|
1031
|
+
iconClassName: socialIconClassName
|
|
1032
|
+
},
|
|
1033
|
+
social.id ?? social.href ?? index
|
|
1034
|
+
))
|
|
965
1035
|
}
|
|
966
1036
|
);
|
|
967
1037
|
}, [
|