@react-types/calendar
Advanced tools
Comparing version 3.0.0-nightly.3180 to 3.0.0-nightly-641446f65-240905
{ | ||
"name": "@react-types/calendar", | ||
"version": "3.0.0-nightly.3180+0bba35ae3", | ||
"version": "3.0.0-nightly-641446f65-240905", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,4 +12,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@internationalized/date": "3.0.0-nightly.3180+0bba35ae3", | ||
"@react-types/shared": "3.0.0-nightly.1481+0bba35ae3" | ||
"@internationalized/date": "^3.0.0-nightly-641446f65-240905", | ||
"@react-types/shared": "^3.0.0-nightly-641446f65-240905" | ||
}, | ||
@@ -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": "0bba35ae36b5d220570385215860d3ca3b549656" | ||
} | ||
"stableVersion": "3.4.9" | ||
} |
@@ -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,5 @@ 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. */ | ||
@@ -52,8 +53,22 @@ isDateUnavailable?: (date: DateValue) => boolean, | ||
/** Handler that is called when the focused date changes. */ | ||
onFocusChange?: (date: CalendarDate) => void | ||
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> { | ||
/** | ||
@@ -66,3 +81,9 @@ * When combined with `isDateUnavailable`, determines whether non-contiguous ranges, | ||
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 { | ||
/** | ||
@@ -75,3 +96,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 { | ||
/** | ||
@@ -78,0 +99,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
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
89
0
4752
3
+ Added@internationalized/date@3.5.5(transitive)
+ Added@react-types/shared@3.24.1(transitive)
+ Added@swc/helpers@0.5.13(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedtslib@2.7.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)
Updated@internationalized/date@^3.0.0-nightly-641446f65-240905