@momo-webplatform/mobase 0.0.3
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 +23 -0
- package/package.json +154 -0
- package/publish/cjs/components/ui/button.js +60 -0
- package/publish/cjs/components/utils/SpinerIcon.js +7 -0
- package/publish/cjs/lib/utils.js +9 -0
- package/publish/cjs/src/components/Accordion/Accordion.js +44 -0
- package/publish/cjs/src/components/Accordion/index.js +8 -0
- package/publish/cjs/src/components/Alert/Alert.js +50 -0
- package/publish/cjs/src/components/AlertDialog/AlertDialog.js +62 -0
- package/publish/cjs/src/components/AlertDialog/index.js +14 -0
- package/publish/cjs/src/components/Avatar/Avatar.js +74 -0
- package/publish/cjs/src/components/Avatar/index.js +7 -0
- package/publish/cjs/src/components/Badge/Badge.js +24 -0
- package/publish/cjs/src/components/Button/Button.js +74 -0
- package/publish/cjs/src/components/Button/index.js +5 -0
- package/publish/cjs/src/components/Calendar/calendar.js +39 -0
- package/publish/cjs/src/components/Card/Card.js +47 -0
- package/publish/cjs/src/components/Checkbox/Checkbox.js +67 -0
- package/publish/cjs/src/components/Checkbox/index.js +9 -0
- package/publish/cjs/src/components/Collapsible/collapsible.js +33 -0
- package/publish/cjs/src/components/Command/command.js +62 -0
- package/publish/cjs/src/components/Dialog/dialog.js +57 -0
- package/publish/cjs/src/components/Drawer/drawer.js +57 -0
- package/publish/cjs/src/components/DropdownMenu/dropdownmenu.js +75 -0
- package/publish/cjs/src/components/HoverCard/hover-card.js +38 -0
- package/publish/cjs/src/components/IconButton/IconButton.js +67 -0
- package/publish/cjs/src/components/IconButton/index.js +5 -0
- package/publish/cjs/src/components/Input/input.js +34 -0
- package/publish/cjs/src/components/Label/Label.js +35 -0
- package/publish/cjs/src/components/Menubar/menubar.js +77 -0
- package/publish/cjs/src/components/NavigationMenu/navigation-menu.js +102 -0
- package/publish/cjs/src/components/Pagination/Pagination.js +52 -0
- package/publish/cjs/src/components/Popover/popover.js +37 -0
- package/publish/cjs/src/components/Progress/Progress.js +33 -0
- package/publish/cjs/src/components/RadioGroup/Radio.js +110 -0
- package/publish/cjs/src/components/RadioGroup/RadioGroup.js +53 -0
- package/publish/cjs/src/components/RadioGroup/index.js +6 -0
- package/publish/cjs/src/components/Select/Select.js +61 -0
- package/publish/cjs/src/components/Sheet/sheet.js +71 -0
- package/publish/cjs/src/components/Skeleton/skeleton.js +9 -0
- package/publish/cjs/src/components/Slider/slider.js +33 -0
- package/publish/cjs/src/components/Switch/Switch.js +54 -0
- package/publish/cjs/src/components/Switch/index.js +6 -0
- package/publish/cjs/src/components/Table/Table.js +53 -0
- package/publish/cjs/src/components/Tabs/Tabs.js +42 -0
- package/publish/cjs/src/components/Textarea/Textarea.js +14 -0
- package/publish/cjs/src/components/Toast/Toast.js +65 -0
- package/publish/cjs/src/components/Toast/toaster.js +14 -0
- package/publish/cjs/src/components/Toast/use-toast.js +155 -0
- package/publish/cjs/src/components/Tooltip/Tooltip.js +41 -0
- package/publish/cjs/src/helpers/clone-deep.js +15 -0
- package/publish/cjs/src/helpers/clone-deep.spec.js +22 -0
- package/publish/cjs/src/helpers/generic-forward-ref.js +5 -0
- package/publish/cjs/src/helpers/http.js +10 -0
- package/publish/cjs/src/helpers/is-client.js +7 -0
- package/publish/cjs/src/helpers/is-object.js +12 -0
- package/publish/cjs/src/helpers/is-object.spec.js +24 -0
- package/publish/cjs/src/helpers/merge-deep.js +29 -0
- package/publish/cjs/src/helpers/merge-deep.spec.js +56 -0
- package/publish/cjs/src/helpers/omit.js +16 -0
- package/publish/cjs/src/helpers/omit.spec.js +9 -0
- package/publish/cjs/src/index.js +19 -0
- package/publish/cjs/src/types/index.js +2 -0
- package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -0
- package/publish/esm/components/ui/button.d.ts +11 -0
- package/publish/esm/components/ui/button.js +33 -0
- package/publish/esm/components/utils/SpinerIcon.d.ts +6 -0
- package/publish/esm/components/utils/SpinerIcon.js +5 -0
- package/publish/esm/lib/utils.d.ts +2 -0
- package/publish/esm/lib/utils.js +5 -0
- package/publish/esm/src/components/Accordion/Accordion.d.ts +20 -0
- package/publish/esm/src/components/Accordion/Accordion.js +15 -0
- package/publish/esm/src/components/Accordion/index.d.ts +2 -0
- package/publish/esm/src/components/Accordion/index.js +1 -0
- package/publish/esm/src/components/Alert/Alert.d.ts +8 -0
- package/publish/esm/src/components/Alert/Alert.js +22 -0
- package/publish/esm/src/components/AlertDialog/AlertDialog.d.ts +49 -0
- package/publish/esm/src/components/AlertDialog/AlertDialog.js +26 -0
- package/publish/esm/src/components/AlertDialog/index.d.ts +2 -0
- package/publish/esm/src/components/AlertDialog/index.js +5 -0
- package/publish/esm/src/components/Avatar/Avatar.d.ts +33 -0
- package/publish/esm/src/components/Avatar/Avatar.js +46 -0
- package/publish/esm/src/components/Avatar/index.d.ts +2 -0
- package/publish/esm/src/components/Avatar/index.js +1 -0
- package/publish/esm/src/components/Badge/Badge.d.ts +9 -0
- package/publish/esm/src/components/Badge/Badge.js +20 -0
- package/publish/esm/src/components/Button/Button.d.ts +26 -0
- package/publish/esm/src/components/Button/Button.js +44 -0
- package/publish/esm/src/components/Button/index.d.ts +2 -0
- package/publish/esm/src/components/Button/index.js +1 -0
- package/publish/esm/src/components/Calendar/calendar.d.ts +8 -0
- package/publish/esm/src/components/Calendar/calendar.js +36 -0
- package/publish/esm/src/components/Card/Card.d.ts +8 -0
- package/publish/esm/src/components/Card/Card.js +16 -0
- package/publish/esm/src/components/Checkbox/Checkbox.d.ts +40 -0
- package/publish/esm/src/components/Checkbox/Checkbox.js +36 -0
- package/publish/esm/src/components/Checkbox/index.d.ts +2 -0
- package/publish/esm/src/components/Checkbox/index.js +4 -0
- package/publish/esm/src/components/Collapsible/collapsible.d.ts +5 -0
- package/publish/esm/src/components/Collapsible/collapsible.js +5 -0
- package/publish/esm/src/components/Command/command.d.ts +50 -0
- package/publish/esm/src/components/Command/command.js +28 -0
- package/publish/esm/src/components/Dialog/dialog.d.ts +19 -0
- package/publish/esm/src/components/Dialog/dialog.js +22 -0
- package/publish/esm/src/components/Drawer/drawer.d.ts +24 -0
- package/publish/esm/src/components/Drawer/drawer.js +22 -0
- package/publish/esm/src/components/DropdownMenu/dropdownmenu.d.ts +27 -0
- package/publish/esm/src/components/DropdownMenu/dropdownmenu.js +35 -0
- package/publish/esm/src/components/HoverCard/hover-card.d.ts +6 -0
- package/publish/esm/src/components/HoverCard/hover-card.js +10 -0
- package/publish/esm/src/components/IconButton/IconButton.d.ts +22 -0
- package/publish/esm/src/components/IconButton/IconButton.js +40 -0
- package/publish/esm/src/components/IconButton/index.d.ts +2 -0
- package/publish/esm/src/components/IconButton/index.js +1 -0
- package/publish/esm/src/components/Input/input.d.ts +5 -0
- package/publish/esm/src/components/Input/input.js +8 -0
- package/publish/esm/src/components/Label/Label.d.ts +5 -0
- package/publish/esm/src/components/Label/Label.js +9 -0
- package/publish/esm/src/components/Menubar/menubar.d.ts +31 -0
- package/publish/esm/src/components/Menubar/menubar.js +36 -0
- package/publish/esm/src/components/NavigationMenu/navigation-menu.d.ts +13 -0
- package/publish/esm/src/components/NavigationMenu/navigation-menu.js +64 -0
- package/publish/esm/src/components/Pagination/Pagination.d.ts +19 -0
- package/publish/esm/src/components/Pagination/Pagination.js +20 -0
- package/publish/esm/src/components/Popover/popover.d.ts +6 -0
- package/publish/esm/src/components/Popover/popover.js +9 -0
- package/publish/esm/src/components/Progress/Progress.d.ts +4 -0
- package/publish/esm/src/components/Progress/Progress.js +7 -0
- package/publish/esm/src/components/RadioGroup/Radio.d.ts +22 -0
- package/publish/esm/src/components/RadioGroup/Radio.js +84 -0
- package/publish/esm/src/components/RadioGroup/RadioGroup.d.ts +44 -0
- package/publish/esm/src/components/RadioGroup/RadioGroup.js +25 -0
- package/publish/esm/src/components/RadioGroup/index.d.ts +2 -0
- package/publish/esm/src/components/RadioGroup/index.js +1 -0
- package/publish/esm/src/components/Select/Select.d.ts +13 -0
- package/publish/esm/src/components/Select/Select.js +26 -0
- package/publish/esm/src/components/Sheet/sheet.d.ts +25 -0
- package/publish/esm/src/components/Sheet/sheet.js +36 -0
- package/publish/esm/src/components/Skeleton/skeleton.d.ts +2 -0
- package/publish/esm/src/components/Skeleton/skeleton.js +6 -0
- package/publish/esm/src/components/Slider/slider.d.ts +4 -0
- package/publish/esm/src/components/Slider/slider.js +7 -0
- package/publish/esm/src/components/Switch/Switch.d.ts +37 -0
- package/publish/esm/src/components/Switch/Switch.js +26 -0
- package/publish/esm/src/components/Switch/index.d.ts +2 -0
- package/publish/esm/src/components/Switch/index.js +1 -0
- package/publish/esm/src/components/Table/Table.d.ts +10 -0
- package/publish/esm/src/components/Table/Table.js +20 -0
- package/publish/esm/src/components/Tabs/Tabs.d.ts +7 -0
- package/publish/esm/src/components/Tabs/Tabs.js +13 -0
- package/publish/esm/src/components/Textarea/Textarea.d.ts +5 -0
- package/publish/esm/src/components/Textarea/Textarea.js +8 -0
- package/publish/esm/src/components/Toast/Toast.d.ts +15 -0
- package/publish/esm/src/components/Toast/Toast.js +33 -0
- package/publish/esm/src/components/Toast/toaster.d.ts +1 -0
- package/publish/esm/src/components/Toast/toaster.js +10 -0
- package/publish/esm/src/components/Toast/use-toast.d.ts +44 -0
- package/publish/esm/src/components/Toast/use-toast.js +127 -0
- package/publish/esm/src/components/Tooltip/Tooltip.d.ts +8 -0
- package/publish/esm/src/components/Tooltip/Tooltip.js +11 -0
- package/publish/esm/src/helpers/clone-deep.d.ts +1 -0
- package/publish/esm/src/helpers/clone-deep.js +11 -0
- package/publish/esm/src/helpers/clone-deep.spec.d.ts +1 -0
- package/publish/esm/src/helpers/clone-deep.spec.js +20 -0
- package/publish/esm/src/helpers/generic-forward-ref.d.ts +5 -0
- package/publish/esm/src/helpers/generic-forward-ref.js +3 -0
- package/publish/esm/src/helpers/http.d.ts +1 -0
- package/publish/esm/src/helpers/http.js +6 -0
- package/publish/esm/src/helpers/is-client.d.ts +1 -0
- package/publish/esm/src/helpers/is-client.js +3 -0
- package/publish/esm/src/helpers/is-object.d.ts +6 -0
- package/publish/esm/src/helpers/is-object.js +8 -0
- package/publish/esm/src/helpers/is-object.spec.d.ts +1 -0
- package/publish/esm/src/helpers/is-object.spec.js +22 -0
- package/publish/esm/src/helpers/merge-deep.d.ts +7 -0
- package/publish/esm/src/helpers/merge-deep.js +25 -0
- package/publish/esm/src/helpers/merge-deep.spec.d.ts +1 -0
- package/publish/esm/src/helpers/merge-deep.spec.js +54 -0
- package/publish/esm/src/helpers/omit.d.ts +1 -0
- package/publish/esm/src/helpers/omit.js +12 -0
- package/publish/esm/src/helpers/omit.spec.d.ts +1 -0
- package/publish/esm/src/helpers/omit.spec.js +7 -0
- package/publish/esm/src/index.d.ts +3 -0
- package/publish/esm/src/index.js +3 -0
- package/publish/esm/src/types/index.d.ts +3 -0
- package/publish/esm/src/types/index.js +1 -0
- package/publish/esm/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DialogHeader: {
|
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const DialogFooter: {
|
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const Dialog = DialogPrimitive.Root;
|
|
7
|
+
const DialogTrigger = DialogPrimitive.Trigger;
|
|
8
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
9
|
+
const DialogClose = DialogPrimitive.Close;
|
|
10
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
11
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
12
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
|
|
13
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
14
|
+
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
|
|
15
|
+
DialogHeader.displayName = "DialogHeader";
|
|
16
|
+
const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
|
|
17
|
+
DialogFooter.displayName = "DialogFooter";
|
|
18
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
|
|
19
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
20
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
21
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
22
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
+
declare const Drawer: {
|
|
4
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DrawerPortal: React.FC<import("@radix-ui/react-dialog").DialogPortalProps>;
|
|
9
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
12
|
+
onAnimationEnd?: ((open: boolean) => void) | undefined;
|
|
13
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DrawerHeader: {
|
|
15
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
declare const DrawerFooter: {
|
|
19
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
23
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
24
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
const Drawer = ({ shouldScaleBackground = true, ...props }) => (_jsx(DrawerPrimitive.Root, { shouldScaleBackground: shouldScaleBackground, ...props }));
|
|
6
|
+
Drawer.displayName = "Drawer";
|
|
7
|
+
const DrawerTrigger = DrawerPrimitive.Trigger;
|
|
8
|
+
const DrawerPortal = DrawerPrimitive.Portal;
|
|
9
|
+
const DrawerClose = DrawerPrimitive.Close;
|
|
10
|
+
const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DrawerPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80", className), ...props })));
|
|
11
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
12
|
+
const DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DrawerPortal, { children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { ref: ref, className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", className), ...props, children: [_jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), children] })] })));
|
|
13
|
+
DrawerContent.displayName = "DrawerContent";
|
|
14
|
+
const DrawerHeader = ({ className, ...props }) => (_jsx("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props }));
|
|
15
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
16
|
+
const DrawerFooter = ({ className, ...props }) => (_jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
|
|
17
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
18
|
+
const DrawerTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DrawerPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
|
|
19
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
20
|
+
const DrawerDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DrawerPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
|
|
21
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
22
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean | undefined;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean | undefined;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
7
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
8
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
9
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
10
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
11
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
12
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.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 data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
13
|
+
DropdownMenuSubTrigger.displayName =
|
|
14
|
+
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
15
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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", className), ...props })));
|
|
16
|
+
DropdownMenuSubContent.displayName =
|
|
17
|
+
DropdownMenuPrimitive.SubContent.displayName;
|
|
18
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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", className), ...props }) })));
|
|
19
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
20
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
|
|
21
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
22
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.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 transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
23
|
+
DropdownMenuCheckboxItem.displayName =
|
|
24
|
+
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
25
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.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 transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
26
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
27
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
|
|
28
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
29
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
30
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
31
|
+
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
32
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
|
|
33
|
+
};
|
|
34
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
35
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
|
+
declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
|
|
4
|
+
declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const HoverCard = HoverCardPrimitive.Root;
|
|
7
|
+
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
8
|
+
const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-64 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", className), ...props })));
|
|
9
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
10
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const iconButtonVariants: (props?: ({
|
|
4
|
+
variant?: "text" | "primary" | "secondary" | "outline" | "tonal" | "danger" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof iconButtonVariants> {
|
|
8
|
+
/**
|
|
9
|
+
* CSS class to be appended to the root element.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Disabled interaction and applies disabled styles
|
|
18
|
+
*/
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export { IconButton, iconButtonVariants };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
// /dwd
|
|
7
|
+
const iconButtonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed border border-transparent", {
|
|
8
|
+
variants: {
|
|
9
|
+
/**
|
|
10
|
+
* Determines style variation of Button component.
|
|
11
|
+
*/
|
|
12
|
+
variant: {
|
|
13
|
+
primary: "bg-pink-500 text-white hover:bg-pink-600 disabled:bg-pink-300",
|
|
14
|
+
secondary: "bg-white text-gray-900 hover:bg-gray-100 disabled:text-gray-400 disabled:bg-white border-gray-300",
|
|
15
|
+
outline: "border-pink-500 text-pink-500 bg-white hover:bg-pink-50 disabled:bg-white disabled:border-pink-300 disabled:text-pink-300",
|
|
16
|
+
tonal: "bg-pink-100 text-pink-500 hover:bg-pink-200 disabled:bg-gray-200 disabled:text-gray-400",
|
|
17
|
+
danger: "bg-red-500 text-white hover:bg-red-600 disabled:bg-red-300",
|
|
18
|
+
text: "text-gray-900 bg-transparent hover:bg-gray-100 disabled:text-gray-400 disabled:bg-transparent",
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Determines size variation of Button component.
|
|
22
|
+
*/
|
|
23
|
+
size: {
|
|
24
|
+
default: "text-sm h-10 w-10",
|
|
25
|
+
sm: "h-8 w-8 text-sm",
|
|
26
|
+
lg: "h-12 w-12 text-base",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "primary",
|
|
31
|
+
size: "default",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const IconButton = React.forwardRef(({ className, variant = "primary", size = "default", asChild = false, isDisabled = false, ...props }, ref) => {
|
|
35
|
+
const Comp = asChild ? Slot : "button";
|
|
36
|
+
const buttonClassName = cn(iconButtonVariants({ variant, size, className }));
|
|
37
|
+
return (_jsx(Comp, { className: buttonClassName, disabled: isDisabled, ref: ref, ...props, children: props.children }));
|
|
38
|
+
});
|
|
39
|
+
IconButton.displayName = "IconButton";
|
|
40
|
+
export { IconButton, iconButtonVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconButton } from "./IconButton";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
|
+
return (_jsx("input", { type: type, className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
|
|
6
|
+
});
|
|
7
|
+
Input.displayName = "Input";
|
|
8
|
+
export { Input };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
export { Label };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
const labelVariants = cva("text-sm font-normal leading-none disabled:opacity-50 text-gray-900 peer-disabled:cursor-not-allowed peer-disabled:opacity-50");
|
|
7
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
|
|
8
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
9
|
+
export { Label };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
declare const MenubarMenu: {
|
|
4
|
+
(props: MenubarPrimitive.ScopedProps<MenubarPrimitive.MenubarMenuProps>): JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const MenubarPortal: React.FC<MenubarPrimitive.MenubarPortalProps>;
|
|
9
|
+
declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
10
|
+
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
14
|
+
inset?: boolean | undefined;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
19
|
+
inset?: boolean | undefined;
|
|
20
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
24
|
+
inset?: boolean | undefined;
|
|
25
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const MenubarShortcut: {
|
|
28
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayname: string;
|
|
30
|
+
};
|
|
31
|
+
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
5
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
const MenubarMenu = MenubarPrimitive.Menu;
|
|
8
|
+
const MenubarGroup = MenubarPrimitive.Group;
|
|
9
|
+
const MenubarPortal = MenubarPrimitive.Portal;
|
|
10
|
+
const MenubarSub = MenubarPrimitive.Sub;
|
|
11
|
+
const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
|
|
12
|
+
const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className), ...props })));
|
|
13
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
14
|
+
const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(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 })));
|
|
15
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
16
|
+
const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(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, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
|
|
17
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
18
|
+
const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(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", className), ...props })));
|
|
19
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
20
|
+
const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(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", className), ...props }) })));
|
|
21
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
22
|
+
const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(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 })));
|
|
23
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
24
|
+
const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(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, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
|
|
25
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
26
|
+
const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(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, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
|
|
27
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
28
|
+
const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
|
|
29
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
30
|
+
const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
|
|
31
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
32
|
+
const MenubarShortcut = ({ className, ...props }) => {
|
|
33
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
|
|
34
|
+
};
|
|
35
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
36
|
+
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
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>>;
|
|
6
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
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, NavigationMenuDemo, };
|
|
13
|
+
declare function NavigationMenuDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { ChevronDown } from "lucide-react";
|
|
6
|
+
import Link from "next/link";
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Root, { ref: ref, className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuViewport, {})] })));
|
|
9
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
10
|
+
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.List, { ref: ref, className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className), ...props })));
|
|
11
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
12
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
13
|
+
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-[active]:bg-accent/50 data-[state=open]:bg-accent/50");
|
|
14
|
+
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Trigger, { ref: ref, className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDown, { className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] })));
|
|
15
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
16
|
+
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(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 })));
|
|
17
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
18
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
19
|
+
const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: _jsx(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 }) })));
|
|
20
|
+
NavigationMenuViewport.displayName =
|
|
21
|
+
NavigationMenuPrimitive.Viewport.displayName;
|
|
22
|
+
const NavigationMenuIndicator = React.forwardRef(({ className, ...props }, ref) => (_jsx(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, children: _jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" }) })));
|
|
23
|
+
NavigationMenuIndicator.displayName =
|
|
24
|
+
NavigationMenuPrimitive.Indicator.displayName;
|
|
25
|
+
export { navigationMenuTriggerStyle, NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, NavigationMenuDemo, };
|
|
26
|
+
const components = [
|
|
27
|
+
{
|
|
28
|
+
title: "Alert Dialog",
|
|
29
|
+
href: "/docs/primitives/alert-dialog",
|
|
30
|
+
description: "A modal dialog that interrupts the user with important content and expects a response.",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: "Hover Card",
|
|
34
|
+
href: "/docs/primitives/hover-card",
|
|
35
|
+
description: "For sighted users to preview content available behind a link.",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: "Progress",
|
|
39
|
+
href: "/docs/primitives/progress",
|
|
40
|
+
description: "Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Scroll-area",
|
|
44
|
+
href: "/docs/primitives/scroll-area",
|
|
45
|
+
description: "Visually or semantically separates content.",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "Tabs",
|
|
49
|
+
href: "/docs/primitives/tabs",
|
|
50
|
+
description: "A set of layered sections of content—known as tab panels—that are displayed one at a time.",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "Tooltip",
|
|
54
|
+
href: "/docs/primitives/tooltip",
|
|
55
|
+
description: "A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.",
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
function NavigationMenuDemo() {
|
|
59
|
+
return (_jsx(NavigationMenu, { children: _jsxs(NavigationMenuList, { children: [_jsxs(NavigationMenuItem, { children: [_jsx(NavigationMenuTrigger, { children: "Getting started" }), _jsx(NavigationMenuContent, { children: _jsxs("ul", { className: "grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]", children: [_jsx("li", { className: "row-span-3", children: _jsx(NavigationMenuLink, { asChild: true, children: _jsxs("a", { className: "flex h-full w-full select-none flex-col justify-end rounded-md bg-gradient-to-b from-muted/50 to-muted p-6 no-underline outline-none focus:shadow-md", href: "/", children: [_jsx("div", { className: "mb-2 mt-4 text-lg font-medium", children: "shadcn/ui" }), _jsx("p", { className: "text-sm leading-tight text-muted-foreground", children: "Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source." })] }) }) }), _jsx(ListItem, { href: "/docs", title: "Introduction", children: "Re-usable components built using Radix UI and Tailwind CSS." }), _jsx(ListItem, { href: "/docs/installation", title: "Installation", children: "How to install dependencies and structure your app." }), _jsx(ListItem, { href: "/docs/primitives/typography", title: "Typography", children: "Styles for headings, paragraphs, lists...etc" })] }) })] }), _jsxs(NavigationMenuItem, { children: [_jsx(NavigationMenuTrigger, { children: "Components" }), _jsx(NavigationMenuContent, { children: _jsx("ul", { className: "grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ", children: components.map((component) => (_jsx(ListItem, { title: component.title, href: component.href, children: component.description }, component.title))) }) })] }), _jsx(NavigationMenuItem, { children: _jsx(Link, { href: "/docs", legacyBehavior: true, passHref: true, children: _jsx(NavigationMenuLink, { className: navigationMenuTriggerStyle(), children: "Documentation" }) }) })] }) }));
|
|
60
|
+
}
|
|
61
|
+
const ListItem = React.forwardRef(({ className, title, children, ...props }, ref) => {
|
|
62
|
+
return (_jsx("li", { children: _jsx(NavigationMenuLink, { asChild: true, children: _jsxs("a", { ref: ref, className: cn("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", className), ...props, children: [_jsx("div", { className: "text-sm font-medium leading-none", children: title }), _jsx("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: children })] }) }) }));
|
|
63
|
+
});
|
|
64
|
+
ListItem.displayName = "ListItem";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ButtonProps } from "@/components/ui/button";
|
|
3
|
+
declare const Pagination: ({ className, ...props }: React.ComponentProps<"nav">) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
+
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
type PaginationLinkProps = {
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
} & Pick<ButtonProps, "size"> & React.ComponentProps<"a">;
|
|
9
|
+
declare const PaginationLink: {
|
|
10
|
+
({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const PaginationPrevious: {
|
|
14
|
+
({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
declare const PaginationNext: ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const PaginationEllipsis: ({ className, ...props }: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
import { buttonVariants } from "@/components/ui/button";
|
|
6
|
+
const Pagination = ({ className, ...props }) => (_jsx("nav", { role: "navigation", "aria-label": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
|
|
7
|
+
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("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) => (_jsx("li", { ref: ref, className: cn("", className), ...props })));
|
|
10
|
+
PaginationItem.displayName = "PaginationItem";
|
|
11
|
+
const PaginationLink = ({ className, isActive, size = "icon", ...props }) => (_jsx(PaginationItem, { children: _jsx("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 }) => (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 pl-2.5", className), ...props, children: [_jsx(ChevronLeft, { className: "h-4 w-4" }), _jsx("span", { children: "Previous" })] }));
|
|
17
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
18
|
+
const PaginationNext = ({ className, ...props }) => (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 pr-2.5", className), ...props, children: [_jsx("span", { children: "Next" }), _jsx(ChevronRight, { className: "h-4 w-4" })] }));
|
|
19
|
+
const PaginationEllipsis = ({ className, ...props }) => (_jsxs("span", { "aria-hidden": true, className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "More pages" })] }));
|
|
20
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
const Popover = PopoverPrimitive.Root;
|
|
6
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(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", className), ...props }) })));
|
|
8
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
9
|
+
export { Popover, PopoverTrigger, PopoverContent };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
3
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Progress };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
const Progress = React.forwardRef(({ className, value, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
|
|
6
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
7
|
+
export { Progress };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
3
|
+
import type * as Radix from "@radix-ui/react-primitive";
|
|
4
|
+
declare const createRadioScope: import("@radix-ui/react-context").CreateScope;
|
|
5
|
+
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
6
|
+
interface RadioProps extends PrimitiveButtonProps {
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
onCheck?(): void;
|
|
10
|
+
}
|
|
11
|
+
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
13
|
+
export interface RadioIndicatorProps extends PrimitiveSpanProps {
|
|
14
|
+
/**
|
|
15
|
+
* Used to force mounting when more control is needed. Useful when
|
|
16
|
+
* controlling animation with React animation libraries.
|
|
17
|
+
*/
|
|
18
|
+
forceMount?: true;
|
|
19
|
+
}
|
|
20
|
+
declare const RadioIndicator: React.ForwardRefExoticComponent<RadioIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
21
|
+
export { createRadioScope, Radio, RadioIndicator, };
|
|
22
|
+
export type { RadioProps };
|