@rovula/ui 0.0.72 → 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
+ };
@@ -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 = {
@@ -755,6 +756,9 @@ type FocusedScrollViewProps = {
755
756
  };
756
757
  declare const FocusedScrollView: React__default.FC<FocusedScrollViewProps>;
757
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
+
758
762
  declare const resloveTimestamp: (timestamp: number) => number;
759
763
  declare const getStartDateOfDay: (date: Date) => Date;
760
764
  declare const getEndDateOfDay: (date: Date) => Date;
@@ -768,4 +772,4 @@ declare function usePrevious<T>(value: T): T | undefined;
768
772
 
769
773
  declare function cn(...inputs: ClassValue[]): string;
770
774
 
771
- 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, 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
@@ -2994,6 +2994,12 @@ input[type=number] {
2994
2994
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
2995
2995
  }
2996
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
+
2997
3003
  .space-y-2 > :not([hidden]) ~ :not([hidden]) {
2998
3004
  --tw-space-y-reverse: 0;
2999
3005
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.72",
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;
@@ -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";