import { ScopedColorBg, ScopedColorFg, ScopedColorPalette, ScopedColorStroke, Dimension, Radius, SpacingX, SpacingY, Gradient, Shadow, ScopedColorBanner } from '@seed-design/css/vars'; import { ResponsiveValue } from '../types/responsive'; import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react'; export declare function resolveResponsive(varName: string, value: ResponsiveValue, transform: (v: T) => string | number | undefined): Record; export declare function handleColor(color: string | undefined): any; export declare function handleDimension(dimension: string | 0 | undefined): string | undefined; export declare function handleRadius(radius: string | 0 | undefined): any; interface MarginStyleProps { /** * Margin on all four sides. * * Cannot be combined with any `bleed*` prop. */ margin?: ResponsiveValue; /** * Shorthand for `margin`. * * Cannot be combined with any `bleed*` prop. */ m?: ResponsiveValue; /** * Horizontal margin (left + right). * * Cannot be combined with any `bleed*` prop. */ marginX?: ResponsiveValue; /** * Shorthand for `marginX`. * * Cannot be combined with any `bleed*` prop. */ mx?: ResponsiveValue; /** * Vertical margin (top + bottom). * * Cannot be combined with any `bleed*` prop. */ marginY?: ResponsiveValue; /** * Shorthand for `marginY`. * * Cannot be combined with any `bleed*` prop. */ my?: ResponsiveValue; /** * Top margin. * * Cannot be combined with any `bleed*` prop. */ marginTop?: ResponsiveValue; /** * Shorthand for `marginTop`. * * Cannot be combined with any `bleed*` prop. */ mt?: ResponsiveValue; /** * Right margin. * * Cannot be combined with any `bleed*` prop. */ marginRight?: ResponsiveValue; /** * Shorthand for `marginRight`. * * Cannot be combined with any `bleed*` prop. */ mr?: ResponsiveValue; /** * Bottom margin. * * Cannot be combined with any `bleed*` prop. */ marginBottom?: ResponsiveValue; /** * Shorthand for `marginBottom`. * * Cannot be combined with any `bleed*` prop. */ mb?: ResponsiveValue; /** * Left margin. * * Cannot be combined with any `bleed*` prop. */ marginLeft?: ResponsiveValue; /** * Shorthand for `marginLeft`. * * Cannot be combined with any `bleed*` prop. */ ml?: ResponsiveValue; } interface BleedStyleProps { /** * Negative margin on all four sides to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleed?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative x-axis margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedX?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative y-axis margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedY?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative top margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedTop?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative right margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedRight?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative bottom margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedBottom?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; /** * Negative left margin to extend the element outside its parent. * If set to "asPadding", it will use the padding value in the same direction. * * Cannot be combined with any `margin*` prop. */ bleedLeft?: ResponsiveValue<"asPadding" | Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {})>; } /** Distributes `Omit` over each union branch, preserving the union structure. */ export type DistributiveOmit = T extends unknown ? Omit : never; /** * Margin and bleed props both resolve to CSS `margin-*` values, so they * are mutually exclusive at the type level — pick one family, not both. */ export type StyleProps = { /** * Shorthand for `background`. */ bg?: ScopedColorBg | ScopedColorPalette | ScopedColorBanner | (string & {}); background?: ScopedColorBg | ScopedColorPalette | ScopedColorBanner | (string & {}); /** * Shorthand for `backgroundGradient`. */ bgGradient?: Gradient; backgroundGradient?: Gradient; /** * Shorthand for `backgroundGradientDirection`. * e.g. `43deg` */ bgGradientDirection?: "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | (string & {}); /** * e.g. `43deg` */ backgroundGradientDirection?: "to right" | "to left" | "to top" | "to bottom" | "to top right" | "to top left" | "to bottom right" | "to bottom left" | (string & {}); color?: ScopedColorFg | ScopedColorPalette | (string & {}); borderColor?: ScopedColorStroke | ScopedColorPalette | (string & {}); borderWidth?: 0 | 1 | (string & {}); borderTopWidth?: 0 | 1 | (string & {}); borderRightWidth?: 0 | 1 | (string & {}); borderBottomWidth?: 0 | 1 | (string & {}); borderLeftWidth?: 0 | 1 | (string & {}); borderRadius?: Radius | 0 | (string & {}); borderTopLeftRadius?: Radius | 0 | (string & {}); borderTopRightRadius?: Radius | 0 | (string & {}); borderBottomRightRadius?: Radius | 0 | (string & {}); borderBottomLeftRadius?: Radius | 0 | (string & {}); boxShadow?: Shadow | (string & {}); width?: ResponsiveValue; minWidth?: ResponsiveValue; maxWidth?: ResponsiveValue; height?: ResponsiveValue; minHeight?: ResponsiveValue; maxHeight?: ResponsiveValue; top?: 0 | (string & {}); left?: 0 | (string & {}); right?: 0 | (string & {}); bottom?: 0 | (string & {}); padding?: ResponsiveValue; /** * Shorthand for `padding`. */ p?: ResponsiveValue; paddingX?: ResponsiveValue; /** * Shorthand for `paddingX`. */ px?: ResponsiveValue; paddingY?: ResponsiveValue; /** * Shorthand for `paddingY`. */ py?: ResponsiveValue; paddingTop?: ResponsiveValue; /** * Shorthand for `paddingTop`. */ pt?: ResponsiveValue; paddingRight?: ResponsiveValue; /** * Shorthand for `paddingRight`. */ pr?: ResponsiveValue; paddingBottom?: ResponsiveValue; /** * Shorthand for `paddingBottom`. */ pb?: ResponsiveValue; paddingLeft?: ResponsiveValue; /** * Shorthand for `paddingLeft`. */ pl?: ResponsiveValue; display?: ResponsiveValue<"block" | "flex" | "grid" | "inline-flex" | "inline" | "inline-block" | "none">; position?: "relative" | "absolute" | "fixed" | "sticky"; overflowX?: "visible" | "hidden" | "scroll" | "auto"; overflowY?: "visible" | "hidden" | "scroll" | "auto"; zIndex?: number | (string & {}); /** * If true, flex-grow will be set to `1`. */ flexGrow?: 0 | 1 | (number & {}) | true; /** * If true, flex-shrink will be set to `1`. */ flexShrink?: 0 | (number & {}) | true; flexDirection?: ResponsiveValue<"row" | "column" | "row-reverse" | "column-reverse">; /** * If true, flex-wrap will be set to `wrap`. */ flexWrap?: "wrap" | "wrap-reverse" | "nowrap" | true; justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around"; /** * In flexbox layout, this property is ignored. */ justifySelf?: "center" | "start" | "end" | "stretch"; alignItems?: "flex-start" | "flex-end" | "center" | "stretch"; alignContent?: "flex-start" | "flex-end" | "center" | "stretch"; alignSelf?: "flex-start" | "flex-end" | "center" | "stretch"; gap?: ResponsiveValue; gridColumn?: string; gridRow?: string; unstable_transform?: string; _active?: { bg?: ScopedColorBg | ScopedColorPalette | (string & {}); background?: ScopedColorBg | ScopedColorPalette | (string & {}); }; } & ((BleedStyleProps & { [K in keyof MarginStyleProps]?: never; }) | (MarginStyleProps & { [K in keyof BleedStyleProps]?: never; })); type UseStyleProps = StyleProps & { style?: React.CSSProperties; }; export declare function useStyleProps(props: T): { style: React.CSSProperties; restProps: Omit; }; export declare function withStyleProps

(Component: React.ComponentType

>): ForwardRefExoticComponent< PropsWithoutRef

& RefAttributes>; export {}; //# sourceMappingURL=styled.d.ts.map