@klinking/colander 2.0.2 → 3.0.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/formats/date.cjs +1 -1
- package/dist/formats/date.d.cts +2 -2
- package/dist/formats/date.d.mts +2 -2
- package/dist/formats/date.mjs +1 -1
- package/dist/formats/object.cjs +1 -1
- package/dist/formats/object.d.cts +2 -2
- package/dist/formats/object.d.mts +2 -2
- package/dist/formats/object.mjs +1 -1
- package/dist/formats/plain-date-time.cjs +1 -1
- package/dist/formats/plain-date-time.d.cts +2 -2
- package/dist/formats/plain-date-time.d.mts +2 -2
- package/dist/formats/plain-date-time.mjs +1 -1
- package/dist/formats/plain-date.cjs +1 -1
- package/dist/formats/plain-date.d.cts +2 -2
- package/dist/formats/plain-date.d.mts +2 -2
- package/dist/formats/plain-date.mjs +1 -1
- package/dist/formats/plain-month-day.cjs +1 -1
- package/dist/formats/plain-month-day.d.cts +2 -2
- package/dist/formats/plain-month-day.d.mts +2 -2
- package/dist/formats/plain-month-day.mjs +1 -1
- package/dist/formats/plain-year-month.cjs +1 -1
- package/dist/formats/plain-year-month.d.cts +2 -2
- package/dist/formats/plain-year-month.d.mts +2 -2
- package/dist/formats/plain-year-month.mjs +1 -1
- package/dist/formats/zoned-date-time.cjs +1 -1
- package/dist/formats/zoned-date-time.d.cts +2 -2
- package/dist/formats/zoned-date-time.d.mts +2 -2
- package/dist/formats/zoned-date-time.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{weeks-navigation-Xve4O55H.mjs → weeks-navigation-Bg0nZLgh.mjs} +43 -41
- package/dist/{weeks-navigation-epiyL4IP.cjs → weeks-navigation-CJzhxbgj.cjs} +43 -41
- package/dist/{weeks-view-context-BZeWx9N8.d.cts → weeks-view-context-CNAq2Hiu.d.cts} +77 -15
- package/dist/{weeks-view-context-MVe1b-BS.d.mts → weeks-view-context-CsP3PBiu.d.mts} +77 -15
- package/package.json +92 -26
- package/src/formats/date.ts +4 -1
- package/src/formats/object.ts +4 -1
- package/src/formats/plain-date-time.ts +4 -1
- package/src/formats/plain-date.ts +4 -1
- package/src/formats/plain-month-day.ts +4 -1
- package/src/formats/plain-year-month.ts +4 -1
- package/src/formats/zoned-date-time.ts +4 -1
- package/src/grid.tsx +1 -1
- package/src/index.ts +4 -1
- package/src/month-view-types.ts +11 -6
- package/src/month-view.test.tsx +44 -2
- package/src/month-view.tsx +6 -6
- package/src/navigation.tsx +13 -1
- package/src/{overflow.test.ts → out-of-range.test.ts} +16 -12
- package/src/{overflow.ts → out-of-range.ts} +56 -10
- package/src/weeks-navigation.tsx +8 -7
- package/src/weeks-view-state.ts +33 -26
- package/src/weeks-view-types.ts +15 -4
- package/src/weeks-view.tsx +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps$1, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat$1, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as
|
|
1
|
+
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps$1, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat$1, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as MonthOutOfRangeBehavior, en as ValueChangeMeta, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekDataContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as DateRange$1, h as MonthSeparatorWeekCount, ht as CalendarStateContextValue, i as useViewContext, in as WeekNumberCellState, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderState, k as WeeksViewRootHandle, kt as GridHeaderCellState, l as computePreviewRange, ln as WeekTemplateState, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarStableContextValue, n as useWeeksViewState, nn as ValueFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderState, ot as MonthViewProps$1, p as MonthSeparatorRow, pt as CalendarProviderProps$1, q as DateString, qt as RangeSelectedState, r as ViewContextValue, rn as WeekNumberCellProps, rt as GridHeader, s as useCalendarStable, sn as WeekStartDay, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueForFormat$1, tt as DayButton, u as MonthSeparator, un as DayCellDataContext, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringState, w as WeeksNavButtonOwnProps, wt as DragHandleOwnProps, x as WeekCount, xt as DayButtonState, y as PrevWeeksButton, yt as DateValueObject, z as resolveFirstWeek, zt as OutsideDays } from "../weeks-view-context-CNAq2Hiu.cjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/formats/zoned-date-time.d.ts
|
|
@@ -15,4 +15,4 @@ type CalendarProviderProps = CalendarProviderProps$1<F>;
|
|
|
15
15
|
type MonthViewProps = MonthViewProps$1<F>;
|
|
16
16
|
type WeeksViewProps = WeeksViewProps$1<F>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { CalendarProvider, CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type
|
|
18
|
+
export { CalendarProvider, CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps$1, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat$1, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as
|
|
1
|
+
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps$1, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat$1, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as MonthOutOfRangeBehavior, en as ValueChangeMeta, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekDataContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as DateRange$1, h as MonthSeparatorWeekCount, ht as CalendarStateContextValue, i as useViewContext, in as WeekNumberCellState, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderState, k as WeeksViewRootHandle, kt as GridHeaderCellState, l as computePreviewRange, ln as WeekTemplateState, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarStableContextValue, n as useWeeksViewState, nn as ValueFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderState, ot as MonthViewProps$1, p as MonthSeparatorRow, pt as CalendarProviderProps$1, q as DateString, qt as RangeSelectedState, r as ViewContextValue, rn as WeekNumberCellProps, rt as GridHeader, s as useCalendarStable, sn as WeekStartDay, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueForFormat$1, tt as DayButton, u as MonthSeparator, un as DayCellDataContext, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringState, w as WeeksNavButtonOwnProps, wt as DragHandleOwnProps, x as WeekCount, xt as DayButtonState, y as PrevWeeksButton, yt as DateValueObject, z as resolveFirstWeek, zt as OutsideDays } from "../weeks-view-context-CsP3PBiu.mjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/formats/zoned-date-time.d.ts
|
|
@@ -15,4 +15,4 @@ type CalendarProviderProps = CalendarProviderProps$1<F>;
|
|
|
15
15
|
type MonthViewProps = MonthViewProps$1<F>;
|
|
16
16
|
type WeeksViewProps = WeeksViewProps$1<F>;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { CalendarProvider, CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type
|
|
18
|
+
export { CalendarProvider, CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as MonthSeparatorRow, B as useViewContext, C as DayButton, D as MonthSeparator, E as useWeeksViewState, F as DayCellDataContext, G as useCalendarStable, H as useMonthViewState, I as GridContext, K as useCalendarState, L as WeekDataContext, M as MonthSeparatorYear, N as GridHeader, O as MonthSeparatorCell, P as GridHeaderCell, R as MonthView$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, V as useMonthViewStable, W as computePreviewRange, _ as NextMonthButton, a as WeeksViewRoot, b as Grid, c as computeWeeksInWindow, d as RangeEndDragHandle, f as RangeStartDragHandle, g as MonthYearString, h as DateString, i as WeeksView, j as MonthSeparatorWeekCount, k as MonthSeparatorMonth, l as WeekNumberCell, m as RangeSelected, n as PrevWeeksButton, o as resolveFirstWeek, p as RangePreview, r as WeekCount, s as resolveFirstWeekSpec, t as NextWeeksButton, u as WeekNumberHeader, v as PrevMonthButton, w as DayCellTemplate, x as GridBody, y as TimeString, z as MonthViewRoot } from "../weeks-navigation-
|
|
1
|
+
import { A as MonthSeparatorRow, B as useViewContext, C as DayButton, D as MonthSeparator, E as useWeeksViewState, F as DayCellDataContext, G as useCalendarStable, H as useMonthViewState, I as GridContext, K as useCalendarState, L as WeekDataContext, M as MonthSeparatorYear, N as GridHeader, O as MonthSeparatorCell, P as GridHeaderCell, R as MonthView$1, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider$1, V as useMonthViewStable, W as computePreviewRange, _ as NextMonthButton, a as WeeksViewRoot, b as Grid, c as computeWeeksInWindow, d as RangeEndDragHandle, f as RangeStartDragHandle, g as MonthYearString, h as DateString, i as WeeksView, j as MonthSeparatorWeekCount, k as MonthSeparatorMonth, l as WeekNumberCell, m as RangeSelected, n as PrevWeeksButton, o as resolveFirstWeek, p as RangePreview, r as WeekCount, s as resolveFirstWeekSpec, t as NextWeeksButton, u as WeekNumberHeader, v as PrevMonthButton, w as DayCellTemplate, x as GridBody, y as TimeString, z as MonthViewRoot } from "../weeks-navigation-Bg0nZLgh.mjs";
|
|
2
2
|
//#region src/formats/zoned-date-time.ts
|
|
3
3
|
const CalendarProvider = CalendarProvider$1;
|
|
4
4
|
const MonthView = MonthView$1;
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_weeks_navigation = require("./weeks-navigation-
|
|
2
|
+
const require_weeks_navigation = require("./weeks-navigation-CJzhxbgj.cjs");
|
|
3
3
|
exports.CalendarProvider = require_weeks_navigation.CalendarProvider;
|
|
4
4
|
exports.DateString = require_weeks_navigation.DateString;
|
|
5
5
|
exports.DayButton = require_weeks_navigation.DayButton;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, at as MonthView, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as
|
|
1
|
+
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, at as MonthView, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as MonthOutOfRangeBehavior, en as ValueChangeMeta, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekDataContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as DateRange, h as MonthSeparatorWeekCount, ht as CalendarStateContextValue, i as useViewContext, in as WeekNumberCellState, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderState, k as WeeksViewRootHandle, kt as GridHeaderCellState, l as computePreviewRange, ln as WeekTemplateState, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarStableContextValue, n as useWeeksViewState, nn as ValueFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderState, ot as MonthViewProps, p as MonthSeparatorRow, pt as CalendarProviderProps, q as DateString, qt as RangeSelectedState, r as ViewContextValue, rn as WeekNumberCellProps, rt as GridHeader, s as useCalendarStable, sn as WeekStartDay, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueForFormat, tt as DayButton, u as MonthSeparator, un as DayCellDataContext, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringState, w as WeeksNavButtonOwnProps, wt as DragHandleOwnProps, x as WeekCount, xt as DayButtonState, y as PrevWeeksButton, yt as DateValueObject, z as resolveFirstWeek, zt as OutsideDays } from "./weeks-view-context-CNAq2Hiu.cjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/calendar-provider.d.ts
|
|
@@ -8,4 +8,4 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
8
|
*/
|
|
9
9
|
declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): _$react_jsx_runtime0.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type
|
|
11
|
+
export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, type MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, type RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, type ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, type WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, at as MonthView, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as
|
|
1
|
+
import { $ as GridBody, $t as TimeStringState, A as VisibleMonth, At as GridHeaderProps, B as resolveFirstWeekSpec, Bt as PlainDateObject, C as WeekCountState, Ct as DayCellTemplateState, D as WeeksViewProps, Dt as GridBodyState, E as WeeksView, Et as GridBodyProps, F as WeekDescriptor, Ft as MonthYearStringProps, G as RangePreview, Gt as RangePreviewState, H as WeekNumberHeader, Ht as RangeEndDragHandleProps, I as computeWeeksInWindow, It as MonthYearStringState, J as MonthYearString, Jt as RangeStartDragHandleProps, K as RangeSelected, Kt as RangeSelectedProps, L as FirstWeekSpec, Lt as NavButtonState, M as WeeksViewStableContextValue, Mt as GridProps, N as WeeksViewStateContextValue, Nt as GridState, O as WeeksViewRoot, Ot as GridHeaderCellProps, P as WindowInfo, Pt as MonthData, Q as Grid, Qt as TimeStringProps, R as ScrollToWeekSnap, Rt as NextMonthButtonProps, S as WeekCountProps, St as DayCellTemplateProps, T as WeeksNavButtonState, Tt as DragHandleState, U as RangeEndDragHandle, Ut as RangeMode, V as WeekNumberCell, Vt as PrevMonthButtonProps, W as RangeStartDragHandle, Wt as RangePreviewProps, X as PrevMonthButton, Xt as RootState, Y as NextMonthButton, Yt as RawValueForFormat, Z as TimeString, Zt as TemporalNamespace, _ as NextWeeksButton, _t as DateStringProps, a as useMonthViewStable, an as WeekNumberHeaderProps, at as MonthView, b as PrevWeeksButtonProps, bt as DayButtonProps, c as useCalendarState, cn as WeekTemplateProps, ct as MonthViewRootProps, d as MonthSeparatorCell, dn as GridContext, dt as MonthOutOfRangeBehavior, en as ValueChangeMeta, et as WeekTemplate, f as MonthSeparatorMonth, fn as WeekDataContext, ft as OutOfRangeBehavior, g as MonthSeparatorYear, gt as DateRange, h as MonthSeparatorWeekCount, ht as CalendarStateContextValue, i as useViewContext, in as WeekNumberCellState, it as GridHeaderCell, j as WeeksViewRootProps, jt as GridHeaderState, k as WeeksViewRootHandle, kt as GridHeaderCellState, l as computePreviewRange, ln as WeekTemplateState, lt as MonthViewStableContextValue, m as MonthSeparatorState, mt as CalendarStableContextValue, n as useWeeksViewState, nn as ValueFormat, nt as DayCellTemplate, o as useMonthViewState, on as WeekNumberHeaderState, ot as MonthViewProps, p as MonthSeparatorRow, pt as CalendarProviderProps, q as DateString, qt as RangeSelectedState, r as ViewContextValue, rn as WeekNumberCellProps, rt as GridHeader, s as useCalendarStable, sn as WeekStartDay, st as MonthViewRoot, t as useWeeksViewStable, tn as ValueForFormat, tt as DayButton, u as MonthSeparator, un as DayCellDataContext, ut as MonthViewStateContextValue, v as NextWeeksButtonProps, vt as DateStringState, w as WeeksNavButtonOwnProps, wt as DragHandleOwnProps, x as WeekCount, xt as DayButtonState, y as PrevWeeksButton, yt as DateValueObject, z as resolveFirstWeek, zt as OutsideDays } from "./weeks-view-context-CsP3PBiu.mjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/calendar-provider.d.ts
|
|
@@ -8,4 +8,4 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
8
8
|
*/
|
|
9
9
|
declare function CalendarProvider<F extends ValueFormat = "PlainDate">(props: CalendarProviderProps<F>): _$react_jsx_runtime0.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type
|
|
11
|
+
export { CalendarProvider, type CalendarProviderProps, type CalendarStableContextValue, type CalendarStateContextValue, type DateRange, DateString, type DateStringProps, type DateStringState, type DateValueObject, DayButton, type DayButtonProps, type DayButtonState, DayCellDataContext, DayCellTemplate, type DayCellTemplateProps, type DayCellTemplateState, type DragHandleOwnProps, type DragHandleState, type FirstWeekSpec, Grid, GridBody, type GridBodyProps, type GridBodyState, GridContext, GridHeader, GridHeaderCell, type GridHeaderCellProps, type GridHeaderCellState, type GridHeaderProps, type GridHeaderState, type GridProps, type GridState, type MonthData, type MonthOutOfRangeBehavior, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, type MonthSeparatorState, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, type MonthViewProps, MonthViewRoot, type MonthViewRootProps, type MonthViewStableContextValue, type MonthViewStateContextValue, MonthYearString, type MonthYearStringProps, type MonthYearStringState, type NavButtonState, NextMonthButton, type NextMonthButtonProps, NextWeeksButton, type NextWeeksButtonProps, type OutOfRangeBehavior, type OutsideDays, type PlainDateObject, PrevMonthButton, type PrevMonthButtonProps, PrevWeeksButton, type PrevWeeksButtonProps, RangeEndDragHandle, type RangeEndDragHandleProps, type RangeMode, RangePreview, type RangePreviewProps, type RangePreviewState, RangeSelected, type RangeSelectedProps, type RangeSelectedState, RangeStartDragHandle, type RangeStartDragHandleProps, type RawValueForFormat, type RootState, type ScrollToWeekSnap, type TemporalNamespace, TimeString, type TimeStringProps, type TimeStringState, type ValueChangeMeta, type ValueForFormat, type ValueFormat, type ViewContextValue, type VisibleMonth, WeekCount, type WeekCountProps, type WeekCountState, WeekDataContext, type WeekDescriptor, WeekNumberCell, type WeekNumberCellProps, type WeekNumberCellState, WeekNumberHeader, type WeekNumberHeaderProps, type WeekNumberHeaderState, type WeekStartDay, WeekTemplate, type WeekTemplateProps, type WeekTemplateState, type WeeksNavButtonOwnProps, type WeeksNavButtonState, WeeksView, type WeeksViewProps, WeeksViewRoot, type WeeksViewRootHandle, type WeeksViewRootProps, type WeeksViewStableContextValue, type WeeksViewStateContextValue, type WindowInfo, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as MonthSeparatorRow, B as useViewContext, C as DayButton, D as MonthSeparator, E as useWeeksViewState, F as DayCellDataContext, G as useCalendarStable, H as useMonthViewState, I as GridContext, K as useCalendarState, L as WeekDataContext, M as MonthSeparatorYear, N as GridHeader, O as MonthSeparatorCell, P as GridHeaderCell, R as MonthView, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider, V as useMonthViewStable, W as computePreviewRange, _ as NextMonthButton, a as WeeksViewRoot, b as Grid, c as computeWeeksInWindow, d as RangeEndDragHandle, f as RangeStartDragHandle, g as MonthYearString, h as DateString, i as WeeksView, j as MonthSeparatorWeekCount, k as MonthSeparatorMonth, l as WeekNumberCell, m as RangeSelected, n as PrevWeeksButton, o as resolveFirstWeek, p as RangePreview, r as WeekCount, s as resolveFirstWeekSpec, t as NextWeeksButton, u as WeekNumberHeader, v as PrevMonthButton, w as DayCellTemplate, x as GridBody, y as TimeString, z as MonthViewRoot } from "./weeks-navigation-
|
|
1
|
+
import { A as MonthSeparatorRow, B as useViewContext, C as DayButton, D as MonthSeparator, E as useWeeksViewState, F as DayCellDataContext, G as useCalendarStable, H as useMonthViewState, I as GridContext, K as useCalendarState, L as WeekDataContext, M as MonthSeparatorYear, N as GridHeader, O as MonthSeparatorCell, P as GridHeaderCell, R as MonthView, S as WeekTemplate, T as useWeeksViewStable, U as CalendarProvider, V as useMonthViewStable, W as computePreviewRange, _ as NextMonthButton, a as WeeksViewRoot, b as Grid, c as computeWeeksInWindow, d as RangeEndDragHandle, f as RangeStartDragHandle, g as MonthYearString, h as DateString, i as WeeksView, j as MonthSeparatorWeekCount, k as MonthSeparatorMonth, l as WeekNumberCell, m as RangeSelected, n as PrevWeeksButton, o as resolveFirstWeek, p as RangePreview, r as WeekCount, s as resolveFirstWeekSpec, t as NextWeeksButton, u as WeekNumberHeader, v as PrevMonthButton, w as DayCellTemplate, x as GridBody, y as TimeString, z as MonthViewRoot } from "./weeks-navigation-Bg0nZLgh.mjs";
|
|
2
2
|
export { CalendarProvider, DateString, DayButton, DayCellDataContext, DayCellTemplate, Grid, GridBody, GridContext, GridHeader, GridHeaderCell, MonthSeparator, MonthSeparatorCell, MonthSeparatorMonth, MonthSeparatorRow, MonthSeparatorWeekCount, MonthSeparatorYear, MonthView, MonthViewRoot, MonthYearString, NextMonthButton, NextWeeksButton, PrevMonthButton, PrevWeeksButton, RangeEndDragHandle, RangePreview, RangeSelected, RangeStartDragHandle, TimeString, WeekCount, WeekDataContext, WeekNumberCell, WeekNumberHeader, WeekTemplate, WeeksView, WeeksViewRoot, computePreviewRange, computeWeeksInWindow, resolveFirstWeek, resolveFirstWeekSpec, useCalendarStable, useCalendarState, useMonthViewStable, useMonthViewState, useViewContext, useWeeksViewStable, useWeeksViewState };
|
|
@@ -1276,11 +1276,11 @@ function useViewContext() {
|
|
|
1276
1276
|
//#endregion
|
|
1277
1277
|
//#region src/month-view.tsx
|
|
1278
1278
|
function MonthViewRoot(props) {
|
|
1279
|
-
const { numberOfMonths: numberOfMonthsProp, fixedWeeks: fixedWeeksProp, outsideDays: outsideDaysProp,
|
|
1279
|
+
const { numberOfMonths: numberOfMonthsProp, fixedWeeks: fixedWeeksProp, outsideDays: outsideDaysProp, outOfRangeBehavior: outOfRangeBehaviorProp, month: monthProp, defaultMonth: defaultMonthProp, onMonthChange, children } = props;
|
|
1280
1280
|
const numberOfMonths = Math.max(1, Math.min(numberOfMonthsProp ?? 1, 12));
|
|
1281
1281
|
const fixedWeeks = fixedWeeksProp ?? false;
|
|
1282
1282
|
const outsideDays = outsideDaysProp ?? "enabled";
|
|
1283
|
-
const
|
|
1283
|
+
const outOfRangeBehavior = outOfRangeBehaviorProp ?? "unbounded";
|
|
1284
1284
|
const calStable = useCalendarStable();
|
|
1285
1285
|
const calState = useCalendarState();
|
|
1286
1286
|
const T = calStable.temporal;
|
|
@@ -1553,7 +1553,7 @@ function MonthViewRoot(props) {
|
|
|
1553
1553
|
numberOfMonths,
|
|
1554
1554
|
fixedWeeks,
|
|
1555
1555
|
outsideDays,
|
|
1556
|
-
|
|
1556
|
+
outOfRangeBehavior,
|
|
1557
1557
|
goNextMonth,
|
|
1558
1558
|
goPrevMonth,
|
|
1559
1559
|
setGridLabelId,
|
|
@@ -1562,7 +1562,7 @@ function MonthViewRoot(props) {
|
|
|
1562
1562
|
numberOfMonths,
|
|
1563
1563
|
fixedWeeks,
|
|
1564
1564
|
outsideDays,
|
|
1565
|
-
|
|
1565
|
+
outOfRangeBehavior,
|
|
1566
1566
|
goNextMonth,
|
|
1567
1567
|
goPrevMonth,
|
|
1568
1568
|
setGridLabelId
|
|
@@ -1606,14 +1606,14 @@ function MonthViewRoot(props) {
|
|
|
1606
1606
|
});
|
|
1607
1607
|
}
|
|
1608
1608
|
function MonthView(props) {
|
|
1609
|
-
const { numberOfMonths, fixedWeeks, outsideDays,
|
|
1609
|
+
const { numberOfMonths, fixedWeeks, outsideDays, outOfRangeBehavior, month, defaultMonth, onMonthChange, children, ...calendarProps } = props;
|
|
1610
1610
|
return /* @__PURE__ */ jsx(CalendarProvider, {
|
|
1611
1611
|
...calendarProps,
|
|
1612
1612
|
children: /* @__PURE__ */ jsx(MonthViewRoot, {
|
|
1613
1613
|
numberOfMonths,
|
|
1614
1614
|
fixedWeeks,
|
|
1615
1615
|
outsideDays,
|
|
1616
|
-
|
|
1616
|
+
outOfRangeBehavior,
|
|
1617
1617
|
month,
|
|
1618
1618
|
defaultMonth,
|
|
1619
1619
|
onMonthChange,
|
|
@@ -2854,7 +2854,7 @@ function WeeksViewGridFn(props, ref) {
|
|
|
2854
2854
|
numberOfMonths: 1,
|
|
2855
2855
|
fixedWeeks: false,
|
|
2856
2856
|
outsideDays: "enabled",
|
|
2857
|
-
|
|
2857
|
+
outOfRangeBehavior: "unbounded",
|
|
2858
2858
|
goNextMonth: () => {},
|
|
2859
2859
|
goPrevMonth: () => {},
|
|
2860
2860
|
setGridLabelId: () => {},
|
|
@@ -3144,7 +3144,7 @@ function useNavButton(direction) {
|
|
|
3144
3144
|
const { disabled: globalDisabled, minValue, maxValue, temporal: T } = useCalendarStable();
|
|
3145
3145
|
const monthViewStable = useMonthViewStable();
|
|
3146
3146
|
const monthViewState = useMonthViewState();
|
|
3147
|
-
const { goNextMonth: goToNextMonth, goPrevMonth: goToPrevMonth, numberOfMonths } = monthViewStable;
|
|
3147
|
+
const { goNextMonth: goToNextMonth, goPrevMonth: goToPrevMonth, numberOfMonths, outOfRangeBehavior } = monthViewStable;
|
|
3148
3148
|
const { currentMonth: currentDateTime, allMonths, rootState } = monthViewState;
|
|
3149
3149
|
const refMonth = direction === "next" ? allMonths[numberOfMonths - 1] ?? currentDateTime : currentDateTime;
|
|
3150
3150
|
const destMonth = direction === "prev" ? refMonth.month === 1 ? 12 : refMonth.month - 1 : refMonth.month === 12 ? 1 : refMonth.month + 1;
|
|
@@ -3152,11 +3152,13 @@ function useNavButton(direction) {
|
|
|
3152
3152
|
const boundValue = direction === "prev" ? minValue : maxValue;
|
|
3153
3153
|
const isDisabled = useMemo(() => {
|
|
3154
3154
|
if (globalDisabled) return true;
|
|
3155
|
+
if (outOfRangeBehavior === "unbounded") return false;
|
|
3155
3156
|
if (!boundValue) return false;
|
|
3156
3157
|
if (direction === "prev") return destYear < boundValue.year || destYear === boundValue.year && destMonth < boundValue.month;
|
|
3157
3158
|
return destYear > boundValue.year || destYear === boundValue.year && destMonth > boundValue.month;
|
|
3158
3159
|
}, [
|
|
3159
3160
|
globalDisabled,
|
|
3161
|
+
outOfRangeBehavior,
|
|
3160
3162
|
destYear,
|
|
3161
3163
|
destMonth,
|
|
3162
3164
|
boundValue,
|
|
@@ -3603,7 +3605,7 @@ function computeWeeksInWindow(firstWeek, weekCount, weekStartDay, _T) {
|
|
|
3603
3605
|
return weeks;
|
|
3604
3606
|
}
|
|
3605
3607
|
//#endregion
|
|
3606
|
-
//#region src/
|
|
3608
|
+
//#region src/out-of-range.ts
|
|
3607
3609
|
/** Returns true if any day in the 7-day span starting at weekStart falls within [min, max]. */
|
|
3608
3610
|
function weekHasValidDay(weekStart, min, max, T) {
|
|
3609
3611
|
const weekEnd = weekStart.add({ days: 6 });
|
|
@@ -3650,10 +3652,10 @@ function shrinkWindow(firstWeek, weekCount, min, max, T) {
|
|
|
3650
3652
|
};
|
|
3651
3653
|
}
|
|
3652
3654
|
/**
|
|
3653
|
-
* Given a target firstWeek and weekCount, apply
|
|
3655
|
+
* Given a target firstWeek and weekCount, apply the out-of-range behavior and return
|
|
3654
3656
|
* the adjusted { firstWeek, weekCount }.
|
|
3655
3657
|
*/
|
|
3656
|
-
function
|
|
3658
|
+
function applyOutOfRange({ targetFirstWeek, weekCount, behavior, min, max, weekStartDay, T }) {
|
|
3657
3659
|
if (!min || !max || behavior === "unbounded") return {
|
|
3658
3660
|
firstWeek: targetFirstWeek,
|
|
3659
3661
|
weekCount
|
|
@@ -3696,7 +3698,7 @@ function canShift({ currentFirstWeek, weekCount, direction, shiftBy, behavior, m
|
|
|
3696
3698
|
return false;
|
|
3697
3699
|
}
|
|
3698
3700
|
if (behavior === "snap" || behavior === "snap-shrink") {
|
|
3699
|
-
const applied =
|
|
3701
|
+
const applied = applyOutOfRange({
|
|
3700
3702
|
targetFirstWeek,
|
|
3701
3703
|
weekCount,
|
|
3702
3704
|
behavior,
|
|
@@ -3808,9 +3810,9 @@ function resolveFirstWeek(currentFirstWeek, weekCount, target, options) {
|
|
|
3808
3810
|
* Reads calendar-level context and manages weeks-specific state.
|
|
3809
3811
|
*/
|
|
3810
3812
|
function useWeeksViewRootState(props) {
|
|
3811
|
-
const { weekCount, firstWeek: firstWeekProp, defaultFirstWeek: defaultFirstWeekProp, onFirstWeekChange, scrollBy: scrollByProp,
|
|
3813
|
+
const { weekCount, firstWeek: firstWeekProp, defaultFirstWeek: defaultFirstWeekProp, onFirstWeekChange, scrollBy: scrollByProp, outOfRangeBehavior: outOfRangeBehaviorProp, onWindowChange } = props;
|
|
3812
3814
|
const scrollBy = scrollByProp ?? "row";
|
|
3813
|
-
const
|
|
3815
|
+
const outOfRangeBehavior = outOfRangeBehaviorProp ?? "unbounded";
|
|
3814
3816
|
const calStable = useCalendarStable();
|
|
3815
3817
|
const calState = useCalendarState();
|
|
3816
3818
|
const T = calStable.temporal;
|
|
@@ -3830,10 +3832,10 @@ function useWeeksViewRootState(props) {
|
|
|
3830
3832
|
weekStartDay,
|
|
3831
3833
|
T
|
|
3832
3834
|
]);
|
|
3833
|
-
const
|
|
3835
|
+
const outOfRangeResult = useMemo(() => applyOutOfRange({
|
|
3834
3836
|
targetFirstWeek: resolvedFirstWeek,
|
|
3835
3837
|
weekCount,
|
|
3836
|
-
behavior:
|
|
3838
|
+
behavior: outOfRangeBehavior,
|
|
3837
3839
|
...minValue !== void 0 && { min: minValue },
|
|
3838
3840
|
...maxValue !== void 0 && { max: maxValue },
|
|
3839
3841
|
weekStartDay,
|
|
@@ -3841,19 +3843,19 @@ function useWeeksViewRootState(props) {
|
|
|
3841
3843
|
}), [
|
|
3842
3844
|
resolvedFirstWeek,
|
|
3843
3845
|
weekCount,
|
|
3844
|
-
|
|
3846
|
+
outOfRangeBehavior,
|
|
3845
3847
|
minValue,
|
|
3846
3848
|
maxValue,
|
|
3847
3849
|
weekStartDay,
|
|
3848
3850
|
T
|
|
3849
3851
|
]);
|
|
3850
3852
|
const adjustedWeeks = useMemo(() => {
|
|
3851
|
-
const sameFirst = T.PlainDate.compare(
|
|
3852
|
-
const sameCount =
|
|
3853
|
+
const sameFirst = T.PlainDate.compare(outOfRangeResult.firstWeek, resolvedFirstWeek) === 0;
|
|
3854
|
+
const sameCount = outOfRangeResult.weekCount === weekCount;
|
|
3853
3855
|
if (sameFirst && sameCount) return rawWeeks;
|
|
3854
|
-
return computeWeeksInWindow(
|
|
3856
|
+
return computeWeeksInWindow(outOfRangeResult.firstWeek, outOfRangeResult.weekCount, weekStartDay, T);
|
|
3855
3857
|
}, [
|
|
3856
|
-
|
|
3858
|
+
outOfRangeResult,
|
|
3857
3859
|
resolvedFirstWeek,
|
|
3858
3860
|
weekCount,
|
|
3859
3861
|
rawWeeks,
|
|
@@ -4026,10 +4028,10 @@ function useWeeksViewRootState(props) {
|
|
|
4026
4028
|
}, [isControlled, onFirstWeekChange]);
|
|
4027
4029
|
const goNext = useCallback((shiftBy) => {
|
|
4028
4030
|
const shift = shiftBy ?? weekCount;
|
|
4029
|
-
updateFirstWeek(
|
|
4031
|
+
updateFirstWeek(applyOutOfRange({
|
|
4030
4032
|
targetFirstWeek: resolvedFirstWeek.add({ weeks: shift }),
|
|
4031
4033
|
weekCount,
|
|
4032
|
-
behavior:
|
|
4034
|
+
behavior: outOfRangeBehavior,
|
|
4033
4035
|
...minValue !== void 0 && { min: minValue },
|
|
4034
4036
|
...maxValue !== void 0 && { max: maxValue },
|
|
4035
4037
|
weekStartDay,
|
|
@@ -4038,7 +4040,7 @@ function useWeeksViewRootState(props) {
|
|
|
4038
4040
|
}, [
|
|
4039
4041
|
resolvedFirstWeek,
|
|
4040
4042
|
weekCount,
|
|
4041
|
-
|
|
4043
|
+
outOfRangeBehavior,
|
|
4042
4044
|
minValue,
|
|
4043
4045
|
maxValue,
|
|
4044
4046
|
weekStartDay,
|
|
@@ -4047,10 +4049,10 @@ function useWeeksViewRootState(props) {
|
|
|
4047
4049
|
]);
|
|
4048
4050
|
const goPrev = useCallback((shiftBy) => {
|
|
4049
4051
|
const shift = shiftBy ?? weekCount;
|
|
4050
|
-
updateFirstWeek(
|
|
4052
|
+
updateFirstWeek(applyOutOfRange({
|
|
4051
4053
|
targetFirstWeek: resolvedFirstWeek.subtract({ weeks: shift }),
|
|
4052
4054
|
weekCount,
|
|
4053
|
-
behavior:
|
|
4055
|
+
behavior: outOfRangeBehavior,
|
|
4054
4056
|
...minValue !== void 0 && { min: minValue },
|
|
4055
4057
|
...maxValue !== void 0 && { max: maxValue },
|
|
4056
4058
|
weekStartDay,
|
|
@@ -4059,7 +4061,7 @@ function useWeeksViewRootState(props) {
|
|
|
4059
4061
|
}, [
|
|
4060
4062
|
resolvedFirstWeek,
|
|
4061
4063
|
weekCount,
|
|
4062
|
-
|
|
4064
|
+
outOfRangeBehavior,
|
|
4063
4065
|
minValue,
|
|
4064
4066
|
maxValue,
|
|
4065
4067
|
weekStartDay,
|
|
@@ -4067,10 +4069,10 @@ function useWeeksViewRootState(props) {
|
|
|
4067
4069
|
updateFirstWeek
|
|
4068
4070
|
]);
|
|
4069
4071
|
const scrollToWeek = useCallback((target, options) => {
|
|
4070
|
-
updateFirstWeek(
|
|
4072
|
+
updateFirstWeek(applyOutOfRange({
|
|
4071
4073
|
targetFirstWeek: resolveFirstWeek(resolvedFirstWeek, weekCount, resolveSpec(target), options),
|
|
4072
4074
|
weekCount,
|
|
4073
|
-
behavior:
|
|
4075
|
+
behavior: outOfRangeBehavior,
|
|
4074
4076
|
...minValue !== void 0 && { min: minValue },
|
|
4075
4077
|
...maxValue !== void 0 && { max: maxValue },
|
|
4076
4078
|
weekStartDay,
|
|
@@ -4080,7 +4082,7 @@ function useWeeksViewRootState(props) {
|
|
|
4080
4082
|
resolvedFirstWeek,
|
|
4081
4083
|
weekCount,
|
|
4082
4084
|
resolveSpec,
|
|
4083
|
-
|
|
4085
|
+
outOfRangeBehavior,
|
|
4084
4086
|
minValue,
|
|
4085
4087
|
maxValue,
|
|
4086
4088
|
weekStartDay,
|
|
@@ -4100,7 +4102,7 @@ function useWeeksViewRootState(props) {
|
|
|
4100
4102
|
const stableCtx = useMemo(() => ({
|
|
4101
4103
|
weekCount,
|
|
4102
4104
|
scrollBy,
|
|
4103
|
-
|
|
4105
|
+
outOfRangeBehavior,
|
|
4104
4106
|
goNext,
|
|
4105
4107
|
goPrev,
|
|
4106
4108
|
scrollToWeek,
|
|
@@ -4109,7 +4111,7 @@ function useWeeksViewRootState(props) {
|
|
|
4109
4111
|
}), [
|
|
4110
4112
|
weekCount,
|
|
4111
4113
|
scrollBy,
|
|
4112
|
-
|
|
4114
|
+
outOfRangeBehavior,
|
|
4113
4115
|
goNext,
|
|
4114
4116
|
goPrev,
|
|
4115
4117
|
scrollToWeek,
|
|
@@ -4171,7 +4173,7 @@ function WeeksViewRootFn(props, ref) {
|
|
|
4171
4173
|
numberOfMonths: 1,
|
|
4172
4174
|
fixedWeeks: false,
|
|
4173
4175
|
outsideDays: "enabled",
|
|
4174
|
-
|
|
4176
|
+
outOfRangeBehavior: "unbounded",
|
|
4175
4177
|
goNextMonth: () => {},
|
|
4176
4178
|
goPrevMonth: () => {},
|
|
4177
4179
|
setGridLabelId: () => {},
|
|
@@ -4211,7 +4213,7 @@ function WeeksViewRootFn(props, ref) {
|
|
|
4211
4213
|
}
|
|
4212
4214
|
const WeeksViewRoot = forwardRef(WeeksViewRootFn);
|
|
4213
4215
|
function WeeksViewFn(props, ref) {
|
|
4214
|
-
const { weekCount, firstWeek, defaultFirstWeek, onFirstWeekChange, scrollBy,
|
|
4216
|
+
const { weekCount, firstWeek, defaultFirstWeek, onFirstWeekChange, scrollBy, outOfRangeBehavior, onWindowChange, children, ...calendarProps } = props;
|
|
4215
4217
|
return /* @__PURE__ */ jsx(CalendarProvider, {
|
|
4216
4218
|
...calendarProps,
|
|
4217
4219
|
children: /* @__PURE__ */ jsx(WeeksViewRoot, {
|
|
@@ -4221,7 +4223,7 @@ function WeeksViewFn(props, ref) {
|
|
|
4221
4223
|
defaultFirstWeek,
|
|
4222
4224
|
onFirstWeekChange,
|
|
4223
4225
|
scrollBy,
|
|
4224
|
-
|
|
4226
|
+
outOfRangeBehavior,
|
|
4225
4227
|
onWindowChange,
|
|
4226
4228
|
children
|
|
4227
4229
|
})
|
|
@@ -4242,7 +4244,7 @@ const weekCountStateAttributesMapping = {
|
|
|
4242
4244
|
};
|
|
4243
4245
|
function useWeeksNavButton(direction, shiftByProp) {
|
|
4244
4246
|
const { disabled: globalDisabled, minValue, maxValue, temporal: T, weekStartDay } = useCalendarStable();
|
|
4245
|
-
const { weekCount,
|
|
4247
|
+
const { weekCount, outOfRangeBehavior, goNext, goPrev } = useWeeksViewStable();
|
|
4246
4248
|
const { windowInfo } = useWeeksViewState();
|
|
4247
4249
|
const { rootState } = useMonthViewState();
|
|
4248
4250
|
const currentFirstWeek = windowInfo.windowStart;
|
|
@@ -4253,7 +4255,7 @@ function useWeeksNavButton(direction, shiftByProp) {
|
|
|
4253
4255
|
weekCount,
|
|
4254
4256
|
direction: direction === "next" ? 1 : -1,
|
|
4255
4257
|
...shiftByProp !== void 0 && { shiftBy: shiftByProp },
|
|
4256
|
-
behavior:
|
|
4258
|
+
behavior: outOfRangeBehavior,
|
|
4257
4259
|
...minValue !== void 0 && { min: minValue },
|
|
4258
4260
|
...maxValue !== void 0 && { max: maxValue },
|
|
4259
4261
|
weekStartDay,
|
|
@@ -4265,7 +4267,7 @@ function useWeeksNavButton(direction, shiftByProp) {
|
|
|
4265
4267
|
weekCount,
|
|
4266
4268
|
direction,
|
|
4267
4269
|
shiftByProp,
|
|
4268
|
-
|
|
4270
|
+
outOfRangeBehavior,
|
|
4269
4271
|
minValue,
|
|
4270
4272
|
maxValue,
|
|
4271
4273
|
weekStartDay,
|
|
@@ -4305,7 +4307,7 @@ function PrevWeeksButtonFn(props, ref) {
|
|
|
4305
4307
|
}
|
|
4306
4308
|
/**
|
|
4307
4309
|
* Button that navigates to the previous week(s). Automatically disabled when
|
|
4308
|
-
* no more weeks are available based on `
|
|
4310
|
+
* no more weeks are available based on `outOfRangeBehavior` and `min`.
|
|
4309
4311
|
* Exposes `data-direction="prev"`.
|
|
4310
4312
|
*/
|
|
4311
4313
|
const PrevWeeksButton = forwardRef(PrevWeeksButtonFn);
|
|
@@ -4323,7 +4325,7 @@ function NextWeeksButtonFn(props, ref) {
|
|
|
4323
4325
|
}
|
|
4324
4326
|
/**
|
|
4325
4327
|
* Button that navigates to the next week(s). Automatically disabled when
|
|
4326
|
-
* no more weeks are available based on `
|
|
4328
|
+
* no more weeks are available based on `outOfRangeBehavior` and `max`.
|
|
4327
4329
|
* Exposes `data-direction="next"`.
|
|
4328
4330
|
*/
|
|
4329
4331
|
const NextWeeksButton = forwardRef(NextWeeksButtonFn);
|
|
@@ -4347,7 +4349,7 @@ function WeekCountFn(props, ref) {
|
|
|
4347
4349
|
}
|
|
4348
4350
|
/**
|
|
4349
4351
|
* Renders the current visible week count as a number. Useful with shrink
|
|
4350
|
-
*
|
|
4352
|
+
* out-of-range modes where the actual count may be less than the `weekCount` prop.
|
|
4351
4353
|
*/
|
|
4352
4354
|
const WeekCount = forwardRef(WeekCountFn);
|
|
4353
4355
|
//#endregion
|