@react-types/datepicker 3.0.0-nightly.1409 → 3.0.0-nightly.1484
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/package.json +4 -4
- package/src/index.d.ts +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/datepicker",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1484+7f2896a53",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@internationalized/date": "3.0.0-nightly.
|
|
13
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
12
|
+
"@internationalized/date": "3.0.0-nightly.3183+7f2896a53",
|
|
13
|
+
"@react-types/shared": "3.0.0-nightly.1484+7f2896a53"
|
|
14
14
|
},
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "7f2896a53fc4696962b4f6beb0796116a83561ee"
|
|
22
22
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ interface DatePickerBase<T extends DateValue> extends InputBase, Validation, Foc
|
|
|
38
38
|
minValue?: DateValue,
|
|
39
39
|
/** The maximum allowed date that a user may select. */
|
|
40
40
|
maxValue?: DateValue,
|
|
41
|
+
/** Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */
|
|
42
|
+
isDateUnavailable?: (date: DateValue) => boolean,
|
|
41
43
|
/** A placeholder date to display when no value is selected. Defaults to today's date at midnight. */
|
|
42
44
|
placeholderValue?: T,
|
|
43
45
|
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */
|
|
@@ -57,7 +59,14 @@ export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>,
|
|
|
57
59
|
export interface AriaDatePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DatePickerProps<T> {}
|
|
58
60
|
|
|
59
61
|
export type DateRange = RangeValue<DateValue>;
|
|
60
|
-
export interface DateRangePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> {
|
|
62
|
+
export interface DateRangePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> {
|
|
63
|
+
/**
|
|
64
|
+
* When combined with `isDateUnavailable`, determines whether non-contiguous ranges,
|
|
65
|
+
* i.e. ranges containing unavailable dates, may be selected.
|
|
66
|
+
*/
|
|
67
|
+
allowsNonContiguousRanges?: boolean
|
|
68
|
+
}
|
|
69
|
+
|
|
61
70
|
export interface AriaDateRangePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DateRangePickerProps<T> {}
|
|
62
71
|
|
|
63
72
|
interface SpectrumDatePickerBase<T extends DateValue> extends AriaDatePickerBaseProps<T>, SpectrumLabelableProps, StyleProps {
|
|
@@ -107,7 +116,9 @@ export interface TimePickerProps<T extends TimeValue> extends InputBase, Validat
|
|
|
107
116
|
maxValue?: TimeValue
|
|
108
117
|
}
|
|
109
118
|
|
|
110
|
-
export interface
|
|
119
|
+
export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps {}
|
|
120
|
+
|
|
121
|
+
export interface SpectrumTimePickerProps<T extends TimeValue> extends AriaTimeFieldProps<T>, SpectrumLabelableProps, StyleProps {
|
|
111
122
|
/**
|
|
112
123
|
* Whether the time field should be displayed with a quiet style.
|
|
113
124
|
* @default false
|