@react-types/datepicker 3.10.0 → 3.12.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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. 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.10.0",
3
+ "version": "3.12.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,10 +9,10 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@internationalized/date": "^3.7.0",
13
- "@react-types/calendar": "^3.6.0",
14
- "@react-types/overlays": "^3.8.12",
15
- "@react-types/shared": "^3.27.0"
12
+ "@internationalized/date": "^3.8.0",
13
+ "@react-types/calendar": "^3.7.0",
14
+ "@react-types/overlays": "^3.8.14",
15
+ "@react-types/shared": "^3.29.0"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"
@@ -20,5 +20,5 @@
20
20
  "peerDependencies": {
21
21
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
22
22
  },
23
- "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
23
+ "gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
24
24
  }
package/src/index.d.ts CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  Validation,
26
26
  ValueBase
27
27
  } from '@react-types/shared';
28
- import {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from '@internationalized/date';
28
+ import {CalendarDate, CalendarDateTime, CalendarIdentifier, Calendar as ICalendar, Time, ZonedDateTime} from '@internationalized/date';
29
29
  import {OverlayTriggerProps} from '@react-types/overlays';
30
30
  import {PageBehavior} from '@react-types/calendar';
31
31
 
@@ -37,7 +37,7 @@ type MappedDateValue<T> =
37
37
  never;
38
38
 
39
39
  export type Granularity = 'day' | 'hour' | 'minute' | 'second';
40
- interface DateFieldBase<T extends DateValue> extends InputBase, Validation<MappedDateValue<T>>, FocusableProps, LabelableProps, HelpTextProps, OverlayTriggerProps {
40
+ interface DateFieldBase<T extends DateValue> extends InputBase, Validation<MappedDateValue<T>>, FocusableProps, LabelableProps, HelpTextProps {
41
41
  /** The minimum allowed date that a user may select. */
42
42
  minValue?: DateValue | null,
43
43
  /** The maximum allowed date that a user may select. */
@@ -124,7 +124,13 @@ interface SpectrumDatePickerBase<T extends DateValue> extends SpectrumDateFieldB
124
124
  * Whether the calendar popover should automatically flip direction when space is limited.
125
125
  * @default true
126
126
  */
127
- shouldFlip?: boolean
127
+ shouldFlip?: boolean,
128
+ /**
129
+ * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
130
+ * object for a given calendar identifier. This will be used for the popover calendar. If not provided, the
131
+ * `createCalendar` function from `@internationalized/date` will be used.
132
+ */
133
+ createCalendar?: (identifier: CalendarIdentifier) => ICalendar
128
134
  }
129
135
 
130
136
  export interface SpectrumDatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'isInvalid' | 'validationState'>, SpectrumDatePickerBase<T> {}