@stenajs-webui/calendar 21.25.0 → 21.27.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/renderers/WeekNumberCell.d.ts +2 -1
- package/dist/components/input-types/date-range-dual-text-input/hooks/UseDateRangeEffects.d.ts +1 -1
- package/dist/components/input-types/date-range-dual-text-input/hooks/UseUserInputHandlers.d.ts +1 -1
- package/dist/components/input-types/date-range-input/hooks/UseDateRangeInput.d.ts +2 -2
- package/dist/components/input-types/date-time-input/hooks/UseDateRangeEffects.d.ts +1 -1
- package/dist/components/input-types/date-time-input/hooks/UseDateRangeHandlers.d.ts +1 -1
- package/dist/components/input-types/date-time-input/hooks/UseUserInputHandlers.d.ts +1 -1
- package/dist/features/calendar-with-month-year-pickers/CalendarWithMonthYearPickers.d.ts +1 -1
- package/dist/features/time-picker/TimePickerCell.d.ts +3 -3
- package/dist/features/travel-calendar/hooks/UseTravelDateInput.d.ts +1 -1
- package/dist/features/travel-calendar/hooks/UseTravelDateRangeInput.d.ts +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/CalendarTypes.d.ts +3 -2
- package/package.json +20 -20
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
import { OnClickWeek } from "../../../types/CalendarTypes";
|
|
3
4
|
import { WeekData } from "../../../util/calendar/CalendarDataFactory";
|
|
4
5
|
import { CalendarTheme } from "../CalendarTheme";
|
|
@@ -6,7 +7,7 @@ export interface WeekNumberCellProps {
|
|
|
6
7
|
week: WeekData;
|
|
7
8
|
onClickWeek?: OnClickWeek;
|
|
8
9
|
theme: CalendarTheme;
|
|
9
|
-
background?:
|
|
10
|
+
background?: ReactNode;
|
|
10
11
|
prefix?: string;
|
|
11
12
|
backgroundColor?: string;
|
|
12
13
|
}
|
package/dist/components/input-types/date-range-dual-text-input/hooks/UseDateRangeEffects.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
export declare const useDateRangeEffects: (startDate: Date | undefined, endDate: Date | undefined, setDateInFocus: (date: Date) => void, startDateInputRef: RefObject<HTMLInputElement>, endDateInputRef: RefObject<HTMLInputElement>) => void;
|
|
2
|
+
export declare const useDateRangeEffects: (startDate: Date | undefined, endDate: Date | undefined, setDateInFocus: (date: Date) => void, startDateInputRef: RefObject<HTMLInputElement | null>, endDateInputRef: RefObject<HTMLInputElement | null>) => void;
|
package/dist/components/input-types/date-range-dual-text-input/hooks/UseUserInputHandlers.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { RefObject } from "react";
|
|
|
3
3
|
import { DayData } from "../../../../util/calendar/CalendarDataFactory";
|
|
4
4
|
import { DateRangeDualTextInputProps } from "../DateRangeDualTextInput";
|
|
5
5
|
import { UseInputStatesResult } from "./UseInputStates";
|
|
6
|
-
export declare const useUserInputHandlers: (startDate: Date | undefined, endDate: Date | undefined, onValueChange: DateRangeDualTextInputProps["onValueChange"], startDateInputRef: RefObject<HTMLInputElement>, endDateInputRef: RefObject<HTMLInputElement>, showCalendar: (dateInFocus?: Date) => void, hideCalendar: () => void, { firstFocusedInput, setFirstFocusedInput, isCalendarVisible, setFocusedInput, focusedInput, setCurrentPanel, setDateInFocus, }: UseInputStatesResult) => {
|
|
6
|
+
export declare const useUserInputHandlers: (startDate: Date | undefined, endDate: Date | undefined, onValueChange: DateRangeDualTextInputProps["onValueChange"], startDateInputRef: RefObject<HTMLInputElement | null>, endDateInputRef: RefObject<HTMLInputElement | null>, showCalendar: (dateInFocus?: Date) => void, hideCalendar: () => void, { firstFocusedInput, setFirstFocusedInput, isCalendarVisible, setFocusedInput, focusedInput, setCurrentPanel, setDateInFocus, }: UseInputStatesResult) => {
|
|
7
7
|
onFocusLeft: () => void;
|
|
8
8
|
onFocusRight: () => void;
|
|
9
9
|
onClickDay: (day: DayData) => void;
|
|
@@ -8,8 +8,8 @@ export declare const useDateRangeInput: (value: DateRange | undefined, onValueCh
|
|
|
8
8
|
showCalendarStartDate: () => true;
|
|
9
9
|
focusedInput: DateRangeFocusedInput;
|
|
10
10
|
setFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
|
|
11
|
-
startDateInputRef: import("react").RefObject<HTMLInputElement>;
|
|
12
|
-
endDateInputRef: import("react").RefObject<HTMLInputElement>;
|
|
11
|
+
startDateInputRef: import("react").RefObject<HTMLInputElement | null>;
|
|
12
|
+
endDateInputRef: import("react").RefObject<HTMLInputElement | null>;
|
|
13
13
|
onClickDay: (day: DayData) => void;
|
|
14
14
|
startDateIsAfterEnd: boolean | undefined;
|
|
15
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
export declare const useDateRangeEffects: (date: Date | undefined | null, setDateInFocus: (date: Date) => void, dateInputRef: RefObject<HTMLInputElement>) => void;
|
|
2
|
+
export declare const useDateRangeEffects: (date: Date | undefined | null, setDateInFocus: (date: Date) => void, dateInputRef: RefObject<HTMLInputElement | null>) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent, RefObject } from "react";
|
|
2
2
|
import { DateTimeInputProps } from "../DateTimeInput";
|
|
3
3
|
import { UseInputStatesResult } from "./UseInputStates";
|
|
4
|
-
export declare const useDateRangeHandlers: (date: Date | undefined | null, onValueChange: DateTimeInputProps["onValueChange"], { setDateInFocus, showCalendarInternal, hideCalendarInternal, setFirstFocusedInput, setCurrentPanel, localTime, setLocalTime, localDate, setLocalDate, }: UseInputStatesResult, dateInputRef: RefObject<HTMLInputElement>) => {
|
|
4
|
+
export declare const useDateRangeHandlers: (date: Date | undefined | null, onValueChange: DateTimeInputProps["onValueChange"], { setDateInFocus, showCalendarInternal, hideCalendarInternal, setFirstFocusedInput, setCurrentPanel, localTime, setLocalTime, localDate, setLocalDate, }: UseInputStatesResult, dateInputRef: RefObject<HTMLInputElement | null>) => {
|
|
5
5
|
inputLeftChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
|
|
6
6
|
inputRightChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
|
|
7
7
|
hideCalendar: () => void;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { RefObject } from "react";
|
|
3
3
|
import { DayData } from "../../../../util/calendar/CalendarDataFactory";
|
|
4
4
|
import { UseInputStatesResult } from "./UseInputStates";
|
|
5
|
-
export declare const useUserInputHandlers: (onChangeDate: (incomingDate: Date | null) => void, dateInputRef: RefObject<HTMLInputElement>, showCalendar: () => void, hideCalendar: () => void, { isCalendarVisible, setCurrentPanel, showTimePicker, hideTimePicker, }: UseInputStatesResult) => {
|
|
5
|
+
export declare const useUserInputHandlers: (onChangeDate: (incomingDate: Date | null) => void, dateInputRef: RefObject<HTMLInputElement | null>, showCalendar: () => void, hideCalendar: () => void, { isCalendarVisible, setCurrentPanel, showTimePicker, hideTimePicker, }: UseInputStatesResult) => {
|
|
6
6
|
onFocusLeft: () => void;
|
|
7
7
|
onFocusRight: () => void;
|
|
8
8
|
onClickDay: (day: DayData) => void;
|
|
@@ -12,5 +12,5 @@ interface CalendarWithMonthYearPickersProps<T> extends Omit<CalendarProps<T>, "d
|
|
|
12
12
|
onSelectPreset: (preset: CalendarPreset) => void;
|
|
13
13
|
renderMonthPicker?: (args: RenderMonthPickerArgs) => ReactNode;
|
|
14
14
|
}
|
|
15
|
-
export declare const CalendarWithMonthYearPickers: <T>({ locale, dateInFocus, firstMonthInMonthPicker, setDateInFocus, currentPanel, setCurrentPanel, renderMonthPicker, ...props }: CalendarWithMonthYearPickersProps<T>) => string | number | boolean | React.
|
|
15
|
+
export declare const CalendarWithMonthYearPickers: <T>({ locale, dateInFocus, firstMonthInMonthPicker, setDateInFocus, currentPanel, setCurrentPanel, renderMonthPicker, ...props }: CalendarWithMonthYearPickersProps<T>) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
16
16
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { RefObject } from "react";
|
|
3
3
|
export interface TimePickerCellProps {
|
|
4
4
|
item: number;
|
|
5
5
|
selected?: boolean;
|
|
6
6
|
onClick: (label: number) => void;
|
|
7
|
-
columnRef: RefObject<HTMLDivElement>;
|
|
8
|
-
canScrollRef:
|
|
7
|
+
columnRef: RefObject<HTMLDivElement | null>;
|
|
8
|
+
canScrollRef: RefObject<boolean>;
|
|
9
9
|
}
|
|
10
10
|
export declare const TimePickerCell: React.FC<TimePickerCellProps>;
|
|
@@ -5,7 +5,7 @@ export declare const useTravelDateInput: (value: string | undefined, onValueChan
|
|
|
5
5
|
onClickDate: (date: Date) => void;
|
|
6
6
|
onValueChangeByInputs: (value: string) => void;
|
|
7
7
|
prevMonthDisabled: boolean;
|
|
8
|
-
monthPickerButtonRef: import("react").RefObject<HTMLButtonElement>;
|
|
8
|
+
monthPickerButtonRef: import("react").RefObject<HTMLButtonElement | null>;
|
|
9
9
|
calendarId: string;
|
|
10
10
|
monthPickerButtonLabel: string;
|
|
11
11
|
visiblePanel: VisiblePanel;
|
|
@@ -6,7 +6,7 @@ export declare const useTravelDateRangeInput: (value: TravelDateRangeInputValue
|
|
|
6
6
|
onValueChangeByInputs: (value: TravelDateRangeInputValue) => void;
|
|
7
7
|
isValidDateRange: boolean;
|
|
8
8
|
prevMonthDisabled: boolean;
|
|
9
|
-
monthPickerButtonRef: import("react").RefObject<HTMLButtonElement>;
|
|
9
|
+
monthPickerButtonRef: import("react").RefObject<HTMLButtonElement | null>;
|
|
10
10
|
calendarId: string;
|
|
11
11
|
monthPickerButtonLabel: string;
|
|
12
12
|
visiblePanel: VisiblePanel;
|