import { ComponentType } from 'react'; import { Compute } from '@cloudflare/types'; import { StyleFn, BaseType, ForceInference, InferProps, InnerRefProp } from './types'; declare const shorthandSpacingProps: { readonly m: readonly ["margin"]; readonly ml: readonly ["marginLeft"]; readonly mr: readonly ["marginRight"]; readonly mt: readonly ["marginTop"]; readonly mb: readonly ["marginBottom"]; readonly mx: readonly ["marginLeft", "marginRight"]; readonly my: readonly ["marginTop", "marginBottom"]; readonly p: readonly ["padding"]; readonly pl: readonly ["paddingLeft"]; readonly pr: readonly ["paddingRight"]; readonly pt: readonly ["paddingTop"]; readonly pb: readonly ["paddingBottom"]; readonly px: readonly ["paddingLeft", "paddingRight"]; readonly py: readonly ["paddingTop", "paddingBottom"]; }; declare type ShorthandToLonghandMap = typeof shorthandSpacingProps; declare type ShorthandSpacingProp = keyof ShorthandToLonghandMap; declare const spacingProps: ("p" | "margin" | "marginLeft" | "marginRight" | "marginTop" | "marginBottom" | "padding" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingBottom" | "gap" | "m" | "ml" | "mr" | "mt" | "mb" | "mx" | "my" | "pl" | "pr" | "pt" | "pb" | "px" | "py")[]; declare const sizeProps: readonly ["width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight"]; declare const colorProps: readonly ["color", "backgroundColor", "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"]; declare const borderStyleProps: readonly ["borderStyle", "borderTopStyle", "borderBottomStyle", "borderLeftStyle", "borderRightStyle"]; declare const borderWidthProps: readonly ["borderWidth", "borderTopWidth", "borderBottomWidth", "borderLeftWidth", "borderRightWidth"]; declare const borderRadiusProps: readonly ["borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"]; export declare const styleRuleProps: ("p" | "color" | "borderColor" | "height" | "width" | "cursor" | "display" | "fontSize" | "fontWeight" | "textDecoration" | "margin" | "marginLeft" | "marginRight" | "marginTop" | "marginBottom" | "padding" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingBottom" | "gap" | "m" | "ml" | "mr" | "mt" | "mb" | "mx" | "my" | "pl" | "pr" | "pt" | "pb" | "px" | "py" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "backgroundColor" | "borderLeftColor" | "borderRightColor" | "borderTopColor" | "borderBottomColor" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "textAlign" | "verticalAlign" | "alignItems" | "alignSelf" | "justifyContent" | "textTransform" | "boxSizing" | "flexDirection" | "flexBasis" | "flexGrow" | "gridTemplateColumns")[]; export declare function filterStyleProps(props: Type): Type; declare type StyleRuleProp = typeof styleRuleProps[number]; declare type ExpandedCSSProperty

= P extends ShorthandSpacingProp ? ShorthandToLonghandMap[P][0] : P; declare type CSSPropertyValue

= P extends keyof React.CSSProperties ? React.CSSProperties[P] : never; declare type BreakpointStyle = V | [V, V] | [V, V, V]; declare type StyleProps = { [P in StyleRuleProp]?: BreakpointStyle>>; }; declare type GridAlignment = 'start' | 'end' | 'center' | 'stretch'; declare type GridProps = { gridColumnSpan?: number | number[] | 'all' | 'end'; gridColumnPad?: number | number[]; gridRowSpan?: number | number[]; gridRowPad?: number | number[]; gridAlign?: GridAlignment; gridJustify?: GridAlignment; }; declare function createStyledComponent(rule: StyleFn, StyleProps & AdditionalStyleProps>): ComponentType & StyleProps & AdditionalStyleProps & InnerRefProp<'div'> & GridProps>>; declare function createStyledComponent(rule: StyleFn, StyleProps & AdditionalStyleProps>, type?: Base, passthroughProps?: string[]): ComponentType & StyleProps & AdditionalStyleProps & InnerRefProp & GridProps>>; export default createStyledComponent; export { colorProps, spacingProps, sizeProps, borderStyleProps, borderWidthProps, borderRadiusProps };