@stenajs-webui/calendar 20.8.1 → 20.10.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/components/calendar/CalendarMonth.d.ts +2 -2
- package/dist/components/calendar/CalendarTheme.d.ts +0 -1
- package/dist/features/calendar-with-month-year-pickers/CalendarPanelType.d.ts +1 -1
- package/dist/features/calendar-with-month-year-pickers/CalendarWithMonthYearPickers.d.ts +4 -2
- package/dist/features/month-picker/MonthPicker.d.ts +9 -1
- package/dist/features/month-picker/MonthPickerCell.d.ts +6 -3
- package/dist/features/month-switcher/CalendarWithMonthSwitcher.d.ts +4 -3
- package/dist/index.es.js +1379 -1415
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/CalendarTypes.d.ts +13 -5
- package/dist/util/calendar/CalendarDataFactory.d.ts +1 -0
- package/package.json +9 -8
- package/dist/components/calendar/CalendarWeek.d.ts +0 -18
|
@@ -8,9 +8,9 @@ export interface CalendarMonthProps<T> extends CalendarOnClicks<T>, Renderers, O
|
|
|
8
8
|
userDataPerWeek?: CalendarUserMonthData<T>;
|
|
9
9
|
statePerWeek?: CalendarUserMonthData<DayState>;
|
|
10
10
|
theme?: CalendarTheme;
|
|
11
|
-
headerLeftContent?: React.ReactElement<{}>;
|
|
12
11
|
headerRightContent?: React.ReactElement<{}>;
|
|
13
12
|
extraDayContent?: React.ComponentType<ExtraDayContentProps<T>>;
|
|
14
13
|
defaultHighlights?: Array<DayStateHighlight>;
|
|
14
|
+
showWeekNumber: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare function CalendarMonth<T>({ month, dayComponent, statePerWeek, userDataPerWeek, minDate, maxDate, onClickDay, onClickWeek, onClickWeekDay, onClickMonth,
|
|
16
|
+
export declare function CalendarMonth<T>({ month, dayComponent, statePerWeek, userDataPerWeek, minDate, maxDate, onClickDay, onClickWeek, onClickWeekDay, onClickMonth, renderWeekNumber, renderWeekDay, headerRightContent, theme, extraDayContent, defaultHighlights, showWeekNumber, }: CalendarMonthProps<T>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CalendarPanelType = "calendar" | "
|
|
1
|
+
export type CalendarPanelType = "calendar" | "month" | "presets";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { CalendarProps, RenderMonthPickerArgs } from "../../types/CalendarTypes";
|
|
3
4
|
import { CalendarPreset } from "../preset-picker/CalendarPreset";
|
|
4
5
|
import { CalendarPanelType } from "./CalendarPanelType";
|
|
5
6
|
interface CalendarWithMonthYearPickersProps<T> extends Omit<CalendarProps<T>, "date" | "year" | "month"> {
|
|
@@ -8,6 +9,7 @@ interface CalendarWithMonthYearPickersProps<T> extends Omit<CalendarProps<T>, "d
|
|
|
8
9
|
currentPanel: CalendarPanelType;
|
|
9
10
|
setCurrentPanel: (currentPanel: CalendarPanelType) => void;
|
|
10
11
|
onSelectPreset: (preset: CalendarPreset) => void;
|
|
12
|
+
renderMonthPicker?: (args: RenderMonthPickerArgs) => ReactNode;
|
|
11
13
|
}
|
|
12
|
-
export declare const CalendarWithMonthYearPickers: <T>({ locale, dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, ...props }: CalendarWithMonthYearPickersProps<T>) => React.JSX.Element;
|
|
14
|
+
export declare const CalendarWithMonthYearPickers: <T>({ locale, dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, renderMonthPicker, ...props }: CalendarWithMonthYearPickersProps<T>) => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
13
15
|
export {};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Month } from "../../util/calendar/CalendarDataFactory";
|
|
3
3
|
import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
|
|
4
|
-
|
|
4
|
+
import { Locale } from "date-fns";
|
|
5
|
+
export interface MonthPickerValue {
|
|
6
|
+
month: Month;
|
|
7
|
+
year: number;
|
|
8
|
+
}
|
|
9
|
+
export interface MonthPickerProps extends ValueAndOnValueChangeProps<MonthPickerValue> {
|
|
5
10
|
locale?: Locale;
|
|
11
|
+
firstMonth: Date;
|
|
12
|
+
numMonths: number;
|
|
6
13
|
}
|
|
7
14
|
export declare const MonthPicker: React.FC<MonthPickerProps>;
|
|
15
|
+
export declare const createFirstDate: (date: Date) => MonthPickerValue;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Locale } from "date-fns";
|
|
3
3
|
import { Month } from "../../util/calendar/CalendarDataFactory";
|
|
4
|
-
interface
|
|
4
|
+
interface MonthPickerCellProps {
|
|
5
|
+
year: number;
|
|
5
6
|
month: Month;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
selected: boolean;
|
|
6
9
|
locale: Locale;
|
|
7
10
|
}
|
|
8
|
-
export declare const MonthPickerCell: React.FC<
|
|
11
|
+
export declare const MonthPickerCell: React.FC<MonthPickerCellProps>;
|
|
9
12
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { CalendarProps } from "../../types/CalendarTypes";
|
|
2
|
+
import { CalendarProps, RenderMonthPickerArgs } from "../../types/CalendarTypes";
|
|
3
3
|
import { CalendarPanelType } from "../calendar-with-month-year-pickers/CalendarPanelType";
|
|
4
4
|
import { CalendarPreset } from "../preset-picker/CalendarPreset";
|
|
5
|
+
import { ReactNode } from "react";
|
|
5
6
|
export type MonthSwitcherPlacement = "header" | "below";
|
|
6
7
|
export interface CalendarWithMonthSwitcherProps<T> extends CalendarProps<T> {
|
|
7
8
|
monthSwitcherPlacement?: MonthSwitcherPlacement;
|
|
@@ -10,6 +11,6 @@ export interface CalendarWithMonthSwitcherProps<T> extends CalendarProps<T> {
|
|
|
10
11
|
currentPanel: CalendarPanelType;
|
|
11
12
|
setCurrentPanel: (currentPanel: CalendarPanelType) => void;
|
|
12
13
|
onSelectPreset?: (preset: CalendarPreset) => void;
|
|
13
|
-
|
|
14
|
+
renderMonthPicker?: (args: RenderMonthPickerArgs) => ReactNode;
|
|
14
15
|
}
|
|
15
|
-
export declare function CalendarWithMonthSwitcher<T>({ monthSwitcherPlacement, theme, dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, onSelectPreset,
|
|
16
|
+
export declare function CalendarWithMonthSwitcher<T>({ monthSwitcherPlacement, theme, dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, onSelectPreset, renderMonthPicker, ...calendarProps }: CalendarWithMonthSwitcherProps<T>): React.JSX.Element;
|