import { CSSRules, Directive, Token } from 'twind'; export * from 'twind/css'; /** * [[include:src/style/README.md]] * * @packageDocumentation * @module twind/style */ declare type StrictMorphVariant = T extends number ? `${T}` | T : T extends 'true' ? true | T : T extends 'false' ? false | T : T; declare type MorphVariant = T extends number ? `${T}` | T : T extends 'true' ? boolean | T : T extends 'false' ? boolean | T : T extends `${number}` ? number | T : T; declare type StyleToken = string | CSSRules | Directive; declare type VariantsOf = T extends Style ? { [key in keyof Variants]: MorphVariant; } : never; declare type DefaultVariants = { [key in keyof Variants]?: StrictMorphVariant | (Record> & { initial?: StrictMorphVariant; }); }; declare type VariantsProps = { [key in keyof Variants]?: MorphVariant | (Record> & { initial?: MorphVariant; }); }; declare type VariantMatchers = { [key in keyof Variants]?: StrictMorphVariant; }; interface StyleConfig { base?: StyleToken; variants?: Variants & { [variant in keyof BaseVariants]?: { [key in keyof BaseVariants[variant]]?: StyleToken; }; }; defaults?: DefaultVariants; matches?: (VariantMatchers & { use: StyleToken; })[]; } interface StyleFunction { (config?: StyleConfig): Style & string; (base: Style, config?: StyleConfig): Style & string; } interface BaseStyleProps { tw?: Token; css?: CSSRules; class?: string; className?: string; } declare type StyleProps = VariantsProps & BaseStyleProps; interface Style { /** * CSS Class associated with the current component. * * ```jsx * const button = style({ * base: { * color: "DarkSlateGray" * } * }) * *
* ``` *
*/ (props?: StyleProps): Directive; /** * CSS Selector associated with the current component. * * ```js * const button = style({ * base: { * color: "DarkSlateGray" * } * }) * * const article = style({ * base: { * [button]: { boxShadow: "0 0 0 5px" } * } * }) * ``` */ toString(): string; /** * CSS Class associated with the current component. * * ```js * const button = style({ * base: { * color: "DarkSlateGray" * } * }) * *
* ``` */ readonly className: string; /** * CSS Selector associated with the current component. * * ```js * const button = style({ * base: { * color: "DarkSlateGray" * } * }) * * const Card = styled({ * base: { * [Button.selector]: { boxShadow: "0 0 0 5px" } * } * }) * ``` */ readonly selector: string; } declare const style: StyleFunction; export { BaseStyleProps, DefaultVariants, MorphVariant, StrictMorphVariant, Style, StyleConfig, StyleFunction, StyleProps, StyleToken, VariantMatchers, VariantsOf, VariantsProps, style }; //# sourceMappingURL=style.d.ts.map