@react-stately/color
Advanced tools
Comparing version 3.0.0-nightly.2645 to 3.0.0-nightly.2655
@@ -857,3 +857,8 @@ var { | ||
isDragging | ||
isDragging, | ||
getDisplayColor() { | ||
return value.withChannelValue('saturation', 100).withChannelValue('lightness', 50); | ||
} | ||
}; | ||
@@ -860,0 +865,0 @@ } |
@@ -825,3 +825,8 @@ import { useRef, useState, useMemo, useEffect } from "react"; | ||
isDragging | ||
isDragging, | ||
getDisplayColor() { | ||
return value.withChannelValue('saturation', 100).withChannelValue('lightness', 50); | ||
} | ||
}; | ||
@@ -828,0 +833,0 @@ } |
@@ -23,5 +23,5 @@ import { Color, ColorSliderProps, ColorWheelProps, ColorFieldProps } from "@react-types/color"; | ||
export interface ColorWheelState { | ||
/** The current color value displayed by the color wheel. */ | ||
/** The current color value represented by the color wheel. */ | ||
readonly value: Color; | ||
/** Sets the color value displayed by the color wheel, and triggers `onChange`. */ | ||
/** Sets the color value represented by the color wheel, and triggers `onChange`. */ | ||
setValue(value: string | Color): void; | ||
@@ -43,6 +43,8 @@ /** The current value of the hue channel displayed by the color wheel. */ | ||
decrement(minStepSize?: number): void; | ||
/** Whether the cxolor wheel is currently being dragged. */ | ||
/** Whether the color wheel is currently being dragged. */ | ||
readonly isDragging: boolean; | ||
/** Sets whether the color wheel is being dragged. */ | ||
setDragging(value: boolean): void; | ||
/** Returns the color that should be displayed in the color wheel instead of `value`. */ | ||
getDisplayColor(): Color; | ||
} | ||
@@ -49,0 +51,0 @@ /** |
{ | ||
"name": "@react-stately/color", | ||
"version": "3.0.0-nightly.2645+2ba18db9", | ||
"version": "3.0.0-nightly.2655+f0afbae7", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,9 +21,9 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@internationalized/message": "3.0.0-nightly.2645+2ba18db9", | ||
"@internationalized/number": "3.0.0-nightly.2645+2ba18db9", | ||
"@react-aria/utils": "3.0.0-nightly.967+2ba18db9", | ||
"@react-stately/slider": "3.0.2-nightly.2645+2ba18db9", | ||
"@react-stately/utils": "3.0.0-nightly.967+2ba18db9", | ||
"@react-types/color": "3.0.0-nightly.2645+2ba18db9", | ||
"@react-types/numberfield": "3.0.0-nightly.2645+2ba18db9" | ||
"@internationalized/message": "3.0.0-nightly.2655+f0afbae7", | ||
"@internationalized/number": "3.0.0-nightly.2655+f0afbae7", | ||
"@react-aria/utils": "3.0.0-nightly.975+f0afbae7", | ||
"@react-stately/slider": "3.0.2-nightly.2655+f0afbae7", | ||
"@react-stately/utils": "3.0.0-nightly.975+f0afbae7", | ||
"@react-types/color": "3.0.0-nightly.2655+f0afbae7", | ||
"@react-types/numberfield": "3.0.0-nightly.2655+f0afbae7" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "2ba18db9035b4a1c50803040fc40bf946141bded" | ||
"gitHead": "f0afbae764727b3062170852006ea38689a34f97" | ||
} |
@@ -19,5 +19,5 @@ /* | ||
export interface ColorWheelState { | ||
/** The current color value displayed by the color wheel. */ | ||
/** The current color value represented by the color wheel. */ | ||
readonly value: Color, | ||
/** Sets the color value displayed by the color wheel, and triggers `onChange`. */ | ||
/** Sets the color value represented by the color wheel, and triggers `onChange`. */ | ||
setValue(value: string | Color): void, | ||
@@ -40,6 +40,8 @@ | ||
/** Whether the cxolor wheel is currently being dragged. */ | ||
/** Whether the color wheel is currently being dragged. */ | ||
readonly isDragging: boolean, | ||
/** Sets whether the color wheel is being dragged. */ | ||
setDragging(value: boolean): void | ||
setDragging(value: boolean): void, | ||
/** Returns the color that should be displayed in the color wheel instead of `value`. */ | ||
getDisplayColor(): Color | ||
} | ||
@@ -166,4 +168,7 @@ | ||
}, | ||
isDragging | ||
isDragging, | ||
getDisplayColor() { | ||
return value.withChannelValue('saturation', 100).withChannelValue('lightness', 50); | ||
} | ||
}; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
249920
2417