@react-types/datepicker 3.8.2 → 3.9.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 +7 -7
- package/src/index.d.ts +9 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/datepicker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@internationalized/date": "^3.
|
|
13
|
-
"@react-types/calendar": "^3.
|
|
14
|
-
"@react-types/overlays": "^3.8.
|
|
15
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@internationalized/date": "^3.6.0",
|
|
13
|
+
"@react-types/calendar": "^3.5.0",
|
|
14
|
+
"@react-types/overlays": "^3.8.11",
|
|
15
|
+
"@react-types/shared": "^3.26.0"
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
21
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
|
|
24
24
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -39,13 +39,13 @@ type MappedDateValue<T> =
|
|
|
39
39
|
export type Granularity = 'day' | 'hour' | 'minute' | 'second';
|
|
40
40
|
interface DateFieldBase<T extends DateValue> extends InputBase, Validation<MappedDateValue<T>>, FocusableProps, LabelableProps, HelpTextProps, OverlayTriggerProps {
|
|
41
41
|
/** The minimum allowed date that a user may select. */
|
|
42
|
-
minValue?: DateValue,
|
|
42
|
+
minValue?: DateValue | null,
|
|
43
43
|
/** The maximum allowed date that a user may select. */
|
|
44
|
-
maxValue?: DateValue,
|
|
44
|
+
maxValue?: DateValue | null,
|
|
45
45
|
/** Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */
|
|
46
46
|
isDateUnavailable?: (date: DateValue) => boolean,
|
|
47
47
|
/** A placeholder date that influences the format of the placeholder shown when no value is selected. Defaults to today's date at midnight. */
|
|
48
|
-
placeholderValue?: T,
|
|
48
|
+
placeholderValue?: T | null,
|
|
49
49
|
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */
|
|
50
50
|
hourCycle?: 12 | 24,
|
|
51
51
|
/** Determines the smallest unit that is displayed in the date picker. By default, this is `"day"` for dates, and `"minute"` for times. */
|
|
@@ -63,7 +63,7 @@ interface DateFieldBase<T extends DateValue> extends InputBase, Validation<Mappe
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
interface AriaDateFieldBaseProps<T extends DateValue> extends DateFieldBase<T>, AriaLabelingProps, DOMProps {}
|
|
66
|
-
export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, ValueBase<T | null, MappedDateValue<T
|
|
66
|
+
export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {}
|
|
67
67
|
export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T>, InputDOMProps {}
|
|
68
68
|
|
|
69
69
|
interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayTriggerProps {
|
|
@@ -75,11 +75,11 @@ interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayT
|
|
|
75
75
|
}
|
|
76
76
|
export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, DOMProps {}
|
|
77
77
|
|
|
78
|
-
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T
|
|
78
|
+
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {}
|
|
79
79
|
export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {}
|
|
80
80
|
|
|
81
81
|
export type DateRange = RangeValue<DateValue>;
|
|
82
|
-
export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, 'validate'>, Validation<RangeValue<MappedDateValue<T>>>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T
|
|
82
|
+
export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, 'validate'>, Validation<RangeValue<MappedDateValue<T>>>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T>> | null> {
|
|
83
83
|
/**
|
|
84
84
|
* When combined with `isDateUnavailable`, determines whether non-contiguous ranges,
|
|
85
85
|
* i.e. ranges containing unavailable dates, may be selected.
|
|
@@ -134,7 +134,7 @@ type MappedTimeValue<T> =
|
|
|
134
134
|
T extends Time ? Time :
|
|
135
135
|
never;
|
|
136
136
|
|
|
137
|
-
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation<MappedTimeValue<T>>, FocusableProps, LabelableProps, HelpTextProps, ValueBase<T | null, MappedTimeValue<T
|
|
137
|
+
export interface TimePickerProps<T extends TimeValue> extends InputBase, Validation<MappedTimeValue<T>>, FocusableProps, LabelableProps, HelpTextProps, ValueBase<T | null, MappedTimeValue<T> | null> {
|
|
138
138
|
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */
|
|
139
139
|
hourCycle?: 12 | 24,
|
|
140
140
|
/**
|
|
@@ -155,9 +155,9 @@ export interface TimePickerProps<T extends TimeValue> extends InputBase, Validat
|
|
|
155
155
|
*/
|
|
156
156
|
placeholderValue?: T,
|
|
157
157
|
/** The minimum allowed time that a user may select. */
|
|
158
|
-
minValue?: TimeValue,
|
|
158
|
+
minValue?: TimeValue | null,
|
|
159
159
|
/** The maximum allowed time that a user may select. */
|
|
160
|
-
maxValue?: TimeValue
|
|
160
|
+
maxValue?: TimeValue | null
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps, InputDOMProps {}
|