Skip to content

Commit 560f050

Browse files
Move isWheelDisabled to aria props interface (#5804)
Co-authored-by: Robert Snow <[email protected]>
1 parent 4a7872d commit 560f050

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,14 @@ export interface Color {
9999

100100
export interface ColorFieldProps extends Omit<ValueBase<string | Color | null>, 'onChange'>, InputBase, Validation<Color | null>, FocusableProps, TextInputBase, LabelableProps, HelpTextProps {
101101
/** Handler that is called when the value changes. */
102-
onChange?: (color: Color | null) => void,
102+
onChange?: (color: Color | null) => void
103+
}
104+
105+
export interface AriaColorFieldProps extends ColorFieldProps, AriaLabelingProps, FocusableDOMProps, Omit<TextInputDOMProps, 'minLength' | 'maxLength' | 'pattern' | 'type' | 'inputMode' | 'autoComplete'>, AriaValidationProps {
103106
/** Enables or disables changing the value with scroll. */
104107
isWheelDisabled?: boolean
105108
}
106109

107-
export interface AriaColorFieldProps extends ColorFieldProps, AriaLabelingProps, FocusableDOMProps, Omit<TextInputDOMProps, 'minLength' | 'maxLength' | 'pattern' | 'type' | 'inputMode' | 'autoComplete'>, AriaValidationProps {}
108-
109110
export interface SpectrumColorFieldProps extends SpectrumTextInputBase, Omit<AriaColorFieldProps, 'isInvalid' | 'validationState'>, SpectrumFieldValidation<Color | null>, SpectrumLabelableProps, StyleProps {
110111
/** Whether the ColorField should be displayed with a quiet style. */
111112
isQuiet?: boolean

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ export interface NumberFieldProps extends InputBase, Validation<number>, Focusab
2929
* Formatting options for the value displayed in the number field.
3030
* This also affects what characters are allowed to be typed by the user.
3131
*/
32-
formatOptions?: Intl.NumberFormatOptions,
33-
/**
34-
* Enables or disables changing the value with scroll.
35-
*/
36-
isWheelDisabled?: boolean
32+
formatOptions?: Intl.NumberFormatOptions
3733
}
3834

3935
export interface AriaNumberFieldProps extends NumberFieldProps, DOMProps, AriaLabelingProps, TextInputDOMEvents {
4036
/** A custom aria-label for the decrement button. If not provided, the localized string "Decrement" is used. */
4137
decrementAriaLabel?: string,
4238
/** A custom aria-label for the increment button. If not provided, the localized string "Increment" is used. */
43-
incrementAriaLabel?: string
39+
incrementAriaLabel?: string,
40+
/**
41+
* Enables or disables changing the value with scroll.
42+
*/
43+
isWheelDisabled?: boolean
4444
}
4545

4646
export interface SpectrumNumberFieldProps extends Omit<AriaNumberFieldProps, 'placeholder' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation<number>, InputDOMProps, StyleProps, SpectrumLabelableProps {

0 commit comments

Comments
 (0)