@react-types/datepicker 3.4.0 → 3.5.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 +15 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/datepicker",
3
- "version": "3.4.0",
3
+ "version": "3.5.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.3.0",
13
- "@react-types/calendar": "^3.3.0",
14
- "@react-types/overlays": "^3.8.0",
15
- "@react-types/shared": "^3.18.1"
12
+ "@internationalized/date": "^3.4.0",
13
+ "@react-types/calendar": "^3.3.1",
14
+ "@react-types/overlays": "^3.8.1",
15
+ "@react-types/shared": "^3.19.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"
22
22
  },
23
- "gitHead": "504e40e0a50c1b20ed0fb3ba9561a263b6d5565e"
23
+ "gitHead": "d4dfe4bb842a914f10045ee63fc6b92f034c5b30"
24
24
  }
package/src/index.d.ts CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  FocusableProps,
17
17
  HelpTextProps,
18
18
  InputBase,
19
+ InputDOMProps,
19
20
  LabelableProps,
20
21
  RangeValue,
21
22
  SpectrumLabelableProps,
@@ -62,7 +63,7 @@ interface DateFieldBase<T extends DateValue> extends InputBase, Validation, Focu
62
63
 
63
64
  interface AriaDateFieldBaseProps<T extends DateValue> extends DateFieldBase<T>, AriaLabelingProps, DOMProps {}
64
65
  export interface DateFieldProps<T extends DateValue> extends DateFieldBase<T>, ValueBase<T | null, MappedDateValue<T>> {}
65
- export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T> {}
66
+ export interface AriaDateFieldProps<T extends DateValue> extends DateFieldProps<T>, AriaDateFieldBaseProps<T>, InputDOMProps {}
66
67
 
67
68
  interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayTriggerProps {
68
69
  /**
@@ -74,7 +75,7 @@ interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayT
74
75
  export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, DOMProps {}
75
76
 
76
77
  export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T>> {}
77
- export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T> {}
78
+ export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {}
78
79
 
79
80
  export type DateRange = RangeValue<DateValue>;
80
81
  export interface DateRangePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T>>> {
@@ -85,7 +86,16 @@ export interface DateRangePickerProps<T extends DateValue> extends DatePickerBas
85
86
  allowsNonContiguousRanges?: boolean
86
87
  }
87
88
 
88
- export interface AriaDateRangePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DateRangePickerProps<T> {}
89
+ export interface AriaDateRangePickerProps<T extends DateValue> extends AriaDatePickerBaseProps<T>, DateRangePickerProps<T> {
90
+ /**
91
+ * The name of the start date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
92
+ */
93
+ startName?: string,
94
+ /**
95
+ * The name of the end date input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
96
+ */
97
+ endName?: string
98
+ }
89
99
 
90
100
  interface SpectrumDateFieldBase extends SpectrumLabelableProps, HelpTextProps, StyleProps {
91
101
  /**
@@ -150,9 +160,9 @@ export interface TimePickerProps<T extends TimeValue> extends InputBase, Validat
150
160
  maxValue?: TimeValue
151
161
  }
152
162
 
153
- export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps {}
163
+ export interface AriaTimeFieldProps<T extends TimeValue> extends TimePickerProps<T>, AriaLabelingProps, DOMProps, InputDOMProps {}
154
164
 
155
- export interface SpectrumTimeFieldProps<T extends TimeValue> extends AriaTimeFieldProps<T>, SpectrumLabelableProps, StyleProps {
165
+ export interface SpectrumTimeFieldProps<T extends TimeValue> extends AriaTimeFieldProps<T>, SpectrumLabelableProps, StyleProps, InputDOMProps {
156
166
  /**
157
167
  * Whether the time field should be displayed with a quiet style.
158
168
  * @default false