Skip to content

@sakaniui/react 0.20.0

Choose a tag to compare

@samzydd samzydd released this 21 Nov 08:24
· 17 commits to main since this release

Added

  • Calendar views: MonthCalendar, WeekCalendar, DayPanel and CalendarEvent. Calendar is a date picker; these show events. MonthCalendar is a month grid with chips, bars that run across days (all-day and multi-day events), "N more" and a lit day. WeekCalendar is a time grid (7 days or a 5-day work week): events as tall as they are long, overlapping ones side by side, an all-day lane, and a line for now. Both take plain events ({ id, title, start, end, allDay?, color?, location?, meta? }), report changes through callbacks (onEventClick, onEventMove, onSlotClick, onMoreClick) and own no data. Drag an event to another day (month) or day and time (week, snapping to snapMinutes, default 15); Alt + arrows moves a focused event, so it works without a mouse. DayPanel is one day beside either view: how many events, hours booked and free, a strip of the working day, all-day events, the schedule in order, and each free gap of 30 minutes or more as a "Block focus time" button. Event colours come from the chart tokens. Two blocks show them on their own, Week Calendar and Month Calendar (Blocks / Application / Calendar): a header with the month, a line about what is in view, previous / Today / next and New event (and a Week / Work week switch on the week), the grid in a rounded frame below it, and a card that opens on an event with when, where, which calendar, Delete and Done. On the month, "N more" opens that day's events as a short list. Nothing existing changes.