shadcn-packaged 2025.4.14 → 2025.6.16-1
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/README.md +30 -31
- package/index.css +112 -138
- package/package.json +38 -38
- package/ui/accordion.d.ts +4 -4
- package/ui/accordion.jsx +20 -15
- package/ui/alert-dialog.d.ts +11 -17
- package/ui/alert-dialog.jsx +36 -23
- package/ui/alert.d.ts +5 -4
- package/ui/alert.jsx +12 -9
- package/ui/aspect-ratio.d.ts +1 -1
- package/ui/aspect-ratio.jsx +3 -1
- package/ui/avatar.d.ts +3 -3
- package/ui/avatar.jsx +9 -6
- package/ui/badge.d.ts +3 -3
- package/ui/badge.jsx +9 -7
- package/ui/breadcrumb.d.ts +8 -16
- package/ui/breadcrumb.jsx +26 -21
- package/ui/button.d.ts +2 -3
- package/ui/button.jsx +13 -14
- package/ui/calendar.d.ts +7 -7
- package/ui/calendar.jsx +70 -30
- package/ui/card.d.ts +8 -7
- package/ui/card.jsx +22 -13
- package/ui/carousel.d.ts +6 -5
- package/ui/carousel.jsx +26 -34
- package/ui/chart.d.ts +6 -28
- package/ui/chart.jsx +37 -40
- package/ui/checkbox.d.ts +1 -1
- package/ui/checkbox.jsx +8 -7
- package/ui/collapsible.d.ts +3 -3
- package/ui/collapsible.jsx +9 -3
- package/ui/command.d.ts +16 -78
- package/ui/command.jsx +37 -27
- package/ui/context-menu.d.ts +19 -21
- package/ui/context-menu.jsx +65 -47
- package/ui/dialog.d.ts +13 -17
- package/ui/dialog.jsx +41 -27
- package/ui/drawer.d.ts +10 -19
- package/ui/drawer.jsx +36 -23
- package/ui/dropdown-menu.d.ts +20 -22
- package/ui/dropdown-menu.jsx +66 -50
- package/ui/form.d.ts +6 -5
- package/ui/form.jsx +19 -23
- package/ui/hover-card.d.ts +3 -3
- package/ui/hover-card.jsx +11 -4
- package/ui/input-otp.d.ts +7 -30
- package/ui/input-otp.jsx +17 -15
- package/ui/input.d.ts +1 -1
- package/ui/input.jsx +3 -4
- package/ui/label.d.ts +1 -2
- package/ui/label.jsx +3 -4
- package/ui/menubar.d.ts +17 -19
- package/ui/menubar.jsx +58 -49
- package/ui/navigation-menu.d.ts +11 -9
- package/ui/navigation-menu.jsx +37 -29
- package/ui/pagination.d.ts +10 -25
- package/ui/pagination.jsx +35 -28
- package/ui/popover.d.ts +5 -4
- package/ui/popover.jsx +15 -7
- package/ui/progress.d.ts +1 -1
- package/ui/progress.jsx +5 -4
- package/ui/radio-group.d.ts +2 -2
- package/ui/radio-group.jsx +9 -11
- package/ui/resizable.d.ts +5 -20
- package/ui/resizable.jsx +15 -8
- package/ui/scroll-area.d.ts +2 -2
- package/ui/scroll-area.jsx +16 -14
- package/ui/select.d.ts +13 -11
- package/ui/select.jsx +58 -47
- package/ui/separator.d.ts +1 -1
- package/ui/separator.jsx +3 -2
- package/ui/sheet.d.ts +11 -23
- package/ui/sheet.jsx +45 -41
- package/ui/sidebar.d.ts +38 -34
- package/ui/sidebar.jsx +109 -122
- package/ui/skeleton.d.ts +1 -1
- package/ui/skeleton.jsx +1 -1
- package/ui/slider.d.ts +1 -1
- package/ui/slider.jsx +13 -7
- package/ui/sonner.d.ts +1 -2
- package/ui/sonner.jsx +4 -7
- package/ui/switch.d.ts +2 -2
- package/ui/switch.jsx +6 -5
- package/ui/table.d.ts +8 -8
- package/ui/table.jsx +27 -18
- package/ui/tabs.d.ts +4 -4
- package/ui/tabs.jsx +12 -7
- package/ui/textarea.d.ts +1 -1
- package/ui/textarea.jsx +3 -4
- package/ui/toggle-group.d.ts +3 -8
- package/ui/toggle-group.jsx +11 -11
- package/ui/toggle.d.ts +1 -4
- package/ui/toggle.jsx +8 -7
- package/ui/tooltip.d.ts +4 -4
- package/ui/tooltip.jsx +19 -5
- package/tailwind.config.js +0 -89
- /package/hooks/{use-mobile.jsx → use-mobile.js} +0 -0
package/ui/form.jsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as React from "react";
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
4
|
-
import { Controller, FormProvider, useFormContext, } from "react-hook-form";
|
4
|
+
import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
|
5
5
|
import { cn } from "../lib/utils";
|
6
6
|
import { Label } from "../ui/label";
|
7
7
|
const Form = FormProvider;
|
@@ -14,7 +14,8 @@ const FormField = ({ ...props }) => {
|
|
14
14
|
const useFormField = () => {
|
15
15
|
const fieldContext = React.useContext(FormFieldContext);
|
16
16
|
const itemContext = React.useContext(FormItemContext);
|
17
|
-
const { getFieldState
|
17
|
+
const { getFieldState } = useFormContext();
|
18
|
+
const formState = useFormState({ name: fieldContext.name });
|
18
19
|
const fieldState = getFieldState(fieldContext.name, formState);
|
19
20
|
if (!fieldContext) {
|
20
21
|
throw new Error("useFormField should be used within <FormField>");
|
@@ -30,39 +31,34 @@ const useFormField = () => {
|
|
30
31
|
};
|
31
32
|
};
|
32
33
|
const FormItemContext = React.createContext({});
|
33
|
-
|
34
|
+
function FormItem({ className, ...props }) {
|
34
35
|
const id = React.useId();
|
35
36
|
return (<FormItemContext.Provider value={{ id }}>
|
36
|
-
<div
|
37
|
+
<div data-slot="form-item" className={cn("grid gap-2", className)} {...props}/>
|
37
38
|
</FormItemContext.Provider>);
|
38
|
-
}
|
39
|
-
|
40
|
-
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
39
|
+
}
|
40
|
+
function FormLabel({ className, ...props }) {
|
41
41
|
const { error, formItemId } = useFormField();
|
42
|
-
return (<Label
|
43
|
-
}
|
44
|
-
|
45
|
-
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
42
|
+
return (<Label data-slot="form-label" data-error={!!error} className={cn("data-[error=true]:text-destructive", className)} htmlFor={formItemId} {...props}/>);
|
43
|
+
}
|
44
|
+
function FormControl({ ...props }) {
|
46
45
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
47
|
-
return (<Slot
|
46
|
+
return (<Slot data-slot="form-control" id={formItemId} aria-describedby={!error
|
48
47
|
? `${formDescriptionId}`
|
49
48
|
: `${formDescriptionId} ${formMessageId}`} aria-invalid={!!error} {...props}/>);
|
50
|
-
}
|
51
|
-
|
52
|
-
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
49
|
+
}
|
50
|
+
function FormDescription({ className, ...props }) {
|
53
51
|
const { formDescriptionId } = useFormField();
|
54
|
-
return (<p
|
55
|
-
}
|
56
|
-
|
57
|
-
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
52
|
+
return (<p data-slot="form-description" id={formDescriptionId} className={cn("text-muted-foreground text-sm", className)} {...props}/>);
|
53
|
+
}
|
54
|
+
function FormMessage({ className, ...props }) {
|
58
55
|
const { error, formMessageId } = useFormField();
|
59
|
-
const body = error ? String(error?.message ?? "") : children;
|
56
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
60
57
|
if (!body) {
|
61
58
|
return null;
|
62
59
|
}
|
63
|
-
return (<p
|
60
|
+
return (<p data-slot="form-message" id={formMessageId} className={cn("text-destructive text-sm", className)} {...props}>
|
64
61
|
{body}
|
65
62
|
</p>);
|
66
|
-
}
|
67
|
-
FormMessage.displayName = "FormMessage";
|
63
|
+
}
|
68
64
|
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
package/ui/hover-card.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
3
|
-
declare
|
4
|
-
declare
|
5
|
-
declare
|
3
|
+
declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
|
4
|
+
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
|
5
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
|
6
6
|
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
package/ui/hover-card.jsx
CHANGED
@@ -2,8 +2,15 @@
|
|
2
2
|
import * as React from "react";
|
3
3
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
4
4
|
import { cn } from "../lib/utils";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
function HoverCard({ ...props }) {
|
6
|
+
return <HoverCardPrimitive.Root data-slot="hover-card" {...props}/>;
|
7
|
+
}
|
8
|
+
function HoverCardTrigger({ ...props }) {
|
9
|
+
return (<HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props}/>);
|
10
|
+
}
|
11
|
+
function HoverCardContent({ className, align = "center", sideOffset = 4, ...props }) {
|
12
|
+
return (<HoverCardPrimitive.Portal data-slot="hover-card-portal">
|
13
|
+
<HoverCardPrimitive.Content data-slot="hover-card-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-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className)} {...props}/>
|
14
|
+
</HoverCardPrimitive.Portal>);
|
15
|
+
}
|
9
16
|
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
package/ui/input-otp.d.ts
CHANGED
@@ -1,34 +1,11 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
|
3
|
-
|
4
|
-
onChange?: (newValue: string) => unknown;
|
5
|
-
maxLength: number;
|
6
|
-
textAlign?: "left" | "center" | "right";
|
7
|
-
onComplete?: (...args: any[]) => unknown;
|
8
|
-
pushPasswordManagerStrategy?: "increase-width" | "none";
|
9
|
-
pasteTransformer?: (pasted: string) => string;
|
2
|
+
import { OTPInput } from "input-otp";
|
3
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
10
4
|
containerClassName?: string;
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
children?: never;
|
15
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "textAlign" | "value" | "onChange" | "maxLength" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
16
|
-
value?: string;
|
17
|
-
onChange?: (newValue: string) => unknown;
|
18
|
-
maxLength: number;
|
19
|
-
textAlign?: "left" | "center" | "right";
|
20
|
-
onComplete?: (...args: any[]) => unknown;
|
21
|
-
pushPasswordManagerStrategy?: "increase-width" | "none";
|
22
|
-
pasteTransformer?: (pasted: string) => string;
|
23
|
-
containerClassName?: string;
|
24
|
-
noScriptCSSFallback?: string | null;
|
25
|
-
} & {
|
26
|
-
render?: never;
|
27
|
-
children: React.ReactNode;
|
28
|
-
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
29
|
-
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
30
|
-
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
5
|
+
}): React.JSX.Element;
|
6
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
7
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
|
31
8
|
index: number;
|
32
|
-
}
|
33
|
-
declare
|
9
|
+
}): React.JSX.Element;
|
10
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
34
11
|
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
package/ui/input-otp.jsx
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as React from "react";
|
3
3
|
import { OTPInput, OTPInputContext } from "input-otp";
|
4
|
-
import {
|
4
|
+
import { MinusIcon } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
InputOTPGroup
|
10
|
-
|
6
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
7
|
+
return (<OTPInput data-slot="input-otp" containerClassName={cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName)} className={cn("disabled:cursor-not-allowed", className)} {...props}/>);
|
8
|
+
}
|
9
|
+
function InputOTPGroup({ className, ...props }) {
|
10
|
+
return (<div data-slot="input-otp-group" className={cn("flex items-center", className)} {...props}/>);
|
11
|
+
}
|
12
|
+
function InputOTPSlot({ index, className, ...props }) {
|
11
13
|
const inputOTPContext = React.useContext(OTPInputContext);
|
12
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext
|
13
|
-
return (<div
|
14
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
15
|
+
return (<div data-slot="input-otp-slot" data-active={isActive} className={cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className)} {...props}>
|
14
16
|
{char}
|
15
17
|
{hasFakeCaret && (<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
16
|
-
<div className="
|
18
|
+
<div className="animate-caret-blink bg-foreground h-4 w-px duration-1000"/>
|
17
19
|
</div>)}
|
18
20
|
</div>);
|
19
|
-
}
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
}
|
22
|
+
function InputOTPSeparator({ ...props }) {
|
23
|
+
return (<div data-slot="input-otp-separator" role="separator" {...props}>
|
24
|
+
<MinusIcon />
|
25
|
+
</div>);
|
26
|
+
}
|
25
27
|
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
package/ui/input.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
declare
|
2
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
|
3
3
|
export { Input };
|
package/ui/input.jsx
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import { cn } from "../lib/utils";
|
3
|
-
|
4
|
-
return (<input type={type} className={cn("flex h-
|
5
|
-
}
|
6
|
-
Input.displayName = "Input";
|
3
|
+
function Input({ className, type, ...props }) {
|
4
|
+
return (<input type={type} data-slot="input" className={cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className)} {...props}/>);
|
5
|
+
}
|
7
6
|
export { Input };
|
package/ui/label.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
3
|
-
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLLabelElement>>;
|
3
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
5
4
|
export { Label };
|
package/ui/label.jsx
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
"use client";
|
2
2
|
import * as React from "react";
|
3
3
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
4
|
-
import { cva } from "class-variance-authority";
|
5
4
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
function Label({ className, ...props }) {
|
6
|
+
return (<LabelPrimitive.Root data-slot="label" className={cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className)} {...props}/>);
|
7
|
+
}
|
9
8
|
export { Label };
|
package/ui/menubar.d.ts
CHANGED
@@ -1,28 +1,26 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
|
3
4
|
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
|
4
5
|
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
|
5
6
|
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
6
7
|
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
|
7
|
-
declare function
|
8
|
-
declare
|
9
|
-
declare
|
10
|
-
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
11
11
|
inset?: boolean;
|
12
|
-
|
13
|
-
|
14
|
-
declare
|
15
|
-
declare
|
12
|
+
variant?: "default" | "destructive";
|
13
|
+
}): React.JSX.Element;
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): React.JSX.Element;
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
16
17
|
inset?: boolean;
|
17
|
-
}
|
18
|
-
declare
|
19
|
-
declare
|
20
|
-
declare
|
18
|
+
}): React.JSX.Element;
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
21
23
|
inset?: boolean;
|
22
|
-
}
|
23
|
-
declare
|
24
|
-
|
25
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
26
|
-
displayname: string;
|
27
|
-
};
|
28
|
-
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
|
24
|
+
}): React.JSX.Element;
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
package/ui/menubar.jsx
CHANGED
@@ -1,64 +1,73 @@
|
|
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 { CheckIcon, ChevronRightIcon, CircleIcon } 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
|
+
}
|
6
9
|
function MenubarMenu({ ...props }) {
|
7
|
-
return <MenubarPrimitive.Menu {...props}/>;
|
10
|
+
return <MenubarPrimitive.Menu data-slot="menubar-menu" {...props}/>;
|
8
11
|
}
|
9
12
|
function MenubarGroup({ ...props }) {
|
10
|
-
return <MenubarPrimitive.Group {...props}/>;
|
13
|
+
return <MenubarPrimitive.Group data-slot="menubar-group" {...props}/>;
|
11
14
|
}
|
12
15
|
function MenubarPortal({ ...props }) {
|
13
|
-
return <MenubarPrimitive.Portal {...props}/>;
|
16
|
+
return <MenubarPrimitive.Portal data-slot="menubar-portal" {...props}/>;
|
14
17
|
}
|
15
18
|
function MenubarRadioGroup({ ...props }) {
|
16
|
-
return <MenubarPrimitive.RadioGroup {...props}
|
19
|
+
return (<MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props}/>);
|
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}/>);
|
17
60
|
}
|
18
61
|
function MenubarSub({ ...props }) {
|
19
62
|
return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props}/>;
|
20
63
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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, };
|
64
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
65
|
+
return (<MenubarPrimitive.SubTrigger data-slot="menubar-sub-trigger" data-inset={inset} className={cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8", className)} {...props}>
|
66
|
+
{children}
|
67
|
+
<ChevronRightIcon className="ml-auto h-4 w-4"/>
|
68
|
+
</MenubarPrimitive.SubTrigger>);
|
69
|
+
}
|
70
|
+
function MenubarSubContent({ className, ...props }) {
|
71
|
+
return (<MenubarPrimitive.SubContent data-slot="menubar-sub-content" 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 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className)} {...props}/>);
|
72
|
+
}
|
73
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
package/ui/navigation-menu.d.ts
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
import * as React from "react";
|
2
2
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
3
|
-
declare
|
4
|
-
|
5
|
-
|
3
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
4
|
+
viewport?: boolean;
|
5
|
+
}): React.JSX.Element;
|
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;
|
6
8
|
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/dist/types").ClassProp) => string;
|
7
|
-
declare
|
8
|
-
declare
|
9
|
-
declare
|
10
|
-
declare
|
11
|
-
declare
|
12
|
-
export {
|
9
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): React.JSX.Element;
|
10
|
+
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): React.JSX.Element;
|
11
|
+
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): React.JSX.Element;
|
12
|
+
declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): React.JSX.Element;
|
13
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): React.JSX.Element;
|
14
|
+
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle, };
|
package/ui/navigation-menu.jsx
CHANGED
@@ -1,33 +1,41 @@
|
|
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 { ChevronDownIcon } from "lucide-react";
|
5
5
|
import { cn } from "../lib/utils";
|
6
|
-
|
7
|
-
{
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
NavigationMenuList
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
{
|
17
|
-
|
18
|
-
|
19
|
-
NavigationMenuTrigger
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<div className="
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
6
|
+
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
7
|
+
return (<NavigationMenuPrimitive.Root data-slot="navigation-menu" data-viewport={viewport} className={cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className)} {...props}>
|
8
|
+
{children}
|
9
|
+
{viewport && <NavigationMenuViewport />}
|
10
|
+
</NavigationMenuPrimitive.Root>);
|
11
|
+
}
|
12
|
+
function NavigationMenuList({ className, ...props }) {
|
13
|
+
return (<NavigationMenuPrimitive.List data-slot="navigation-menu-list" className={cn("group flex flex-1 list-none items-center justify-center gap-1", className)} {...props}/>);
|
14
|
+
}
|
15
|
+
function NavigationMenuItem({ className, ...props }) {
|
16
|
+
return (<NavigationMenuPrimitive.Item data-slot="navigation-menu-item" className={cn("relative", className)} {...props}/>);
|
17
|
+
}
|
18
|
+
const navigationMenuTriggerStyle = cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");
|
19
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
20
|
+
return (<NavigationMenuPrimitive.Trigger data-slot="navigation-menu-trigger" className={cn(navigationMenuTriggerStyle(), "group", className)} {...props}>
|
21
|
+
{children}{" "}
|
22
|
+
<ChevronDownIcon className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180" aria-hidden="true"/>
|
23
|
+
</NavigationMenuPrimitive.Trigger>);
|
24
|
+
}
|
25
|
+
function NavigationMenuContent({ className, ...props }) {
|
26
|
+
return (<NavigationMenuPrimitive.Content data-slot="navigation-menu-content" className={cn("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 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", className)} {...props}/>);
|
27
|
+
}
|
28
|
+
function NavigationMenuViewport({ className, ...props }) {
|
29
|
+
return (<div className={cn("absolute top-full left-0 isolate z-50 flex justify-center")}>
|
30
|
+
<NavigationMenuPrimitive.Viewport data-slot="navigation-menu-viewport" className={cn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]", className)} {...props}/>
|
31
|
+
</div>);
|
32
|
+
}
|
33
|
+
function NavigationMenuLink({ className, ...props }) {
|
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, };
|
package/ui/pagination.d.ts
CHANGED
@@ -1,28 +1,13 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import {
|
3
|
-
declare
|
4
|
-
|
5
|
-
|
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>>;
|
2
|
+
import { Button } from "../ui/button";
|
3
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
4
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
5
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
9
6
|
type PaginationLinkProps = {
|
10
7
|
isActive?: boolean;
|
11
|
-
} & Pick<
|
12
|
-
declare
|
13
|
-
|
14
|
-
|
15
|
-
};
|
16
|
-
|
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, };
|
8
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
|
9
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
10
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
11
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
12
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
13
|
+
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
|