@ngbracket/ngx-layout
Version:
ngbracket/ngx-layout =======
55 lines (51 loc) • 1.85 kB
TypeScript
/**
* Applies CSS prefixes to appropriate style keys.
*
* Note: `-ms-`, `-moz` and `-webkit-box` are no longer supported. e.g.
* {
* display: -webkit-flex; NEW - Safari 6.1+. iOS 7.1+, BB10
* display: flex; NEW, Spec - Firefox, Chrome, Opera
* // display: -webkit-box; OLD - iOS 6-, Safari 3.1-6, BB7
* // display: -ms-flexbox; TWEENER - IE 10
* // display: -moz-flexbox; OLD - Firefox
* }
*/
declare function applyCssPrefixes(target: {
[key: string]: any | null;
}): {
[key: string]: any;
};
declare const INLINE = "inline";
declare const LAYOUT_VALUES: string[];
/**
* Validate the direction|'direction wrap' value and then update the host's inline flexbox styles
*/
declare function buildLayoutCSS(value: string): {
display: string;
'box-sizing': string;
'flex-direction': string;
'flex-wrap': string | null;
};
/**
* Validate the value to be one of the acceptable value options
* Use default fallback of 'row'
*/
declare function validateValue(value: string): [string, string, boolean];
/**
* Determine if the validated, flex-direction value specifies
* a horizontal/row flow.
*/
declare function isFlowHorizontal(value: string): boolean;
/**
* Convert layout-wrap='<value>' to expected flex-wrap style
*/
declare function validateWrapValue(value: string): string;
/**
* Extends an object with the *enumerable* and *own* properties of one or more source objects,
* similar to Object.assign.
*
* @param dest The object which will have properties copied to it.
* @param sources The source objects from which properties will be copied.
*/
declare function extendObject(dest: any, ...sources: any[]): any;
export { INLINE, LAYOUT_VALUES, applyCssPrefixes, buildLayoutCSS, extendObject, isFlowHorizontal, validateValue, validateWrapValue };