@react-types/calendar 3.6.0 → 3.7.0
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 +17 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/calendar",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
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.
|
|
13
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@internationalized/date": "^3.8.0",
|
|
13
|
+
"@react-types/shared": "^3.29.0"
|
|
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 || ^18.0.0 || ^19.0.0-rc.1"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
|
|
22
22
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {AriaLabelingProps, DOMProps, RangeValue, StyleProps, ValidationState, ValueBase} from '@react-types/shared';
|
|
14
|
-
import {CalendarDate, CalendarDateTime, ZonedDateTime} from '@internationalized/date';
|
|
14
|
+
import type {CalendarDate, CalendarDateTime, CalendarIdentifier, Calendar as ICalendar, ZonedDateTime} from '@internationalized/date';
|
|
15
15
|
import {ReactNode} from 'react';
|
|
16
16
|
|
|
17
17
|
export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
@@ -90,7 +90,14 @@ export interface SpectrumCalendarProps<T extends DateValue> extends AriaCalendar
|
|
|
90
90
|
* The number of months to display at once. Up to 3 months are supported.
|
|
91
91
|
* @default 1
|
|
92
92
|
*/
|
|
93
|
-
visibleMonths?: number
|
|
93
|
+
visibleMonths?: number,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
|
|
97
|
+
* object for a given calendar identifier. If not provided, the `createCalendar` function
|
|
98
|
+
* from `@internationalized/date` will be used.
|
|
99
|
+
*/
|
|
100
|
+
createCalendar?: (identifier: CalendarIdentifier) => ICalendar
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
export interface SpectrumRangeCalendarProps<T extends DateValue> extends AriaRangeCalendarProps<T>, StyleProps {
|
|
@@ -98,5 +105,12 @@ export interface SpectrumRangeCalendarProps<T extends DateValue> extends AriaRan
|
|
|
98
105
|
* The number of months to display at once. Up to 3 months are supported.
|
|
99
106
|
* @default 1
|
|
100
107
|
*/
|
|
101
|
-
visibleMonths?: number
|
|
108
|
+
visibleMonths?: number,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
|
|
112
|
+
* object for a given calendar identifier. If not provided, the `createCalendar` function
|
|
113
|
+
* from `@internationalized/date` will be used.
|
|
114
|
+
*/
|
|
115
|
+
createCalendar?: (identifier: CalendarIdentifier) => ICalendar
|
|
102
116
|
}
|