import * as CSS from "csstype"; import type { BackgroundProps, BorderProps, ColorProps, EffectProps, FilterProps, FlexboxProps, GridProps, InteractivityProps, LayoutProps, ListProps, OtherProps, PositionProps, RingProps, SpaceProps, TextDecorationProps, TransformProps, TransitionProps, TypographyProps, ScrollProps } from "./config"; import { PseudoKey } from "./pseudos"; import { ResponsiveValue } from "./utils/types"; export interface StyleProps extends SpaceProps, ColorProps, TransitionProps, TypographyProps, FlexboxProps, TransformProps, GridProps, FilterProps, LayoutProps, BorderProps, EffectProps, BackgroundProps, ListProps, PositionProps, RingProps, ScrollProps, InteractivityProps, TextDecorationProps, OtherProps { } export interface SystemCSSProperties extends CSS.Properties, Omit { } export type ThemeThunk = T | ((theme: Record) => T); type PropertyValue = ThemeThunk>; export type CSSWithMultiValues = { [K in keyof SystemCSSProperties]?: K extends keyof StyleProps ? StyleProps[K] | PropertyValue : PropertyValue; }; type PseudoKeys = keyof CSS.Pseudos | PseudoKey; type PseudoSelectorDefinition = D | RecursivePseudo; export type RecursivePseudo = { [K in PseudoKeys]?: PseudoSelectorDefinition & D; }; type CSSDefinition = D | string | RecursiveCSSSelector; export interface RecursiveCSSSelector { [selector: string]: CSSDefinition & D; } export type RecursiveCSSObject = D & (D | RecursivePseudo | RecursiveCSSSelector); export type SystemStyleObject = RecursiveCSSObject; export type StyleObjectOrFn = SystemStyleObject | ((theme: any) => SystemStyleObject); type PseudoProps = { [K in PseudoKey]?: SystemStyleObject; }; export interface SystemProps extends StyleProps, PseudoProps { } export {};