@stenajs-webui/calendar 20.17.4 → 21.0.1

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.
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
+ import { ReactNode } from "react";
2
3
  import { CalendarDayProps, CalendarOnClicks, CalendarUserMonthData, DayState, DayStateHighlight, ExtraDayContentProps, OptionalMinMaxDates, Renderers } from "../../types/CalendarTypes";
3
4
  import { MonthData } from "../../util/calendar/CalendarDataFactory";
4
5
  import { CalendarTheme } from "./CalendarTheme";
5
- import { ReactNode } from "react";
6
6
  export interface CalendarMonthProps<T> extends CalendarOnClicks<T>, Renderers, OptionalMinMaxDates {
7
7
  month: MonthData;
8
8
  dayComponent?: React.ComponentType<CalendarDayProps<T>>;
@@ -13,5 +13,6 @@ export interface TravelDateCalendarProps extends ValueAndOnValueChangeProps<stri
13
13
  firstMonthInMonthPicker?: Date;
14
14
  numMonthsInMonthPicker?: number;
15
15
  size?: TravelCalendarSizeVariant;
16
+ dateTestId?: (date: Date) => string | undefined;
16
17
  }
17
18
  export declare const TravelDateCalendar: React.FC<TravelDateCalendarProps>;
@@ -15,5 +15,6 @@ export interface TravelDateRangeCalendarProps extends ValueAndOnValueChangeProps
15
15
  firstMonthInMonthPicker?: Date;
16
16
  numMonthsInMonthPicker?: number;
17
17
  size?: TravelCalendarSizeVariant;
18
+ dateTestId?: (date: Date) => string | undefined;
18
19
  }
19
20
  export declare const TravelDateRangeCalendar: React.FC<TravelDateRangeCalendarProps>;
@@ -27,16 +27,6 @@ export interface DateInputProps<T = unknown> extends OptionalMinMaxDatesAsString
27
27
  /**
28
28
  * Portal target, HTML element. If not set, portal is not used.
29
29
  */
30
- portalTarget?: HTMLElement | null;
31
- /**
32
- * Z-index of the calendar overlay.
33
- * @default 100
34
- */
35
- zIndex?: number;
36
- /**
37
- * Width of the input element.
38
- * * @default 125px
39
- */
40
30
  width?: string;
41
31
  /**
42
32
  * The calendar theme to use.
@@ -20,15 +20,6 @@ export interface DateRangeInputProps<T> extends OptionalMinMaxDatesAsString, Val
20
20
  * @default End date
21
21
  */
22
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
23
  /**
33
24
  * Width of the input element.
34
25
  * * @default 125px
@@ -48,4 +39,4 @@ export interface DateRangeInputProps<T> extends OptionalMinMaxDatesAsString, Val
48
39
  /**
49
40
  * @deprecated Please use DateRangeDualTextInput instead.
50
41
  */
51
- export declare function DateRangeInput<T>({ displayFormat, placeholderStartDate, placeholderEndDate, portalTarget, value, onValueChange, zIndex, width, calendarTheme, calendarProps, minDate, maxDate, disabled, }: DateRangeInputProps<T>): React.ReactElement<DateRangeInputProps<T>>;
42
+ export declare function DateRangeInput<T>({ displayFormat, placeholderStartDate, placeholderEndDate, value, onValueChange, width, calendarTheme, calendarProps, minDate, maxDate, disabled, }: DateRangeInputProps<T>): React.ReactElement<DateRangeInputProps<T>>;
@@ -18,10 +18,6 @@ export interface DateTextInputProps<T> extends Omit<TextInputProps, "onChange" |
18
18
  hideCalenderIcon?: boolean;
19
19
  /** Placeholder for the input, @default YYYY-MM-DD */
20
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
21
  /** The date text input theme to use. */
26
22
  calendarTheme?: CalendarTheme;
27
23
  }
@@ -21,5 +21,6 @@ export interface TravelDateInputProps extends ValueAndOnValueChangeProps<string>
21
21
  onHideCalendar?: () => void;
22
22
  renderBelowCalendar?: (args: RenderBelowSingleDateCalendarArgs) => ReactNode;
23
23
  size?: TravelCalendarSizeVariant;
24
+ dateTestId?: (date: Date) => string | undefined;
24
25
  }
25
26
  export declare const TravelDateInput: React.FC<TravelDateInputProps>;
@@ -23,5 +23,6 @@ export interface TravelDateRangeInputProps extends ValueAndOnValueChangeProps<Tr
23
23
  onHideCalendar?: () => void;
24
24
  renderBelowCalendar?: (args: RenderBelowCalendarArgs) => ReactNode;
25
25
  size?: TravelCalendarSizeVariant;
26
+ dateTestId?: (date: Date) => string | undefined;
26
27
  }
27
28
  export declare const TravelDateRangeInput: React.FC<TravelDateRangeInputProps>;
@@ -1,2 +1 @@
1
- import { PopoverPlacement } from "@stenajs-webui/tooltip";
2
- export declare const defaultPopoverPlacement: PopoverPlacement;
1
+ export declare const defaultPopoverPlacement = "bottom";
@@ -14,6 +14,7 @@ export interface TravelCalendarProps {
14
14
  hoverDate: Date | undefined;
15
15
  today: Date;
16
16
  isDateDisabled: (date: Date) => boolean;
17
+ dateTestId?: (date: Date) => string | undefined;
17
18
  calendarId: string;
18
19
  todayIsInVisibleMonth: boolean;
19
20
  size?: TravelCalendarSizeVariant;
@@ -16,6 +16,7 @@ export interface TravelDateCellProps {
16
16
  todayIsInVisibleMonth: boolean;
17
17
  calendarId: string;
18
18
  isDateDisabled: (date: Date) => boolean;
19
+ dateTestId?: (date: Date) => string | undefined;
19
20
  size: TravelCalendarSizeVariant;
20
21
  }
21
22
  export declare const TravelDateCell: React.FC<TravelDateCellProps>;