lucid-ui
Version:
A UI component library from AppNexus.
73 lines • 2.88 kB
TypeScript
import React from 'react';
export interface StandardProps {
/** Appended to the component-specific class names set on the root element.
Value is run through the `classnames` library. */
className?: string;
/** Any valid React children. */
children?: React.ReactNode;
/** Styles that are passed through to native control. */
style?: React.CSSProperties;
callbackId?: string | number;
}
export declare type Overwrite<T, U> = Omit<T, keyof T & keyof U> & U;
export interface FC<P> extends React.FC<P> {
peek: {
description: string;
notes?: {
overview: string;
intendedUse: string;
technicalRecommendations: string;
};
categories?: string[];
extend?: string;
madeFrom?: string[];
};
propName?: string | string[];
_isPrivate?: boolean;
}
declare type TypesType<P> = ICreateClassComponentClass<P> | Array<ICreateClassComponentClass<P>> | FC<P> | Array<FC<P>> | {
propName?: string | string[];
} | any;
interface ICreateClassComponentSpec<P, S> extends React.Mixin<P, S> {
_isPrivate?: boolean;
initialState?: S;
propName?: string | string[];
propTypes?: Required<{
[key in keyof P]: any;
}>;
components?: {
[key: string]: ICreateClassComponentClass<{}>;
};
statics?: {
definition?: ICreateClassComponentSpec<P, S>;
[key: string]: any;
};
reducers?: {
[K in keyof P]?: (arg0: S, ...args: any[]) => S;
};
selectors?: {
[K in keyof P]?: (arg0: S) => any;
};
render?(this: {
props: P;
} & {
[k: string]: any;
}): React.ReactNode;
[key: string]: any;
}
export interface ICreateClassComponentClass<P> extends React.ClassicComponentClass<P> {
propName?: string | string[];
}
export declare function createClass<P, S = {}>(spec: ICreateClassComponentSpec<P, S>): ICreateClassComponentClass<P>;
export declare function filterTypes<P>(children: React.ReactNode, types?: TypesType<P>): React.ReactElement[];
export declare function findTypes<P extends {
children?: React.ReactNode;
}>(props: P, types?: TypesType<P>): React.ReactNode[];
export declare function rejectTypes<P>(children: React.ReactNode, types: TypesType<P> | Array<TypesType<P>>): React.ReactNode[];
export declare function createElements<P>(type: ICreateClassComponentClass<P>, values?: Array<React.ReactElement<P> | P>): React.ReactElement[];
export declare function getFirst<P>(props: P, types: TypesType<P> | undefined, defaultValue?: React.ReactNode): React.ReactNode | null | undefined;
export declare function omitProps<P extends object>(props: Partial<P>, component: ICreateClassComponentClass<P> | undefined, keys?: string[], targetIsDOMElement?: boolean): {
[key: string]: any;
};
export {};
//# sourceMappingURL=component-types.d.ts.map