@zendeskgarden/react-datepickers 8.69.2 → 8.69.3
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/index.cjs.js +111 -2445
- package/dist/index.esm.js +20 -2372
- package/dist/typings/elements/Datepicker/Datepicker.d.ts +12 -12
- package/dist/typings/elements/Datepicker/components/Calendar.d.ts +18 -18
- package/dist/typings/elements/Datepicker/components/MonthSelector.d.ts +13 -13
- package/dist/typings/elements/Datepicker/utils/datepicker-reducer.d.ts +43 -43
- package/dist/typings/elements/Datepicker/utils/garden-placements.d.ts +21 -21
- package/dist/typings/elements/Datepicker/utils/useDatepickerContext.d.ts +18 -18
- package/dist/typings/elements/DatepickerRange/DatepickerRange.d.ts +35 -35
- package/dist/typings/elements/DatepickerRange/components/Calendar.d.ts +11 -11
- package/dist/typings/elements/DatepickerRange/components/End.d.ts +11 -11
- package/dist/typings/elements/DatepickerRange/components/Month.d.ts +14 -14
- package/dist/typings/elements/DatepickerRange/components/Start.d.ts +11 -11
- package/dist/typings/elements/DatepickerRange/utils/datepicker-range-reducer.d.ts +71 -71
- package/dist/typings/elements/DatepickerRange/utils/useDatepickerRangeContext.d.ts +33 -33
- package/dist/typings/index.d.ts +11 -11
- package/dist/typings/styled/StyledCalendar.d.ts +13 -13
- package/dist/typings/styled/StyledCalendarItem.d.ts +15 -15
- package/dist/typings/styled/StyledDatepicker.d.ts +14 -14
- package/dist/typings/styled/StyledDay.d.ts +16 -16
- package/dist/typings/styled/StyledDayLabel.d.ts +11 -11
- package/dist/typings/styled/StyledHeader.d.ts +11 -11
- package/dist/typings/styled/StyledHeaderLabel.d.ts +11 -11
- package/dist/typings/styled/StyledHeaderPaddle.d.ts +13 -13
- package/dist/typings/styled/StyledHighlight.d.ts +16 -16
- package/dist/typings/styled/StyledMenu.d.ts +10 -10
- package/dist/typings/styled/StyledMenuWrapper.d.ts +15 -15
- package/dist/typings/styled/StyledRangeCalendar.d.ts +9 -9
- package/dist/typings/styled/index.d.ts +18 -18
- package/dist/typings/types/index.d.ts +112 -112
- package/dist/typings/utils/calendar-utils.d.ts +19 -19
- package/package.json +3 -3
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export { Datepicker } from './elements/Datepicker/Datepicker';
|
|
8
|
-
export { DatepickerRange } from './elements/DatepickerRange/DatepickerRange';
|
|
9
|
-
export type { IDatepickerProps, IDatepickerRangeProps,
|
|
10
|
-
/** @deprecated type can be dereferenced via IDatePickerProps['placement'] */
|
|
11
|
-
GardenPlacement as GARDEN_PLACEMENT } from './types';
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export { Datepicker } from './elements/Datepicker/Datepicker';
|
|
8
|
+
export { DatepickerRange } from './elements/DatepickerRange/DatepickerRange';
|
|
9
|
+
export type { IDatepickerProps, IDatepickerRangeProps,
|
|
10
|
+
/** @deprecated type can be dereferenced via IDatePickerProps['placement'] */
|
|
11
|
+
GardenPlacement as GARDEN_PLACEMENT } from './types';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
interface IStyledCalendarProps {
|
|
8
|
-
isCompact?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const StyledCalendar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
|
-
'data-garden-id': string;
|
|
12
|
-
} & IStyledCalendarProps, "data-garden-id">;
|
|
13
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
interface IStyledCalendarProps {
|
|
8
|
+
isCompact?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const StyledCalendar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
|
+
'data-garden-id': string;
|
|
12
|
+
} & IStyledCalendarProps, "data-garden-id">;
|
|
13
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
-
export declare const retrieveSize: ({ isCompact, theme }: IStyledCalendarItemProps & ThemeProps<DefaultTheme>) => import("styled-components").FlattenSimpleInterpolation;
|
|
9
|
-
interface IStyledCalendarItemProps {
|
|
10
|
-
isCompact?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const StyledCalendarItem: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
13
|
-
'data-garden-id': string;
|
|
14
|
-
} & IStyledCalendarItemProps, "data-garden-id">;
|
|
15
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const retrieveSize: ({ isCompact, theme }: IStyledCalendarItemProps & ThemeProps<DefaultTheme>) => import("styled-components").FlattenSimpleInterpolation;
|
|
9
|
+
interface IStyledCalendarItemProps {
|
|
10
|
+
isCompact?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledCalendarItem: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
13
|
+
'data-garden-id': string;
|
|
14
|
+
} & IStyledCalendarItemProps, "data-garden-id">;
|
|
15
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
interface IStyledDatepickerProps {
|
|
9
|
-
isCompact: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const StyledDatepicker: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
12
|
-
'data-garden-id': string;
|
|
13
|
-
} & IStyledDatepickerProps, "data-garden-id">;
|
|
14
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
interface IStyledDatepickerProps {
|
|
9
|
+
isCompact: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const StyledDatepicker: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
12
|
+
'data-garden-id': string;
|
|
13
|
+
} & IStyledDatepickerProps, "data-garden-id">;
|
|
14
|
+
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
|
-
interface IStyledDayProps extends ThemeProps<DefaultTheme> {
|
|
9
|
-
isPreviousMonth?: boolean;
|
|
10
|
-
isToday?: boolean;
|
|
11
|
-
isDisabled?: boolean;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
isCompact: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const StyledDay: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledDayProps, never>;
|
|
16
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
|
+
interface IStyledDayProps extends ThemeProps<DefaultTheme> {
|
|
9
|
+
isPreviousMonth?: boolean;
|
|
10
|
+
isToday?: boolean;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
isSelected?: boolean;
|
|
13
|
+
isCompact: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const StyledDay: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledDayProps, never>;
|
|
16
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare const StyledDayLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
'data-garden-id': string;
|
|
9
|
-
} & {
|
|
10
|
-
isCompact: boolean;
|
|
11
|
-
}, "data-garden-id">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StyledDayLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
} & {
|
|
10
|
+
isCompact: boolean;
|
|
11
|
+
}, "data-garden-id">;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
'data-garden-id': string;
|
|
9
|
-
} & {
|
|
10
|
-
isCompact: boolean;
|
|
11
|
-
}, "data-garden-id">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
} & {
|
|
10
|
+
isCompact: boolean;
|
|
11
|
+
}, "data-garden-id">;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare const StyledHeaderLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
'data-garden-id': string;
|
|
9
|
-
} & {
|
|
10
|
-
isCompact: boolean;
|
|
11
|
-
}, "data-garden-id">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StyledHeaderLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
} & {
|
|
10
|
+
isCompact: boolean;
|
|
11
|
+
}, "data-garden-id">;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
export declare const StyledHeaderPaddle: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
|
-
'data-garden-id': string;
|
|
10
|
-
} & {
|
|
11
|
-
isCompact: boolean;
|
|
12
|
-
isHidden?: boolean | undefined;
|
|
13
|
-
}, "data-garden-id">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledHeaderPaddle: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
} & {
|
|
11
|
+
isCompact: boolean;
|
|
12
|
+
isHidden?: boolean | undefined;
|
|
13
|
+
}, "data-garden-id">;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
interface IStyledHighlightProps {
|
|
9
|
-
isHighlighted: boolean;
|
|
10
|
-
isStart: boolean;
|
|
11
|
-
isEnd: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const StyledHighlight: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
14
|
-
'data-garden-id': string;
|
|
15
|
-
} & IStyledHighlightProps, "data-garden-id">;
|
|
16
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme } from 'styled-components';
|
|
8
|
+
interface IStyledHighlightProps {
|
|
9
|
+
isHighlighted: boolean;
|
|
10
|
+
isStart: boolean;
|
|
11
|
+
isEnd: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const StyledHighlight: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
14
|
+
'data-garden-id': string;
|
|
15
|
+
} & IStyledHighlightProps, "data-garden-id">;
|
|
16
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare const StyledMenu: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
'data-garden-id': string;
|
|
9
|
-
'data-garden-version': string;
|
|
10
|
-
}, "data-garden-id" | "data-garden-version">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StyledMenu: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
'data-garden-version': string;
|
|
10
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { PopperPlacement } from '../types';
|
|
8
|
-
interface IStyledMenuWrapperProps {
|
|
9
|
-
isHidden?: boolean;
|
|
10
|
-
isAnimated?: boolean;
|
|
11
|
-
zIndex?: number;
|
|
12
|
-
placement?: PopperPlacement;
|
|
13
|
-
}
|
|
14
|
-
export declare const StyledMenuWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledMenuWrapperProps, never>;
|
|
15
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { PopperPlacement } from '../types';
|
|
8
|
+
interface IStyledMenuWrapperProps {
|
|
9
|
+
isHidden?: boolean;
|
|
10
|
+
isAnimated?: boolean;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
placement?: PopperPlacement;
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledMenuWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledMenuWrapperProps, never>;
|
|
15
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare const StyledRangeCalendar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
-
'data-garden-id': string;
|
|
9
|
-
}, "data-garden-id">;
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export declare const StyledRangeCalendar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
}, "data-garden-id">;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export { StyledMenu } from './StyledMenu';
|
|
8
|
-
export { StyledMenuWrapper } from './StyledMenuWrapper';
|
|
9
|
-
export { StyledDatepicker } from './StyledDatepicker';
|
|
10
|
-
export { StyledRangeCalendar } from './StyledRangeCalendar';
|
|
11
|
-
export { StyledHeader } from './StyledHeader';
|
|
12
|
-
export { StyledHeaderPaddle } from './StyledHeaderPaddle';
|
|
13
|
-
export { StyledHeaderLabel } from './StyledHeaderLabel';
|
|
14
|
-
export { StyledCalendar } from './StyledCalendar';
|
|
15
|
-
export { StyledCalendarItem } from './StyledCalendarItem';
|
|
16
|
-
export { StyledDayLabel } from './StyledDayLabel';
|
|
17
|
-
export { StyledHighlight } from './StyledHighlight';
|
|
18
|
-
export { StyledDay } from './StyledDay';
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
export { StyledMenu } from './StyledMenu';
|
|
8
|
+
export { StyledMenuWrapper } from './StyledMenuWrapper';
|
|
9
|
+
export { StyledDatepicker } from './StyledDatepicker';
|
|
10
|
+
export { StyledRangeCalendar } from './StyledRangeCalendar';
|
|
11
|
+
export { StyledHeader } from './StyledHeader';
|
|
12
|
+
export { StyledHeaderPaddle } from './StyledHeaderPaddle';
|
|
13
|
+
export { StyledHeaderLabel } from './StyledHeaderLabel';
|
|
14
|
+
export { StyledCalendar } from './StyledCalendar';
|
|
15
|
+
export { StyledCalendarItem } from './StyledCalendarItem';
|
|
16
|
+
export { StyledDayLabel } from './StyledDayLabel';
|
|
17
|
+
export { StyledHighlight } from './StyledHighlight';
|
|
18
|
+
export { StyledDay } from './StyledDay';
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
import { HTMLAttributes } from 'react';
|
|
8
|
-
import { Modifiers } from 'popper.js';
|
|
9
|
-
export declare const WEEK_STARTS_ON: readonly [0, 1, 2, 3, 4, 5, 6];
|
|
10
|
-
export declare const PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "end", "end-top", "end-bottom", "start", "start-top", "start-bottom"];
|
|
11
|
-
export declare const POPPER_PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
12
|
-
export type GardenPlacement = (typeof PLACEMENT)[number];
|
|
13
|
-
export type PopperPlacement = (typeof POPPER_PLACEMENT)[number];
|
|
14
|
-
export interface IDatepickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
15
|
-
/**
|
|
16
|
-
* Sets the selected date
|
|
17
|
-
*/
|
|
18
|
-
value?: Date;
|
|
19
|
-
/**
|
|
20
|
-
* Handles date change
|
|
21
|
-
*
|
|
22
|
-
* @param {Date} date The selected date
|
|
23
|
-
*/
|
|
24
|
-
onChange?: (date: Date) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Customizes the input element's date formatting
|
|
27
|
-
*
|
|
28
|
-
* @param {Date} date The selected date
|
|
29
|
-
* @returns {string} a formatted date string
|
|
30
|
-
*/
|
|
31
|
-
formatDate?: (date: Date) => string;
|
|
32
|
-
/**
|
|
33
|
-
* Applies locale-based formatting.
|
|
34
|
-
* Accepts all valid `Intl` [locales](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
35
|
-
*/
|
|
36
|
-
locale?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Overrides the locale default start day of week
|
|
39
|
-
*/
|
|
40
|
-
weekStartsOn?: (typeof WEEK_STARTS_ON)[number];
|
|
41
|
-
/**
|
|
42
|
-
* Disables dates before this value on the calendar
|
|
43
|
-
*/
|
|
44
|
-
minValue?: Date;
|
|
45
|
-
/**
|
|
46
|
-
* Disables dates after this value on the calendar
|
|
47
|
-
*/
|
|
48
|
-
maxValue?: Date;
|
|
49
|
-
/**
|
|
50
|
-
* Applies compact styling
|
|
51
|
-
*/
|
|
52
|
-
isCompact?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Overrides default date parsing
|
|
55
|
-
*
|
|
56
|
-
* @param {string} inputValue A localized input value
|
|
57
|
-
* @returns {Date} the parsed date
|
|
58
|
-
*/
|
|
59
|
-
customParseDate?: (inputValue: string) => Date;
|
|
60
|
-
/**
|
|
61
|
-
* Defines the ref key used to position the calendar
|
|
62
|
-
*/
|
|
63
|
-
refKey?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Adjusts the position of the calendar
|
|
66
|
-
**/
|
|
67
|
-
placement?: GardenPlacement;
|
|
68
|
-
/**
|
|
69
|
-
* Passes configuration options to the [Popper instance](https://popper.js.org/docs/v2/modifiers/)
|
|
70
|
-
*/
|
|
71
|
-
popperModifiers?: Modifiers;
|
|
72
|
-
/**
|
|
73
|
-
* Animates the calendar
|
|
74
|
-
*/
|
|
75
|
-
isAnimated?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Allows the calendar to reposition during browser resize events
|
|
78
|
-
*/
|
|
79
|
-
eventsEnabled?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Sets the `z-index` of the calendar
|
|
82
|
-
*/
|
|
83
|
-
zIndex?: number;
|
|
84
|
-
}
|
|
85
|
-
export interface IDatepickerRangeProps extends Pick<IDatepickerProps, 'locale' | 'weekStartsOn' | 'minValue' | 'maxValue' | 'formatDate' | 'isCompact'> {
|
|
86
|
-
/**
|
|
87
|
-
* Sets the start date
|
|
88
|
-
*/
|
|
89
|
-
startValue?: Date;
|
|
90
|
-
/**
|
|
91
|
-
* Sets the end date
|
|
92
|
-
*/
|
|
93
|
-
endValue?: Date;
|
|
94
|
-
/**
|
|
95
|
-
* Handles start and end date changes
|
|
96
|
-
*
|
|
97
|
-
* @param {Object} values The selected dates
|
|
98
|
-
* @param {Date} [values.startValue] Optional start date
|
|
99
|
-
* @param {Date} [values.endValue] Optional end date
|
|
100
|
-
*/
|
|
101
|
-
onChange?: (values: {
|
|
102
|
-
startValue?: Date;
|
|
103
|
-
endValue?: Date;
|
|
104
|
-
}) => void;
|
|
105
|
-
/**
|
|
106
|
-
* Overrides the default date parsing
|
|
107
|
-
*
|
|
108
|
-
* @param {string} inputValue A date string
|
|
109
|
-
* @returns {Date} the parsed date
|
|
110
|
-
*/
|
|
111
|
-
customParseDate?: (inputValue?: string) => Date;
|
|
112
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
|
+
import { Modifiers } from 'popper.js';
|
|
9
|
+
export declare const WEEK_STARTS_ON: readonly [0, 1, 2, 3, 4, 5, 6];
|
|
10
|
+
export declare const PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "end", "end-top", "end-bottom", "start", "start-top", "start-bottom"];
|
|
11
|
+
export declare const POPPER_PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "right", "right-start", "right-end", "left", "left-start", "left-end"];
|
|
12
|
+
export type GardenPlacement = (typeof PLACEMENT)[number];
|
|
13
|
+
export type PopperPlacement = (typeof POPPER_PLACEMENT)[number];
|
|
14
|
+
export interface IDatepickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
15
|
+
/**
|
|
16
|
+
* Sets the selected date
|
|
17
|
+
*/
|
|
18
|
+
value?: Date;
|
|
19
|
+
/**
|
|
20
|
+
* Handles date change
|
|
21
|
+
*
|
|
22
|
+
* @param {Date} date The selected date
|
|
23
|
+
*/
|
|
24
|
+
onChange?: (date: Date) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Customizes the input element's date formatting
|
|
27
|
+
*
|
|
28
|
+
* @param {Date} date The selected date
|
|
29
|
+
* @returns {string} a formatted date string
|
|
30
|
+
*/
|
|
31
|
+
formatDate?: (date: Date) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Applies locale-based formatting.
|
|
34
|
+
* Accepts all valid `Intl` [locales](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
35
|
+
*/
|
|
36
|
+
locale?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Overrides the locale default start day of week
|
|
39
|
+
*/
|
|
40
|
+
weekStartsOn?: (typeof WEEK_STARTS_ON)[number];
|
|
41
|
+
/**
|
|
42
|
+
* Disables dates before this value on the calendar
|
|
43
|
+
*/
|
|
44
|
+
minValue?: Date;
|
|
45
|
+
/**
|
|
46
|
+
* Disables dates after this value on the calendar
|
|
47
|
+
*/
|
|
48
|
+
maxValue?: Date;
|
|
49
|
+
/**
|
|
50
|
+
* Applies compact styling
|
|
51
|
+
*/
|
|
52
|
+
isCompact?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Overrides default date parsing
|
|
55
|
+
*
|
|
56
|
+
* @param {string} inputValue A localized input value
|
|
57
|
+
* @returns {Date} the parsed date
|
|
58
|
+
*/
|
|
59
|
+
customParseDate?: (inputValue: string) => Date;
|
|
60
|
+
/**
|
|
61
|
+
* Defines the ref key used to position the calendar
|
|
62
|
+
*/
|
|
63
|
+
refKey?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Adjusts the position of the calendar
|
|
66
|
+
**/
|
|
67
|
+
placement?: GardenPlacement;
|
|
68
|
+
/**
|
|
69
|
+
* Passes configuration options to the [Popper instance](https://popper.js.org/docs/v2/modifiers/)
|
|
70
|
+
*/
|
|
71
|
+
popperModifiers?: Modifiers;
|
|
72
|
+
/**
|
|
73
|
+
* Animates the calendar
|
|
74
|
+
*/
|
|
75
|
+
isAnimated?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Allows the calendar to reposition during browser resize events
|
|
78
|
+
*/
|
|
79
|
+
eventsEnabled?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the `z-index` of the calendar
|
|
82
|
+
*/
|
|
83
|
+
zIndex?: number;
|
|
84
|
+
}
|
|
85
|
+
export interface IDatepickerRangeProps extends Pick<IDatepickerProps, 'locale' | 'weekStartsOn' | 'minValue' | 'maxValue' | 'formatDate' | 'isCompact'> {
|
|
86
|
+
/**
|
|
87
|
+
* Sets the start date
|
|
88
|
+
*/
|
|
89
|
+
startValue?: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Sets the end date
|
|
92
|
+
*/
|
|
93
|
+
endValue?: Date;
|
|
94
|
+
/**
|
|
95
|
+
* Handles start and end date changes
|
|
96
|
+
*
|
|
97
|
+
* @param {Object} values The selected dates
|
|
98
|
+
* @param {Date} [values.startValue] Optional start date
|
|
99
|
+
* @param {Date} [values.endValue] Optional end date
|
|
100
|
+
*/
|
|
101
|
+
onChange?: (values: {
|
|
102
|
+
startValue?: Date;
|
|
103
|
+
endValue?: Date;
|
|
104
|
+
}) => void;
|
|
105
|
+
/**
|
|
106
|
+
* Overrides the default date parsing
|
|
107
|
+
*
|
|
108
|
+
* @param {string} inputValue A date string
|
|
109
|
+
* @returns {Date} the parsed date
|
|
110
|
+
*/
|
|
111
|
+
customParseDate?: (inputValue?: string) => Date;
|
|
112
|
+
}
|