import type { Globals as Globals0, Property, DataType } from 'csstype'; import type { ComponentProps, GetComponentProps } from './types'; type Globals = ExtractStrict; type ContentPosition = ExtractStrict; type JustifyContent = ExtractStrict; type AlignItems = ExtractStrict; type AlignSelf = ExtractStrict; type AlignContent = ExtractStrict; type FlexBasis = ExtractStrict; type FlexWrap = ExtractStrict; type Display = ExtractStrict; type Column = /* string | */ number | boolean; export interface FlexProps { /** Defaults to `flex`. */ display?: Display | undefined; /** @deprecated Use `display` instead. `display` takes priority. */ flex?: boolean | undefined; /** @deprecated Use `display` instead. `display` takes priority. Sets `display` to `inline-flex`. */ inline?: boolean | undefined; /** Sets `flex-direction` to `row`. */ row?: boolean | undefined; /** Sets `flex-direction` to `column`. Takes a precedence over `row`. */ column?: boolean | undefined; /** Used with `row` or `col`. Sets `flex-direction` to `column-reverse` or `row-reverse`. */ reverse?: boolean | undefined; /** Sets `flex-wrap` to corresponding value. Also accepts boolean value: `true` equals to `wrap`, `false` equals to `nowrap`. */ wrap?: FlexWrap | boolean | undefined; /** Sets `align-content` to corresponding value. */ alignContent?: AlignContent | undefined; /** Sets `align-items` to corresponding value. */ alignItems?: AlignItems | undefined; /** Sets `align-self` to corresponding value. */ alignSelf?: AlignSelf | undefined; /** Sets `justify-content` to corresponding value. */ justifyContent?: JustifyContent | undefined; /** Sets `justifyContent` and `alignItems` to `center`. `justifyContent` and `alignItems` take a precedence over `center`. */ center?: boolean | undefined; /** Sets `flex-basis` to corresponding value. */ basis?: FlexBasis | undefined; /** Sets `flex-grow` to corresponding value. Also accepts boolean value: `true` equals to `1`, `false` equals to `0`. */ grow?: Column | undefined; /** Sets `flex-shrink` to corresponding value. Also accepts boolean value: `true` equals to `1`, `false` equals to `0`. */ shrink?: Column | undefined; /** Sets `order` to corresponding value. */ order?: number | undefined; /** Stretch by horizontal or sets width in percentage (numbers in range 0.0 to 1.0 inclusive). */ hfill?: boolean | number | undefined; /** Stretch by vertical or sets height in percentage (numbers in range 0.0 to 1.0 inclusive). */ vfill?: boolean | number | undefined; /** Stretch by vertical and horizontal. */ fill?: boolean | undefined; /** * Sets `min-width: 0` and `min-height: 0`. * By default, a flex item cannot be smaller than the size of its content. * The initial setting on flex items is `min-width: auto` and `min-height: auto`. * One way to enable flex items to shrink past their content is to set a flex item to `min-width: 0` or `min-height: 0`. */ shrinkByContent?: boolean | undefined; /** Sets `min-width` to `0`. Takes a precedence over `shrinkByContent`. */ shrinkWidth?: boolean | undefined; /** Sets `min-height` to `0`. Takes a precedence over `shrinkByContent`. */ shrinkHeight?: boolean | undefined; } export type SpaceSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'; /** Signed `SpaceSize`. */ export type SSpaceSize = `-${SpaceSize}`; /** Unsigned space. */ export type USpace = number | SpaceSize; /** Unsigned and signed space. */ export type Space = USpace | SSpaceSize; /** `number` is treated as number of pixels (px). */ export type SpaceUnit = 'px' | 'em' | 'rem' | 'ex' | 'ch' | 'cm' | 'mm' | 'in' | 'pt' | 'pc' | number; export type Gap = USpace | `${USpace} ${USpace}`; type Padding = USpace; export interface SpaceProps { /** Measure unit of space */ unit?: SpaceUnit | undefined; /** Size of margin */ mSize?: Space | undefined; /** Measure unit of margin */ mUnit?: SpaceUnit | undefined; /** margin */ m?: boolean | Space | undefined; /** margin-top */ mt?: boolean | Space | undefined; /** margin-right */ mr?: boolean | Space | undefined; /** margin-bottom */ mb?: boolean | Space | undefined; /** margin-left */ ml?: boolean | Space | undefined; /** margin by x axis: margin-left & margin-right */ mx?: boolean | Space | undefined; /** margin by y axis: margin-top & margin-bottom */ my?: boolean | Space | undefined; /** Size of padding */ pSize?: USpace | undefined; /** Measure unit of padding */ pUnit?: SpaceUnit | undefined; /** padding */ p?: boolean | Padding | undefined; /** padding-top */ pt?: boolean | USpace | undefined; /** padding-right */ pr?: boolean | USpace | undefined; /** padding-bottom */ pb?: boolean | USpace | undefined; /** padding-left */ pl?: boolean | USpace | undefined; /** padding by x axis: padding-left & padding-right */ px?: boolean | USpace | undefined; /** padding by y axis: padding-top & padding-bottom */ py?: boolean | USpace | undefined; /** Size of gap */ gapSize?: USpace | undefined; /** Measure unit of gap */ gapUnit?: SpaceUnit | undefined; gap?: boolean | Gap | undefined; columnGap?: boolean | USpace | undefined; rowGap?: boolean | USpace | undefined; } export type Overflow = Globals | 'auto' | 'hidden' | 'scroll' | 'visible'; export interface OverflowProps { overflow?: Overflow | undefined; overflowX?: OverflowProps['overflow'] | undefined; overflowY?: OverflowProps['overflow'] | undefined; /** Shortcut for overflow */ scrollable?: Extract | boolean | undefined; scrollableX?: OverflowProps['scrollable'] | undefined; scrollableY?: OverflowProps['scrollable'] | undefined; } export type FlexOnlyProps = FlexProps & SpaceProps & OverflowProps; export interface Styleable { className?: C | undefined; style?: S | undefined; } export type ClassNameTransformer = (calcClassName: string, userClassName?: T) => NonNullable; export type StyleTransformer = (calcStyle?: React.CSSProperties, userStyle?: T) => R; interface StylesOptions { inferStyleProps?: boolean | { className?: boolean | undefined; style?: boolean | undefined; } | undefined; } export type StylesProps

['className']>, InferStyle extends boolean = O['inferStyleProps'] extends boolean ? O['inferStyleProps'] : NonNullable['style']>> = P extends Styleable ? Styleable : Styleable; type PropsWithStyles

= StylesProps & Omit; export type GetStylesTransformers, OriginProps extends AnyObject = StyledProps, Strict extends boolean = false> = Strict extends true ? ([StyledProps['className'], OriginProps['className']] extends [ string | undefined, string | undefined ] ? {} : { classNameTransformer?: ClassNameTransformer | undefined; }) & ([StyledProps['style'], OriginProps['style']] extends [ React.CSSProperties | undefined, React.CSSProperties | undefined ] ? {} : { styleTransformer?: StyleTransformer | undefined; }) : { classNameTransformer?: ClassNameTransformer | undefined; styleTransformer?: StyleTransformer | undefined; }; type PropsWithStylesTransformers

= PropsWithStyles> = Styled & GetStylesTransformers; interface PropsOptions extends StylesOptions { omitProps?: boolean | undefined; } /** All props or `ref`, `style`, `className`. */ type FilterComponentProps

= O['omitProps'] extends true ? Pick> : P; export type FlexComponentProps = FlexOnlyProps & PropsWithStyles, O>, O>; export type FlexAllProps = FlexOnlyProps & PropsWithStylesTransformers, O> & { /** * Sets custom react component as a container. * Component must accept className and style through props. */ component?: C | undefined; }; export type DefaultComponentType = 'div'; export {};