react-day-picker 8.3.7 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -3
- package/dist/index.esm.d.ts +7 -3
- package/dist/index.esm.js +10 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/react-day-picker.min.js +1 -1
- package/package.json +13 -13
- package/src/hooks/useDayEventHandlers/useDayEventHandlers.test.tsx +2 -0
- package/src/hooks/useDayEventHandlers/useDayEventHandlers.tsx +13 -0
- package/src/types/DayPickerBase.ts +3 -0
- package/src/types/EventHandlers.ts +7 -0
package/dist/index.d.ts
CHANGED
|
@@ -238,6 +238,8 @@ type DayFocusEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: Rea
|
|
|
238
238
|
type DayKeyboardEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.KeyboardEvent) => void;
|
|
239
239
|
/** The event handler when a day gets a mouse event. */
|
|
240
240
|
type DayMouseEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.MouseEvent) => void;
|
|
241
|
+
/** The event handler when a day gets a pointer event. */
|
|
242
|
+
type DayPointerEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.PointerEvent) => void;
|
|
241
243
|
/** The event handler when a month is changed in the calendar. */
|
|
242
244
|
type MonthChangeEventHandler = (month: Date) => void;
|
|
243
245
|
/** The event handler when selecting multiple days. */
|
|
@@ -621,6 +623,8 @@ interface DayPickerBase {
|
|
|
621
623
|
onDayKeyDown?: DayKeyboardEventHandler;
|
|
622
624
|
onDayKeyUp?: DayKeyboardEventHandler;
|
|
623
625
|
onDayKeyPress?: DayKeyboardEventHandler;
|
|
626
|
+
onDayPointerEnter?: DayPointerEventHandler;
|
|
627
|
+
onDayPointerLeave?: DayPointerEventHandler;
|
|
624
628
|
onDayTouchCancel?: DayTouchEventHandler;
|
|
625
629
|
onDayTouchEnd?: DayTouchEventHandler;
|
|
626
630
|
onDayTouchMove?: DayTouchEventHandler;
|
|
@@ -862,7 +866,7 @@ type ButtonProps = React.HTMLProps<HTMLButtonElement>;
|
|
|
862
866
|
/**
|
|
863
867
|
* Render a button HTML element applying the reset class name.
|
|
864
868
|
*/
|
|
865
|
-
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" | "
|
|
869
|
+
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>>;
|
|
866
870
|
/**
|
|
867
871
|
* Render a caption with the dropdowns to navigate between months and years.
|
|
868
872
|
*/
|
|
@@ -916,7 +920,7 @@ interface UseInputValue {
|
|
|
916
920
|
}
|
|
917
921
|
/** Return props and setters for binding an input field to DayPicker. */
|
|
918
922
|
declare function useInput(options?: UseInputOptions): UseInputValue;
|
|
919
|
-
type EventName = "onClick" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart";
|
|
923
|
+
type EventName = "onClick" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart";
|
|
920
924
|
type DayEventHandlers = Pick<HTMLProps<HTMLButtonElement>, EventName>;
|
|
921
925
|
type SelectedDays = Date | Date[] | DateRange | undefined;
|
|
922
926
|
type DayRender = {
|
|
@@ -1168,4 +1172,4 @@ declare function isMatch(day: Date, matchers: Matcher[]): boolean;
|
|
|
1168
1172
|
* day is already present in the range.
|
|
1169
1173
|
*/
|
|
1170
1174
|
declare function addToRange(day: Date, range?: DateRange): DateRange | undefined;
|
|
1171
|
-
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, 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 };
|
|
1175
|
+
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 };
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -238,6 +238,8 @@ type DayFocusEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: Rea
|
|
|
238
238
|
type DayKeyboardEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.KeyboardEvent) => void;
|
|
239
239
|
/** The event handler when a day gets a mouse event. */
|
|
240
240
|
type DayMouseEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.MouseEvent) => void;
|
|
241
|
+
/** The event handler when a day gets a pointer event. */
|
|
242
|
+
type DayPointerEventHandler = (day: Date, activeModifiers: ActiveModifiers, e: React.PointerEvent) => void;
|
|
241
243
|
/** The event handler when a month is changed in the calendar. */
|
|
242
244
|
type MonthChangeEventHandler = (month: Date) => void;
|
|
243
245
|
/** The event handler when selecting multiple days. */
|
|
@@ -621,6 +623,8 @@ interface DayPickerBase {
|
|
|
621
623
|
onDayKeyDown?: DayKeyboardEventHandler;
|
|
622
624
|
onDayKeyUp?: DayKeyboardEventHandler;
|
|
623
625
|
onDayKeyPress?: DayKeyboardEventHandler;
|
|
626
|
+
onDayPointerEnter?: DayPointerEventHandler;
|
|
627
|
+
onDayPointerLeave?: DayPointerEventHandler;
|
|
624
628
|
onDayTouchCancel?: DayTouchEventHandler;
|
|
625
629
|
onDayTouchEnd?: DayTouchEventHandler;
|
|
626
630
|
onDayTouchMove?: DayTouchEventHandler;
|
|
@@ -862,7 +866,7 @@ type ButtonProps = React.HTMLProps<HTMLButtonElement>;
|
|
|
862
866
|
/**
|
|
863
867
|
* Render a button HTML element applying the reset class name.
|
|
864
868
|
*/
|
|
865
|
-
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" | "
|
|
869
|
+
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>>;
|
|
866
870
|
/**
|
|
867
871
|
* Render a caption with the dropdowns to navigate between months and years.
|
|
868
872
|
*/
|
|
@@ -916,7 +920,7 @@ interface UseInputValue {
|
|
|
916
920
|
}
|
|
917
921
|
/** Return props and setters for binding an input field to DayPicker. */
|
|
918
922
|
declare function useInput(options?: UseInputOptions): UseInputValue;
|
|
919
|
-
type EventName = "onClick" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart";
|
|
923
|
+
type EventName = "onClick" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave" | "onPointerEnter" | "onPointerLeave" | "onTouchCancel" | "onTouchEnd" | "onTouchMove" | "onTouchStart";
|
|
920
924
|
type DayEventHandlers = Pick<HTMLProps<HTMLButtonElement>, EventName>;
|
|
921
925
|
type SelectedDays = Date | Date[] | DateRange | undefined;
|
|
922
926
|
type DayRender = {
|
|
@@ -1168,4 +1172,4 @@ declare function isMatch(day: Date, matchers: Matcher[]): boolean;
|
|
|
1168
1172
|
* day is already present in the range.
|
|
1169
1173
|
*/
|
|
1170
1174
|
declare function addToRange(day: Date, range?: DateRange): DateRange | undefined;
|
|
1171
|
-
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, 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 };
|
|
1175
|
+
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 };
|
package/dist/index.esm.js
CHANGED
|
@@ -1552,6 +1552,14 @@ function useDayEventHandlers(date, activeModifiers) {
|
|
|
1552
1552
|
var _a;
|
|
1553
1553
|
(_a = dayPicker.onDayMouseLeave) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);
|
|
1554
1554
|
};
|
|
1555
|
+
var onPointerEnter = function (e) {
|
|
1556
|
+
var _a;
|
|
1557
|
+
(_a = dayPicker.onDayPointerEnter) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);
|
|
1558
|
+
};
|
|
1559
|
+
var onPointerLeave = function (e) {
|
|
1560
|
+
var _a;
|
|
1561
|
+
(_a = dayPicker.onDayPointerLeave) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);
|
|
1562
|
+
};
|
|
1555
1563
|
var onTouchCancel = function (e) {
|
|
1556
1564
|
var _a;
|
|
1557
1565
|
(_a = dayPicker.onDayTouchCancel) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);
|
|
@@ -1626,6 +1634,8 @@ function useDayEventHandlers(date, activeModifiers) {
|
|
|
1626
1634
|
onKeyUp: onKeyUp,
|
|
1627
1635
|
onMouseEnter: onMouseEnter,
|
|
1628
1636
|
onMouseLeave: onMouseLeave,
|
|
1637
|
+
onPointerEnter: onPointerEnter,
|
|
1638
|
+
onPointerLeave: onPointerLeave,
|
|
1629
1639
|
onTouchCancel: onTouchCancel,
|
|
1630
1640
|
onTouchEnd: onTouchEnd,
|
|
1631
1641
|
onTouchMove: onTouchMove,
|