-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Convert React Aria Components examples to TypeScript #4212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good for modified examples
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'identifier', name: 'Column' } @react-aria/calendarDateValue-
+DateValue {
+ D: undefined
+} it changed:
@react-aria/comboboxAriaComboBoxProps-
+AriaComboBoxProps<T> {
+ allowsCustomValue?: boolean
+ defaultInputValue?: string
+ defaultItems?: Iterable<T>
+ inputValue?: string
+ items?: Iterable<T>
+ menuTrigger?: MenuTriggerAction = 'input'
+ name?: string
+ onInputChange?: (string) => void
+ onOpenChange?: (boolean, MenuTriggerAction) => void
+ shouldFocusWrap?: boolean
+} @react-aria/datepickeruseDateFieldchanged by:
useDateField<T extends DateValue> {
- props: AriaDateFieldProps<T>
+ props: AriaDateFieldOptions<T>
state: DateFieldState
ref: RefObject<Element>
returnVal: undefined
} AriaDateFieldPropschanged by:
AriaDateFieldProps<T extends DateValue> {
-
+ granularity?: Granularity
+ hideTimeZone?: boolean = false
+ hourCycle?: number | number
+ isDateUnavailable?: (DateValue) => boolean
+ maxValue?: DateValue
+ minValue?: DateValue
+ placeholderValue?: DateValue
} it changed:
DateRangechanged by:
-
+DateRange {
+ D: undefined
+} DateValue-
+DateValue {
+ D: undefined
+} it changed:
TimeValue-
+TimeValue {
+ T: undefined
+} it changed:
AriaDateFieldOptions+AriaDateFieldOptions<T extends DateValue> {
+} it changed:
@react-aria/overlaysPlacement-
+Placement {
+ P: undefined
+} it changed:
PlacementAxis-
+PlacementAxis {
+ P: undefined
+} PositionPropschanged by:
-
+PositionProps {
+ containerPadding?: number = 12
+ crossOffset?: number = 0
+ isOpen?: boolean
+ offset?: number = 0
+ placement?: Placement = 'bottom'
+ shouldFlip?: boolean = true
+} @react-aria/radioOrientation-
+Orientation {
+ O: undefined
+} @react-aria/selectAriaSelectProps-
+AriaSelectProps<T> {
+ autoComplete?: string
+ defaultOpen?: boolean
+ isOpen?: boolean
+ name?: string
+ onOpenChange?: (boolean) => void
+} @react-aria/sliderAriaSliderThumbProps-
+AriaSliderThumbProps {
+ index?: number = 0
+ isDisabled?: boolean
+} Orientation-
+Orientation {
+ O: undefined
+} @react-aria/tabsOrientation-
+Orientation {
+ O: undefined
+} @react-stately/tablebuildHeaderRows-
+buildHeaderRows<T> {
+ keyMap: Map<Key, GridNode<T>>
+ columnNodes: Array<GridNode<T>>
+ returnVal: undefined
+} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This converts the examples in the React Aria Components docs to TypeScript, and fixes some type issues in the implementation.
forwardRef
function to which supports generics unlike the default type.strictFunctionTypes
. For now I had to add additional annotations.