@meta-1/design 0.0.188 → 0.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/components/ui/slider.tsx +26 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meta-1/design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.189",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"easykit",
|
|
6
6
|
"design",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@radix-ui/react-scroll-area": "1.2.1",
|
|
41
41
|
"@radix-ui/react-select": "2.1.2",
|
|
42
42
|
"@radix-ui/react-separator": "1.1.0",
|
|
43
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
43
44
|
"@radix-ui/react-slot": "1.1.0",
|
|
44
45
|
"@radix-ui/react-switch": "1.1.1",
|
|
45
46
|
"@radix-ui/react-tabs": "1.1.1",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@meta-1/design/lib/utils"
|
|
5
|
+
|
|
6
|
+
const Slider = React.forwardRef<
|
|
7
|
+
React.ElementRef<typeof SliderPrimitive.Root>,
|
|
8
|
+
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
|
9
|
+
>(({ className, ...props }, ref) => (
|
|
10
|
+
<SliderPrimitive.Root
|
|
11
|
+
ref={ref}
|
|
12
|
+
className={cn(
|
|
13
|
+
"relative flex w-full touch-none select-none items-center",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
19
|
+
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
20
|
+
</SliderPrimitive.Track>
|
|
21
|
+
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
22
|
+
</SliderPrimitive.Root>
|
|
23
|
+
))
|
|
24
|
+
Slider.displayName = SliderPrimitive.Root.displayName
|
|
25
|
+
|
|
26
|
+
export { Slider }
|
package/src/index.ts
CHANGED