import type { Properties } from 'csstype'; export declare type Options = { useMaxWidthMediaQueries?: boolean; breakpoints?: Record; }; /** * A breakpoint can either be a number that gets converted to a media query * based on the option to useMaxWidthMediaQueries. Defaults to min-width. * Or it can be a string that gets used as a media query. */ export declare type Breakpoint = string | number; /** * CSSObject can contain all the known CSS properties with known values, * and extended to allow unknown keys to accept both css variables and * media queries that can contain known css properties and css variables. */ export declare type CSSObject = KnownCSSProperties & CSSVariables & MediaQueries; export declare type MediaQueries = { [key: string]: KnownCSSProperties & CSSVariables; }; declare type KnownCSSProperties = { [key in keyof Properties]: Properties[key]; }; declare type CSSVariables = { [key: string]: string | number | undefined; }; /** * ResponsiveStyle is a type that accepts a value, or value with * media queries. Generics are optional, but recommended. * @param T The type of the value accepted * @param B Union of breakpoints allowed * @example ResponsiveStyle * @todo Should no other breakpoint be allowed if B is provided? */ export declare type ResponsiveStyle = T | StyleWithMediaQuery; export declare type StyleWithMediaQuery = [ T, Partial> ]; /** * ResponsiveCSSProps is used in pair with the helper function * createResponsiveCSSProps that accepts only known css properties and * returns a 1-to-1 mapping from value to css declaration. * @param P Union of properties to accept * @param B Union of breakpoints allowed * @example * enum CSSProps { * 'width', * 'height', * 'overflow', * 'borderRadius', * } * type ComponentProps = ResponsiveCSSProps & { … } * * @todo Should KnownCSSProperties be used here?? */ export declare type ResponsiveCSSProperties

= { [key in P]?: Properties[key] | StyleWithMediaQuery[key], B>; }; export declare type MutableCSSObject = KnownCSSProperties & CSSVariables; export declare type ResponsiveStyleMapper = (value: T | undefined) => MutableCSSObject; export {};