@react-types/datepicker 3.0.0-rc.0 → 3.1.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 +6 -6
- 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.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@internationalized/date": "3.0.
|
|
13
|
-
"@react-types/overlays": "^3.
|
|
14
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@internationalized/date": "^3.0.1",
|
|
13
|
+
"@react-types/overlays": "^3.6.2",
|
|
14
|
+
"@react-types/shared": "^3.14.0"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
20
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "cd7c0ec917122c7612f653c22f8ed558f8b66ecd"
|
|
23
23
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ interface DatePickerBase<T extends DateValue> extends InputBase, Validation, Foc
|
|
|
41
41
|
maxValue?: DateValue,
|
|
42
42
|
/** Callback that is called for each date of the calendar. If it returns true, then the date is unavailable. */
|
|
43
43
|
isDateUnavailable?: (date: DateValue) => boolean,
|
|
44
|
-
/** A placeholder date
|
|
44
|
+
/** A placeholder date that influences the format of the placeholder shown when no value is selected. Defaults to today's date at midnight. */
|
|
45
45
|
placeholderValue?: T,
|
|
46
46
|
/** Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale. */
|
|
47
47
|
hourCycle?: 12 | 24,
|
|
@@ -114,7 +114,10 @@ export interface TimePickerProps<T extends TimeValue> extends InputBase, Validat
|
|
|
114
114
|
granularity?: 'hour' | 'minute' | 'second' | 'millisecond',
|
|
115
115
|
/** Whether to hide the time zone abbreviation. */
|
|
116
116
|
hideTimeZone?: boolean,
|
|
117
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* A placeholder time that influences the format of the placeholder shown when no value is selected.
|
|
119
|
+
* Defaults to 12:00 AM or 00:00 depending on the hour cycle.
|
|
120
|
+
*/
|
|
118
121
|
placeholderValue?: T,
|
|
119
122
|
/** The minimum allowed time that a user may select. */
|
|
120
123
|
minValue?: TimeValue,
|
|
@@ -124,10 +127,13 @@ export interface TimePickerProps<T extends TimeValue> extends InputBase, Validat
|
|
|
124
127
|
|
|
125
128
|
export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps {}
|
|
126
129
|
|
|
127
|
-
export interface
|
|
130
|
+
export interface SpectrumTimeFieldProps<T extends TimeValue> extends AriaTimeFieldProps<T>, SpectrumLabelableProps, StyleProps {
|
|
128
131
|
/**
|
|
129
132
|
* Whether the time field should be displayed with a quiet style.
|
|
130
133
|
* @default false
|
|
131
134
|
*/
|
|
132
135
|
isQuiet?: boolean
|
|
133
136
|
}
|
|
137
|
+
|
|
138
|
+
// backward compatibility
|
|
139
|
+
export type SpectrumTimePickerProps<T extends TimeValue> = SpectrumTimeFieldProps<T>;
|