@super-calendar/dom 2.16.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,15 @@ The react-dom renderer for [super-calendar](https://github.com/afonsojramos/supe
6
6
 
7
7
  It is built on the headless [`@super-calendar/core`](https://www.npmjs.com/package/@super-calendar/core) and Legend List's DOM renderer.
8
8
 
9
+ ## All-day spans
10
+
11
+ In the time grid, an all-day event renders once as a bar across the visible
12
+ dates it covers. Overlapping events stack on separate rows. The end is
13
+ exclusive, and hidden days take no width. `renderEvent` and press callbacks
14
+ receive the original event; `continuesBefore` and `continuesAfter` indicate
15
+ clipping at the visible range edges. The `allDayColumn` slot styles one
16
+ spanning cell. Timed events that cross midnight keep their per-day segments.
17
+
9
18
  ## Install
10
19
 
11
20
  ```sh
@@ -69,6 +78,53 @@ Set `touchDragDelay` and `touchDragThreshold` on `TimeGrid` or `Calendar` to adj
69
78
  the hold. Mouse drag and resize retain their existing behavior. See the
70
79
  [dragging guide](https://super-calendar.afonsojramos.me/guides/dragging).
71
80
 
81
+ ## Multi-week grids
82
+
83
+ Use `mode="multiweek"` with `numberOfWeeks` (default `2`) for consecutive full
84
+ week rows without hourly slots. The first week contains `date` and aligns to
85
+ `weekStartsOn`. Navigation moves by the full number of weeks. `hiddenDays` only
86
+ shortens rows; `custom` views remain hourly even above seven columns.
87
+
88
+ ```tsx
89
+ import { useState } from "react";
90
+ import { Calendar } from "@super-calendar/dom";
91
+
92
+ export function MultiWeekCalendar() {
93
+ const [date, setDate] = useState(new Date(2026, 11, 28));
94
+ return (
95
+ <Calendar
96
+ mode="multiweek"
97
+ numberOfWeeks={3}
98
+ weekStartsOn={1}
99
+ date={date}
100
+ onChangeDate={setDate}
101
+ events={[]}
102
+ height={480}
103
+ />
104
+ );
105
+ }
106
+ ```
107
+
108
+ `MultiWeekView` exposes a standalone window with the month grid's event bars,
109
+ overflow, selection, drag interactions, and styling. Pass expanded events to it;
110
+ `Calendar` handles recurrence and time zones. Custom event renderers receive
111
+ `mode: "multiweek"`. Rows scroll vertically when the container is too short.
112
+ Event chips and overflow buttons default to 24 pixels high; use `chipHeight` to customize them.
113
+ Counts must be positive safe integers whose date span is representable; invalid
114
+ counts or dates throw `RangeError`. Rows are materialized, so larger counts need
115
+ more space. `MonthView` retains its month-only behavior.
116
+
117
+ In month and multi-week grids, Escape or cancellation of the active pointer
118
+ ends a create or move gesture without committing. Release and cancellation events from other pointers do not end that gesture.
119
+
120
+ In the multi-week web grid, a quick touch swipe scrolls. Hold a day or event for
121
+ 400 ms, then drag to create or move. Mouse input starts immediately. Cancelling
122
+ the pointer or changing the displayed window cancels the hold or drag.
123
+
124
+ Keep `events` stable during unrelated UI updates. With recurrence or `timeZone`,
125
+ replacing the array rebuilds displayed events and cancels a held move. See
126
+ [keep event data stable](https://super-calendar.afonsojramos.me/guides/events#keep-event-data-stable).
127
+
72
128
  ## Moving events
73
129
 
74
130
  Pass `onDragEvent` and update your event state with the returned `start` and `end`.
@@ -77,6 +133,12 @@ Time-grid edge paging requires a mouse drag. Touch and pen remain within the
77
133
  visible period, so resting near an edge cannot repeatedly change the date.
78
134
  See the [dragging guide](https://super-calendar.afonsojramos.me/guides/dragging).
79
135
 
136
+ While you move or resize a time-grid event, `renderTimeEvent` (or a
137
+ `TimeGrid` `renderEvent`) receives a copy of the event whose `start` and `end`
138
+ are the times the drop would report, so the label updates as you drag. Compare
139
+ events by a stable ID inside a renderer. After a drag pages the view, the floating
140
+ preview keeps the stored times until release.
141
+
80
142
  On the time grid, dragging any segment of a multi-day event previews the whole
81
143
  range moving together and preserves its duration. Drag a resize grip to change
82
144
  only the start or end. See the [dragging guide](https://super-calendar.afonsojramos.me/guides/dragging).
@@ -99,6 +161,10 @@ refreshes close it. See
99
161
  Active gestures retain the original event through live insertions and reordering;
100
162
  removing the event or lane, losing capture, or unmounting cancels the gesture.
101
163
 
164
+ In time grids, `getEventId` also preserves all-day focus and renderer state when
165
+ a refresh replaces event objects. Bars without a valid, unique ID use object
166
+ identity and remount when that object changes.
167
+
102
168
  ## Month chip dimensions
103
169
 
104
170
  `chipHeight` and `chipGap` configure month lanes and overflow rows on `Calendar`,
@@ -128,8 +194,26 @@ On the time grid, an empty-slot touch tap calls `onPressCell` from the column's
128
194
  click. Swipes and cancelled contacts do not press the slot. Mouse and pen retain
129
195
  drag-to-create behavior. See the [DOM guide](https://super-calendar.afonsojramos.me/guides/dom).
130
196
 
131
- The drag-to-create preview stays within the visible hours of the pressed column,
132
- with its border inside the column.
197
+ The drag-to-create preview snaps to the same range as `onCreateEvent`, starting
198
+ with one slot on press. It stays within the visible hours of the pressed column,
199
+ with its border inside the column. `dragStepMinutes` sets the snap interval.
200
+ Short previews use `minEventHeight`, like committed events. Clipping to the
201
+ visible hours takes priority at the column edges.
202
+
203
+ `TimeGrid` completes creation on pointer release even if capture is lost just
204
+ before it. Capture loss without a matching release and pointer cancellation
205
+ cancel the sweep. If a release outside the window is missed, a new press cancels
206
+ the stale sweep before starting another interaction. Text selection and native
207
+ browser dragging are disabled only while a mouse or pen sweep is active.
208
+
209
+ `MonthView`, `MultiWeekView`, and `Calendar` in month and multi-week modes also
210
+ accept `renderCreateGhost`. It receives the full all-day range with an exclusive
211
+ end, once per covered row. Use date labels for this content. The preview follows
212
+ `chipHeight` and `chipGap`, uses the `createGhost` slot, and requires
213
+ `onCreateEvent`. It is clipped, noninteractive, and hidden from assistive
214
+ technology. Empty months use the event-grid layout when both props are set.
215
+ Set `keyboardDayNavigation` to keep arrow-key day navigation in that layout,
216
+ including before the first event exists.
133
217
 
134
218
  Pass `renderCreateGhost` to `TimeGrid`, `Calendar`, or `ResourceTimeline` to draw
135
219
  a draft inside that preview. Define the component once, outside render:
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Locale } from "date-fns";
2
2
  import { CSSProperties, ComponentType, ReactElement, ReactNode, RefAttributes } from "react";
3
- import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarHandle, CalendarHandle as CalendarHandle$1, CalendarLabels, CalendarLabels as CalendarLabels$1, CalendarMode, CalendarMode as CalendarMode$1, CreateGhostArgs, CreateGhostArgs as CreateGhostArgs$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
3
+ import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarHandle, CalendarHandle as CalendarHandle$1, CalendarLabels, CalendarLabels as CalendarLabels$1, CalendarMode, CalendarMode as CalendarMode$1, CreateGhostArgs, CreateGhostArgs as CreateGhostArgs$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMultiWeekGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
4
4
  /**
5
5
  * Per-slot styling overrides. Give a slot a Tailwind/CSS class and/or an inline
6
6
  * style; missing slots keep the built-in look.
@@ -78,6 +78,13 @@ interface AgendaProps<T = unknown> extends SlotStyleProps<AgendaSlot> {
78
78
  events: CalendarEvent$1<T>[];
79
79
  /** date-fns locale for the day headers and time labels. */
80
80
  locale?: Locale;
81
+ /**
82
+ * The instant whose calendar day is highlighted as today. Defaults to the
83
+ * device clock, and is read in `timeZone` when one is set.
84
+ */
85
+ now?: Date;
86
+ /** Highlight today as it is in this IANA time zone (default: the device's). */
87
+ timeZone?: string;
81
88
  /** Render times in 12-hour AM/PM (default false, 24h). */
82
89
  ampm?: boolean;
83
90
  /** Highlight this date's header instead of the real "today". */
@@ -114,7 +121,7 @@ interface AgendaProps<T = unknown> extends SlotStyleProps<AgendaSlot> {
114
121
  * <Agenda events={events} onPressEvent={(e) => console.log(e.title)} />
115
122
  * ```
116
123
  */
117
- export declare function Agenda<T = unknown>({ events, locale, ampm, activeDate, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, onPressEvent, onPressDay, className, style, classNames, styles }: AgendaProps<T>): ReactElement;
124
+ export declare function Agenda<T = unknown>({ events, locale, now, timeZone, ampm, activeDate, theme: themeOverrides, height, renderEvent, eventAccessibilityLabel, onPressEvent, onPressDay, className, style, classNames, styles }: AgendaProps<T>): ReactElement;
118
125
  /**
119
126
  * Styleable parts of {@link YearView}. Pass a class or inline style per slot
120
127
  * via the `classNames` / `styles` props; day cells carry `data-today`,
@@ -133,6 +140,13 @@ interface YearViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
133
140
  /** Weekdays (0=Sunday…6=Saturday) hidden from the grid, e.g. `[0, 6]` for weekends off. */
134
141
  hiddenDays?: number[];
135
142
  locale?: Locale;
143
+ /**
144
+ * The instant whose calendar day is highlighted as today. Defaults to the
145
+ * device clock, and is read in `timeZone` when one is set.
146
+ */
147
+ now?: Date;
148
+ /** Highlight today as it is in this IANA time zone (default: the device's). */
149
+ timeZone?: string;
136
150
  /** Translations for the screen-reader words; omitted keys use English. */
137
151
  labels?: Partial<CalendarLabels$1>;
138
152
  /** Highlight this date instead of the real "today". */
@@ -178,18 +192,20 @@ interface YearViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
178
192
  * highlighted and a dot under days that hold events. It's the view `Calendar`
179
193
  * renders for `mode="year"`.
180
194
  */
181
- export declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, labels: labelsProp, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
195
+ export declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, now, timeZone, labels: labelsProp, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
182
196
  /**
183
197
  * Styleable parts of {@link MonthView}. Pass a class or inline style per slot via
184
198
  * the `classNames` / `styles` props to restyle just that part.
185
199
  */
186
- type MonthViewSlot = "title" | "weekdays" | "weekday" | "grid" | "week" | "day" | "dayBadge" | "rangeBand" | "events" | "chipButton" | "chip" | "more" | "morePopover";
200
+ type MonthViewSlot = "title" | "weekdays" | "weekday" | "grid" | "week" | "day" | "dayBadge" | "rangeBand" | "events" | "createGhost" | "chipButton" | "chip" | "more" | "morePopover";
187
201
  /** Props passed to a custom month event chip renderer. */
188
202
  interface DomMonthEventArgs<T = unknown> {
189
203
  /** The event to render. */
190
204
  event: CalendarEvent$1<T>;
191
205
  /** Call to fire the view's `onPressEvent` for this chip. */
192
206
  onPress: () => void;
207
+ /** The current row view. Supplied by the calendar; optional for existing standalone chip callers. */
208
+ mode?: "month" | "multiweek";
193
209
  }
194
210
  /** A component that renders a single month-grid event chip. */
195
211
  type DomMonthEvent<T = unknown> = ComponentType<DomMonthEventArgs<T>>;
@@ -255,6 +271,13 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
255
271
  showWeekdays?: boolean;
256
272
  /** date-fns locale for the title and weekday labels. */
257
273
  locale?: Locale;
274
+ /**
275
+ * The instant whose calendar day is highlighted as today. Defaults to the
276
+ * device clock, and is read in `timeZone` when one is set.
277
+ */
278
+ now?: Date;
279
+ /** Highlight today as it is in this IANA time zone (default: the device's). */
280
+ timeZone?: string;
258
281
  /** Theme overrides; falls back to the default light theme. */
259
282
  theme?: Partial<DomCalendarTheme>;
260
283
  /** Fired when a selectable day is clicked. */
@@ -272,6 +295,12 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
272
295
  * carry `data-creating` for styling.
273
296
  */
274
297
  onCreateEvent?: (start: Date, end: Date) => void;
298
+ /**
299
+ * Custom content for a drag-to-create preview, once per covered week row.
300
+ * Receives the full all-day range with an exclusive end. Requires onCreateEvent.
301
+ * Content is clipped, noninteractive, and hidden from assistive technology.
302
+ */
303
+ renderCreateGhost?: ComponentType<CreateGhostArgs$1>;
275
304
  /**
276
305
  * Reports the day span of a create sweep **as it happens**, as the ordered
277
306
  * inclusive `[start, end]` days (both at midnight), so a selection highlight can
@@ -317,7 +346,7 @@ interface MonthViewInternalProps<T = unknown> extends MonthViewProps<T> {
317
346
  * <MonthView date={new Date()} events={events} onPressDay={(d) => setDate(d)} />
318
347
  * ```
319
348
  */
320
- export declare function MonthView<T = unknown>({ date, weekStartsOn, hiddenDays, weekdayFormat, events, eventsByDay: eventsByDayProp, renderEvent, eventAccessibilityLabel, maxVisibleEventCount, chipHeight, chipGap, moreLabel, labels: labelsProp, onPressEvent, onPressMore, selectedRange, selectedDates, showAdjacentMonths, highlightWeekends, fillCellOnSelection, showTitle, showWeekdays, locale, theme: themeOverrides, minDate, maxDate, isDateDisabled, onPressDay, onPressCell, onCreateEvent, onSelectDrag, onDragEvent, onDragStart, eventStartEditable, eventOverlap, keyboardDayNavigation, className, style, classNames, styles }: MonthViewInternalProps<T>): ReactElement;
349
+ export declare function MonthView<T = unknown>({ date, showAdjacentMonths, ...rest }: MonthViewInternalProps<T>): ReactElement;
321
350
  /** Styleable parts of the built-in move and resize actions. */
322
351
  type EventActionsSlot = "eventActionsTrigger" | "eventActionsList" | "eventActions" | "eventAction";
323
352
  /**
@@ -327,7 +356,12 @@ type EventActionsSlot = "eventActionsTrigger" | "eventActionsList" | "eventActio
327
356
  type TimeGridSlot = "header" | "weekNumber" | "columnHeader" | "columnHeaderWeekday" | "columnHeaderDate" | "allDayLane" | "allDayLabel" | "allDayColumn" | "allDayEvent" | "hourGutter" | "hourLabel" | "dayColumn" | "gridLines" | "businessHours" | "backgroundEvent" | "event" | "eventBox" | "nowIndicator" | "createGhost" | EventActionsSlot;
328
357
  /** Props passed to a custom time-grid event renderer. */
329
358
  interface DomRenderEventArgs<T = unknown> {
330
- /** The event to render. */
359
+ /**
360
+ * The event to render. While it is being moved or resized, a copy whose
361
+ * `start` and `end` are the times `onDragEvent` would report on release.
362
+ * After a drag pages the view, the floating preview keeps the stored times
363
+ * until release.
364
+ */
331
365
  event: CalendarEvent$1<T>;
332
366
  /** The current view mode. */
333
367
  mode: CalendarMode$1;
@@ -335,9 +369,9 @@ interface DomRenderEventArgs<T = unknown> {
335
369
  isAllDay: boolean;
336
370
  /** Pixel height of the event box (timed events only). */
337
371
  boxHeight?: number;
338
- /** The event started before the visible day and continues into it. */
372
+ /** Starts before the visible day (timed) or visible date range (all-day). */
339
373
  continuesBefore?: boolean;
340
- /** The event continues past the visible day. */
374
+ /** Ends after the visible day (timed) or visible date range (all-day). */
341
375
  continuesAfter?: boolean;
342
376
  /** Show the time range in 12-hour AM/PM. */
343
377
  ampm?: boolean;
@@ -423,9 +457,15 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
423
457
  renderBackgroundEvent?: DomRenderEvent<T>;
424
458
  /** Show the current-time indicator on today's column (default true). */
425
459
  showNowIndicator?: boolean;
426
- /** Fixed "now" instant for the indicator (doesn't tick). Defaults to the device clock. */
460
+ /**
461
+ * Fixed "now" instant for the indicator (doesn't tick) and for the day
462
+ * highlighted as today. Defaults to the device clock.
463
+ */
427
464
  now?: Date;
428
- /** Shift the now indicator into this IANA zone (pair with `eventsInTimeZone`). */
465
+ /**
466
+ * Shift the now indicator and the day highlighted as today into this IANA zone
467
+ * (pair with `eventsInTimeZone`).
468
+ */
429
469
  timeZone?: string;
430
470
  /** Show the all-day lane above the grid (default true). */
431
471
  showAllDayEventCell?: boolean;
@@ -493,7 +533,7 @@ interface TimeGridProps<T = unknown> extends SlotStyleProps<TimeGridSlot> {
493
533
  * Return `false` to reject the drop (the event snaps back).
494
534
  */
495
535
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
496
- /** Stable, unique event identity for the web editing dialog across data refreshes. */
536
+ /** Stable, unique identity for the editing dialog and all-day bars across data refreshes. */
497
537
  getEventId?: (event: CalendarEvent$1<T>) => string | number;
498
538
  /**
499
539
  * Page the grid to a new anchor date. Supplying it alongside `onDragEvent`
@@ -528,8 +568,9 @@ type CalendarSlot = MonthViewSlot | TimeGridSlot | AgendaSlot | YearViewSlot;
528
568
  /** Props for {@link Calendar}. */
529
569
  interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotStyleProps<CalendarSlot> {
530
570
  /**
531
- * The view to render (default "week"). `month` renders a month grid, `schedule`
532
- * a day-grouped agenda list, and the others a time grid.
571
+ * The view to render (default "week"). `month` renders a month grid,
572
+ * `multiweek` stacked week rows, `schedule` a day-grouped agenda list, `year`
573
+ * twelve mini months, and the others a time grid.
533
574
  */
534
575
  mode?: CalendarMode$1;
535
576
  /**
@@ -542,8 +583,9 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
542
583
  date: Date;
543
584
  /**
544
585
  * Fires with the next/previous period's date when the user pages the focused
545
- * calendar with **PageDown** / **PageUp** (a month in `month`, a week in
546
- * `schedule`, else the view's day span). It's controlled, so update `date` in
586
+ * calendar with **PageDown** / **PageUp** (a month in `month`,
587
+ * `numberOfWeeks` weeks in `multiweek`, a week in `schedule`, else the view's
588
+ * day span). It's controlled, so update `date` in
547
589
  * response. Omit it to leave paging to your own controls.
548
590
  */
549
591
  onChangeDate?: (date: Date) => void;
@@ -554,19 +596,27 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
554
596
  /** Weekdays (0=Sunday…6=Saturday) hidden from the grid, e.g. `[0, 6]` for weekends off. */
555
597
  hiddenDays?: number[];
556
598
  /**
557
- * Fixed "now" instant for the current-time indicator (doesn't tick), e.g. a
558
- * server-synced clock. Defaults to the device clock, shifted into `timeZone`
559
- * when one is set so the line matches the displayed events.
599
+ * Fixed "now" instant for the current-time indicator (doesn't tick) and for
600
+ * the day highlighted as today in every mode, e.g. a server-synced clock.
601
+ * Defaults to the device clock, shifted into `timeZone` when one is set so
602
+ * both match the displayed events.
560
603
  */
561
604
  now?: Date;
562
605
  /** Column count for `mode="custom"`. */
563
606
  numberOfDays?: number;
607
+ /**
608
+ * Week rows for `mode="multiweek"`: a positive whole number, default 2. The
609
+ * rows start on the week containing `date`. Other values throw a `RangeError`.
610
+ */
611
+ numberOfWeeks?: number;
564
612
  /** date-fns locale for titles, headers, and time labels. */
565
613
  locale?: Locale;
566
614
  /**
567
615
  * Display events in this IANA time zone (e.g. `"America/New_York"`), DST-correct
568
616
  * and independent of the device zone. Display-only: it shifts the wall-clock the
569
- * grid lays out from, it doesn't change your `Date`s. Uses `eventsInTimeZone`.
617
+ * grid lays out from, it doesn't change your `Date`s, and callbacks report your
618
+ * own events and real instants. All-day events stay on their days. Uses
619
+ * `eventsInTimeZone`.
570
620
  */
571
621
  timeZone?: string;
572
622
  /** Theme overrides; falls back to the default light theme. */
@@ -660,8 +710,9 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
660
710
  */
661
711
  onCreateEvent?: (start: Date, end: Date) => void;
662
712
  /**
663
- * A component that draws content inside the time-grid drag-to-create preview;
664
- * see `TimeGrid`'s prop of the same name. Applies to the week/day grid only.
713
+ * A component that draws content inside a creation preview in time-grid, month
714
+ * and multi-week modes. Month rows receive the full all-day range with an
715
+ * exclusive end, once per covered row. Requires onCreateEvent.
665
716
  */
666
717
  renderCreateGhost?: ComponentType<CreateGhostArgs$1>;
667
718
  /** Fires when an event drag begins. */
@@ -672,7 +723,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
672
723
  * days dragged so the time of day and duration are kept.
673
724
  */
674
725
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
675
- /** Stable, unique event identity for the web editing dialog across data refreshes. */
726
+ /** Stable, unique identity for the editing dialog and time-grid all-day bars across data refreshes. */
676
727
  getEventId?: (event: CalendarEvent$1<T>) => string | number;
677
728
  /** Tap a day's column header. */
678
729
  onPressDateHeader?: (day: Date) => void;
@@ -881,6 +932,39 @@ interface DateRangePickerProps extends PickerBaseProps {
881
932
  * ```
882
933
  */
883
934
  export declare function DateRangePicker({ value, onChange, formatLabel, weekStartsOn, height, placeholder, disabled, theme: themeOverrides, className, style, classNames, styles, minDate, maxDate, isDateDisabled }: DateRangePickerProps): ReactElement;
935
+ /** Props for {@link MultiWeekView}. */
936
+ interface MultiWeekViewProps<T = unknown> extends Omit<MonthViewProps<T>, "date" | "weekStartsOn" | "showAdjacentMonths"> {
937
+ /**
938
+ * Any day in the first week to show. The rows start on the `weekStartsOn` day
939
+ * on or before it, in the device's local calendar.
940
+ */
941
+ date: Date;
942
+ /**
943
+ * How many consecutive full weeks to show, as stacked rows. A positive whole
944
+ * number; default 2. Other values throw a `RangeError`.
945
+ */
946
+ numberOfWeeks?: number;
947
+ /** First day of the week. Sunday = 0 (default) … Saturday = 6. */
948
+ weekStartsOn?: WeekStartsOn$1;
949
+ /** Event chip and overflow-button height in pixels (default 24). */
950
+ chipHeight?: number;
951
+ }
952
+ /**
953
+ * Consecutive full weeks as stacked seven-day rows, with event chips and no hour
954
+ * slots. It has the month grid's event bars, overflow, selection, and drag
955
+ * interactions, and the month slots, `renderEvent`, and theme style it. Every
956
+ * row is kept at full height; when the view is given less room, the rows scroll
957
+ * under the title and weekday header.
958
+ *
959
+ * Standalone, it shows `events` as given; expand recurring events first with
960
+ * `expandRecurringEvents`, or use `Calendar` with `mode="multiweek"`.
961
+ *
962
+ * @example
963
+ * ```tsx
964
+ * <MultiWeekView date={new Date()} numberOfWeeks={3} events={events} />
965
+ * ```
966
+ */
967
+ export declare function MultiWeekView<T = unknown>({ date, numberOfWeeks, chipHeight, ...rest }: MultiWeekViewProps<T>): ReactElement;
884
968
  /**
885
969
  * Styleable parts of {@link ResourceTimeline}. Pass a class or inline style per
886
970
  * slot via the `classNames` / `styles` props.
@@ -1037,4 +1121,4 @@ interface ResourceTimelineProps<T = unknown> extends SlotStyleProps<ResourceTime
1037
1121
  * ```
1038
1122
  */
1039
1123
  export declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, theme: themeOverrides, renderEvent, onPressEvent, onDragEvent, getEventId, onPressCell, onCreateEvent, renderCreateGhost, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, labels: labelsProp, showNowIndicator, now: nowProp, timeZone, className, style, classNames, styles }: ResourceTimelineProps<T>): ReactElement;
1040
- export { type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, type CalendarEvent, type CalendarHandle, type CalendarLabels, type CalendarMode, type CalendarProps, type CalendarSlot, type CreateGhostArgs, type DatePickerProps, type DatePickerSlot, type DateRange, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, type MonthListProps, type MonthListSlot, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, type ResourceTimelineProps, type ResourceTimelineSlot, type ScrollToTimeOptions, type SlotDefault, type SlotStyleProps, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
1124
+ export { type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, type CalendarEvent, type CalendarHandle, type CalendarLabels, type CalendarMode, type CalendarProps, type CalendarSlot, type CreateGhostArgs, type DatePickerProps, type DatePickerSlot, type DateRange, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type DomAgendaEvent, type DomAgendaEventArgs, type DomCalendarTheme, type DomMonthEvent, type DomMonthEventArgs, type DomRenderEvent, type DomRenderEventArgs, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, type MonthListProps, type MonthListSlot, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type MultiWeekGrid, type MultiWeekGridDay, type MultiWeekGridInterval, type MultiWeekGridOptions, type MultiWeekGridWeek, type MultiWeekViewProps, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, type ResourceTimelineProps, type ResourceTimelineSlot, type ScrollToTimeOptions, type SlotDefault, type SlotStyleProps, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, buildMultiWeekGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, nextDateRange, parseICalendar, toICalendar, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };