@react-types/calendar 3.0.0-nightly.3175 → 3.0.0-rc.1

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 +5 -5
  2. package/src/index.d.ts +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/calendar",
3
- "version": "3.0.0-nightly.3175+91ca94fe5",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,14 +9,14 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@internationalized/date": "3.0.0-nightly.3175+91ca94fe5",
13
- "@react-types/shared": "3.0.0-nightly.1476+91ca94fe5"
12
+ "@internationalized/date": "3.0.0-rc.1",
13
+ "@react-types/shared": "^3.13.0"
14
14
  },
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
18
18
  "peerDependencies": {
19
- "react": "^16.8.0 || ^17.0.0-rc.1"
19
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
20
20
  },
21
- "gitHead": "91ca94fe52840b7a32b961ec08208f5fbdf65697"
21
+ "gitHead": "8f921ec5094e7c2b3c301bcb6133372e35a2052b"
22
22
  }
package/src/index.d.ts CHANGED
@@ -11,7 +11,8 @@
11
11
  */
12
12
 
13
13
  import {CalendarDate, CalendarDateTime, ZonedDateTime} from '@internationalized/date';
14
- import {DOMProps, RangeValue, StyleProps, ValueBase} from '@react-types/shared';
14
+ import {DOMProps, RangeValue, StyleProps, ValidationState, ValueBase} from '@react-types/shared';
15
+ import {ReactNode} from 'react';
15
16
 
16
17
  export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
17
18
  type MappedDateValue<T> =
@@ -47,7 +48,11 @@ export interface CalendarPropsBase {
47
48
  /** The date that is focused when the calendar first mounts (uncountrolled). */
48
49
  defaultFocusedValue?: DateValue,
49
50
  /** Handler that is called when the focused date changes. */
50
- onFocusChange?: (date: CalendarDate) => void
51
+ onFocusChange?: (date: CalendarDate) => void,
52
+ /** Whether the current selection is valid or invalid according to application logic. */
53
+ validationState?: ValidationState,
54
+ /** An error message to display when the selected value is invalid. */
55
+ errorMessage?: ReactNode
51
56
  }
52
57
 
53
58
  export type DateRange = RangeValue<DateValue>;