@bison-lab/ui 1.13.0 → 1.14.0

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.mjs CHANGED
@@ -6,8 +6,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { AnimatePresence, motion } from "motion/react";
7
7
  import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, ContextMenu as ContextMenu$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1, unstable_PasswordToggleField } from "radix-ui";
8
8
  import { cva } from "class-variance-authority";
9
- import { AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bold, Calendar as Calendar$1, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CircleHelp, CircleX, Code, Eye, EyeOff, FastForward, FileQuestion, Heading1, Heading2, Heading3, Image, Inbox, Info, Italic, Link, List, ListOrdered, LoaderCircle, LogOut, Mail, MapPin, Menu, Minus, MoreHorizontal, MoveUpRight, PanelLeft, Pause, Pencil, Phone, Play, Plus, Quote, Redo, Search, Server, Settings2, ShieldAlert, Star, Strikethrough, TriangleAlert, Underline, Undo, Unlink, Wrench, X } from "lucide-react";
9
+ import { AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bold, Calendar as Calendar$1, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CircleHelp, CircleX, Code, Eye, EyeOff, Facebook, FastForward, FileQuestion, Heading1, Heading2, Heading3, Image, Inbox, Info, Instagram, Italic, Link, Linkedin, List, ListOrdered, LoaderCircle, LogOut, Mail, MapPin, Menu, Minus, MoreHorizontal, MoveUpRight, PanelLeft, Pause, Pencil, Phone, Play, Plus, Quote, Redo, Search, Server, Settings2, ShieldAlert, Star, Strikethrough, TriangleAlert, Twitter, Underline, Undo, Unlink, Wrench, X, Youtube } from "lucide-react";
10
10
  import { DayPicker } from "react-day-picker";
11
+ import useEmblaCarousel from "embla-carousel-react";
11
12
  import { endOfMonth, endOfWeek, format, startOfMonth, startOfWeek, startOfYear, subDays, subMonths, subYears } from "date-fns";
12
13
  import { EditorContent, useEditor } from "@tiptap/react";
13
14
  import StarterKit from "@tiptap/starter-kit";
@@ -1452,6 +1453,131 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
1452
1453
  };
1453
1454
  Calendar.displayName = "Calendar";
1454
1455
  //#endregion
1456
+ //#region src/components/carousel.tsx
1457
+ const CarouselContext = React.createContext(null);
1458
+ function useCarousel() {
1459
+ const context = React.useContext(CarouselContext);
1460
+ if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1461
+ return context;
1462
+ }
1463
+ const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
1464
+ const [carouselRef, api] = useEmblaCarousel({
1465
+ ...opts,
1466
+ axis: orientation === "horizontal" ? "x" : "y"
1467
+ }, plugins);
1468
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1469
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
1470
+ const onSelect = React.useCallback((emblaApi) => {
1471
+ if (!emblaApi) return;
1472
+ setCanScrollPrev(emblaApi.canScrollPrev());
1473
+ setCanScrollNext(emblaApi.canScrollNext());
1474
+ }, []);
1475
+ const scrollPrev = React.useCallback(() => {
1476
+ api?.scrollPrev();
1477
+ }, [api]);
1478
+ const scrollNext = React.useCallback(() => {
1479
+ api?.scrollNext();
1480
+ }, [api]);
1481
+ const handleKeyDown = React.useCallback((event) => {
1482
+ if (event.key === "ArrowLeft") {
1483
+ event.preventDefault();
1484
+ scrollPrev();
1485
+ } else if (event.key === "ArrowRight") {
1486
+ event.preventDefault();
1487
+ scrollNext();
1488
+ }
1489
+ }, [scrollPrev, scrollNext]);
1490
+ React.useEffect(() => {
1491
+ if (api && setApi) setApi(api);
1492
+ }, [api, setApi]);
1493
+ React.useEffect(() => {
1494
+ if (!api) return;
1495
+ onSelect(api);
1496
+ api.on("reInit", onSelect);
1497
+ api.on("select", onSelect);
1498
+ return () => {
1499
+ api.off("reInit", onSelect);
1500
+ api.off("select", onSelect);
1501
+ };
1502
+ }, [api, onSelect]);
1503
+ return /* @__PURE__ */ jsx(CarouselContext.Provider, {
1504
+ value: {
1505
+ carouselRef,
1506
+ api,
1507
+ opts,
1508
+ orientation,
1509
+ scrollPrev,
1510
+ scrollNext,
1511
+ canScrollPrev,
1512
+ canScrollNext
1513
+ },
1514
+ children: /* @__PURE__ */ jsx("div", {
1515
+ ref,
1516
+ onKeyDownCapture: handleKeyDown,
1517
+ className: cn("relative", className),
1518
+ role: "region",
1519
+ "aria-roledescription": "carousel",
1520
+ ...props,
1521
+ children
1522
+ })
1523
+ });
1524
+ });
1525
+ Carousel.displayName = "Carousel";
1526
+ const CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
1527
+ const { carouselRef, orientation } = useCarousel();
1528
+ return /* @__PURE__ */ jsx("div", {
1529
+ ref: carouselRef,
1530
+ className: "overflow-hidden",
1531
+ children: /* @__PURE__ */ jsx("div", {
1532
+ ref,
1533
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
1534
+ ...props
1535
+ })
1536
+ });
1537
+ });
1538
+ CarouselContent.displayName = "CarouselContent";
1539
+ const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
1540
+ const { orientation } = useCarousel();
1541
+ return /* @__PURE__ */ jsx("div", {
1542
+ ref,
1543
+ role: "group",
1544
+ "aria-roledescription": "slide",
1545
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
1546
+ ...props
1547
+ });
1548
+ });
1549
+ CarouselItem.displayName = "CarouselItem";
1550
+ const CarouselPrevious = React.forwardRef(({ className, variant = "outline", size = "icon", icon, label, ...props }, ref) => {
1551
+ const { scrollPrev, canScrollPrev } = useCarousel();
1552
+ return /* @__PURE__ */ jsx(Button, {
1553
+ ref,
1554
+ variant,
1555
+ size,
1556
+ className: cn("shrink-0 rounded-full", className),
1557
+ disabled: !canScrollPrev,
1558
+ onClick: scrollPrev,
1559
+ "aria-label": label ?? "Previous slide",
1560
+ ...props,
1561
+ children: icon ?? /* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" })
1562
+ });
1563
+ });
1564
+ CarouselPrevious.displayName = "CarouselPrevious";
1565
+ const CarouselNext = React.forwardRef(({ className, variant = "outline", size = "icon", icon, label, ...props }, ref) => {
1566
+ const { scrollNext, canScrollNext } = useCarousel();
1567
+ return /* @__PURE__ */ jsx(Button, {
1568
+ ref,
1569
+ variant,
1570
+ size,
1571
+ className: cn("shrink-0 rounded-full", className),
1572
+ disabled: !canScrollNext,
1573
+ onClick: scrollNext,
1574
+ "aria-label": label ?? "Next slide",
1575
+ ...props,
1576
+ children: icon ?? /* @__PURE__ */ jsx(ArrowRight, { className: "size-4" })
1577
+ });
1578
+ });
1579
+ CarouselNext.displayName = "CarouselNext";
1580
+ //#endregion
1455
1581
  //#region src/components/popover.tsx
1456
1582
  const Popover = Popover$1.Root;
1457
1583
  const PopoverTrigger = Popover$1.Trigger;
@@ -6809,7 +6935,7 @@ const FAQColumnsBlock = React.forwardRef(({ items, title, description, eyebrow,
6809
6935
  FAQColumnsBlock.displayName = "FAQColumnsBlock";
6810
6936
  //#endregion
6811
6937
  //#region src/blocks/marketing/reviews-block.tsx
6812
- function initials$2(name) {
6938
+ function initials$1(name) {
6813
6939
  return name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
6814
6940
  }
6815
6941
  const SKELETON_CARDS = 4;
@@ -6909,7 +7035,7 @@ const ReviewsBlock = React.forwardRef(({ reviews, averageRating, totalReviews, t
6909
7035
  alt: review.author.name
6910
7036
  }), /* @__PURE__ */ jsx(AvatarFallback, {
6911
7037
  className: "text-xs",
6912
- children: initials$2(review.author.name)
7038
+ children: initials$1(review.author.name)
6913
7039
  })]
6914
7040
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
6915
7041
  className: "flex items-center gap-1.5",
@@ -6943,10 +7069,13 @@ const ReviewsBlock = React.forwardRef(({ reviews, averageRating, totalReviews, t
6943
7069
  });
6944
7070
  ReviewsBlock.displayName = "ReviewsBlock";
6945
7071
  //#endregion
6946
- //#region src/blocks/marketing/testimonial-masonry-block.tsx
6947
- function initials$1(name) {
7072
+ //#region src/blocks/marketing/testimonial-types.ts
7073
+ /** Two-letter initials fallback used when a testimonial has no avatar image. */
7074
+ function testimonialInitials(name) {
6948
7075
  return name.split(" ").map((part) => part[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
6949
7076
  }
7077
+ //#endregion
7078
+ //#region src/blocks/marketing/testimonial-masonry-block.tsx
6950
7079
  function groupCardsByRow(cards) {
6951
7080
  const rows = /* @__PURE__ */ new Map();
6952
7081
  for (const card of cards) {
@@ -7052,7 +7181,7 @@ const TestimonialMasonry = React.forwardRef(({ items, title, description, eyebro
7052
7181
  alt: item.author.name
7053
7182
  }) : null, /* @__PURE__ */ jsx(AvatarFallback, {
7054
7183
  className: "text-xs",
7055
- children: initials$1(item.author.name)
7184
+ children: testimonialInitials(item.author.name)
7056
7185
  })] })
7057
7186
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
7058
7187
  className: cn("mb-0.5 text-base font-medium leading-tight", authorNameClassName),
@@ -7087,6 +7216,101 @@ const TestimonialMasonry = React.forwardRef(({ items, title, description, eyebro
7087
7216
  });
7088
7217
  TestimonialMasonry.displayName = "TestimonialMasonry";
7089
7218
  //#endregion
7219
+ //#region src/blocks/marketing/testimonial-carousel-block.tsx
7220
+ const TestimonialCarousel = React.forwardRef(({ items, title, description, eyebrow, loop = false, slidesToScroll = 1, previousButton, nextButton, hideControls = false, containerClassName, headerClassName, headerCopyClassName, eyebrowClassName, titleClassName, descriptionClassName, controlsClassName, carouselClassName, slideClassName, cardClassName, contentClassName, authorNameClassName, authorTitleClassName, avatarClassName, className, ...props }, ref) => {
7221
+ const headingId = React.useId();
7222
+ return /* @__PURE__ */ jsx("section", {
7223
+ ref,
7224
+ "aria-labelledby": props["aria-label"] ? void 0 : headingId,
7225
+ className: cn("px-6 lg:px-0", className),
7226
+ ...props,
7227
+ children: /* @__PURE__ */ jsx("div", {
7228
+ className: cn("mx-auto max-w-6xl px-0 py-16 sm:py-20 md:px-6 md:py-28", containerClassName),
7229
+ children: /* @__PURE__ */ jsxs(Carousel, {
7230
+ opts: {
7231
+ loop,
7232
+ slidesToScroll,
7233
+ align: "start"
7234
+ },
7235
+ className: cn("w-full", carouselClassName),
7236
+ children: [/* @__PURE__ */ jsxs("div", {
7237
+ className: cn("mb-8 flex flex-col gap-6 md:mb-12 md:flex-row md:items-end md:justify-between", headerClassName),
7238
+ children: [/* @__PURE__ */ jsxs("div", {
7239
+ className: cn("min-w-0 flex-1 max-w-2xl", headerCopyClassName),
7240
+ children: [
7241
+ eyebrow != null ? typeof eyebrow === "string" ? /* @__PURE__ */ jsx("p", {
7242
+ className: cn("mb-4 text-sm font-normal leading-tight text-muted-foreground sm:text-base", eyebrowClassName),
7243
+ children: eyebrow
7244
+ }) : /* @__PURE__ */ jsx("div", {
7245
+ className: cn("mb-4", eyebrowClassName),
7246
+ children: eyebrow
7247
+ }) : null,
7248
+ /* @__PURE__ */ jsx("h2", {
7249
+ id: headingId,
7250
+ className: cn("text-balance text-3xl font-medium leading-tight tracking-tight sm:text-4xl md:text-5xl", titleClassName),
7251
+ children: title
7252
+ }),
7253
+ description ? /* @__PURE__ */ jsx("p", {
7254
+ className: cn("mt-4 text-base font-normal text-muted-foreground sm:text-lg", descriptionClassName),
7255
+ children: description
7256
+ }) : null
7257
+ ]
7258
+ }), hideControls ? null : /* @__PURE__ */ jsxs("div", {
7259
+ className: cn("flex shrink-0 items-center gap-2", controlsClassName),
7260
+ children: [/* @__PURE__ */ jsx(CarouselPrevious, {
7261
+ label: previousButton?.label ?? "Previous testimonial",
7262
+ icon: previousButton?.icon,
7263
+ variant: previousButton?.variant,
7264
+ size: previousButton?.size,
7265
+ className: previousButton?.className
7266
+ }), /* @__PURE__ */ jsx(CarouselNext, {
7267
+ label: nextButton?.label ?? "Next testimonial",
7268
+ icon: nextButton?.icon,
7269
+ variant: nextButton?.variant,
7270
+ size: nextButton?.size,
7271
+ className: nextButton?.className
7272
+ })]
7273
+ })]
7274
+ }), /* @__PURE__ */ jsx(CarouselContent, {
7275
+ className: "-ml-4",
7276
+ children: items.map((item) => /* @__PURE__ */ jsx(CarouselItem, {
7277
+ className: cn("basis-full pl-4 md:basis-1/2 lg:basis-1/3", slideClassName),
7278
+ children: /* @__PURE__ */ jsxs("figure", {
7279
+ className: cn("flex h-full flex-col justify-between rounded-2xl border bg-card p-6", cardClassName),
7280
+ children: [/* @__PURE__ */ jsx("blockquote", {
7281
+ className: cn("text-base font-normal leading-relaxed text-muted-foreground", contentClassName),
7282
+ children: item.content
7283
+ }), /* @__PURE__ */ jsxs("figcaption", {
7284
+ className: "mt-6 flex items-center gap-3",
7285
+ children: [/* @__PURE__ */ jsx(Avatar, {
7286
+ className: cn("size-9 ring-1 ring-border", avatarClassName),
7287
+ children: item.author.avatar ? /* @__PURE__ */ jsx(AvatarFallback, {
7288
+ className: "text-xs",
7289
+ children: item.author.avatar
7290
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [item.author.avatarUrl ? /* @__PURE__ */ jsx(AvatarImage, {
7291
+ src: item.author.avatarUrl,
7292
+ alt: item.author.name
7293
+ }) : null, /* @__PURE__ */ jsx(AvatarFallback, {
7294
+ className: "text-xs",
7295
+ children: testimonialInitials(item.author.name)
7296
+ })] })
7297
+ }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
7298
+ className: cn("mb-0.5 text-base font-medium leading-tight", authorNameClassName),
7299
+ children: item.author.name
7300
+ }), item.author.title ? /* @__PURE__ */ jsx("div", {
7301
+ className: cn("text-sm font-normal text-muted-foreground", authorTitleClassName),
7302
+ children: item.author.title
7303
+ }) : null] })]
7304
+ })]
7305
+ })
7306
+ }, item.id))
7307
+ })]
7308
+ })
7309
+ })
7310
+ });
7311
+ });
7312
+ TestimonialCarousel.displayName = "TestimonialCarousel";
7313
+ //#endregion
7090
7314
  //#region src/blocks/marketing/resources-block.tsx
7091
7315
  function initials(name) {
7092
7316
  return name.split(" ").map((n) => n[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
@@ -7355,6 +7579,163 @@ const ResourcesBlock = React.forwardRef(({ title = "Resources & Whitepapers", su
7355
7579
  });
7356
7580
  ResourcesBlock.displayName = "ResourcesBlock";
7357
7581
  //#endregion
7582
+ //#region src/blocks/marketing/social-feed-block.tsx
7583
+ /** TikTok has no lucide icon, so it ships as a path of its own. */
7584
+ function TikTokIcon({ className }) {
7585
+ return /* @__PURE__ */ jsx("svg", {
7586
+ viewBox: "0 0 24 24",
7587
+ fill: "currentColor",
7588
+ "aria-hidden": true,
7589
+ className,
7590
+ children: /* @__PURE__ */ jsx("path", { d: "M16.6 5.82A4.28 4.28 0 0 1 15.54 3h-3.09v12.4a2.59 2.59 0 0 1-2.59 2.5 2.59 2.59 0 1 1 .77-5.06V9.69a5.67 5.67 0 0 0-.77-.05A5.68 5.68 0 1 0 15.54 15.4V9.01a7.35 7.35 0 0 0 4.3 1.38V7.3a4.29 4.29 0 0 1-3.24-1.48Z" })
7591
+ });
7592
+ }
7593
+ const PLATFORM_META = {
7594
+ instagram: {
7595
+ label: "Instagram",
7596
+ Icon: Instagram
7597
+ },
7598
+ tiktok: {
7599
+ label: "TikTok",
7600
+ Icon: TikTokIcon
7601
+ },
7602
+ facebook: {
7603
+ label: "Facebook",
7604
+ Icon: Facebook
7605
+ },
7606
+ x: {
7607
+ label: "X",
7608
+ Icon: Twitter
7609
+ },
7610
+ youtube: {
7611
+ label: "YouTube",
7612
+ Icon: Youtube
7613
+ },
7614
+ linkedin: {
7615
+ label: "LinkedIn",
7616
+ Icon: Linkedin
7617
+ }
7618
+ };
7619
+ function isKnownPlatform(value) {
7620
+ return typeof value === "string" && value in PLATFORM_META;
7621
+ }
7622
+ /**
7623
+ * Span classes per footprint. Below `sm` the grid is only two columns wide,
7624
+ * so `wide` and `large` fill the row rather than trying to span more columns
7625
+ * than exist, and `large` holds off on its second row until there is room for
7626
+ * the square it is meant to be.
7627
+ */
7628
+ const TILE_SPAN = {
7629
+ square: "",
7630
+ wide: "col-span-2",
7631
+ tall: "row-span-2",
7632
+ large: "col-span-2 sm:row-span-2"
7633
+ };
7634
+ const COLUMN_CLASS = {
7635
+ 4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",
7636
+ 6: "grid-cols-2 sm:grid-cols-4 lg:grid-cols-6"
7637
+ };
7638
+ const GAP_CLASS = {
7639
+ sm: "gap-2",
7640
+ md: "gap-3",
7641
+ lg: "gap-4"
7642
+ };
7643
+ function SocialPostBadge({ item, className }) {
7644
+ if (item.platform == null) return null;
7645
+ const badgeClass = cn("absolute right-2 top-2 z-10 inline-flex items-center gap-1 rounded-full bg-background/85 px-2.5 py-1.5 text-xs font-medium text-foreground backdrop-blur-sm", className);
7646
+ if (!isKnownPlatform(item.platform)) return /* @__PURE__ */ jsx("span", {
7647
+ className: badgeClass,
7648
+ children: item.platform
7649
+ });
7650
+ const { label, Icon } = PLATFORM_META[item.platform];
7651
+ return /* @__PURE__ */ jsxs("span", {
7652
+ className: badgeClass,
7653
+ children: [/* @__PURE__ */ jsx(Icon, { className: "size-3.5" }), /* @__PURE__ */ jsx("span", {
7654
+ className: "sr-only sm:not-sr-only",
7655
+ children: item.platformLabel ?? label
7656
+ })]
7657
+ });
7658
+ }
7659
+ function SocialPostBody({ item, hoverEffect, imageClassName, overlayClassName, badgeClassName }) {
7660
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7661
+ /* @__PURE__ */ jsx("span", {
7662
+ "aria-hidden": true,
7663
+ className: "block aspect-square"
7664
+ }),
7665
+ /* @__PURE__ */ jsx("div", {
7666
+ className: "absolute inset-0",
7667
+ children: item.content ?? /* @__PURE__ */ jsxs(Fragment, { children: [typeof item.image === "string" ? /* @__PURE__ */ jsx("img", {
7668
+ src: item.image,
7669
+ alt: item.imageAlt ?? "",
7670
+ loading: "lazy",
7671
+ decoding: "async",
7672
+ className: cn("h-full w-full object-cover transition-transform duration-300", hoverEffect === "zoom" && "group-hover:scale-[1.045] group-focus-visible:scale-[1.045]", imageClassName)
7673
+ }) : item.image ? item.image : /* @__PURE__ */ jsx("div", { className: cn("h-full w-full", item.backgroundClass ?? "bg-muted", imageClassName) }), /* @__PURE__ */ jsx(ScrimOverlay, { className: overlayClassName })] })
7674
+ }),
7675
+ /* @__PURE__ */ jsx(SocialPostBadge, {
7676
+ item,
7677
+ className: badgeClassName
7678
+ })
7679
+ ] });
7680
+ }
7681
+ function ScrimOverlay({ className }) {
7682
+ return /* @__PURE__ */ jsx("div", {
7683
+ "aria-hidden": true,
7684
+ className: cn("pointer-events-none absolute inset-0 bg-gradient-to-t from-foreground/35 to-transparent opacity-0 transition-opacity duration-200", "group-hover:opacity-100 group-focus-visible:opacity-100", className)
7685
+ });
7686
+ }
7687
+ const SocialFeedBlock = React.forwardRef(({ items, intro, introSize = "large", columns = 6, gap = "sm", hoverEffect = "zoom", maxItems, className, containerClassName, gridClassName, introClassName, tileClassName, imageClassName, overlayClassName, badgeClassName, ...props }, ref) => {
7688
+ const visible = maxItems != null ? items.slice(0, maxItems) : items;
7689
+ if (visible.length === 0 && intro == null) return null;
7690
+ return /* @__PURE__ */ jsx("section", {
7691
+ ref,
7692
+ "aria-label": props["aria-labelledby"] ? void 0 : props["aria-label"] ?? "Social feed",
7693
+ className: cn("py-12 lg:py-16", className),
7694
+ ...props,
7695
+ children: /* @__PURE__ */ jsx("div", {
7696
+ className: cn("mx-auto max-w-7xl px-4 sm:px-10", containerClassName),
7697
+ children: /* @__PURE__ */ jsxs("div", {
7698
+ className: cn("grid grid-flow-row-dense", COLUMN_CLASS[columns], GAP_CLASS[gap], gridClassName),
7699
+ children: [intro != null ? /* @__PURE__ */ jsx("div", {
7700
+ className: cn(TILE_SPAN[introSize], introClassName),
7701
+ children: intro
7702
+ }) : null, visible.map((item) => {
7703
+ const body = /* @__PURE__ */ jsx(SocialPostBody, {
7704
+ item,
7705
+ hoverEffect,
7706
+ imageClassName,
7707
+ overlayClassName,
7708
+ badgeClassName
7709
+ });
7710
+ const tileClass = cn("group relative block overflow-hidden rounded-2xl bg-card", tileClassName, item.className);
7711
+ const interactiveClass = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2";
7712
+ if (item.href) {
7713
+ const target = item.target ?? "_blank";
7714
+ return /* @__PURE__ */ jsx("a", {
7715
+ href: item.href,
7716
+ target,
7717
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
7718
+ className: cn(tileClass, interactiveClass),
7719
+ children: body
7720
+ }, item.id);
7721
+ }
7722
+ if (item.onClick) return /* @__PURE__ */ jsx("button", {
7723
+ type: "button",
7724
+ onClick: item.onClick,
7725
+ className: cn(tileClass, interactiveClass, "text-left"),
7726
+ children: body
7727
+ }, item.id);
7728
+ return /* @__PURE__ */ jsx("div", {
7729
+ className: tileClass,
7730
+ children: body
7731
+ }, item.id);
7732
+ })]
7733
+ })
7734
+ })
7735
+ });
7736
+ });
7737
+ SocialFeedBlock.displayName = "SocialFeedBlock";
7738
+ //#endregion
7358
7739
  //#region src/blocks/settings/profile-settings-block.tsx
7359
7740
  function ProfileSettingsBlock({ initialData, onSave, onAvatarChange, loading = false, error, disabled = false, className }) {
7360
7741
  const fileInputRef = React.useRef(null);
@@ -7633,6 +8014,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
7633
8014
  });
7634
8015
  }
7635
8016
  //#endregion
7636
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FAQColumnsBlock, FieldGroupScope, FieldProvider, FloatingNavBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, JsonLd, Label, MaintenanceBlock, MediaCard, NapBlock, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverTrigger, ProcessStepsBlock, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, Rating, ResetPasswordBlock, ResourcesBlock, ReviewsBlock, RotatingBadge, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShowcasePanelsBlock, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TestimonialMasonry, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, TimePicker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, napRecordToJsonLd, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, toast, useDensity, useField, useFieldControl, useFieldGroup, useFieldIds, useFormContext, useHideOnScroll, useIsMobile, useScrollReveal, useSidebar, useTheme };
8017
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FAQColumnsBlock, FieldGroupScope, FieldProvider, FloatingNavBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, JsonLd, Label, MaintenanceBlock, MediaCard, NapBlock, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverTrigger, ProcessStepsBlock, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, Rating, ResetPasswordBlock, ResourcesBlock, ReviewsBlock, RotatingBadge, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShowcasePanelsBlock, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialFeedBlock, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TestimonialCarousel, TestimonialMasonry, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, TimePicker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, napRecordToJsonLd, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, testimonialInitials, toast, useCarousel, useDensity, useField, useFieldControl, useFieldGroup, useFieldIds, useFormContext, useHideOnScroll, useIsMobile, useScrollReveal, useSidebar, useTheme };
7637
8018
 
7638
8019
  //# sourceMappingURL=index.mjs.map