Skip to content

Commit f689c32

Browse files
committed
fix stately form props
1 parent e2d24fc commit f689c32

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

packages/@react-types/checkbox/src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export interface AriaToggleProps extends ToggleProps, FocusableDOMProps, AriaLab
6464
'aria-controls'?: string
6565
}
6666

67-
export interface CheckboxGroupProps extends ValueBase<string[]>, InputBase, InputDOMProps, LabelableProps, HelpTextProps, Validation<string[]> {}
67+
export interface CheckboxGroupProps extends ValueBase<string[]>, Pick<InputDOMProps, 'name'>, InputBase, LabelableProps, HelpTextProps, Validation<string[]> {}
6868

6969
export interface CheckboxProps extends ToggleProps {
7070
/**
@@ -74,9 +74,9 @@ export interface CheckboxProps extends ToggleProps {
7474
isIndeterminate?: boolean
7575
}
7676

77-
export interface AriaCheckboxProps extends CheckboxProps, AriaToggleProps {}
77+
export interface AriaCheckboxProps extends CheckboxProps, InputDOMProps, AriaToggleProps {}
7878

79-
export interface AriaCheckboxGroupProps extends CheckboxGroupProps, DOMProps, AriaLabelingProps, AriaValidationProps, FocusEvents {}
79+
export interface AriaCheckboxGroupProps extends CheckboxGroupProps, InputDOMProps, DOMProps, AriaLabelingProps, AriaValidationProps, FocusEvents {}
8080

8181
export interface AriaCheckboxGroupItemProps extends Omit<AriaCheckboxProps, 'isSelected' | 'defaultSelected'> {
8282
value: string

packages/@react-types/datepicker/src/index.d.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ interface DatePickerBase<T extends DateValue> extends DateFieldBase<T>, OverlayT
8181
*/
8282
firstDayOfWeek?: 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'
8383
}
84-
export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, DOMProps {}
84+
export interface AriaDatePickerBaseProps<T extends DateValue> extends DatePickerBase<T>, AriaLabelingProps, InputDOMProps, DOMProps {}
8585

8686
export interface DatePickerProps<T extends DateValue> extends DatePickerBase<T>, ValueBase<T | null, MappedDateValue<T> | null> {}
87-
export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T>, InputDOMProps {}
87+
export interface AriaDatePickerProps<T extends DateValue> extends DatePickerProps<T>, AriaDatePickerBaseProps<T> {}
8888

8989
export type DateRange = RangeValue<DateValue>;
9090
export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePickerBase<T>, 'validate' | 'autoComplete'>, Validation<RangeValue<MappedDateValue<T>>>, ValueBase<RangeValue<T> | null, RangeValue<MappedDateValue<T>> | null> {
@@ -100,13 +100,7 @@ export interface DateRangePickerProps<T extends DateValue> extends Omit<DatePick
100100
/**
101101
* 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).
102102
*/
103-
endName?: string,
104-
/**
105-
* The `<form>` element to associate the input with.
106-
* The value of this attribute must be the id of a `<form>` in the same document.
107-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).
108-
*/
109-
form?: string
103+
endName?: string
110104
}
111105

112106
export interface AriaDateRangePickerProps<T extends DateValue> extends Omit<AriaDatePickerBaseProps<T>, 'validate' | 'autoComplete'>, DateRangePickerProps<T> {}
@@ -137,7 +131,7 @@ interface SpectrumDatePickerBase<T extends DateValue> extends SpectrumDateFieldB
137131
shouldFlip?: boolean,
138132
/**
139133
* A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
140-
* object for a given calendar identifier. This will be used for the popover calendar. If not provided, the
134+
* object for a given calendar identifier. This will be used for the popover calendar. If not provided, the
141135
* `createCalendar` function from `@internationalized/date` will be used.
142136
*/
143137
createCalendar?: (identifier: CalendarIdentifier) => ICalendar

packages/@react-types/radio/src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
} from '@react-types/shared';
3131
import {ReactElement, ReactNode} from 'react';
3232

33-
export interface RadioGroupProps extends ValueBase<string|null, string>, InputBase, InputDOMProps, Validation<string | null>, LabelableProps, HelpTextProps, FocusEvents {
33+
export interface RadioGroupProps extends ValueBase<string|null, string>, InputBase, Pick<InputDOMProps, 'name'>, Validation<string | null>, LabelableProps, HelpTextProps, FocusEvents {
3434
/**
3535
* The axis the Radio Button(s) should align with.
3636
* @default 'vertical'
@@ -55,7 +55,7 @@ export interface RadioProps extends FocusableProps {
5555
isDisabled?: boolean
5656
}
5757

58-
export interface AriaRadioGroupProps extends RadioGroupProps, DOMProps, AriaLabelingProps, AriaValidationProps {}
58+
export interface AriaRadioGroupProps extends RadioGroupProps, InputDOMProps, DOMProps, AriaLabelingProps, AriaValidationProps {}
5959
export interface SpectrumRadioGroupProps extends AriaRadioGroupProps, SpectrumLabelableProps, StyleProps, SpectrumHelpTextProps {
6060
/**
6161
* The Radio(s) contained within the RadioGroup.

0 commit comments

Comments
 (0)