Skip to content

v3.5.0

Choose a tag to compare

@linyows linyows released this 26 Apr 08:12
· 39 commits to main since this release
83ff34d

What's Changed

Features

  • Add Calendar database view — a Notion-style monthly calendar for databases with a date property. Renders events in a 7-column grid with weekday/header navigation (prev / today / next), weekStart ('sunday' | 'monday'), locale, and initialDate options. Supports the same href / link / query API as Gallery / Table / List. by @linyows in #215

    import { Calendar } from 'rotion/ui'
    
    <Calendar
      db={db}
      date="Date"
      keys={['Name', 'Tags']}
      options={{ initialDate: '2026-04-01', weekStart: 'monday', locale: 'ja-JP' }}
    />
  • Multi-day spanning event bars — events with both start and end are drawn as a single continuous bar across cells, with squared-off continuation edges at week boundaries (Notion-style). Per-week slot allocation stacks overlapping events in vertical lanes.

  • Localized header and weekday labels — month label and weekday short names use Intl.DateTimeFormat(locale, ...) so any locale (fr-FR, de-DE, etc.) gets native names. Today / Previous month / Next month controls and aria-labels are localized via a small ja/en map.

  • Weekend cell tinting — Saturday/Sunday cells are tinted via new --rotion-calendar-weekend-bg / --rotion-dark-calendar-weekend-bg tokens (#f9f8f7 / #202020).

Internal

  • New components under src/ui/components/Calendar/: Calendar, CalendarHeader, CalendarWeek, CalendarCell, CalendarEvent, plus a small shared lib.ts for the date-key helper.
  • One-pass event parsing: pages are parsed and sorted once per db.results change, then placed per week, instead of re-scanning all events for every week.
  • Storybook stories include ThisMonthMultiDaySpans (and a linked variant) that mutate the fixture so the spanning layout is visible in the current month.

Full Changelog: v3.4.2...v3.5.0