@rovula/ui 0.0.71 → 0.0.73

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.
@@ -298,3 +298,9 @@ export declare const Diabled: {
298
298
  };
299
299
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
300
300
  };
301
+ export declare const Horizontal: {
302
+ args: {
303
+ disabled: boolean;
304
+ };
305
+ render: (args: {}) => import("react/jsx-runtime").JSX.Element;
306
+ };
@@ -1,5 +1,13 @@
1
1
  import * as React from "react";
2
2
  import * as SliderPrimitive from "@radix-ui/react-slider";
3
- declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
3
+ export interface CustomSliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
4
+ trackClassName?: string;
5
+ rangeClassName?: string;
6
+ thumbClassName?: string;
7
+ trackStyle?: React.CSSProperties;
8
+ thumbStyle?: React.CSSProperties;
9
+ rangeStyle?: React.CSSProperties;
10
+ }
11
+ declare const Slider: React.ForwardRefExoticComponent<CustomSliderProps & React.RefAttributes<HTMLSpanElement>>;
4
12
  export type SliderProps = React.ComponentProps<typeof Slider>;
5
13
  export { Slider };
@@ -1,12 +1,19 @@
1
1
  import React from "react";
2
+ import type { StoryObj } from "@storybook/react";
2
3
  declare const meta: {
3
4
  title: string;
4
- component: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slider").SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
+ component: React.ForwardRefExoticComponent<import("./Slider").CustomSliderProps & React.RefAttributes<HTMLSpanElement>>;
5
6
  tags: string[];
6
7
  parameters: {
7
8
  layout: string;
8
9
  };
9
10
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
11
+ trackClassName?: string | undefined;
12
+ rangeClassName?: string | undefined;
13
+ thumbClassName?: string | undefined;
14
+ trackStyle?: React.CSSProperties | undefined;
15
+ thumbStyle?: React.CSSProperties | undefined;
16
+ rangeStyle?: React.CSSProperties | undefined;
10
17
  suppressHydrationWarning?: boolean | undefined | undefined;
11
18
  className?: string | undefined | undefined;
12
19
  color?: string | undefined | undefined;
@@ -303,3 +310,4 @@ export declare const Default: {
303
310
  };
304
311
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
305
312
  };
313
+ export declare const GradientColor: StoryObj;
@@ -34,6 +34,7 @@ export * from "./components/Toast/Toaster";
34
34
  export * from "./components/Toast/useToast";
35
35
  export * from "./components/Tree";
36
36
  export * from "./components/FocusedScrollView/FocusedScrollView";
37
+ export * from "./components/RadioGroup/RadioGroup";
37
38
  export type { ButtonProps } from "./components/Button/Button";
38
39
  export type { InputProps } from "./components/TextInput/TextInput";
39
40
  export type { DropdownProps, Options } from "./components/Dropdown/Dropdown";
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
16
16
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
17
17
  import * as ToastPrimitives from '@radix-ui/react-toast';
18
18
  import { ToastProviderProps } from '@radix-ui/react-toast';
19
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
19
20
  import { ClassValue } from 'clsx';
20
21
 
21
22
  type ButtonProps = {
@@ -506,7 +507,15 @@ declare const InputFilter: React__default.ForwardRefExoticComponent<{
506
507
  }) => ReactNode;
507
508
  } & Omit<InputProps, "onSelect" | "value"> & React__default.RefAttributes<HTMLInputElement>>;
508
509
 
509
- declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
510
+ interface CustomSliderProps extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
511
+ trackClassName?: string;
512
+ rangeClassName?: string;
513
+ thumbClassName?: string;
514
+ trackStyle?: React.CSSProperties;
515
+ thumbStyle?: React.CSSProperties;
516
+ rangeStyle?: React.CSSProperties;
517
+ }
518
+ declare const Slider: React.ForwardRefExoticComponent<CustomSliderProps & React.RefAttributes<HTMLSpanElement>>;
510
519
  type SliderProps = React.ComponentProps<typeof Slider>;
511
520
 
512
521
  declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -747,6 +756,9 @@ type FocusedScrollViewProps = {
747
756
  };
748
757
  declare const FocusedScrollView: React__default.FC<FocusedScrollViewProps>;
749
758
 
759
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
760
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
761
+
750
762
  declare const resloveTimestamp: (timestamp: number) => number;
751
763
  declare const getStartDateOfDay: (date: Date) => Date;
752
764
  declare const getEndDateOfDay: (date: Date) => Date;
@@ -760,4 +772,4 @@ declare function usePrevious<T>(value: T): T | undefined;
760
772
 
761
773
  declare function cn(...inputs: ClassValue[]): string;
762
774
 
763
- export { ActionButton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Calendar, Checkbox, Collapsible, DataTable, type DataTableProps, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownProps, FocusedScrollView, Icon, Input, InputFilter, type InputFilterProps, type InputProps, Label, Loading, Navbar, type NavbarProps, type Options$1 as Options, Popover, PopoverContent, PopoverTrigger, ProgressBar, Search, type SearchProps, Slider, type SliderProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipSimple, TooltipTrigger, Tree, type TreeData, TreeItem, type TreeItemProps, type TreeProps, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, reducer, resloveTimestamp, toast, usePrevious, useToast };
775
+ export { ActionButton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Calendar, Checkbox, Collapsible, type CustomSliderProps, DataTable, type DataTableProps, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownProps, FocusedScrollView, Icon, Input, InputFilter, type InputFilterProps, type InputProps, Label, Loading, Navbar, type NavbarProps, type Options$1 as Options, Popover, PopoverContent, PopoverTrigger, ProgressBar, RadioGroup, RadioGroupItem, Search, type SearchProps, Slider, type SliderProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipSimple, TooltipTrigger, Tree, type TreeData, TreeItem, type TreeItemProps, type TreeProps, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, reducer, resloveTimestamp, toast, usePrevious, useToast };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ export * from "./components/Toast/Toaster";
36
36
  export * from "./components/Toast/useToast";
37
37
  export * from "./components/Tree";
38
38
  export * from "./components/FocusedScrollView/FocusedScrollView";
39
+ export * from "./components/RadioGroup/RadioGroup";
39
40
  // UTILS
40
41
  export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./utils/datetime";
41
42
  // Hooks
@@ -2559,6 +2559,10 @@ input[type=number] {
2559
2559
  height: 100%;
2560
2560
  }
2561
2561
 
2562
+ .h-1 {
2563
+ height: 0.25rem;
2564
+ }
2565
+
2562
2566
  .h-1\/2 {
2563
2567
  height: 50%;
2564
2568
  }
@@ -2990,6 +2994,12 @@ input[type=number] {
2990
2994
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
2991
2995
  }
2992
2996
 
2997
+ .space-x-4 > :not([hidden]) ~ :not([hidden]) {
2998
+ --tw-space-x-reverse: 0;
2999
+ margin-right: calc(1rem * var(--tw-space-x-reverse));
3000
+ margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
3001
+ }
3002
+
2993
3003
  .space-y-2 > :not([hidden]) ~ :not([hidden]) {
2994
3004
  --tw-space-y-reverse: 0;
2995
3005
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
@@ -3002,6 +3012,12 @@ input[type=number] {
3002
3012
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
3003
3013
  }
3004
3014
 
3015
+ .space-y-8 > :not([hidden]) ~ :not([hidden]) {
3016
+ --tw-space-y-reverse: 0;
3017
+ margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
3018
+ margin-bottom: calc(2rem * var(--tw-space-y-reverse));
3019
+ }
3020
+
3005
3021
  .self-center {
3006
3022
  align-self: center;
3007
3023
  }
@@ -3392,6 +3408,11 @@ input[type=number] {
3392
3408
  border-color: color-mix(in srgb, var(--state-color-warning-stroke) calc(100% * var(--tw-border-opacity, 1)), transparent);
3393
3409
  }
3394
3410
 
3411
+ .border-white {
3412
+ --tw-border-opacity: 1;
3413
+ border-color: rgb(255 255 255 / var(--tw-border-opacity, 1));
3414
+ }
3415
+
3395
3416
  .border-b-\[rgb\(var\(--navbar-border-color\)\)\] {
3396
3417
  border-bottom-color: rgb(var(--navbar-border-color));
3397
3418
  }
@@ -4945,6 +4966,30 @@ input[type=number] {
4945
4966
  background-color: color-mix(in srgb, var(--other-transparency-white-8) calc(100% * var(--tw-bg-opacity, 1)), transparent);
4946
4967
  }
4947
4968
 
4969
+ .bg-gradient-to-r {
4970
+ background-image: linear-gradient(to right, var(--tw-gradient-stops));
4971
+ }
4972
+
4973
+ .from-\[\#848484\] {
4974
+ --tw-gradient-from: #848484 var(--tw-gradient-from-position);
4975
+ --tw-gradient-to: rgb(132 132 132 / 0) var(--tw-gradient-to-position);
4976
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
4977
+ }
4978
+
4979
+ .from-black {
4980
+ --tw-gradient-from: #000 var(--tw-gradient-from-position);
4981
+ --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
4982
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
4983
+ }
4984
+
4985
+ .to-\[\#A00202\] {
4986
+ --tw-gradient-to: #A00202 var(--tw-gradient-to-position);
4987
+ }
4988
+
4989
+ .to-white {
4990
+ --tw-gradient-to: #fff var(--tw-gradient-to-position);
4991
+ }
4992
+
4948
4993
  .fill-action-button-icon-active {
4949
4994
  fill: color-mix(in srgb, var(--action-button-icon-active-text) calc(100% * 1), transparent);
4950
4995
  }
@@ -6023,11 +6068,6 @@ input[type=number] {
6023
6068
  --tw-ring-color: color-mix(in srgb, var(--input-color-error) calc(100% * var(--tw-ring-opacity, 1)), transparent);
6024
6069
  }
6025
6070
 
6026
- .ring-primary {
6027
- --tw-ring-opacity: 1;
6028
- --tw-ring-color: color-mix(in srgb, var(--state-color-primary-default) calc(100% * var(--tw-ring-opacity, 1)), transparent);
6029
- }
6030
-
6031
6071
  .ring-offset-background {
6032
6072
  --tw-ring-offset-color: color-mix(in srgb, var(--background) calc(100% * 1), transparent);
6033
6073
  }
@@ -6037,6 +6077,11 @@ input[type=number] {
6037
6077
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
6038
6078
  }
6039
6079
 
6080
+ .drop-shadow {
6081
+ --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06));
6082
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
6083
+ }
6084
+
6040
6085
  .filter {
6041
6086
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
6042
6087
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,13 +2,13 @@ import { cva } from "class-variance-authority";
2
2
 
3
3
  export const labelVariant = cva(
4
4
  [
5
- "block duration-450 transition-all px-[2px] text-input-text peer-focus:text-input-text-active",
5
+ "block cursor-pointer duration-450 transition-all px-[2px] text-foreground peer-focus:text-input-text-active",
6
6
  ],
7
7
  {
8
8
  variants: {
9
9
  size: {
10
10
  sm: "typography-small1",
11
- md: "typography-subtitile4",
11
+ md: "typography-subtitile2",
12
12
  lg: "typography-subtitile1",
13
13
  },
14
14
  disabled: {
@@ -69,3 +69,30 @@ export const Diabled = {
69
69
  );
70
70
  },
71
71
  } satisfies StoryObj;
72
+
73
+ export const Horizontal = {
74
+ args: {
75
+ disabled: true,
76
+ },
77
+ render: (args) => {
78
+ const props: typeof args = {
79
+ ...args,
80
+ };
81
+ return (
82
+ <RadioGroup defaultValue="option1" className="flex flex-row space-x-4">
83
+ <div className="flex items-center space-x-2">
84
+ <RadioGroupItem value="option1" id="option1" />
85
+ <Label htmlFor="option1">Option 1</Label>
86
+ </div>
87
+ <div className="flex items-center space-x-2">
88
+ <RadioGroupItem value="option2" id="option2" />
89
+ <Label htmlFor="option2">Option 2</Label>
90
+ </div>
91
+ <div className="flex items-center space-x-2">
92
+ <RadioGroupItem value="option3" id="option3" />
93
+ <Label htmlFor="option3">Option 3</Label>
94
+ </div>
95
+ </RadioGroup>
96
+ );
97
+ },
98
+ } satisfies StoryObj;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
3
  import { Slider } from "./Slider";
4
4
 
@@ -13,7 +13,7 @@ const meta = {
13
13
  },
14
14
  decorators: [
15
15
  (Story) => (
16
- <div className="p-5 flex w-full">
16
+ <div className="p-5 flex w-full bg-background">
17
17
  <Story />
18
18
  </div>
19
19
  ),
@@ -45,3 +45,84 @@ export const Default = {
45
45
  );
46
46
  },
47
47
  } satisfies StoryObj;
48
+
49
+ export const GradientColor: StoryObj = {
50
+ render: () => {
51
+ const [exposure, setExposure] = useState([50]);
52
+ const [empty, setEmpty] = useState([50]);
53
+ const [rainbow, setRainbow] = useState([50]);
54
+ const [darkRed, setDarkRed] = useState([50]);
55
+
56
+ return (
57
+ <div className="w-[400px] p-6 space-y-8 rounded-md shadow-lg bg-surface">
58
+ {/* Exposure (Black to White) */}
59
+ <Slider
60
+ value={exposure}
61
+ onValueChange={setExposure}
62
+ className="bg-grey-transparent-24"
63
+ trackClassName="h-1 rounded-full bg-grey-transparent-24 bg-gradient-to-r from-black to-white"
64
+ rangeClassName="bg-unset"
65
+ thumbClassName="bg-white border border-white shadow"
66
+ thumbStyle={{
67
+ filter: "drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.12))",
68
+ }}
69
+ min={0}
70
+ max={100}
71
+ step={1}
72
+ />
73
+
74
+ {/* Empty (no gradient) */}
75
+ <Slider
76
+ value={empty}
77
+ onValueChange={setEmpty}
78
+ className="bg-grey-transparent-24"
79
+ trackClassName="h-1 rounded-full bg-grey-transparent-24"
80
+ rangeClassName="bg-unset"
81
+ thumbClassName="bg-white border border-white shadow"
82
+ thumbStyle={{
83
+ filter: "drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.12))",
84
+ }}
85
+ min={0}
86
+ max={100}
87
+ step={1}
88
+ />
89
+
90
+ {/* Rainbow (custom linear-gradient via style) */}
91
+ <Slider
92
+ value={rainbow}
93
+ onValueChange={setRainbow}
94
+ className="bg-grey-transparent-24"
95
+ trackClassName="h-1 rounded-full bg-grey-transparent-24"
96
+ trackStyle={{
97
+ backgroundImage:
98
+ "linear-gradient(90deg, #F00 0%, #FF8502 11.54%, #F2FF05 23.08%, #06F90F 35.58%, #00E6FF 48.56%, #0404FF 61.54%, #AB02FF 74.52%, #FF069E 87.5%, #FF0408 100%)",
99
+ }}
100
+ rangeClassName="bg-unset"
101
+ thumbClassName="bg-white border border-white shadow"
102
+ thumbStyle={{
103
+ filter: "drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.12))",
104
+ }}
105
+ min={0}
106
+ max={100}
107
+ step={1}
108
+ />
109
+
110
+ {/* Dark Red Gradient */}
111
+ <Slider
112
+ value={darkRed}
113
+ onValueChange={setDarkRed}
114
+ className="bg-grey-transparent-24"
115
+ trackClassName="h-1 rounded-full bg-grey-transparent-24 bg-gradient-to-r from-[#848484] to-[#A00202]"
116
+ rangeClassName="bg-unset"
117
+ thumbClassName="bg-white border border-white shadow"
118
+ thumbStyle={{
119
+ filter: "drop-shadow(0px 6px 12px rgba(0, 0, 0, 0.12))",
120
+ }}
121
+ min={0}
122
+ max={100}
123
+ step={1}
124
+ />
125
+ </div>
126
+ );
127
+ },
128
+ };
@@ -2,30 +2,67 @@
2
2
 
3
3
  import * as React from "react";
4
4
  import * as SliderPrimitive from "@radix-ui/react-slider";
5
-
6
5
  import { cn } from "@/utils/cn";
7
6
 
7
+ export interface CustomSliderProps
8
+ extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
9
+ trackClassName?: string;
10
+ rangeClassName?: string;
11
+ thumbClassName?: string;
12
+ trackStyle?: React.CSSProperties;
13
+ thumbStyle?: React.CSSProperties;
14
+ rangeStyle?: React.CSSProperties;
15
+ }
16
+
8
17
  const Slider = React.forwardRef<
9
18
  React.ElementRef<typeof SliderPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
11
- >(({ className, ...props }, ref) => (
12
- <SliderPrimitive.Root
13
- ref={ref}
14
- className={cn(
15
- "relative flex w-full touch-none select-none items-center",
16
- className
17
- )}
18
- {...props}
19
- >
20
- <SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-grey-50">
21
- <SliderPrimitive.Range className="absolute h-full bg-primary" />
22
- </SliderPrimitive.Track>
23
- {/* <SliderPrimitive.Thumb className="block cursor-pointer h-5 w-5 rounded-full border-[3px] border-primary bg-background ring-offset-background ring-primary 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" /> */}
24
- <SliderPrimitive.Thumb className="block cursor-pointer h-5 w-5 rounded-full border-[3px] border-primary bg-background ring-0 outline-none disabled:pointer-events-none disabled:opacity-50" />
25
- </SliderPrimitive.Root>
26
- ));
19
+ CustomSliderProps
20
+ >(
21
+ (
22
+ {
23
+ className,
24
+ trackClassName,
25
+ rangeClassName,
26
+ thumbClassName,
27
+ thumbStyle,
28
+ trackStyle,
29
+ rangeStyle,
30
+ ...props
31
+ },
32
+ ref
33
+ ) => (
34
+ <SliderPrimitive.Root
35
+ ref={ref}
36
+ className={cn(
37
+ "relative flex w-full touch-none select-none items-center",
38
+ className
39
+ )}
40
+ {...props}
41
+ >
42
+ <SliderPrimitive.Track
43
+ className={cn(
44
+ "relative h-2 w-full grow overflow-hidden rounded-full bg-grey-50",
45
+ trackClassName
46
+ )}
47
+ style={trackStyle}
48
+ >
49
+ <SliderPrimitive.Range
50
+ className={cn("absolute h-full bg-primary", rangeClassName)}
51
+ style={rangeStyle}
52
+ />
53
+ </SliderPrimitive.Track>
54
+ <SliderPrimitive.Thumb
55
+ className={cn(
56
+ "block h-5 w-5 cursor-pointer rounded-full border-[3px] border-primary bg-background outline-none ring-0 transition-colors disabled:pointer-events-none disabled:opacity-50",
57
+ thumbClassName
58
+ )}
59
+ style={thumbStyle}
60
+ />
61
+ </SliderPrimitive.Root>
62
+ )
63
+ );
64
+
27
65
  Slider.displayName = SliderPrimitive.Root.displayName;
28
66
 
29
67
  export type SliderProps = React.ComponentProps<typeof Slider>;
30
-
31
68
  export { Slider };
@@ -271,7 +271,7 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
271
271
  )}
272
272
  {endIconElement}
273
273
 
274
- <label htmlFor={_id} className={cn(labelClassname, labelClassName)}>
274
+ <label htmlFor={_id} className={cn(labelClassname)}>
275
275
  {label}{" "}
276
276
  {required && (
277
277
  <span
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ export * from "./components/Toast/Toaster";
41
41
  export * from "./components/Toast/useToast";
42
42
  export * from "./components/Tree";
43
43
  export * from "./components/FocusedScrollView/FocusedScrollView";
44
+ export * from "./components/RadioGroup/RadioGroup";
44
45
 
45
46
  // Export component types
46
47
  export type { ButtonProps } from "./components/Button/Button";