@khyxer/fastyui 1.0.0 → 1.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.
@@ -0,0 +1,14 @@
1
+ interface AccordionContextType {
2
+ openItems: string[];
3
+ toggleItem: (value: string) => void;
4
+ multiple?: boolean;
5
+ }
6
+ interface AccordionProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ children: React.ReactNode;
8
+ multiple?: boolean;
9
+ defaultValue?: string | string[];
10
+ size?: "sm" | "lg" | "xl";
11
+ }
12
+ export declare function Accordion({ children, multiple, defaultValue, size, className, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function useAccordionContext(): AccordionContextType;
14
+ export {};
@@ -0,0 +1,15 @@
1
+ interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ value: string;
3
+ children: React.ReactNode;
4
+ }
5
+ export declare function AccordionItem({ value, children, className, ...props }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
6
+ interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7
+ children: React.ReactNode;
8
+ icon?: React.ReactNode;
9
+ }
10
+ export declare function AccordionTrigger({ children, icon, className, ...props }: AccordionTriggerProps): import("react/jsx-runtime").JSX.Element;
11
+ interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {
12
+ children: React.ReactNode;
13
+ }
14
+ export declare function AccordionContent({ children, className, ...props }: AccordionContentProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,6 @@
1
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
2
+ children: React.ReactNode;
3
+ variant?: "default" | "secondary" | "destructive";
4
+ }
5
+ export declare function Badge({ children, variant, className, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> {
2
+ text?: string;
3
+ variant?: "primary" | "secondary" | "warning" | "error";
4
+ size?: "sm" | "lg" | "xl";
5
+ onClick?: () => void;
6
+ icon?: React.ReactNode;
7
+ }
8
+ export declare function Button({ text, variant, size, onClick, icon, disabled, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ dashed?: boolean;
4
+ }
5
+ export declare function Card({ children, dashed, className, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "checked" | "defaultChecked" | "onChange" | "size"> {
2
+ checked?: boolean;
3
+ defaultChecked?: boolean;
4
+ onChange?: (checked: boolean) => void;
5
+ label?: string;
6
+ disabled?: boolean;
7
+ id?: string;
8
+ }
9
+ export declare function Checkbox({ checked: controlledChecked, defaultChecked, onChange, label, disabled, id, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,16 @@
1
+ interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ trigger: React.ReactNode;
4
+ }
5
+ export declare function DropdownMenu({ children, trigger, className, ...props }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
6
+ interface DropdownItemProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ children: React.ReactNode;
8
+ onClick?: () => void;
9
+ disabled?: boolean;
10
+ subItems?: React.ReactNode;
11
+ }
12
+ export declare function DropdownItem({ children, onClick, disabled, subItems, className, ...props }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
13
+ interface DropdownSeparatorProps {
14
+ }
15
+ export declare function DropdownSeparator({}: DropdownSeparatorProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,7 @@
1
+ interface HoverCardProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ trigger: React.ReactNode;
4
+ delay?: number;
5
+ }
6
+ export declare function HoverCard({ children, trigger, delay, className, ...props }: HoverCardProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
2
+ size?: "sm" | "lg" | "xl";
3
+ icon?: React.ReactNode;
4
+ password?: boolean;
5
+ };
6
+ export declare function Input({ size, icon, password, className, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ interface ModalContextType {
2
+ onClose: () => void;
3
+ }
4
+ export declare const ModalContext: import('react').Context<ModalContextType | null>;
5
+ interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ children: React.ReactNode;
7
+ }
8
+ export declare function Modal({ children, className, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ interface ModalBodyProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ }
4
+ export declare function ModalBody({ children, className, ...props }: ModalBodyProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ width?: "sm" | "md" | "lg" | "xl";
4
+ }
5
+ export declare function ModalContent({ children, width, className, ...props }: ModalContentProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ interface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ }
4
+ export declare function ModalFooter({ children, className, ...props }: ModalFooterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ interface ModalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ title: string;
3
+ description?: string;
4
+ showCloseButton?: boolean;
5
+ }
6
+ export declare function ModalHeader({ title, description, showCloseButton, className, ...props }: ModalHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ type InputType = "number" | "text" | "alphanumeric";
2
+ interface OTPInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
3
+ length?: number;
4
+ type?: InputType;
5
+ onChange?: (value: string) => void;
6
+ onComplete?: (value: string) => void;
7
+ size?: "sm" | "lg" | "xl";
8
+ disabled?: boolean;
9
+ autoFocus?: boolean;
10
+ value?: string;
11
+ }
12
+ export declare function OTPInput({ length, type, onChange, onComplete, size, disabled, autoFocus, value: controlledValue, className, ...props }: OTPInputProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ declare const SheetContext: import('react').Context<{
2
+ onClose: () => void;
3
+ } | null>;
4
+ interface HeroSheetProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ title: string;
6
+ description?: string;
7
+ showCloseButton?: boolean;
8
+ }
9
+ export declare function HeroSheet({ title, description, showCloseButton, className, ...props }: HeroSheetProps): import("react/jsx-runtime").JSX.Element;
10
+ export { SheetContext };
@@ -0,0 +1,7 @@
1
+ interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ side?: "left" | "right" | "top" | "bottom";
4
+ width?: "sm" | "md" | "lg" | "xl" | "full";
5
+ }
6
+ export declare function Sheet({ children, side, width, className, ...props }: SheetProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ interface SheetContentProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ }
4
+ export declare function SheetContent({ children, className, ...props }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface SheetFooterProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ children: React.ReactNode;
3
+ }
4
+ export declare function SheetFooter({ children, className, ...props }: SheetFooterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,12 @@
1
+ export interface Tab {
2
+ value: string;
3
+ label: string;
4
+ content: React.ReactNode;
5
+ }
6
+ interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
7
+ tabs: Tab[];
8
+ defaultValue?: string;
9
+ onChange?: (value: string) => void;
10
+ }
11
+ export declare function Tabs({ tabs, defaultValue, onChange, className, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { ToastPosition } from './ToastContainer';
3
+ export type ToastType = "success" | "error" | "warning" | "info";
4
+ export interface ToastProps {
5
+ id: string;
6
+ message: string;
7
+ type: ToastType;
8
+ duration?: number;
9
+ onClose: (id: string) => void;
10
+ isGlobalPaused: boolean;
11
+ onHoverChange: (isPaused: boolean) => void;
12
+ position: ToastPosition;
13
+ zIndex: number;
14
+ }
15
+ export declare const Toast: React.FC<ToastProps>;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
3
+ interface ToastContainerProps {
4
+ position?: ToastPosition;
5
+ }
6
+ export declare const ToastContainer: React.FC<ToastContainerProps>;
7
+ export {};
@@ -0,0 +1,26 @@
1
+ import { ToastType } from './Toast';
2
+ type ToastListener = (toast: {
3
+ id: string;
4
+ message: string;
5
+ type: ToastType;
6
+ duration?: number;
7
+ }) => void;
8
+ declare class ToastEmitter {
9
+ private listeners;
10
+ on(event: "show", listener: ToastListener): void;
11
+ off(event: "show", listener: ToastListener): void;
12
+ emit(event: "show", toast: {
13
+ id: string;
14
+ message: string;
15
+ type: ToastType;
16
+ duration?: number;
17
+ }): void;
18
+ }
19
+ export declare const toastEmitter: ToastEmitter;
20
+ export declare const toast: {
21
+ success: (message: string, duration?: number) => void;
22
+ error: (message: string, duration?: number) => void;
23
+ warning: (message: string, duration?: number) => void;
24
+ info: (message: string, duration?: number) => void;
25
+ };
26
+ export {};
@@ -0,0 +1,9 @@
1
+ type TooltipPosition = "top" | "bottom" | "left" | "right";
2
+ interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ content: string;
5
+ position?: TooltipPosition;
6
+ delay?: number;
7
+ }
8
+ export declare function Tooltip({ children, content, position: preferredPosition, delay, className, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};