@mnee-ui/ui 0.0.1 → 0.0.2
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/dist/components/ui/alert.d.ts +7 -0
- package/dist/components/ui/badge.d.ts +6 -0
- package/dist/components/ui/banner.d.ts +8 -0
- package/dist/components/ui/button.d.ts +9 -0
- package/dist/components/ui/card.d.ts +27 -0
- package/dist/components/ui/code-block.d.ts +7 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/icons.d.ts +11 -0
- package/dist/components/ui/input.d.ts +12 -0
- package/dist/components/ui/modal.d.ts +15 -0
- package/dist/components/ui/table.d.ts +29 -0
- package/dist/components/ui/toast.d.ts +15 -0
- package/dist/index.js +1028 -0
- package/dist/index.mjs +964 -0
- package/dist/lib/utils.d.ts +2 -0
- package/package.json +20 -7
- package/components/ui/alert.tsx +0 -84
- package/components/ui/badge.tsx +0 -38
- package/components/ui/banner.tsx +0 -73
- package/components/ui/button.tsx +0 -59
- package/components/ui/card.tsx +0 -156
- package/components/ui/code-block.tsx +0 -108
- package/components/ui/drawer.tsx +0 -164
- package/components/ui/icons.tsx +0 -96
- package/components/ui/input.tsx +0 -129
- package/components/ui/modal.tsx +0 -134
- package/components/ui/table.tsx +0 -185
- package/components/ui/toast.tsx +0 -136
- /package/{components/ui/index.ts → dist/components/ui/index.d.ts} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type AlertVariant = "info" | "warning" | "tip" | "error" | "success";
|
|
2
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant?: AlertVariant;
|
|
4
|
+
title?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function Alert({ variant, title, children, className, ...props }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type BadgeVariant = "success" | "warning" | "error" | "info" | "default" | "brand";
|
|
2
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
variant?: BadgeVariant;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function Badge({ variant, className, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type BannerVariant = "gradient" | "info" | "success" | "warning" | "error";
|
|
2
|
+
export interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
variant?: BannerVariant;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function Banner({ title, description, variant, action, className, ...props }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ButtonVariant = "primary" | "secondary" | "destructive" | "ghost" | "outline";
|
|
2
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function Button({ variant, size, loading, disabled, className, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type BalanceCardProps = {
|
|
2
|
+
variant: "balance";
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
amount: string;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
type ModuleCardProps = {
|
|
11
|
+
variant: "module";
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
status?: "success" | "warning" | "error" | "info" | "default";
|
|
15
|
+
statusLabel?: string;
|
|
16
|
+
onEdit?: () => void;
|
|
17
|
+
onView?: () => void;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
export type CardProps = BalanceCardProps | ModuleCardProps;
|
|
22
|
+
export interface CardContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare function CardContainer({ className, children, ...props }: CardContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function Card(props: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type DrawerWidth = "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export type DrawerSide = "left" | "right";
|
|
3
|
+
export interface DrawerProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
width?: DrawerWidth;
|
|
9
|
+
/** Which edge the drawer slides in from */
|
|
10
|
+
side?: DrawerSide;
|
|
11
|
+
/** Footer content — rendered in a sticky bar at the bottom */
|
|
12
|
+
footer?: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Drawer({ isOpen, onClose, title, children, footer, width, side, className, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function DrawerHeader({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function DrawerBody({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function DrawerFooter({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LucideIcon, type LucideProps } from "lucide-react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface IconProps extends Omit<LucideProps, "size"> {
|
|
5
|
+
/** Any Lucide icon component, e.g. import { Wallet } from "lucide-react" */
|
|
6
|
+
icon: LucideIcon;
|
|
7
|
+
/** Design-system size token. Defaults to "md" (16px). */
|
|
8
|
+
size?: IconSize;
|
|
9
|
+
}
|
|
10
|
+
export declare function Icon({ icon: LucideComponent, size, className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function MneeIcon(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type InputSize = "sm" | "md" | "lg";
|
|
2
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
3
|
+
label?: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
size?: InputSize;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
suffix?: string;
|
|
9
|
+
leadingIcon?: React.ReactNode;
|
|
10
|
+
trailingIcon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function Input({ label, hint, error, size, className, id, disabled, required, prefix, suffix, leadingIcon, trailingIcon, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ModalSize = "sm" | "md" | "lg";
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
size?: ModalSize;
|
|
8
|
+
/** Footer content — rendered in a sticky bar at the bottom */
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Modal({ isOpen, onClose, title, children, footer, size, className }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ModalHeader({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ModalBody({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ModalFooter({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Loader2 } from "lucide-react";
|
|
2
|
+
export declare function Table({ className, children, ...props }: React.HTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function TableHead({ className, children, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function TableBody({ className, children, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function TableRow({ className, children, onClick, ...props }: React.HTMLAttributes<HTMLTableRowElement>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export interface TableHeaderProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
7
|
+
sortable?: boolean;
|
|
8
|
+
sortDirection?: "asc" | "desc" | null;
|
|
9
|
+
onSort?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function TableHeader({ className, children, sortable, sortDirection, onSort, ...props }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function TableCell({ className, children, ...props }: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export interface TableEmptyProps {
|
|
14
|
+
message?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function TableEmpty({ message, description, }: TableEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function TableLoading({ cols }: {
|
|
19
|
+
cols?: number;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface PaginationProps {
|
|
22
|
+
page: number;
|
|
23
|
+
totalPages: number;
|
|
24
|
+
totalItems?: number;
|
|
25
|
+
onPageChange: (page: number) => void;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function Pagination({ page, totalPages, totalItems, onPageChange, className }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { Loader2 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ToastType = "success" | "error" | "warning" | "info" | "default";
|
|
2
|
+
export interface ToastContextType {
|
|
3
|
+
showToast: (message: string, type?: ToastType) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function useToast(): ToastContextType;
|
|
6
|
+
export interface ToastProps {
|
|
7
|
+
message: string;
|
|
8
|
+
type: ToastType;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Toast({ message, type, onClose, className }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ToastProvider({ children }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|