@opensite/ui 2.3.7 → 2.3.9

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.
@@ -75,36 +75,6 @@ function getNestedCardTextColor(parentBg, options) {
75
75
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
76
76
  return isDark ? "text-foreground" : "";
77
77
  }
78
- function getTextColor(parentBg, variant = "default", options) {
79
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
80
- if (isDark) {
81
- switch (variant) {
82
- case "default":
83
- return "text-foreground";
84
- case "muted":
85
- return "text-foreground/80";
86
- case "subtle":
87
- return "text-foreground/60";
88
- case "accent":
89
- return "text-accent-foreground";
90
- }
91
- } else {
92
- switch (variant) {
93
- case "default":
94
- return "text-foreground";
95
- case "muted":
96
- return "text-muted-foreground";
97
- case "subtle":
98
- return "text-muted-foreground/70";
99
- case "accent":
100
- return "text-primary";
101
- }
102
- }
103
- }
104
- function getAccentColor(parentBg, options) {
105
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
106
- return isDark ? "text-accent-foreground" : "text-primary";
107
- }
108
78
  var maxWidthStyles = {
109
79
  sm: "max-w-screen-sm",
110
80
  md: "max-w-screen-md",
@@ -2007,7 +1977,7 @@ function AboutMissionPrinciples({
2007
1977
  className,
2008
1978
  background,
2009
1979
  containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
2010
- spacing = "xl",
1980
+ spacing = "lg",
2011
1981
  pattern,
2012
1982
  patternOpacity
2013
1983
  }) {
@@ -2049,7 +2019,9 @@ function AboutMissionPrinciples({
2049
2019
  children: principles.map((principle, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
2050
2020
  "div",
2051
2021
  {
2052
- className: cn("relative rounded-lg border p-6 transition-colors"),
2022
+ className: cn(
2023
+ "relative rounded-lg border p-6 bg-card text-card-foreground"
2024
+ ),
2053
2025
  children: [
2054
2026
  principle.number && /* @__PURE__ */ jsxRuntime.jsx(
2055
2027
  "div",
@@ -2062,7 +2034,7 @@ function AboutMissionPrinciples({
2062
2034
  }
2063
2035
  ),
2064
2036
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
2065
- principle.title && (typeof principle.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-bold", children: principle.title }) : principle.title),
2037
+ principle.title && (typeof principle.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-bold pr-10 text-pretty", children: principle.title }) : principle.title),
2066
2038
  principle.description && (typeof principle.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-pretty text-lg", children: principle.description }) : principle.description)
2067
2039
  ] })
2068
2040
  ]
@@ -2131,11 +2103,11 @@ function AboutMissionPrinciples({
2131
2103
  {
2132
2104
  className: cn(
2133
2105
  "mt-6 md:mt-24 p-6 lg:p-12",
2134
- "bg-muted text-muted-foreground",
2135
- "rounded-xl shadow-lg border",
2106
+ "bg-accent text-accent-foreground",
2107
+ "rounded-xl shadow-xl border",
2136
2108
  visionClassName
2137
2109
  ),
2138
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-center gap-8 lg:grid-cols-3", children: [
2110
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 items-center gap-4 md:gap-8 lg:grid-cols-3", children: [
2139
2111
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-2", children: [
2140
2112
  visionHeading && (typeof visionHeading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
2141
2113
  "h3",
@@ -2493,28 +2465,6 @@ function CommunityInitiatives({
2493
2465
  },
2494
2466
  []
2495
2467
  );
2496
- const actionsContent = React4.useMemo(() => {
2497
- if (actionsSlot) return actionsSlot;
2498
- if (!actions || actions.length === 0) return null;
2499
- return /* @__PURE__ */ jsxRuntime.jsx(
2500
- "div",
2501
- {
2502
- className: cn("flex flex-wrap justify-center gap-4", actionsClassName),
2503
- children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
2504
- Pressable,
2505
- {
2506
- href: action.href,
2507
- onClick: action.onClick,
2508
- variant: action.variant || "default",
2509
- size: action.size || "lg",
2510
- asButton: true,
2511
- children: action.label
2512
- },
2513
- idx
2514
- ))
2515
- }
2516
- );
2517
- }, [actionsSlot, actions, actionsClassName]);
2518
2468
  const categoriesContent = React4.useMemo(() => {
2519
2469
  if (categoriesSlot) return categoriesSlot;
2520
2470
  if (!categories || categories.length === 0) return null;
@@ -2536,22 +2486,27 @@ function CommunityInitiatives({
2536
2486
  children: categories.map((category) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: category.id, children: category.title }, category.id))
2537
2487
  }
2538
2488
  ) }),
2539
- /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "hidden h-auto grid-cols-4 p-1 md:grid", children: categories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(
2489
+ /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "hidden h-auto grid-cols-4 p-1 md:grid ring-2 ring-primary", children: categories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(
2540
2490
  TabsTrigger,
2541
2491
  {
2542
2492
  value: category.id,
2543
- className: "px-3 py-2.5 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",
2493
+ className: cn(
2494
+ "px-3 py-2.5 cursor-pointer",
2495
+ "data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",
2496
+ "hover:bg-muted hover:text-muted-foreground",
2497
+ "transition-all duration-500"
2498
+ ),
2544
2499
  children: category.title
2545
2500
  },
2546
2501
  category.id
2547
2502
  )) })
2548
2503
  ] }),
2549
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-2xl text-left md:text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(getTextColor(background, "muted")), children: currentCategory?.description }) }),
2504
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-2xl text-left md:text-center", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "relative", children: currentCategory?.description }) }),
2550
2505
  categories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(
2551
2506
  TabsContent,
2552
2507
  {
2553
2508
  value: category.id,
2554
- className: "space-y-12",
2509
+ className: "space-y-12 md:space-y-24",
2555
2510
  children: category.initiatives.map((initiative, index) => {
2556
2511
  const isEven = index % 2 === 0;
2557
2512
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2568,47 +2523,13 @@ function CommunityInitiatives({
2568
2523
  ),
2569
2524
  children: [
2570
2525
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2571
- /* @__PURE__ */ jsxRuntime.jsx(
2572
- "div",
2573
- {
2574
- className: cn(
2575
- "rounded-md p-2",
2576
- getNestedCardBg(background, "muted")
2577
- ),
2578
- children: /* @__PURE__ */ jsxRuntime.jsx(
2579
- DynamicIcon,
2580
- {
2581
- name: initiative.icon,
2582
- size: 24,
2583
- className: cn(getAccentColor(background))
2584
- }
2585
- )
2586
- }
2587
- ),
2526
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md p-2"), children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: initiative.icon, size: 24 }) }),
2588
2527
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-bold", children: initiative.title })
2589
2528
  ] }),
2590
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(getTextColor(background, "muted")), children: initiative.description }),
2529
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "relative", children: initiative.description }),
2591
2530
  initiative.metrics && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-4 pt-2", children: initiative.metrics.map((metric, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
2592
- /* @__PURE__ */ jsxRuntime.jsx(
2593
- "div",
2594
- {
2595
- className: cn(
2596
- "text-2xl font-bold",
2597
- getAccentColor(background)
2598
- ),
2599
- children: metric.value
2600
- }
2601
- ),
2602
- /* @__PURE__ */ jsxRuntime.jsx(
2603
- "div",
2604
- {
2605
- className: cn(
2606
- "mt-1 text-xs",
2607
- getTextColor(background, "muted")
2608
- ),
2609
- children: metric.label
2610
- }
2611
- )
2531
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-2xl font-bold"), children: metric.value }),
2532
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-1 text-xs"), children: metric.label })
2612
2533
  ] }, i)) })
2613
2534
  ]
2614
2535
  }
@@ -2620,7 +2541,7 @@ function CommunityInitiatives({
2620
2541
  "md:col-span-5",
2621
2542
  isEven ? "md:order-2" : "md:order-1"
2622
2543
  ),
2623
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-4/3 overflow-hidden rounded-xl", children: /* @__PURE__ */ jsxRuntime.jsx(
2544
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video overflow-hidden rounded-xl shadow-xl", children: /* @__PURE__ */ jsxRuntime.jsx(
2624
2545
  img.Img,
2625
2546
  {
2626
2547
  src: initiative.image,
@@ -2641,28 +2562,21 @@ function CommunityInitiatives({
2641
2562
  Card,
2642
2563
  {
2643
2564
  className: cn(
2644
- "flex h-full min-h-[280px] w-full items-center justify-center",
2645
- getNestedCardBg(background, "subtle")
2565
+ "flex h-full min-h-[280px] w-full items-center justify-center"
2646
2566
  ),
2647
- children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-6 text-center", children: [
2567
+ children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "p-6 text-center flex flex-col items-center gap-4", children: [
2648
2568
  /* @__PURE__ */ jsxRuntime.jsx(
2649
2569
  DynamicIcon,
2650
2570
  {
2651
2571
  name: initiative.icon,
2652
2572
  size: 64,
2653
2573
  className: cn(
2654
- "mx-auto mb-4",
2655
- getTextColor(background, "muted"),
2574
+ "mx-auto text-card-foreground",
2656
2575
  "opacity-50"
2657
2576
  )
2658
2577
  }
2659
2578
  ),
2660
- /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className: "mx-auto", children: [
2661
- "Learn more about our",
2662
- " ",
2663
- initiative.title.toLowerCase(),
2664
- " initiative"
2665
- ] })
2579
+ /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "secondary", className: "mx-auto", children: initiative.title })
2666
2580
  ] })
2667
2581
  }
2668
2582
  )
@@ -2703,7 +2617,7 @@ function CommunityInitiatives({
2703
2617
  "div",
2704
2618
  {
2705
2619
  className: cn(
2706
- "mx-auto mb-8 md:mb-16 max-w-3xl space-y-4 text-center",
2620
+ "mx-auto mb-8 md:mb-16 max-w-3xl space-y-4 flex flex-col items-center",
2707
2621
  headerClassName
2708
2622
  ),
2709
2623
  children: [
@@ -2712,41 +2626,65 @@ function CommunityInitiatives({
2712
2626
  "h2",
2713
2627
  {
2714
2628
  className: cn(
2715
- "text-3xl font-bold tracking-tight md:text-4xl",
2629
+ "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance text-center",
2716
2630
  headingClassName
2717
2631
  ),
2718
2632
  children: heading
2719
2633
  }
2720
2634
  ) : heading),
2721
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(descriptionClassName), children: description }) : description)
2635
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
2636
+ "p",
2637
+ {
2638
+ className: cn(
2639
+ "text-lg text-balance text-center",
2640
+ descriptionClassName
2641
+ ),
2642
+ children: description
2643
+ }
2644
+ ) : description)
2722
2645
  ]
2723
2646
  }
2724
2647
  ),
2725
2648
  categoriesContent,
2726
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-20 text-center", ctaClassName), children: [
2727
- ctaBadgeText && /* @__PURE__ */ jsxRuntime.jsx(
2728
- "div",
2729
- {
2730
- className: cn(
2731
- "mb-8 inline-flex items-center justify-center rounded-full p-1"
2732
- ),
2733
- children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "rounded-full bg-primary px-4 py-1 text-primary-foreground", children: ctaBadgeText })
2734
- }
2735
- ),
2736
- ctaHeading && (typeof ctaHeading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 text-2xl font-bold", ctaHeadingClassName), children: ctaHeading }) : ctaHeading),
2737
- ctaDescription && (typeof ctaDescription === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
2738
- "p",
2739
- {
2740
- className: cn(
2741
- "mx-auto mb-8 max-w-2xl",
2742
- getTextColor(background, "muted"),
2743
- ctaDescriptionClassName
2649
+ /* @__PURE__ */ jsxRuntime.jsxs(
2650
+ "div",
2651
+ {
2652
+ className: cn(
2653
+ "mt-10 md:mt-24 p-6 md:p-16",
2654
+ "text-center flex flex-col items-center",
2655
+ "bg-muted text-muted-foreground",
2656
+ "rounded-2xl shadow-lg",
2657
+ ctaClassName
2658
+ ),
2659
+ children: [
2660
+ ctaBadgeText && /* @__PURE__ */ jsxRuntime.jsx(
2661
+ "div",
2662
+ {
2663
+ className: cn(
2664
+ "mb-8 inline-flex items-center justify-center rounded-full p-1"
2665
+ ),
2666
+ children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { className: "rounded-full bg-primary px-4 py-1 text-primary-foreground", children: ctaBadgeText })
2667
+ }
2744
2668
  ),
2745
- children: ctaDescription
2746
- }
2747
- ) : ctaDescription),
2748
- actionsContent
2749
- ] })
2669
+ ctaHeading && (typeof ctaHeading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-4 text-2xl font-bold", ctaHeadingClassName), children: ctaHeading }) : ctaHeading),
2670
+ ctaDescription && (typeof ctaDescription === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
2671
+ "p",
2672
+ {
2673
+ className: cn("mx-auto mb-8 max-w-2xl", ctaDescriptionClassName),
2674
+ children: ctaDescription
2675
+ }
2676
+ ) : ctaDescription),
2677
+ /* @__PURE__ */ jsxRuntime.jsx(
2678
+ BlockActions,
2679
+ {
2680
+ actions,
2681
+ actionsSlot,
2682
+ actionsClassName
2683
+ }
2684
+ )
2685
+ ]
2686
+ }
2687
+ )
2750
2688
  ]
2751
2689
  }
2752
2690
  );