@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
|
@@ -31,6 +31,58 @@ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
|
31
31
|
function cn(...inputs) {
|
|
32
32
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
33
|
}
|
|
34
|
+
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
35
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
36
|
+
if (isDark) {
|
|
37
|
+
switch (variant) {
|
|
38
|
+
case "muted":
|
|
39
|
+
return "bg-background";
|
|
40
|
+
case "card":
|
|
41
|
+
return "bg-card";
|
|
42
|
+
case "accent":
|
|
43
|
+
return "bg-accent";
|
|
44
|
+
case "subtle":
|
|
45
|
+
return "bg-background/50";
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
switch (variant) {
|
|
49
|
+
case "muted":
|
|
50
|
+
return "bg-muted";
|
|
51
|
+
case "card":
|
|
52
|
+
return "bg-card";
|
|
53
|
+
case "accent":
|
|
54
|
+
return "bg-accent";
|
|
55
|
+
case "subtle":
|
|
56
|
+
return "bg-muted/50";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
61
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
62
|
+
if (isDark) {
|
|
63
|
+
switch (variant) {
|
|
64
|
+
case "default":
|
|
65
|
+
return "text-foreground";
|
|
66
|
+
case "muted":
|
|
67
|
+
return "text-foreground/80";
|
|
68
|
+
case "subtle":
|
|
69
|
+
return "text-foreground/60";
|
|
70
|
+
case "accent":
|
|
71
|
+
return "text-accent-foreground";
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
switch (variant) {
|
|
75
|
+
case "default":
|
|
76
|
+
return "text-foreground";
|
|
77
|
+
case "muted":
|
|
78
|
+
return "text-muted-foreground";
|
|
79
|
+
case "subtle":
|
|
80
|
+
return "text-muted-foreground/70";
|
|
81
|
+
case "accent":
|
|
82
|
+
return "text-primary";
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
34
86
|
var maxWidthStyles = {
|
|
35
87
|
sm: "max-w-screen-sm",
|
|
36
88
|
md: "max-w-screen-md",
|
|
@@ -407,13 +459,14 @@ var Section = React3__namespace.default.forwardRef(
|
|
|
407
459
|
);
|
|
408
460
|
Section.displayName = "Section";
|
|
409
461
|
var TeamMemberBackgroundImageCard = React3__namespace.forwardRef(
|
|
410
|
-
({ className, imageUrl, imageAlt, children, optixFlowConfig, ...props }, ref) => {
|
|
462
|
+
({ className, imageUrl, imageAlt, children, optixFlowConfig, background, ...props }, ref) => {
|
|
411
463
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
412
464
|
"div",
|
|
413
465
|
{
|
|
414
466
|
ref,
|
|
415
467
|
className: cn(
|
|
416
|
-
"
|
|
468
|
+
getNestedCardBg(background, "card"),
|
|
469
|
+
"group h-[400px] relative w-full max-w-sm overflow-hidden rounded-xl border border-border shadow-lg",
|
|
417
470
|
"transition-all duration-300 ease-in-out",
|
|
418
471
|
className
|
|
419
472
|
),
|
|
@@ -464,6 +517,7 @@ function TeamMediaShowcase({
|
|
|
464
517
|
imageAlt,
|
|
465
518
|
className: member.cardClassName,
|
|
466
519
|
optixFlowConfig,
|
|
520
|
+
background,
|
|
467
521
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full flex-col justify-end p-6 text-card-foreground", children: [
|
|
468
522
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4 transition-transform duration-500 ease-in-out md:group-hover:-translate-y-12", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
469
523
|
member.name && typeof member.name === "string" && member.name.trim() !== "" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -502,7 +556,7 @@ function TeamMediaShowcase({
|
|
|
502
556
|
idx
|
|
503
557
|
);
|
|
504
558
|
});
|
|
505
|
-
}, [itemsSlot, items, optixFlowConfig, memberNameClassName, memberRoleClassName, actionClassName]);
|
|
559
|
+
}, [itemsSlot, items, optixFlowConfig, memberNameClassName, memberRoleClassName, actionClassName, background]);
|
|
506
560
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
507
561
|
Section,
|
|
508
562
|
{
|
|
@@ -518,7 +572,8 @@ function TeamMediaShowcase({
|
|
|
518
572
|
"div",
|
|
519
573
|
{
|
|
520
574
|
className: cn(
|
|
521
|
-
"
|
|
575
|
+
getTextColor(background, "muted"),
|
|
576
|
+
"text-md pt-8 uppercase tracking-[0.2em] font-semibold",
|
|
522
577
|
eyebrowClassName
|
|
523
578
|
),
|
|
524
579
|
children: listEyebrow
|
|
@@ -125,6 +125,10 @@ interface TeamMemberBackgroundImageCardProps extends React.HTMLAttributes<HTMLDi
|
|
|
125
125
|
* Optional Optix Flow configuration for @page-speed/img
|
|
126
126
|
*/
|
|
127
127
|
optixFlowConfig?: OptixFlowConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Background style variant for dynamic color utilities
|
|
130
|
+
*/
|
|
131
|
+
background?: SectionBackground;
|
|
128
132
|
}
|
|
129
133
|
/**
|
|
130
134
|
* TeamMemberBackgroundImageCard - Individual card with background image and hover effects
|
|
@@ -125,6 +125,10 @@ interface TeamMemberBackgroundImageCardProps extends React.HTMLAttributes<HTMLDi
|
|
|
125
125
|
* Optional Optix Flow configuration for @page-speed/img
|
|
126
126
|
*/
|
|
127
127
|
optixFlowConfig?: OptixFlowConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Background style variant for dynamic color utilities
|
|
130
|
+
*/
|
|
131
|
+
background?: SectionBackground;
|
|
128
132
|
}
|
|
129
133
|
/**
|
|
130
134
|
* TeamMemberBackgroundImageCard - Individual card with background image and hover effects
|
|
@@ -10,6 +10,58 @@ import { Img } from '@page-speed/img';
|
|
|
10
10
|
function cn(...inputs) {
|
|
11
11
|
return twMerge(clsx(inputs));
|
|
12
12
|
}
|
|
13
|
+
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
14
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
15
|
+
if (isDark) {
|
|
16
|
+
switch (variant) {
|
|
17
|
+
case "muted":
|
|
18
|
+
return "bg-background";
|
|
19
|
+
case "card":
|
|
20
|
+
return "bg-card";
|
|
21
|
+
case "accent":
|
|
22
|
+
return "bg-accent";
|
|
23
|
+
case "subtle":
|
|
24
|
+
return "bg-background/50";
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
switch (variant) {
|
|
28
|
+
case "muted":
|
|
29
|
+
return "bg-muted";
|
|
30
|
+
case "card":
|
|
31
|
+
return "bg-card";
|
|
32
|
+
case "accent":
|
|
33
|
+
return "bg-accent";
|
|
34
|
+
case "subtle":
|
|
35
|
+
return "bg-muted/50";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
40
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
41
|
+
if (isDark) {
|
|
42
|
+
switch (variant) {
|
|
43
|
+
case "default":
|
|
44
|
+
return "text-foreground";
|
|
45
|
+
case "muted":
|
|
46
|
+
return "text-foreground/80";
|
|
47
|
+
case "subtle":
|
|
48
|
+
return "text-foreground/60";
|
|
49
|
+
case "accent":
|
|
50
|
+
return "text-accent-foreground";
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
switch (variant) {
|
|
54
|
+
case "default":
|
|
55
|
+
return "text-foreground";
|
|
56
|
+
case "muted":
|
|
57
|
+
return "text-muted-foreground";
|
|
58
|
+
case "subtle":
|
|
59
|
+
return "text-muted-foreground/70";
|
|
60
|
+
case "accent":
|
|
61
|
+
return "text-primary";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
13
65
|
var maxWidthStyles = {
|
|
14
66
|
sm: "max-w-screen-sm",
|
|
15
67
|
md: "max-w-screen-md",
|
|
@@ -386,13 +438,14 @@ var Section = React3__default.forwardRef(
|
|
|
386
438
|
);
|
|
387
439
|
Section.displayName = "Section";
|
|
388
440
|
var TeamMemberBackgroundImageCard = React3.forwardRef(
|
|
389
|
-
({ className, imageUrl, imageAlt, children, optixFlowConfig, ...props }, ref) => {
|
|
441
|
+
({ className, imageUrl, imageAlt, children, optixFlowConfig, background, ...props }, ref) => {
|
|
390
442
|
return /* @__PURE__ */ jsxs(
|
|
391
443
|
"div",
|
|
392
444
|
{
|
|
393
445
|
ref,
|
|
394
446
|
className: cn(
|
|
395
|
-
"
|
|
447
|
+
getNestedCardBg(background, "card"),
|
|
448
|
+
"group h-[400px] relative w-full max-w-sm overflow-hidden rounded-xl border border-border shadow-lg",
|
|
396
449
|
"transition-all duration-300 ease-in-out",
|
|
397
450
|
className
|
|
398
451
|
),
|
|
@@ -443,6 +496,7 @@ function TeamMediaShowcase({
|
|
|
443
496
|
imageAlt,
|
|
444
497
|
className: member.cardClassName,
|
|
445
498
|
optixFlowConfig,
|
|
499
|
+
background,
|
|
446
500
|
children: /* @__PURE__ */ jsxs("div", { className: "relative flex h-full flex-col justify-end p-6 text-card-foreground", children: [
|
|
447
501
|
/* @__PURE__ */ jsx("div", { className: "space-y-4 transition-transform duration-500 ease-in-out md:group-hover:-translate-y-12", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
448
502
|
member.name && typeof member.name === "string" && member.name.trim() !== "" && /* @__PURE__ */ jsx(
|
|
@@ -481,7 +535,7 @@ function TeamMediaShowcase({
|
|
|
481
535
|
idx
|
|
482
536
|
);
|
|
483
537
|
});
|
|
484
|
-
}, [itemsSlot, items, optixFlowConfig, memberNameClassName, memberRoleClassName, actionClassName]);
|
|
538
|
+
}, [itemsSlot, items, optixFlowConfig, memberNameClassName, memberRoleClassName, actionClassName, background]);
|
|
485
539
|
return /* @__PURE__ */ jsxs(
|
|
486
540
|
Section,
|
|
487
541
|
{
|
|
@@ -497,7 +551,8 @@ function TeamMediaShowcase({
|
|
|
497
551
|
"div",
|
|
498
552
|
{
|
|
499
553
|
className: cn(
|
|
500
|
-
"
|
|
554
|
+
getTextColor(background, "muted"),
|
|
555
|
+
"text-md pt-8 uppercase tracking-[0.2em] font-semibold",
|
|
501
556
|
eyebrowClassName
|
|
502
557
|
),
|
|
503
558
|
children: listEyebrow
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { f as SectionBackground } from './community-initiatives-Bz_A5vLU.cjs';
|
|
2
3
|
import { T as TestimonialItem, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
3
5
|
import 'class-variance-authority';
|
|
4
6
|
import './button-variants-lRElsmTc.cjs';
|
|
5
7
|
import 'class-variance-authority/types';
|
|
@@ -74,6 +76,10 @@ interface TestimonialsCarouselImageProps {
|
|
|
74
76
|
* OptixFlow image optimization configuration
|
|
75
77
|
*/
|
|
76
78
|
optixFlowConfig?: OptixFlowConfig;
|
|
79
|
+
/**
|
|
80
|
+
* Background style for the section
|
|
81
|
+
*/
|
|
82
|
+
background?: SectionBackground;
|
|
77
83
|
}
|
|
78
84
|
/**
|
|
79
85
|
* TestimonialsCarouselImage - A full-width image carousel testimonial section with
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { f as SectionBackground } from './community-initiatives-Bi_ClKrO.js';
|
|
2
3
|
import { T as TestimonialItem, O as OptixFlowConfig } from './blocks-k17uluAz.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
3
5
|
import 'class-variance-authority';
|
|
4
6
|
import './button-variants-lRElsmTc.js';
|
|
5
7
|
import 'class-variance-authority/types';
|
|
@@ -74,6 +76,10 @@ interface TestimonialsCarouselImageProps {
|
|
|
74
76
|
* OptixFlow image optimization configuration
|
|
75
77
|
*/
|
|
76
78
|
optixFlowConfig?: OptixFlowConfig;
|
|
79
|
+
/**
|
|
80
|
+
* Background style for the section
|
|
81
|
+
*/
|
|
82
|
+
background?: SectionBackground;
|
|
77
83
|
}
|
|
78
84
|
/**
|
|
79
85
|
* TestimonialsCarouselImage - A full-width image carousel testimonial section with
|
package/dist/utils.cjs
CHANGED
|
@@ -52,8 +52,66 @@ function getNestedCardTextColor(parentBg, options) {
|
|
|
52
52
|
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
53
53
|
return isDark ? "text-foreground" : "";
|
|
54
54
|
}
|
|
55
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
56
|
+
if (options?.override) return options.override;
|
|
57
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
58
|
+
if (isDark) {
|
|
59
|
+
switch (variant) {
|
|
60
|
+
case "default":
|
|
61
|
+
return "text-foreground";
|
|
62
|
+
case "muted":
|
|
63
|
+
return "text-foreground/80";
|
|
64
|
+
case "subtle":
|
|
65
|
+
return "text-foreground/60";
|
|
66
|
+
case "accent":
|
|
67
|
+
return "text-accent-foreground";
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
switch (variant) {
|
|
71
|
+
case "default":
|
|
72
|
+
return "text-foreground";
|
|
73
|
+
case "muted":
|
|
74
|
+
return "text-muted-foreground";
|
|
75
|
+
case "subtle":
|
|
76
|
+
return "text-muted-foreground/70";
|
|
77
|
+
case "accent":
|
|
78
|
+
return "text-primary";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function getAccentColor(parentBg, options) {
|
|
83
|
+
if (options?.override) return options.override;
|
|
84
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
85
|
+
return isDark ? "text-accent-foreground" : "text-primary";
|
|
86
|
+
}
|
|
87
|
+
function getBorderColor(parentBg, variant = "default", options) {
|
|
88
|
+
if (options?.override) return options.override;
|
|
89
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
90
|
+
if (isDark) {
|
|
91
|
+
switch (variant) {
|
|
92
|
+
case "default":
|
|
93
|
+
return "border-foreground/20";
|
|
94
|
+
case "muted":
|
|
95
|
+
return "border-foreground/10";
|
|
96
|
+
case "accent":
|
|
97
|
+
return "border-accent-foreground";
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
switch (variant) {
|
|
101
|
+
case "default":
|
|
102
|
+
return "border-border";
|
|
103
|
+
case "muted":
|
|
104
|
+
return "border-muted";
|
|
105
|
+
case "accent":
|
|
106
|
+
return "border-primary";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
55
110
|
|
|
56
111
|
exports.BRIGHTNESS_CLASS_MAP = BRIGHTNESS_CLASS_MAP;
|
|
57
112
|
exports.cn = cn;
|
|
113
|
+
exports.getAccentColor = getAccentColor;
|
|
114
|
+
exports.getBorderColor = getBorderColor;
|
|
58
115
|
exports.getNestedCardBg = getNestedCardBg;
|
|
59
116
|
exports.getNestedCardTextColor = getNestedCardTextColor;
|
|
117
|
+
exports.getTextColor = getTextColor;
|
package/dist/utils.d.cts
CHANGED
|
@@ -111,5 +111,117 @@ declare function getNestedCardBg(parentBg?: SectionBackground, variant?: NestedC
|
|
|
111
111
|
declare function getNestedCardTextColor(parentBg?: SectionBackground, options?: {
|
|
112
112
|
override?: string;
|
|
113
113
|
}): string;
|
|
114
|
+
/**
|
|
115
|
+
* Text color variant types for dynamic theming
|
|
116
|
+
*/
|
|
117
|
+
type TextColorVariant = "default" | "muted" | "subtle" | "accent";
|
|
118
|
+
/**
|
|
119
|
+
* Get the appropriate text color class based on parent Section background.
|
|
120
|
+
*
|
|
121
|
+
* This utility provides **context-aware text coloring** that adapts to the parent
|
|
122
|
+
* Section's background to ensure optimal readability and visual hierarchy.
|
|
123
|
+
*
|
|
124
|
+
* **How it works:**
|
|
125
|
+
* - On **dark backgrounds** (dark, secondary, primary): Uses lighter text colors
|
|
126
|
+
* - On **light backgrounds** (default, white, gray, muted): Uses darker text colors
|
|
127
|
+
*
|
|
128
|
+
* **Variants:**
|
|
129
|
+
* - `default`: Primary text color (highest contrast)
|
|
130
|
+
* - `muted`: Secondary text color (medium contrast) - for descriptions, labels
|
|
131
|
+
* - `subtle`: Tertiary text color (lower contrast) - for captions, metadata
|
|
132
|
+
* - `accent`: Accent color - for emphasis, links, highlights
|
|
133
|
+
*
|
|
134
|
+
* @param parentBg - The parent Section's background variant
|
|
135
|
+
* @param variant - The type of text color to use (default: 'default')
|
|
136
|
+
* @param options - Optional configuration for manual override
|
|
137
|
+
* @returns Tailwind text color class string
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* // Muted text for descriptions
|
|
141
|
+
* <p className={getTextColor(background, 'muted')}>
|
|
142
|
+
* This is a description with reduced emphasis
|
|
143
|
+
* </p>
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* // Accent text for links
|
|
147
|
+
* <a className={getTextColor(background, 'accent')}>
|
|
148
|
+
* Learn more
|
|
149
|
+
* </a>
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* // Manual override
|
|
153
|
+
* <span className={getTextColor(background, 'default', { override: 'text-blue-600' })}>
|
|
154
|
+
* Custom color
|
|
155
|
+
* </span>
|
|
156
|
+
*/
|
|
157
|
+
declare function getTextColor(parentBg?: SectionBackground, variant?: TextColorVariant, options?: {
|
|
158
|
+
override?: string;
|
|
159
|
+
}): string;
|
|
160
|
+
/**
|
|
161
|
+
* Get the appropriate accent color class based on parent Section background.
|
|
162
|
+
*
|
|
163
|
+
* This utility provides **context-aware accent coloring** for icons, decorations,
|
|
164
|
+
* and emphasis elements that need to stand out from the background.
|
|
165
|
+
*
|
|
166
|
+
* **How it works:**
|
|
167
|
+
* - On **dark backgrounds**: Uses lighter accent colors for visibility
|
|
168
|
+
* - On **light backgrounds**: Uses primary brand color for emphasis
|
|
169
|
+
*
|
|
170
|
+
* @param parentBg - The parent Section's background variant
|
|
171
|
+
* @param options - Optional configuration for manual override
|
|
172
|
+
* @returns Tailwind text color class string (for icons/SVGs)
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* // Icon with dynamic accent color
|
|
176
|
+
* <DynamicIcon className={getAccentColor(background)} />
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* // Decorative element
|
|
180
|
+
* <div className={cn(getAccentColor(background), "absolute top-0 right-0")}>
|
|
181
|
+
* <CornerIllustration />
|
|
182
|
+
* </div>
|
|
183
|
+
*/
|
|
184
|
+
declare function getAccentColor(parentBg?: SectionBackground, options?: {
|
|
185
|
+
override?: string;
|
|
186
|
+
}): string;
|
|
187
|
+
/**
|
|
188
|
+
* Border color variant types for dynamic theming
|
|
189
|
+
*/
|
|
190
|
+
type BorderColorVariant = "default" | "muted" | "accent";
|
|
191
|
+
/**
|
|
192
|
+
* Get the appropriate border color class based on parent Section background.
|
|
193
|
+
*
|
|
194
|
+
* This utility provides **context-aware border coloring** that adapts to the parent
|
|
195
|
+
* Section's background to ensure borders remain visible and aesthetically pleasing.
|
|
196
|
+
*
|
|
197
|
+
* **How it works:**
|
|
198
|
+
* - On **dark backgrounds**: Uses lighter border colors for visibility
|
|
199
|
+
* - On **light backgrounds**: Uses subtle border colors for elegance
|
|
200
|
+
*
|
|
201
|
+
* **Variants:**
|
|
202
|
+
* - `default`: Standard border color (subtle, elegant)
|
|
203
|
+
* - `muted`: Very subtle border (minimal contrast)
|
|
204
|
+
* - `accent`: Accent-colored border (for emphasis)
|
|
205
|
+
*
|
|
206
|
+
* @param parentBg - The parent Section's background variant
|
|
207
|
+
* @param variant - The type of border color to use (default: 'default')
|
|
208
|
+
* @param options - Optional configuration for manual override
|
|
209
|
+
* @returns Tailwind border color class string
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* // Card with dynamic border
|
|
213
|
+
* <div className={cn(getBorderColor(background), "border rounded-lg p-6")}>
|
|
214
|
+
* Content
|
|
215
|
+
* </div>
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* // Accent border for emphasis
|
|
219
|
+
* <div className={cn(getBorderColor(background, 'accent'), "border-2 rounded-lg")}>
|
|
220
|
+
* Featured content
|
|
221
|
+
* </div>
|
|
222
|
+
*/
|
|
223
|
+
declare function getBorderColor(parentBg?: SectionBackground, variant?: BorderColorVariant, options?: {
|
|
224
|
+
override?: string;
|
|
225
|
+
}): string;
|
|
114
226
|
|
|
115
|
-
export { BRIGHTNESS_CLASS_MAP, type NestedCardBgOptions, type NestedCardVariant, cn, getNestedCardBg, getNestedCardTextColor };
|
|
227
|
+
export { BRIGHTNESS_CLASS_MAP, type BorderColorVariant, type NestedCardBgOptions, type NestedCardVariant, type TextColorVariant, cn, getAccentColor, getBorderColor, getNestedCardBg, getNestedCardTextColor, getTextColor };
|
package/dist/utils.d.ts
CHANGED
|
@@ -111,5 +111,117 @@ declare function getNestedCardBg(parentBg?: SectionBackground, variant?: NestedC
|
|
|
111
111
|
declare function getNestedCardTextColor(parentBg?: SectionBackground, options?: {
|
|
112
112
|
override?: string;
|
|
113
113
|
}): string;
|
|
114
|
+
/**
|
|
115
|
+
* Text color variant types for dynamic theming
|
|
116
|
+
*/
|
|
117
|
+
type TextColorVariant = "default" | "muted" | "subtle" | "accent";
|
|
118
|
+
/**
|
|
119
|
+
* Get the appropriate text color class based on parent Section background.
|
|
120
|
+
*
|
|
121
|
+
* This utility provides **context-aware text coloring** that adapts to the parent
|
|
122
|
+
* Section's background to ensure optimal readability and visual hierarchy.
|
|
123
|
+
*
|
|
124
|
+
* **How it works:**
|
|
125
|
+
* - On **dark backgrounds** (dark, secondary, primary): Uses lighter text colors
|
|
126
|
+
* - On **light backgrounds** (default, white, gray, muted): Uses darker text colors
|
|
127
|
+
*
|
|
128
|
+
* **Variants:**
|
|
129
|
+
* - `default`: Primary text color (highest contrast)
|
|
130
|
+
* - `muted`: Secondary text color (medium contrast) - for descriptions, labels
|
|
131
|
+
* - `subtle`: Tertiary text color (lower contrast) - for captions, metadata
|
|
132
|
+
* - `accent`: Accent color - for emphasis, links, highlights
|
|
133
|
+
*
|
|
134
|
+
* @param parentBg - The parent Section's background variant
|
|
135
|
+
* @param variant - The type of text color to use (default: 'default')
|
|
136
|
+
* @param options - Optional configuration for manual override
|
|
137
|
+
* @returns Tailwind text color class string
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* // Muted text for descriptions
|
|
141
|
+
* <p className={getTextColor(background, 'muted')}>
|
|
142
|
+
* This is a description with reduced emphasis
|
|
143
|
+
* </p>
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* // Accent text for links
|
|
147
|
+
* <a className={getTextColor(background, 'accent')}>
|
|
148
|
+
* Learn more
|
|
149
|
+
* </a>
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* // Manual override
|
|
153
|
+
* <span className={getTextColor(background, 'default', { override: 'text-blue-600' })}>
|
|
154
|
+
* Custom color
|
|
155
|
+
* </span>
|
|
156
|
+
*/
|
|
157
|
+
declare function getTextColor(parentBg?: SectionBackground, variant?: TextColorVariant, options?: {
|
|
158
|
+
override?: string;
|
|
159
|
+
}): string;
|
|
160
|
+
/**
|
|
161
|
+
* Get the appropriate accent color class based on parent Section background.
|
|
162
|
+
*
|
|
163
|
+
* This utility provides **context-aware accent coloring** for icons, decorations,
|
|
164
|
+
* and emphasis elements that need to stand out from the background.
|
|
165
|
+
*
|
|
166
|
+
* **How it works:**
|
|
167
|
+
* - On **dark backgrounds**: Uses lighter accent colors for visibility
|
|
168
|
+
* - On **light backgrounds**: Uses primary brand color for emphasis
|
|
169
|
+
*
|
|
170
|
+
* @param parentBg - The parent Section's background variant
|
|
171
|
+
* @param options - Optional configuration for manual override
|
|
172
|
+
* @returns Tailwind text color class string (for icons/SVGs)
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* // Icon with dynamic accent color
|
|
176
|
+
* <DynamicIcon className={getAccentColor(background)} />
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* // Decorative element
|
|
180
|
+
* <div className={cn(getAccentColor(background), "absolute top-0 right-0")}>
|
|
181
|
+
* <CornerIllustration />
|
|
182
|
+
* </div>
|
|
183
|
+
*/
|
|
184
|
+
declare function getAccentColor(parentBg?: SectionBackground, options?: {
|
|
185
|
+
override?: string;
|
|
186
|
+
}): string;
|
|
187
|
+
/**
|
|
188
|
+
* Border color variant types for dynamic theming
|
|
189
|
+
*/
|
|
190
|
+
type BorderColorVariant = "default" | "muted" | "accent";
|
|
191
|
+
/**
|
|
192
|
+
* Get the appropriate border color class based on parent Section background.
|
|
193
|
+
*
|
|
194
|
+
* This utility provides **context-aware border coloring** that adapts to the parent
|
|
195
|
+
* Section's background to ensure borders remain visible and aesthetically pleasing.
|
|
196
|
+
*
|
|
197
|
+
* **How it works:**
|
|
198
|
+
* - On **dark backgrounds**: Uses lighter border colors for visibility
|
|
199
|
+
* - On **light backgrounds**: Uses subtle border colors for elegance
|
|
200
|
+
*
|
|
201
|
+
* **Variants:**
|
|
202
|
+
* - `default`: Standard border color (subtle, elegant)
|
|
203
|
+
* - `muted`: Very subtle border (minimal contrast)
|
|
204
|
+
* - `accent`: Accent-colored border (for emphasis)
|
|
205
|
+
*
|
|
206
|
+
* @param parentBg - The parent Section's background variant
|
|
207
|
+
* @param variant - The type of border color to use (default: 'default')
|
|
208
|
+
* @param options - Optional configuration for manual override
|
|
209
|
+
* @returns Tailwind border color class string
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* // Card with dynamic border
|
|
213
|
+
* <div className={cn(getBorderColor(background), "border rounded-lg p-6")}>
|
|
214
|
+
* Content
|
|
215
|
+
* </div>
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* // Accent border for emphasis
|
|
219
|
+
* <div className={cn(getBorderColor(background, 'accent'), "border-2 rounded-lg")}>
|
|
220
|
+
* Featured content
|
|
221
|
+
* </div>
|
|
222
|
+
*/
|
|
223
|
+
declare function getBorderColor(parentBg?: SectionBackground, variant?: BorderColorVariant, options?: {
|
|
224
|
+
override?: string;
|
|
225
|
+
}): string;
|
|
114
226
|
|
|
115
|
-
export { BRIGHTNESS_CLASS_MAP, type NestedCardBgOptions, type NestedCardVariant, cn, getNestedCardBg, getNestedCardTextColor };
|
|
227
|
+
export { BRIGHTNESS_CLASS_MAP, type BorderColorVariant, type NestedCardBgOptions, type NestedCardVariant, type TextColorVariant, cn, getAccentColor, getBorderColor, getNestedCardBg, getNestedCardTextColor, getTextColor };
|
package/dist/utils.js
CHANGED
|
@@ -50,5 +50,60 @@ function getNestedCardTextColor(parentBg, options) {
|
|
|
50
50
|
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
51
51
|
return isDark ? "text-foreground" : "";
|
|
52
52
|
}
|
|
53
|
+
function getTextColor(parentBg, variant = "default", options) {
|
|
54
|
+
if (options?.override) return options.override;
|
|
55
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
56
|
+
if (isDark) {
|
|
57
|
+
switch (variant) {
|
|
58
|
+
case "default":
|
|
59
|
+
return "text-foreground";
|
|
60
|
+
case "muted":
|
|
61
|
+
return "text-foreground/80";
|
|
62
|
+
case "subtle":
|
|
63
|
+
return "text-foreground/60";
|
|
64
|
+
case "accent":
|
|
65
|
+
return "text-accent-foreground";
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
switch (variant) {
|
|
69
|
+
case "default":
|
|
70
|
+
return "text-foreground";
|
|
71
|
+
case "muted":
|
|
72
|
+
return "text-muted-foreground";
|
|
73
|
+
case "subtle":
|
|
74
|
+
return "text-muted-foreground/70";
|
|
75
|
+
case "accent":
|
|
76
|
+
return "text-primary";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function getAccentColor(parentBg, options) {
|
|
81
|
+
if (options?.override) return options.override;
|
|
82
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
83
|
+
return isDark ? "text-accent-foreground" : "text-primary";
|
|
84
|
+
}
|
|
85
|
+
function getBorderColor(parentBg, variant = "default", options) {
|
|
86
|
+
if (options?.override) return options.override;
|
|
87
|
+
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
88
|
+
if (isDark) {
|
|
89
|
+
switch (variant) {
|
|
90
|
+
case "default":
|
|
91
|
+
return "border-foreground/20";
|
|
92
|
+
case "muted":
|
|
93
|
+
return "border-foreground/10";
|
|
94
|
+
case "accent":
|
|
95
|
+
return "border-accent-foreground";
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
switch (variant) {
|
|
99
|
+
case "default":
|
|
100
|
+
return "border-border";
|
|
101
|
+
case "muted":
|
|
102
|
+
return "border-muted";
|
|
103
|
+
case "accent":
|
|
104
|
+
return "border-primary";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
53
108
|
|
|
54
|
-
export { BRIGHTNESS_CLASS_MAP, cn, getNestedCardBg, getNestedCardTextColor };
|
|
109
|
+
export { BRIGHTNESS_CLASS_MAP, cn, getAccentColor, getBorderColor, getNestedCardBg, getNestedCardTextColor, getTextColor };
|