import * as React from 'react';
export type Theme = 'light' | 'dark' | 'night' | 'origin-ui';
export type ThemeInput = Theme | 'system';
export type GlassMode = false | 'subtle' | true | 'prominent' | 'liquid';
export interface FTProviderProps {
/**
* Child components to wrap
*/
children: React.ReactNode;
/**
* Theme mode to use. Pass `'system'` to follow the OS preference.
* @default 'system'
*/
theme?: ThemeInput;
/**
* Glassmorphism mode
* @default false
*/
glass?: GlassMode;
/**
* Whether to automatically inject CSS
* When true, injects styles via a tag if not already present
* @default true
*/
injectCSS?: boolean;
/**
* CDN URL for CSS (used when injectCSS is true)
* @default 'https://unpkg.com/ft-design-system@latest/dist/styles.css'
*/
cssUrl?: string;
/**
* Additional class names to apply to the wrapper
*/
className?: string;
/**
* localStorage key used to persist the theme
* @default 'ft-theme'
*/
themeStorageKey?: string;
/**
* localStorage key used to persist the glass mode
* @default 'ft-glass-mode'
*/
glassStorageKey?: string;
}
export interface ThemeContextType {
theme: Theme;
setTheme: (theme: Theme) => void;
isLight: boolean;
isDark: boolean;
isNight: boolean;
isOriginUi: boolean;
}
export interface GlassContextType {
glassMode: GlassMode;
setGlassMode: (mode: GlassMode) => void;
}
export interface FTThemeContextType extends ThemeContextType, GlassContextType {
}
/**
* FT Design System Provider
*
* Unified provider that handles:
* - Automatic CSS injection (optional)
* - Theme management (light/dark/night/system) with localStorage persistence
* - Glassmorphism mode with localStorage persistence
* - Theme class on `` element
* - System theme detection and media-query listener
*
* @public
*
* @example
* ```tsx
* import { FTProvider } from 'ft-design-system';
*
* function App() {
* return (
*
*
*
* );
* }
* ```
*/
export declare const FTProvider: React.FC;
/**
* Unified hook — returns theme + glass state.
* Works safely outside FTProvider (returns DOM-based defaults with dev warnings).
*/
export declare function useFTTheme(): FTThemeContextType;
/**
* Backward-compatible hook matching the old ThemeContext shape.
*/
export declare function useTheme(): ThemeContextType;
/**
* Backward-compatible hook matching the old GlassContext shape.
*/
export declare function useGlass(): GlassContextType;
/** @deprecated Use `` instead. */
export interface ThemeProviderProps {
children: React.ReactNode;
defaultTheme?: Theme;
storageKey?: string;
}
/**
* @deprecated Use `` instead. This component wraps FTProvider for
* backward compatibility only.
*/
export declare const ThemeProvider: React.FC;
/** @deprecated Use `` instead. */
export interface GlassProviderProps {
children: React.ReactNode;
defaultGlass?: GlassMode;
storageKey?: string;
}
/**
* @deprecated Use `` instead. This component wraps FTProvider for
* backward compatibility only.
*/
export declare const GlassProvider: React.FC;
export default FTProvider;
//# sourceMappingURL=FTProvider.d.ts.map