import * as CSS from "csstype"; import { ManagedClasses } from "@microsoft/fast-components-class-name-contracts-base"; export { ManagedClasses }; /** * Define a static CSS Rule */ export declare type CSSStaticRule = CSS.Properties | string; /** * Type definition for a function that resolves to a CSS property value. It optionally expects a config object. * @param T - This describes the design system configuration values that will be available to all * property functions that resolve to a CSS value. */ export declare type CSSRuleResolver = (config?: T) => string; /** * Definition of a set of css properties for any given HTML class. * @param T - This describes the design system configuration values that will be available to all * property functions that resolve to a CSS value. */ export interface CSSRules { [rule: string]: CSSRules | CSSRuleResolver | CSSStaticRule; } /** * A stylesheet supplied to a JSS manager * @param T - This is the stylesheet contract, which is an enumeration of all keys available on * the JSS style object. * @param C - This describes the design system configuration values that will be available to all * property functions that resolve to a CSS value. */ export declare type ComponentStyles = ComponentStyleSheet | ComponentStyleSheetResolver; /** * A function that resolves to a static JSS stylesheet * @param T - This is the stylesheet contract, which is an enumeration of all keys available on * the JSS style object. * @param C - This describes the design system configuration values that will be available to all * property functions that resolve to a CSS value. */ export declare type ComponentStyleSheetResolver = (config: C) => ComponentStyleSheet; /** * Allow any string to be used in addition to class names * intended to support the use of Nested at-rules: * https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule * * Note: If TypeScript updated to use RegExp this can be improved * to more strictly check for Nested at-rules: * https://github.com/Microsoft/TypeScript/issues/6579 */ export interface NestedAtRules { [key: string]: CSSRules; } /** * Describes a JSS style object. * @param T - This is the stylesheet contract, which is an enumeration of all keys available on * the JSS style object. * @param C - This describes the design system configuration values that will be available to all * property functions that resolve to a CSS value. */ export declare type ComponentClassNameStyleSheet = { [P in keyof T]: CSSRules; }; export declare type ComponentStyleSheet = ComponentClassNameStyleSheet & NestedAtRules; export declare type DesignSystemMergingFunction = (original: T, overrides: T) => T; /** * Merges design-system values. Only plain Object values will be merged recursively, * all other values will be merged by assignment. * * This function returns a new object */ export declare function mergeDesignSystem(original: T, overrides: T): T;