@react-types/calendar 3.0.0-nightly.3168 → 3.0.0-nightly.3180
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 +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/calendar",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.3180+0bba35ae3",
|
|
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.3180+0bba35ae3",
|
|
13
|
+
"@react-types/shared": "3.0.0-nightly.1481+0bba35ae3"
|
|
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": "0bba35ae36b5d220570385215860d3ca3b549656"
|
|
22
22
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export interface CalendarPropsBase {
|
|
|
25
25
|
minValue?: DateValue,
|
|
26
26
|
/** The maximum allowed date that a user may select. */
|
|
27
27
|
maxValue?: DateValue,
|
|
28
|
-
/** Callback that is called for each date of the calendar. If it returns true, then the date is
|
|
29
|
-
|
|
28
|
+
/** Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */
|
|
29
|
+
isDateUnavailable?: (date: DateValue) => boolean,
|
|
30
30
|
/**
|
|
31
31
|
* Whether the calendar is disabled.
|
|
32
32
|
* @default false
|
|
@@ -52,7 +52,13 @@ export interface CalendarPropsBase {
|
|
|
52
52
|
|
|
53
53
|
export type DateRange = RangeValue<DateValue>;
|
|
54
54
|
export interface CalendarProps<T extends DateValue> extends CalendarPropsBase, ValueBase<T, MappedDateValue<T>> {}
|
|
55
|
-
export interface RangeCalendarProps<T extends DateValue> extends CalendarPropsBase, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> {
|
|
55
|
+
export interface RangeCalendarProps<T extends DateValue> extends CalendarPropsBase, ValueBase<RangeValue<T>, RangeValue<MappedDateValue<T>>> {
|
|
56
|
+
/**
|
|
57
|
+
* When combined with `isDateUnavailable`, determines whether non-contiguous ranges,
|
|
58
|
+
* i.e. ranges containing unavailable dates, may be selected.
|
|
59
|
+
*/
|
|
60
|
+
allowsNonContiguousRanges?: boolean
|
|
61
|
+
}
|
|
56
62
|
|
|
57
63
|
export interface SpectrumCalendarProps<T extends DateValue> extends CalendarProps<T>, DOMProps, StyleProps {
|
|
58
64
|
/**
|