UNPKG

its-just-ui

Version:

ITS Just UI - React 18 & React 19 UI component library. 36+ accessible, TypeScript-native components with Tailwind CSS. Zero-config Material UI alternative for SaaS dashboards and enterprise apps.

135 lines (133 loc) 2.89 kB
import { default as React } from 'react'; export type ThemeMode = 'light' | 'dark' | 'system'; export interface ThemeColors { primary: string; secondary: string; success: string; warning: string; error: string; info: string; background: string; surface: string; text: string; textSecondary: string; border: string; focus: string; hover: string; disabled: string; } export interface ThemeSpacing { xs: string; sm: string; md: string; lg: string; xl: string; '2xl': string; '3xl': string; '4xl': string; } export interface ThemeBorderRadius { none: string; sm: string; DEFAULT: string; md: string; lg: string; xl: string; '2xl': string; '3xl': string; full: string; } export interface ThemeShadows { none: string; sm: string; DEFAULT: string; md: string; lg: string; xl: string; '2xl': string; inner: string; } export interface ThemeTransitions { none: string; all: string; colors: string; opacity: string; shadow: string; transform: string; } export interface ThemeFonts { sans: string; serif: string; mono: string; display: string; body: string; heading: string; } export interface ThemeFontSizes { xs: string; sm: string; base: string; lg: string; xl: string; '2xl': string; '3xl': string; '4xl': string; '5xl': string; '6xl': string; '7xl': string; '8xl': string; '9xl': string; } export interface ThemeFontWeights { thin: number; extralight: number; light: number; normal: number; medium: number; semibold: number; bold: number; extrabold: number; black: number; } export interface ThemeBreakpoints { sm: string; md: string; lg: string; xl: string; '2xl': string; } export interface Theme { mode: ThemeMode; colors: { light: ThemeColors; dark: ThemeColors; }; spacing: ThemeSpacing; borderRadius: ThemeBorderRadius; shadows: ThemeShadows; transitions: ThemeTransitions; fonts: ThemeFonts; fontSizes: ThemeFontSizes; fontWeights: ThemeFontWeights; breakpoints: ThemeBreakpoints; } export declare const defaultTheme: Theme; export interface ThemeContextValue { theme: Theme; setTheme: (theme: Partial<Theme>) => void; toggleMode: () => void; applyTheme: (element?: HTMLElement) => void; currentColors: ThemeColors; isDark: boolean; } export declare const useTheme: () => ThemeContextValue; export interface ThemeProviderProps { children: React.ReactNode; theme?: Partial<Theme>; defaultMode?: ThemeMode; storageKey?: string; className?: string; enableSystemMode?: boolean; } export declare const ThemeProvider: React.FC<ThemeProviderProps>; export default ThemeProvider;