@arche-mc2/arche-controls
Version:
We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get
32 lines (31 loc) • 1.96 kB
TypeScript
import { ReactNode, ComponentType } from 'react';
import remStringFromPx from './remStringFromPx';
import shallowEqual from './shallowEqual';
export default remStringFromPx;
export declare function generateId(): string;
export declare function isString(object: any): boolean;
export declare function isEmpty(value: any): boolean;
export declare function isEmptyId(id: any): boolean;
export declare const isEmptyChildren: (children: ReactNode) => boolean;
export declare const isFunction: <T extends Function>(value: any) => value is T;
export declare const getComponentName: (component: ComponentType<any>) => any;
export declare const getHocComponentName: (hocName: string, component: ComponentType<any>) => string;
export declare const withDefaultProps: <P extends object, DP extends Partial<P> = Partial<P>>(defaultProps: DP, Cmp: ComponentType<P>) => ComponentType<Partial<DP> & Required<Pick<P, Exclude<keyof P, keyof DP>>>>;
declare type Arg = object;
declare type Args = Arg[];
declare type CallFunction = (args: Args) => void;
export declare const callAll: <T extends CallFunction, A extends Args>(...fns: T[]) => (...args: A) => void;
export declare const isBase64: (fileAsBase64: string) => boolean;
export declare const getMimeTypeFromBase64: (fileAsBase64: string) => string;
export declare const openFileAsBase64: (fileAsBase64: string, name?: string) => void;
export declare const openFileAsBlob: (file: any, mimeType: string, name?: string) => void;
export declare const base64toBlob: (base64Data: string, contentType?: string) => Blob;
export declare const on: (el: any, evt: any, fn: any, bubble: any) => void;
export declare const off: (el: any, evt: any, fn: any) => void;
export declare const ruleIsValid: (value: string, givenRegex: RegExp) => boolean;
interface Rule {
text: string;
regex: RegExp;
}
export declare const rulesMatch: (value: string, rules: Rule[]) => boolean;
export { shallowEqual };