Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-slider

Package Overview
Dependencies
Maintainers
6
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-slider - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0-rc.1

1

dist/index.d.ts

@@ -66,2 +66,3 @@ import * as React from "react";

index: number;
name?: string;
}

@@ -68,0 +69,0 @@ export const Root: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;

27

dist/index.js

@@ -90,9 +90,5 @@ var $inrcs$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");

] , value: value1 , onValueChange: onValueChange = ()=>{} , onValueCommit: onValueCommit = ()=>{} , inverted: inverted = false , ...sliderProps } = props;
const [slider, setSlider] = $inrcs$react.useState(null);
const composedRefs = $inrcs$radixuireactcomposerefs.useComposedRefs(forwardedRef, (node)=>setSlider(node)
);
const thumbRefs = $inrcs$react.useRef(new Set());
const valueIndexToChangeRef = $inrcs$react.useRef(0);
const isHorizontal = orientation === 'horizontal'; // We set this to true by default so that events bubble to forms without JS (SSR)
const isFormControl = slider ? Boolean(slider.closest('form')) : true;
const isHorizontal = orientation === 'horizontal';
const SliderOrientation = isHorizontal ? $1791bb30e2e418d5$var$SliderHorizontal : $1791bb30e2e418d5$var$SliderVertical;

@@ -146,2 +142,3 @@ const [values = [], setValues] = $inrcs$radixuireactusecontrollablestate.useControllableState({

scope: props.__scopeSlider,
name: name,
disabled: disabled,

@@ -162,3 +159,3 @@ min: min,

}, sliderProps, {
ref: composedRefs,
ref: forwardedRef,
onPointerDown: $inrcs$radixuiprimitive.composeEventHandlers(sliderProps.onPointerDown, ()=>{

@@ -194,8 +191,3 @@ if (!disabled) valuesBeforeSlideStartRef.current = values;

}
})))), isFormControl && values.map((value, index)=>/*#__PURE__*/ $inrcs$react.createElement($1791bb30e2e418d5$var$BubbleInput, {
key: index,
name: name ? name + (values.length > 1 ? '[]' : '') : undefined,
value: value
})
));
})))));
});

@@ -442,3 +434,3 @@ /*#__PURE__*/ Object.assign($1791bb30e2e418d5$export$472062a354075cee, {

const $1791bb30e2e418d5$var$SliderThumbImpl = /*#__PURE__*/ $inrcs$react.forwardRef((props, forwardedRef)=>{
const { __scopeSlider: __scopeSlider , index: index , ...thumbProps } = props;
const { __scopeSlider: __scopeSlider , index: index , name: name , ...thumbProps } = props;
const context = $1791bb30e2e418d5$var$useSliderContext($1791bb30e2e418d5$var$THUMB_NAME, __scopeSlider);

@@ -448,3 +440,4 @@ const orientation = $1791bb30e2e418d5$var$useSliderOrientationContext($1791bb30e2e418d5$var$THUMB_NAME, __scopeSlider);

const composedRefs = $inrcs$radixuireactcomposerefs.useComposedRefs(forwardedRef, (node)=>setThumb(node)
);
); // We set this to true by default so that events bubble to forms without JS (SSR)
const isFormControl = thumb ? Boolean(thumb.closest('form')) : true;
const size = $inrcs$radixuireactusesize.useSize(thumb); // We cast because index could be `-1` which would return undefined

@@ -493,3 +486,7 @@ const value = context.values[index];

})
}))));
}))), isFormControl && /*#__PURE__*/ $inrcs$react.createElement($1791bb30e2e418d5$var$BubbleInput, {
key: index,
name: name !== null && name !== void 0 ? name : context.name ? context.name + (context.values.length > 1 ? '[]' : '') : undefined,
value: value
}));
});

@@ -496,0 +493,0 @@ /*#__PURE__*/ Object.assign($1791bb30e2e418d5$export$2c1b491743890dec, {

{
"name": "@radix-ui/react-slider",
"version": "1.1.2",
"version": "1.2.0-rc.1",
"license": "MIT",

@@ -69,3 +69,4 @@ "exports": {

"url": "https://github.com/radix-ui/primitives/issues"
}
},
"stableVersion": "1.1.2"
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc