@selfdecode/sd-component-library 3.0.7 → 3.0.10

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,14 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import { Range } from "react-date-range";
3
+ export interface DateRange {
4
+ startDate: Date;
5
+ endDate: Date;
6
+ }
3
7
  export interface BaseDateRangeInputProps {
4
8
  /**
5
9
  * Currently selected date range.
6
10
  */
7
- initialRange: Range | null;
11
+ initialRange: DateRange | null;
8
12
  /**
9
13
  * Callback to handle date range select.
10
14
  */
11
- onSelect: (range: Range) => void;
15
+ onSelect: (range: DateRange) => void;
12
16
  /**
13
17
  * Function to close calendar.
14
18
  */
@@ -16,13 +16,13 @@ export declare const getCalendarProps: (props: BaseDateRangeInputMobileProps) =>
16
16
  color?: string | undefined;
17
17
  zIndex?: number | undefined;
18
18
  width?: string | string[] | undefined;
19
- onSelect: (range: Range) => void;
19
+ onSelect: (range: import("./interfaces").DateRange) => void;
20
20
  showCalendar: boolean;
21
21
  alignCalendar?: "left" | "right" | undefined;
22
22
  maxDate?: Date | undefined;
23
23
  minDate?: Date | undefined;
24
24
  onClose: () => void;
25
- initialRange: Range | null;
25
+ initialRange: import("./interfaces").DateRange | null;
26
26
  onCancel?: (() => void) | undefined;
27
27
  showMonthAndYearPickers?: boolean | undefined;
28
28
  dateDisplayFormat?: string | undefined;
@@ -26,4 +26,8 @@ export interface TooltipWithPointerProps {
26
26
  * Whether to show mobile version of the tooltip.
27
27
  */
28
28
  showMobileVersion?: boolean;
29
+ /**
30
+ * Whether to prevent default behavior on tooltip click.
31
+ */
32
+ stopPropagation?: boolean;
29
33
  }