New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-day-picker

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-day-picker - npm Package Compare versions

Comparing version 1.2.37 to 5.2.0

224

react-day-picker/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for react-day-picker v1.2.0
// Type definitions for react-day-picker 5.2
// Project: https://github.com/gpbl/react-day-picker

@@ -7,108 +7,162 @@ // Definitions by: Giampaolo Bellavite <https://github.com/gpbl>, Jason Killian <https://github.com/jkillian>

/// <reference types="react" />
import * as React from 'react';
declare module "react-day-picker" {
import DayPicker = ReactDayPicker.DayPicker;
export = DayPicker;
}
declare namespace DayPicker {
export interface LocaleUtils {
formatDay(day: Date, locale: string): string;
formatMonthTitle(month: Date, locale: string): string;
formatWeekdayLong(weekday: number, locale: string): string;
formatWeekdayShort(weekday: number, locale: string): string;
getFirstDayOfWeek(locale: string): number;
getMonths(locale: string): [string, string, string, string, string, string, string, string, string, string, string, string];
}
declare var DayPicker: typeof ReactDayPicker.DayPicker;
export interface DateUtils {
addMonths(d: Date, n: number): Date;
clone(d: Date): Date;
isSameDay(d1: Date, d2: Date): Date;
isPastDay(d: Date): boolean;
isFutureDay(d: Date): boolean;
isDayBetween(day: Date, begin: Date, end: Date): boolean;
addDayToRange(day: Date, range: RangeModifier): RangeModifier;
isDayInRange(day: Date, range: RangeModifier): boolean;
}
declare namespace ReactDayPicker {
interface LocaleUtils {
formatMonthTitle: (month: Date, locale: string) => string;
formatWeekdayShort: (weekday: number, locale: string) => string;
formatWeekdayLong: (weekday: number, locale: string) => string;
getFirstDayOfWeek: (locale: string) => number;
getMonths: (locale: string) => string[];
export interface CaptionElementProps {
date: Date;
classNames: ClassNames,
localeUtils: LocaleUtils;
locale: string;
months: undefined;
onClick?: React.MouseEventHandler<HTMLElement>;
}
interface DayModifiers {
selected?: boolean;
disabled?: boolean;
[name: string]: boolean | undefined;
export interface NavbarElementProps {
className: string;
classNames: ClassNames;
previousMonth: Date;
nextMonth: Date;
showPreviousButton: boolean;
showNextButton: boolean;
onPreviousClick(callback?: () => void): void;
onNextClick(callback?: () => void): void;
dir?: string;
labels: { previousMonth: string; nextMonth: string; };
localeUtils: LocaleUtils;
locale: string;
}
interface Modifiers {
[name: string]: (date: Date) => boolean;
export interface WeekdayElementProps {
weekday: number;
className: string;
localeUtils: LocaleUtils;
locale: string;
}
interface CaptionElementProps extends React.Props<any> {
date?: Date;
localeUtils?: LocaleUtils;
locale?: string;
onClick?: React.MouseEventHandler<{}>;
export interface ClassNames {
container: string;
interactionDisabled: string;
navBar: string;
navButtonPrev: string;
navButtonNext: string;
month: string;
caption: string;
weekdays: string;
weekdaysRow: string;
weekday: string;
body: string;
week: string;
day: string;
today: string;
selected: string;
disabled: string;
outside: string;
}
interface NavbarElementProps extends React.Props<any> {
className?: string;
previousMonth?: Date;
nextMonth?: Date;
showPreviousButton?: boolean;
showNextButton?: boolean;
onPreviousClick(): void;
onNextClick(): void;
dir?: string;
localeUtils?: LocaleUtils;
locale?: string;
export interface RangeModifier {
from: Date;
to: Date;
}
export interface BeforeModifier {
before: Date;
}
export interface AfterModifier {
after: Date;
}
export interface FunctionModifier {
(date: Date): boolean;
}
export type Modifier = Date | RangeModifier | BeforeModifier | AfterModifier | FunctionModifier;
export interface Modifiers {
today: Modifier | Modifier[];
outside: Modifier | Modifier[];
[other: string]: Modifier | Modifier[] | undefined;
}
interface WeekdayElementProps extends React.Props<any> {
weekday?: number;
export interface Props {
canChangeMonth?: boolean;
captionElement?: React.ReactElement<Partial<CaptionElementProps>> |
React.ComponentClass<CaptionElementProps> |
React.SFC<CaptionElementProps>;
className?: string;
localeUtils?: LocaleUtils;
locale?: string;
}
interface Props extends React.Props<DayPicker>{
modifiers?: Modifiers;
initialMonth?: Date;
numberOfMonths?: number;
renderDay?: (date: Date) => number | string | JSX.Element;
classNames?: ClassNames;
containerProps?: React.HTMLAttributes<HTMLDivElement>;
disabledDays?: Modifier | Modifier[];
enableOutsideDays?: boolean;
firstDayOfWeek?:number;
canChangeMonth?: boolean;
disabledDays?: (date: Date) => boolean;
firstDayOfWeek?: number;
fixedWeeks?: boolean;
fromMonth?: Date;
initialMonth?: Date;
labels?: { previousMonth: string; nextMonth: string; };
locale?: string;
localeUtils?: LocaleUtils;
modifiers?: Partial<Modifiers>;
month?: Date;
months?: [string, string, string, string, string, string, string, string, string, string, string, string];
navbarElement?: React.ReactElement<Partial<NavbarElementProps>> |
React.ComponentClass<NavbarElementProps> |
React.SFC<NavbarElementProps>;
numberOfMonths?: number;
onBlur?(e: React.FocusEvent<HTMLDivElement>): void;
onCaptionClick?(month: Date, e: React.MouseEvent<HTMLDivElement>): void;
onDayClick?(day: Date, modifiers: Modifiers, e: React.MouseEvent<HTMLDivElement>): void;
onDayKeyDown?(day: Date, modifiers: Modifiers, e: React.KeyboardEvent<HTMLDivElement>): void;
onDayMouseEnter?(day: Date, modifiers: Modifiers, e: React.MouseEvent<HTMLDivElement>): void;
onDayMouseLeave?(day: Date, modifiers: Modifiers, e: React.MouseEvent<HTMLDivElement>): void;
onDayTouchEnd?(day: Date, modifiers: Modifiers, e: React.TouchEvent<HTMLDivElement>): void;
onDayTouchStart?(day: Date, modifiers: Modifiers, e: React.TouchEvent<HTMLDivElement>): void;
onFocus?(e: React.FocusEvent<HTMLDivElement>): void;
onKeyDown?(e: React.KeyboardEvent<HTMLDivElement>): void;
onMonthChange?(month: Date): void;
pagedNavigation?: boolean;
renderDay?(date: Date, modifiers: Modifiers): React.ReactNode;
reverseMonths?: boolean;
selectedDays?: Modifier | Modifier[];
toMonth?: Date;
localeUtils?: LocaleUtils;
locale?: string;
captionElement?: React.ReactElement<CaptionElementProps>;
onDayClick?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
onDayTouchTap?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
onDayMouseEnter?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
onDayMouseLeave?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
onDayTouchEnd?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
onDayTouchStart?: (e: React.SyntheticEvent<{}>, day: Date, modifiers: DayModifiers) => any;
navbarElement?: React.ReactElement<NavbarElementProps>;
weekdayElement?: React.ReactElement<WeekdayElementProps>;
onMonthChange?: (month: Date) => any;
onCaptionClick?: (e: React.SyntheticEvent<{}>, month: Date) => any;
className?: string;
selectedDays?: (date: Date) => boolean;
style?: React.CSSProperties;
tabIndex?: number;
weekdayElement?: React.ReactElement<Partial<WeekdayElementProps>> |
React.ComponentClass<WeekdayElementProps> |
React.SFC<WeekdayElementProps>;
weekdaysLong?: [string, string, string, string, string, string, string];
weekdaysShort?: [string, string, string, string, string, string, string];
}
const VERSION: string;
const LocaleUtils: DayPicker.LocaleUtils;
const DateUtils: DayPicker.DateUtils;
}
class DayPicker extends React.Component<Props, {}> {
showMonth(month: Date): void;
showPreviousMonth(): void;
showNextMonth(): void;
}
declare class DayPicker extends React.Component<DayPicker.Props, never> {
showMonth(month: Date): void;
namespace DayPicker {
var LocaleUtils: LocaleUtils;
namespace DateUtils {
function addMonths(d: Date, n: number): Date;
function clone(d: Date): Date;
function isSameDay(d1?: Date, d2?: Date): boolean;
function isPastDay(d: Date): boolean;
function isDayBetween(day: Date, startDate: Date, endDate: Date): boolean;
function addDayToRange(day: Date, range: { from?: Date, to?: Date }): { from?: Date, to?: Date };
function isDayInRange(day: Date, range: { from?: Date, to?: Date }): boolean;
}
}
showPreviousMonth(): void;
showNextMonth(): void;
showPreviousYear(): void;
showNextYear(): void;
}
export = DayPicker;
{
"name": "@types/react-day-picker",
"version": "1.2.37",
"version": "5.2.0",
"description": "TypeScript definitions for react-day-picker",
"license": "MIT",
"author": "Giampaolo Bellavite <https://github.com/gpbl>, Jason Killian <https://github.com/jkillian>",
"contributors": [
{
"name": "Giampaolo Bellavite",
"url": "https://github.com/gpbl"
},
{
"name": "Jason Killian",
"url": "https://github.com/jkillian"
}
],
"main": "",

@@ -17,4 +26,4 @@ "repository": {

"peerDependencies": {},
"typesPublisherContentHash": "8290a59607daaaf9d1df3a6d04bbe8f16b08fc0f7d81aba09de02f5657784ce9",
"typesPublisherContentHash": "1109bef3a4a07259294cd0ed3bf399acac2e6f14e9a899b7d7ff93818cd3949e",
"typeScriptVersion": "2.1"
}

@@ -11,7 +11,7 @@ # Installation

Additional Details
* Last updated: Tue, 07 Feb 2017 20:01:00 GMT
* Last updated: Wed, 22 Mar 2017 00:26:27 GMT
* Dependencies: react
* Global values: DayPicker, ReactDayPicker
* Global values: none
# Credits
These definitions were written by Giampaolo Bellavite <https://github.com/gpbl>, Jason Killian <https://github.com/jkillian>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc