@react-types/switch
Advanced tools
Comparing version 3.0.0-rc.2 to 3.0.0-rc.3
{ | ||
"name": "@react-types/switch", | ||
"version": "3.0.0-rc.2", | ||
"version": "3.0.0-rc.3", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,4 +12,4 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-types/checkbox": "^3.0.0-rc.2", | ||
"@react-types/shared": "^3.0.0-rc.2" | ||
"@react-types/checkbox": "3.0.0-rc.3", | ||
"@react-types/shared": "3.0.0-rc.3" | ||
}, | ||
@@ -22,3 +22,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
"gitHead": "461d6321126ae9b4f1508aa912f7b36bf8a603f8" | ||
} |
@@ -13,13 +13,27 @@ /* | ||
import {CheckboxBase} from '@react-types/checkbox'; | ||
import {DOMProps, StyleProps} from '@react-types/shared'; | ||
import {AriaLabelingProps, FocusableDOMProps, FocusableProps, InputBase, StyleProps} from '@react-types/shared'; | ||
import {ReactNode} from 'react'; | ||
export type SwitchProps = CheckboxBase; | ||
export interface SpectrumSwitchProps extends SwitchProps, DOMProps, StyleProps { | ||
interface SwitchBase extends InputBase, FocusableProps { | ||
children?: ReactNode, // pass in children to render label | ||
defaultSelected?: boolean, | ||
isSelected?: boolean, | ||
onChange?: (isSelected: boolean) => void, | ||
value?: string, // dom prop for input element | ||
name?: string | ||
} | ||
export interface SwitchProps extends SwitchBase {} | ||
export interface AriaSwitchBase extends SwitchBase, FocusableDOMProps, AriaLabelingProps { | ||
/** | ||
* By default, switches are not emphasized (gray). | ||
* This prop sets the emphasized style (blue) which provides visual prominence. | ||
* @default "false" | ||
* Identifies the element (or elements) whose contents or presence are controlled by the current element. | ||
*/ | ||
'aria-controls'?: string | ||
} | ||
export interface AriaSwitchProps extends SwitchProps, AriaSwitchBase {} | ||
export interface SpectrumSwitchProps extends AriaSwitchProps, StyleProps { | ||
/** | ||
* This prop sets the emphasized style which provides visual prominence. | ||
*/ | ||
isEmphasized?: boolean | ||
} |
13627
35
+ Added@react-types/checkbox@3.0.0-rc.3(transitive)
+ Added@react-types/shared@3.0.0-rc.3(transitive)
- Removed@react-types/checkbox@3.9.1(transitive)
- Removed@react-types/shared@3.27.0(transitive)