@stenajs-webui/calendar 17.6.0 → 17.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/calendar/Calendar.d.ts +3 -3
  3. package/dist/components/calendar/CalendarMonth.d.ts +16 -16
  4. package/dist/components/calendar/CalendarMonthWithMonthTextHeader.d.ts +6 -6
  5. package/dist/components/calendar/CalendarTheme.d.ts +57 -57
  6. package/dist/components/calendar/CalendarWeek.d.ts +18 -18
  7. package/dist/components/calendar/DisabledDayWrapper.d.ts +7 -7
  8. package/dist/components/calendar/renderers/CalendarDay.d.ts +3 -3
  9. package/dist/components/calendar/renderers/WeekDayCell.d.ts +10 -10
  10. package/dist/components/calendar/renderers/WeekNumberCell.d.ts +13 -13
  11. package/dist/components/calendar-types/date-range-calendar/DateRangeCalendar.d.ts +11 -11
  12. package/dist/components/calendar-types/date-range-calendar/hooks/UseDateRangeCalendarState.d.ts +10 -10
  13. package/dist/components/calendar-types/date-range-calendar/hooks/UseDateRangeSelection.d.ts +3 -3
  14. package/dist/components/calendar-types/date-range-exclusion-calendar/DateRangeExclusionCalendar.d.ts +7 -7
  15. package/dist/components/calendar-types/date-range-exclusion-calendar/UseDateRangeExclusionSelection.d.ts +3 -3
  16. package/dist/components/calendar-types/multi-date-calendar/MultiDateCalendar.d.ts +8 -8
  17. package/dist/components/calendar-types/multi-date-calendar/UseMultiDateSelection.d.ts +3 -3
  18. package/dist/components/calendar-types/single-date-calendar/SingleDateCalendar.d.ts +7 -7
  19. package/dist/components/calendar-types/single-date-calendar/UseSingleDateSelection.d.ts +3 -3
  20. package/dist/components/calendar-types/single-week-calendar/SingleWeekCalendar.d.ts +8 -8
  21. package/dist/components/calendar-types/single-week-calendar/UseSingleWeekSelection.d.ts +3 -3
  22. package/dist/components/input-types/date-input/DateInput.d.ts +52 -52
  23. package/dist/components/input-types/date-input/UseDateInput.d.ts +6 -6
  24. package/dist/components/input-types/date-range-dual-text-input/DateRangeDualTextInput.d.ts +15 -15
  25. package/dist/components/input-types/date-range-dual-text-input/hooks/UseDateRangeEffects.d.ts +2 -2
  26. package/dist/components/input-types/date-range-dual-text-input/hooks/UseDateRangeHandlers.d.ts +11 -11
  27. package/dist/components/input-types/date-range-dual-text-input/hooks/UseInputStates.d.ts +17 -17
  28. package/dist/components/input-types/date-range-dual-text-input/hooks/UseUserInputHandlers.d.ts +13 -13
  29. package/dist/components/input-types/date-range-input/DateRangeInput.d.ts +51 -51
  30. package/dist/components/input-types/date-range-input/hooks/UseDateRangeInput.d.ts +16 -16
  31. package/dist/components/input-types/date-text-input/DateTextInput.d.ts +28 -28
  32. package/dist/components/input-types/date-time-input/DateTimeInput.d.ts +12 -12
  33. package/dist/components/input-types/date-time-input/hooks/UseDateRangeEffects.d.ts +2 -2
  34. package/dist/components/input-types/date-time-input/hooks/UseDateRangeHandlers.d.ts +11 -11
  35. package/dist/components/input-types/date-time-input/hooks/UseInputStates.d.ts +22 -22
  36. package/dist/components/input-types/date-time-input/hooks/UseUserInputHandlers.d.ts +12 -12
  37. package/dist/components/input-types/time-text-input/TimeTextInput.d.ts +15 -15
  38. package/dist/config/DefaultMaxDate.d.ts +1 -1
  39. package/dist/config/DefaultPopoverPlacement.d.ts +2 -2
  40. package/dist/features/calendar-with-month-year-pickers/CalendarPanelType.d.ts +1 -1
  41. package/dist/features/calendar-with-month-year-pickers/CalendarWithMonthYearPickers.d.ts +13 -13
  42. package/dist/features/date-range/hooks/UseDateRangeOnClickDayHandler.d.ts +4 -4
  43. package/dist/features/dual-text-input/DualTextInput.d.ts +44 -44
  44. package/dist/features/internal-panel-state/UseCalendarPopoverUpdater.d.ts +4 -4
  45. package/dist/features/internal-panel-state/UseInternalPanelState.d.ts +9 -9
  46. package/dist/features/month-picker/MonthPicker.d.ts +6 -6
  47. package/dist/features/month-picker/MonthPickerCell.d.ts +8 -8
  48. package/dist/features/month-switcher/CalendarWithMonthSwitcher.d.ts +15 -15
  49. package/dist/features/month-switcher/MonthSwitcherBelow.d.ts +12 -12
  50. package/dist/features/month-switcher/hooks/UseSelectedMonthStepperLogic.d.ts +6 -6
  51. package/dist/features/preset-picker/CalendarPreset.d.ts +14 -14
  52. package/dist/features/preset-picker/PresetFactory.d.ts +2 -2
  53. package/dist/features/preset-picker/PresetPicker.d.ts +6 -6
  54. package/dist/features/time-picker/TimePicker.d.ts +5 -5
  55. package/dist/features/time-picker/TimePickerCell.d.ts +10 -10
  56. package/dist/features/time-picker/TimePickerColumn.d.ts +10 -10
  57. package/dist/features/today-state/UseHighlightToday.d.ts +2 -2
  58. package/dist/features/year-picker/YearPicker.d.ts +6 -6
  59. package/dist/features/year-picker/YearPickerCell.d.ts +7 -7
  60. package/dist/index.d.ts +32 -32
  61. package/dist/index.es.js +2866 -2058
  62. package/dist/index.es.js.map +1 -1
  63. package/dist/index.js +1 -2148
  64. package/dist/index.js.map +1 -1
  65. package/dist/types/CalendarTypes.d.ts +133 -133
  66. package/dist/types/DateRange.d.ts +16 -16
  67. package/dist/types/InternalPanelAndFocusStateProps.d.ts +3 -3
  68. package/dist/util/calendar/CalendarDataFactory.d.ts +64 -64
  69. package/dist/util/calendar/StateHelper.d.ts +3 -3
  70. package/dist/util/calendar/StateModifier.d.ts +11 -11
  71. package/dist/util/date/DateFormats.d.ts +11 -11
  72. package/dist/util/date/DateListTools.d.ts +3 -3
  73. package/dist/util/date/DateMinMaxValidator.d.ts +1 -1
  74. package/dist/util/date-range/DateRangeTransformer.d.ts +3 -3
  75. package/dist/util/date-range/DateRangeValidator.d.ts +4 -4
  76. package/dist/util/time/OverlappingTimesValidator.d.ts +11 -11
  77. package/dist/util/time/TimeStringFormatValidator.d.ts +8 -8
  78. package/dist/util/time/TimeTransformer.d.ts +8 -8
  79. package/package.json +10 -11
  80. package/dist/components/calendar-types/date-range-calendar/DateRangeCalendar.stories.d.ts +0 -20
  81. package/dist/components/calendar-types/date-range-exclusion-calendar/DateRangeExclusionCalendar.stories.d.ts +0 -17
  82. package/dist/components/calendar-types/multi-date-calendar/MultiDateCalendar.stories.d.ts +0 -15
  83. package/dist/components/calendar-types/multi-date-calendar/__tests__/UseMultiDateSelection.test.d.ts +0 -1
  84. package/dist/components/calendar-types/single-date-calendar/SingleDateCalendar.stories.d.ts +0 -17
  85. package/dist/components/calendar-types/single-week-calendar/SingleWeekCalendar.stories.d.ts +0 -8
  86. package/dist/components/input-types/date-input/DateInput.stories.d.ts +0 -19
  87. package/dist/components/input-types/date-range-dual-text-input/DateRangeDualTextInput.stories.d.ts +0 -18
  88. package/dist/components/input-types/date-range-input/DateRangeInput.stories.d.ts +0 -17
  89. package/dist/components/input-types/date-text-input/DateTextInput.stories.d.ts +0 -19
  90. package/dist/components/input-types/date-time-input/DateTimeInput.stories.d.ts +0 -14
  91. package/dist/components/input-types/time-text-input/TimeTextInput.stories.d.ts +0 -15
  92. package/dist/features/month-picker/MonthPicker.stories.d.ts +0 -7
  93. package/dist/features/preset-picker/PresetPicker.stories.d.ts +0 -7
  94. package/dist/features/time-picker/TimePicker.stories.d.ts +0 -7
  95. package/dist/features/year-picker/YearPicker.stories.d.ts +0 -12
  96. package/dist/util/calendar/__tests__/CalendarDataFactory.test.d.ts +0 -1
  97. package/dist/util/calendar/__tests__/StateHelper.test.d.ts +0 -1
  98. package/dist/util/calendar/__tests__/StateModifier.test.d.ts +0 -1
  99. package/dist/util/date/__tests__/DateListTools.test.d.ts +0 -1
  100. package/dist/util/date/__tests__/DateMinMaxValidator.test.d.ts +0 -1
  101. package/dist/util/date-range/__tests__/DateRangeValidator.test.d.ts +0 -1
  102. package/dist/util/time/__tests__/OverlappingTimesValidator.test.d.ts +0 -1
  103. package/dist/util/time/__tests__/TimeStringFormatValidator.test.d.ts +0 -1
  104. package/dist/util/time/__tests__/TimeTransformer.test.d.ts +0 -1
@@ -1,15 +1,15 @@
1
- /// <reference types="react" />
2
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
- import { DualTextInputProps } from "../../../features/dual-text-input/DualTextInput";
4
- import { DateRangeInputCalendarProps } from "../../calendar-types/date-range-calendar/DateRangeCalendar";
5
- import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
6
- import { DateRange } from "../../../types/DateRange";
7
- export interface DateRangeDualTextInputProps<TData = unknown> extends ValueAndOnValueChangeProps<DateRange>, OptionalMinMaxDatesAsString, Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant"> {
8
- onEsc?: () => void;
9
- onEnter?: () => void;
10
- onBlur?: () => void;
11
- autoFocus?: boolean;
12
- calendarProps?: DateRangeInputCalendarProps<TData>;
13
- disabled?: boolean;
14
- }
15
- export declare const DateRangeDualTextInput: <TData extends {}>({ value, onValueChange, autoFocus, onBlur, onEnter, onEsc, minDate, maxDate, calendarProps, widthLeft, widthRight, variant, disabled, }: DateRangeDualTextInputProps<TData>) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
3
+ import { DualTextInputProps } from "../../../features/dual-text-input/DualTextInput";
4
+ import { DateRangeInputCalendarProps } from "../../calendar-types/date-range-calendar/DateRangeCalendar";
5
+ import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
6
+ import { DateRange } from "../../../types/DateRange";
7
+ export interface DateRangeDualTextInputProps<TData = unknown> extends ValueAndOnValueChangeProps<DateRange>, OptionalMinMaxDatesAsString, Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant"> {
8
+ onEsc?: () => void;
9
+ onEnter?: () => void;
10
+ onBlur?: () => void;
11
+ autoFocus?: boolean;
12
+ calendarProps?: DateRangeInputCalendarProps<TData>;
13
+ disabled?: boolean;
14
+ }
15
+ export declare const DateRangeDualTextInput: <TData extends {}>({ value, onValueChange, autoFocus, onBlur, onEnter, onEsc, minDate, maxDate, calendarProps, widthLeft, widthRight, variant, disabled, }: DateRangeDualTextInputProps<TData>) => JSX.Element;
@@ -1,2 +1,2 @@
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;
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;
@@ -1,11 +1,11 @@
1
- import { ChangeEvent } from "react";
2
- import { DateRangeDualTextInputProps } from "../DateRangeDualTextInput";
3
- import { UseInputStatesResult } from "./UseInputStates";
4
- export declare const useDateRangeHandlers: (startDate: Date | undefined, endDate: Date | undefined, onValueChange: DateRangeDualTextInputProps["onValueChange"], { setDateInFocus, showCalendarInternal, hideCalendarInternal, setFirstFocusedInput, setCurrentPanel, }: UseInputStatesResult) => {
5
- inputLeftChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
6
- inputRightChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
7
- hideCalendar: () => void;
8
- setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
9
- setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<import("../../../../features/calendar-with-month-year-pickers/CalendarPanelType").CalendarPanelType>>;
10
- showCalendar: () => void;
11
- };
1
+ import { ChangeEvent } from "react";
2
+ import { DateRangeDualTextInputProps } from "../DateRangeDualTextInput";
3
+ import { UseInputStatesResult } from "./UseInputStates";
4
+ export declare const useDateRangeHandlers: (startDate: Date | undefined, endDate: Date | undefined, onValueChange: DateRangeDualTextInputProps["onValueChange"], { setDateInFocus, showCalendarInternal, hideCalendarInternal, setFirstFocusedInput, setCurrentPanel, }: UseInputStatesResult) => {
5
+ inputLeftChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
6
+ inputRightChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
7
+ hideCalendar: () => void;
8
+ setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
9
+ setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<import("../../../../features/calendar-with-month-year-pickers/CalendarPanelType").CalendarPanelType>>;
10
+ showCalendar: () => void;
11
+ };
@@ -1,17 +1,17 @@
1
- /// <reference types="react" />
2
- import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
- import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
- export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
- export declare const useInputStates: (startDate: Date | undefined, endDate: Date | undefined) => {
6
- isCalendarVisible: boolean;
7
- showCalendarInternal: () => void;
8
- hideCalendarInternal: () => void;
9
- firstFocusedInput: DateRangeFocusedInput;
10
- setFirstFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
11
- focusedInput: DateRangeFocusedInput;
12
- setFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
13
- dateInFocus: Date;
14
- setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
15
- currentPanel: CalendarPanelType;
16
- setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<CalendarPanelType>>;
17
- };
1
+ /// <reference types="react" />
2
+ import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
+ import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
+ export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
+ export declare const useInputStates: (startDate: Date | undefined, endDate: Date | undefined) => {
6
+ isCalendarVisible: boolean;
7
+ showCalendarInternal: () => void;
8
+ hideCalendarInternal: () => void;
9
+ firstFocusedInput: DateRangeFocusedInput;
10
+ setFirstFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
11
+ focusedInput: DateRangeFocusedInput;
12
+ setFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
13
+ dateInFocus: Date;
14
+ setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
15
+ currentPanel: CalendarPanelType;
16
+ setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<CalendarPanelType>>;
17
+ };
@@ -1,13 +1,13 @@
1
- import * as React from "react";
2
- import { RefObject } from "react";
3
- import { DayData } from "../../../../util/calendar/CalendarDataFactory";
4
- import { DateRangeDualTextInputProps } from "../DateRangeDualTextInput";
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: () => void, hideCalendar: () => void, { firstFocusedInput, setFirstFocusedInput, isCalendarVisible, setFocusedInput, focusedInput, setCurrentPanel, }: UseInputStatesResult) => {
7
- onFocusLeft: () => void;
8
- onFocusRight: () => void;
9
- onClickDay: (day: DayData) => void;
10
- onClickArrowButton: () => void;
11
- onClickCalendarButton: () => void;
12
- onKeyDownHandler: (ev: React.KeyboardEvent<HTMLDivElement>) => void;
13
- };
1
+ import * as React from "react";
2
+ import { RefObject } from "react";
3
+ import { DayData } from "../../../../util/calendar/CalendarDataFactory";
4
+ import { DateRangeDualTextInputProps } from "../DateRangeDualTextInput";
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: () => void, hideCalendar: () => void, { firstFocusedInput, setFirstFocusedInput, isCalendarVisible, setFocusedInput, focusedInput, setCurrentPanel, }: UseInputStatesResult) => {
7
+ onFocusLeft: () => void;
8
+ onFocusRight: () => void;
9
+ onClickDay: (day: DayData) => void;
10
+ onClickArrowButton: () => void;
11
+ onClickCalendarButton: () => void;
12
+ onKeyDownHandler: (ev: React.KeyboardEvent<HTMLDivElement>) => void;
13
+ };
@@ -1,51 +1,51 @@
1
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
- import * as React from "react";
3
- import { DateRangeInputCalendarProps } from "../../calendar-types/date-range-calendar/DateRangeCalendar";
4
- import { CalendarTheme } from "../../calendar/CalendarTheme";
5
- import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
6
- import { DateRange } from "../../../types/DateRange";
7
- export interface DateRangeInputProps<T> extends OptionalMinMaxDatesAsString, ValueAndOnValueChangeProps<DateRange> {
8
- /**
9
- * The date format in the input field. See date-fns docs.
10
- * @default YYYY-MM-dd
11
- */
12
- displayFormat?: string;
13
- /**
14
- * Placeholder for start date field when no date has been selected.
15
- * @default Start date
16
- */
17
- placeholderStartDate?: string;
18
- /**
19
- * Placeholder for end date field when no date has been selected.
20
- * @default End date
21
- */
22
- placeholderEndDate?: string;
23
- /**
24
- * Portal target, HTML element. If not set, portal is not used.
25
- */
26
- portalTarget?: HTMLElement | null;
27
- /**
28
- * Z-index of the calendar overlay.
29
- * @default 100
30
- */
31
- zIndex?: number;
32
- /**
33
- * Width of the input element.
34
- * * @default 125px
35
- */
36
- width?: string;
37
- /**
38
- * The calendar theme to use.
39
- */
40
- calendarTheme?: CalendarTheme;
41
- /** Props to be passed to DateRangeCalendar, see DateRangeCalendar. */
42
- calendarProps?: DateRangeInputCalendarProps<T>;
43
- /**
44
- * Disables the Popover and both TextInputs.
45
- */
46
- disabled?: boolean;
47
- }
48
- /**
49
- * @deprecated Please use DateRangeDualTextInput instead.
50
- */
51
- export declare const DateRangeInput: <T extends {}>({ displayFormat, placeholderStartDate, placeholderEndDate, portalTarget, value, onValueChange, zIndex, width, calendarTheme, calendarProps, minDate, maxDate, disabled, }: DateRangeInputProps<T>) => React.ReactElement<DateRangeInputProps<T>, string | React.JSXElementConstructor<any>>;
1
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
+ import * as React from "react";
3
+ import { DateRangeInputCalendarProps } from "../../calendar-types/date-range-calendar/DateRangeCalendar";
4
+ import { CalendarTheme } from "../../calendar/CalendarTheme";
5
+ import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
6
+ import { DateRange } from "../../../types/DateRange";
7
+ export interface DateRangeInputProps<T> extends OptionalMinMaxDatesAsString, ValueAndOnValueChangeProps<DateRange> {
8
+ /**
9
+ * The date format in the input field. See date-fns docs.
10
+ * @default YYYY-MM-dd
11
+ */
12
+ displayFormat?: string;
13
+ /**
14
+ * Placeholder for start date field when no date has been selected.
15
+ * @default Start date
16
+ */
17
+ placeholderStartDate?: string;
18
+ /**
19
+ * Placeholder for end date field when no date has been selected.
20
+ * @default End date
21
+ */
22
+ placeholderEndDate?: string;
23
+ /**
24
+ * Portal target, HTML element. If not set, portal is not used.
25
+ */
26
+ portalTarget?: HTMLElement | null;
27
+ /**
28
+ * Z-index of the calendar overlay.
29
+ * @default 100
30
+ */
31
+ zIndex?: number;
32
+ /**
33
+ * Width of the input element.
34
+ * * @default 125px
35
+ */
36
+ width?: string;
37
+ /**
38
+ * The calendar theme to use.
39
+ */
40
+ calendarTheme?: CalendarTheme;
41
+ /** Props to be passed to DateRangeCalendar, see DateRangeCalendar. */
42
+ calendarProps?: DateRangeInputCalendarProps<T>;
43
+ /**
44
+ * Disables the Popover and both TextInputs.
45
+ */
46
+ disabled?: boolean;
47
+ }
48
+ /**
49
+ * @deprecated Please use DateRangeDualTextInput instead.
50
+ */
51
+ export declare const DateRangeInput: <T extends {}>({ displayFormat, placeholderStartDate, placeholderEndDate, portalTarget, value, onValueChange, zIndex, width, calendarTheme, calendarProps, minDate, maxDate, disabled, }: DateRangeInputProps<T>) => React.ReactElement<DateRangeInputProps<T>, string | React.JSXElementConstructor<any>>;
@@ -1,16 +1,16 @@
1
- /// <reference types="react" />
2
- import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
- import { DayData } from "../../../../util/calendar/CalendarDataFactory";
4
- import { DateRange } from "../../../../types/DateRange";
5
- export declare const useDateRangeInput: (value: DateRange | undefined, onValueChange: ((dateRange: DateRange) => void) | undefined) => {
6
- showingCalendar: boolean;
7
- hideCalendar: () => void;
8
- showCalendarEndDate: () => true;
9
- showCalendarStartDate: () => true;
10
- focusedInput: DateRangeFocusedInput;
11
- setFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
12
- startDateInputRef: import("react").RefObject<HTMLInputElement>;
13
- endDateInputRef: import("react").RefObject<HTMLInputElement>;
14
- onClickDay: (day: DayData) => void;
15
- startDateIsAfterEnd: boolean | undefined;
16
- };
1
+ /// <reference types="react" />
2
+ import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
+ import { DayData } from "../../../../util/calendar/CalendarDataFactory";
4
+ import { DateRange } from "../../../../types/DateRange";
5
+ export declare const useDateRangeInput: (value: DateRange | undefined, onValueChange: ((dateRange: DateRange) => void) | undefined) => {
6
+ showingCalendar: boolean;
7
+ hideCalendar: () => void;
8
+ showCalendarEndDate: () => true;
9
+ showCalendarStartDate: () => true;
10
+ focusedInput: DateRangeFocusedInput;
11
+ setFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
12
+ startDateInputRef: import("react").RefObject<HTMLInputElement>;
13
+ endDateInputRef: import("react").RefObject<HTMLInputElement>;
14
+ onClickDay: (day: DayData) => void;
15
+ startDateIsAfterEnd: boolean | undefined;
16
+ };
@@ -1,28 +1,28 @@
1
- import { Omit } from "@stenajs-webui/core";
2
- import { TextInputProps } from "@stenajs-webui/forms";
3
- import * as React from "react";
4
- import { SingleDateCalendarProps } from "../../calendar-types/single-date-calendar/SingleDateCalendar";
5
- import { CalendarTheme } from "../../calendar/CalendarTheme";
6
- import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
7
- export declare type DateTextInputCalendarProps<T> = Omit<SingleDateCalendarProps<T>, "value" | "onChange" | "theme">;
8
- export interface DateTextInputProps<T> extends Omit<TextInputProps, "onChange" | "theme" | "min" | "max">, OptionalMinMaxDatesAsString {
9
- /** Props to be passed to Calendar, see SingleDateCalendar. */
10
- calendarProps?: DateTextInputCalendarProps<T>;
11
- /** Close calendar when date is selected, @default true */
12
- closeOnCalendarSelectDate?: boolean;
13
- /** Valid date format, @default YYYY-MM-DD */
14
- dateFormat?: string;
15
- /** Make the icon not clickable, @default false */
16
- disableCalender?: boolean;
17
- /** Show or hide the calender icon, @default false */
18
- hideCalenderIcon?: boolean;
19
- /** Placeholder for the input, @default YYYY-MM-DD */
20
- placeholder?: string;
21
- /** Portal target, HTML element. If not set, portal is not used. */
22
- portalTarget?: HTMLElement | null;
23
- /** Z-index of the calendar overlay, @default 100 */
24
- zIndex?: number;
25
- /** The date text input theme to use. */
26
- calendarTheme?: CalendarTheme;
27
- }
28
- export declare const DateTextInput: React.FC<DateTextInputProps<{}>>;
1
+ import { Omit } from "@stenajs-webui/core";
2
+ import { TextInputProps } from "@stenajs-webui/forms";
3
+ import * as React from "react";
4
+ import { SingleDateCalendarProps } from "../../calendar-types/single-date-calendar/SingleDateCalendar";
5
+ import { CalendarTheme } from "../../calendar/CalendarTheme";
6
+ import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
7
+ export declare type DateTextInputCalendarProps<T> = Omit<SingleDateCalendarProps<T>, "value" | "onChange" | "theme">;
8
+ export interface DateTextInputProps<T> extends Omit<TextInputProps, "onChange" | "theme" | "min" | "max">, OptionalMinMaxDatesAsString {
9
+ /** Props to be passed to Calendar, see SingleDateCalendar. */
10
+ calendarProps?: DateTextInputCalendarProps<T>;
11
+ /** Close calendar when date is selected, @default true */
12
+ closeOnCalendarSelectDate?: boolean;
13
+ /** Valid date format, @default YYYY-MM-DD */
14
+ dateFormat?: string;
15
+ /** Make the icon not clickable, @default false */
16
+ disableCalender?: boolean;
17
+ /** Show or hide the calender icon, @default false */
18
+ hideCalenderIcon?: boolean;
19
+ /** Placeholder for the input, @default YYYY-MM-DD */
20
+ placeholder?: string;
21
+ /** Portal target, HTML element. If not set, portal is not used. */
22
+ portalTarget?: HTMLElement | null;
23
+ /** Z-index of the calendar overlay, @default 100 */
24
+ zIndex?: number;
25
+ /** The date text input theme to use. */
26
+ calendarTheme?: CalendarTheme;
27
+ }
28
+ export declare const DateTextInput: React.FC<DateTextInputProps<{}>>;
@@ -1,12 +1,12 @@
1
- import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
- import * as React from "react";
3
- import { DualTextInputProps } from "../../../features/dual-text-input/DualTextInput";
4
- import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
5
- export interface DateTimeInputProps extends ValueAndOnValueChangeProps<Date | null>, OptionalMinMaxDatesAsString, Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant"> {
6
- onEsc?: () => void;
7
- onEnter?: () => void;
8
- onBlur?: () => void;
9
- autoFocus?: boolean;
10
- disabled?: boolean;
11
- }
12
- export declare const DateTimeInput: React.FC<DateTimeInputProps>;
1
+ import { ValueAndOnValueChangeProps } from "@stenajs-webui/forms";
2
+ import * as React from "react";
3
+ import { DualTextInputProps } from "../../../features/dual-text-input/DualTextInput";
4
+ import { OptionalMinMaxDatesAsString } from "../../../types/CalendarTypes";
5
+ export interface DateTimeInputProps extends ValueAndOnValueChangeProps<Date | null>, OptionalMinMaxDatesAsString, Pick<DualTextInputProps, "widthLeft" | "widthRight" | "variant"> {
6
+ onEsc?: () => void;
7
+ onEnter?: () => void;
8
+ onBlur?: () => void;
9
+ autoFocus?: boolean;
10
+ disabled?: boolean;
11
+ }
12
+ export declare const DateTimeInput: React.FC<DateTimeInputProps>;
@@ -1,2 +1,2 @@
1
- import { RefObject } from "react";
2
- export declare const useDateRangeEffects: (date: Date | undefined | null, setDateInFocus: (date: Date) => void, dateInputRef: RefObject<HTMLInputElement>) => void;
1
+ import { RefObject } from "react";
2
+ export declare const useDateRangeEffects: (date: Date | undefined | null, setDateInFocus: (date: Date) => void, dateInputRef: RefObject<HTMLInputElement>) => void;
@@ -1,11 +1,11 @@
1
- import { ChangeEvent, RefObject } from "react";
2
- import { DateTimeInputProps } from "../DateTimeInput";
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>) => {
5
- inputLeftChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
6
- inputRightChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
7
- hideCalendar: () => void;
8
- showCalendar: () => void;
9
- onChangeTime: (time: string) => void;
10
- onChangeDate: (incomingDate: Date | null) => void;
11
- };
1
+ import { ChangeEvent, RefObject } from "react";
2
+ import { DateTimeInputProps } from "../DateTimeInput";
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>) => {
5
+ inputLeftChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
6
+ inputRightChangeHandler: (ev: ChangeEvent<HTMLInputElement>) => void;
7
+ hideCalendar: () => void;
8
+ showCalendar: () => void;
9
+ onChangeTime: (time: string) => void;
10
+ onChangeDate: (incomingDate: Date | null) => void;
11
+ };
@@ -1,22 +1,22 @@
1
- /// <reference types="react" />
2
- import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
- import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
- export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
- export declare const useInputStates: (date: Date | undefined | null) => {
6
- isCalendarVisible: boolean;
7
- showCalendarInternal: () => void;
8
- hideCalendarInternal: () => void;
9
- firstFocusedInput: DateRangeFocusedInput;
10
- setFirstFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
11
- dateInFocus: Date;
12
- setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
13
- currentPanel: CalendarPanelType;
14
- setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<CalendarPanelType>>;
15
- isTimePickerVisible: boolean;
16
- showTimePicker: () => void;
17
- hideTimePicker: () => void;
18
- localDate: Date | undefined;
19
- setLocalDate: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
20
- localTime: string | undefined;
21
- setLocalTime: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
22
- };
1
+ /// <reference types="react" />
2
+ import { DateRangeFocusedInput } from "../../../calendar-types/date-range-calendar/DateRangeCalendar";
3
+ import { CalendarPanelType } from "../../../../features/calendar-with-month-year-pickers/CalendarPanelType";
4
+ export declare type UseInputStatesResult = ReturnType<typeof useInputStates>;
5
+ export declare const useInputStates: (date: Date | undefined | null) => {
6
+ isCalendarVisible: boolean;
7
+ showCalendarInternal: () => void;
8
+ hideCalendarInternal: () => void;
9
+ firstFocusedInput: DateRangeFocusedInput;
10
+ setFirstFocusedInput: import("react").Dispatch<import("react").SetStateAction<DateRangeFocusedInput>>;
11
+ dateInFocus: Date;
12
+ setDateInFocus: import("react").Dispatch<import("react").SetStateAction<Date>>;
13
+ currentPanel: CalendarPanelType;
14
+ setCurrentPanel: import("react").Dispatch<import("react").SetStateAction<CalendarPanelType>>;
15
+ isTimePickerVisible: boolean;
16
+ showTimePicker: () => void;
17
+ hideTimePicker: () => void;
18
+ localDate: Date | undefined;
19
+ setLocalDate: import("react").Dispatch<import("react").SetStateAction<Date | undefined>>;
20
+ localTime: string | undefined;
21
+ setLocalTime: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
22
+ };
@@ -1,12 +1,12 @@
1
- import * as React from "react";
2
- import { RefObject } from "react";
3
- import { DayData } from "../../../../util/calendar/CalendarDataFactory";
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) => {
6
- onFocusLeft: () => void;
7
- onFocusRight: () => void;
8
- onClickDay: (day: DayData) => void;
9
- onClickArrowButton: () => void;
10
- onClickCalendarButton: () => void;
11
- onKeyDownHandler: (ev: React.KeyboardEvent<HTMLDivElement>) => void;
12
- };
1
+ import * as React from "react";
2
+ import { RefObject } from "react";
3
+ import { DayData } from "../../../../util/calendar/CalendarDataFactory";
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) => {
6
+ onFocusLeft: () => void;
7
+ onFocusRight: () => void;
8
+ onClickDay: (day: DayData) => void;
9
+ onClickArrowButton: () => void;
10
+ onClickCalendarButton: () => void;
11
+ onKeyDownHandler: (ev: React.KeyboardEvent<HTMLDivElement>) => void;
12
+ };
@@ -1,15 +1,15 @@
1
- import { Omit } from "@stenajs-webui/core";
2
- import { TextInputProps } from "@stenajs-webui/forms";
3
- import * as React from "react";
4
- export interface TimeTextInputProps extends Omit<TextInputProps, "onChange"> {
5
- /** Show placeholder when true */
6
- showPlaceholder?: boolean;
7
- /** Show icon when true */
8
- useIcon?: boolean;
9
- /** Variant of the input field. */
10
- variant?: TextInputProps["variant"];
11
- }
12
- /**
13
- * @deprecated
14
- */
15
- export declare const TimeTextInput: React.FC<TimeTextInputProps>;
1
+ import { Omit } from "@stenajs-webui/core";
2
+ import { TextInputProps } from "@stenajs-webui/forms";
3
+ import * as React from "react";
4
+ export interface TimeTextInputProps extends Omit<TextInputProps, "onChange"> {
5
+ /** Show placeholder when true */
6
+ showPlaceholder?: boolean;
7
+ /** Show icon when true */
8
+ useIcon?: boolean;
9
+ /** Variant of the input field. */
10
+ variant?: TextInputProps["variant"];
11
+ }
12
+ /**
13
+ * @deprecated
14
+ */
15
+ export declare const TimeTextInput: React.FC<TimeTextInputProps>;
@@ -1 +1 @@
1
- export declare const defaultMaxDate = "2999-12-31";
1
+ export declare const defaultMaxDate = "2999-12-31";
@@ -1,2 +1,2 @@
1
- import { PopoverPlacement } from "@stenajs-webui/tooltip";
2
- export declare const defaultPopoverPlacement: PopoverPlacement;
1
+ import { PopoverPlacement } from "@stenajs-webui/tooltip";
2
+ export declare const defaultPopoverPlacement: PopoverPlacement;
@@ -1 +1 @@
1
- export declare type CalendarPanelType = "calendar" | "year" | "month" | "presets";
1
+ export declare type CalendarPanelType = "calendar" | "year" | "month" | "presets";
@@ -1,13 +1,13 @@
1
- /// <reference types="react" />
2
- import { CalendarProps } from "../../types/CalendarTypes";
3
- import { CalendarPreset } from "../preset-picker/CalendarPreset";
4
- import { CalendarPanelType } from "./CalendarPanelType";
5
- interface CalendarWithMonthYearPickersProps<T> extends Omit<CalendarProps<T>, "date" | "year" | "month"> {
6
- dateInFocus: Date;
7
- setDateInFocus: (dateInFocus: Date) => void;
8
- currentPanel: CalendarPanelType;
9
- setCurrentPanel: (currentPanel: CalendarPanelType) => void;
10
- onSelectPreset: (preset: CalendarPreset) => void;
11
- }
12
- export declare const CalendarWithMonthYearPickers: <T>({ dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, ...props }: CalendarWithMonthYearPickersProps<T>) => JSX.Element;
13
- export {};
1
+ /// <reference types="react" />
2
+ import { CalendarProps } from "../../types/CalendarTypes";
3
+ import { CalendarPreset } from "../preset-picker/CalendarPreset";
4
+ import { CalendarPanelType } from "./CalendarPanelType";
5
+ interface CalendarWithMonthYearPickersProps<T> extends Omit<CalendarProps<T>, "date" | "year" | "month"> {
6
+ dateInFocus: Date;
7
+ setDateInFocus: (dateInFocus: Date) => void;
8
+ currentPanel: CalendarPanelType;
9
+ setCurrentPanel: (currentPanel: CalendarPanelType) => void;
10
+ onSelectPreset: (preset: CalendarPreset) => void;
11
+ }
12
+ export declare const CalendarWithMonthYearPickers: <T>({ dateInFocus, setDateInFocus, currentPanel, setCurrentPanel, ...props }: CalendarWithMonthYearPickersProps<T>) => JSX.Element;
13
+ export {};
@@ -1,4 +1,4 @@
1
- import { DateRangeFocusedInput } from "../../../components/calendar-types/date-range-calendar/DateRangeCalendar";
2
- import { OnClickDay } from "../../../types/CalendarTypes";
3
- import { DateRange } from "../../../types/DateRange";
4
- export declare const useDateRangeOnClickDayHandler: <T>(value: DateRange | undefined, onValueChange: ((dateRange: DateRange) => void) | undefined, focusedInput: DateRangeFocusedInput, setFocusedInput: (focusedInput: DateRangeFocusedInput) => void) => OnClickDay<T>;
1
+ import { DateRangeFocusedInput } from "../../../components/calendar-types/date-range-calendar/DateRangeCalendar";
2
+ import { OnClickDay } from "../../../types/CalendarTypes";
3
+ import { DateRange } from "../../../types/DateRange";
4
+ export declare const useDateRangeOnClickDayHandler: <T>(value: DateRange | undefined, onValueChange: ((dateRange: DateRange) => void) | undefined, focusedInput: DateRangeFocusedInput, setFocusedInput: (focusedInput: DateRangeFocusedInput) => void) => OnClickDay<T>;