@rovula/ui 0.0.24 → 0.0.26

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.
@@ -7,6 +7,10 @@ export type NavbarProps = {
7
7
  center?: ReactNode;
8
8
  container?: boolean;
9
9
  className?: string;
10
+ containerClassName?: string;
11
+ leftNavClassName?: string;
12
+ centerClassName?: string;
13
+ rightNavClassName?: string;
10
14
  };
11
15
  declare const Navbar: FC<NavbarProps>;
12
16
  export default Navbar;
@@ -14,6 +14,10 @@ declare const meta: {
14
14
  center?: React.ReactNode;
15
15
  container?: boolean | undefined;
16
16
  className?: string | undefined;
17
+ containerClassName?: string | undefined;
18
+ leftNavClassName?: string | undefined;
19
+ centerClassName?: string | undefined;
20
+ rightNavClassName?: string | undefined;
17
21
  }>) => import("react/jsx-runtime").JSX.Element)[];
18
22
  };
19
23
  export default meta;
@@ -25,6 +25,7 @@ export * from "./components/AlertDialog/AlertDialog";
25
25
  export * from "./components/Search/Search";
26
26
  export * from "./components/Slider/Slider";
27
27
  export * from "./components/Switch/Switch";
28
+ export * from "./components/DropdownMenu/DropdownMenu";
28
29
  export type { ButtonProps } from "./components/Button/Button";
29
30
  export type { InputProps } from "./components/TextInput/TextInput";
30
31
  export type { DropdownProps, Options } from "./components/Dropdown/Dropdown";
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
12
12
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
13
13
  import * as SliderPrimitive from '@radix-ui/react-slider';
14
14
  import * as SwitchPrimitives from '@radix-ui/react-switch';
15
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
15
16
  import { ClassValue } from 'clsx';
16
17
 
17
18
  type ButtonProps = {
@@ -191,6 +192,10 @@ type NavbarProps = {
191
192
  center?: ReactNode;
192
193
  container?: boolean;
193
194
  className?: string;
195
+ containerClassName?: string;
196
+ leftNavClassName?: string;
197
+ centerClassName?: string;
198
+ rightNavClassName?: string;
194
199
  };
195
200
  declare const Navbar: FC<NavbarProps>;
196
201
 
@@ -398,6 +403,31 @@ type SliderProps = React.ComponentProps<typeof Slider>;
398
403
 
399
404
  declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
400
405
 
406
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
407
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
408
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
409
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
410
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
411
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
412
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
413
+ inset?: boolean | undefined;
414
+ } & React.RefAttributes<HTMLDivElement>>;
415
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
416
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
417
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
418
+ inset?: boolean | undefined;
419
+ } & React.RefAttributes<HTMLDivElement>>;
420
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
421
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
422
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
423
+ inset?: boolean | undefined;
424
+ } & React.RefAttributes<HTMLDivElement>>;
425
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
426
+ declare const DropdownMenuShortcut: {
427
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
428
+ displayName: string;
429
+ };
430
+
401
431
  declare const resloveTimestamp: (timestamp: number) => number;
402
432
  declare const getStartDateOfDay: (date: Date) => Date;
403
433
  declare const getEndDateOfDay: (date: Date) => Date;
@@ -409,4 +439,4 @@ declare const getTimestampUTC: (date: Date) => number;
409
439
 
410
440
  declare function cn(...inputs: ClassValue[]): string;
411
441
 
412
- 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, type DropdownProps, Icon, Input, type InputProps, Label, Loading, Navbar, type NavbarProps, type Options, Popover, PopoverContent, PopoverTrigger, ProgressBar, Search, type SearchProps, Slider, type SliderProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, ForwardedText as Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
442
+ 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, Icon, Input, type InputProps, Label, Loading, Navbar, type NavbarProps, type Options, Popover, PopoverContent, PopoverTrigger, ProgressBar, Search, type SearchProps, Slider, type SliderProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, ForwardedText as Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
package/dist/index.js CHANGED
@@ -27,6 +27,7 @@ export * from "./components/AlertDialog/AlertDialog";
27
27
  export * from "./components/Search/Search";
28
28
  export * from "./components/Slider/Slider";
29
29
  export * from "./components/Switch/Switch";
30
+ export * from "./components/DropdownMenu/DropdownMenu";
30
31
  // UTILS
31
32
  export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./utils/datetime";
32
33
  export { cn } from "./utils/cn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,10 @@ export type NavbarProps = {
9
9
  center?: ReactNode;
10
10
  container?: boolean;
11
11
  className?: string;
12
+ containerClassName?: string;
13
+ leftNavClassName?: string;
14
+ centerClassName?: string;
15
+ rightNavClassName?: string;
12
16
  };
13
17
 
14
18
  const Navbar: FC<NavbarProps> = ({
@@ -19,6 +23,10 @@ const Navbar: FC<NavbarProps> = ({
19
23
  rightNav,
20
24
  position,
21
25
  container = false,
26
+ containerClassName,
27
+ leftNavClassName,
28
+ centerClassName,
29
+ rightNavClassName,
22
30
  }) => {
23
31
  return (
24
32
  <header
@@ -29,21 +37,40 @@ const Navbar: FC<NavbarProps> = ({
29
37
  )}
30
38
  >
31
39
  <div
32
- className={cn("mx-auto flex h-full justify-between items-center", {
33
- container,
34
- })}
40
+ className={cn(
41
+ "mx-auto flex h-full justify-between items-center",
42
+ {
43
+ container,
44
+ },
45
+ containerClassName
46
+ )}
35
47
  >
36
48
  {children || (
37
49
  <>
38
- <nav className="flex w-1/2 gap-x-[var(--navbar-gap)] text-xl">
50
+ <nav
51
+ className={cn(
52
+ "flex w-1/2 gap-x-[var(--navbar-gap)] text-xl",
53
+ leftNavClassName
54
+ )}
55
+ >
39
56
  {leftNav}
40
57
  </nav>
41
58
 
42
- <div className="flex flex-shrink-0 flex-wrap justify-center">
59
+ <div
60
+ className={cn(
61
+ "flex flex-shrink-0 flex-wrap justify-center",
62
+ centerClassName
63
+ )}
64
+ >
43
65
  {center}
44
66
  </div>
45
67
 
46
- <nav className="flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl">
68
+ <nav
69
+ className={cn(
70
+ "flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl",
71
+ rightNavClassName
72
+ )}
73
+ >
47
74
  {rightNav}
48
75
  </nav>
49
76
  </>
package/src/index.ts CHANGED
@@ -32,6 +32,7 @@ export * from "./components/AlertDialog/AlertDialog";
32
32
  export * from "./components/Search/Search";
33
33
  export * from "./components/Slider/Slider";
34
34
  export * from "./components/Switch/Switch";
35
+ export * from "./components/DropdownMenu/DropdownMenu";
35
36
 
36
37
  // Export component types
37
38
  export type { ButtonProps } from "./components/Button/Button";