import { defineSlotRecipe } from '@pandacss/dev' export const timelineRecipe = defineSlotRecipe({ className : 'timeline', slots: ['timeline', 'box'], base: { timeline: { position: 'relative', display: 'flex', '& > li': { position: 'relative', display: 'grid', flexShrink: '0', alignItems: 'center', }, '& hr': { border: 'none', backgroundColor: 'base-300', }, '& .timeline-middle': { gridColumnStart: '2', gridRowStart: '2', }, }, box: { border: 'var(--border, 1px) solid token(colors.base-300)', borderRadius: 'var(--radius-box)', backgroundColor: 'base-100', paddingInline: 'token(spacing.4)', paddingBlock: 'token(spacing.2)', fontSize: 'token(fontSizes.sm)', boxShadow: '0 1px 2px 0 oklch(0% 0 0 / 0.05)', }, }, variants: { direction: { horizontal: { timeline: { flexDirection: 'row', '& > li': { gridTemplateColumns: 'minmax(0, 1fr) auto minmax(0, 1fr)', gridTemplateRows: 'minmax(0, 1fr) auto minmax(0, 1fr)', }, '& > li > hr': { width: '100%', height: 'token(spacing.1)' }, '& > li > hr:first-child': { gridColumnStart: '1', gridRowStart: '2' }, '& > li > hr:last-child': { gridColumnStart: '3', gridRowStart: '2' }, '& .timeline-start': { gridColumn: '1 / 4', gridRowStart: '1', alignSelf: 'end', justifySelf: 'center', margin: 'token(spacing.1)' }, '& .timeline-end': { gridColumn: '1 / 4', gridRowStart: '3', alignSelf: 'start', justifySelf: 'center', margin: 'token(spacing.1)' }, }, }, // TODO (reported 2026-08-02): no gap/minHeight between