Calendar Actions 7
Month-view calendar close for multi-day events: every session day lit on a dark stage so the visitor commits to the whole run, then one .ics with every session or Google and Outlook day by day.
Use it in a prompt
Use checkout/calendar-actions-7 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/checkout/calendar-actions-7.tsx. - Import it and pass your copy and images (Props tab):
import { CalendarActions7 } from "@/components/funneldna/checkout/calendar-actions-7"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/calendar-actions-7/component.tsx 812 lines
// layout: split-contrast
// Month-view calendar close for multi-day events: every session day lit on a dark stage so the visitor commits to the whole run, then one .ics with every session or Google and Outlook day by day.
'use client'
import * as React from 'react'
import { BellRing, CalendarDays, CalendarPlus, CalendarRange, Clock, ListChecks } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
export type CalendarSession = {
/** Lesson title as the visitor reads it and as it lands in their calendar. */
title: string
/** ISO 8601 with offset or Z, e.g. '2027-03-08T19:00:00-05:00'. */
startsAt: string
/** ISO 8601; defaults to startsAt plus defaultMinutes. */
endsAt?: string
/** One line shown with the day and written into its calendar entry. */
detail?: string
}
export type CalendarActionKind = 'all' | 'google' | 'outlook'
export type CalendarActions7State = 'default' | 'hover' | 'active' | 'focus' | 'disabled'
/** Templates use {count}, {day}, {title}, {date}, {time}, {month}, {event}, {name} and {minutes}; substitutions stay plain text. */
export type CalendarActions7Copy = {
headingMany: string
headingOne: string
leadMany: string
leadOne: string
factsLabel: string
sessionsMany: string
sessionsOne: string
timeSame: string
timeMixed: string
calendarLabel: string
legend: string
dayOf: string
dayOne: string
dayLabel: string
dayName: string
salutation: string
letterMany: string[]
letterOne: string[]
instructionMany: string
instructionOne: string
allMany: string
allOne: string
allLabelMany: string
allLabelOne: string
reassure: string
reassureNoReminder: string
disabledNote: string
listHeadingMany: string
listHeadingOne: string
googleLabel: string
outlookLabel: string
googleAction: string
outlookAction: string
entryTitleMany: string
entryTitleOne: string
}
const COPY: CalendarActions7Copy = {
headingMany: 'Put all {count} days on your calendar now',
headingOne: 'Put it on your calendar now',
leadMany: 'Hover or tap any highlighted day to see its lesson and start time.',
leadOne: 'Hover or tap the highlighted day to see the lesson and start time.',
factsLabel: 'At a glance',
sessionsMany: '{count} live sessions',
sessionsOne: 'One live session',
timeSame: 'Each day at {time}',
timeMixed: 'Times listed by day',
calendarLabel: '{month}, {count} highlighted days',
legend: 'Session day',
dayOf: 'Day {day} of {count}',
dayOne: 'Your live session',
dayLabel: '{name}, {date}: {title}, {time}',
dayName: 'Day {day}',
salutation: 'Dear friend,',
letterMany: [
'Day one is the easy day to show up for. The result comes from the days after it.',
'So before anything else, save every session now. Each one will be waiting on your calendar, already blocked out.',
],
letterOne: [
'This is the hour that moves you forward, so give it a real place on your calendar.',
'Save it now and it will be waiting for you, already blocked out.',
],
instructionMany: 'Click the button below to put all {count} days on your calendar.',
instructionOne: 'Click the button below to put it on your calendar.',
allMany: 'Add all {count} days',
allOne: 'Add it to my calendar',
allLabelMany: 'Add all {count} days: download one calendar file with every session',
allLabelOne: 'Add it to my calendar: download a calendar file for {title}',
reassure: 'One file for Apple, Google and Outlook, with a {minutes}-minute reminder',
reassureNoReminder: 'One file for Apple, Google and Outlook',
disabledNote: 'Calendar links open as soon as the schedule is confirmed.',
listHeadingMany: 'Or save each day on its own',
listHeadingOne: 'Rather use Google or Outlook?',
googleLabel: 'Google',
outlookLabel: 'Outlook',
googleAction: 'Add {name} to Google Calendar',
outlookAction: 'Add {name} to Outlook Calendar',
entryTitleMany: '{event}, Day {day}: {title}',
entryTitleOne: '{event}: {title}',
}
export type CalendarActions7Props = {
/** Every session in the run, any order; numbered by start time. */
sessions: CalendarSession[]
/** Event name written into each calendar entry, e.g. '5-Day Sourdough Challenge'. */
eventName: string
/** IANA zone the times are announced in, e.g. 'America/New_York'. */
timezone: string
/** Printed after every time; defaults to the zone's short name (EST, CET…). */
timezoneLabel?: string
/** Locale for month, weekday, date and time labels. */
locale?: string
/** 0 = Sunday, 1 = Monday. */
weekStartsOn?: 0 | 1
/** Session length when a session has no endsAt. */
defaultMinutes?: number
/** Reminder written into every calendar entry; 0 for none. */
reminderMinutes?: number
/** A URL for online events, a venue otherwise. */
location?: string
/** Added to every calendar entry after the session detail. */
description?: string
/** Download name for the all-days file; defaults to the event name. */
fileName?: string
heading?: React.ReactNode
lead?: React.ReactNode
/** Letter paragraphs under the salutation. */
letter?: React.ReactNode[]
/** Line above the signature, e.g. 'See you there,'. */
signoff?: React.ReactNode
signName?: string
signRole?: React.ReactNode
presenterImage?: string
presenterAlt?: string
/** Transparent cut-out of the outcome that overlaps the calendar's corner. */
productImage?: string
productAlt?: string
copy?: Partial<CalendarActions7Copy>
/** Index of the day shown beside the calendar first. */
initialDay?: number
/** Calendar links unavailable; the day view still works. */
disabled?: boolean
/** Studio preview: main button hovered, pressed or focused (focus also rings the shown day), or everything disabled. */
state?: CalendarActions7State
/** Called on every calendar action; call event.preventDefault() to handle it yourself. */
onAction?: (kind: CalendarActionKind, sessionIndex: number | null, event: React.MouseEvent<HTMLAnchorElement>) => void
className?: string
}
export function CalendarActions7({
sessions,
eventName,
timezone,
timezoneLabel,
locale = 'en-US',
weekStartsOn = 0,
defaultMinutes = 60,
reminderMinutes = 30,
location,
description,
fileName,
heading,
lead,
letter,
signoff,
signName,
signRole,
presenterImage,
presenterAlt,
productImage,
productAlt = '',
copy: copyOverrides,
initialDay = 0,
disabled = false,
state = 'default',
onAction,
className,
}: CalendarActions7Props) {
const copy: CalendarActions7Copy = {
...COPY,
...(Object.fromEntries(Object.entries(copyOverrides ?? {}).filter(([, value]) => value !== undefined)) as Partial<CalendarActions7Copy>),
}
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const headingId = `${uid}-h`
const items = parseSessions(sessions, timezone, locale, defaultMinutes, timezoneLabel)
const count = items.length
const clampDay = (value: number) => Math.min(Math.max(0, Math.floor(value) || 0), Math.max(0, count - 1))
const [active, setActive] = React.useState(() => clampDay(initialDay))
const dayRefs = React.useRef<Array<HTMLButtonElement | null>>([])
React.useEffect(() => {
setActive(Math.min(Math.max(0, Math.floor(initialDay) || 0), Math.max(0, count - 1)))
}, [initialDay, count])
if (!count) return null
const one = count === 1
const cur = items[Math.min(active, count - 1)]
const first = items[0]
const last = items[count - 1]
const isDisabled = disabled || state === 'disabled'
const headingNode = heading ?? (one ? copy.headingOne : fill(copy.headingMany, { count }))
const leadNode = lead ?? (one ? copy.leadOne : copy.leadMany)
const paragraphs: React.ReactNode[] = letter ?? (one ? copy.letterOne : copy.letterMany)
const showSign = Boolean(signoff || signName || presenterImage)
const rangeLabel = one
? first.dateShort
: formatRange(new Intl.DateTimeFormat(locale, { timeZone: timezone, month: 'short', day: 'numeric' }), first.start, last.start)
const sameTime = items.every((item) => item.timeStart === first.timeStart)
const timeFact = one ? first.time : sameTime ? fill(copy.timeSame, { time: first.timeStart }) : copy.timeMixed
const months: Array<{ key: string; y: number; m: number; days: Map<number, number> }> = []
items.forEach((item, index) => {
let month = months.find((entry) => entry.y === item.y && entry.m === item.m)
if (!month) {
month = { key: `${item.y}-${item.m}`, y: item.y, m: item.m, days: new Map() }
months.push(month)
}
if (!month.days.has(item.d)) month.days.set(item.d, index)
})
const navOrder = months.flatMap((month) => Array.from(month.days.values()))
const weekdayFmt = new Intl.DateTimeFormat(locale, { timeZone: 'UTC', weekday: 'short' })
const weekdays = Array.from({ length: 7 }, (_, i) => weekdayFmt.format(new Date(Date.UTC(2023, 0, 1 + ((weekStartsOn + i) % 7)))))
const monthFmt = new Intl.DateTimeFormat(locale, { timeZone: 'UTC', month: 'long', year: 'numeric' })
const nameFor = (item: Item) => (one ? eventName || item.title : fill(copy.dayName, { day: item.n }))
const entryTitle = (item: Item) =>
one
? fill(copy.entryTitleOne, { event: eventName, title: item.title })
: fill(copy.entryTitleMany, { event: eventName, day: item.n, title: item.title })
const detailFor = (item: Item) => [item.detail, description].filter(Boolean).join('\n\n')
const googleHref = (item: Item) => {
const details = detailFor(item)
return (
'https://calendar.google.com/calendar/render?action=TEMPLATE' +
`&text=${encodeURIComponent(entryTitle(item))}` +
`&dates=${basicUtc(item.start)}/${basicUtc(item.end)}` +
`&ctz=${encodeURIComponent(timezone)}` +
(details ? `&details=${encodeURIComponent(details)}` : '') +
(location ? `&location=${encodeURIComponent(location)}` : '')
)
}
const outlookHref = (item: Item) => {
const details = detailFor(item)
return (
'https://outlook.live.com/calendar/0/action/compose?rru=addevent' +
`&subject=${encodeURIComponent(entryTitle(item))}` +
`&startdt=${encodeURIComponent(item.start.toISOString())}` +
`&enddt=${encodeURIComponent(item.end.toISOString())}` +
(details ? `&body=${encodeURIComponent(details)}` : '') +
(location ? `&location=${encodeURIComponent(location)}` : '')
)
}
const icsHref = `data:text/calendar;charset=utf-8,${encodeURIComponent(
buildIcs(items, eventName, entryTitle, detailFor, location, reminderMinutes),
)}`
const file = fileName ?? `${slugify(eventName) || 'event'}.ics`
const fire = (kind: CalendarActionKind, index: number | null) => (event: React.MouseEvent<HTMLAnchorElement>) => {
if (isDisabled) {
event.preventDefault()
return
}
onAction?.(kind, index, event)
}
const onDayKey = (index: number) => (event: React.KeyboardEvent<HTMLButtonElement>) => {
const pos = navOrder.indexOf(index)
let next = -1
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = navOrder[Math.min(navOrder.length - 1, pos + 1)]
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = navOrder[Math.max(0, pos - 1)]
else if (event.key === 'Home') next = navOrder[0]
else if (event.key === 'End') next = navOrder[navOrder.length - 1]
if (next < 0 || next === undefined) return
event.preventDefault()
setActive(next)
dayRefs.current[next]?.focus()
}
return (
<section className={cx('cf-calendar-actions-7', className)} data-state={state} aria-labelledby={headingId}>
<style>{CSS}</style>
<div className='cfa7-split'>
<div className='cfa7-stage'>
<div className='cfa7-fx' aria-hidden='true'>
<div className='cfa7-fx-host' style={FX_HOST}>
<Pattern name='grid' fade='corner' />
</div>
</div>
<div className='cfa7-stage-in'>
<h2 id={headingId} className='cfa7-h2'>
{headingNode}
</h2>
<p className='cfa7-lead'>{leadNode}</p>
<ul className='cfa7-facts' aria-label={copy.factsLabel}>
<li className='cfa7-fact'>
<ListChecks size={16} strokeWidth={2.5} aria-hidden='true' />
{one ? copy.sessionsOne : fill(copy.sessionsMany, { count })}
</li>
<li className='cfa7-fact'>
<CalendarRange size={16} strokeWidth={2.5} aria-hidden='true' />
{rangeLabel}
</li>
<li className='cfa7-fact'>
<Clock size={16} strokeWidth={2.5} aria-hidden='true' />
{timeFact}
</li>
</ul>
<div className='cfa7-board'>
<div className='cfa7-months'>
{months.map((month, mi) => {
const firstOfMonth = new Date(Date.UTC(month.y, month.m - 1, 1))
const offset = (firstOfMonth.getUTCDay() - weekStartsOn + 7) % 7
const daysInMonth = new Date(Date.UTC(month.y, month.m, 0)).getUTCDate()
const label = monthFmt.format(firstOfMonth)
const art = mi === 0 && Boolean(productImage)
return (
<div className='cfa7-panel' key={month.key}>
{art ? (
<img className='cfa7-loaf' src={productImage} alt={productAlt} width={112} height={112} decoding='async' />
) : null}
<div className={cx('cfa7-panel-head', art && 'has-art')}>
<h3 className='cfa7-month'>{label}</h3>
</div>
<div className='cfa7-grid' role='group' aria-label={fill(copy.calendarLabel, { month: label, count: month.days.size })}>
{weekdays.map((weekday, i) => (
<span key={`w${i}`} className='cfa7-dow' aria-hidden='true'>
{weekday}
</span>
))}
{Array.from({ length: offset }, (_, i) => (
<span key={`b${i}`} className='cfa7-cell' aria-hidden='true' />
))}
{Array.from({ length: daysInMonth }, (_, k) => {
const day = k + 1
const index = month.days.get(day)
if (index === undefined) {
return (
<span key={day} className='cfa7-cell' aria-hidden='true'>
<span className='cfa7-num'>{day}</span>
</span>
)
}
const item = items[index]
const join = month.days.has(day + 1) && (offset + day) % 7 !== 0
const pressed = cur.key === item.key
return (
<span key={day} className='cfa7-cell' data-join={join ? '' : undefined}>
<button
type='button'
ref={(el) => {
dayRefs.current[index] = el
}}
className={cx('cfa7-day', state === 'focus' && pressed && 'is-focus')}
aria-pressed={pressed}
aria-label={fill(copy.dayLabel, { name: nameFor(item), date: item.dateLong, title: item.title, time: item.time })}
onMouseEnter={() => setActive(index)}
onFocus={() => setActive(index)}
onClick={() => setActive(index)}
onKeyDown={onDayKey(index)}
>
{day}
</button>
</span>
)
})}
</div>
{mi === months.length - 1 ? (
<p className='cfa7-legend'>
<span className='cfa7-swatch' aria-hidden='true' />
{copy.legend}
</p>
) : null}
</div>
)
})}
</div>
<div className='cfa7-read'>
<div className='cfa7-read-in' key={cur.key + cur.n}>
{one ? (
<p className='cfa7-kick'>{copy.dayOne}</p>
) : (
<>
<p className='cfa7-kick'>{fill(copy.dayOf, { day: cur.n, count })}</p>
<div className='cfa7-steps' aria-hidden='true'>
{items.map((item) => (
<span key={item.n} data-on={item.n <= cur.n ? '' : undefined} />
))}
</div>
</>
)}
<h3 className='cfa7-read-title'>{cur.title}</h3>
<ul className='cfa7-meta'>
<li>
<CalendarDays size={18} strokeWidth={2.5} aria-hidden='true' />
<span>{cur.dateLong}</span>
</li>
<li>
<Clock size={18} strokeWidth={2.5} aria-hidden='true' />
<span>{cur.time}</span>
</li>
</ul>
{cur.detail ? <p className='cfa7-read-detail'>{cur.detail}</p> : null}
</div>
</div>
</div>
</div>
</div>
<div className='cfa7-letter'>
<div className='cfa7-letter-in'>
<p className='cfa7-salute'>{copy.salutation}</p>
{paragraphs.map((paragraph, i) => (
<p key={i} className='cfa7-p'>
{paragraph}
</p>
))}
{showSign ? (
<div className='cfa7-sign'>
{presenterImage ? (
<img className='cfa7-face' src={presenterImage} alt={presenterAlt ?? signName ?? ''} width={64} height={64} loading='lazy' />
) : null}
<div>
{signoff ? <p className='cfa7-signoff'>{signoff}</p> : null}
{signName ? <p className='cfa7-signame'>{signName}</p> : null}
{signRole ? <p className='cfa7-role'>{signRole}</p> : null}
</div>
</div>
) : null}
<div className='cfa7-act'>
<p className='cfa7-instr'>{one ? copy.instructionOne : fill(copy.instructionMany, { count })}</p>
<a
className={cx('cfa7-cta', state === 'focus' && 'is-focus')}
href={isDisabled ? undefined : icsHref}
download={isDisabled ? undefined : file}
role={isDisabled ? 'link' : undefined}
aria-disabled={isDisabled || undefined}
aria-label={one ? fill(copy.allLabelOne, { title: first.title }) : fill(copy.allLabelMany, { count })}
onClick={fire('all', null)}
>
<CalendarPlus size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{one ? copy.allOne : fill(copy.allMany, { count })}</span>
</a>
<p className='cfa7-reassure'>
{isDisabled ? (
copy.disabledNote
) : (
<>
<BellRing size={16} strokeWidth={2.5} aria-hidden='true' />
{reminderMinutes > 0 ? fill(copy.reassure, { minutes: Math.round(reminderMinutes) }) : copy.reassureNoReminder}
</>
)}
</p>
</div>
<div className='cfa7-list'>
<h3 className='cfa7-list-h'>{one ? copy.listHeadingOne : copy.listHeadingMany}</h3>
<ol className={cx('cfa7-rows', one && 'is-one')}>
{items.map((item, i) => {
const name = one ? item.title : `${nameFor(item)}: ${item.title}`
return (
<li
key={`${item.key}-${item.n}`}
className='cfa7-row'
data-active={i === cur.n - 1 ? '' : undefined}
onMouseEnter={() => setActive(i)}
onFocus={() => setActive(i)}
>
{one ? null : (
<span className='cfa7-rnum' aria-hidden='true'>
{item.n}
</span>
)}
<div className='cfa7-rbody'>
<p className='cfa7-rtitle'>{item.title}</p>
<p className='cfa7-rmeta'>
{item.dateShort}
{' · '}
{item.time}
</p>
<div className='cfa7-rlinks'>
<a
className='cfa7-plink'
href={isDisabled ? undefined : googleHref(item)}
target='_blank'
rel='noopener noreferrer'
role={isDisabled ? 'link' : undefined}
aria-disabled={isDisabled || undefined}
aria-label={fill(copy.googleAction, { name })}
onClick={fire('google', i)}
>
<GoogleMark />
<span>{copy.googleLabel}</span>
</a>
<a
className='cfa7-plink'
href={isDisabled ? undefined : outlookHref(item)}
target='_blank'
rel='noopener noreferrer'
role={isDisabled ? 'link' : undefined}
aria-disabled={isDisabled || undefined}
aria-label={fill(copy.outlookAction, { name })}
onClick={fire('outlook', i)}
>
<OutlookMark />
<span>{copy.outlookLabel}</span>
</a>
</div>
</div>
</li>
)
})}
</ol>
</div>
</div>
</div>
</div>
</section>
)
}
export default CalendarActions7
type Item = {
title: string
detail?: string
start: Date
end: Date
y: number
m: number
d: number
key: string
n: number
dateLong: string
dateShort: string
time: string
timeStart: string
}
const CRLF = '\r\n'
function parseSessions(sessions: CalendarSession[], timezone: string, locale: string, minutes: number, label?: string): Item[] {
const ymd = new Intl.DateTimeFormat('en-US', { timeZone: timezone, year: 'numeric', month: 'numeric', day: 'numeric' })
const long = new Intl.DateTimeFormat(locale, { timeZone: timezone, weekday: 'long', month: 'long', day: 'numeric' })
const short = new Intl.DateTimeFormat(locale, { timeZone: timezone, weekday: 'short', month: 'short', day: 'numeric' })
const clock = new Intl.DateTimeFormat(locale, { timeZone: timezone, hour: 'numeric', minute: '2-digit' })
const zone = new Intl.DateTimeFormat(locale, { timeZone: timezone, timeZoneName: 'short' })
const list: Item[] = []
for (const session of sessions ?? []) {
const start = new Date(session.startsAt)
if (Number.isNaN(start.getTime())) continue
const endCandidate = session.endsAt ? new Date(session.endsAt) : null
const end =
endCandidate && !Number.isNaN(endCandidate.getTime()) && endCandidate.getTime() > start.getTime()
? endCandidate
: new Date(start.getTime() + Math.max(1, minutes) * 60000)
const parts = ymd.formatToParts(start)
const num = (type: string) => Number(parts.find((part) => part.type === type)?.value)
const y = num('year')
const m = num('month')
const d = num('day')
const tzName = label ?? zone.formatToParts(start).find((part) => part.type === 'timeZoneName')?.value ?? ''
const suffix = tzName ? ` ${tzName}` : ''
list.push({
title: session.title,
detail: session.detail,
start,
end,
y,
m,
d,
key: `${y}-${m}-${d}`,
n: 0,
dateLong: long.format(start),
dateShort: short.format(start),
time: `${formatRange(clock, start, end)}${suffix}`,
timeStart: `${clock.format(start)}${suffix}`,
})
}
list.sort((a, b) => a.start.getTime() - b.start.getTime())
return list.map((item, i) => ({ ...item, n: i + 1 }))
}
function formatRange(format: Intl.DateTimeFormat, a: Date, b: Date) {
const ranged = format as Intl.DateTimeFormat & { formatRange?: (x: Date, y: Date) => string }
return typeof ranged.formatRange === 'function' ? ranged.formatRange(a, b) : `${format.format(a)} – ${format.format(b)}`
}
function buildIcs(
items: Item[],
calendarName: string,
titleFor: (item: Item) => string,
detailFor: (item: Item) => string,
location: string | undefined,
reminderMinutes: number,
) {
const stamp = basicUtc(items[0].start)
const lines = ['BEGIN:VCALENDAR', 'VERSION:2.0', 'PRODID:-//CF//calendar-actions-7//EN', 'CALSCALE:GREGORIAN', 'METHOD:PUBLISH']
if (calendarName) lines.push(`X-WR-CALNAME:${escapeIcs(calendarName)}`)
items.forEach((item) => {
const summary = escapeIcs(titleFor(item))
const detail = detailFor(item)
lines.push(
'BEGIN:VEVENT',
`UID:${basicUtc(item.start)}-${item.n}-${slugify(item.title) || 'session'}@cf-calendar`,
`DTSTAMP:${stamp}`,
`DTSTART:${basicUtc(item.start)}`,
`DTEND:${basicUtc(item.end)}`,
`SUMMARY:${summary}`,
)
if (detail) lines.push(`DESCRIPTION:${escapeIcs(detail)}`)
if (location) lines.push(`LOCATION:${escapeIcs(location)}`)
if (reminderMinutes > 0) {
lines.push('BEGIN:VALARM', 'ACTION:DISPLAY', `DESCRIPTION:${summary}`, `TRIGGER:-PT${Math.round(reminderMinutes)}M`, 'END:VALARM')
}
lines.push('END:VEVENT')
})
lines.push('END:VCALENDAR')
return lines.join(CRLF)
}
function basicUtc(date: Date) {
const iso = date.toISOString()
return iso.slice(0, 4) + iso.slice(5, 7) + iso.slice(8, 13) + iso.slice(14, 16) + iso.slice(17, 19) + 'Z'
}
function escapeIcs(value: string) {
return value
.split('\\')
.join('\\\\')
.split(';')
.join('\\;')
.split(',')
.join('\\,')
.split(CRLF)
.join('\\n')
.split('\n')
.join('\\n')
}
function slugify(value: string) {
return (value || '')
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '')
.slice(0, 48)
}
function fill(template: string, values: Record<string, string | number>) {
return template.replace(/[{]([a-z]+)[}]/gi, (match, key: string) => (key in values ? String(values[key]) : match))
}
function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(' ')
}
// Official Google mark: keeps its four brand colours (theme-contract §3 exception).
function GoogleMark() {
return (
<svg className='cfa7-mark' viewBox='0 0 24 24' width={18} height={18} aria-hidden='true' focusable='false' data-official-mark='Google'>
<path fill='#4285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z' />
<path fill='#34A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z' />
<path fill='#FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z' />
<path fill='#EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z' />
</svg>
)
}
// Official Microsoft Outlook mark colours (theme-contract §3 exception).
function OutlookMark() {
return (
<svg className='cfa7-mark' viewBox='0 0 24 24' width={18} height={18} aria-hidden='true' focusable='false' data-official-mark='Microsoft Outlook'>
<rect x='8' y='4' width='14' height='16' rx='2' fill='#28A8EA' />
<rect x='8' y='12' width='14' height='8' rx='2' fill='#0364B8' />
<rect x='2' y='6.5' width='11' height='11' rx='2' fill='#0078D4' />
<ellipse cx='7.5' cy='12' rx='2.5' ry='3' fill='none' stroke='#FFFFFF' strokeWidth={1.8} />
</svg>
)
}
const CSS = `
.cf-calendar-actions-7{--cal-gap:6px;--cfa7-shadow:var(--shadow,oklch(0.22 0.03 260));display:block;font-family:var(--font-body);color:var(--ink);background:var(--surface);overflow-x:clip}
.cf-calendar-actions-7 *,.cf-calendar-actions-7 *::before,.cf-calendar-actions-7 *::after{box-sizing:border-box}
.cf-calendar-actions-7 .cfa7-split{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
.cf-calendar-actions-7 .cfa7-stage{position:relative;display:flex;justify-content:flex-end;background:var(--band);color:var(--band-ink);padding:clamp(56px,8vw,112px) clamp(24px,4vw,56px) clamp(64px,8.5vw,120px) clamp(16px,5vw,48px)}
.cf-calendar-actions-7 .cfa7-fx{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.cf-calendar-actions-7 .cfa7-fx-host{width:100%;height:100%}
.cf-calendar-actions-7 .cfa7-stage-in{position:sticky;top:24px;z-index:1;align-self:flex-start;width:100%;max-width:640px;container-type:inline-size}
.cf-calendar-actions-7 .cfa7-h2{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--band-ink)}
.cf-calendar-actions-7 .cfa7-lead{margin:0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;text-wrap:pretty;color:var(--band-ink)}
.cf-calendar-actions-7 .cfa7-facts{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 40px;padding:0;list-style:none}
.cf-calendar-actions-7 .cfa7-fact{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / 0.12);color:var(--band-ink);font-size:0.875rem;font-weight:800;line-height:1.2}
.cf-calendar-actions-7 .cfa7-fact svg{flex:none}
.cf-calendar-actions-7 .cfa7-board{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.cf-calendar-actions-7 .cfa7-months{display:grid;gap:16px;width:100%}
.cf-calendar-actions-7 .cfa7-panel{position:relative;padding:clamp(12px,2.4vw,20px);border-radius:var(--card-radius,var(--radius,14px));background:oklch(from var(--band-ink) l c h / 0.07);border:1px solid oklch(from var(--band-ink) l c h / 0.16);box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / 0.08)}
.cf-calendar-actions-7 .cfa7-panel-head{display:flex;align-items:center;min-height:44px;margin:0 0 12px}
.cf-calendar-actions-7 .cfa7-panel-head.has-art{padding-right:104px}
.cf-calendar-actions-7 .cfa7-month{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--band-ink)}
.cf-calendar-actions-7 .cfa7-loaf{position:absolute;top:-50px;right:-16px;z-index:2;width:112px;height:112px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 3px oklch(from var(--cfa7-shadow) l c h / 0.5)) drop-shadow(0 12px 14px oklch(from var(--cfa7-shadow) l c h / 0.4))}
.cf-calendar-actions-7 .cfa7-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--cal-gap)}
.cf-calendar-actions-7 .cfa7-dow{display:grid;place-items:center;height:28px;font-size:0.875rem;font-weight:800;line-height:1.2;letter-spacing:0.04em;text-transform:uppercase;color:oklch(from var(--band-ink) l c h / 0.82)}
.cf-calendar-actions-7 .cfa7-cell{position:relative;display:grid;aspect-ratio:1;min-width:44px;min-height:44px}
.cf-calendar-actions-7 .cfa7-num{display:grid;place-items:center;border-radius:10px;font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;color:oklch(from var(--band-ink) l c h / 0.74)}
.cf-calendar-actions-7 .cfa7-cell[data-join]::after{content:'';position:absolute;z-index:0;top:26%;bottom:26%;left:50%;right:calc(-50% - var(--cal-gap));background:oklch(from var(--accent-fill,var(--accent)) l c h / 0.45)}
.cf-calendar-actions-7 .cfa7-day{--cfa7-d:var(--accent-fill,var(--accent));position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:10px;appearance:none;cursor:pointer;font:inherit;font-size:1.0625rem;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;color:var(--accent-fill-ink,var(--card));background:linear-gradient(oklch(from var(--cfa7-d) calc(l + 0.03) c h),oklch(from var(--cfa7-d) calc(l - 0.04) c h));box-shadow:inset 0 1px 0 oklch(from var(--cfa7-d) calc(l + 0.14) c h / 0.6),inset 0 -2px 0 oklch(from var(--cfa7-d) calc(l - 0.16) c h),0 0 0 1px oklch(from var(--band-ink) l c h / 0.3),0 1px 2px oklch(from var(--cfa7-shadow) l c h / 0.45);transition:transform 0.16s ease,box-shadow 0.16s ease}
.cf-calendar-actions-7 .cfa7-day:hover{transform:translateY(-1px)}
.cf-calendar-actions-7 .cfa7-day[aria-pressed='true']{transform:translateY(-2px) scale(1.06);box-shadow:inset 0 1px 0 oklch(from var(--cfa7-d) calc(l + 0.14) c h / 0.6),inset 0 -2px 0 oklch(from var(--cfa7-d) calc(l - 0.16) c h),0 0 0 2px var(--band-ink),0 4px 10px -2px oklch(from var(--cfa7-shadow) l c h / 0.55)}
.cf-calendar-actions-7 .cfa7-day:active{transform:translateY(0) scale(0.97)}
.cf-calendar-actions-7 .cfa7-day:focus{outline:none}
.cf-calendar-actions-7 .cfa7-day:focus-visible,.cf-calendar-actions-7 .cfa7-day.is-focus{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-calendar-actions-7 .cfa7-legend{margin:16px 0 0;padding-left:4px;font-size:0.875rem;font-weight:700;line-height:1.3;color:var(--band-ink)}
.cf-calendar-actions-7 .cfa7-swatch{display:inline-block;width:14px;height:14px;margin-inline-end:0.5em;vertical-align:-0.15em;border-radius:4px;background:var(--accent-fill,var(--accent));box-shadow:0 0 0 1px oklch(from var(--band-ink) l c h / 0.3)}
.cf-calendar-actions-7 .cfa7-read{background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)));padding:clamp(20px,3vw,28px)}
.cf-calendar-actions-7 .cfa7-read-in{animation:cfa7-rise 0.45s cubic-bezier(0.2,0.7,0.2,1) both}
.cf-calendar-actions-7 .cfa7-kick{margin:0 0 12px;font-size:0.875rem;font-weight:800;line-height:1.2;letter-spacing:0.08em;text-transform:uppercase;color:var(--accent)}
.cf-calendar-actions-7 .cfa7-steps{display:flex;gap:4px;margin:0 0 16px}
.cf-calendar-actions-7 .cfa7-steps span{flex:1;height:6px;border-radius:999px;background:color-mix(in oklch,var(--ink) 10%,var(--card))}
.cf-calendar-actions-7 .cfa7-steps span[data-on]{background:var(--accent-fill,var(--accent))}
.cf-calendar-actions-7 .cfa7-read-title{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.3125rem;line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-meta{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.cf-calendar-actions-7 .cfa7-meta li{display:flex;align-items:flex-start;gap:10px;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-meta svg{flex:none;margin-top:1px;color:var(--accent)}
.cf-calendar-actions-7 .cfa7-read-detail{margin:16px 0 0;font-size:0.9375rem;line-height:1.45;text-wrap:pretty;color:var(--muted)}
.cf-calendar-actions-7 .cfa7-letter{display:flex;justify-content:flex-start;background:var(--surface);color:var(--ink);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px) clamp(24px,4vw,64px)}
.cf-calendar-actions-7 .cfa7-letter-in{width:100%;max-width:520px}
.cf-calendar-actions-7 .cfa7-salute{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-p{margin:0 0 16px;max-width:64ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.6;text-wrap:pretty;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-sign{display:flex;align-items:center;gap:16px;margin:24px 0 0}
.cf-calendar-actions-7 .cfa7-face{flex:none;width:64px;height:64px;border-radius:12px;object-fit:cover;object-position:50% 28%}
.cf-calendar-actions-7 .cfa7-signoff{margin:0 0 12px;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-calendar-actions-7 .cfa7-signame{margin:0;font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:var(--display-weight,800);line-height:1.15;letter-spacing:-0.01em;text-transform:var(--display-case,none);color:var(--signature-ink,var(--ink))}
.cf-calendar-actions-7 .cfa7-role{margin:8px 0 0;font-size:0.9375rem;font-weight:500;line-height:1.3;color:var(--muted)}
.cf-calendar-actions-7 .cfa7-act{margin:40px 0 0}
.cf-calendar-actions-7 .cfa7-instr{margin:0 0 16px;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.4;text-wrap:pretty;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-cta{--cfa7-b:var(--button-bg,var(--cta));--cfa7-b2:var(--button-bg-2,var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:min(100%,300px);min-height:72px;padding:0 32px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-transform:var(--button-case,none);white-space:nowrap;text-decoration:none;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);cursor:pointer;background:linear-gradient(oklch(from var(--cfa7-b) calc(l + 0.04) c h),oklch(from var(--cfa7-b2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cfa7-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--cfa7-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--cfa7-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--cfa7-shadow) l c h / 0.45));transition:background 0.16s ease,box-shadow 0.16s ease,transform 0.16s ease}
.cf-calendar-actions-7 .cfa7-cta svg{flex:none}
.cf-calendar-actions-7 .cfa7-cta:not([aria-disabled]):hover,.cf-calendar-actions-7[data-state='hover'] .cfa7-cta:not([aria-disabled]){background:linear-gradient(oklch(from var(--cfa7-b) calc(l - 0.01) c h),oklch(from var(--cfa7-b2) calc(l - 0.07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cfa7-b) calc(l + 0.12) c h / 0.7),inset 0 -3px 0 oklch(from var(--cfa7-b) calc(l - 0.18) c h),0 1px 2px oklch(from var(--cfa7-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--cfa7-shadow) l c h / 0.55))}
.cf-calendar-actions-7 .cfa7-cta:not([aria-disabled]):active,.cf-calendar-actions-7[data-state='active'] .cfa7-cta:not([aria-disabled]){transform:translateY(1px);background:linear-gradient(oklch(from var(--cfa7-b) calc(l - 0.05) c h),oklch(from var(--cfa7-b2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--cfa7-b2) calc(l - 0.2) c h / 0.45),inset 0 -2px 0 oklch(from var(--cfa7-b) calc(l - 0.16) c h),0 1px 1px oklch(from var(--cfa7-shadow) l c h / 0.3)}
.cf-calendar-actions-7 .cfa7-cta:focus{outline:none}
.cf-calendar-actions-7 .cfa7-cta:focus-visible,.cf-calendar-actions-7 .cfa7-cta.is-focus{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-calendar-actions-7 .cfa7-cta[aria-disabled]{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none}
.cf-calendar-actions-7 .cfa7-reassure{margin:12px 0 0;font-size:0.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty;color:var(--muted)}
.cf-calendar-actions-7 .cfa7-reassure svg{display:inline-block;vertical-align:-0.18em;margin-inline-end:0.4em;color:var(--accent)}
.cf-calendar-actions-7 .cfa7-list{margin:56px 0 0}
.cf-calendar-actions-7 .cfa7-list-h{margin:0 0 12px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-rows{display:grid;margin:0;padding:0;list-style:none}
.cf-calendar-actions-7 .cfa7-row{display:grid;grid-template-columns:44px minmax(0,1fr);gap:4px 14px;padding:16px 12px;border-radius:12px;border-top:1px solid oklch(from var(--ink) l c h / 0.1);transition:background 0.16s ease}
.cf-calendar-actions-7 .cfa7-row:first-child,.cf-calendar-actions-7 .cfa7-row[data-active],.cf-calendar-actions-7 .cfa7-row[data-active] + .cfa7-row{border-top-color:transparent}
.cf-calendar-actions-7 .cfa7-row[data-active]{background:color-mix(in oklch,var(--accent) 9%,var(--surface))}
.cf-calendar-actions-7 .cfa7-rows.is-one .cfa7-row{grid-template-columns:minmax(0,1fr)}
.cf-calendar-actions-7 .cfa7-rnum{padding-top:2px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.625rem;line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-calendar-actions-7 .cfa7-rbody{min-width:0}
.cf-calendar-actions-7 .cfa7-rtitle{margin:0;font-size:1.0625rem;font-weight:800;line-height:1.3;text-wrap:pretty;color:var(--ink)}
.cf-calendar-actions-7 .cfa7-rmeta{margin:4px 0 0;font-size:0.9375rem;font-weight:500;line-height:1.4;text-wrap:pretty;color:var(--muted)}
.cf-calendar-actions-7 .cfa7-row[data-active] .cfa7-rmeta{color:var(--ink)}
.cf-calendar-actions-7 .cfa7-rlinks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:320px;margin:12px 0 0}
.cf-calendar-actions-7 .cfa7-plink{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:0 12px;white-space:nowrap;border-radius:var(--button-radius,var(--radius,12px));border:1px solid var(--button-2-border,transparent);background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:0.9375rem;line-height:1.1;text-transform:var(--button-case,none);text-decoration:none;cursor:pointer;transition:background 0.16s ease,transform 0.16s ease}
.cf-calendar-actions-7 .cfa7-plink:not([aria-disabled]):hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cf-calendar-actions-7 .cfa7-plink:not([aria-disabled]):active{transform:translateY(1px);background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.07) c h)}
.cf-calendar-actions-7 .cfa7-plink:focus{outline:none}
.cf-calendar-actions-7 .cfa7-plink:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-calendar-actions-7 .cfa7-plink[aria-disabled]{cursor:not-allowed;box-shadow:none}
.cf-calendar-actions-7 .cfa7-plink[aria-disabled] .cfa7-mark{filter:grayscale(1)}
.cf-calendar-actions-7 .cfa7-mark{flex:none;width:18px;height:18px}
@container (min-width: 480px){
.cf-calendar-actions-7 .cfa7-cell{aspect-ratio:auto;height:52px}
.cf-calendar-actions-7 .cfa7-meta{display:flex;flex-wrap:wrap;gap:8px 24px}
}
@media (max-width: 900px){
.cf-calendar-actions-7 .cfa7-split{grid-template-columns:minmax(0,1fr)}
.cf-calendar-actions-7 .cfa7-stage{justify-content:center;padding-left:clamp(16px,5vw,48px);padding-right:clamp(16px,5vw,48px);padding-bottom:clamp(48px,8vw,80px)}
.cf-calendar-actions-7 .cfa7-stage-in{position:relative;top:auto}
.cf-calendar-actions-7 .cfa7-letter{justify-content:center;padding:clamp(48px,8vw,80px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-calendar-actions-7 .cfa7-letter-in{max-width:640px}
}
@media (max-width: 480px){
.cf-calendar-actions-7{--cal-gap:4px}
.cf-calendar-actions-7 .cfa7-stage,.cf-calendar-actions-7 .cfa7-letter{padding-left:16px;padding-right:16px}
.cf-calendar-actions-7 .cfa7-panel{padding:10px}
.cf-calendar-actions-7 .cfa7-panel-head{padding-left:4px}
.cf-calendar-actions-7 .cfa7-panel-head.has-art{padding-right:80px}
.cf-calendar-actions-7 .cfa7-loaf{top:-36px;right:-6px;width:88px;height:88px}
.cf-calendar-actions-7 .cfa7-cta{display:flex;width:100%;min-height:64px;padding:0 20px}
.cf-calendar-actions-7 .cfa7-row{grid-template-columns:36px minmax(0,1fr);gap:4px 12px;padding:14px 8px}
}
@keyframes cfa7-rise{from{opacity:0.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){
.cf-calendar-actions-7 .cfa7-read-in{animation:none}
.cf-calendar-actions-7 .cfa7-day,.cf-calendar-actions-7 .cfa7-cta,.cf-calendar-actions-7 .cfa7-plink,.cf-calendar-actions-7 .cfa7-row{transition:none}
.cf-calendar-actions-7 .cfa7-day:hover,.cf-calendar-actions-7 .cfa7-day[aria-pressed='true'],.cf-calendar-actions-7 .cfa7-day:active,.cf-calendar-actions-7 .cfa7-cta:not([aria-disabled]):active,.cf-calendar-actions-7[data-state='active'] .cfa7-cta:not([aria-disabled]),.cf-calendar-actions-7 .cfa7-plink:not([aria-disabled]):active{transform:none}
}
`
pieces/checkout/calendar-actions-7/specimen.tsx 116 lines
import __studioImagecd5b2de7 from "../assets/5aca7aa8b701db98.webp";
import __studioImage302b34b5 from "../assets/92ab75313559a8c1.webp";
// Specimen: Rise Bakehouse's 5-Day Sourdough Challenge in the month-view calendar close (plus the single-day bake-along variant).
import { CalendarActions7, type CalendarActions7State, type CalendarSession } from '../calendar-actions-7'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'focus', 'disabled', 'single']
type SpecimenState = CalendarActions7State | 'single'
const CHALLENGE: CalendarSession[] = [
{
title: 'Wake up your starter',
startsAt: '2027-03-08T19:00:00-05:00',
endsAt: '2027-03-08T20:00:00-05:00',
detail: 'Feed, float-test and set up the jar you will bake with all week.',
},
{
title: 'Mix your first dough',
startsAt: '2027-03-09T19:00:00-05:00',
endsAt: '2027-03-09T20:00:00-05:00',
detail: 'Flour, water, salt and starter, weighed together, with the rest times explained.',
},
{
title: 'Stretch, fold and read the rise',
startsAt: '2027-03-10T19:00:00-05:00',
endsAt: '2027-03-10T20:00:00-05:00',
detail: 'Four sets of folds, and how to tell when bulk fermentation is done.',
},
{
title: 'Shape, score and cold-proof',
startsAt: '2027-03-11T19:00:00-05:00',
endsAt: '2027-03-11T20:00:00-05:00',
detail: 'Build surface tension, practise your first score and set it overnight in the fridge.',
},
{
title: 'Bake day: slice your first loaf',
startsAt: '2027-03-12T19:00:00-05:00',
endsAt: '2027-03-12T20:00:00-05:00',
detail: 'Dutch-oven bake, steam and colour, then the open-crumb cut together.',
},
]
const BAKE_ALONG: CalendarSession[] = [
{
title: 'Bake your first loaf, live',
startsAt: '2027-03-13T10:00:00-05:00',
endsAt: '2027-03-13T11:30:00-05:00',
detail: 'Bring a mixed, cold-proofed dough. We score, bake and slice together.',
},
]
export default function CalendarActions7Specimen({ state = 'default' }: { state?: SpecimenState }) {
const presenterImage = slot(
'presenter',
__studioImagecd5b2de7,
)
const productImage = slot(
'product',
__studioImage302b34b5,
)
const shared = {
timezone: 'America/New_York',
location: 'Live online in the Rise Bakehouse classroom',
presenterImage,
presenterAlt: 'Maren Holt, head baker at Rise Bakehouse',
productImage,
productAlt: 'A golden sourdough loaf with a curled, open ear',
signoff: 'See you at the bench,',
signName: 'Maren Holt',
signRole: 'Head baker, Rise Bakehouse',
}
if (state === 'single') {
return (
<CalendarActions7
{...shared}
eventName='Rise Bakehouse Bake-Along'
sessions={BAKE_ALONG}
description='Rise Bakehouse live bake-along. Have your Dutch oven, a lame or sharp blade and your proofed dough ready.'
fileName='rise-bake-along.ics'
heading='Save your spot at Saturday’s bake-along'
letter={[
'One focused morning is all it takes to get your first loaf out of the oven.',
'Put it on your calendar now, so Saturday is already blocked out and your dough is waiting in the fridge.',
]}
copy={{ instructionOne: 'Click the button below to put the bake-along on your calendar.' }}
/>
)
}
return (
<CalendarActions7
{...shared}
eventName='5-Day Sourdough Challenge'
sessions={CHALLENGE}
description='Rise Bakehouse 5-Day Sourdough Challenge. Have your starter, bread flour, salt and a Dutch oven ready.'
fileName='rise-sourdough-challenge.ics'
heading='Save all five nights. On Friday, you slice your own loaf.'
lead='Hover or tap any highlighted day to see that night’s lesson and start time.'
letter={[
'Almost everyone shows up for day one of a challenge. Far fewer make it to day five, and day five is when the loaf comes out of the oven.',
'So before you do anything else, put every session on your calendar. Five evenings, one hour each, 7 PM Eastern. Treat them like appointments you can’t move.',
'Do that, and on Friday night you’ll be slicing a crackling loaf raised by your own starter.',
]}
copy={{
legend: 'Challenge night',
instructionMany: 'Click the button below to put all five nights on your calendar.',
listHeadingMany: 'Or save each night on its own',
}}
state={state}
initialDay={state === 'focus' || state === 'hover' || state === 'active' ? 2 : 0}
/>
)
}
| Name | Type | Details |
|---|---|---|
sessions RequiredCalendarActions7 |
CalendarSession[] |
|
eventName RequiredCalendarActions7 |
string |
|
timezone RequiredCalendarActions7 |
string |
|
timezoneLabel OptionalCalendarActions7 |
string |
|
locale OptionalCalendarActions7 |
string |
Default 'en-US'
|
weekStartsOn OptionalCalendarActions7 |
0 | 1 |
Default 0
|
defaultMinutes OptionalCalendarActions7 |
number |
Default 60
|
reminderMinutes OptionalCalendarActions7 |
number |
Default 30
|
location OptionalCalendarActions7 |
string |
|
description OptionalCalendarActions7 |
string |
|
fileName OptionalCalendarActions7 |
string |
|
heading OptionalCalendarActions7 |
React.ReactNode |
|
lead OptionalCalendarActions7 |
React.ReactNode |
|
letter OptionalCalendarActions7 |
React.ReactNode[] |
|
signoff OptionalCalendarActions7 |
React.ReactNode |
|
signName OptionalCalendarActions7 |
string |
|
signRole OptionalCalendarActions7 |
React.ReactNode |
|
presenterImage OptionalCalendarActions7 |
string |
|
presenterAlt OptionalCalendarActions7 |
string |
|
productImage OptionalCalendarActions7 |
string |
|
productAlt OptionalCalendarActions7 |
string |
Default ''
|
copy OptionalCalendarActions7 |
Partial<CalendarActions7Copy> |
|
initialDay OptionalCalendarActions7 |
number |
Default 0
|
disabled OptionalCalendarActions7 |
boolean |
Default false
|
state OptionalCalendarActions7 |
CalendarActions7State |
Default 'default'
|
onAction OptionalCalendarActions7 |
(kind: CalendarActionKind, sessionIndex: number | null, event: React.MouseEvent<HTMLAnchorElement>) => void |
|
className OptionalCalendarActions7 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter- A photo of the host, coach or founder.
product- The main product shot or cover (ebook, kit, bottle).
-
5aca7aa8b701db98.webp
image/webp · 166 KB
-
92ab75313559a8c1.webp
image/webp · 593 KB