@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
52 lines (51 loc) • 1.89 kB
JavaScript
"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { mergeProps } from "@base-ui/react/merge-props";
import { Slider } from "@base-ui/react/slider";
import { useRender } from "@base-ui/react/use-render";
import { cn } from "../../lib/utilities.js";
import slider_module from "./slider.module.js";
import * as __rspack_external_react from "react";
const slider_Slider = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
const { className, defaultValue, onValueChange, onValueCommitted, render, value, ...otherProps } = props;
return /*#__PURE__*/ jsx(Slider.Root, {
ref: ref,
defaultValue: defaultValue,
onValueChange: (nextValue, eventDetails)=>{
onValueChange?.([
...nextValue
], eventDetails);
},
onValueCommitted: (nextValue, eventDetails)=>{
onValueCommitted?.([
...nextValue
], eventDetails);
},
value: value,
...otherProps,
render: useRender({
defaultTagName: "div",
render: render,
props: mergeProps({
className: cn(slider_module.root, className)
}, {})
}),
children: /*#__PURE__*/ jsxs(Slider.Control, {
className: slider_module.control,
children: [
/*#__PURE__*/ jsx(Slider.Track, {
className: slider_module.track,
children: /*#__PURE__*/ jsx(Slider.Indicator, {
className: slider_module.indicator
})
}),
/*#__PURE__*/ jsx(Slider.Thumb, {
className: slider_module.thumb
})
]
})
});
});
slider_Slider.displayName = "Slider";
export { slider_Slider as Slider };
//# sourceMappingURL=slider.js.map