@react-types/calendar
Advanced tools
Comparing version 3.0.0-nightly.3113 to 3.0.0-nightly.3114
{ | ||
"name": "@react-types/calendar", | ||
"version": "3.0.0-nightly.3113+404d41859", | ||
"version": "3.0.0-nightly.3114+68403fe55", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,4 +12,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@internationalized/date": "3.0.0-nightly.3113+404d41859", | ||
"@react-types/shared": "3.0.0-nightly.1417+404d41859" | ||
"@internationalized/date": "3.5.6-nightly.5042+68403fe55", | ||
"@react-types/shared": "3.0.0-nightly.3114+68403fe55" | ||
}, | ||
@@ -20,5 +20,5 @@ "publishConfig": { | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
}, | ||
"gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937" | ||
"gitHead": "68403fe55489dce3de1b3094c957d598ad719861" | ||
} |
@@ -13,4 +13,5 @@ /* | ||
import {AriaLabelingProps, DOMProps, RangeValue, StyleProps, ValidationState, ValueBase} from '@react-types/shared'; | ||
import {CalendarDate, CalendarDateTime, ZonedDateTime} from '@internationalized/date'; | ||
import {DOMProps, RangeValue, StyleProps, ValueBase} from '@react-types/shared'; | ||
import {ReactNode} from 'react'; | ||
@@ -26,5 +27,7 @@ export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime; | ||
/** The minimum allowed date that a user may select. */ | ||
minValue?: DateValue, | ||
minValue?: DateValue | null, | ||
/** The maximum allowed date that a user may select. */ | ||
maxValue?: DateValue, | ||
maxValue?: DateValue | null, | ||
/** Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */ | ||
isDateUnavailable?: (date: DateValue) => boolean, | ||
/** | ||
@@ -44,10 +47,42 @@ * Whether the calendar is disabled. | ||
*/ | ||
autoFocus?: boolean | ||
autoFocus?: boolean, | ||
/** Controls the currently focused date within the calendar. */ | ||
focusedValue?: DateValue, | ||
/** The date that is focused when the calendar first mounts (uncountrolled). */ | ||
defaultFocusedValue?: DateValue, | ||
/** Handler that is called when the focused date changes. */ | ||
onFocusChange?: (date: CalendarDate) => void, | ||
/** | ||
* Whether the current selection is valid or invalid according to application logic. | ||
* @deprecated Use `isInvalid` instead. | ||
*/ | ||
validationState?: ValidationState, | ||
/** Whether the current selection is invalid according to application logic. */ | ||
isInvalid?: boolean, | ||
/** An error message to display when the selected value is invalid. */ | ||
errorMessage?: ReactNode, | ||
/** | ||
* Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration. | ||
* @default visible | ||
*/ | ||
pageBehavior?: PageBehavior | ||
} | ||
export type DateRange = RangeValue<DateValue>; | ||
export interface CalendarProps<T extends DateValue> extends CalendarPropsBase, ValueBase<T, MappedDateValue<T>> {} | ||
export interface RangeCalendarProps<T extends DateValue> extends CalendarPropsBase, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> {} | ||
export type DateRange = RangeValue<DateValue> | null; | ||
export interface CalendarProps<T extends DateValue | null> extends CalendarPropsBase, ValueBase<T | null, MappedDateValue<T>> {} | ||
export interface RangeCalendarProps<T extends DateValue | null> extends CalendarPropsBase, ValueBase<RangeValue<T> | null> { | ||
/** | ||
* When combined with `isDateUnavailable`, determines whether non-contiguous ranges, | ||
* i.e. ranges containing unavailable dates, may be selected. | ||
*/ | ||
allowsNonContiguousRanges?: boolean | ||
} | ||
export interface SpectrumCalendarProps<T extends DateValue> extends CalendarProps<T>, DOMProps, StyleProps { | ||
export interface AriaCalendarProps<T extends DateValue> extends CalendarProps<T>, DOMProps, AriaLabelingProps {} | ||
export interface AriaRangeCalendarProps<T extends DateValue> extends RangeCalendarProps<T>, DOMProps, AriaLabelingProps {} | ||
export type PageBehavior = 'single' | 'visible'; | ||
export interface SpectrumCalendarProps<T extends DateValue> extends AriaCalendarProps<T>, StyleProps { | ||
/** | ||
@@ -60,3 +95,3 @@ * The number of months to display at once. Up to 3 months are supported. | ||
export interface SpectrumRangeCalendarProps<T extends DateValue> extends RangeCalendarProps<T>, DOMProps, StyleProps { | ||
export interface SpectrumRangeCalendarProps<T extends DateValue> extends AriaRangeCalendarProps<T>, StyleProps { | ||
/** | ||
@@ -63,0 +98,0 @@ * The number of months to display at once. Up to 3 months are supported. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
16109
89
+ Addedreact@18.3.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)