@react-types/slider
Advanced tools
Comparing version 3.0.0-nightly.2508 to 3.0.0-nightly-4980928d3-240906
{ | ||
"name": "@react-types/slider", | ||
"version": "3.0.0-nightly.2508+78347729", | ||
"version": "3.0.0-nightly-4980928d3-240906", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,7 +12,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-spectrum/slider": "3.0.0-nightly.2508+78347729", | ||
"@react-types/shared": "3.0.0-nightly.830+78347729" | ||
"@react-types/shared": "^3.0.0-nightly-4980928d3-240906" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
}, | ||
@@ -22,3 +21,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "78347729a1af5d16e7fa90120a258841d4cb55a7" | ||
} | ||
"stableVersion": "3.7.5" | ||
} |
@@ -7,2 +7,3 @@ import { | ||
FocusableProps, | ||
InputDOMProps, | ||
LabelableProps, | ||
@@ -14,7 +15,8 @@ LabelPosition, | ||
StyleProps, | ||
Validation, | ||
ValidationState, | ||
ValueBase | ||
} from '@react-types/shared'; | ||
import {ReactNode} from 'react'; | ||
export interface SliderProps<T = number[]> extends RangeInputBase<number>, ValueBase<T>, LabelableProps { | ||
export interface SliderProps<T = number | number[]> extends RangeInputBase<number>, ValueBase<T>, LabelableProps { | ||
/** | ||
@@ -47,6 +49,7 @@ * The orientation of the Slider. | ||
export interface SliderThumbProps extends FocusableProps, Validation, LabelableProps { | ||
export interface SliderThumbProps extends FocusableProps, LabelableProps { | ||
/** | ||
* The orientation of the Slider. | ||
* @default 'horizontal' | ||
* @deprecated - pass to the slider instead. | ||
*/ | ||
@@ -56,8 +59,17 @@ orientation?: Orientation, | ||
isDisabled?: boolean, | ||
/** Index of the thumb for accessing purposes. */ | ||
index: number | ||
/** | ||
* Index of the thumb within the slider. | ||
* @default 0 | ||
*/ | ||
index?: number, | ||
/** @deprecated */ | ||
isRequired?: boolean, | ||
/** @deprecated */ | ||
isInvalid?: boolean, | ||
/** @deprecated */ | ||
validationState?: ValidationState | ||
} | ||
export interface AriaSliderProps<T = number[]> extends SliderProps<T>, DOMProps, AriaLabelingProps {} | ||
export interface AriaSliderThumbProps extends SliderThumbProps, DOMProps, FocusableDOMProps, AriaLabelingProps, AriaValidationProps {} | ||
export interface AriaSliderProps<T = number | number[]> extends SliderProps<T>, DOMProps, AriaLabelingProps {} | ||
export interface AriaSliderThumbProps extends SliderThumbProps, DOMProps, Omit<FocusableDOMProps, 'excludeFromTabOrder'>, InputDOMProps, AriaLabelingProps, AriaValidationProps {} | ||
@@ -77,6 +89,10 @@ export interface SpectrumBarSliderBase<T> extends AriaSliderProps<T>, ValueBase<T>, StyleProps { | ||
/** A function that returns the content to display as the value's label. Overrides default formatted number. */ | ||
getValueLabel?: (value: T) => string | ||
getValueLabel?: (value: T) => string, | ||
/** | ||
* A ContextualHelp element to place next to the label. | ||
*/ | ||
contextualHelp?: ReactNode | ||
} | ||
export interface SpectrumSliderProps extends SpectrumBarSliderBase<number> { | ||
export interface SpectrumSliderProps extends SpectrumBarSliderBase<number>, InputDOMProps { | ||
/** | ||
@@ -101,2 +117,11 @@ * Whether a fill color is shown between the start of the slider and the current value. | ||
export interface SpectrumRangeSliderProps extends SpectrumBarSliderBase<RangeValue<number>> { } | ||
export interface SpectrumRangeSliderProps extends SpectrumBarSliderBase<RangeValue<number>> { | ||
/** | ||
* The name of the start input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | ||
*/ | ||
startName?: string, | ||
/** | ||
* The name of the end input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). | ||
*/ | ||
endName?: string | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
2
115
0
4494
3
+ Added@react-types/shared@3.25.0(transitive)
+ Addedreact@18.3.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)