import { CSSProperties } from 'react'; export type IVariant = T | (string & {}); export type IThemeDisplay = IVariant<'xs' | 'sm' | 'md' | 'lg' | 'xl'>; export type IThemeResponsive = Record; export type IThemeFont = Omit & { family?: CSSProperties['fontFamily']; size?: CSSProperties['fontSize']; weight?: CSSProperties['fontWeight']; textTransform?: string; }; export type IThemeFontBase = Omit & { size?: CSSProperties['fontSize'] | IThemeResponsive; fontSize?: CSSProperties['fontSize'] | IThemeResponsive; }; type D1 = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; type D2 = '0'; // type D3 = '1'; // export type IThemeFontSize = `${D1}${D2}` | `${D3}${D1}${D2}`; export type IThemeFontSize = `${D1}${D2}`; export type IThemeFontKey = 'display' | 'heading' | 'paragraph' | 'label'; export type IThemeFontVariant = IVariant<`${IThemeFontKey}${IThemeFontSize}`>; export type IThemeFonts = Partial>; export type IThemeGrid = { columns: CSSProperties['gridTemplateColumns']; size: CSSProperties['gridTemplateColumns']; columnGap: IThemeResponsive; rowGap: IThemeResponsive; } & Omit; export type IThemeGridVariant = IVariant<'default'>; export type IThemeGrids = Record; export type IThemeContainer = { maxWidth: IThemeResponsive; } & Omit; export type IThemeContainerVariant = IVariant<'default' | 'fluid'>; export type IThemeContainers = Record; export type IThemeText = { padding: CSSProperties['padding'], fontSize: CSSProperties['fontSize'], fontWeight: CSSProperties['fontWeight'], lineHeight: CSSProperties['lineHeight'], } & CSSProperties; export type IThemeForm = { backgroundColor: CSSProperties['backgroundColor'], backgroundColorDisabled: CSSProperties['backgroundColor'], backgroundColorInfo: CSSProperties['backgroundColor'], backgroundColorError: CSSProperties['backgroundColor'], color: CSSProperties['color'], colorDisabled: CSSProperties['color'], colorHover: CSSProperties['color'], colorInfo: CSSProperties['color'], colorError: CSSProperties['color'], border: CSSProperties['border'], borderWidth: CSSProperties['borderWidth'], borderColor: CSSProperties['borderColor'], borderColorHover: CSSProperties['borderColor'], borderColorDisabled: CSSProperties['borderColor'], borderColorInfo: CSSProperties['borderColor'], borderColorError: CSSProperties['borderColor'], borderRadius: CSSProperties['borderRadius'], outline: CSSProperties['outline'], outlineColorFocus: CSSProperties['outlineColor'], outlineColorActive: CSSProperties['outlineColor'], outlineColorError: CSSProperties['outlineColor'], outlineOffset: CSSProperties['outlineOffset'], transition: CSSProperties['transition'], field: { gap: CSSProperties['gap'], }, control: IThemeText, label: IThemeText, error: IThemeText, } & CSSProperties; export type IThemeFormVariant = IVariant<'default'>; export type IThemeForms = Record | Record<(string & {}), Partial>; export type IThemeColorKey = IVariant<'100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'>; export type IThemeColor = Record; export type IThemeColorVariant = IVariant<'neutral'>; // | 'primary' | 'success' | 'warning' | 'danger'; export type IThemeColors = Record; export type IThemeTransitionVariant = IVariant<'smooth'>; export type IThemeTransitions = Record; export type ITheme = Record & { fontBase: IThemeFontBase, font: IThemeFonts, grid: IThemeGrids, mediaQuery: IThemeResponsive; container: IThemeContainers, button: { size: IThemeResponsive, borderRadius: CSSProperties['borderRadius'], } & CSSProperties, form: IThemeForms, card: { shadow: CSSProperties['boxShadow'], } & CSSProperties, backdrop: { opacity: CSSProperties['opacity'], } & CSSProperties, border: { radius: CSSProperties['borderRadius'], }, shadow: IThemeResponsive, transition: IThemeTransitions, color: IThemeColors, };