@react-types/datepicker 3.0.0-nightly.3175 → 3.0.0-rc.1
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 +6 -5
- package/src/index.d.ts +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/datepicker",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@internationalized/date": "3.0.0-
|
|
13
|
-
"@react-types/
|
|
12
|
+
"@internationalized/date": "3.0.0-rc.1",
|
|
13
|
+
"@react-types/overlays": "^3.6.0",
|
|
14
|
+
"@react-types/shared": "^3.13.0"
|
|
14
15
|
},
|
|
15
16
|
"publishConfig": {
|
|
16
17
|
"access": "public"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
19
|
-
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
20
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
20
21
|
},
|
|
21
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "8f921ec5094e7c2b3c301bcb6133372e35a2052b"
|
|
22
23
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
ValueBase
|
|
25
25
|
} from '@react-types/shared';
|
|
26
26
|
import {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from '@internationalized/date';
|
|
27
|
+
import {OverlayTriggerProps} from '@react-types/overlays';
|
|
27
28
|
|
|
28
29
|
export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
29
30
|
type MappedDateValue<T> =
|
|
@@ -33,7 +34,7 @@ type MappedDateValue<T> =
|
|
|
33
34
|
never;
|
|
34
35
|
|
|
35
36
|
export type Granularity = 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
|
|
36
|
-
interface DatePickerBase<T extends DateValue> extends InputBase, Validation, FocusableProps, LabelableProps, HelpTextProps {
|
|
37
|
+
interface DatePickerBase<T extends DateValue> extends InputBase, Validation, FocusableProps, LabelableProps, HelpTextProps, OverlayTriggerProps {
|
|
37
38
|
/** The minimum allowed date that a user may select. */
|
|
38
39
|
minValue?: DateValue,
|
|
39
40
|
/** The maximum allowed date that a user may select. */
|
|
@@ -84,7 +85,12 @@ interface SpectrumDatePickerBase<T extends DateValue> extends AriaDatePickerBase
|
|
|
84
85
|
* The maximum number of months to display at once in the calendar popover, if screen space permits.
|
|
85
86
|
* @default 1
|
|
86
87
|
*/
|
|
87
|
-
maxVisibleMonths?: number
|
|
88
|
+
maxVisibleMonths?: number,
|
|
89
|
+
/**
|
|
90
|
+
* Whether the calendar popover should automatically flip direction when space is limited.
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
shouldFlip?: boolean
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
export interface SpectrumDatePickerProps<T extends DateValue> extends DatePickerProps<T>, SpectrumDatePickerBase<T> {}
|
|
@@ -98,7 +104,7 @@ type MappedTimeValue<T> =
|
|
|
98
104
|
T extends Time ? Time :
|
|
99
105
|
never;
|
|
100
106
|
|
|
101
|
-
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation, FocusableProps, LabelableProps, ValueBase<T, MappedTimeValue<T>> {
|
|
107
|
+
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation, FocusableProps, LabelableProps, HelpTextProps, ValueBase<T, MappedTimeValue<T>> {
|
|
102
108
|
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */
|
|
103
109
|
hourCycle?: 12 | 24,
|
|
104
110
|
/**
|