@opensite/ui 0.8.9 → 0.9.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-company-profile.cjs +32 -4
- package/dist/about-company-profile.js +32 -4
- package/dist/about-culture-tabs.cjs +38 -8
- package/dist/about-culture-tabs.js +38 -8
- package/dist/about-developer-profile.cjs +37 -5
- package/dist/about-developer-profile.js +37 -5
- package/dist/about-developer-story.cjs +31 -3
- package/dist/about-developer-story.js +31 -3
- package/dist/about-expandable-values.cjs +43 -9
- package/dist/about-expandable-values.js +43 -9
- package/dist/about-interactive-tabs.cjs +63 -4
- package/dist/about-interactive-tabs.js +63 -4
- package/dist/about-location-info-hero.cjs +28 -2
- package/dist/about-location-info-hero.js +28 -2
- package/dist/about-minimal-story.cjs +35 -4
- package/dist/about-minimal-story.js +35 -4
- package/dist/about-mission-dual-image.cjs +30 -2
- package/dist/about-mission-dual-image.js +30 -2
- package/dist/about-mission-features.cjs +36 -4
- package/dist/about-mission-features.js +36 -4
- package/dist/about-mission-principles.cjs +39 -6
- package/dist/about-mission-principles.js +39 -6
- package/dist/about-network-spotlight.cjs +33 -5
- package/dist/about-network-spotlight.js +33 -5
- package/dist/about-startup-team.cjs +47 -6
- package/dist/about-startup-team.js +47 -6
- package/dist/about-stats-showcase.cjs +31 -4
- package/dist/about-stats-showcase.js +31 -4
- package/dist/about-stats-sidebar.cjs +29 -3
- package/dist/about-stats-sidebar.js +29 -3
- package/dist/about-story-expertise.cjs +44 -8
- package/dist/about-story-expertise.js +44 -8
- package/dist/about-story-gallery.cjs +28 -1
- package/dist/about-story-gallery.js +28 -1
- package/dist/about-story-hero.cjs +36 -4
- package/dist/about-story-hero.js +36 -4
- package/dist/about-streamline-team.cjs +32 -4
- package/dist/about-streamline-team.js +32 -4
- package/dist/about-vision-gallery.cjs +32 -3
- package/dist/about-vision-gallery.js +32 -3
- package/dist/alternating-blocks.cjs +5 -1
- package/dist/alternating-blocks.js +5 -1
- package/dist/banner-announcement-dismissible.cjs +377 -1
- package/dist/banner-announcement-dismissible.d.cts +7 -1
- package/dist/banner-announcement-dismissible.d.ts +7 -1
- package/dist/banner-announcement-dismissible.js +378 -2
- package/dist/banner-countdown-sale.cjs +388 -8
- package/dist/banner-countdown-sale.d.cts +11 -1
- package/dist/banner-countdown-sale.d.ts +11 -1
- package/dist/banner-countdown-sale.js +379 -3
- package/dist/banner-delivery-countdown.cjs +377 -1
- package/dist/banner-delivery-countdown.d.cts +11 -1
- package/dist/banner-delivery-countdown.d.ts +11 -1
- package/dist/banner-delivery-countdown.js +378 -2
- package/dist/banner-event-promo.cjs +377 -1
- package/dist/banner-event-promo.d.cts +7 -1
- package/dist/banner-event-promo.d.ts +7 -1
- package/dist/banner-event-promo.js +378 -2
- package/dist/banner-floating-offer.cjs +379 -3
- package/dist/banner-floating-offer.d.cts +7 -1
- package/dist/banner-floating-offer.d.ts +7 -1
- package/dist/banner-floating-offer.js +380 -4
- package/dist/banner-gdpr-rights.cjs +398 -31
- package/dist/banner-gdpr-rights.d.cts +7 -1
- package/dist/banner-gdpr-rights.d.ts +7 -1
- package/dist/banner-gdpr-rights.js +399 -32
- package/dist/banner-privacy-notice.cjs +399 -32
- package/dist/banner-privacy-notice.d.cts +7 -1
- package/dist/banner-privacy-notice.d.ts +7 -1
- package/dist/banner-privacy-notice.js +400 -33
- package/dist/banner-promo-cta.cjs +382 -12
- package/dist/banner-promo-cta.d.cts +7 -1
- package/dist/banner-promo-cta.d.ts +7 -1
- package/dist/banner-promo-cta.js +383 -13
- package/dist/banner-social-follow.cjs +395 -28
- package/dist/banner-social-follow.d.cts +7 -1
- package/dist/banner-social-follow.d.ts +7 -1
- package/dist/banner-social-follow.js +396 -29
- package/dist/banner-survey-incentive.cjs +377 -1
- package/dist/banner-survey-incentive.d.cts +7 -1
- package/dist/banner-survey-incentive.d.ts +7 -1
- package/dist/banner-survey-incentive.js +378 -2
- package/dist/community-initiatives.cjs +43 -10
- package/dist/community-initiatives.js +43 -10
- package/dist/components.cjs +76 -36
- package/dist/components.js +76 -36
- package/dist/contact-floating-banner.cjs +378 -2
- package/dist/contact-floating-banner.d.cts +7 -1
- package/dist/contact-floating-banner.d.ts +7 -1
- package/dist/contact-floating-banner.js +379 -2
- package/dist/cta-accent-background.cjs +28 -1
- package/dist/cta-accent-background.js +28 -1
- package/dist/cta-app-download-newsletter.cjs +30 -2
- package/dist/cta-app-download-newsletter.js +30 -2
- package/dist/cta-documentation-links.cjs +28 -2
- package/dist/cta-documentation-links.js +28 -2
- package/dist/cta-feature-cards-grid.cjs +34 -3
- package/dist/cta-feature-cards-grid.js +34 -3
- package/dist/cta-feature-checklist.cjs +27 -1
- package/dist/cta-feature-checklist.js +27 -1
- package/dist/cta-feature-list.cjs +33 -2
- package/dist/cta-feature-list.js +33 -2
- package/dist/cta-gradient-logos-floating.cjs +28 -1
- package/dist/cta-gradient-logos-floating.js +28 -1
- package/dist/cta-minimal-separator.cjs +27 -1
- package/dist/cta-minimal-separator.js +27 -1
- package/dist/cta-platform-demo.cjs +28 -1
- package/dist/cta-platform-demo.js +28 -1
- package/dist/cta-simple-centered.cjs +28 -1
- package/dist/cta-simple-centered.js +28 -1
- package/dist/cta-split-gradient-image.cjs +28 -1
- package/dist/cta-split-gradient-image.js +28 -1
- package/dist/cta-split-image-logos.cjs +29 -2
- package/dist/cta-split-image-logos.js +29 -2
- package/dist/cta-split-image.cjs +29 -2
- package/dist/cta-split-image.js +29 -2
- package/dist/cta-stacked-cards.cjs +28 -1
- package/dist/cta-stacked-cards.js +28 -1
- package/dist/faq-badge-support.cjs +33 -5
- package/dist/faq-badge-support.js +33 -5
- package/dist/faq-bordered-badge.cjs +31 -3
- package/dist/faq-bordered-badge.js +31 -3
- package/dist/faq-card-categories.cjs +60 -4
- package/dist/faq-card-categories.js +60 -4
- package/dist/faq-categorized-sections.cjs +31 -3
- package/dist/faq-categorized-sections.js +31 -3
- package/dist/faq-centered-accordion.cjs +31 -3
- package/dist/faq-centered-accordion.js +31 -3
- package/dist/faq-gradient-categories.cjs +31 -3
- package/dist/faq-gradient-categories.js +31 -3
- package/dist/faq-icon-benefits.cjs +40 -5
- package/dist/faq-icon-benefits.js +40 -5
- package/dist/faq-muted-cards.cjs +29 -2
- package/dist/faq-muted-cards.js +29 -2
- package/dist/faq-numbered-grid.cjs +32 -3
- package/dist/faq-numbered-grid.js +32 -3
- package/dist/faq-numbered-list.cjs +32 -3
- package/dist/faq-numbered-list.js +32 -3
- package/dist/faq-profile-sidebar.cjs +36 -6
- package/dist/faq-profile-sidebar.js +36 -6
- package/dist/faq-sidebar-navigation.cjs +30 -3
- package/dist/faq-sidebar-navigation.js +30 -3
- package/dist/faq-simple-accordion.cjs +29 -2
- package/dist/faq-simple-accordion.js +29 -2
- package/dist/feature-accordion-image.cjs +28 -2
- package/dist/feature-accordion-image.js +28 -2
- package/dist/feature-badge-grid-six.cjs +27 -1
- package/dist/feature-badge-grid-six.js +27 -1
- package/dist/feature-bento-image-grid.cjs +27 -1
- package/dist/feature-bento-image-grid.js +27 -1
- package/dist/feature-bento-utilities.cjs +56 -4
- package/dist/feature-bento-utilities.js +56 -4
- package/dist/feature-capabilities-grid.cjs +29 -3
- package/dist/feature-capabilities-grid.js +29 -3
- package/dist/feature-card-grid-linked.cjs +29 -2
- package/dist/feature-card-grid-linked.js +29 -2
- package/dist/feature-carousel-progress.cjs +28 -2
- package/dist/feature-carousel-progress.js +28 -2
- package/dist/feature-category-image-cards.cjs +28 -2
- package/dist/feature-category-image-cards.js +28 -2
- package/dist/feature-checklist-image.cjs +30 -2
- package/dist/feature-checklist-image.js +30 -2
- package/dist/feature-checklist-three-column.cjs +35 -5
- package/dist/feature-checklist-three-column.js +35 -5
- package/dist/feature-icon-grid-accent.cjs +28 -2
- package/dist/feature-icon-grid-accent.js +28 -2
- package/dist/feature-icon-grid-bordered.cjs +9 -4
- package/dist/feature-icon-grid-bordered.js +9 -4
- package/dist/feature-icon-grid-muted.cjs +28 -2
- package/dist/feature-icon-grid-muted.js +28 -2
- package/dist/feature-icon-tabs-content.cjs +56 -5
- package/dist/feature-icon-tabs-content.js +56 -5
- package/dist/feature-image-cards-three-column.cjs +27 -1
- package/dist/feature-image-cards-three-column.js +27 -1
- package/dist/feature-integration-cards.cjs +28 -2
- package/dist/feature-integration-cards.js +28 -2
- package/dist/feature-pattern-grid-links.cjs +28 -2
- package/dist/feature-pattern-grid-links.js +28 -2
- package/dist/feature-utility-cards-grid.cjs +9 -4
- package/dist/feature-utility-cards-grid.js +9 -4
- package/dist/footer-comprehensive-links.cjs +231 -151
- package/dist/footer-comprehensive-links.js +231 -151
- package/dist/hero-ad-campaign-expert.cjs +24 -2
- package/dist/hero-ad-campaign-expert.js +24 -2
- package/dist/hero-adaptable-product-grid.cjs +27 -1
- package/dist/hero-adaptable-product-grid.js +27 -1
- package/dist/hero-ai-powered-carousel.cjs +27 -1
- package/dist/hero-ai-powered-carousel.js +27 -1
- package/dist/hero-announcement-badge.cjs +27 -1
- package/dist/hero-announcement-badge.js +27 -1
- package/dist/hero-architecture-fullscreen.cjs +50 -2
- package/dist/hero-architecture-fullscreen.js +50 -2
- package/dist/hero-badge-image-split.cjs +27 -1
- package/dist/hero-badge-image-split.js +27 -1
- package/dist/hero-business-carousel-dots.cjs +27 -1
- package/dist/hero-business-carousel-dots.js +27 -1
- package/dist/hero-centered-gradient-cta.cjs +28 -2
- package/dist/hero-centered-gradient-cta.js +28 -2
- package/dist/hero-centered-image-grid.cjs +27 -1
- package/dist/hero-centered-image-grid.js +27 -1
- package/dist/hero-centered-screenshot.cjs +50 -2
- package/dist/hero-centered-screenshot.js +50 -2
- package/dist/hero-coming-soon-countdown.cjs +37 -7
- package/dist/hero-coming-soon-countdown.js +37 -7
- package/dist/hero-community-survey-cta.cjs +27 -1
- package/dist/hero-community-survey-cta.js +27 -1
- package/dist/hero-conversation-intelligence.cjs +50 -2
- package/dist/hero-conversation-intelligence.js +50 -2
- package/dist/hero-conversion-video-play.cjs +55 -3
- package/dist/hero-conversion-video-play.js +55 -3
- package/dist/hero-creative-studio-stacked.cjs +28 -2
- package/dist/hero-creative-studio-stacked.js +28 -2
- package/dist/hero-crm-streamlined.cjs +27 -1
- package/dist/hero-crm-streamlined.js +27 -1
- package/dist/hero-customer-support-layered.cjs +51 -3
- package/dist/hero-customer-support-layered.js +51 -3
- package/dist/hero-dashed-border-features.cjs +27 -1
- package/dist/hero-dashed-border-features.js +27 -1
- package/dist/hero-design-showcase-logos.cjs +27 -1
- package/dist/hero-design-showcase-logos.js +27 -1
- package/dist/hero-design-system-3d.cjs +32 -2
- package/dist/hero-design-system-3d.js +32 -2
- package/dist/hero-developer-tools-code.cjs +27 -1
- package/dist/hero-developer-tools-code.js +27 -1
- package/dist/hero-digital-agency-fullscreen.cjs +33 -3
- package/dist/hero-digital-agency-fullscreen.js +33 -3
- package/dist/hero-ecommerce-product-showcase.cjs +32 -6
- package/dist/hero-ecommerce-product-showcase.js +32 -6
- package/dist/hero-enterprise-security.cjs +34 -4
- package/dist/hero-enterprise-security.js +34 -4
- package/dist/hero-event-registration.cjs +35 -5
- package/dist/hero-event-registration.js +35 -5
- package/dist/hero-feature-cards-grid.cjs +82 -4
- package/dist/hero-feature-cards-grid.js +82 -4
- package/dist/hero-gradient-avatars-rating.cjs +30 -4
- package/dist/hero-gradient-avatars-rating.js +30 -4
- package/dist/hero-gradient-client-focused.cjs +27 -1
- package/dist/hero-gradient-client-focused.js +27 -1
- package/dist/hero-grid-pattern-efficiency.cjs +28 -2
- package/dist/hero-grid-pattern-efficiency.js +28 -2
- package/dist/hero-grid-pattern-solutions.cjs +27 -1
- package/dist/hero-grid-pattern-solutions.js +27 -1
- package/dist/hero-image-left-content.cjs +27 -1
- package/dist/hero-image-left-content.js +27 -1
- package/dist/hero-innovation-image-grid.cjs +27 -1
- package/dist/hero-innovation-image-grid.js +27 -1
- package/dist/hero-logo-centered-screenshot.cjs +27 -1
- package/dist/hero-logo-centered-screenshot.js +27 -1
- package/dist/hero-marketplace-scattered-images.cjs +27 -1
- package/dist/hero-marketplace-scattered-images.js +27 -1
- package/dist/hero-mentorship-video-split.cjs +7 -3
- package/dist/hero-mentorship-video-split.js +7 -3
- package/dist/hero-minimal-centered-dark.cjs +55 -3
- package/dist/hero-minimal-centered-dark.js +55 -3
- package/dist/hero-mobile-app-download.cjs +34 -4
- package/dist/hero-mobile-app-download.js +34 -4
- package/dist/hero-newsletter-minimal.cjs +29 -3
- package/dist/hero-newsletter-minimal.js +29 -3
- package/dist/hero-overlay-cta-grid.cjs +33 -3
- package/dist/hero-overlay-cta-grid.js +33 -3
- package/dist/hero-pattern-badge-logos.cjs +28 -2
- package/dist/hero-pattern-badge-logos.js +28 -2
- package/dist/hero-pattern-logo-tech-stack.cjs +33 -3
- package/dist/hero-pattern-logo-tech-stack.js +33 -3
- package/dist/hero-platform-features-grid.cjs +28 -2
- package/dist/hero-platform-features-grid.js +28 -2
- package/dist/hero-portfolio-creative.cjs +29 -3
- package/dist/hero-portfolio-creative.js +29 -3
- package/dist/hero-pricing-comparison.cjs +52 -4
- package/dist/hero-pricing-comparison.js +52 -4
- package/dist/hero-product-showcase-floating.cjs +34 -4
- package/dist/hero-product-showcase-floating.js +34 -4
- package/dist/hero-productivity-launcher-video.cjs +29 -3
- package/dist/hero-productivity-launcher-video.js +29 -3
- package/dist/hero-saas-dashboard-preview.cjs +34 -4
- package/dist/hero-saas-dashboard-preview.js +34 -4
- package/dist/hero-shared-inbox-layered.cjs +51 -3
- package/dist/hero-shared-inbox-layered.js +51 -3
- package/dist/hero-simple-centered-image.cjs +27 -1
- package/dist/hero-simple-centered-image.js +27 -1
- package/dist/hero-software-growth-video-dialog.cjs +50 -2
- package/dist/hero-software-growth-video-dialog.js +50 -2
- package/dist/hero-spiral-pattern-cards.cjs +28 -2
- package/dist/hero-spiral-pattern-cards.js +28 -2
- package/dist/hero-split-icon-cards.cjs +34 -4
- package/dist/hero-split-icon-cards.js +34 -4
- package/dist/hero-split-image-newsletter.cjs +28 -2
- package/dist/hero-split-image-newsletter.js +28 -2
- package/dist/hero-split-spiral-shapes.cjs +28 -2
- package/dist/hero-split-spiral-shapes.js +28 -2
- package/dist/hero-startup-launch-cta.cjs +28 -2
- package/dist/hero-startup-launch-cta.js +28 -2
- package/dist/hero-stats-social-proof.cjs +34 -4
- package/dist/hero-stats-social-proof.js +34 -4
- package/dist/hero-tech-carousel.cjs +27 -1
- package/dist/hero-tech-carousel.js +27 -1
- package/dist/hero-ui-library-showcase.cjs +27 -1
- package/dist/hero-ui-library-showcase.js +27 -1
- package/dist/hero-video-background-dark.cjs +28 -2
- package/dist/hero-video-background-dark.js +28 -2
- package/dist/hero-video-dialog-gradient.cjs +27 -1
- package/dist/hero-video-dialog-gradient.js +27 -1
- package/dist/hero-welcome-asymmetric-images.cjs +30 -2
- package/dist/hero-welcome-asymmetric-images.js +30 -2
- package/dist/index.cjs +104 -36
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +102 -37
- package/dist/link-page-bento-layout.cjs +57 -28
- package/dist/link-page-bento-layout.d.cts +1 -5
- package/dist/link-page-bento-layout.d.ts +1 -5
- package/dist/link-page-bento-layout.js +57 -28
- package/dist/link-page-grid-cards.cjs +52 -23
- package/dist/link-page-grid-cards.d.cts +1 -5
- package/dist/link-page-grid-cards.d.ts +1 -5
- package/dist/link-page-grid-cards.js +52 -23
- package/dist/link-page-minimal-profile.cjs +46 -18
- package/dist/link-page-minimal-profile.d.cts +1 -5
- package/dist/link-page-minimal-profile.d.ts +1 -5
- package/dist/link-page-minimal-profile.js +46 -18
- package/dist/link-page-newsletter-social.cjs +53 -28
- package/dist/link-page-newsletter-social.d.cts +1 -5
- package/dist/link-page-newsletter-social.d.ts +1 -5
- package/dist/link-page-newsletter-social.js +53 -28
- package/dist/link-tree-block.cjs +122 -34
- package/dist/link-tree-block.d.cts +1 -8
- package/dist/link-tree-block.d.ts +1 -8
- package/dist/link-tree-block.js +122 -34
- package/dist/media-hover-ctas.cjs +28 -2
- package/dist/media-hover-ctas.js +28 -2
- package/dist/process-expandable-timeline.cjs +66 -10
- package/dist/process-expandable-timeline.js +66 -10
- package/dist/process-hover-cards.cjs +39 -6
- package/dist/process-hover-cards.js +39 -6
- package/dist/process-icon-timeline.cjs +53 -3
- package/dist/process-icon-timeline.js +53 -3
- package/dist/process-mission-principles.cjs +44 -6
- package/dist/process-mission-principles.js +44 -6
- package/dist/process-numbered-services.cjs +76 -22
- package/dist/process-numbered-services.js +76 -22
- package/dist/process-roadmap-timeline.cjs +63 -9
- package/dist/process-roadmap-timeline.js +63 -9
- package/dist/process-scroll-image.cjs +71 -32
- package/dist/process-scroll-image.js +71 -32
- package/dist/process-steps-grid.cjs +61 -5
- package/dist/process-steps-grid.js +61 -5
- package/dist/process-sticky-steps.cjs +49 -69
- package/dist/process-sticky-steps.d.cts +1 -13
- package/dist/process-sticky-steps.d.ts +1 -13
- package/dist/process-sticky-steps.js +49 -69
- package/dist/project-zigzag-layout.cjs +379 -3
- package/dist/project-zigzag-layout.d.cts +8 -1
- package/dist/project-zigzag-layout.d.ts +8 -1
- package/dist/project-zigzag-layout.js +380 -3
- package/dist/registry.cjs +2759 -2476
- package/dist/registry.js +2759 -2476
- package/dist/team-media-showcase.cjs +59 -4
- package/dist/team-media-showcase.d.cts +4 -0
- package/dist/team-media-showcase.d.ts +4 -0
- package/dist/team-media-showcase.js +59 -4
- package/dist/testimonials-carousel-image.d.cts +6 -0
- package/dist/testimonials-carousel-image.d.ts +6 -0
- package/dist/utils.cjs +58 -0
- package/dist/utils.d.cts +113 -1
- package/dist/utils.d.ts +113 -1
- package/dist/utils.js +56 -1
- package/package.json +1 -1
package/dist/link-tree-block.cjs
CHANGED
|
@@ -64,6 +64,54 @@ function getNestedCardTextColor(parentBg, options) {
|
|
|
64
64
|
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
65
65
|
return isDark ? "text-foreground" : "";
|
|
66
66
|
}
|
|
67
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
68
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
69
|
+
if (isDark) {
|
|
70
|
+
switch (variant) {
|
|
71
|
+
case "default":
|
|
72
|
+
return "text-foreground";
|
|
73
|
+
case "muted":
|
|
74
|
+
return "text-foreground/80";
|
|
75
|
+
case "subtle":
|
|
76
|
+
return "text-foreground/60";
|
|
77
|
+
case "accent":
|
|
78
|
+
return "text-accent-foreground";
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
switch (variant) {
|
|
82
|
+
case "default":
|
|
83
|
+
return "text-foreground";
|
|
84
|
+
case "muted":
|
|
85
|
+
return "text-muted-foreground";
|
|
86
|
+
case "subtle":
|
|
87
|
+
return "text-muted-foreground/70";
|
|
88
|
+
case "accent":
|
|
89
|
+
return "text-primary";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function getBorderColor(parentBg, variant = "default", options) {
|
|
94
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
95
|
+
if (isDark) {
|
|
96
|
+
switch (variant) {
|
|
97
|
+
case "default":
|
|
98
|
+
return "border-foreground/20";
|
|
99
|
+
case "muted":
|
|
100
|
+
return "border-foreground/10";
|
|
101
|
+
case "accent":
|
|
102
|
+
return "border-accent-foreground";
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
switch (variant) {
|
|
106
|
+
case "default":
|
|
107
|
+
return "border-border";
|
|
108
|
+
case "muted":
|
|
109
|
+
return "border-muted";
|
|
110
|
+
case "accent":
|
|
111
|
+
return "border-primary";
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
67
115
|
function normalizePhoneNumber(input) {
|
|
68
116
|
const trimmed = input.trim();
|
|
69
117
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -1002,8 +1050,8 @@ function LinkTreeBlock({
|
|
|
1002
1050
|
brandName,
|
|
1003
1051
|
brandTagline,
|
|
1004
1052
|
brandLogo,
|
|
1005
|
-
brandAvatar
|
|
1006
|
-
brandVerified =
|
|
1053
|
+
brandAvatar,
|
|
1054
|
+
brandVerified = false,
|
|
1007
1055
|
verifiedIcon,
|
|
1008
1056
|
brandSlot,
|
|
1009
1057
|
links,
|
|
@@ -1044,19 +1092,16 @@ function LinkTreeBlock({
|
|
|
1044
1092
|
socialLinkClassName,
|
|
1045
1093
|
socialIconClassName,
|
|
1046
1094
|
footerClassName,
|
|
1047
|
-
|
|
1048
|
-
background,
|
|
1095
|
+
background = "gray",
|
|
1049
1096
|
spacing,
|
|
1050
1097
|
pattern,
|
|
1051
1098
|
patternOpacity,
|
|
1052
1099
|
patternClassName,
|
|
1053
|
-
backgroundPattern
|
|
1100
|
+
backgroundPattern,
|
|
1054
1101
|
accentColor,
|
|
1055
1102
|
optixFlowConfig
|
|
1056
1103
|
}) {
|
|
1057
|
-
const
|
|
1058
|
-
const isGlass = theme === "glass";
|
|
1059
|
-
const resolvedBackground = background ?? (isDark ? "dark" : "gray");
|
|
1104
|
+
const resolvedBackground = background;
|
|
1060
1105
|
const resolvedPattern = pattern ?? backgroundPattern;
|
|
1061
1106
|
const [lightboxOpen, setLightboxOpen] = React.useState(false);
|
|
1062
1107
|
const [lightboxIndex, setLightboxIndex] = React.useState(0);
|
|
@@ -1129,10 +1174,7 @@ function LinkTreeBlock({
|
|
|
1129
1174
|
{
|
|
1130
1175
|
name: "lucide/check",
|
|
1131
1176
|
size: 14,
|
|
1132
|
-
className: cn(
|
|
1133
|
-
"text-primary-foreground",
|
|
1134
|
-
verifiedIconClassName
|
|
1135
|
-
)
|
|
1177
|
+
className: cn("", verifiedIconClassName)
|
|
1136
1178
|
}
|
|
1137
1179
|
)
|
|
1138
1180
|
}
|
|
@@ -1153,7 +1195,8 @@ function LinkTreeBlock({
|
|
|
1153
1195
|
"p",
|
|
1154
1196
|
{
|
|
1155
1197
|
className: cn(
|
|
1156
|
-
"max-w-xs text-balance text-sm
|
|
1198
|
+
"max-w-xs text-balance text-sm",
|
|
1199
|
+
getTextColor(resolvedBackground, "muted"),
|
|
1157
1200
|
taglineClassName
|
|
1158
1201
|
),
|
|
1159
1202
|
children: brandTagline
|
|
@@ -1163,7 +1206,22 @@ function LinkTreeBlock({
|
|
|
1163
1206
|
]
|
|
1164
1207
|
}
|
|
1165
1208
|
);
|
|
1166
|
-
}, [
|
|
1209
|
+
}, [
|
|
1210
|
+
brandSlot,
|
|
1211
|
+
headerClassName,
|
|
1212
|
+
avatarClassName,
|
|
1213
|
+
resolvedAvatar,
|
|
1214
|
+
optixFlowConfig,
|
|
1215
|
+
brandVerified,
|
|
1216
|
+
verifiedBadgeClassName,
|
|
1217
|
+
verifiedIcon,
|
|
1218
|
+
verifiedIconClassName,
|
|
1219
|
+
brandName,
|
|
1220
|
+
resolvedBackground,
|
|
1221
|
+
nameClassName,
|
|
1222
|
+
brandTagline,
|
|
1223
|
+
taglineClassName
|
|
1224
|
+
]);
|
|
1167
1225
|
const renderLinks = React.useMemo(() => {
|
|
1168
1226
|
if (linksSlot) return linksSlot;
|
|
1169
1227
|
if (!links || links.length === 0) return null;
|
|
@@ -1196,7 +1254,7 @@ function LinkTreeBlock({
|
|
|
1196
1254
|
className: cn(
|
|
1197
1255
|
"group relative flex w-full items-center gap-3 rounded-xl px-4 py-3.5 transition-all duration-200",
|
|
1198
1256
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1199
|
-
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" :
|
|
1257
|
+
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" : "border border-border bg-card hover:bg-accent",
|
|
1200
1258
|
linkClassName,
|
|
1201
1259
|
isFeatured ? featuredLinkClassName : null,
|
|
1202
1260
|
linkItemClassName
|
|
@@ -1213,7 +1271,7 @@ function LinkTreeBlock({
|
|
|
1213
1271
|
className: cn(
|
|
1214
1272
|
"group relative flex w-full items-center gap-3 rounded-xl px-4 py-3.5 transition-all duration-200",
|
|
1215
1273
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1216
|
-
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" :
|
|
1274
|
+
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" : "border border-border bg-card hover:bg-accent",
|
|
1217
1275
|
linkClassName,
|
|
1218
1276
|
isFeatured ? featuredLinkClassName : null,
|
|
1219
1277
|
linkItemClassName
|
|
@@ -1237,7 +1295,7 @@ function LinkTreeBlock({
|
|
|
1237
1295
|
{
|
|
1238
1296
|
className: cn(
|
|
1239
1297
|
"mt-0.5 block truncate text-xs",
|
|
1240
|
-
isFeatured ? "text-primary-foreground/70" : "
|
|
1298
|
+
isFeatured ? "text-primary-foreground/70" : getTextColor(resolvedBackground, "muted"),
|
|
1241
1299
|
linkDescriptionClassName
|
|
1242
1300
|
),
|
|
1243
1301
|
children: description
|
|
@@ -1259,7 +1317,7 @@ function LinkTreeBlock({
|
|
|
1259
1317
|
size: 16,
|
|
1260
1318
|
className: cn(
|
|
1261
1319
|
"shrink-0 transition-transform group-hover:translate-x-0.5",
|
|
1262
|
-
isFeatured ? "text-primary-foreground/70" : "
|
|
1320
|
+
isFeatured ? "text-primary-foreground/70" : getTextColor(resolvedBackground, "muted"),
|
|
1263
1321
|
linkChevronClassName
|
|
1264
1322
|
)
|
|
1265
1323
|
}
|
|
@@ -1269,7 +1327,19 @@ function LinkTreeBlock({
|
|
|
1269
1327
|
link.id ?? index
|
|
1270
1328
|
);
|
|
1271
1329
|
}) });
|
|
1272
|
-
}, [
|
|
1330
|
+
}, [
|
|
1331
|
+
linksSlot,
|
|
1332
|
+
links,
|
|
1333
|
+
linksClassName,
|
|
1334
|
+
linkIconClassName,
|
|
1335
|
+
resolvedBackground,
|
|
1336
|
+
linkClassName,
|
|
1337
|
+
featuredLinkClassName,
|
|
1338
|
+
linkLabelClassName,
|
|
1339
|
+
linkDescriptionClassName,
|
|
1340
|
+
linkBadgeClassName,
|
|
1341
|
+
linkChevronClassName
|
|
1342
|
+
]);
|
|
1273
1343
|
const renderMediaGallery = React.useMemo(() => {
|
|
1274
1344
|
if (mediaGallerySlot) return mediaGallerySlot;
|
|
1275
1345
|
if (!mediaGallery || mediaGallery.length === 0) return null;
|
|
@@ -1279,7 +1349,7 @@ function LinkTreeBlock({
|
|
|
1279
1349
|
"h3",
|
|
1280
1350
|
{
|
|
1281
1351
|
className: cn(
|
|
1282
|
-
"text-center text-sm font-medium
|
|
1352
|
+
"text-center text-sm font-medium ",
|
|
1283
1353
|
mediaGalleryTitleClassName
|
|
1284
1354
|
),
|
|
1285
1355
|
children: mediaGalleryTitle
|
|
@@ -1295,7 +1365,8 @@ function LinkTreeBlock({
|
|
|
1295
1365
|
className: cn(
|
|
1296
1366
|
"group relative aspect-square overflow-hidden rounded-lg cursor-pointer",
|
|
1297
1367
|
"transition-all duration-200 hover:scale-[1.02]",
|
|
1298
|
-
|
|
1368
|
+
"ring-1",
|
|
1369
|
+
getBorderColor(resolvedBackground, "muted"),
|
|
1299
1370
|
mediaGalleryItemClassName,
|
|
1300
1371
|
item.className
|
|
1301
1372
|
),
|
|
@@ -1355,7 +1426,7 @@ function LinkTreeBlock({
|
|
|
1355
1426
|
name: "lucide/play",
|
|
1356
1427
|
size: 24,
|
|
1357
1428
|
className: cn(
|
|
1358
|
-
"
|
|
1429
|
+
" opacity-0 transition-opacity group-hover:opacity-100",
|
|
1359
1430
|
mediaGalleryPlayIconClassName
|
|
1360
1431
|
)
|
|
1361
1432
|
}
|
|
@@ -1369,7 +1440,21 @@ function LinkTreeBlock({
|
|
|
1369
1440
|
}
|
|
1370
1441
|
)
|
|
1371
1442
|
] });
|
|
1372
|
-
}, [
|
|
1443
|
+
}, [
|
|
1444
|
+
mediaGallerySlot,
|
|
1445
|
+
mediaGallery,
|
|
1446
|
+
mediaGalleryLimit,
|
|
1447
|
+
mediaGalleryClassName,
|
|
1448
|
+
mediaGalleryTitle,
|
|
1449
|
+
mediaGalleryTitleClassName,
|
|
1450
|
+
mediaGalleryGridClassName,
|
|
1451
|
+
mediaGalleryItemClassName,
|
|
1452
|
+
handleMediaClick,
|
|
1453
|
+
mediaGalleryMediaClassName,
|
|
1454
|
+
optixFlowConfig,
|
|
1455
|
+
mediaGalleryOverlayClassName,
|
|
1456
|
+
mediaGalleryPlayIconClassName
|
|
1457
|
+
]);
|
|
1373
1458
|
const renderSocialLinks = React.useMemo(() => {
|
|
1374
1459
|
if (socialLinksSlot) return socialLinksSlot;
|
|
1375
1460
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
@@ -1381,10 +1466,11 @@ function LinkTreeBlock({
|
|
|
1381
1466
|
socialLinksClassName
|
|
1382
1467
|
),
|
|
1383
1468
|
children: socialLinks.map((social, index) => {
|
|
1384
|
-
const
|
|
1469
|
+
const { iconName, ...socialPressableProps } = social;
|
|
1470
|
+
const icon = social.icon || (iconName ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1385
1471
|
DynamicIcon,
|
|
1386
1472
|
{
|
|
1387
|
-
name:
|
|
1473
|
+
name: iconName,
|
|
1388
1474
|
size: 20,
|
|
1389
1475
|
className: socialIconClassName
|
|
1390
1476
|
}
|
|
@@ -1393,14 +1479,13 @@ function LinkTreeBlock({
|
|
|
1393
1479
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1394
1480
|
Pressable,
|
|
1395
1481
|
{
|
|
1396
|
-
|
|
1482
|
+
...socialPressableProps,
|
|
1397
1483
|
"aria-label": ariaLabel,
|
|
1398
1484
|
className: cn(
|
|
1399
1485
|
"flex h-12 w-12 items-center justify-center rounded-full p-2.5 transition-all duration-200",
|
|
1400
1486
|
"hover:scale-110 active:scale-95",
|
|
1401
1487
|
getNestedCardBg(resolvedBackground),
|
|
1402
1488
|
getNestedCardTextColor(resolvedBackground),
|
|
1403
|
-
isDark ? "hover:bg-muted/20" : isGlass ? "backdrop-blur-sm hover:bg-card/80" : "hover:bg-accent",
|
|
1404
1489
|
socialLinkClassName,
|
|
1405
1490
|
social.className
|
|
1406
1491
|
),
|
|
@@ -1411,7 +1496,14 @@ function LinkTreeBlock({
|
|
|
1411
1496
|
})
|
|
1412
1497
|
}
|
|
1413
1498
|
);
|
|
1414
|
-
}, [
|
|
1499
|
+
}, [
|
|
1500
|
+
socialLinksSlot,
|
|
1501
|
+
socialLinks,
|
|
1502
|
+
socialLinksClassName,
|
|
1503
|
+
socialIconClassName,
|
|
1504
|
+
resolvedBackground,
|
|
1505
|
+
socialLinkClassName
|
|
1506
|
+
]);
|
|
1415
1507
|
const renderFooter = React.useMemo(() => {
|
|
1416
1508
|
if (footerSlot) return footerSlot;
|
|
1417
1509
|
if (!footerAction) return null;
|
|
@@ -1430,7 +1522,6 @@ function LinkTreeBlock({
|
|
|
1430
1522
|
{
|
|
1431
1523
|
className: cn(
|
|
1432
1524
|
"flex items-center justify-center gap-1.5 text-xs transition-opacity hover:opacity-80",
|
|
1433
|
-
"text-muted-foreground/60",
|
|
1434
1525
|
footerClassName,
|
|
1435
1526
|
actionClassName
|
|
1436
1527
|
),
|
|
@@ -1442,16 +1533,13 @@ function LinkTreeBlock({
|
|
|
1442
1533
|
] })
|
|
1443
1534
|
}
|
|
1444
1535
|
);
|
|
1445
|
-
}, [footerSlot, footerAction,
|
|
1536
|
+
}, [footerSlot, footerAction, footerClassName]);
|
|
1446
1537
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1447
1538
|
Section,
|
|
1448
1539
|
{
|
|
1449
1540
|
background: resolvedBackground,
|
|
1450
1541
|
spacing,
|
|
1451
|
-
className
|
|
1452
|
-
theme === "dark" ? "bg-foreground" : theme === "glass" ? "bg-gradient-to-br from-muted/50 via-background to-muted/30" : "bg-muted/30",
|
|
1453
|
-
className
|
|
1454
|
-
),
|
|
1542
|
+
className,
|
|
1455
1543
|
pattern: resolvedPattern,
|
|
1456
1544
|
patternOpacity,
|
|
1457
1545
|
patternClassName,
|
|
@@ -221,13 +221,6 @@ interface LinkTreeBlockProps {
|
|
|
221
221
|
* Additional CSS classes for the footer
|
|
222
222
|
*/
|
|
223
223
|
footerClassName?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Theme variation for the component.
|
|
226
|
-
* - "light": Light background with dark text (default)
|
|
227
|
-
* - "dark": Dark background with light text
|
|
228
|
-
* - "glass": Glassmorphism effect with gradient background
|
|
229
|
-
*/
|
|
230
|
-
theme?: "light" | "dark" | "glass";
|
|
231
224
|
/**
|
|
232
225
|
* Background style for the section
|
|
233
226
|
*/
|
|
@@ -297,6 +290,6 @@ interface LinkTreeBlockProps {
|
|
|
297
290
|
* />
|
|
298
291
|
* ```
|
|
299
292
|
*/
|
|
300
|
-
declare function LinkTreeBlock({ brandName, brandTagline, brandLogo, brandAvatar, brandVerified, verifiedIcon, brandSlot, links, linksSlot, socialLinks, socialLinksSlot, mediaGallery, mediaGallerySlot, mediaGalleryTitle, mediaGalleryLimit, footerAction, footerSlot, className, containerClassName, contentClassName, headerClassName, avatarClassName, nameClassName, taglineClassName, verifiedBadgeClassName, verifiedIconClassName, linksClassName, linkClassName, featuredLinkClassName, linkIconClassName, linkLabelClassName, linkDescriptionClassName, linkBadgeClassName, linkChevronClassName, mediaGalleryClassName, mediaGalleryTitleClassName, mediaGalleryGridClassName, mediaGalleryItemClassName, mediaGalleryMediaClassName, mediaGalleryOverlayClassName, mediaGalleryPlayIconClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName,
|
|
293
|
+
declare function LinkTreeBlock({ brandName, brandTagline, brandLogo, brandAvatar, brandVerified, verifiedIcon, brandSlot, links, linksSlot, socialLinks, socialLinksSlot, mediaGallery, mediaGallerySlot, mediaGalleryTitle, mediaGalleryLimit, footerAction, footerSlot, className, containerClassName, contentClassName, headerClassName, avatarClassName, nameClassName, taglineClassName, verifiedBadgeClassName, verifiedIconClassName, linksClassName, linkClassName, featuredLinkClassName, linkIconClassName, linkLabelClassName, linkDescriptionClassName, linkBadgeClassName, linkChevronClassName, mediaGalleryClassName, mediaGalleryTitleClassName, mediaGalleryGridClassName, mediaGalleryItemClassName, mediaGalleryMediaClassName, mediaGalleryOverlayClassName, mediaGalleryPlayIconClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName, background, spacing, pattern, patternOpacity, patternClassName, backgroundPattern, accentColor, optixFlowConfig, }: LinkTreeBlockProps): React.JSX.Element;
|
|
301
294
|
|
|
302
295
|
export { LinkTreeBlock, type LinkTreeBlockProps, type LinkTreeLink, type MediaGalleryItem, type SocialLink };
|
|
@@ -221,13 +221,6 @@ interface LinkTreeBlockProps {
|
|
|
221
221
|
* Additional CSS classes for the footer
|
|
222
222
|
*/
|
|
223
223
|
footerClassName?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Theme variation for the component.
|
|
226
|
-
* - "light": Light background with dark text (default)
|
|
227
|
-
* - "dark": Dark background with light text
|
|
228
|
-
* - "glass": Glassmorphism effect with gradient background
|
|
229
|
-
*/
|
|
230
|
-
theme?: "light" | "dark" | "glass";
|
|
231
224
|
/**
|
|
232
225
|
* Background style for the section
|
|
233
226
|
*/
|
|
@@ -297,6 +290,6 @@ interface LinkTreeBlockProps {
|
|
|
297
290
|
* />
|
|
298
291
|
* ```
|
|
299
292
|
*/
|
|
300
|
-
declare function LinkTreeBlock({ brandName, brandTagline, brandLogo, brandAvatar, brandVerified, verifiedIcon, brandSlot, links, linksSlot, socialLinks, socialLinksSlot, mediaGallery, mediaGallerySlot, mediaGalleryTitle, mediaGalleryLimit, footerAction, footerSlot, className, containerClassName, contentClassName, headerClassName, avatarClassName, nameClassName, taglineClassName, verifiedBadgeClassName, verifiedIconClassName, linksClassName, linkClassName, featuredLinkClassName, linkIconClassName, linkLabelClassName, linkDescriptionClassName, linkBadgeClassName, linkChevronClassName, mediaGalleryClassName, mediaGalleryTitleClassName, mediaGalleryGridClassName, mediaGalleryItemClassName, mediaGalleryMediaClassName, mediaGalleryOverlayClassName, mediaGalleryPlayIconClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName,
|
|
293
|
+
declare function LinkTreeBlock({ brandName, brandTagline, brandLogo, brandAvatar, brandVerified, verifiedIcon, brandSlot, links, linksSlot, socialLinks, socialLinksSlot, mediaGallery, mediaGallerySlot, mediaGalleryTitle, mediaGalleryLimit, footerAction, footerSlot, className, containerClassName, contentClassName, headerClassName, avatarClassName, nameClassName, taglineClassName, verifiedBadgeClassName, verifiedIconClassName, linksClassName, linkClassName, featuredLinkClassName, linkIconClassName, linkLabelClassName, linkDescriptionClassName, linkBadgeClassName, linkChevronClassName, mediaGalleryClassName, mediaGalleryTitleClassName, mediaGalleryGridClassName, mediaGalleryItemClassName, mediaGalleryMediaClassName, mediaGalleryOverlayClassName, mediaGalleryPlayIconClassName, socialLinksClassName, socialLinkClassName, socialIconClassName, footerClassName, background, spacing, pattern, patternOpacity, patternClassName, backgroundPattern, accentColor, optixFlowConfig, }: LinkTreeBlockProps): React.JSX.Element;
|
|
301
294
|
|
|
302
295
|
export { LinkTreeBlock, type LinkTreeBlockProps, type LinkTreeLink, type MediaGalleryItem, type SocialLink };
|
package/dist/link-tree-block.js
CHANGED
|
@@ -43,6 +43,54 @@ function getNestedCardTextColor(parentBg, options) {
|
|
|
43
43
|
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
44
44
|
return isDark ? "text-foreground" : "";
|
|
45
45
|
}
|
|
46
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
47
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
48
|
+
if (isDark) {
|
|
49
|
+
switch (variant) {
|
|
50
|
+
case "default":
|
|
51
|
+
return "text-foreground";
|
|
52
|
+
case "muted":
|
|
53
|
+
return "text-foreground/80";
|
|
54
|
+
case "subtle":
|
|
55
|
+
return "text-foreground/60";
|
|
56
|
+
case "accent":
|
|
57
|
+
return "text-accent-foreground";
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
switch (variant) {
|
|
61
|
+
case "default":
|
|
62
|
+
return "text-foreground";
|
|
63
|
+
case "muted":
|
|
64
|
+
return "text-muted-foreground";
|
|
65
|
+
case "subtle":
|
|
66
|
+
return "text-muted-foreground/70";
|
|
67
|
+
case "accent":
|
|
68
|
+
return "text-primary";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function getBorderColor(parentBg, variant = "default", options) {
|
|
73
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
74
|
+
if (isDark) {
|
|
75
|
+
switch (variant) {
|
|
76
|
+
case "default":
|
|
77
|
+
return "border-foreground/20";
|
|
78
|
+
case "muted":
|
|
79
|
+
return "border-foreground/10";
|
|
80
|
+
case "accent":
|
|
81
|
+
return "border-accent-foreground";
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
switch (variant) {
|
|
85
|
+
case "default":
|
|
86
|
+
return "border-border";
|
|
87
|
+
case "muted":
|
|
88
|
+
return "border-muted";
|
|
89
|
+
case "accent":
|
|
90
|
+
return "border-primary";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
46
94
|
function normalizePhoneNumber(input) {
|
|
47
95
|
const trimmed = input.trim();
|
|
48
96
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -981,8 +1029,8 @@ function LinkTreeBlock({
|
|
|
981
1029
|
brandName,
|
|
982
1030
|
brandTagline,
|
|
983
1031
|
brandLogo,
|
|
984
|
-
brandAvatar
|
|
985
|
-
brandVerified =
|
|
1032
|
+
brandAvatar,
|
|
1033
|
+
brandVerified = false,
|
|
986
1034
|
verifiedIcon,
|
|
987
1035
|
brandSlot,
|
|
988
1036
|
links,
|
|
@@ -1023,19 +1071,16 @@ function LinkTreeBlock({
|
|
|
1023
1071
|
socialLinkClassName,
|
|
1024
1072
|
socialIconClassName,
|
|
1025
1073
|
footerClassName,
|
|
1026
|
-
|
|
1027
|
-
background,
|
|
1074
|
+
background = "gray",
|
|
1028
1075
|
spacing,
|
|
1029
1076
|
pattern,
|
|
1030
1077
|
patternOpacity,
|
|
1031
1078
|
patternClassName,
|
|
1032
|
-
backgroundPattern
|
|
1079
|
+
backgroundPattern,
|
|
1033
1080
|
accentColor,
|
|
1034
1081
|
optixFlowConfig
|
|
1035
1082
|
}) {
|
|
1036
|
-
const
|
|
1037
|
-
const isGlass = theme === "glass";
|
|
1038
|
-
const resolvedBackground = background ?? (isDark ? "dark" : "gray");
|
|
1083
|
+
const resolvedBackground = background;
|
|
1039
1084
|
const resolvedPattern = pattern ?? backgroundPattern;
|
|
1040
1085
|
const [lightboxOpen, setLightboxOpen] = useState(false);
|
|
1041
1086
|
const [lightboxIndex, setLightboxIndex] = useState(0);
|
|
@@ -1108,10 +1153,7 @@ function LinkTreeBlock({
|
|
|
1108
1153
|
{
|
|
1109
1154
|
name: "lucide/check",
|
|
1110
1155
|
size: 14,
|
|
1111
|
-
className: cn(
|
|
1112
|
-
"text-primary-foreground",
|
|
1113
|
-
verifiedIconClassName
|
|
1114
|
-
)
|
|
1156
|
+
className: cn("", verifiedIconClassName)
|
|
1115
1157
|
}
|
|
1116
1158
|
)
|
|
1117
1159
|
}
|
|
@@ -1132,7 +1174,8 @@ function LinkTreeBlock({
|
|
|
1132
1174
|
"p",
|
|
1133
1175
|
{
|
|
1134
1176
|
className: cn(
|
|
1135
|
-
"max-w-xs text-balance text-sm
|
|
1177
|
+
"max-w-xs text-balance text-sm",
|
|
1178
|
+
getTextColor(resolvedBackground, "muted"),
|
|
1136
1179
|
taglineClassName
|
|
1137
1180
|
),
|
|
1138
1181
|
children: brandTagline
|
|
@@ -1142,7 +1185,22 @@ function LinkTreeBlock({
|
|
|
1142
1185
|
]
|
|
1143
1186
|
}
|
|
1144
1187
|
);
|
|
1145
|
-
}, [
|
|
1188
|
+
}, [
|
|
1189
|
+
brandSlot,
|
|
1190
|
+
headerClassName,
|
|
1191
|
+
avatarClassName,
|
|
1192
|
+
resolvedAvatar,
|
|
1193
|
+
optixFlowConfig,
|
|
1194
|
+
brandVerified,
|
|
1195
|
+
verifiedBadgeClassName,
|
|
1196
|
+
verifiedIcon,
|
|
1197
|
+
verifiedIconClassName,
|
|
1198
|
+
brandName,
|
|
1199
|
+
resolvedBackground,
|
|
1200
|
+
nameClassName,
|
|
1201
|
+
brandTagline,
|
|
1202
|
+
taglineClassName
|
|
1203
|
+
]);
|
|
1146
1204
|
const renderLinks = useMemo(() => {
|
|
1147
1205
|
if (linksSlot) return linksSlot;
|
|
1148
1206
|
if (!links || links.length === 0) return null;
|
|
@@ -1175,7 +1233,7 @@ function LinkTreeBlock({
|
|
|
1175
1233
|
className: cn(
|
|
1176
1234
|
"group relative flex w-full items-center gap-3 rounded-xl px-4 py-3.5 transition-all duration-200",
|
|
1177
1235
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1178
|
-
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" :
|
|
1236
|
+
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" : "border border-border bg-card hover:bg-accent",
|
|
1179
1237
|
linkClassName,
|
|
1180
1238
|
isFeatured ? featuredLinkClassName : null,
|
|
1181
1239
|
linkItemClassName
|
|
@@ -1192,7 +1250,7 @@ function LinkTreeBlock({
|
|
|
1192
1250
|
className: cn(
|
|
1193
1251
|
"group relative flex w-full items-center gap-3 rounded-xl px-4 py-3.5 transition-all duration-200",
|
|
1194
1252
|
"hover:scale-[1.02] active:scale-[0.98]",
|
|
1195
|
-
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" :
|
|
1253
|
+
isFeatured ? "bg-primary text-primary-foreground shadow-lg hover:bg-primary/90" : "border border-border bg-card hover:bg-accent",
|
|
1196
1254
|
linkClassName,
|
|
1197
1255
|
isFeatured ? featuredLinkClassName : null,
|
|
1198
1256
|
linkItemClassName
|
|
@@ -1216,7 +1274,7 @@ function LinkTreeBlock({
|
|
|
1216
1274
|
{
|
|
1217
1275
|
className: cn(
|
|
1218
1276
|
"mt-0.5 block truncate text-xs",
|
|
1219
|
-
isFeatured ? "text-primary-foreground/70" : "
|
|
1277
|
+
isFeatured ? "text-primary-foreground/70" : getTextColor(resolvedBackground, "muted"),
|
|
1220
1278
|
linkDescriptionClassName
|
|
1221
1279
|
),
|
|
1222
1280
|
children: description
|
|
@@ -1238,7 +1296,7 @@ function LinkTreeBlock({
|
|
|
1238
1296
|
size: 16,
|
|
1239
1297
|
className: cn(
|
|
1240
1298
|
"shrink-0 transition-transform group-hover:translate-x-0.5",
|
|
1241
|
-
isFeatured ? "text-primary-foreground/70" : "
|
|
1299
|
+
isFeatured ? "text-primary-foreground/70" : getTextColor(resolvedBackground, "muted"),
|
|
1242
1300
|
linkChevronClassName
|
|
1243
1301
|
)
|
|
1244
1302
|
}
|
|
@@ -1248,7 +1306,19 @@ function LinkTreeBlock({
|
|
|
1248
1306
|
link.id ?? index
|
|
1249
1307
|
);
|
|
1250
1308
|
}) });
|
|
1251
|
-
}, [
|
|
1309
|
+
}, [
|
|
1310
|
+
linksSlot,
|
|
1311
|
+
links,
|
|
1312
|
+
linksClassName,
|
|
1313
|
+
linkIconClassName,
|
|
1314
|
+
resolvedBackground,
|
|
1315
|
+
linkClassName,
|
|
1316
|
+
featuredLinkClassName,
|
|
1317
|
+
linkLabelClassName,
|
|
1318
|
+
linkDescriptionClassName,
|
|
1319
|
+
linkBadgeClassName,
|
|
1320
|
+
linkChevronClassName
|
|
1321
|
+
]);
|
|
1252
1322
|
const renderMediaGallery = useMemo(() => {
|
|
1253
1323
|
if (mediaGallerySlot) return mediaGallerySlot;
|
|
1254
1324
|
if (!mediaGallery || mediaGallery.length === 0) return null;
|
|
@@ -1258,7 +1328,7 @@ function LinkTreeBlock({
|
|
|
1258
1328
|
"h3",
|
|
1259
1329
|
{
|
|
1260
1330
|
className: cn(
|
|
1261
|
-
"text-center text-sm font-medium
|
|
1331
|
+
"text-center text-sm font-medium ",
|
|
1262
1332
|
mediaGalleryTitleClassName
|
|
1263
1333
|
),
|
|
1264
1334
|
children: mediaGalleryTitle
|
|
@@ -1274,7 +1344,8 @@ function LinkTreeBlock({
|
|
|
1274
1344
|
className: cn(
|
|
1275
1345
|
"group relative aspect-square overflow-hidden rounded-lg cursor-pointer",
|
|
1276
1346
|
"transition-all duration-200 hover:scale-[1.02]",
|
|
1277
|
-
|
|
1347
|
+
"ring-1",
|
|
1348
|
+
getBorderColor(resolvedBackground, "muted"),
|
|
1278
1349
|
mediaGalleryItemClassName,
|
|
1279
1350
|
item.className
|
|
1280
1351
|
),
|
|
@@ -1334,7 +1405,7 @@ function LinkTreeBlock({
|
|
|
1334
1405
|
name: "lucide/play",
|
|
1335
1406
|
size: 24,
|
|
1336
1407
|
className: cn(
|
|
1337
|
-
"
|
|
1408
|
+
" opacity-0 transition-opacity group-hover:opacity-100",
|
|
1338
1409
|
mediaGalleryPlayIconClassName
|
|
1339
1410
|
)
|
|
1340
1411
|
}
|
|
@@ -1348,7 +1419,21 @@ function LinkTreeBlock({
|
|
|
1348
1419
|
}
|
|
1349
1420
|
)
|
|
1350
1421
|
] });
|
|
1351
|
-
}, [
|
|
1422
|
+
}, [
|
|
1423
|
+
mediaGallerySlot,
|
|
1424
|
+
mediaGallery,
|
|
1425
|
+
mediaGalleryLimit,
|
|
1426
|
+
mediaGalleryClassName,
|
|
1427
|
+
mediaGalleryTitle,
|
|
1428
|
+
mediaGalleryTitleClassName,
|
|
1429
|
+
mediaGalleryGridClassName,
|
|
1430
|
+
mediaGalleryItemClassName,
|
|
1431
|
+
handleMediaClick,
|
|
1432
|
+
mediaGalleryMediaClassName,
|
|
1433
|
+
optixFlowConfig,
|
|
1434
|
+
mediaGalleryOverlayClassName,
|
|
1435
|
+
mediaGalleryPlayIconClassName
|
|
1436
|
+
]);
|
|
1352
1437
|
const renderSocialLinks = useMemo(() => {
|
|
1353
1438
|
if (socialLinksSlot) return socialLinksSlot;
|
|
1354
1439
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
@@ -1360,10 +1445,11 @@ function LinkTreeBlock({
|
|
|
1360
1445
|
socialLinksClassName
|
|
1361
1446
|
),
|
|
1362
1447
|
children: socialLinks.map((social, index) => {
|
|
1363
|
-
const
|
|
1448
|
+
const { iconName, ...socialPressableProps } = social;
|
|
1449
|
+
const icon = social.icon || (iconName ? /* @__PURE__ */ jsx(
|
|
1364
1450
|
DynamicIcon,
|
|
1365
1451
|
{
|
|
1366
|
-
name:
|
|
1452
|
+
name: iconName,
|
|
1367
1453
|
size: 20,
|
|
1368
1454
|
className: socialIconClassName
|
|
1369
1455
|
}
|
|
@@ -1372,14 +1458,13 @@ function LinkTreeBlock({
|
|
|
1372
1458
|
return /* @__PURE__ */ jsx(
|
|
1373
1459
|
Pressable,
|
|
1374
1460
|
{
|
|
1375
|
-
|
|
1461
|
+
...socialPressableProps,
|
|
1376
1462
|
"aria-label": ariaLabel,
|
|
1377
1463
|
className: cn(
|
|
1378
1464
|
"flex h-12 w-12 items-center justify-center rounded-full p-2.5 transition-all duration-200",
|
|
1379
1465
|
"hover:scale-110 active:scale-95",
|
|
1380
1466
|
getNestedCardBg(resolvedBackground),
|
|
1381
1467
|
getNestedCardTextColor(resolvedBackground),
|
|
1382
|
-
isDark ? "hover:bg-muted/20" : isGlass ? "backdrop-blur-sm hover:bg-card/80" : "hover:bg-accent",
|
|
1383
1468
|
socialLinkClassName,
|
|
1384
1469
|
social.className
|
|
1385
1470
|
),
|
|
@@ -1390,7 +1475,14 @@ function LinkTreeBlock({
|
|
|
1390
1475
|
})
|
|
1391
1476
|
}
|
|
1392
1477
|
);
|
|
1393
|
-
}, [
|
|
1478
|
+
}, [
|
|
1479
|
+
socialLinksSlot,
|
|
1480
|
+
socialLinks,
|
|
1481
|
+
socialLinksClassName,
|
|
1482
|
+
socialIconClassName,
|
|
1483
|
+
resolvedBackground,
|
|
1484
|
+
socialLinkClassName
|
|
1485
|
+
]);
|
|
1394
1486
|
const renderFooter = useMemo(() => {
|
|
1395
1487
|
if (footerSlot) return footerSlot;
|
|
1396
1488
|
if (!footerAction) return null;
|
|
@@ -1409,7 +1501,6 @@ function LinkTreeBlock({
|
|
|
1409
1501
|
{
|
|
1410
1502
|
className: cn(
|
|
1411
1503
|
"flex items-center justify-center gap-1.5 text-xs transition-opacity hover:opacity-80",
|
|
1412
|
-
"text-muted-foreground/60",
|
|
1413
1504
|
footerClassName,
|
|
1414
1505
|
actionClassName
|
|
1415
1506
|
),
|
|
@@ -1421,16 +1512,13 @@ function LinkTreeBlock({
|
|
|
1421
1512
|
] })
|
|
1422
1513
|
}
|
|
1423
1514
|
);
|
|
1424
|
-
}, [footerSlot, footerAction,
|
|
1515
|
+
}, [footerSlot, footerAction, footerClassName]);
|
|
1425
1516
|
return /* @__PURE__ */ jsxs(
|
|
1426
1517
|
Section,
|
|
1427
1518
|
{
|
|
1428
1519
|
background: resolvedBackground,
|
|
1429
1520
|
spacing,
|
|
1430
|
-
className
|
|
1431
|
-
theme === "dark" ? "bg-foreground" : theme === "glass" ? "bg-gradient-to-br from-muted/50 via-background to-muted/30" : "bg-muted/30",
|
|
1432
|
-
className
|
|
1433
|
-
),
|
|
1521
|
+
className,
|
|
1434
1522
|
pattern: resolvedPattern,
|
|
1435
1523
|
patternOpacity,
|
|
1436
1524
|
patternClassName,
|