shadcn-packaged 2025.8.25 → 2025.9.8
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/index.css +20 -0
- package/package.json +4 -4
- package/ui/accordion.d.ts +4 -4
- package/ui/accordion.jsx +15 -20
- package/ui/alert-dialog.d.ts +17 -11
- package/ui/alert-dialog.jsx +23 -36
- package/ui/alert.d.ts +4 -5
- package/ui/alert.jsx +9 -12
- package/ui/aspect-ratio.d.ts +1 -1
- package/ui/aspect-ratio.jsx +1 -3
- package/ui/avatar.d.ts +3 -3
- package/ui/avatar.jsx +6 -9
- package/ui/badge.d.ts +3 -3
- package/ui/badge.jsx +7 -9
- package/ui/breadcrumb.d.ts +16 -8
- package/ui/breadcrumb.jsx +21 -26
- package/ui/button.d.ts +3 -2
- package/ui/button.jsx +14 -13
- package/ui/calendar.jsx +20 -20
- package/ui/card.d.ts +7 -8
- package/ui/card.jsx +13 -22
- package/ui/carousel.d.ts +5 -6
- package/ui/carousel.jsx +34 -26
- package/ui/chart.d.ts +28 -6
- package/ui/chart.jsx +40 -37
- package/ui/checkbox.d.ts +1 -1
- package/ui/checkbox.jsx +7 -8
- package/ui/collapsible.d.ts +3 -3
- package/ui/collapsible.jsx +3 -9
- package/ui/command.d.ts +78 -16
- package/ui/command.jsx +27 -37
- package/ui/context-menu.d.ts +21 -19
- package/ui/context-menu.jsx +47 -65
- package/ui/dialog.d.ts +17 -13
- package/ui/dialog.jsx +27 -41
- package/ui/drawer.d.ts +19 -10
- package/ui/drawer.jsx +23 -36
- package/ui/dropdown-menu.d.ts +22 -20
- package/ui/dropdown-menu.jsx +50 -66
- package/ui/form.d.ts +5 -6
- package/ui/form.jsx +23 -19
- package/ui/hover-card.d.ts +3 -3
- package/ui/hover-card.jsx +4 -11
- package/ui/input-otp.d.ts +30 -7
- package/ui/input-otp.jsx +15 -17
- package/ui/input.d.ts +1 -1
- package/ui/input.jsx +4 -3
- package/ui/label.d.ts +2 -1
- package/ui/label.jsx +4 -3
- package/ui/menubar.d.ts +19 -17
- package/ui/menubar.jsx +49 -58
- package/ui/navigation-menu.d.ts +9 -11
- package/ui/navigation-menu.jsx +29 -37
- package/ui/pagination.d.ts +25 -10
- package/ui/pagination.jsx +28 -35
- package/ui/popover.d.ts +4 -5
- package/ui/popover.jsx +7 -15
- package/ui/progress.d.ts +1 -1
- package/ui/progress.jsx +4 -5
- package/ui/radio-group.d.ts +2 -2
- package/ui/radio-group.jsx +11 -9
- package/ui/resizable.d.ts +20 -5
- package/ui/resizable.jsx +8 -15
- package/ui/scroll-area.d.ts +2 -2
- package/ui/scroll-area.jsx +14 -16
- package/ui/select.d.ts +11 -13
- package/ui/select.jsx +47 -58
- package/ui/separator.d.ts +1 -1
- package/ui/separator.jsx +2 -3
- package/ui/sheet.d.ts +23 -11
- package/ui/sheet.jsx +41 -45
- package/ui/sidebar.d.ts +34 -38
- package/ui/sidebar.jsx +122 -109
- package/ui/skeleton.d.ts +1 -1
- package/ui/skeleton.jsx +1 -1
- package/ui/slider.d.ts +1 -1
- package/ui/slider.jsx +7 -13
- package/ui/sonner.d.ts +2 -1
- package/ui/sonner.jsx +7 -4
- package/ui/switch.d.ts +2 -2
- package/ui/switch.jsx +5 -6
- package/ui/table.d.ts +8 -8
- package/ui/table.jsx +18 -27
- package/ui/tabs.d.ts +4 -4
- package/ui/tabs.jsx +7 -12
- package/ui/textarea.d.ts +1 -1
- package/ui/textarea.jsx +4 -3
- package/ui/toggle-group.d.ts +8 -3
- package/ui/toggle-group.jsx +11 -11
- package/ui/toggle.d.ts +4 -1
- package/ui/toggle.jsx +7 -8
- package/ui/tooltip.d.ts +4 -4
- package/ui/tooltip.jsx +5 -19
package/ui/menubar.jsx
CHANGED
@@ -1,73 +1,64 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as React from "react";
|
3
3
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
4
|
-
import {
|
4
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
function Menubar({ className, ...props }) {
|
7
|
-
return (<MenubarPrimitive.Root data-slot="menubar" className={cn("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs", className)} {...props}/>);
|
8
|
-
}
|
9
6
|
function MenubarMenu({ ...props }) {
|
10
|
-
return <MenubarPrimitive.Menu
|
7
|
+
return <MenubarPrimitive.Menu {...props}/>;
|
11
8
|
}
|
12
9
|
function MenubarGroup({ ...props }) {
|
13
|
-
return <MenubarPrimitive.Group
|
10
|
+
return <MenubarPrimitive.Group {...props}/>;
|
14
11
|
}
|
15
12
|
function MenubarPortal({ ...props }) {
|
16
|
-
return <MenubarPrimitive.Portal
|
13
|
+
return <MenubarPrimitive.Portal {...props}/>;
|
17
14
|
}
|
18
15
|
function MenubarRadioGroup({ ...props }) {
|
19
|
-
return
|
20
|
-
}
|
21
|
-
function MenubarTrigger({ className, ...props }) {
|
22
|
-
return (<MenubarPrimitive.Trigger data-slot="menubar-trigger" className={cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none", className)} {...props}/>);
|
23
|
-
}
|
24
|
-
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
|
25
|
-
return (<MenubarPortal>
|
26
|
-
<MenubarPrimitive.Content data-slot="menubar-content" align={align} alignOffset={alignOffset} sideOffset={sideOffset} className={cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md", className)} {...props}/>
|
27
|
-
</MenubarPortal>);
|
28
|
-
}
|
29
|
-
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
30
|
-
return (<MenubarPrimitive.Item data-slot="menubar-item" data-inset={inset} data-variant={variant} className={cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)} {...props}/>);
|
31
|
-
}
|
32
|
-
function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
33
|
-
return (<MenubarPrimitive.CheckboxItem data-slot="menubar-checkbox-item" className={cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)} checked={checked} {...props}>
|
34
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
35
|
-
<MenubarPrimitive.ItemIndicator>
|
36
|
-
<CheckIcon className="size-4"/>
|
37
|
-
</MenubarPrimitive.ItemIndicator>
|
38
|
-
</span>
|
39
|
-
{children}
|
40
|
-
</MenubarPrimitive.CheckboxItem>);
|
41
|
-
}
|
42
|
-
function MenubarRadioItem({ className, children, ...props }) {
|
43
|
-
return (<MenubarPrimitive.RadioItem data-slot="menubar-radio-item" className={cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)} {...props}>
|
44
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
45
|
-
<MenubarPrimitive.ItemIndicator>
|
46
|
-
<CircleIcon className="size-2 fill-current"/>
|
47
|
-
</MenubarPrimitive.ItemIndicator>
|
48
|
-
</span>
|
49
|
-
{children}
|
50
|
-
</MenubarPrimitive.RadioItem>);
|
51
|
-
}
|
52
|
-
function MenubarLabel({ className, inset, ...props }) {
|
53
|
-
return (<MenubarPrimitive.Label data-slot="menubar-label" data-inset={inset} className={cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)} {...props}/>);
|
54
|
-
}
|
55
|
-
function MenubarSeparator({ className, ...props }) {
|
56
|
-
return (<MenubarPrimitive.Separator data-slot="menubar-separator" className={cn("bg-border -mx-1 my-1 h-px", className)} {...props}/>);
|
57
|
-
}
|
58
|
-
function MenubarShortcut({ className, ...props }) {
|
59
|
-
return (<span data-slot="menubar-shortcut" className={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)} {...props}/>);
|
16
|
+
return <MenubarPrimitive.RadioGroup {...props}/>;
|
60
17
|
}
|
61
18
|
function MenubarSub({ ...props }) {
|
62
19
|
return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props}/>;
|
63
20
|
}
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
21
|
+
const Menubar = React.forwardRef(({ className, ...props }, ref) => (<MenubarPrimitive.Root ref={ref} className={cn("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className)} {...props}/>));
|
22
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
23
|
+
const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (<MenubarPrimitive.Trigger ref={ref} className={cn("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className)} {...props}/>));
|
24
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
25
|
+
const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (<MenubarPrimitive.SubTrigger ref={ref} className={cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className)} {...props}>
|
26
|
+
{children}
|
27
|
+
<ChevronRight className="ml-auto h-4 w-4"/>
|
28
|
+
</MenubarPrimitive.SubTrigger>));
|
29
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
30
|
+
const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (<MenubarPrimitive.SubContent ref={ref} className={cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", className)} {...props}/>));
|
31
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
32
|
+
const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (<MenubarPrimitive.Portal>
|
33
|
+
<MenubarPrimitive.Content ref={ref} align={align} alignOffset={alignOffset} sideOffset={sideOffset} className={cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]", className)} {...props}/>
|
34
|
+
</MenubarPrimitive.Portal>));
|
35
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
36
|
+
const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (<MenubarPrimitive.Item ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)} {...props}/>));
|
37
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
38
|
+
const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (<MenubarPrimitive.CheckboxItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} checked={checked} {...props}>
|
39
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
40
|
+
<MenubarPrimitive.ItemIndicator>
|
41
|
+
<Check className="h-4 w-4"/>
|
42
|
+
</MenubarPrimitive.ItemIndicator>
|
43
|
+
</span>
|
44
|
+
{children}
|
45
|
+
</MenubarPrimitive.CheckboxItem>));
|
46
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
47
|
+
const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (<MenubarPrimitive.RadioItem ref={ref} className={cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} {...props}>
|
48
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
49
|
+
<MenubarPrimitive.ItemIndicator>
|
50
|
+
<Circle className="h-2 w-2 fill-current"/>
|
51
|
+
</MenubarPrimitive.ItemIndicator>
|
52
|
+
</span>
|
53
|
+
{children}
|
54
|
+
</MenubarPrimitive.RadioItem>));
|
55
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
56
|
+
const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (<MenubarPrimitive.Label ref={ref} className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)} {...props}/>));
|
57
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
58
|
+
const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (<MenubarPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props}/>));
|
59
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
60
|
+
const MenubarShortcut = ({ className, ...props }) => {
|
61
|
+
return (<span className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)} {...props}/>);
|
62
|
+
};
|
63
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
64
|
+
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
|
package/ui/navigation-menu.d.ts
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
3
|
-
declare
|
4
|
-
|
5
|
-
|
6
|
-
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): React.JSX.Element;
|
7
|
-
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): React.JSX.Element;
|
3
|
+
declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
4
|
+
declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
5
|
+
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
8
6
|
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
9
|
-
declare
|
10
|
-
declare
|
11
|
-
declare
|
12
|
-
declare
|
13
|
-
declare
|
14
|
-
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport,
|
7
|
+
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
8
|
+
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
9
|
+
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
10
|
+
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
11
|
+
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
12
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|
package/ui/navigation-menu.jsx
CHANGED
@@ -1,41 +1,33 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
3
3
|
import { cva } from "class-variance-authority";
|
4
|
-
import {
|
4
|
+
import { ChevronDown } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
return (<NavigationMenuPrimitive.Link data-slot="navigation-menu-link" className={cn("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4", className)} {...props}/>);
|
35
|
-
}
|
36
|
-
function NavigationMenuIndicator({ className, ...props }) {
|
37
|
-
return (<NavigationMenuPrimitive.Indicator data-slot="navigation-menu-indicator" className={cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden", className)} {...props}>
|
38
|
-
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"/>
|
39
|
-
</NavigationMenuPrimitive.Indicator>);
|
40
|
-
}
|
41
|
-
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
|
6
|
+
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => (<NavigationMenuPrimitive.Root ref={ref} className={cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)} {...props}>
|
7
|
+
{children}
|
8
|
+
<NavigationMenuViewport />
|
9
|
+
</NavigationMenuPrimitive.Root>));
|
10
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
11
|
+
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (<NavigationMenuPrimitive.List ref={ref} className={cn("group flex flex-1 list-none items-center justify-center space-x-1", className)} {...props}/>));
|
12
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
13
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
14
|
+
const navigationMenuTriggerStyle = cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent");
|
15
|
+
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => (<NavigationMenuPrimitive.Trigger ref={ref} className={cn(navigationMenuTriggerStyle(), "group", className)} {...props}>
|
16
|
+
{children}{" "}
|
17
|
+
<ChevronDown className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180" aria-hidden="true"/>
|
18
|
+
</NavigationMenuPrimitive.Trigger>));
|
19
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
20
|
+
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => (<NavigationMenuPrimitive.Content ref={ref} className={cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ", className)} {...props}/>));
|
21
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
22
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
23
|
+
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => (<div className={cn("absolute left-0 top-full flex justify-center")}>
|
24
|
+
<NavigationMenuPrimitive.Viewport className={cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className)} ref={ref} {...props}/>
|
25
|
+
</div>));
|
26
|
+
NavigationMenuViewport.displayName =
|
27
|
+
NavigationMenuPrimitive.Viewport.displayName;
|
28
|
+
const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => (<NavigationMenuPrimitive.Indicator ref={ref} className={cn("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", className)} {...props}>
|
29
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"/>
|
30
|
+
</NavigationMenuPrimitive.Indicator>));
|
31
|
+
NavigationMenuIndicator.displayName =
|
32
|
+
NavigationMenuPrimitive.Indicator.displayName;
|
33
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|
package/ui/pagination.d.ts
CHANGED
@@ -1,13 +1,28 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import {
|
3
|
-
declare
|
4
|
-
|
5
|
-
|
2
|
+
import { ButtonProps } from "../ui/button";
|
3
|
+
declare const Pagination: {
|
4
|
+
({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
5
|
+
displayName: string;
|
6
|
+
};
|
7
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
8
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
6
9
|
type PaginationLinkProps = {
|
7
10
|
isActive?: boolean;
|
8
|
-
} & Pick<
|
9
|
-
declare
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
} & Pick<ButtonProps, "size"> & React.ComponentProps<"a">;
|
12
|
+
declare const PaginationLink: {
|
13
|
+
({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
14
|
+
displayName: string;
|
15
|
+
};
|
16
|
+
declare const PaginationPrevious: {
|
17
|
+
({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
18
|
+
displayName: string;
|
19
|
+
};
|
20
|
+
declare const PaginationNext: {
|
21
|
+
({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
22
|
+
displayName: string;
|
23
|
+
};
|
24
|
+
declare const PaginationEllipsis: {
|
25
|
+
({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
26
|
+
displayName: string;
|
27
|
+
};
|
28
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
package/ui/pagination.jsx
CHANGED
@@ -1,38 +1,31 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import {
|
2
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
3
3
|
import { cn } from "../lib/utils";
|
4
4
|
import { buttonVariants } from "../ui/button";
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
function PaginationEllipsis({ className, ...props }) {
|
33
|
-
return (<span aria-hidden data-slot="pagination-ellipsis" className={cn("flex size-9 items-center justify-center", className)} {...props}>
|
34
|
-
<MoreHorizontalIcon className="size-4"/>
|
35
|
-
<span className="sr-only">More pages</span>
|
36
|
-
</span>);
|
37
|
-
}
|
38
|
-
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
|
5
|
+
const Pagination = ({ className, ...props }) => (<nav role="navigation" aria-label="pagination" className={cn("mx-auto flex w-full justify-center", className)} {...props}/>);
|
6
|
+
Pagination.displayName = "Pagination";
|
7
|
+
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => (<ul ref={ref} className={cn("flex flex-row items-center gap-1", className)} {...props}/>));
|
8
|
+
PaginationContent.displayName = "PaginationContent";
|
9
|
+
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => (<li ref={ref} className={cn("", className)} {...props}/>));
|
10
|
+
PaginationItem.displayName = "PaginationItem";
|
11
|
+
const PaginationLink = ({ className, isActive, size = "icon", ...props }) => (<a aria-current={isActive ? "page" : undefined} className={cn(buttonVariants({
|
12
|
+
variant: isActive ? "outline" : "ghost",
|
13
|
+
size,
|
14
|
+
}), className)} {...props}/>);
|
15
|
+
PaginationLink.displayName = "PaginationLink";
|
16
|
+
const PaginationPrevious = ({ className, ...props }) => (<PaginationLink aria-label="Go to previous page" size="default" className={cn("gap-1 pl-2.5", className)} {...props}>
|
17
|
+
<ChevronLeft className="h-4 w-4"/>
|
18
|
+
<span>Previous</span>
|
19
|
+
</PaginationLink>);
|
20
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
21
|
+
const PaginationNext = ({ className, ...props }) => (<PaginationLink aria-label="Go to next page" size="default" className={cn("gap-1 pr-2.5", className)} {...props}>
|
22
|
+
<span>Next</span>
|
23
|
+
<ChevronRight className="h-4 w-4"/>
|
24
|
+
</PaginationLink>);
|
25
|
+
PaginationNext.displayName = "PaginationNext";
|
26
|
+
const PaginationEllipsis = ({ className, ...props }) => (<span aria-hidden className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
|
27
|
+
<MoreHorizontal className="h-4 w-4"/>
|
28
|
+
<span className="sr-only">More pages</span>
|
29
|
+
</span>);
|
30
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
31
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
package/ui/popover.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
3
|
-
declare
|
4
|
-
declare
|
5
|
-
declare
|
6
|
-
|
7
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
3
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
6
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
package/ui/popover.jsx
CHANGED
@@ -2,18 +2,10 @@
|
|
2
2
|
import * as React from "react";
|
3
3
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
4
4
|
import { cn } from "../lib/utils";
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
return (<PopoverPrimitive.Portal>
|
13
|
-
<PopoverPrimitive.Content data-slot="popover-content" align={align} sideOffset={sideOffset} className={cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className)} {...props}/>
|
14
|
-
</PopoverPrimitive.Portal>);
|
15
|
-
}
|
16
|
-
function PopoverAnchor({ ...props }) {
|
17
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props}/>;
|
18
|
-
}
|
19
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
5
|
+
const Popover = PopoverPrimitive.Root;
|
6
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
7
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (<PopoverPrimitive.Portal>
|
8
|
+
<PopoverPrimitive.Content ref={ref} align={align} sideOffset={sideOffset} className={cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]", className)} {...props}/>
|
9
|
+
</PopoverPrimitive.Portal>));
|
10
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
11
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
package/ui/progress.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
3
|
-
declare
|
3
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
4
4
|
export { Progress };
|
package/ui/progress.jsx
CHANGED
@@ -2,9 +2,8 @@
|
|
2
2
|
import * as React from "react";
|
3
3
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
4
4
|
import { cn } from "../lib/utils";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
5
|
+
const Progress = React.forwardRef(({ className, value, ...props }, ref) => (<ProgressPrimitive.Root ref={ref} className={cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className)} {...props}>
|
6
|
+
<ProgressPrimitive.Indicator className="h-full w-full flex-1 bg-primary transition-all" style={{ transform: `translateX(-${100 - (value || 0)}%)` }}/>
|
7
|
+
</ProgressPrimitive.Root>));
|
8
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
10
9
|
export { Progress };
|
package/ui/radio-group.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
3
|
-
declare
|
4
|
-
declare
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
package/ui/radio-group.jsx
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as React from "react";
|
3
3
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
4
|
-
import {
|
4
|
+
import { Circle } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
return (<RadioGroupPrimitive.Root
|
8
|
-
}
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
7
|
+
return (<RadioGroupPrimitive.Root className={cn("grid gap-2", className)} {...props} ref={ref}/>);
|
8
|
+
});
|
9
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
10
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
11
|
+
return (<RadioGroupPrimitive.Item ref={ref} className={cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}>
|
12
|
+
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
13
|
+
<Circle className="h-2.5 w-2.5 fill-current text-current"/>
|
13
14
|
</RadioGroupPrimitive.Indicator>
|
14
15
|
</RadioGroupPrimitive.Item>);
|
15
|
-
}
|
16
|
+
});
|
17
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
16
18
|
export { RadioGroup, RadioGroupItem };
|
package/ui/resizable.d.ts
CHANGED
@@ -1,8 +1,23 @@
|
|
1
|
-
import * as React from "react";
|
2
1
|
import * as ResizablePrimitive from "react-resizable-panels";
|
3
|
-
declare
|
4
|
-
declare
|
5
|
-
|
2
|
+
declare const ResizablePanelGroup: ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => import("react").JSX.Element;
|
3
|
+
declare const ResizablePanel: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLElement | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | HTMLAnchorElement | HTMLScriptElement | HTMLEmbedElement | HTMLFormElement | HTMLHeadElement | HTMLAreaElement | HTMLObjectElement | HTMLLinkElement | HTMLMapElement | HTMLInputElement | HTMLBaseElement | HTMLTimeElement | HTMLDataElement | HTMLProgressElement | HTMLTrackElement | HTMLSourceElement | HTMLButtonElement | HTMLAudioElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDivElement | HTMLDListElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPictureElement | HTMLPreElement | HTMLSelectElement | HTMLSlotElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTitleElement | HTMLTableRowElement | HTMLUListElement>, "id" | "onResize"> & {
|
4
|
+
className?: string;
|
5
|
+
collapsedSize?: number | undefined;
|
6
|
+
collapsible?: boolean | undefined;
|
7
|
+
defaultSize?: number | undefined;
|
8
|
+
id?: string;
|
9
|
+
maxSize?: number | undefined;
|
10
|
+
minSize?: number | undefined;
|
11
|
+
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
12
|
+
onExpand?: ResizablePrimitive.PanelOnExpand;
|
13
|
+
onResize?: ResizablePrimitive.PanelOnResize;
|
14
|
+
order?: number;
|
15
|
+
style?: object;
|
16
|
+
tagName?: keyof HTMLElementTagNameMap | undefined;
|
17
|
+
} & {
|
18
|
+
children?: import("react").ReactNode | undefined;
|
19
|
+
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
20
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
6
21
|
withHandle?: boolean;
|
7
|
-
})
|
22
|
+
}) => import("react").JSX.Element;
|
8
23
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
package/ui/resizable.jsx
CHANGED
@@ -1,19 +1,12 @@
|
|
1
1
|
"use client";
|
2
|
-
import
|
3
|
-
import { GripVerticalIcon } from "lucide-react";
|
2
|
+
import { GripVertical } from "lucide-react";
|
4
3
|
import * as ResizablePrimitive from "react-resizable-panels";
|
5
4
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
|
8
|
-
}
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
return (<ResizablePrimitive.PanelResizeHandle data-slot="resizable-handle" className={cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90", className)} {...props}>
|
14
|
-
{withHandle && (<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
15
|
-
<GripVerticalIcon className="size-2.5"/>
|
16
|
-
</div>)}
|
17
|
-
</ResizablePrimitive.PanelResizeHandle>);
|
18
|
-
}
|
5
|
+
const ResizablePanelGroup = ({ className, ...props }) => (<ResizablePrimitive.PanelGroup className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)} {...props}/>);
|
6
|
+
const ResizablePanel = ResizablePrimitive.Panel;
|
7
|
+
const ResizableHandle = ({ withHandle, className, ...props }) => (<ResizablePrimitive.PanelResizeHandle className={cn("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", className)} {...props}>
|
8
|
+
{withHandle && (<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
|
9
|
+
<GripVertical className="h-2.5 w-2.5"/>
|
10
|
+
</div>)}
|
11
|
+
</ResizablePrimitive.PanelResizeHandle>);
|
19
12
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
package/ui/scroll-area.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
3
|
-
declare
|
4
|
-
declare
|
3
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
4
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
5
5
|
export { ScrollArea, ScrollBar };
|
package/ui/scroll-area.jsx
CHANGED
@@ -2,20 +2,18 @@
|
|
2
2
|
import * as React from "react";
|
3
3
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
4
4
|
import { cn } from "../lib/utils";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</ScrollAreaPrimitive.ScrollAreaScrollbar>);
|
20
|
-
}
|
5
|
+
const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (<ScrollAreaPrimitive.Root ref={ref} className={cn("relative overflow-hidden", className)} {...props}>
|
6
|
+
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
|
7
|
+
{children}
|
8
|
+
</ScrollAreaPrimitive.Viewport>
|
9
|
+
<ScrollBar />
|
10
|
+
<ScrollAreaPrimitive.Corner />
|
11
|
+
</ScrollAreaPrimitive.Root>));
|
12
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
13
|
+
const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (<ScrollAreaPrimitive.ScrollAreaScrollbar ref={ref} orientation={orientation} className={cn("flex touch-none select-none transition-colors", orientation === "vertical" &&
|
14
|
+
"h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
|
15
|
+
"h-2.5 flex-col border-t border-t-transparent p-[1px]", className)} {...props}>
|
16
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border"/>
|
17
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>));
|
18
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
21
19
|
export { ScrollArea, ScrollBar };
|