@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.
package/dist/index.js CHANGED
@@ -2016,7 +2016,7 @@ function AboutMissionPrinciples({
2016
2016
  className,
2017
2017
  background,
2018
2018
  containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
2019
- spacing = "xl",
2019
+ spacing = "lg",
2020
2020
  pattern,
2021
2021
  patternOpacity
2022
2022
  }) {
@@ -2058,7 +2058,9 @@ function AboutMissionPrinciples({
2058
2058
  children: principles.map((principle, idx) => /* @__PURE__ */ jsxs(
2059
2059
  "div",
2060
2060
  {
2061
- className: cn("relative rounded-lg border p-6 transition-colors"),
2061
+ className: cn(
2062
+ "relative rounded-lg border p-6 bg-card text-card-foreground"
2063
+ ),
2062
2064
  children: [
2063
2065
  principle.number && /* @__PURE__ */ jsx(
2064
2066
  "div",
@@ -2071,7 +2073,7 @@ function AboutMissionPrinciples({
2071
2073
  }
2072
2074
  ),
2073
2075
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
2074
- principle.title && (typeof principle.title === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-xl font-bold", children: principle.title }) : principle.title),
2076
+ principle.title && (typeof principle.title === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-xl font-bold pr-10 text-pretty", children: principle.title }) : principle.title),
2075
2077
  principle.description && (typeof principle.description === "string" ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-lg", children: principle.description }) : principle.description)
2076
2078
  ] })
2077
2079
  ]
@@ -2140,11 +2142,11 @@ function AboutMissionPrinciples({
2140
2142
  {
2141
2143
  className: cn(
2142
2144
  "mt-6 md:mt-24 p-6 lg:p-12",
2143
- "bg-muted text-muted-foreground",
2144
- "rounded-xl shadow-lg border",
2145
+ "bg-accent text-accent-foreground",
2146
+ "rounded-xl shadow-xl border",
2145
2147
  visionClassName
2146
2148
  ),
2147
- children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-8 lg:grid-cols-3", children: [
2149
+ children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-4 md:gap-8 lg:grid-cols-3", children: [
2148
2150
  /* @__PURE__ */ jsxs("div", { className: "lg:col-span-2", children: [
2149
2151
  visionHeading && (typeof visionHeading === "string" ? /* @__PURE__ */ jsx(
2150
2152
  "h3",
@@ -2502,28 +2504,6 @@ function CommunityInitiatives({
2502
2504
  },
2503
2505
  []
2504
2506
  );
2505
- const actionsContent = useMemo(() => {
2506
- if (actionsSlot) return actionsSlot;
2507
- if (!actions || actions.length === 0) return null;
2508
- return /* @__PURE__ */ jsx(
2509
- "div",
2510
- {
2511
- className: cn("flex flex-wrap justify-center gap-4", actionsClassName),
2512
- children: actions.map((action, idx) => /* @__PURE__ */ jsx(
2513
- Pressable,
2514
- {
2515
- href: action.href,
2516
- onClick: action.onClick,
2517
- variant: action.variant || "default",
2518
- size: action.size || "lg",
2519
- asButton: true,
2520
- children: action.label
2521
- },
2522
- idx
2523
- ))
2524
- }
2525
- );
2526
- }, [actionsSlot, actions, actionsClassName]);
2527
2507
  const categoriesContent = useMemo(() => {
2528
2508
  if (categoriesSlot) return categoriesSlot;
2529
2509
  if (!categories || categories.length === 0) return null;
@@ -2545,22 +2525,27 @@ function CommunityInitiatives({
2545
2525
  children: categories.map((category) => /* @__PURE__ */ jsx("option", { value: category.id, children: category.title }, category.id))
2546
2526
  }
2547
2527
  ) }),
2548
- /* @__PURE__ */ jsx(TabsList, { className: "hidden h-auto grid-cols-4 p-1 md:grid", children: categories.map((category) => /* @__PURE__ */ jsx(
2528
+ /* @__PURE__ */ jsx(TabsList, { className: "hidden h-auto grid-cols-4 p-1 md:grid ring-2 ring-primary", children: categories.map((category) => /* @__PURE__ */ jsx(
2549
2529
  TabsTrigger,
2550
2530
  {
2551
2531
  value: category.id,
2552
- className: "px-3 py-2.5 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",
2532
+ className: cn(
2533
+ "px-3 py-2.5 cursor-pointer",
2534
+ "data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",
2535
+ "hover:bg-muted hover:text-muted-foreground",
2536
+ "transition-all duration-500"
2537
+ ),
2553
2538
  children: category.title
2554
2539
  },
2555
2540
  category.id
2556
2541
  )) })
2557
2542
  ] }),
2558
- /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-2xl text-left md:text-center", children: /* @__PURE__ */ jsx("p", { className: cn(getTextColor(background, "muted")), children: currentCategory?.description }) }),
2543
+ /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-2xl text-left md:text-center", children: /* @__PURE__ */ jsx("p", { className: "relative", children: currentCategory?.description }) }),
2559
2544
  categories.map((category) => /* @__PURE__ */ jsx(
2560
2545
  TabsContent,
2561
2546
  {
2562
2547
  value: category.id,
2563
- className: "space-y-12",
2548
+ className: "space-y-12 md:space-y-24",
2564
2549
  children: category.initiatives.map((initiative, index) => {
2565
2550
  const isEven = index % 2 === 0;
2566
2551
  return /* @__PURE__ */ jsxs(
@@ -2577,47 +2562,13 @@ function CommunityInitiatives({
2577
2562
  ),
2578
2563
  children: [
2579
2564
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2580
- /* @__PURE__ */ jsx(
2581
- "div",
2582
- {
2583
- className: cn(
2584
- "rounded-md p-2",
2585
- getNestedCardBg(background, "muted")
2586
- ),
2587
- children: /* @__PURE__ */ jsx(
2588
- DynamicIcon,
2589
- {
2590
- name: initiative.icon,
2591
- size: 24,
2592
- className: cn(getAccentColor(background))
2593
- }
2594
- )
2595
- }
2596
- ),
2565
+ /* @__PURE__ */ jsx("div", { className: cn("rounded-md p-2"), children: /* @__PURE__ */ jsx(DynamicIcon, { name: initiative.icon, size: 24 }) }),
2597
2566
  /* @__PURE__ */ jsx("h3", { className: "text-2xl font-bold", children: initiative.title })
2598
2567
  ] }),
2599
- /* @__PURE__ */ jsx("p", { className: cn(getTextColor(background, "muted")), children: initiative.description }),
2568
+ /* @__PURE__ */ jsx("p", { className: "relative", children: initiative.description }),
2600
2569
  initiative.metrics && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4 pt-2", children: initiative.metrics.map((metric, i) => /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
2601
- /* @__PURE__ */ jsx(
2602
- "div",
2603
- {
2604
- className: cn(
2605
- "text-2xl font-bold",
2606
- getAccentColor(background)
2607
- ),
2608
- children: metric.value
2609
- }
2610
- ),
2611
- /* @__PURE__ */ jsx(
2612
- "div",
2613
- {
2614
- className: cn(
2615
- "mt-1 text-xs",
2616
- getTextColor(background, "muted")
2617
- ),
2618
- children: metric.label
2619
- }
2620
- )
2570
+ /* @__PURE__ */ jsx("div", { className: cn("text-2xl font-bold"), children: metric.value }),
2571
+ /* @__PURE__ */ jsx("div", { className: cn("mt-1 text-xs"), children: metric.label })
2621
2572
  ] }, i)) })
2622
2573
  ]
2623
2574
  }
@@ -2629,7 +2580,7 @@ function CommunityInitiatives({
2629
2580
  "md:col-span-5",
2630
2581
  isEven ? "md:order-2" : "md:order-1"
2631
2582
  ),
2632
- children: /* @__PURE__ */ jsx("div", { className: "relative aspect-4/3 overflow-hidden rounded-xl", children: /* @__PURE__ */ jsx(
2583
+ children: /* @__PURE__ */ jsx("div", { className: "relative aspect-video overflow-hidden rounded-xl shadow-xl", children: /* @__PURE__ */ jsx(
2633
2584
  Img,
2634
2585
  {
2635
2586
  src: initiative.image,
@@ -2650,28 +2601,21 @@ function CommunityInitiatives({
2650
2601
  Card,
2651
2602
  {
2652
2603
  className: cn(
2653
- "flex h-full min-h-[280px] w-full items-center justify-center",
2654
- getNestedCardBg(background, "subtle")
2604
+ "flex h-full min-h-[280px] w-full items-center justify-center"
2655
2605
  ),
2656
- children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6 text-center", children: [
2606
+ children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6 text-center flex flex-col items-center gap-4", children: [
2657
2607
  /* @__PURE__ */ jsx(
2658
2608
  DynamicIcon,
2659
2609
  {
2660
2610
  name: initiative.icon,
2661
2611
  size: 64,
2662
2612
  className: cn(
2663
- "mx-auto mb-4",
2664
- getTextColor(background, "muted"),
2613
+ "mx-auto text-card-foreground",
2665
2614
  "opacity-50"
2666
2615
  )
2667
2616
  }
2668
2617
  ),
2669
- /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "mx-auto", children: [
2670
- "Learn more about our",
2671
- " ",
2672
- initiative.title.toLowerCase(),
2673
- " initiative"
2674
- ] })
2618
+ /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "mx-auto", children: initiative.title })
2675
2619
  ] })
2676
2620
  }
2677
2621
  )
@@ -2712,7 +2656,7 @@ function CommunityInitiatives({
2712
2656
  "div",
2713
2657
  {
2714
2658
  className: cn(
2715
- "mx-auto mb-8 md:mb-16 max-w-3xl space-y-4 text-center",
2659
+ "mx-auto mb-8 md:mb-16 max-w-3xl space-y-4 flex flex-col items-center",
2716
2660
  headerClassName
2717
2661
  ),
2718
2662
  children: [
@@ -2721,41 +2665,65 @@ function CommunityInitiatives({
2721
2665
  "h2",
2722
2666
  {
2723
2667
  className: cn(
2724
- "text-3xl font-bold tracking-tight md:text-4xl",
2668
+ "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl text-balance text-center",
2725
2669
  headingClassName
2726
2670
  ),
2727
2671
  children: heading
2728
2672
  }
2729
2673
  ) : heading),
2730
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn(descriptionClassName), children: description }) : description)
2674
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
2675
+ "p",
2676
+ {
2677
+ className: cn(
2678
+ "text-lg text-balance text-center",
2679
+ descriptionClassName
2680
+ ),
2681
+ children: description
2682
+ }
2683
+ ) : description)
2731
2684
  ]
2732
2685
  }
2733
2686
  ),
2734
2687
  categoriesContent,
2735
- /* @__PURE__ */ jsxs("div", { className: cn("mt-20 text-center", ctaClassName), children: [
2736
- ctaBadgeText && /* @__PURE__ */ jsx(
2737
- "div",
2738
- {
2739
- className: cn(
2740
- "mb-8 inline-flex items-center justify-center rounded-full p-1"
2741
- ),
2742
- children: /* @__PURE__ */ jsx(Badge, { className: "rounded-full bg-primary px-4 py-1 text-primary-foreground", children: ctaBadgeText })
2743
- }
2744
- ),
2745
- ctaHeading && (typeof ctaHeading === "string" ? /* @__PURE__ */ jsx("h3", { className: cn("mb-4 text-2xl font-bold", ctaHeadingClassName), children: ctaHeading }) : ctaHeading),
2746
- ctaDescription && (typeof ctaDescription === "string" ? /* @__PURE__ */ jsx(
2747
- "p",
2748
- {
2749
- className: cn(
2750
- "mx-auto mb-8 max-w-2xl",
2751
- getTextColor(background, "muted"),
2752
- ctaDescriptionClassName
2688
+ /* @__PURE__ */ jsxs(
2689
+ "div",
2690
+ {
2691
+ className: cn(
2692
+ "mt-10 md:mt-24 p-6 md:p-16",
2693
+ "text-center flex flex-col items-center",
2694
+ "bg-muted text-muted-foreground",
2695
+ "rounded-2xl shadow-lg",
2696
+ ctaClassName
2697
+ ),
2698
+ children: [
2699
+ ctaBadgeText && /* @__PURE__ */ jsx(
2700
+ "div",
2701
+ {
2702
+ className: cn(
2703
+ "mb-8 inline-flex items-center justify-center rounded-full p-1"
2704
+ ),
2705
+ children: /* @__PURE__ */ jsx(Badge, { className: "rounded-full bg-primary px-4 py-1 text-primary-foreground", children: ctaBadgeText })
2706
+ }
2753
2707
  ),
2754
- children: ctaDescription
2755
- }
2756
- ) : ctaDescription),
2757
- actionsContent
2758
- ] })
2708
+ ctaHeading && (typeof ctaHeading === "string" ? /* @__PURE__ */ jsx("h3", { className: cn("mb-4 text-2xl font-bold", ctaHeadingClassName), children: ctaHeading }) : ctaHeading),
2709
+ ctaDescription && (typeof ctaDescription === "string" ? /* @__PURE__ */ jsx(
2710
+ "p",
2711
+ {
2712
+ className: cn("mx-auto mb-8 max-w-2xl", ctaDescriptionClassName),
2713
+ children: ctaDescription
2714
+ }
2715
+ ) : ctaDescription),
2716
+ /* @__PURE__ */ jsx(
2717
+ BlockActions,
2718
+ {
2719
+ actions,
2720
+ actionsSlot,
2721
+ actionsClassName
2722
+ }
2723
+ )
2724
+ ]
2725
+ }
2726
+ )
2759
2727
  ]
2760
2728
  }
2761
2729
  );