@rovula/ui 0.0.72 → 0.0.74

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
+ };
@@ -16,3 +16,4 @@ export declare const Leaf: StoryObj<typeof Tree>;
16
16
  export declare const HideCheckboxMode: StoryObj<typeof Tree>;
17
17
  export declare const RadioMode: StoryObj<typeof Tree>;
18
18
  export declare const CheckAll: StoryObj<typeof Tree>;
19
+ export declare const LongText: StoryObj<typeof Tree>;
@@ -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
@@ -2770,6 +2770,10 @@ input[type=number] {
2770
2770
  min-width: fit-content;
2771
2771
  }
2772
2772
 
2773
+ .max-w-\[300px\] {
2774
+ max-width: 300px;
2775
+ }
2776
+
2773
2777
  .max-w-full {
2774
2778
  max-width: 100%;
2775
2779
  }
@@ -2994,6 +2998,12 @@ input[type=number] {
2994
2998
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
2995
2999
  }
2996
3000
 
3001
+ .space-x-4 > :not([hidden]) ~ :not([hidden]) {
3002
+ --tw-space-x-reverse: 0;
3003
+ margin-right: calc(1rem * var(--tw-space-x-reverse));
3004
+ margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
3005
+ }
3006
+
2997
3007
  .space-y-2 > :not([hidden]) ~ :not([hidden]) {
2998
3008
  --tw-space-y-reverse: 0;
2999
3009
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
@@ -3058,6 +3068,10 @@ input[type=number] {
3058
3068
  white-space: nowrap;
3059
3069
  }
3060
3070
 
3071
+ .break-all {
3072
+ word-break: break-all;
3073
+ }
3074
+
3061
3075
  .rounded {
3062
3076
  border-radius: 0.25rem;
3063
3077
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.72",
3
+ "version": "0.0.74",
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
@@ -446,3 +446,103 @@ export const CheckAll: StoryObj<typeof Tree> = {
446
446
  );
447
447
  },
448
448
  };
449
+
450
+ export const LongText: StoryObj<typeof Tree> = {
451
+ args: {
452
+ data: [
453
+ {
454
+ id: "2699d80b-6772-4878-9639-75e370786e79",
455
+ title:
456
+ "Level1 RUNLINE_LV_2_00000000000000000000000000000000000000000000000000000000",
457
+ children: [
458
+ {
459
+ id: "9b4511f4-ad9a-42e0-8376-60d5edbeffb3",
460
+ title:
461
+ "Level1 RUNLINE_LV_3_0000000000000000000000000000000000000000000000000000",
462
+ children: [
463
+ {
464
+ id: "c8d5dfb5-6c61-482b-88fe-186eb7685479",
465
+ title: "2025-07-27_05-25-53",
466
+ children: [],
467
+ },
468
+ {
469
+ id: "81ff1dd0-b283-4f60-864e-5d814e99d903",
470
+ title: "2025-07-27_06-05-53",
471
+ children: [],
472
+ },
473
+ ],
474
+ },
475
+ ],
476
+ },
477
+ {
478
+ id: "ad79c17b-2861-431a-af0e-3f1c73164508",
479
+ title: "RUNLINE_LV_2",
480
+ children: [
481
+ {
482
+ id: "46ee87c4-4ea7-48f8-9ed9-14833e4dacc2",
483
+ title: "2025-07-27_06-25-53",
484
+ children: [],
485
+ },
486
+ {
487
+ id: "1379b081-9f7f-4d82-8470-8321d9b7de0c",
488
+ title: "RUNLINE_LV_3",
489
+ children: [
490
+ {
491
+ id: "cf9145d4-ad06-4433-8384-4c10d266a6aa",
492
+ title: "2025-07-26_19-01-31",
493
+ children: [],
494
+ },
495
+ {
496
+ id: "f247313c-01cb-4363-a390-a72b889c72d3",
497
+ title: "2025-07-26_19-11-31",
498
+ children: [],
499
+ },
500
+ {
501
+ id: "0b7c650a-0d78-4e6e-8399-5dbaeb510751",
502
+ title: "Lv4",
503
+ children: [
504
+ {
505
+ id: "88d89572-462d-46c9-b4d0-4df736117799",
506
+ title: "Lv 5",
507
+ children: [],
508
+ },
509
+ ],
510
+ },
511
+ ],
512
+ },
513
+ ],
514
+ },
515
+ ],
516
+ },
517
+ render: (args) => {
518
+ const [isCheckedAll, setIsCheckedAll] = useState(false);
519
+ const [checkedId, onCheckedId] = useState<string[]>([]);
520
+
521
+ return (
522
+ <div className="flex flex-col gap-4 w-full">
523
+ <div className="flex gap-2">
524
+ <Button
525
+ variant="outline"
526
+ onClick={() => setIsCheckedAll(!isCheckedAll)}
527
+ >
528
+ {isCheckedAll ? "Unchecked" : "Checked"} All
529
+ </Button>
530
+ <Button variant="outline" onClick={() => onCheckedId([])}>
531
+ Clear
532
+ </Button>
533
+ </div>
534
+ <div className="w-full max-w-[300px]">
535
+ <Tree
536
+ {...args}
537
+ hierarchicalCheck
538
+ checkedAll={isCheckedAll}
539
+ checkedId={checkedId}
540
+ onCheckedChange={(state) => {
541
+ onCheckedId(Object.keys(state).filter((key) => state?.[key]));
542
+ }}
543
+ />
544
+ </div>
545
+ </div>
546
+ );
547
+ },
548
+ };
@@ -241,7 +241,7 @@ const TreeItem: FC<TreeItemProps> = ({
241
241
  {showIcon ? customIcon || defaultIcon : null}
242
242
  <div
243
243
  className={cn(
244
- "flex flex-1 cursor-pointer text-subtitle5 text-ellipsis",
244
+ "flex flex-1 cursor-pointer text-subtitle5 text-ellipsis overflow-hidden break-all text-left",
245
245
  classes?.title
246
246
  )}
247
247
  >
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";