@react-types/datepicker
Advanced tools
Comparing version 3.0.0-nightly.3180 to 3.0.0-nightly-016590a4a-250131
{ | ||
"name": "@react-types/datepicker", | ||
"version": "3.0.0-nightly.3180+0bba35ae3", | ||
"version": "3.0.0-nightly-016590a4a-250131", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,4 +12,6 @@ "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-016590a4a-250131", | ||
"@react-types/calendar": "3.0.0-nightly-016590a4a-250131", | ||
"@react-types/overlays": "3.0.0-nightly-016590a4a-250131", | ||
"@react-types/shared": "3.0.0-nightly-016590a4a-250131" | ||
}, | ||
@@ -20,5 +22,4 @@ "publishConfig": { | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1" | ||
}, | ||
"gitHead": "0bba35ae36b5d220570385215860d3ca3b549656" | ||
} | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
} | ||
} |
@@ -19,4 +19,6 @@ /* | ||
InputBase, | ||
InputDOMProps, | ||
LabelableProps, | ||
RangeValue, | ||
SpectrumFieldValidation, | ||
SpectrumLabelableProps, | ||
@@ -28,2 +30,4 @@ StyleProps, | ||
import {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from '@internationalized/date'; | ||
import {OverlayTriggerProps} from '@react-types/overlays'; | ||
import {PageBehavior} from '@react-types/calendar'; | ||
@@ -37,12 +41,12 @@ export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime; | ||
export type Granularity = 'day' | 'hour' | 'minute' | 'second' | 'millisecond'; | ||
interface DatePickerBase<T extends DateValue> extends InputBase, Validation, FocusableProps, LabelableProps, HelpTextProps { | ||
export type Granularity = 'day' | 'hour' | 'minute' | 'second'; | ||
interface DateFieldBase<T extends DateValue> extends InputBase, Validation<MappedDateValue<T>>, FocusableProps, LabelableProps, HelpTextProps, OverlayTriggerProps { | ||
/** 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, | ||
/** A placeholder date to display when no value is selected. Defaults to today's date at midnight. */ | ||
placeholderValue?: T, | ||
/** A placeholder date that influences the format of the placeholder shown when no value is selected. Defaults to today's date at midnight. */ | ||
placeholderValue?: T | null, | ||
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */ | ||
@@ -56,12 +60,32 @@ hourCycle?: 12 | 24, | ||
*/ | ||
hideTimeZone?: boolean | ||
hideTimeZone?: boolean, | ||
/** | ||
* Whether to always show leading zeros in the month, day, and hour fields. | ||
* By default, this is determined by the user's locale. | ||
*/ | ||
shouldForceLeadingZeros?: boolean | ||
} | ||
interface AriaDateFieldBaseProps<T extends DateValue> extends DateFieldBase<T>, AriaLabelingProps, DOMProps {} | ||
export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {} | ||
export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T>, InputDOMProps {} | ||
interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayTriggerProps { | ||
/** | ||
* 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, | ||
/** | ||
* The day that starts the week. | ||
*/ | ||
firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | ||
} | ||
export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, DOMProps {} | ||
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T, MappedDateValue<T>> {} | ||
export interface AriaDatePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DatePickerProps<T> {} | ||
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {} | ||
export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {} | ||
export type DateRange = RangeValue<DateValue>; | ||
export interface DateRangePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> { | ||
export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, 'validate'>, Validation<RangeValue<MappedDateValue<T>>>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T>> | null> { | ||
/** | ||
@@ -71,8 +95,16 @@ * When combined with `isDateUnavailable`, determines whether non-contiguous ranges, | ||
*/ | ||
allowsNonContiguousRanges?: boolean | ||
allowsNonContiguousRanges?: boolean, | ||
/** | ||
* The name of the start date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | ||
*/ | ||
startName?: string, | ||
/** | ||
* The name of the end date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | ||
*/ | ||
endName?: string | ||
} | ||
export interface AriaDateRangePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DateRangePickerProps<T> {} | ||
export interface AriaDateRangePickerProps<T extends DateValue> extends Omit<AriaDatePickerBaseProps<T>, 'validate'>, DateRangePickerProps<T> {} | ||
interface SpectrumDatePickerBase<T extends DateValue> extends AriaDatePickerBaseProps<T>, SpectrumLabelableProps, StyleProps { | ||
interface SpectrumDateFieldBase<T extends DateValue> extends SpectrumLabelableProps, HelpTextProps, SpectrumFieldValidation<MappedDateValue<T>>, StyleProps { | ||
/** | ||
@@ -87,3 +119,6 @@ * Whether the date picker should be displayed with a quiet style. | ||
*/ | ||
showFormatHelpText?: boolean, | ||
showFormatHelpText?: boolean | ||
} | ||
interface SpectrumDatePickerBase<T extends DateValue> extends SpectrumDateFieldBase<T>, SpectrumLabelableProps, StyleProps { | ||
/** | ||
@@ -93,8 +128,13 @@ * The maximum number of months to display at once in the calendar popover, if screen space permits. | ||
*/ | ||
maxVisibleMonths?: number | ||
maxVisibleMonths?: number, | ||
/** | ||
* Whether the calendar popover should automatically flip direction when space is limited. | ||
* @default true | ||
*/ | ||
shouldFlip?: boolean | ||
} | ||
export interface SpectrumDatePickerProps<T extends DateValue> extends DatePickerProps<T>, SpectrumDatePickerBase<T> {} | ||
export interface SpectrumDateRangePickerProps<T extends DateValue> extends DateRangePickerProps<T>, SpectrumDatePickerBase<T> {} | ||
export interface SpectrumDateFieldProps<T extends DateValue> extends Omit<SpectrumDatePickerProps<T>, 'maxVisibleMonths'> {} | ||
export interface SpectrumDatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'isInvalid' | 'validationState'>, SpectrumDatePickerBase<T> {} | ||
export interface SpectrumDateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'isInvalid' | 'validationState'>, Omit<SpectrumDatePickerBase<T>, 'validate'> {} | ||
export interface SpectrumDateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'isInvalid' | 'validationState'>, SpectrumDateFieldBase<T> {} | ||
@@ -108,3 +148,3 @@ export type TimeValue = Time | CalendarDateTime | ZonedDateTime; | ||
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation, FocusableProps, LabelableProps, ValueBase<T, MappedTimeValue<T>> { | ||
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation<MappedTimeValue<T>>, FocusableProps, LabelableProps, HelpTextProps, ValueBase<T | null, MappedTimeValue<T> | null> { | ||
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */ | ||
@@ -116,16 +156,24 @@ hourCycle?: 12 | 24, | ||
*/ | ||
granularity?: 'hour' | 'minute' | 'second' | 'millisecond', | ||
granularity?: 'hour' | 'minute' | 'second', | ||
/** Whether to hide the time zone abbreviation. */ | ||
hideTimeZone?: boolean, | ||
/** A placeholder time to display when no value is selected. Defaults to 12:00 or 00:00 depending on the hour cycle. */ | ||
/** | ||
* Whether to always show leading zeros in the hour field. | ||
* By default, this is determined by the user's locale. | ||
*/ | ||
shouldForceLeadingZeros?: boolean, | ||
/** | ||
* A placeholder time that influences the format of the placeholder shown when no value is selected. | ||
* Defaults to 12:00 AM or 00:00 depending on the hour cycle. | ||
*/ | ||
placeholderValue?: T, | ||
/** The minimum allowed time that a user may select. */ | ||
minValue?: TimeValue, | ||
minValue?: TimeValue | null, | ||
/** The maximum allowed time that a user may select. */ | ||
maxValue?: TimeValue | ||
maxValue?: TimeValue | null | ||
} | ||
export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps {} | ||
export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps, InputDOMProps {} | ||
export interface SpectrumTimePickerProps<T extends TimeValue> extends AriaTimeFieldProps<T>, SpectrumLabelableProps, StyleProps { | ||
export interface SpectrumTimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'isInvalid' | 'validationState'>, SpectrumFieldValidation<MappedTimeValue<T>>, SpectrumLabelableProps, StyleProps, InputDOMProps { | ||
/** | ||
@@ -137,1 +185,4 @@ * Whether the time field should be displayed with a quiet style. | ||
} | ||
// backward compatibility | ||
export type SpectrumTimePickerProps<T extends TimeValue> = SpectrumTimeFieldProps<T>; |
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
162
0
9058
5
3
+ Added@internationalized/date@3.0.0-nightly-016590a4a-250131(transitive)
+ Added@react-types/calendar@3.0.0-nightly-016590a4a-250131(transitive)
+ Added@react-types/overlays@3.0.0-nightly-016590a4a-250131(transitive)
+ Added@react-types/shared@3.0.0-nightly-016590a4a-250131(transitive)
+ Added@swc/helpers@0.5.15(transitive)
+ Addedreact@19.0.0(transitive)
+ Addedtslib@2.8.1(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)
Updated@internationalized/date@3.0.0-nightly-016590a4a-250131