import type { Meta, StoryObj } from '@storybook/nextjs-vite' import { CardsStrip } from '../components/features/cards-strip' import { BlogCard, CaseStudyCard, CustomerInterviewCard } from '../components/chat/entity-cards' import { blogPostSummary, caseStudy, customerInterview } from './__fixtures__/chat-cards' // All stories exercise the ORGANIC children mode: real entity cards passed as // plain JSX children with zero strip-side registration. The render-prop mode // is regression-tested by VideoBitesStrip.stories.tsx. // // Usage guidance: pass `autoScroll={false}` for chevron-style entity strips // (Figma 3905:77388) — the engine default stays `true` for the bites // marquee contract, so don't let the marquee-on default propagate silently. const caseStudies = Array.from({ length: 7 }, (_, i) => ({ ...caseStudy, id: i + 1, slug: `${caseStudy.slug}-${i}`, title: `${caseStudy.title} (${i + 1})`, })) const meta: Meta = { title: 'Features/CardsStrip', component: CardsStrip, parameters: { layout: 'fullscreen' }, decorators: [ Story => (
), ], } export default meta type Story = StoryObj /** Figma 3905:77388: chevron-nav strip of uniform 400px case-study cards — * `autoScroll={false}`, chevrons appear only when content overflows. */ export const CaseStudiesChevrons: Story = { render: () => ( {caseStudies.map(study => ( ))} ), } /** Any card type coexists with zero strip config — the managed cell's * stretch keeps mixed card types row-aligned (verify heights match). */ export const MixedCardTypes: Story = { render: () => ( ), } /** Marquee opt-in (engine default). Accepted clone behaviors: the clone * copy's inner cell is `aria-hidden` + focus-suppressed (every focusable * descendant forced to `tabindex="-1"`) yet still pointer-CLICKABLE — a click * on a visible clone opens its link, since the endless loop always paints * clone cards in the viewport near the seam. The OUTER cell still hover-pauses * the marquee; keyboard focus on original cards pauses too. */ export const MarqueeOptIn: Story = { render: () => ( {caseStudies.map(study => ( ))} ), } /** Two cards — no overflow, so no clones, no marquee, no chevrons. */ export const TwoItemsNoOverflow: Story = { render: () => ( {caseStudies.slice(0, 2).map(study => ( ))} ), } /** Narrow cells via cardWidthDesktop/Mobile overrides. */ export const CustomCellWidth: Story = { render: () => ( {caseStudies.map(study => ( ))} ), }