UNPKG

component-library-mustafa-akagunduz

Version:

Air Command System projesi için geliştirilmiş React component kütüphanesi

155 lines (144 loc) 4.3 kB
import React from 'react'; type ButtonProps = { children: React.ReactNode; onClick?: () => void; disabled?: boolean; variant?: 'primary' | 'secondary' | 'danger' | 'success' | 'ghost'; size?: 'small' | 'medium' | 'large'; loading?: boolean; icon?: React.ReactNode; iconPosition?: 'left' | 'right'; fullWidth?: boolean; type?: 'button' | 'submit' | 'reset'; className?: string; 'aria-label'?: string; }; declare const Button: React.FC<ButtonProps>; type TFunction = (key: string) => string; interface LoginFormProps { onLogin: (credentials: { userName: string; password: string; }) => Promise<{ success: boolean; error?: string; errorType?: string; }>; onThemeChange: () => void; onLanguageChange: (language: string) => void; currentTheme: 'light' | 'dark'; currentLanguage: string; isLoading?: boolean; validatePassword: (password: string) => boolean; t: TFunction; } declare const LoginForm: React.FC<LoginFormProps>; interface NavbarProps { user: { fullName: string; role: string; }; currentTheme: 'light' | 'dark'; currentLanguage: string; onThemeToggle: () => void; onLanguageChange: (lang: string) => void; onLogout: () => void; themeIcon?: React.ReactNode; t: (key: string) => string; } declare const Navbar: React.FC<NavbarProps>; interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> { error?: boolean; fullWidth?: boolean; variant?: 'default' | 'outlined'; } declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>; interface ComboBoxOption { value: string; label: string; } interface ComboBoxProps { options: ComboBoxOption[]; value?: string; onChange?: (value: string) => void; placeholder?: string; disabled?: boolean; className?: string; } declare const ComboBox: React.FC<ComboBoxProps>; interface AutoCompleteOption { value: string; label: string; } interface AutoCompleteProps { options: AutoCompleteOption[]; values?: string[]; onChange?: (values: string[]) => void; placeholder?: string; disabled?: boolean; className?: string; searchPlaceholder?: string; t?: (key: string, params?: any) => string; } declare const AutoComplete: React.FC<AutoCompleteProps>; interface ModalProps { isOpen: boolean; onClose: () => void; title?: string; children: React.ReactNode; className?: string; closeOnOverlayClick?: boolean; closeOnEscape?: boolean; hasOverlay?: boolean; } declare const Modal: React.FC<ModalProps>; type ToastType = 'success' | 'error' | 'warning' | 'info'; interface Toast { id: string; type: ToastType; title: string; message?: string; duration?: number; } interface ToastItemProps { toast: Toast; onRemove: (id: string) => void; } declare const ToastItem: React.FC<ToastItemProps>; interface SortConfig { column: string; direction: 'asc' | 'desc'; order: number; } interface TableColumn { key: string; label: string; sortable?: boolean; render?: (value: any, row: any) => React.ReactNode; width?: string; } interface TableProps { data: any[]; columns: TableColumn[]; selectedRowId?: string | null; selectedRowIds?: string[]; sortConfig?: SortConfig[]; totalCount?: number; showingCount?: number; onRowSelect?: (rowId: string, row: any, event?: MouseEvent) => void; onSort?: (columnKey: string) => void; onShowFilters?: () => void; onClearSelection?: () => void; onUpdate?: () => void; onDelete?: () => void; onShowHistory?: () => void; showUpdateDelete?: boolean; hasSelection?: boolean; isMultipleSelection?: boolean; t: (key: string, params?: any) => string; className?: string; children?: React.ReactNode; } declare const Table: React.FC<TableProps>; export { AutoComplete, Button, ComboBox, Input, LoginForm, Modal, Navbar, Table, ToastItem }; export type { AutoCompleteOption, AutoCompleteProps, ComboBoxOption, ComboBoxProps, InputProps, LoginFormProps, ModalProps, NavbarProps, SortConfig, TableColumn, TableProps, Toast, ToastItemProps, ToastType };