@react-types/datepicker 3.12.1 → 3.13.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 +16 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/datepicker",
3
- "version": "3.12.1",
3
+ "version": "3.13.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.8.1",
13
- "@react-types/calendar": "^3.7.1",
14
- "@react-types/overlays": "^3.8.15",
15
- "@react-types/shared": "^3.29.1"
12
+ "@internationalized/date": "^3.8.2",
13
+ "@react-types/calendar": "^3.7.3",
14
+ "@react-types/overlays": "^3.9.0",
15
+ "@react-types/shared": "^3.31.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": "9c77d4e8267ed39469c65f65da94ece7be509874"
23
+ "gitHead": "8b9348ff255e018b2dd9b27e2a45507cadfa1d35"
24
24
  }
package/src/index.d.ts CHANGED
@@ -64,7 +64,12 @@ interface DateFieldBase<T extends DateValue> extends InputBase, Validation<Mappe
64
64
 
65
65
  interface AriaDateFieldBaseProps<T extends DateValue> extends DateFieldBase<T>, AriaLabelingProps, DOMProps {}
66
66
  export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {}
67
- export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T>, InputDOMProps {}
67
+ export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T>, InputDOMProps {
68
+ /**
69
+ * Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).
70
+ */
71
+ autoComplete?: string
72
+ }
68
73
 
69
74
  interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayTriggerProps {
70
75
  /**
@@ -77,10 +82,15 @@ interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayT
77
82
  */
78
83
  firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'
79
84
  }
80
- export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, DOMProps {}
85
+ export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, InputDOMProps, DOMProps {}
81
86
 
82
87
  export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {}
83
- export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {}
88
+ export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {
89
+ /**
90
+ * Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).
91
+ */
92
+ autoComplete?: string
93
+ }
84
94
 
85
95
  export type DateRange = RangeValue<DateValue>;
86
96
  export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, 'validate'>, Validation<RangeValue<MappedDateValue<T>>>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T>> | null> {
@@ -127,15 +137,15 @@ interface SpectrumDatePickerBase<T extends DateValue> extends SpectrumDateFieldB
127
137
  shouldFlip?: boolean,
128
138
  /**
129
139
  * 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
140
+ * object for a given calendar identifier. This will be used for the popover calendar. If not provided, the
131
141
  * `createCalendar` function from `@internationalized/date` will be used.
132
142
  */
133
143
  createCalendar?: (identifier: CalendarIdentifier) => ICalendar
134
144
  }
135
145
 
136
- export interface SpectrumDatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'isInvalid' | 'validationState'>, SpectrumDatePickerBase<T> {}
146
+ export interface SpectrumDatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'isInvalid' | 'validationState' | 'autoComplete'>, SpectrumDatePickerBase<T> {}
137
147
  export interface SpectrumDateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'isInvalid' | 'validationState'>, Omit<SpectrumDatePickerBase<T>, 'validate'> {}
138
- export interface SpectrumDateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'isInvalid' | 'validationState'>, SpectrumDateFieldBase<T> {}
148
+ export interface SpectrumDateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'isInvalid' | 'validationState' | 'autoComplete'>, SpectrumDateFieldBase<T> {}
139
149
 
140
150
  export type TimeValue = Time | CalendarDateTime | ZonedDateTime;
141
151
  type MappedTimeValue<T> =