import type { ConditionalValue, Conditions, Nested } from './conditions' import type { PropertiesFallback } from './csstype' import type { SystemProperties, CssVarProperties } from './style-props' type String = string & {} type Number = number & {} /* ----------------------------------------------------------------------------- * Native css properties * -----------------------------------------------------------------------------*/ export type CssProperty = keyof PropertiesFallback export type CssProperties = PropertiesFallback & CssVarProperties export type CssKeyframes = { [name: string]: { [time: string]: CssProperties } } /* ----------------------------------------------------------------------------- * Conditional css properties * -----------------------------------------------------------------------------*/ type MinimalNested

= { [K in keyof Conditions]?: Nested

} type GenericProperties = { [key: string]: ConditionalValue } /* ----------------------------------------------------------------------------- * Native css props * -----------------------------------------------------------------------------*/ export type NestedCssProperties = Nested export type SystemStyleObject = Nested export type GlobalStyleObject = { [selector: string]: SystemStyleObject } export type CompositionStyleObject = Nested<{ [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown }> /* ----------------------------------------------------------------------------- * Jsx style props * -----------------------------------------------------------------------------*/ export type JsxStyleProps = SystemProperties & MinimalNested & { css?: SystemStyleObject } type Assign = Omit & U export type PatchedHTMLProps = { htmlSize?: string | number htmlWidth?: string | number htmlHeight?: string | number htmlTranslate?: 'yes' | 'no' | undefined htmlContent?: string } export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size' | 'content' type WithHTMLProps = Omit & PatchedHTMLProps export type JsxHTMLProps, P extends Record = {}> = Assign< WithHTMLProps, P >