adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
13.08k stars 1.14k forks source link

fix: remove unsupported props on togglebutton #7393

Closed snowystinger closed 6 days ago

snowystinger commented 1 week ago

Closes found in audit, up for discussion

โœ… Pull Request Checklist:

๐Ÿ“ Test Instructions:

๐Ÿงข Your Project:

rspbot commented 1 week ago

Build successful! ๐ŸŽ‰

rspbot commented 1 week ago
## API Changes ### @react-spectrum/s2 #### /@react-spectrum/s2:ToggleButton ```diff ToggleButton { UNSAFE_className?: string UNSAFE_style?: CSSProperties - aria-controls?: string aria-describedby?: string aria-details?: string - aria-expanded?: boolean | 'true' | 'false' - aria-haspopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false' aria-label?: string aria-labelledby?: string aria-pressed?: boolean | 'true' | 'false' | 'mixed' autoFocus?: boolean children?: ReactNode defaultSelected?: boolean - excludeFromTabOrder?: boolean id?: Key isDisabled?: boolean isEmphasized?: boolean isQuiet?: boolean onBlur?: (FocusEvent) => void onChange?: (boolean) => void onFocus?: (FocusEvent) => void onFocusChange?: (boolean) => void onKeyDown?: (KeyboardEvent) => void onKeyUp?: (KeyboardEvent) => void onPress?: (PressEvent) => void onPressChange?: (boolean) => void onPressEnd?: (PressEvent) => void onPressStart?: (PressEvent) => void onPressUp?: (PressEvent) => void preventFocusOnPress?: boolean size?: 'XS' | 'S' | 'M' | 'L' | 'XL' = 'M' slot?: string | null staticColor?: 'black' | 'white' styles?: StylesProp type?: 'button' | 'submit' | 'reset' = 'button' } ``` #### /@react-spectrum/s2:ToggleButtonProps ```diff ToggleButtonProps { UNSAFE_className?: string UNSAFE_style?: CSSProperties - aria-controls?: string aria-describedby?: string aria-details?: string - aria-expanded?: boolean | 'true' | 'false' - aria-haspopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false' aria-label?: string aria-labelledby?: string aria-pressed?: boolean | 'true' | 'false' | 'mixed' autoFocus?: boolean children?: ReactNode defaultSelected?: boolean - excludeFromTabOrder?: boolean id?: Key isDisabled?: boolean isEmphasized?: boolean isQuiet?: boolean onBlur?: (FocusEvent) => void onChange?: (boolean) => void onFocus?: (FocusEvent) => void onFocusChange?: (boolean) => void onKeyDown?: (KeyboardEvent) => void onKeyUp?: (KeyboardEvent) => void onPress?: (PressEvent) => void onPressChange?: (boolean) => void onPressEnd?: (PressEvent) => void onPressStart?: (PressEvent) => void onPressUp?: (PressEvent) => void preventFocusOnPress?: boolean size?: 'XS' | 'S' | 'M' | 'L' | 'XL' = 'M' slot?: string | null staticColor?: 'black' | 'white' styles?: StylesProp type?: 'button' | 'submit' | 'reset' = 'button' } ``` -----------------------------------
snowystinger commented 6 days ago

found a use case where these are useful, keeping for now