Socket
Socket
Sign inDemoInstall

react-day-picker

Package Overview
Dependencies
6
Maintainers
1
Versions
229
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.4.1 to 8.5.0

dist/index.min.js

193

dist/index.d.ts

@@ -1,5 +0,4 @@

/// <reference types="react" />
import { Locale } from "date-fns";
import React from "react";
import { ReactNode, HTMLProps } from "react";
import { Locale as Locale$1 } from 'date-fns';
import React$1, { ReactNode, HTMLProps } from 'react';
/** Represent the props of the {@link Caption} component. */

@@ -18,3 +17,3 @@ interface CaptionProps {

*/
type CaptionLayout = "dropdown" | "buttons";
type CaptionLayout = 'dropdown' | 'buttons';
/**

@@ -25,2 +24,3 @@ * Render the caption of a month. The caption has a different layout when

declare function Caption(props: CaptionProps): JSX.Element;
/** The props for the {@link CaptionLabel} component. */

@@ -35,2 +35,3 @@ interface CaptionLabelProps {

declare function CaptionLabel(props: CaptionLabelProps): JSX.Element;
/** Represent the props used by the {@link Day} component. */

@@ -48,2 +49,3 @@ interface DayProps {

declare function Day(props: DayProps): JSX.Element;
/**

@@ -133,2 +135,3 @@ * A value or a function that matches a specific day.

declare function isDayOfWeekType(value: unknown): value is DayOfWeek;
/** A _modifier_ represents different styles or states of a day displayed in the calendar. */

@@ -181,2 +184,3 @@ type Modifier = string;

type CustomModifiers = Record<Modifier, Matcher[]>;
/** Represent the props for the {@link DayContent} component. */

@@ -193,2 +197,3 @@ interface DayContentProps {

declare function DayContent(props: DayContentProps): JSX.Element;
/** The props for the {@link Dropdown} component. */

@@ -199,10 +204,10 @@ interface DropdownProps {

/** The caption displayed to replace the hidden select. */
caption?: React.ReactNode;
children?: React.SelectHTMLAttributes<HTMLSelectElement>["children"];
caption?: React$1.ReactNode;
children?: React$1.SelectHTMLAttributes<HTMLSelectElement>['children'];
className?: string;
["aria-label"]?: string;
style?: React.CSSProperties;
['aria-label']?: string;
style?: React$1.CSSProperties;
/** The selected value. */
value?: string | number;
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
onChange?: React$1.ChangeEventHandler<HTMLSelectElement>;
}

@@ -214,2 +219,3 @@ /**

declare function Dropdown(props: DropdownProps): JSX.Element;
/**

@@ -228,2 +234,3 @@ * The props for the {@link Row} component.

declare function Row(props: RowProps): JSX.Element;
/**

@@ -243,2 +250,3 @@ * The props for the {@link WeekNumber} component.

declare function WeekNumber(props: WeekNumberProps): JSX.Element;
/** The event handler when a day is clicked. */

@@ -257,28 +265,42 @@ type DayClickEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.MouseEvent) => void;

/** The event handler when selecting multiple days. */
type SelectMultipleEventHandler = (/** The selected days */
days: Date[] | undefined, /** The day that was clicked triggering the event. */
selectedDay: Date, /** The day that was clicked */
activeModifiers: ActiveModifiers, /** The mouse event that triggered this event. */
type SelectMultipleEventHandler = (
/** The selected days */
days: Date[] | undefined,
/** The day that was clicked triggering the event. */
selectedDay: Date,
/** The day that was clicked */
activeModifiers: ActiveModifiers,
/** The mouse event that triggered this event. */
e: React.MouseEvent) => void;
/** The event handler when selecting a range of days. */
type SelectRangeEventHandler = (/** The current range of the selected days. */
range: DateRange | undefined, /** The day that was selected (or clicked) triggering the event. */
selectedDay: Date, /** The modifiers of the selected day. */
type SelectRangeEventHandler = (
/** The current range of the selected days. */
range: DateRange | undefined,
/** The day that was selected (or clicked) triggering the event. */
selectedDay: Date,
/** The modifiers of the selected day. */
activeModifiers: ActiveModifiers, e: React.MouseEvent) => void;
/** The event handler when selecting a single day. */
type SelectSingleEventHandler = (/** The selected day, `undefined` when `required={false}` (default) and the day is clicked again. */
day: Date | undefined, /** The day that was selected (or clicked) triggering the event. */
selectedDay: Date, /** The modifiers of the selected day. */
type SelectSingleEventHandler = (
/** The selected day, `undefined` when `required={false}` (default) and the day is clicked again. */
day: Date | undefined,
/** The day that was selected (or clicked) triggering the event. */
selectedDay: Date,
/** The modifiers of the selected day. */
activeModifiers: ActiveModifiers, e: React.MouseEvent) => void;
/**The event handler when the week number is clicked. */
type WeekNumberClickEventHandler = (/** The week number that has been clicked. */
weekNumber: number, /** The dates in the clicked week. */
dates: Date[], /** The mouse event that triggered this event. */
type WeekNumberClickEventHandler = (
/** The week number that has been clicked. */
weekNumber: number,
/** The dates in the clicked week. */
dates: Date[],
/** The mouse event that triggered this event. */
e: React.MouseEvent) => void;
/** The event handler when a day gets a touch event. */
type DayTouchEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.TouchEvent) => void;
/** Represents a function to format a date. */
type DateFormatter = (date: Date, options?: {
locale?: Locale;
}) => React.ReactNode;
}) => React$1.ReactNode;
/** Represent a map of formatters used to render localized content. */

@@ -302,3 +324,4 @@ type Formatters = {

locale?: Locale;
}) => React.ReactNode;
}) => React$1.ReactNode;
/** Map of functions to translate ARIA labels for the relative elements. */

@@ -310,2 +333,3 @@ type Labels = {

labelPrevious: NavButtonLabel;
/** @deprecated This label is not used anymore and this function will be removed in the future. */
labelDay: DayLabel;

@@ -317,18 +341,19 @@ labelWeekday: WeekdayLabel;

type DayLabel = (day: Date, activeModifiers: ActiveModifiers, options?: {
locale?: Locale;
locale?: Locale$1;
}) => string;
/** Return the ARIA label for the "next month" / "prev month" buttons in the navigation.*/
type NavButtonLabel = (month?: Date, options?: {
locale?: Locale;
locale?: Locale$1;
}) => string;
/** Return the ARIA label for the Head component.*/
type WeekdayLabel = (day: Date, options?: {
locale?: Locale;
locale?: Locale$1;
}) => string;
/** Return the ARIA label of the week number.*/
type WeekNumberLabel = (n: number, options?: {
locale?: Locale;
locale?: Locale$1;
}) => string;
/** The style (either via class names or via in-line styles) of an element. */
type StyledElement<T> = {
type StyledElement<T = string | React$1.CSSProperties> = {
/** The root element. */

@@ -418,3 +443,3 @@ readonly root: T;

/** These elements must not be in the `styles` or `classNames` records as they are styled via the `modifiersStyles` or `modifiersClassNames` pop */
type InternalModifiersElement = "day_outside" | "day_selected" | "day_disabled" | "day_hidden" | "day_range_start" | "day_range_end" | "day_range_middle" | "day_today";
type InternalModifiersElement = 'day_outside' | 'day_selected' | 'day_disabled' | 'day_hidden' | 'day_range_start' | 'day_range_end' | 'day_range_middle' | 'day_today';
/** The class names of each element. */

@@ -427,9 +452,10 @@ type ClassNames = Partial<StyledElement<string>>;

*/
type Styles = Partial<Omit<StyledElement<React.CSSProperties>, InternalModifiersElement>>;
type Styles = Partial<Omit<StyledElement<React$1.CSSProperties>, InternalModifiersElement>>;
/** Props of a component that can be styled via classNames or inline-styles. */
type StyledComponent = {
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode;
style?: React$1.CSSProperties;
children?: React$1.ReactNode;
};
/**

@@ -443,3 +469,3 @@ * Selection modes supported by DayPicker.

*/
type DaySelectionMode = "single" | "multiple" | "range" | "default";
type DaySelectionMode = 'single' | 'multiple' | 'range' | 'default';
/**

@@ -620,3 +646,3 @@ * The base props for the {@link DayPicker} component and the {@link DayPickerContext}.

/** The date-fns locale object used to localize dates. Defaults to* `en-US`. */
locale?: Locale;
locale?: Locale$1;
/**

@@ -700,11 +726,13 @@ * Labels creators to override the defaults. Use this prop to customize the

}
/** The props for the {@link DayPicker} component when using `mode="default"` or `undefined`. */
interface DayPickerDefaultProps extends DayPickerBase {
mode?: undefined | "default";
mode?: undefined | 'default';
}
/** Returns true when the props are of type {@link DayPickerDefaultProps}. */
declare function isDayPickerDefault(props: DayPickerProps): props is DayPickerDefaultProps;
/** The props for the {@link DayPicker} component when using `mode="range"`. */
interface DayPickerRangeProps extends DayPickerBase {
mode: "range";
mode: 'range';
/** The selected range of days. */

@@ -721,5 +749,6 @@ selected?: DateRange | undefined;

declare function isDayPickerRange(props: DayPickerProps | DayPickerContextValue): props is DayPickerRangeProps;
/** The props for the {@link DayPicker} component when using `mode="single"`. */
interface DayPickerSingleProps extends DayPickerBase {
mode: "single";
mode: 'single';
/** The selected day. */

@@ -734,2 +763,3 @@ selected?: Date | undefined;

declare function isDayPickerSingle(props: DayPickerProps | DayPickerContextValue): props is DayPickerSingleProps;
/**

@@ -741,3 +771,3 @@ * The value of the {@link DayPickerContext} extends the props from DayPicker

mode: DaySelectionMode;
onSelect?: DayPickerSingleProps["onSelect"] | DayPickerMultipleProps["onSelect"] | DayPickerRangeProps["onSelect"];
onSelect?: DayPickerSingleProps['onSelect'] | DayPickerMultipleProps['onSelect'] | DayPickerRangeProps['onSelect'];
required?: boolean;

@@ -765,3 +795,3 @@ min?: number;

*/
declare const DayPickerContext: React.Context<DayPickerContextValue | undefined>;
declare const DayPickerContext: React$1.Context<DayPickerContextValue | undefined>;
/** The props for the {@link DayPickerProvider}. */

@@ -785,5 +815,6 @@ interface DayPickerProviderProps {

declare function useDayPicker(): DayPickerContextValue;
/** The props for the {@link DayPicker} component when using `mode="multiple"`. */
interface DayPickerMultipleProps extends DayPickerBase {
mode: "multiple";
mode: 'multiple';
/** The selected days. */

@@ -800,2 +831,3 @@ selected?: Date[] | undefined;

declare function isDayPickerMultiple(props: DayPickerProps | DayPickerContextValue): props is DayPickerMultipleProps;
type DayPickerProps = DayPickerDefaultProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps;

@@ -885,3 +917,3 @@ /**

* ```
* import es from 'date-fns/locale/es';
* import { es } from 'date-fns/locale';
* <DayPicker locale={es} />

@@ -891,8 +923,10 @@ * ```

declare function DayPicker(props: DayPickerDefaultProps | DayPickerSingleProps | DayPickerMultipleProps | DayPickerRangeProps): JSX.Element;
/** The props for the {@link Button} component. */
type ButtonProps = React.HTMLProps<HTMLButtonElement>;
type ButtonProps = React$1.HTMLProps<HTMLButtonElement>;
/**
* Render a button HTML element applying the reset class name.
*/
declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "multiple" | "default" | "onSelect" | "required" | "min" | "max" | "selected" | "className" | "style" | "id" | "disabled" | "hidden" | "dir" | "start" | "color" | "content" | "size" | "wrap" | "open" | "value" | "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "aria-label" | "onChange" | "name" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "media" | "mediaGroup" | "method" | "minLength" | "muted" | "noValidate" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "target" | "type" | "useMap" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLButtonElement>>;
declare const Button: React$1.ForwardRefExoticComponent<Pick<ButtonProps, "multiple" | "default" | "onSelect" | "required" | "min" | "max" | "selected" | "className" | "style" | "id" | "disabled" | "hidden" | "dir" | "start" | "color" | "content" | "size" | "wrap" | "open" | "value" | "children" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "list" | "role" | "aria-label" | "onChange" | "name" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "maxLength" | "media" | "mediaGroup" | "method" | "minLength" | "muted" | "noValidate" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "target" | "type" | "useMap" | "width" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React$1.RefAttributes<HTMLButtonElement>>;
/**

@@ -902,2 +936,3 @@ * Render a caption with the dropdowns to navigate between months and years.

declare function CaptionDropdowns(props: CaptionProps): JSX.Element;
/**

@@ -907,6 +942,9 @@ * Render a caption with a button-based navigation.

declare function CaptionNavigation(props: CaptionProps): JSX.Element;
/** Render the Footer component (empty as default).*/
declare function Footer(): JSX.Element;
/** Render the table head. */
declare function Head(): JSX.Element;
/**

@@ -916,2 +954,3 @@ * Render the HeadRow component - i.e. the table head row with the weekday names.

declare function HeadRow(): JSX.Element;
/**

@@ -921,2 +960,3 @@ * Render the icon in the styled drop-down.

declare function IconDropdown(props: StyledComponent): JSX.Element;
/**

@@ -926,2 +966,3 @@ * Render the "next month" button in the navigation.

declare function IconRight(props: StyledComponent): JSX.Element;
/**

@@ -931,7 +972,8 @@ * Render the "previous month" button in the navigation.

declare function IconLeft(props: StyledComponent): JSX.Element;
/** The props to attach to the input field when using {@link useInput}. */
type InputHTMLAttributes = Pick<React.InputHTMLAttributes<HTMLInputElement>, "onBlur" | "onChange" | "onFocus" | "value" | "placeholder">;
type InputHTMLAttributes = Pick<React$1.InputHTMLAttributes<HTMLInputElement>, 'onBlur' | 'onChange' | 'onFocus' | 'value' | 'placeholder'>;
/** The props to attach to the DayPicker component when using {@link useInput}. */
type InputDayPickerProps = Pick<DayPickerSingleProps, "fromDate" | "toDate" | "locale" | "month" | "onDayClick" | "onMonthChange" | "selected" | "today">;
interface UseInputOptions extends Pick<DayPickerBase, "locale" | "fromDate" | "toDate" | "fromMonth" | "toMonth" | "fromYear" | "toYear" | "today"> {
type InputDayPickerProps = Pick<DayPickerSingleProps, 'fromDate' | 'toDate' | 'locale' | 'month' | 'onDayClick' | 'onMonthChange' | 'selected' | 'today'>;
interface UseInputOptions extends Pick<DayPickerBase, 'locale' | 'fromDate' | 'toDate' | 'fromMonth' | 'toMonth' | 'fromYear' | 'toYear' | 'today'> {
/** The initially selected date */

@@ -957,5 +999,8 @@ defaultSelected?: Date;

declare function useInput(options?: UseInputOptions): UseInputValue;
type EventName = "onClick" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart";
type EventName = 'onClick' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'onMouseEnter' | 'onMouseLeave' | 'onPointerEnter' | 'onPointerLeave' | 'onTouchCancel' | 'onTouchEnd' | 'onTouchMove' | 'onTouchStart';
type DayEventHandlers = Pick<HTMLProps<HTMLButtonElement>, EventName>;
type SelectedDays = Date | Date[] | DateRange | undefined;
type DayRender = {

@@ -969,3 +1014,3 @@ /** Whether the day should be rendered a `button` instead of a `div` */

/** The props to apply to the button element (when `isButton` is true). */
buttonProps: StyledComponent & Pick<ButtonProps, "disabled" | "aria-pressed" | "tabIndex"> & DayEventHandlers;
buttonProps: StyledComponent & Pick<ButtonProps, 'disabled' | 'aria-selected' | 'tabIndex'> & DayEventHandlers;
/** The props to apply to the div element (when `isButton` is false). */

@@ -981,6 +1026,10 @@ divProps: StyledComponent;

*/
declare function useDayRender(/** The date to render. */
day: Date, /** The month where the date is displayed (if not the same as `date`, it means it is an "outside" day). */
displayMonth: Date, /** A ref to the button element that will be target of focus when rendered (if required). */
buttonRef: React.RefObject<HTMLButtonElement>): DayRender;
declare function useDayRender(
/** The date to render. */
day: Date,
/** The month where the date is displayed (if not the same as `date`, it means it is an "outside" day). */
displayMonth: Date,
/** A ref to the button element that will be target of focus when rendered (if required). */
buttonRef: React$1.RefObject<HTMLButtonElement>): DayRender;
/**

@@ -994,3 +1043,4 @@ * Return the active modifiers for the specified day.

*/
declare function useActiveModifiers(day: Date, /**
declare function useActiveModifiers(day: Date,
/**
* The month where the date is displayed. If not the same as `date`, the day

@@ -1000,2 +1050,3 @@ * is an "outside day".

displayMonth?: Date): ActiveModifiers;
/** Represents the value of the {@link FocusContext}. */

@@ -1019,13 +1070,7 @@ type FocusContextValue = {

focusWeekAfter: () => void;
/* Focus the day in the month before the focused day. */
focusMonthBefore: () => void;
/* Focus the day in the month after the focused day. */
focusMonthAfter: () => void;
/* Focus the day in the year before the focused day. */
focusYearBefore: () => void;
/* Focus the day in the year after the focused day. */
focusYearAfter: () => void;
/* Focus the day at the start of the week of the focused day. */
focusStartOfWeek: () => void;
/* Focus the day at the end of the week of focused day. */
focusEndOfWeek: () => void;

@@ -1038,3 +1083,3 @@ };

*/
declare const FocusContext: React.Context<FocusContextValue | undefined>;
declare const FocusContext: React$1.Context<FocusContextValue | undefined>;
/** The provider for the {@link FocusContext}. */

@@ -1051,2 +1096,3 @@ declare function FocusProvider(props: {

declare function useFocusContext(): FocusContextValue;
/** Represents the value of the {@link NavigationContext}. */

@@ -1073,3 +1119,3 @@ interface NavigationContextValue {

*/
declare const NavigationContext: React.Context<NavigationContextValue | undefined>;
declare const NavigationContext: React$1.Context<NavigationContextValue | undefined>;
/** Provides the values for the {@link NavigationContext}. */

@@ -1086,8 +1132,10 @@ declare function NavigationProvider(props: {

declare function useNavigation(): NavigationContextValue;
/** The props of {@link RootProvider}. */
type RootContext = DayPickerBase & {
children: React.ReactNode;
children: React$1.ReactNode;
};
/** Provide the value for all the context providers. */
declare function RootProvider(props: RootContext): JSX.Element;
/** Represent the modifiers that are changed by the multiple selection. */

@@ -1110,3 +1158,3 @@ type SelectMultipleModifiers = Pick<Modifiers, InternalModifier.Disabled>;

*/
declare const SelectMultipleContext: React.Context<SelectMultipleContextValue | undefined>;
declare const SelectMultipleContext: React$1.Context<SelectMultipleContextValue | undefined>;
type SelectMultipleProviderProps = {

@@ -1129,2 +1177,3 @@ initialProps: DayPickerBase;

declare function useSelectMultiple(): SelectMultipleContextValue;
/** Represent the modifiers that are changed by the range selection. */

@@ -1147,3 +1196,3 @@ type SelectRangeModifiers = Pick<Modifiers, InternalModifier.Disabled | InternalModifier.RangeEnd | InternalModifier.RangeMiddle | InternalModifier.RangeStart>;

*/
declare const SelectRangeContext: React.Context<SelectRangeContextValue | undefined>;
declare const SelectRangeContext: React$1.Context<SelectRangeContextValue | undefined>;
type SelectRangeProviderProps = {

@@ -1166,2 +1215,3 @@ initialProps: DayPickerBase;

declare function useSelectRange(): SelectRangeContextValue;
/** Represents the value of a {@link SelectSingleContext}. */

@@ -1180,6 +1230,6 @@ interface SelectSingleContextValue {

*/
declare const SelectSingleContext: React.Context<SelectSingleContextValue | undefined>;
declare const SelectSingleContext: React$1.Context<SelectSingleContextValue | undefined>;
type SelectSingleProviderProps = {
initialProps: DayPickerBase;
children: React.ReactNode;
children: React$1.ReactNode;
};

@@ -1190,3 +1240,3 @@ /** Provides the values for the {@link SelectSingleProvider}. */

initialProps: DayPickerSingleProps;
children: React.ReactNode;
children: React$1.ReactNode;
};

@@ -1200,2 +1250,3 @@ declare function SelectSingleProviderInternal({ initialProps, children }: SelectSingleProviderInternal): JSX.Element;

declare function useSelectSingle(): SelectSingleContextValue;
/**

@@ -1219,2 +1270,3 @@ * Returns whether a day matches against at least one of the given Matchers.

declare function isMatch(day: Date, matchers: Matcher[]): boolean;
/**

@@ -1227,2 +1279,3 @@ * Add a day to an existing range.

declare function addToRange(day: Date, range?: DateRange): DateRange | undefined;
export { DayPickerProps, DayPicker, ButtonProps, Button, CaptionProps, CaptionLayout, Caption, CaptionDropdowns, CaptionLabelProps, CaptionLabel, CaptionNavigation, DayProps, Day, DayContentProps, DayContent, DropdownProps, Dropdown, Footer, Head, HeadRow, IconDropdown, IconRight, IconLeft, RowProps, Row, WeekNumberProps, WeekNumber, InputHTMLAttributes, InputDayPickerProps, UseInputOptions, UseInputValue, useInput, DayRender, useDayRender, useActiveModifiers, DayPickerContextValue, DayPickerContext, DayPickerProviderProps, DayPickerProvider, useDayPicker, FocusContextValue, FocusContext, FocusProvider, useFocusContext, NavigationContextValue, NavigationContext, NavigationProvider, useNavigation, RootContext, RootProvider, SelectMultipleModifiers, SelectMultipleContextValue, SelectMultipleContext, SelectMultipleProviderProps, SelectMultipleProvider, SelectMultipleProviderInternal, useSelectMultiple, SelectRangeModifiers, SelectRangeContextValue, SelectRangeContext, SelectRangeProvider, SelectRangeProviderInternal, useSelectRange, SelectSingleContextValue, SelectSingleContext, SelectSingleProvider, SelectSingleProviderInternal, useSelectSingle, DaySelectionMode, DayPickerBase, CustomComponents, DayPickerDefaultProps, isDayPickerDefault, DayPickerMultipleProps, isDayPickerMultiple, DayPickerRangeProps, isDayPickerRange, DayPickerSingleProps, isDayPickerSingle, DayClickEventHandler, DayFocusEventHandler, DayKeyboardEventHandler, DayMouseEventHandler, DayPointerEventHandler, MonthChangeEventHandler, SelectMultipleEventHandler, SelectRangeEventHandler, SelectSingleEventHandler, WeekNumberClickEventHandler, DayTouchEventHandler, DateFormatter, Formatters, WeekNumberFormatter, Labels, DayLabel, NavButtonLabel, WeekdayLabel, WeekNumberLabel, Matcher, DateAfter, DateBefore, DateInterval, DateRange, DayOfWeek, isDateInterval, isDateRange, isDateAfterType, isDateBeforeType, isDayOfWeekType, Modifier, Modifiers, InternalModifier, InternalModifiers, ActiveModifiers, ModifiersStyles, ModifiersClassNames, DayModifiers, CustomModifiers, StyledElement, InternalModifiersElement, ClassNames, Styles, StyledComponent, isMatch, addToRange };
export { ActiveModifiers, Button, ButtonProps, Caption, CaptionDropdowns, CaptionLabel, CaptionLabelProps, CaptionLayout, CaptionNavigation, CaptionProps, ClassNames, CustomComponents, CustomModifiers, DateAfter, DateBefore, DateFormatter, DateInterval, DateRange, Day, DayClickEventHandler, DayContent, DayContentProps, DayFocusEventHandler, DayKeyboardEventHandler, DayLabel, DayModifiers, DayMouseEventHandler, DayOfWeek, DayPicker, DayPickerBase, DayPickerContext, DayPickerContextValue, DayPickerDefaultProps, DayPickerMultipleProps, DayPickerProps, DayPickerProvider, DayPickerProviderProps, DayPickerRangeProps, DayPickerSingleProps, DayPointerEventHandler, DayProps, DayRender, DaySelectionMode, DayTouchEventHandler, Dropdown, DropdownProps, FocusContext, FocusContextValue, FocusProvider, Footer, Formatters, Head, HeadRow, IconDropdown, IconLeft, IconRight, InputDayPickerProps, InputHTMLAttributes, InternalModifier, InternalModifiers, InternalModifiersElement, Labels, Matcher, Modifier, Modifiers, ModifiersClassNames, ModifiersStyles, MonthChangeEventHandler, NavButtonLabel, NavigationContext, NavigationContextValue, NavigationProvider, RootContext, RootProvider, Row, RowProps, SelectMultipleContext, SelectMultipleContextValue, SelectMultipleEventHandler, SelectMultipleModifiers, SelectMultipleProvider, SelectMultipleProviderInternal, SelectMultipleProviderProps, SelectRangeContext, SelectRangeContextValue, SelectRangeEventHandler, SelectRangeModifiers, SelectRangeProvider, SelectRangeProviderInternal, SelectSingleContext, SelectSingleContextValue, SelectSingleEventHandler, SelectSingleProvider, SelectSingleProviderInternal, StyledComponent, StyledElement, Styles, UseInputOptions, UseInputValue, WeekNumber, WeekNumberClickEventHandler, WeekNumberFormatter, WeekNumberLabel, WeekNumberProps, WeekdayLabel, addToRange, isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType, isDayPickerDefault, isDayPickerMultiple, isDayPickerRange, isDayPickerSingle, isMatch, useActiveModifiers, useDayPicker, useDayRender, useFocusContext, useInput, useNavigation, useSelectMultiple, useSelectRange, useSelectSingle };
declare const styles: {
readonly rdp: string;
readonly 'rdp-vhidden': string;
readonly 'rdp-button_reset': string;
readonly 'rdp-button': string;
readonly 'rdp-months': string;
readonly 'rdp-month': string;
readonly 'rdp-table': string;
readonly 'rdp-with_weeknumber': string;
readonly 'rdp-caption': string;
readonly 'rdp-multiple_months': string;
readonly 'rdp-caption_dropdowns': string;
readonly 'rdp-caption_label': string;
readonly 'rdp-nav': string;
readonly 'rdp-caption_start': string;
readonly 'rdp-caption_end': string;
readonly 'rdp-nav_button': string;
readonly 'rdp-dropdown_year': string;
readonly 'rdp-dropdown_month': string;
readonly 'rdp-dropdown': string;
readonly 'rdp-dropdown_icon': string;
readonly 'rdp-head': string;
readonly 'rdp-head_row': string;
readonly 'rdp-row': string;
readonly 'rdp-head_cell': string;
readonly 'rdp-tbody': string;
readonly 'rdp-tfoot': string;
readonly 'rdp-cell': string;
readonly 'rdp-weeknumber': string;
readonly 'rdp-day': string;
readonly 'rdp-day_today': string;
readonly 'rdp-day_outside': string;
readonly 'rdp-day_selected': string;
readonly 'rdp-day_range_start': string;
readonly 'rdp-day_range_end': string;
readonly 'rdp-day_range_middle': string;
};
export = styles;
'rdp': string
'rdp-vhidden': string
'rdp-button_reset': string
'rdp-button': string
'rdp-day_selected': string
'rdp-months': string
'rdp-month': string
'rdp-table': string
'rdp-with_weeknumber': string
'rdp-caption': string
'rdp-multiple_months': string
'rdp-caption_dropdowns': string
'rdp-caption_label': string
'rdp-nav': string
'rdp-caption_start': string
'rdp-caption_end': string
'rdp-nav_button': string
'rdp-dropdown_year': string
'rdp-dropdown_month': string
'rdp-dropdown': string
'rdp-dropdown_icon': string
'rdp-head': string
'rdp-head_row': string
'rdp-row': string
'rdp-head_cell': string
'rdp-tbody': string
'rdp-tfoot': string
'rdp-cell': string
'rdp-weeknumber': string
'rdp-day': string
'rdp-day_today': string
'rdp-day_outside': string
'rdp-day_range_start': string
'rdp-day_range_end': string
'rdp-day_range_middle': string
}
export default styles
declare const styles: {
readonly 'root': string;
readonly 'vhidden': string;
readonly 'button_reset': string;
readonly 'button': string;
readonly 'months': string;
readonly 'month': string;
readonly 'table': string;
readonly 'with_weeknumber': string;
readonly 'caption': string;
readonly 'multiple_months': string;
readonly 'caption_dropdowns': string;
readonly 'caption_label': string;
readonly 'nav': string;
readonly 'caption_start': string;
readonly 'caption_end': string;
readonly 'nav_button': string;
readonly 'dropdown_year': string;
readonly 'dropdown_month': string;
readonly 'dropdown': string;
readonly 'dropdown_icon': string;
readonly 'head': string;
readonly 'head_row': string;
readonly 'row': string;
readonly 'head_cell': string;
readonly 'tbody': string;
readonly 'tfoot': string;
readonly 'cell': string;
readonly 'weeknumber': string;
readonly 'day': string;
readonly 'day_today': string;
readonly 'day_outside': string;
readonly 'day_selected': string;
readonly 'day_range_start': string;
readonly 'day_range_end': string;
readonly 'day_range_middle': string;
};
export = styles;
'root': string
'vhidden': string
'button_reset': string
'button': string
'day_selected': string
'months': string
'month': string
'table': string
'with_weeknumber': string
'caption': string
'multiple_months': string
'caption_dropdowns': string
'caption_label': string
'nav': string
'caption_start': string
'caption_end': string
'nav_button': string
'dropdown_year': string
'dropdown_month': string
'dropdown': string
'dropdown_icon': string
'head': string
'head_row': string
'row': string
'head_cell': string
'tbody': string
'tfoot': string
'cell': string
'weeknumber': string
'day': string
'day_today': string
'day_outside': string
'day_range_start': string
'day_range_end': string
'day_range_middle': string
}
export default styles
{
"name": "react-day-picker",
"version": "8.4.1",
"version": "8.5.0",
"description": "Customizable Date Picker for React",

@@ -17,3 +17,3 @@ "author": "Giampaolo Bellavite <io@gpbl.dev>",

"module": "dist/index.esm.js",
"unpkg": "dist/react-day-picker.min.js",
"unpkg": "dist/index.min.js",
"types": "dist/index.d.ts",

@@ -23,5 +23,4 @@ "style": "dist/style.css",

"prepublish": "yarn run build",
"build": "rimraf dist && rollup -c --bundleConfigAsCjs",
"build-watch": "rollup -c -w --bundleConfigAsCjs",
"css-types": "yarn tcm -p src/style.css",
"build": "rimraf dist && rollup -c",
"build-watch": "rollup -c -w",
"lint": "eslint --ext .ts,.tsx src",

@@ -31,3 +30,3 @@ "test": "jest",

"typecheck": "tsc --project ./tsconfig.json --noEmit",
"typecheck-watch": "tsc --project ./tsconfig.json --noEmit --skipLibCheck --watch"
"typecheck-watch": "tsc --project ./tsconfig.json --noEmit --watch"
},

@@ -40,22 +39,22 @@ "files": [

"devDependencies": {
"@rollup/plugin-alias": "^4.0.2",
"@rollup/plugin-commonjs": "^23.0.5",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.3.0",
"@rollup/plugin-typescript": "^11.0.0",
"@testing-library/dom": "^8.20.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.11.16",
"@types/react": "^17.0.52",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"browserlist": "^1.0.1",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.2.5",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"date-fns": "^2.29.3",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-rdp": "workspace:^",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.7",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",

@@ -65,18 +64,21 @@ "eslint-plugin-react-hooks": "^4.6.0",

"jest-environment-jsdom": "^29.3.1",
"prettier": "^2.8.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"rollup": "^3.7.5",
"postcss": "^8.4.21",
"postcss-d-ts": "^1.2.0",
"postcss-typescript-d-ts": "^1.0.0",
"prettier": "^2.8.2",
"react": "^18.2.0",
"react-classnaming": "^0.16.4",
"react-dom": "^18.2.0",
"rimraf": "^4.1.1",
"rollup": "^3.10.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-dts": "^5.1.1",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.0.2",
"timekeeper": "^2.2.0",
"ts-jest": "^29.0.3",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"tsc-alias": "^1.8.2",
"tslib": "^2.4.1",
"typed-css-modules": "^0.7.2",
"typescript": "~4.7.4"
"typescript": "~4.9.4"
},

@@ -83,0 +85,0 @@ "peerDependencies": {

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

import es from 'date-fns/locale/es';
import { es } from 'date-fns/locale';

@@ -3,0 +3,0 @@ import { freezeBeforeAll } from 'test/utils';

@@ -1,7 +0,3 @@

import addDays from 'date-fns/addDays';
import startOfISOWeek from 'date-fns/startOfISOWeek';
import startOfWeek from 'date-fns/startOfWeek';
import { addDays, Locale, startOfISOWeek, startOfWeek } from 'date-fns';
import type { Locale } from 'date-fns';
/**

@@ -8,0 +4,0 @@ * Generate a series of 7 days, starting from the week, to use for formatting

@@ -1,12 +0,13 @@

import type { Locale } from 'date-fns';
import {
addDays,
differenceInCalendarDays,
endOfISOWeek,
endOfWeek,
getISOWeek,
getWeek,
Locale,
startOfISOWeek,
startOfWeek
} from 'date-fns';
import addDays from 'date-fns/addDays';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import endOfISOWeek from 'date-fns/endOfISOWeek';
import endOfWeek from 'date-fns/endOfWeek';
import getISOWeek from 'date-fns/getISOWeek';
import getWeek from 'date-fns/getWeek';
import startOfISOWeek from 'date-fns/startOfISOWeek';
import startOfWeek from 'date-fns/startOfWeek';
import { MonthWeek } from './getMonthWeeks';

@@ -13,0 +14,0 @@

@@ -1,8 +0,9 @@

import type { Locale } from 'date-fns';
import {
addWeeks,
endOfMonth,
getWeeksInMonth,
Locale,
startOfMonth
} from 'date-fns';
import addWeeks from 'date-fns/addWeeks';
import endOfMonth from 'date-fns/endOfMonth';
import getWeeksInMonth from 'date-fns/getWeeksInMonth';
import startOfMonth from 'date-fns/startOfMonth';
import { daysToMonthWeeks } from './daysToMonthWeeks';

@@ -9,0 +10,0 @@

@@ -1,6 +0,7 @@

import { RenderResult } from '@testing-library/react-hooks';
import es from 'date-fns/locale/es';
/* eslint-disable testing-library/render-result-naming-convention */
import { es } from 'date-fns/locale';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';

@@ -25,40 +26,20 @@

let renderResult: RenderResult<DayPickerContextValue>;
function setup(dayPickerProps?: DayPickerProps) {
const { result } = customRenderHook(() => useDayPicker(), dayPickerProps);
renderResult = result;
function renderHook(props?: DayPickerProps) {
return renderDayPickerHook<DayPickerContextValue>(useDayPicker, props);
}
describe('when rendered without props', () => {
const testPropNames: DefaultContextProps[] = [
'captionLayout',
'classNames',
'formatters',
'labels',
'locale',
'modifiersClassNames',
'modifiers',
'numberOfMonths',
'styles'
// 'today' // SKIPPED: this test doesn't pass
];
beforeAll(() => {
setup();
});
const testPropNames = Object.keys(defaults).filter(
(key) => key !== 'today'
) as DefaultContextProps[];
test.each(testPropNames)('should use the %s default value', (propName) => {
expect(renderResult.current[propName]).toEqual(defaults[propName]);
const result = renderHook();
expect(result.current[propName]).toEqual(defaults[propName]);
});
});
describe('when passing "locale" from props', () => {
const locale = es;
const dayPickerProps: DayPickerProps = { locale };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default locale', () => {
expect(renderResult.current.locale).not.toBe(defaults.locale);
});
test('should return the custom locale', () => {
expect(renderResult.current.locale).toBe(locale);
const result = renderHook({ locale });
expect(result.current.locale).toBe(locale);
});

@@ -69,13 +50,5 @@ });

const numberOfMonths = 4;
const dayPickerProps: DayPickerProps = { numberOfMonths };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default numberOfMonths', () => {
expect(renderResult.current.numberOfMonths).not.toBe(
defaults.numberOfMonths
);
});
test('should return the custom numberOfMonths', () => {
expect(renderResult.current.numberOfMonths).toBe(4);
const result = renderHook({ numberOfMonths });
expect(result.current.numberOfMonths).toBe(4);
});

@@ -86,11 +59,5 @@ });

const today = new Date(2010, 9, 11);
const dayPickerProps: DayPickerProps = { today };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "today"', () => {
expect(renderResult.current.today).not.toBe(defaults.today);
});
test('should return the custom "today"', () => {
expect(renderResult.current.today).toBe(today);
const result = renderHook({ today });
expect(result.current.today).toBe(today);
});

@@ -104,10 +71,5 @@ });

const dayPickerProps: DayPickerProps = { captionLayout, fromYear, toYear };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "captionLayout"', () => {
expect(renderResult.current.captionLayout).not.toBe(defaults.captionLayout);
});
test('should return the custom "captionLayout"', () => {
expect(renderResult.current.captionLayout).toBe(captionLayout);
const result = renderHook(dayPickerProps);
expect(result.current.captionLayout).toBe(captionLayout);
});

@@ -119,10 +81,11 @@ });

const toDate = undefined;
describe('when using "dropdown" as "captionLayout"', () => {
const captionLayout: CaptionLayout = 'dropdown';
beforeEach(() => {
setup({ fromDate, toDate, captionLayout });
});
test('should return "buttons" as "captionLayout"', () => {
expect(renderResult.current.captionLayout).toBe('buttons');
const result = renderHook({
fromDate,
toDate,
captionLayout
});
expect(result.current.captionLayout).toBe('buttons');
});

@@ -138,7 +101,9 @@ });

const captionLayout: CaptionLayout = 'dropdown';
beforeEach(() => {
setup({ fromDate, toDate, captionLayout });
});
test('should return "buttons" as "captionLayout"', () => {
expect(renderResult.current.captionLayout).toBe('buttons');
const result = renderHook({
fromDate,
toDate,
captionLayout
});
expect(result.current.captionLayout).toBe('buttons');
});

@@ -154,7 +119,9 @@ });

const captionLayout: CaptionLayout = 'dropdown';
beforeEach(() => {
setup({ fromDate, toDate, captionLayout });
});
test('should return "buttons" as "captionLayout"', () => {
expect(renderResult.current.captionLayout).toBe('buttons');
const result = renderHook({
fromDate,
toDate,
captionLayout
});
expect(result.current.captionLayout).toBe('buttons');
});

@@ -168,11 +135,5 @@ });

const toYear = 2010;
const dayPickerProps: DayPickerProps = { captionLayout, fromYear, toYear };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "captionLayout"', () => {
expect(renderResult.current.captionLayout).not.toBe(defaults.captionLayout);
});
test('should return the custom "captionLayout"', () => {
expect(renderResult.current.captionLayout).toBe(captionLayout);
const result = renderHook({ captionLayout, fromYear, toYear });
expect(result.current.captionLayout).toBe(captionLayout);
});

@@ -183,11 +144,5 @@ });

const modifiers: DayModifiers = { foo: new Date() };
const dayPickerProps: DayPickerProps = { modifiers };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "modifiers"', () => {
expect(renderResult.current.modifiers).not.toBe(defaults.modifiers);
});
test('should return the custom "modifiers"', () => {
expect(renderResult.current.modifiers).toStrictEqual(modifiers);
const result = renderHook({ modifiers });
expect(result.current.modifiers).toStrictEqual(modifiers);
});

@@ -198,13 +153,5 @@ });

const modifiersClassNames: ModifiersClassNames = { foo: 'bar' };
const dayPickerProps: DayPickerProps = { modifiersClassNames };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "modifiersClassNames"', () => {
expect(renderResult.current.modifiersClassNames).not.toBe(
defaults.modifiersClassNames
);
});
test('should return the custom "modifiersClassNames"', () => {
expect(renderResult.current.modifiersClassNames).toStrictEqual(
const result = renderHook({ modifiersClassNames });
expect(result.current.modifiersClassNames).toStrictEqual(
modifiersClassNames

@@ -217,11 +164,5 @@ );

const styles: Styles = { caption: { color: 'red ' } };
const dayPickerProps: DayPickerProps = { styles };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "styles"', () => {
expect(renderResult.current.styles).not.toBe(defaults.styles);
});
test('should include the custom "styles"', () => {
expect(renderResult.current.styles).toStrictEqual({
const result = renderHook({ styles });
expect(result.current.styles).toStrictEqual({
...defaults.styles,

@@ -235,11 +176,5 @@ ...styles

const classNames: ClassNames = { caption: 'foo' };
const dayPickerProps: DayPickerProps = { classNames };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "classNames"', () => {
expect(renderResult.current.classNames).not.toBe(defaults.classNames);
});
test('should include the custom "classNames"', () => {
expect(renderResult.current.classNames).toStrictEqual({
const result = renderHook({ classNames });
expect(result.current.classNames).toStrictEqual({
...defaults.classNames,

@@ -253,11 +188,5 @@ ...classNames

const formatters: Partial<Formatters> = { formatCaption: jest.fn() };
const dayPickerProps: DayPickerProps = { formatters };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "formatters"', () => {
expect(renderResult.current.formatters).not.toBe(defaults.formatters);
});
test('should include the custom "formatters"', () => {
expect(renderResult.current.formatters).toStrictEqual({
const result = renderHook({ formatters });
expect(result.current.formatters).toStrictEqual({
...defaults.formatters,

@@ -271,11 +200,5 @@ ...formatters

const labels: Partial<Labels> = { labelDay: jest.fn() };
const dayPickerProps: DayPickerProps = { labels };
beforeEach(() => {
setup(dayPickerProps);
});
test('should override the default "labels"', () => {
expect(renderResult.current.labels).not.toBe(defaults.labels);
});
test('should include the custom "labels"', () => {
expect(renderResult.current.labels).toStrictEqual({
const result = renderHook({ labels });
expect(result.current.labels).toStrictEqual({
...defaults.labels,

@@ -288,8 +211,5 @@ ...labels

describe('when passing an "id" from props', () => {
const dayPickerProps: DayPickerProps = { id: 'foo' };
beforeEach(() => {
setup(dayPickerProps);
});
test('should return the id', () => {
expect(renderResult.current.id).toBe('foo');
const result = renderHook({ id: 'foo' });
expect(result.current.id).toBe('foo');
});

@@ -301,9 +221,6 @@ });

const onSelect = jest.fn();
const dayPickerProps: DayPickerProps = { mode, onSelect };
beforeEach(() => {
setup(dayPickerProps);
});
test('should return the "onSelect" event handler', () => {
expect(renderResult.current.onSelect).toBe(onSelect);
const result = renderHook({ mode, onSelect });
expect(result.current.onSelect).toBe(onSelect);
});
});

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

import enUS from 'date-fns/locale/en-US';
import { enUS } from 'date-fns/locale';

@@ -3,0 +3,0 @@ import { CaptionLayout } from 'components/Caption';

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

import es from 'date-fns/locale/es';
import { es } from 'date-fns/locale';

@@ -3,0 +3,0 @@ import { formatCaption } from './formatCaption';

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

import type { Locale } from 'date-fns';
import format from 'date-fns/format';
import { format, Locale } from 'date-fns';

@@ -4,0 +3,0 @@ /**

import type { Locale } from 'date-fns';
import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -4,0 +4,0 @@ /**

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

import es from 'date-fns/locale/es';
import { es } from 'date-fns/locale';

@@ -3,0 +3,0 @@ import { formatMonthCaption } from './formatMonthCaption';

import type { Locale } from 'date-fns';
import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -4,0 +4,0 @@ /**

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

import es from 'date-fns/locale/es';
import { es } from 'date-fns/locale';

@@ -8,3 +8,3 @@ import { formatWeekdayName } from './formatWeekdayName';

test('should return the formatted weekday name', () => {
expect(formatWeekdayName(date)).toEqual('Mo');
expect(formatWeekdayName(date)).toEqual('MO');
});

@@ -14,4 +14,4 @@

test('should format using the locale', () => {
expect(formatWeekdayName(date, { locale: es })).toEqual('lu');
expect(formatWeekdayName(date, { locale: es })).toEqual('LU');
});
});
import type { Locale } from 'date-fns';
import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -11,3 +11,3 @@ /**

): string {
return format(weekday, 'cccccc', options);
return format(weekday, 'cccccc', options).toUpperCase();
}

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

import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -3,0 +3,0 @@ /**

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

import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -3,0 +3,0 @@ import { DayLabel } from 'types/Labels';

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

import es from 'date-fns/locale/es';
import { es } from 'date-fns/locale';

@@ -3,0 +3,0 @@ import { labelWeekday } from './labelWeekday';

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

import format from 'date-fns/format';
import { format } from 'date-fns';

@@ -3,0 +3,0 @@ import { WeekdayLabel } from 'types/Labels';

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

import endOfMonth from 'date-fns/endOfMonth';
import startOfDay from 'date-fns/startOfDay';
import startOfMonth from 'date-fns/startOfMonth';
import { endOfMonth, startOfDay, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ import { DayPickerBase } from 'types/DayPickerBase';

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

import { act, RenderResult } from '@testing-library/react-hooks';
import { act } from '@testing-library/react';
import {

@@ -11,3 +11,3 @@ addDays,

import { customRenderHook } from 'test/render';
import { renderDayPickerHook, RenderHookResult } from 'test/render';
import { freezeBeforeAll } from 'test/utils';

@@ -17,10 +17,7 @@

let renderResult: RenderResult<FocusContextValue>;
const today = new Date(2021, 11, 8); // make sure is in the middle of the week for the complete test
freezeBeforeAll(today);
function setup() {
const { result } = customRenderHook(() => useFocusContext());
renderResult = result;
function renderHook() {
return renderDayPickerHook<FocusContextValue>(useFocusContext);
}

@@ -40,8 +37,5 @@

beforeEach(() => {
setup();
});
test('`focusedDay` should be undefined', () => {
expect(renderResult.current.focusedDay).toBeUndefined();
const result = renderHook();
expect(result.current.focusedDay).toBeUndefined();
});

@@ -62,7 +56,6 @@

describe.each(tests)('when calling %s', (fn: HookFunction) => {
beforeEach(() => {
renderResult.current[fn];
});
test('`focusedDay` should be undefined', () => {
expect(renderResult.current.focusedDay).toBeUndefined();
const result = renderHook();
result.current[fn];
expect(result.current.focusedDay).toBeUndefined();
});

@@ -73,15 +66,15 @@ });

const day = today;
let result: RenderHookResult<FocusContextValue>;
beforeEach(() => {
act(() => renderResult.current.focus(day));
result = renderHook();
act(() => result.current.focus(day));
});
test('should set the focused day', () => {
expect(renderResult.current.focusedDay).toEqual(day);
expect(result.current.focusedDay).toEqual(day);
});
describe('when "focusDayBefore" is called', () => {
const dayBefore = addDays(day, -1);
beforeEach(() => {
act(() => renderResult.current.focusDayBefore());
});
beforeEach(() => act(() => result.current.focusDayBefore()));
test('should focus the day before', () => {
expect(renderResult.current.focusedDay).toEqual(dayBefore);
expect(result.current.focusedDay).toEqual(dayBefore);
});

@@ -91,8 +84,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusDayAfter" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusDayAfter());
});
beforeEach(() => act(() => result.current.focusDayAfter()));
test('should focus the day after', () => {
const dayAfter = addDays(day, 1);
expect(renderResult.current.focusedDay).toEqual(dayAfter);
expect(result.current.focusedDay).toEqual(dayAfter);
});

@@ -102,8 +93,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusWeekBefore" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusWeekBefore());
});
beforeEach(() => act(() => result.current.focusWeekBefore()));
test('should focus the day in the previous week', () => {
const prevWeek = addWeeks(day, -1);
expect(renderResult.current.focusedDay).toEqual(prevWeek);
expect(result.current.focusedDay).toEqual(prevWeek);
});

@@ -113,8 +102,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusWeekAfter" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusWeekAfter());
});
beforeEach(() => act(() => result.current.focusWeekAfter()));
test('should focus the day in the next week', () => {
const nextWeek = addWeeks(day, 1);
expect(renderResult.current.focusedDay).toEqual(nextWeek);
expect(result.current.focusedDay).toEqual(nextWeek);
});

@@ -124,8 +111,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusStartOfWeek" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusStartOfWeek());
});
beforeEach(() => act(() => result.current.focusStartOfWeek()));
test('should focus the first day of the week', () => {
const firstDayOfWeek = startOfWeek(day);
expect(renderResult.current.focusedDay).toEqual(firstDayOfWeek);
expect(result.current.focusedDay).toEqual(firstDayOfWeek);
});

@@ -135,8 +120,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusEndOfWeek" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusEndOfWeek());
});
beforeEach(() => act(() => result.current.focusEndOfWeek()));
test('should focus the last day of the week', () => {
const lastDayOfWeek = endOfWeek(day);
expect(renderResult.current.focusedDay).toEqual(lastDayOfWeek);
expect(result.current.focusedDay).toEqual(lastDayOfWeek);
});

@@ -146,8 +129,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusMonthBefore" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusMonthBefore());
});
beforeEach(() => act(() => result.current.focusMonthBefore()));
test('should focus the day in the month before', () => {
const monthBefore = addMonths(day, -1);
expect(renderResult.current.focusedDay).toEqual(monthBefore);
expect(result.current.focusedDay).toEqual(monthBefore);
});

@@ -157,8 +138,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusMonthAfter" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusMonthAfter());
});
beforeEach(() => act(() => result.current.focusMonthAfter()));
test('should focus the day in the month after', () => {
const monthAfter = addMonths(day, 1);
expect(renderResult.current.focusedDay).toEqual(monthAfter);
expect(result.current.focusedDay).toEqual(monthAfter);
});

@@ -168,8 +147,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusYearBefore" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusYearBefore());
});
beforeEach(() => act(() => result.current.focusYearBefore()));
test('should focus the day in the year before', () => {
const prevYear = addYears(day, -1);
expect(renderResult.current.focusedDay).toEqual(prevYear);
expect(result.current.focusedDay).toEqual(prevYear);
});

@@ -179,8 +156,6 @@ test.todo('should call the navigation goToDate');

describe('when "focusYearAfter" is called', () => {
beforeEach(() => {
act(() => renderResult.current.focusYearAfter());
});
beforeEach(() => act(() => result.current.focusYearAfter()));
test('should focus the day in the year after', () => {
const nextYear = addYears(day, 1);
expect(renderResult.current.focusedDay).toEqual(nextYear);
expect(result.current.focusedDay).toEqual(nextYear);
});

@@ -190,9 +165,7 @@ test.todo('should call the navigation goToDate');

describe('when blur is called', () => {
beforeEach(() => {
act(() => renderResult.current.blur());
});
beforeEach(() => act(() => result.current.blur()));
test('`focusedDay` should be undefined', () => {
expect(renderResult.current.focusedDay).toBeUndefined();
expect(result.current.focusedDay).toBeUndefined();
});
});
});

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

import addDays from 'date-fns/addDays';
import endOfMonth from 'date-fns/endOfMonth';
import startOfMonth from 'date-fns/startOfMonth';
import { addDays, endOfMonth, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ import { getActiveModifiers } from 'contexts/Modifiers';

@@ -1,11 +0,13 @@

import addDays from 'date-fns/addDays';
import addMonths from 'date-fns/addMonths';
import addWeeks from 'date-fns/addWeeks';
import addYears from 'date-fns/addYears';
import endOfISOWeek from 'date-fns/endOfISOWeek';
import endOfWeek from 'date-fns/endOfWeek';
import max from 'date-fns/max';
import min from 'date-fns/min';
import startOfISOWeek from 'date-fns/startOfISOWeek';
import startOfWeek from 'date-fns/startOfWeek';
import {
addDays,
addMonths,
addWeeks,
addYears,
endOfISOWeek,
endOfWeek,
max,
min,
startOfISOWeek,
startOfWeek
} from 'date-fns';

@@ -12,0 +14,0 @@ import { DayPickerContextValue } from 'contexts/DayPicker';

@@ -1,5 +0,4 @@

import { RenderResult } from '@testing-library/react-hooks';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render';
import { renderDayPickerHook } from 'test/render';

@@ -9,11 +8,8 @@ import { useModifiers } from 'contexts/Modifiers';

let renderResult: RenderResult<Modifiers>;
const internalModifiers = Object.values(InternalModifier);
function setup(dayPickerProps: DayPickerProps) {
const { result } = customRenderHook(() => useModifiers(), dayPickerProps);
renderResult = result;
function renderHook(dayPickerProps: Partial<DayPickerProps> = {}) {
return renderDayPickerHook<Modifiers>(useModifiers, dayPickerProps);
}
const internalModifiers = Object.values(InternalModifier);
describe('when rendered with custom modifiers', () => {

@@ -32,8 +28,5 @@ const modifier = new Date(2018, 11, 12);

};
beforeEach(() => {
setup({ modifiers: dayModifiers });
});
test('should return the custom modifiers', () => {
expect(renderResult.current.foo).toEqual([dayModifiers.foo]);
const result = renderHook({ modifiers: dayModifiers });
expect(result.current.foo).toEqual([dayModifiers.foo]);
});

@@ -43,3 +36,4 @@ test.each(internalModifiers)(

(internalModifier) => {
expect(renderResult.current[internalModifier]).toEqual([
const result = renderHook({ modifiers: dayModifiers });
expect(result.current[internalModifier]).toEqual([
dayModifiers[internalModifier]

@@ -46,0 +40,0 @@ ]);

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

import isSameMonth from 'date-fns/isSameMonth';
import { isSameMonth } from 'date-fns';

@@ -3,0 +3,0 @@ import { ActiveModifiers, Modifiers } from 'types/Modifiers';

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

import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import isSameDay from 'date-fns/isSameDay';
import { differenceInCalendarDays, isSameDay } from 'date-fns';

@@ -4,0 +3,0 @@ import { DateRange } from 'types/Matchers';

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

import { isAfter } from 'date-fns';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import isDate from 'date-fns/isDate';
import isSameDay from 'date-fns/isSameDay';
import { differenceInCalendarDays, isAfter, isDate, isSameDay } from 'date-fns';

@@ -6,0 +3,0 @@ import {

@@ -1,9 +0,8 @@

import { act, RenderResult } from '@testing-library/react-hooks';
import { act } from '@testing-library/react';
import { addMonths, startOfMonth, subMonths } from 'date-fns';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render/customRenderHook';
import { renderDayPickerHook, RenderHookResult } from 'test/render';
import { freezeBeforeAll } from 'test/utils';
import { DayPickerBase } from 'types/DayPickerBase';
import { NavigationContextValue, useNavigation } from './NavigationContext';

@@ -15,13 +14,10 @@

let result: RenderResult<NavigationContextValue>;
function setup(dayPickerProps?: DayPickerBase) {
const view = customRenderHook(() => useNavigation(), dayPickerProps);
result = view.result;
return result;
function renderHook(props: Partial<DayPickerProps> = {}) {
return renderDayPickerHook<NavigationContextValue>(useNavigation, props);
}
let result: RenderHookResult<NavigationContextValue>;
describe('when rendered', () => {
beforeEach(() => {
setup();
result = renderHook();
});

@@ -43,5 +39,4 @@ test('the current month should be the today`s month', () => {

beforeEach(() => {
act(() => {
result.current.goToMonth(newMonth);
});
result = renderHook();
act(() => result.current.goToMonth(newMonth));
});

@@ -65,3 +60,3 @@ test('should go to the specified month', () => {

beforeEach(() => {
setup({ onMonthChange });
result = renderHook({ onMonthChange });
act(() => result.current.goToDate(newDate));

@@ -92,3 +87,3 @@ });

beforeEach(() => {
setup({ numberOfMonths: 2 });
result = renderHook({ numberOfMonths: 2 });
});

@@ -114,3 +109,3 @@ test('the current month should be the today`s month', () => {

beforeEach(() => {
setup({ numberOfMonths, pagedNavigation: true });
result = renderHook({ numberOfMonths, pagedNavigation: true });
});

@@ -117,0 +112,0 @@ test('the current month should be the today`s month', () => {

@@ -1,20 +0,15 @@

import { act } from '@testing-library/react-hooks';
import { act } from '@testing-library/react';
import { addMonths, startOfMonth } from 'date-fns';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render/customRenderHook';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';
import { DayPickerBase } from 'types/DayPickerBase';
import { NavigationState, useNavigationState } from './useNavigationState';
import { useNavigationState } from './useNavigationState';
const today = new Date(2021, 11, 8);
freezeBeforeAll(today);
function setup(dayPickerProps?: DayPickerBase) {
const { result } = customRenderHook(
() => useNavigationState(),
dayPickerProps
);
return result;
function renderHook(props: Partial<DayPickerProps> = {}) {
return renderDayPickerHook<NavigationState>(useNavigationState, props);
}

@@ -25,7 +20,5 @@

const onMonthChange = jest.fn();
const result = setup({ onMonthChange });
const result = renderHook({ onMonthChange });
const month = addMonths(today, 2);
act(() => {
result.current[1](month);
});
act(() => result.current[1](month));
expect(result.current[0]).toEqual(startOfMonth(month));

@@ -37,3 +30,3 @@ expect(onMonthChange).toHaveBeenCalledWith(startOfMonth(month));

const onMonthChange = jest.fn();
const result = setup({ disableNavigation: true, onMonthChange });
const result = renderHook({ disableNavigation: true, onMonthChange });
const month = addMonths(today, 2);

@@ -40,0 +33,0 @@ result.current[1](month);

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

import startOfMonth from 'date-fns/startOfMonth';
import { startOfMonth } from 'date-fns';

@@ -8,4 +8,3 @@ import { useDayPicker } from 'contexts/DayPicker';

/** Controls the navigation state. */
export function useNavigationState(): [
export type NavigationState = [
/** The month DayPicker is navigating at */

@@ -15,3 +14,6 @@ month: Date,

goToMonth: (month: Date) => void
] {
];
/** Controls the navigation state. */
export function useNavigationState(): NavigationState {
const context = useDayPicker();

@@ -18,0 +20,0 @@ const initialMonth = getInitialMonth(context);

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

import addMonths from 'date-fns/addMonths';
import differenceInCalendarMonths from 'date-fns/differenceInCalendarMonths';
import startOfMonth from 'date-fns/startOfMonth';
import { addMonths, differenceInCalendarMonths, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ /**

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

import addMonths from 'date-fns/addMonths';
import differenceInCalendarMonths from 'date-fns/differenceInCalendarMonths';
import startOfMonth from 'date-fns/startOfMonth';
import { addMonths, differenceInCalendarMonths, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ import { DayPickerContextValue } from 'contexts/DayPicker';

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

import addMonths from 'date-fns/addMonths';
import differenceInCalendarMonths from 'date-fns/differenceInCalendarMonths';
import startOfMonth from 'date-fns/startOfMonth';
import { addMonths, differenceInCalendarMonths, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ /**

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

import addMonths from 'date-fns/addMonths';
import differenceInCalendarMonths from 'date-fns/differenceInCalendarMonths';
import startOfMonth from 'date-fns/startOfMonth';
import { addMonths, differenceInCalendarMonths, startOfMonth } from 'date-fns';

@@ -5,0 +3,0 @@ /**

@@ -1,5 +0,5 @@

import { RenderResult } from '@testing-library/react-hooks';
import { addDays, addMonths } from 'date-fns';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render/customRenderHook';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';

@@ -19,13 +19,11 @@

let result: RenderResult<SelectMultipleContextValue>;
function setup(dayPickerProps?: DayPickerMultipleProps) {
const view = customRenderHook(useSelectMultiple, dayPickerProps);
result = view.result;
function renderHook(props?: Partial<DayPickerProps>) {
return renderDayPickerHook<SelectMultipleContextValue>(
useSelectMultiple,
props
);
}
describe('when is not a multiple select DayPicker', () => {
beforeAll(() => {
setup();
});
const result = renderHook();
test('the selected day should be undefined', () => {

@@ -56,6 +54,4 @@ expect(result.current.selected).toBeUndefined();

beforeAll(() => {
setup(dayPickerProps);
});
test('it should return the days as selected', () => {
const result = renderHook(dayPickerProps);
expect(result.current.selected).toStrictEqual(selected);

@@ -68,2 +64,3 @@ });

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(clickedDay, activeModifiers, event);

@@ -95,2 +92,3 @@ });

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(clickedDay, activeModifiers, event);

@@ -128,7 +126,4 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
test('the selected days should not be disabled', () => {
const result = renderHook(dayPickerProps);
const { disabled } = result.current.modifiers;

@@ -140,2 +135,3 @@ expect(isMatch(selectedDay1, disabled)).toBe(false);

test('the other days should be disabled', () => {
const result = renderHook(dayPickerProps);
const { disabled } = result.current.modifiers;

@@ -149,2 +145,3 @@ expect(isMatch(addMonths(selectedDay1, 1), disabled)).toBe(true);

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(clickedDay, activeModifiers, event);

@@ -176,5 +173,2 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
describe('when `onDayClick` is called with one of the selected days', () => {

@@ -184,2 +178,3 @@ const clickedDay = selected[0];

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(clickedDay, activeModifiers, event);

@@ -186,0 +181,0 @@ });

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

import { RenderResult } from '@testing-library/react-hooks';
import {

@@ -8,8 +7,8 @@ addDays,

} from 'date-fns';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render/customRenderHook';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';
import { isMatch } from 'contexts/Modifiers/utils/isMatch';
import { DayPickerBase } from 'types/DayPickerBase';
import { DayPickerRangeProps } from 'types/DayPickerRange';

@@ -23,13 +22,8 @@ import { ActiveModifiers } from 'types/Modifiers';

let result: RenderResult<SelectRangeContextValue>;
function setup(dayPickerProps?: DayPickerBase) {
const view = customRenderHook(useSelectRange, dayPickerProps);
result = view.result;
function renderHook(props?: Partial<DayPickerProps>) {
return renderDayPickerHook<SelectRangeContextValue>(useSelectRange, props);
}
describe('when is not a multiple select DayPicker', () => {
beforeAll(() => {
setup();
});
test('the selected day should be undefined', () => {
const result = renderHook();
expect(result.current.selected).toBeUndefined();

@@ -50,6 +44,4 @@ });

describe('when no days are selected', () => {
beforeAll(() => {
setup(initialProps);
});
test('the selected days should be undefined', () => {
const result = renderHook();
expect(result.current.selected).toBeUndefined();

@@ -61,2 +53,3 @@ });

beforeAll(() => {
const result = renderHook(initialProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -91,12 +84,12 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
test('should return the "range_start" modifiers with the "from" day', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_start).toEqual([from]);
});
test('should return the "range_end" modifiers with the "from" day', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_end).toEqual([from]);
});
test('should not return any "range_middle" modifiers', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_middle).toEqual([]);

@@ -112,12 +105,12 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
test('should return the "range_start" modifiers with the "from" day', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_start).toEqual([from]);
});
test('should return the "range_end" modifiers with the "to" day', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_end).toEqual([to]);
});
test('should return the "range_middle" range modifiers', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_middle).toEqual([

@@ -132,2 +125,3 @@ { after: from, before: to }

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -163,12 +157,12 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
test('should return the "range_start" modifier with the date', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_start).toEqual([date]);
});
test('should return the "range_end" modifier with the date', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_end).toEqual([date]);
});
test('should return an empty "range_middle"', () => {
const result = renderHook(dayPickerProps);
expect(result.current.modifiers.range_middle).toEqual([]);

@@ -187,6 +181,4 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
test('the days in the range should not be disabled', () => {
const result = renderHook(dayPickerProps);
const { disabled } = result.current.modifiers;

@@ -197,2 +189,3 @@ expect(isMatch(from, disabled)).toBe(false);

test('the other days should be disabled', () => {
const result = renderHook(dayPickerProps);
const { disabled } = result.current.modifiers;

@@ -206,2 +199,3 @@ expect(isMatch(addMonths(from, 1), disabled)).toBe(true);

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -229,5 +223,2 @@ });

};
beforeAll(() => {
setup(dayPickerProps);
});
describe('when "onDayClick" is called with a day before "from"', () => {

@@ -238,2 +229,3 @@ const day = subDays(from, 1);

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -257,2 +249,3 @@ });

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -285,2 +278,3 @@ });

beforeAll(() => {
const result = renderHook(dayPickerProps);
result.current.onDayClick?.(day, activeModifiers, stubEvent);

@@ -287,0 +281,0 @@ });

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

import isAfter from 'date-fns/isAfter';
import isBefore from 'date-fns/isBefore';
import isSameDay from 'date-fns/isSameDay';
import { isAfter, isBefore, isSameDay } from 'date-fns';

@@ -5,0 +3,0 @@ import { DateRange } from 'types/Matchers';

import React from 'react';
import { customRenderHook } from 'test/render/customRenderHook';
import { DayPickerProps } from 'DayPicker';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';
import { DayPickerBase } from 'types/DayPickerBase';
import { DayPickerSingleProps } from 'types/DayPickerSingle';
import { ActiveModifiers } from 'types/Modifiers';
import { useSelectSingle } from './SelectSingleContext';
import {
SelectSingleContextValue,
useSelectSingle
} from './SelectSingleContext';

@@ -15,10 +19,8 @@ const today = new Date(2021, 11, 8);

function setup(dayPickerProps?: DayPickerBase) {
const { result } = customRenderHook(() => useSelectSingle(), dayPickerProps);
return result;
function renderHook(props?: Partial<DayPickerProps>) {
return renderDayPickerHook<SelectSingleContextValue>(useSelectSingle, props);
}
describe('when is not a single select DayPicker', () => {
const result = setup();
test('the selected day should be undefined', () => {
const result = renderHook();
expect(result.current.selected).toBeUndefined();

@@ -34,3 +36,3 @@ });

};
const result = setup(dayPickerProps);
const result = renderHook(dayPickerProps);
expect(result.current.selected).toBe(today);

@@ -45,7 +47,7 @@ });

};
const result = setup(dayPickerProps);
const result = renderHook(dayPickerProps);
const activeModifiers = {};
const event = {} as React.MouseEvent;
result.current.onDayClick?.(today, activeModifiers, event);
test('should call the `onSelect` event handler', () => {
result.current.onDayClick?.(today, activeModifiers, event);
expect(dayPickerProps.onSelect).toHaveBeenCalledWith(

@@ -59,2 +61,3 @@ today,

test('should call the `onDayClick` event handler', () => {
result.current.onDayClick?.(today, activeModifiers, event);
expect(dayPickerProps.onDayClick).toHaveBeenCalledWith(

@@ -73,7 +76,7 @@ today,

};
const result = setup(dayPickerProps);
const activeModifiers: ActiveModifiers = { selected: true };
const event = {} as React.MouseEvent;
result.current.onDayClick?.(today, activeModifiers, event);
test('should call the `onSelect` event handler with an undefined day', () => {
const result = renderHook(dayPickerProps);
const activeModifiers: ActiveModifiers = { selected: true };
const event = {} as React.MouseEvent;
result.current.onDayClick?.(today, activeModifiers, event);
expect(dayPickerProps.onSelect).toHaveBeenCalledWith(

@@ -80,0 +83,0 @@ undefined,

import { act } from 'react-dom/test-utils';
import { renderHook, RenderHookResult } from '@testing-library/react-hooks';
import { renderDayPickerHook } from 'test/render';
import { DispatchStateAction, useControlledValue } from './useControlledValue';
import { useControlledValue } from './useControlledValue';
type RenderHookProps = {
defaultValue: string;
controlledValue: string | undefined;
};
function setup(defaultValue: string, controlledValue: string | undefined) {
return renderHook<RenderHookProps, [string, DispatchStateAction<string>]>(
(props) =>
useControlledValue<string>(props.defaultValue, props.controlledValue),
{
initialProps: { defaultValue, controlledValue }
}
function renderHook(defaultValue: string, controlledValue: string | undefined) {
return renderDayPickerHook(() =>
useControlledValue<string>(defaultValue, controlledValue)
);

@@ -25,19 +16,12 @@ }

const controlledValue = 'bar'; // now controlled
let hook: RenderHookResult<
RenderHookProps,
[string, DispatchStateAction<string>]
>;
beforeEach(() => {
hook = setup(defaultValue, controlledValue);
});
test('should return the controlled value', () => {
expect(hook.result.current[0]).toBe(controlledValue);
const result = renderHook(defaultValue, controlledValue);
expect(result.current[0]).toBe(controlledValue);
});
describe('when setting a new value', () => {
const newValue = 'taz';
beforeEach(() => {
act(() => hook.result.current[1](newValue));
});
test('should return the controlled value instead', () => {
expect(hook.result.current[0]).toBe(controlledValue);
const result = renderHook(defaultValue, controlledValue);
act(() => result.current[1](newValue));
expect(result.current[0]).toBe(controlledValue);
});

@@ -50,21 +34,14 @@ });

const controlledValue = undefined;
let hook: RenderHookResult<
RenderHookProps,
[string, DispatchStateAction<string>]
>;
beforeEach(() => {
hook = setup(defaultValue, controlledValue);
});
test('should return the value', () => {
expect(hook.result.current[0]).toBe(defaultValue);
const result = renderHook(defaultValue, controlledValue);
expect(result.current[0]).toBe(defaultValue);
});
describe('when setting a new value', () => {
const newValue = 'bar';
beforeEach(() => {
act(() => hook.result.current[1](newValue));
test('should return the new value', async () => {
const result = renderHook(defaultValue, controlledValue);
await act(() => result.current[1](newValue));
expect(result.current[0]).toBe(newValue);
});
test('should return the new value', () => {
expect(hook.result.current[0]).toBe(newValue);
});
});
});
import React, { useState } from 'react';
import differenceInCalendarDays from 'date-fns/differenceInCalendarDays';
import _format from 'date-fns/format';
import enUS from 'date-fns/locale/en-US';
import parse from 'date-fns/parse';
import { differenceInCalendarDays, format as _format, parse } from 'date-fns';
import { enUS } from 'date-fns/locale';

@@ -8,0 +6,0 @@ import { parseFromToProps } from 'contexts/DayPicker/utils';

@@ -1,42 +0,18 @@

import { RenderResult } from '@testing-library/react-hooks';
import { DayPickerProps } from 'DayPicker';
import { customRenderHook } from 'test/render';
import { mockedContexts } from 'test/mockedContexts';
import { renderDayPickerHook } from 'test/render';
import { freezeBeforeAll } from 'test/utils';
import { SelectMultipleContextValue } from 'contexts/SelectMultiple';
import { SelectRangeContextValue } from 'contexts/SelectRange';
import { SelectSingleContextValue } from 'contexts/SelectSingle';
import { useSelectedDays } from './useSelectedDays';
import { SelectedDays, useSelectedDays } from './useSelectedDays';
const today = new Date(2021, 11, 8);
freezeBeforeAll(today);
const single: SelectSingleContextValue = {
selected: today
};
const multiple: SelectMultipleContextValue = {
selected: [today],
modifiers: { disabled: [] }
};
const range: SelectRangeContextValue = {
selected: undefined,
modifiers: {
disabled: [],
range_start: [],
range_end: [],
range_middle: []
}
};
const selectionContext = { single, multiple, range };
let renderResult: RenderResult<SelectedDays>;
function setup(dayPickerProps: DayPickerProps) {
const view = customRenderHook(
useSelectedDays,
function renderHook(dayPickerProps: DayPickerProps) {
return renderDayPickerHook(
() => useSelectedDays(),
dayPickerProps,
selectionContext
mockedContexts
);
renderResult = view.result;
}

@@ -46,7 +22,5 @@

const mode = 'single';
beforeEach(() => {
setup({ mode });
});
test('should return the selection from the single context', () => {
expect(renderResult.current).toBe(single.selected);
const result = renderHook({ mode, selected: today });
expect(result.current).toBe(mockedContexts.single.selected);
});

@@ -57,7 +31,5 @@ });

const mode = 'multiple';
beforeEach(() => {
setup({ mode });
});
test('should return the selection from the multiple context', () => {
expect(renderResult.current).toBe(multiple.selected);
const result = renderHook({ mode });
expect(result.current).toBe(mockedContexts.multiple.selected);
});

@@ -68,8 +40,6 @@ });

const mode = 'range';
beforeEach(() => {
setup({ mode });
});
test('should return the selection from the range context', () => {
expect(renderResult.current).toBe(range.selected);
const result = renderHook({ mode });
expect(result.current).toBe(mockedContexts.range.selected);
});
});
export * from './DayPicker';
import './style.css';

@@ -3,0 +4,0 @@ export * from 'components/Button';

declare const styles: {
readonly rdp: string;
readonly 'rdp-vhidden': string;
readonly 'rdp-button_reset': string;
readonly 'rdp-button': string;
readonly 'rdp-months': string;
readonly 'rdp-month': string;
readonly 'rdp-table': string;
readonly 'rdp-with_weeknumber': string;
readonly 'rdp-caption': string;
readonly 'rdp-multiple_months': string;
readonly 'rdp-caption_dropdowns': string;
readonly 'rdp-caption_label': string;
readonly 'rdp-nav': string;
readonly 'rdp-caption_start': string;
readonly 'rdp-caption_end': string;
readonly 'rdp-nav_button': string;
readonly 'rdp-dropdown_year': string;
readonly 'rdp-dropdown_month': string;
readonly 'rdp-dropdown': string;
readonly 'rdp-dropdown_icon': string;
readonly 'rdp-head': string;
readonly 'rdp-head_row': string;
readonly 'rdp-row': string;
readonly 'rdp-head_cell': string;
readonly 'rdp-tbody': string;
readonly 'rdp-tfoot': string;
readonly 'rdp-cell': string;
readonly 'rdp-weeknumber': string;
readonly 'rdp-day': string;
readonly 'rdp-day_today': string;
readonly 'rdp-day_outside': string;
readonly 'rdp-day_selected': string;
readonly 'rdp-day_range_start': string;
readonly 'rdp-day_range_end': string;
readonly 'rdp-day_range_middle': string;
rdp: string;
'rdp-vhidden': string;
'rdp-button_reset': string;
'rdp-button': string;
'rdp-day_selected': string;
'rdp-months': string;
'rdp-month': string;
'rdp-table': string;
'rdp-with_weeknumber': string;
'rdp-caption': string;
'rdp-multiple_months': string;
'rdp-caption_dropdowns': string;
'rdp-caption_label': string;
'rdp-nav': string;
'rdp-caption_start': string;
'rdp-caption_end': string;
'rdp-nav_button': string;
'rdp-dropdown_year': string;
'rdp-dropdown_month': string;
'rdp-dropdown': string;
'rdp-dropdown_icon': string;
'rdp-head': string;
'rdp-head_row': string;
'rdp-row': string;
'rdp-head_cell': string;
'rdp-tbody': string;
'rdp-tfoot': string;
'rdp-cell': string;
'rdp-weeknumber': string;
'rdp-day': string;
'rdp-day_today': string;
'rdp-day_outside': string;
'rdp-day_range_start': string;
'rdp-day_range_end': string;
'rdp-day_range_middle': string;
};
export = styles;
export default styles;

@@ -11,2 +11,3 @@ import type { Locale } from 'date-fns';

labelPrevious: NavButtonLabel;
/** @deprecated This label is not used anymore and this function will be removed in the future. */
labelDay: DayLabel;

@@ -13,0 +14,0 @@ labelWeekday: WeekdayLabel;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc