@types/react-calendar
Advanced tools
Comparing version 3.1.6 to 3.4.0
@@ -1,14 +0,17 @@ | ||
// Type definitions for react-calendar 3.1 | ||
// Type definitions for react-calendar 3.4 | ||
// Project: https://github.com/wojtekmaj/react-calendar | ||
// Definitions by: Stéphane Saquet <https://github.com/Guymestef>, Katie Soldau <https://github.com/ksoldau> | ||
// Definitions by: Stéphane Saquet <https://github.com/Guymestef>, Katie Soldau <https://github.com/ksoldau>, Danah <https://github.com/sweetmilkys> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 3.5 | ||
export type CalendarType = 'ISO 8601' | 'US' | 'Arabic' | 'Hebrew'; | ||
export type Detail = 'month' | 'year' | 'decade' | 'century'; | ||
export type DateCallback = (date: Date, event: React.SyntheticEvent) => void; | ||
export type ClickWeekNumberCallback = (weekNumber: number, date: Date, event: React.SyntheticEvent) => void; | ||
export type OnChangeDateCallback = (date: Date | Date[], event: React.SyntheticEvent) => void; | ||
import { MouseEvent, ChangeEvent, MutableRefObject, RefObject } from "react"; | ||
export type CalendarType = "ISO 8601" | "US" | "Arabic" | "Hebrew"; | ||
export type Detail = "month" | "year" | "decade" | "century"; | ||
export type DateCallback = (value: Date, event: MouseEvent<HTMLButtonElement>) => void; | ||
export type ClickWeekNumberCallback = (weekNumber: number, date: Date, event: MouseEvent<HTMLButtonElement>) => void; | ||
export type OnChangeDateCallback = (value: Date, event: ChangeEvent<HTMLInputElement>) => void; | ||
export type FormatterCallback = (locale: string, date: Date) => string; | ||
export type ViewCallback = (props: ViewCallbackProperties) => void; | ||
export type DrillCallback = (props: DrillCallbackProperties) => void; | ||
@@ -32,2 +35,5 @@ export default function Calendar(props: CalendarProps): JSX.Element; | ||
formatYear?: FormatterCallback; | ||
inputRef?: ( | ||
ref: HTMLInputElement | null, | ||
) => void | RefObject<HTMLInputElement> | MutableRefObject<HTMLInputElement | null>; | ||
locale?: string; | ||
@@ -39,7 +45,12 @@ maxDate?: Date; | ||
navigationAriaLabel?: string; | ||
navigationLabel?: (props: { date: Date; view: Detail; label: string }) => string | JSX.Element | null; | ||
navigationLabel?: (props: { | ||
date: Date; | ||
label: string; | ||
locale: string; | ||
view: Detail; | ||
}) => string | JSX.Element | null; | ||
nextAriaLabel?: string; | ||
nextLabel?: string | JSX.Element | null; | ||
next2AriaLabel?: string; | ||
next2Label?: string | JSX.Element | null; | ||
nextAriaLabel?: string; | ||
nextLabel?: string | JSX.Element; | ||
onActiveStartDateChange?: ViewCallback; | ||
@@ -53,11 +64,9 @@ onChange?: OnChangeDateCallback; | ||
onClickYear?: DateCallback; | ||
onDrillDown?: ViewCallback; | ||
onDrillUp?: ViewCallback; | ||
onDrillDown?: DrillCallback; | ||
onDrillUp?: DrillCallback; | ||
prevAriaLabel?: string; | ||
prevLabel?: string | JSX.Element | null; | ||
prev2AriaLabel?: string; | ||
prev2Label?: string | JSX.Element | null; | ||
prevAriaLabel?: string; | ||
prevLabel?: string | JSX.Element; | ||
renderChildren?: (props: CalendarTileProperties) => JSX.Element | null; // For backwards compatibility | ||
returnValue?: 'start' | 'end' | 'range'; | ||
selectRange?: boolean; | ||
returnValue?: "start" | "end" | "range"; | ||
showDoubleView?: boolean; | ||
@@ -67,6 +76,7 @@ showFixedNumberOfWeeks?: boolean; | ||
showNeighboringMonth?: boolean; | ||
selectRange?: boolean; | ||
showWeekNumbers?: boolean; | ||
tileClassName?: string | string[] | ((props: CalendarTileProperties) => string | string[] | null); | ||
tileContent?: JSX.Element | ((props: CalendarTileProperties) => JSX.Element | null); | ||
tileDisabled?: (props: CalendarTileProperties & { activeStartDate: Date }) => boolean; | ||
tileContent?: string | JSX.Element | ((props: CalendarTileProperties) => JSX.Element | null); | ||
tileDisabled?: (props: CalendarTileProperties) => boolean; | ||
value?: Date | Date[] | null; | ||
@@ -88,2 +98,7 @@ view?: Detail; | ||
export interface DrillCallbackProperties { | ||
activeStartDate: Date; | ||
view: Detail; | ||
} | ||
export function MonthView(props: DetailViewProps): JSX.Element; | ||
@@ -90,0 +105,0 @@ export function YearView(props: DetailViewProps): JSX.Element; |
{ | ||
"name": "@types/react-calendar", | ||
"version": "3.1.6", | ||
"version": "3.4.0", | ||
"description": "TypeScript definitions for react-calendar", | ||
@@ -16,2 +16,7 @@ "license": "MIT", | ||
"githubUsername": "ksoldau" | ||
}, | ||
{ | ||
"name": "Danah", | ||
"url": "https://github.com/sweetmilkys", | ||
"githubUsername": "sweetmilkys" | ||
} | ||
@@ -27,5 +32,7 @@ ], | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "c6fb722cedad9c984f5338d5371eaf3aaf924b99bd6d5b725d22960603c7ba8b", | ||
"dependencies": { | ||
"@types/react": "*" | ||
}, | ||
"typesPublisherContentHash": "f7a7fd1589e9bd26d5580125d11e2e6c7a2c09454bd959a5fb5dd4a5262deecd", | ||
"typeScriptVersion": "3.5" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 18 May 2021 17:02:01 GMT | ||
* Dependencies: none | ||
* Last updated: Wed, 26 May 2021 07:31:22 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [Stéphane Saquet](https://github.com/Guymestef), and [Katie Soldau](https://github.com/ksoldau). | ||
These definitions were written by [Stéphane Saquet](https://github.com/Guymestef), [Katie Soldau](https://github.com/ksoldau), and [Danah](https://github.com/sweetmilkys). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7347
109
1
+ Added@types/react@*
+ Added@types/prop-types@15.7.13(transitive)
+ Added@types/react@18.3.12(transitive)
+ Addedcsstype@3.1.3(transitive)