mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 06:15:39 -04:00
- Stack title-hero poster/metadata vertically on mobile (flex-col md:flex-row), switch backdrop tall breakpoint from sm to md - Extract bio expand/collapse logic into reusable ExpandableText component; use it in PersonHero and TitleHero - Fix ContinueWatchingCard image to use fill + sizes instead of fixed width/height to avoid layout shift - Add fade-out gradient on genre chip scrollbar edge on mobile - Show scaled-down ambient glow on mobile instead of hiding it entirely - Humanize knownForDepartment labels (Acting→Actor, Directing→Director, etc.) - Change cast member name from truncate to line-clamp-2 for wrapping - Hide tooltip arrow via [&>:last-child]:hidden instead of color-matching it - Apply safe-area-inset padding to HeroBanner content on notched devices
124 lines
2.7 KiB
TypeScript
124 lines
2.7 KiB
TypeScript
import { mergeProps } from "@base-ui/react/merge-props";
|
|
import { useRender } from "@base-ui/react/use-render";
|
|
import { IconChevronRight, IconDots } from "@tabler/icons-react";
|
|
import type * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
|
|
return (
|
|
<nav
|
|
aria-label="breadcrumb"
|
|
data-slot="breadcrumb"
|
|
className={cn(className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
return (
|
|
<ol
|
|
data-slot="breadcrumb-list"
|
|
className={cn(
|
|
"wrap-break-word flex flex-wrap items-center gap-1.5 text-muted-foreground text-xs/relaxed",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
return (
|
|
<li
|
|
data-slot="breadcrumb-item"
|
|
className={cn("inline-flex items-center gap-1", className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function BreadcrumbLink({
|
|
className,
|
|
render,
|
|
...props
|
|
}: useRender.ComponentProps<"a">) {
|
|
return useRender({
|
|
defaultTagName: "a",
|
|
props: mergeProps<"a">(
|
|
{
|
|
className: cn("transition-colors hover:text-foreground", className),
|
|
},
|
|
props,
|
|
),
|
|
render,
|
|
state: {
|
|
slot: "breadcrumb-link",
|
|
},
|
|
});
|
|
}
|
|
|
|
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
return (
|
|
// biome-ignore lint/a11y/useFocusableInteractive: shadcn generated
|
|
// biome-ignore lint/a11y/useSemanticElements: shadcn generated
|
|
<span
|
|
data-slot="breadcrumb-page"
|
|
role="link"
|
|
aria-disabled="true"
|
|
aria-current="page"
|
|
className={cn("font-normal text-foreground", className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function BreadcrumbSeparator({
|
|
children,
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<"li">) {
|
|
return (
|
|
<li
|
|
data-slot="breadcrumb-separator"
|
|
role="presentation"
|
|
aria-hidden="true"
|
|
className={cn("[&>svg]:size-3.5", className)}
|
|
{...props}
|
|
>
|
|
{children ?? <IconChevronRight />}
|
|
</li>
|
|
);
|
|
}
|
|
|
|
function BreadcrumbEllipsis({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<"span">) {
|
|
return (
|
|
<span
|
|
data-slot="breadcrumb-ellipsis"
|
|
role="presentation"
|
|
aria-hidden="true"
|
|
className={cn(
|
|
"flex size-4 items-center justify-center [&>svg]:size-3.5",
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
<IconDots />
|
|
<span className="sr-only">More</span>
|
|
</span>
|
|
);
|
|
}
|
|
|
|
export {
|
|
Breadcrumb,
|
|
BreadcrumbList,
|
|
BreadcrumbItem,
|
|
BreadcrumbLink,
|
|
BreadcrumbPage,
|
|
BreadcrumbSeparator,
|
|
BreadcrumbEllipsis,
|
|
};
|