@super-calendar/dom 2.8.1 → 2.9.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/dist/index.d.mts CHANGED
@@ -124,12 +124,13 @@ declare function Agenda<T = unknown>({ events, locale, ampm, activeDate, theme:
124
124
  //#region src/YearView.d.ts
125
125
  /**
126
126
  * Styleable parts of {@link YearView}. Pass a class or inline style per slot
127
- * via the `classNames` / `styles` props; day cells carry `data-today` and
128
- * `data-events` state attributes for variants.
127
+ * via the `classNames` / `styles` props; day cells carry `data-today`,
128
+ * `data-events`, `data-selected`, `data-range`, `data-disabled` and
129
+ * `data-creating` state attributes for variants.
129
130
  */
130
- type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "eventDot";
131
+ type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "dayBadge" | "rangeBand" | "eventDot";
131
132
  /** Props for {@link YearView}, the twelve mini-month year grid. */
132
- interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
133
+ interface YearViewProps<T = unknown> extends DateSelectionConstraints$1, SlotStyleProps<YearViewSlot> {
133
134
  /** Any date inside the year to render. */
134
135
  date: Date;
135
136
  /** Days holding at least one event get a dot. Omit for a plain year. */
@@ -141,6 +142,10 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
141
142
  locale?: Locale;
142
143
  /** Highlight this date instead of the real "today". */
143
144
  activeDate?: Date;
145
+ /** A selected span: endpoints get a filled badge, the days between get the range band. */
146
+ selectedRange?: DateRange$1;
147
+ /** Discrete selected days, drawn with a filled badge. */
148
+ selectedDates?: Date[];
144
149
  /**
145
150
  * Smallest width a mini month may take before the grid drops a column
146
151
  * (default 150). The grid fits as many columns as the container allows.
@@ -150,6 +155,22 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
150
155
  onPressDay?: (date: Date) => void;
151
156
  /** Tap a month's title (e.g. to jump to that month's view). */
152
157
  onPressMonth?: (month: Date) => void;
158
+ /**
159
+ * Enables drag-to-select and reports the swept span live, as the ordered
160
+ * inclusive `[start, end]` days (both at midnight). Pair it with
161
+ * `useDateRange`'s `selectRange` to drive `selectedRange`. Fires on every day the
162
+ * pointer crosses, so the highlight follows the drag; `onCreateEvent` (when also
163
+ * set) fires once on release. Either handler enables the same sweep gesture, and
164
+ * a sweep can run across mini months.
165
+ */
166
+ onSelectDrag?: (start: Date, end: Date) => void;
167
+ /**
168
+ * Enables drag-to-create: press a day and drag across others, then release to
169
+ * fire this with the all-day range (`start` at midnight of the first day, `end`
170
+ * at midnight after the last, exclusive). A plain click without dragging still
171
+ * fires `onPressDay`, not this. Days being sketched carry `data-creating`.
172
+ */
173
+ onCreateEvent?: (start: Date, end: Date) => void;
153
174
  /** Theme overrides; falls back to the default light theme. */
154
175
  theme?: Partial<DomCalendarTheme>;
155
176
  /** Class applied to the root element. */
@@ -162,7 +183,7 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
162
183
  * highlighted and a dot under days that hold events. It's the view `Calendar`
163
184
  * renders for `mode="year"`.
164
185
  */
165
- declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
186
+ declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
166
187
  //#endregion
167
188
  //#region src/MonthView.d.ts
168
189
  /**
@@ -239,6 +260,11 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
239
260
  theme?: Partial<DomCalendarTheme>;
240
261
  /** Fired when a selectable day is clicked. */
241
262
  onPressDay?: (date: Date) => void;
263
+ /**
264
+ * Fired alongside `onPressDay` when a day cell is clicked, with the same day at
265
+ * midnight, so one handler can create events across month and week/day modes.
266
+ */
267
+ onPressCell?: (date: Date) => void;
242
268
  /**
243
269
  * In events mode, enables drag-to-create: press on a day and drag across others
244
270
  * to sketch a span, then release to fire this with the all-day range (`start` at
@@ -247,6 +273,28 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
247
273
  * carry `data-creating` for styling.
248
274
  */
249
275
  onCreateEvent?: (start: Date, end: Date) => void;
276
+ /**
277
+ * Reports the day span of a create sweep **as it happens**, as the ordered
278
+ * inclusive `[start, end]` days (both at midnight), so a selection highlight can
279
+ * follow the drag instead of appearing only on release. Pair it with
280
+ * `useDateRange`'s `selectRange` to drive `selectedRange`. Enables the sweep on
281
+ * its own, so it works without `onCreateEvent`.
282
+ */
283
+ onSelectDrag?: (start: Date, end: Date) => void;
284
+ /**
285
+ * In events mode, enables drag-to-reschedule: press an event chip and drop it on
286
+ * another day. Called with the event and its new `start`/`end`, both shifted by
287
+ * the whole days dragged, so the time of day and duration are preserved. Return
288
+ * `false` to reject the drop. The day under the pointer carries `data-drop` for
289
+ * styling.
290
+ */
291
+ onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
292
+ /** Fired the instant an event is picked up for a drag, before anything is committed. */
293
+ onDragStart?: (event: CalendarEvent$1<T>) => void;
294
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
295
+ eventStartEditable?: boolean;
296
+ /** Reject a drop that would overlap another event (default true = allowed). */
297
+ eventOverlap?: boolean;
250
298
  /**
251
299
  * When events are shown, also make the day cells keyboard-navigable: a single
252
300
  * roving tab stop, arrow keys move the focus, Enter opens the day (`onPressDay`).
@@ -270,7 +318,7 @@ interface MonthViewInternalProps<T = unknown> extends MonthViewProps<T> {
270
318
  * <MonthView date={new Date()} events={events} onPressDay={(d) => setDate(d)} />
271
319
  * ```
272
320
  */
273
- declare function MonthView<T = unknown>({ date, weekStartsOn, hiddenDays, weekdayFormat, events, eventsByDay: eventsByDayProp, renderEvent, eventAccessibilityLabel, maxVisibleEventCount, moreLabel, onPressEvent, onPressMore, selectedRange, selectedDates, showAdjacentMonths, highlightWeekends, fillCellOnSelection, showTitle, showWeekdays, locale, theme: themeOverrides, minDate, maxDate, isDateDisabled, onPressDay, onCreateEvent, keyboardDayNavigation, className, style, classNames, styles }: MonthViewInternalProps<T>): ReactElement;
321
+ declare function MonthView<T = unknown>({ date, weekStartsOn, hiddenDays, weekdayFormat, events, eventsByDay: eventsByDayProp, renderEvent, eventAccessibilityLabel, maxVisibleEventCount, moreLabel, 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;
274
322
  //#endregion
275
323
  //#region src/TimeGrid.d.ts
276
324
  /**
@@ -535,13 +583,24 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
535
583
  eventOverlap?: boolean;
536
584
  /** Snap dragged/created events to this many minutes. */
537
585
  dragStepMinutes?: number;
538
- /** Tap empty grid space. */
586
+ /**
587
+ * Tap empty space: the date+time pressed on the week/day grid, or the tapped
588
+ * day at midnight in `month` mode (where it fires alongside `onPressDay`).
589
+ */
539
590
  onPressCell?: (date: Date) => void;
540
- /** Drag empty grid space to create. */
591
+ /**
592
+ * Drag empty space to create. On the week/day grid that sweeps out a time
593
+ * range; in `month` mode it sweeps out an **all-day** span across the days
594
+ * dragged (`start` at midnight of the first, `end` at midnight after the last).
595
+ */
541
596
  onCreateEvent?: (start: Date, end: Date) => void;
542
597
  /** Fires when an event drag begins. */
543
598
  onDragStart?: (event: CalendarEvent$1<T>) => void;
544
- /** Enables drag-to-move/resize; return `false` to reject the drop. */
599
+ /**
600
+ * Enables drag-to-move/resize; return `false` to reject the drop. In `month`
601
+ * mode an event chip can be dragged onto another day, shifting both ends by the
602
+ * days dragged so the time of day and duration are kept.
603
+ */
545
604
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
546
605
  /** Tap a day's column header. */
547
606
  onPressDateHeader?: (day: Date) => void;
@@ -560,6 +619,11 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
560
619
  moreLabel?: string;
561
620
  /** Render neighbouring months' days in the leading/trailing cells (default true). */
562
621
  showAdjacentMonths?: boolean;
622
+ /**
623
+ * Render the built-in "Month yyyy" title above the month grid. Default true. Set
624
+ * false when your own header already shows the month and year. Month mode only.
625
+ */
626
+ showTitle?: boolean;
563
627
  /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
564
628
  weekdayFormat?: WeekdayFormat$1;
565
629
  /** Fill the cell with the range background instead of the pill band. */
@@ -576,6 +640,13 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
576
640
  keyboardDayNavigation?: boolean;
577
641
  /** Tap a day cell. */
578
642
  onPressDay?: (date: Date) => void;
643
+ /**
644
+ * Month and year modes: reports a create sweep's day span as it happens, as the
645
+ * ordered inclusive `[start, end]` days, so a selection highlight can follow the
646
+ * drag. Pair it with `useDateRange`'s `selectRange`. Enables the sweep on its
647
+ * own, so it works without `onCreateEvent`.
648
+ */
649
+ onSelectDrag?: (start: Date, end: Date) => void;
579
650
  /** Tap a month's title in the year view — e.g. jump to that month. */
580
651
  onPressMonth?: (month: Date) => void;
581
652
  /** Tap the "+N more" overflow row. */
@@ -596,7 +667,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
596
667
  * <Calendar mode="week" date={new Date()} events={events} />
597
668
  * ```
598
669
  */
599
- declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
670
+ declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, showTitle, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onSelectDrag, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
600
671
  //#endregion
601
672
  //#region src/MonthList.d.ts
602
673
  /**
package/dist/index.d.ts CHANGED
@@ -124,12 +124,13 @@ declare function Agenda<T = unknown>({ events, locale, ampm, activeDate, theme:
124
124
  //#region src/YearView.d.ts
125
125
  /**
126
126
  * Styleable parts of {@link YearView}. Pass a class or inline style per slot
127
- * via the `classNames` / `styles` props; day cells carry `data-today` and
128
- * `data-events` state attributes for variants.
127
+ * via the `classNames` / `styles` props; day cells carry `data-today`,
128
+ * `data-events`, `data-selected`, `data-range`, `data-disabled` and
129
+ * `data-creating` state attributes for variants.
129
130
  */
130
- type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "eventDot";
131
+ type YearViewSlot = "grid" | "month" | "monthTitle" | "weekdays" | "weekday" | "week" | "day" | "dayBadge" | "rangeBand" | "eventDot";
131
132
  /** Props for {@link YearView}, the twelve mini-month year grid. */
132
- interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
133
+ interface YearViewProps<T = unknown> extends DateSelectionConstraints$1, SlotStyleProps<YearViewSlot> {
133
134
  /** Any date inside the year to render. */
134
135
  date: Date;
135
136
  /** Days holding at least one event get a dot. Omit for a plain year. */
@@ -141,6 +142,10 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
141
142
  locale?: Locale;
142
143
  /** Highlight this date instead of the real "today". */
143
144
  activeDate?: Date;
145
+ /** A selected span: endpoints get a filled badge, the days between get the range band. */
146
+ selectedRange?: DateRange$1;
147
+ /** Discrete selected days, drawn with a filled badge. */
148
+ selectedDates?: Date[];
144
149
  /**
145
150
  * Smallest width a mini month may take before the grid drops a column
146
151
  * (default 150). The grid fits as many columns as the container allows.
@@ -150,6 +155,22 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
150
155
  onPressDay?: (date: Date) => void;
151
156
  /** Tap a month's title (e.g. to jump to that month's view). */
152
157
  onPressMonth?: (month: Date) => void;
158
+ /**
159
+ * Enables drag-to-select and reports the swept span live, as the ordered
160
+ * inclusive `[start, end]` days (both at midnight). Pair it with
161
+ * `useDateRange`'s `selectRange` to drive `selectedRange`. Fires on every day the
162
+ * pointer crosses, so the highlight follows the drag; `onCreateEvent` (when also
163
+ * set) fires once on release. Either handler enables the same sweep gesture, and
164
+ * a sweep can run across mini months.
165
+ */
166
+ onSelectDrag?: (start: Date, end: Date) => void;
167
+ /**
168
+ * Enables drag-to-create: press a day and drag across others, then release to
169
+ * fire this with the all-day range (`start` at midnight of the first day, `end`
170
+ * at midnight after the last, exclusive). A plain click without dragging still
171
+ * fires `onPressDay`, not this. Days being sketched carry `data-creating`.
172
+ */
173
+ onCreateEvent?: (start: Date, end: Date) => void;
153
174
  /** Theme overrides; falls back to the default light theme. */
154
175
  theme?: Partial<DomCalendarTheme>;
155
176
  /** Class applied to the root element. */
@@ -162,7 +183,7 @@ interface YearViewProps<T = unknown> extends SlotStyleProps<YearViewSlot> {
162
183
  * highlighted and a dot under days that hold events. It's the view `Calendar`
163
184
  * renders for `mode="year"`.
164
185
  */
165
- declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, minMonthWidth, onPressDay, onPressMonth, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
186
+ declare function YearView<T = unknown>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, theme: themeOverrides, className, style, classNames, styles }: YearViewProps<T>): ReactElement;
166
187
  //#endregion
167
188
  //#region src/MonthView.d.ts
168
189
  /**
@@ -239,6 +260,11 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
239
260
  theme?: Partial<DomCalendarTheme>;
240
261
  /** Fired when a selectable day is clicked. */
241
262
  onPressDay?: (date: Date) => void;
263
+ /**
264
+ * Fired alongside `onPressDay` when a day cell is clicked, with the same day at
265
+ * midnight, so one handler can create events across month and week/day modes.
266
+ */
267
+ onPressCell?: (date: Date) => void;
242
268
  /**
243
269
  * In events mode, enables drag-to-create: press on a day and drag across others
244
270
  * to sketch a span, then release to fire this with the all-day range (`start` at
@@ -247,6 +273,28 @@ interface MonthViewProps<T = unknown> extends DateSelectionConstraints$1, SlotSt
247
273
  * carry `data-creating` for styling.
248
274
  */
249
275
  onCreateEvent?: (start: Date, end: Date) => void;
276
+ /**
277
+ * Reports the day span of a create sweep **as it happens**, as the ordered
278
+ * inclusive `[start, end]` days (both at midnight), so a selection highlight can
279
+ * follow the drag instead of appearing only on release. Pair it with
280
+ * `useDateRange`'s `selectRange` to drive `selectedRange`. Enables the sweep on
281
+ * its own, so it works without `onCreateEvent`.
282
+ */
283
+ onSelectDrag?: (start: Date, end: Date) => void;
284
+ /**
285
+ * In events mode, enables drag-to-reschedule: press an event chip and drop it on
286
+ * another day. Called with the event and its new `start`/`end`, both shifted by
287
+ * the whole days dragged, so the time of day and duration are preserved. Return
288
+ * `false` to reject the drop. The day under the pointer carries `data-drop` for
289
+ * styling.
290
+ */
291
+ onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
292
+ /** Fired the instant an event is picked up for a drag, before anything is committed. */
293
+ onDragStart?: (event: CalendarEvent$1<T>) => void;
294
+ /** Allow moving events by default (per-event `startEditable` overrides). Default true. */
295
+ eventStartEditable?: boolean;
296
+ /** Reject a drop that would overlap another event (default true = allowed). */
297
+ eventOverlap?: boolean;
250
298
  /**
251
299
  * When events are shown, also make the day cells keyboard-navigable: a single
252
300
  * roving tab stop, arrow keys move the focus, Enter opens the day (`onPressDay`).
@@ -270,7 +318,7 @@ interface MonthViewInternalProps<T = unknown> extends MonthViewProps<T> {
270
318
  * <MonthView date={new Date()} events={events} onPressDay={(d) => setDate(d)} />
271
319
  * ```
272
320
  */
273
- declare function MonthView<T = unknown>({ date, weekStartsOn, hiddenDays, weekdayFormat, events, eventsByDay: eventsByDayProp, renderEvent, eventAccessibilityLabel, maxVisibleEventCount, moreLabel, onPressEvent, onPressMore, selectedRange, selectedDates, showAdjacentMonths, highlightWeekends, fillCellOnSelection, showTitle, showWeekdays, locale, theme: themeOverrides, minDate, maxDate, isDateDisabled, onPressDay, onCreateEvent, keyboardDayNavigation, className, style, classNames, styles }: MonthViewInternalProps<T>): ReactElement;
321
+ declare function MonthView<T = unknown>({ date, weekStartsOn, hiddenDays, weekdayFormat, events, eventsByDay: eventsByDayProp, renderEvent, eventAccessibilityLabel, maxVisibleEventCount, moreLabel, 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;
274
322
  //#endregion
275
323
  //#region src/TimeGrid.d.ts
276
324
  /**
@@ -535,13 +583,24 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
535
583
  eventOverlap?: boolean;
536
584
  /** Snap dragged/created events to this many minutes. */
537
585
  dragStepMinutes?: number;
538
- /** Tap empty grid space. */
586
+ /**
587
+ * Tap empty space: the date+time pressed on the week/day grid, or the tapped
588
+ * day at midnight in `month` mode (where it fires alongside `onPressDay`).
589
+ */
539
590
  onPressCell?: (date: Date) => void;
540
- /** Drag empty grid space to create. */
591
+ /**
592
+ * Drag empty space to create. On the week/day grid that sweeps out a time
593
+ * range; in `month` mode it sweeps out an **all-day** span across the days
594
+ * dragged (`start` at midnight of the first, `end` at midnight after the last).
595
+ */
541
596
  onCreateEvent?: (start: Date, end: Date) => void;
542
597
  /** Fires when an event drag begins. */
543
598
  onDragStart?: (event: CalendarEvent$1<T>) => void;
544
- /** Enables drag-to-move/resize; return `false` to reject the drop. */
599
+ /**
600
+ * Enables drag-to-move/resize; return `false` to reject the drop. In `month`
601
+ * mode an event chip can be dragged onto another day, shifting both ends by the
602
+ * days dragged so the time of day and duration are kept.
603
+ */
545
604
  onDragEvent?: (event: CalendarEvent$1<T>, start: Date, end: Date) => void | boolean;
546
605
  /** Tap a day's column header. */
547
606
  onPressDateHeader?: (day: Date) => void;
@@ -560,6 +619,11 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
560
619
  moreLabel?: string;
561
620
  /** Render neighbouring months' days in the leading/trailing cells (default true). */
562
621
  showAdjacentMonths?: boolean;
622
+ /**
623
+ * Render the built-in "Month yyyy" title above the month grid. Default true. Set
624
+ * false when your own header already shows the month and year. Month mode only.
625
+ */
626
+ showTitle?: boolean;
563
627
  /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
564
628
  weekdayFormat?: WeekdayFormat$1;
565
629
  /** Fill the cell with the range background instead of the pill band. */
@@ -576,6 +640,13 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
576
640
  keyboardDayNavigation?: boolean;
577
641
  /** Tap a day cell. */
578
642
  onPressDay?: (date: Date) => void;
643
+ /**
644
+ * Month and year modes: reports a create sweep's day span as it happens, as the
645
+ * ordered inclusive `[start, end]` days, so a selection highlight can follow the
646
+ * drag. Pair it with `useDateRange`'s `selectRange`. Enables the sweep on its
647
+ * own, so it works without `onCreateEvent`.
648
+ */
649
+ onSelectDrag?: (start: Date, end: Date) => void;
579
650
  /** Tap a month's title in the year view — e.g. jump to that month. */
580
651
  onPressMonth?: (month: Date) => void;
581
652
  /** Tap the "+N more" overflow row. */
@@ -596,7 +667,7 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
596
667
  * <Calendar mode="week" date={new Date()} events={events} />
597
668
  * ```
598
669
  */
599
- declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
670
+ declare function Calendar<T = unknown>({ mode, date, events, onChangeDate, weekStartsOn, hiddenDays, now, numberOfDays, locale, timeZone, theme, height, className, style, onPressEvent, eventAccessibilityLabel, ampm, hourHeight, scrollOffsetMinutes, timeslots, minHour, maxHour, hideHours, showWeekNumber, weekNumberPrefix, businessHours, renderBusinessHours, showNowIndicator, showAllDayEventCell, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, dragStepMinutes, onPressCell, onCreateEvent, onDragStart, onDragEvent, onPressDateHeader, renderTimeEvent, hourComponent, keyboardEventNavigation, maxVisibleEventCount, moreLabel, showAdjacentMonths, showTitle, weekdayFormat, fillCellOnSelection, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, keyboardDayNavigation, onPressDay, onSelectDrag, onPressMonth, onPressMore, renderMonthEvent, renderScheduleEvent, classNames, styles }: CalendarProps<T>): ReactElement;
600
671
  //#endregion
601
672
  //#region src/MonthList.d.ts
602
673
  /**