@stenajs-webui/calendar 20.6.10 → 20.7.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.
Files changed (25) hide show
  1. package/dist/components/calendar/CalendarTheme.d.ts +3 -3
  2. package/dist/components/calendar/DisabledDayWrapper.d.ts +1 -1
  3. package/dist/components/calendar/renderers/CalendarDay.d.ts +1 -1
  4. package/dist/components/calendar-types/date-range-calendar/DateRangeCalendar.d.ts +2 -2
  5. package/dist/components/calendar-types/single-week-calendar/SingleWeekCalendar.d.ts +1 -1
  6. package/dist/components/input-types/date-input/UseDateInput.d.ts +1 -1
  7. package/dist/components/input-types/date-range-dual-text-input/hooks/UseInputStates.d.ts +1 -1
  8. package/dist/components/input-types/date-text-input/DateTextInput.d.ts +1 -1
  9. package/dist/components/input-types/date-time-input/hooks/UseInputStates.d.ts +1 -1
  10. package/dist/features/calendar-with-month-year-pickers/CalendarPanelType.d.ts +1 -1
  11. package/dist/features/internal-panel-state/UseInternalPanelState.d.ts +1 -1
  12. package/dist/features/month-switcher/CalendarWithMonthSwitcher.d.ts +1 -1
  13. package/dist/features/month-switcher/hooks/UseSelectedMonthStepperLogic.d.ts +1 -1
  14. package/dist/features/preset-picker/CalendarPreset.d.ts +1 -1
  15. package/dist/index.d.ts +0 -2
  16. package/dist/index.es.js +1036 -1082
  17. package/dist/index.es.js.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/types/CalendarTypes.d.ts +15 -15
  21. package/dist/types/InternalPanelAndFocusStateProps.d.ts +1 -1
  22. package/dist/util/calendar/StateHelper.d.ts +1 -1
  23. package/package.json +7 -7
  24. package/dist/components/calendar-types/date-range-exclusion-calendar/DateRangeExclusionCalendar.d.ts +0 -7
  25. package/dist/components/calendar-types/date-range-exclusion-calendar/UseDateRangeExclusionSelection.d.ts +0 -3
@@ -27,9 +27,9 @@ export interface WeekDayTheme {
27
27
  textColor?: string;
28
28
  clickableTextColor?: string;
29
29
  }
30
- export declare type CalendarStyleProvider<TUserData, TResult> = (defaultHighlights: Array<DayStateHighlight> | undefined, dayState: DayState | undefined, day: DayData, week: WeekData, month: MonthData, userData?: TUserData) => TResult;
31
- export declare type CalendarWrapperStyleProvider<TUserData> = CalendarStyleProvider<TUserData, CSSProperties | undefined>;
32
- declare type TextPropsProvider<TUserData> = CalendarStyleProvider<TUserData, TextProps | undefined>;
30
+ export type CalendarStyleProvider<TUserData, TResult> = (defaultHighlights: Array<DayStateHighlight> | undefined, dayState: DayState | undefined, day: DayData, week: WeekData, month: MonthData, userData?: TUserData) => TResult;
31
+ export type CalendarWrapperStyleProvider<TUserData> = CalendarStyleProvider<TUserData, CSSProperties | undefined>;
32
+ type TextPropsProvider<TUserData> = CalendarStyleProvider<TUserData, TextProps | undefined>;
33
33
  export interface CalendarDayTheme<TUserData> {
34
34
  tdStyle?: CalendarWrapperStyleProvider<TUserData>;
35
35
  innerWrapperStyle?: CalendarWrapperStyleProvider<TUserData>;
@@ -3,5 +3,5 @@ import { CalendarDayProps, OptionalMinMaxDates } from "../../types/CalendarTypes
3
3
  interface DisabledDayWrapperProps<T> extends CalendarDayProps<T>, OptionalMinMaxDates {
4
4
  dayComponent: React.ComponentType<CalendarDayProps<T>>;
5
5
  }
6
- export declare const DisabledDayWrapper: <T>({ dayComponent, minDate, maxDate, dayState, day, ...props }: DisabledDayWrapperProps<T>) => JSX.Element;
6
+ export declare const DisabledDayWrapper: <T>({ dayComponent: DayComponent, minDate, maxDate, dayState, day, ...props }: DisabledDayWrapperProps<T>) => JSX.Element;
7
7
  export {};
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { CalendarDayProps } from "../../../types/CalendarTypes";
3
- export declare const CalendarDay: <T>({ day, week, month, dayState, userData, onClickDay, theme, extraDayContent, defaultHighlights, }: CalendarDayProps<T>) => JSX.Element;
3
+ export declare const CalendarDay: <T>({ day, week, month, dayState, userData, onClickDay, theme, extraDayContent: ExtraDayContent, defaultHighlights, }: CalendarDayProps<T>) => JSX.Element;
@@ -2,11 +2,11 @@
2
2
  import { InternalPanelAndFocusStateProps } from "../../../types/InternalPanelAndFocusStateProps";
3
3
  import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
4
4
  import { DateRange } from "../../../types/DateRange";
5
- export declare type DateRangeFocusedInput = "startDate" | "endDate" | undefined;
5
+ export type DateRangeFocusedInput = "startDate" | "endDate" | undefined;
6
6
  export interface DateRangeCalendarProps<T> extends InternalPanelAndFocusStateProps<T>, ValueAndOnValueChangeProps<DateRange> {
7
7
  focusedInput?: DateRangeFocusedInput;
8
8
  setFocusedInput: (focusedInput: DateRangeFocusedInput) => void;
9
9
  initialDateInFocus?: Date;
10
10
  }
11
11
  export declare function DateRangeCalendar<T>(props: DateRangeCalendarProps<T>): JSX.Element;
12
- export declare type DateRangeInputCalendarProps<T> = Omit<DateRangeCalendarProps<T>, "startDateInFocus" | "value" | "onValueChange" | "focusedInput" | "setFocusedInput" | "theme" | "currentPanel" | "setCurrentPanel">;
12
+ export type DateRangeInputCalendarProps<T> = Omit<DateRangeCalendarProps<T>, "startDateInFocus" | "value" | "onValueChange" | "focusedInput" | "setFocusedInput" | "theme" | "currentPanel" | "setCurrentPanel">;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { InternalPanelAndFocusStateProps } from "../../../types/InternalPanelAndFocusStateProps";
3
- export declare type SingleWeekValue = string;
3
+ export type SingleWeekValue = string;
4
4
  export interface SingleWeekCalendarProps<T> extends InternalPanelAndFocusStateProps<T> {
5
5
  value: SingleWeekValue | undefined;
6
6
  onChange: (value: SingleWeekValue | undefined) => void;
@@ -1,4 +1,4 @@
1
- export declare const useDateInput: (onChange?: ((date: Date | undefined) => void) | undefined, onClose?: () => void, openOnMount?: boolean) => {
1
+ export declare const useDateInput: (onChange?: (date: Date | undefined) => void, onClose?: () => void, openOnMount?: boolean) => {
2
2
  showCalendar: () => true;
3
3
  hideCalendar: () => void;
4
4
  showingCalendar: boolean;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
3
  import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
- export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
4
+ export type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
5
  export declare const useInputStates: (startDate: Date | undefined, endDate: Date | undefined) => {
6
6
  isCalendarVisible: boolean;
7
7
  showCalendarInternal: () => void;
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
  import { SingleDateCalendarProps } from "../../calendar-types/single-date-calendar/SingleDateCalendar";
5
5
  import { CalendarTheme } from "../../calendar/CalendarTheme";
6
6
  import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
7
- export declare type DateTextInputCalendarProps<T> = Omit<SingleDateCalendarProps<T>, "value" | "onChange" | "theme">;
7
+ export type DateTextInputCalendarProps<T> = Omit<SingleDateCalendarProps<T>, "value" | "onChange" | "theme">;
8
8
  export interface DateTextInputProps<T> extends Omit<TextInputProps, "onChange" | "theme" | "min" | "max">, OptionalMinMaxDatesAsString {
9
9
  /** Props to be passed to Calendar, see SingleDateCalendar. */
10
10
  calendarProps?: DateTextInputCalendarProps<T>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
3
  import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
- export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
4
+ export type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
5
  export declare const useInputStates: (date: Date | undefined | null) => {
6
6
  isCalendarVisible: boolean;
7
7
  showCalendarInternal: () => void;
@@ -1 +1 @@
1
- export declare type CalendarPanelType = "calendar" | "year" | "month" | "presets";
1
+ export type CalendarPanelType = "calendar" | "year" | "month" | "presets";
@@ -1,5 +1,5 @@
1
1
  import { CalendarPanelType } from "../calendar-with-month-year-pickers/CalendarPanelType";
2
- export declare type OnChangePanel = (panel: CalendarPanelType) => void;
2
+ export type OnChangePanel = (panel: CalendarPanelType) => void;
3
3
  export interface UseInternalPanelStateProps {
4
4
  onChangePanel?: OnChangePanel;
5
5
  }
@@ -2,7 +2,7 @@
2
2
  import { CalendarProps } from "../../types/CalendarTypes";
3
3
  import { CalendarPanelType } from "../calendar-with-month-year-pickers/CalendarPanelType";
4
4
  import { CalendarPreset } from "../preset-picker/CalendarPreset";
5
- export declare type MonthSwitcherPlacement = "header" | "below";
5
+ export type MonthSwitcherPlacement = "header" | "below";
6
6
  export interface CalendarWithMonthSwitcherProps<T> extends CalendarProps<T> {
7
7
  monthSwitcherPlacement?: MonthSwitcherPlacement;
8
8
  dateInFocus: Date;
@@ -1,4 +1,4 @@
1
- export declare const useSelectedMonthStepperLogic: (dateInFocus: Date, setDateInFocus?: ((dateInFocus: Date) => void) | undefined, monthsPerRow?: number, numMonths?: number) => {
1
+ export declare const useSelectedMonthStepperLogic: (dateInFocus: Date, setDateInFocus?: (dateInFocus: Date) => void, monthsPerRow?: number, numMonths?: number) => {
2
2
  nextMonth: () => void;
3
3
  prevMonth: () => void;
4
4
  nextYear: () => void;
@@ -1,4 +1,4 @@
1
- export declare type CalendarPreset = DatePreset | DateRangePreset;
1
+ export type CalendarPreset = DatePreset | DateRangePreset;
2
2
  export interface DatePreset {
3
3
  label: string;
4
4
  date: Date;
package/dist/index.d.ts CHANGED
@@ -7,8 +7,6 @@ export * from "./components/calendar-types/multi-date-calendar/MultiDateCalendar
7
7
  export * from "./components/calendar-types/multi-date-calendar/UseMultiDateSelection";
8
8
  export * from "./components/calendar-types/single-week-calendar/SingleWeekCalendar";
9
9
  export * from "./components/calendar-types/single-week-calendar/UseSingleWeekSelection";
10
- export * from "./components/calendar-types/date-range-exclusion-calendar/DateRangeExclusionCalendar";
11
- export * from "./components/calendar-types/date-range-exclusion-calendar/UseDateRangeExclusionSelection";
12
10
  export * from "./components/input-types/date-input/DateInput";
13
11
  export * from "./components/input-types/date-range-input/DateRangeInput";
14
12
  export * from "./components/input-types/date-text-input/DateTextInput";