@onfido/castor
Advanced tools
Comparing version 1.0.0-rc.2 to 1.0.0-rc.3
export * from './button/button'; | ||
export * from './description/description'; | ||
export * from './icon/icon'; | ||
export * from './input/input'; | ||
export * from './radio/radio'; | ||
export * from './textarea/textarea'; | ||
//# sourceMappingURL=index.js.map |
/** | ||
* Returns the `px` size of a multiplier of the base space. | ||
* | ||
* Only integers and (2.5, 1.5, 0.5, 0.25, 0.125) are supported. | ||
* | ||
* @param multiplier How much to multiply the base. | ||
@@ -13,10 +11,5 @@ * | ||
export function space(multiplier) { | ||
if (!isAllowed(multiplier)) | ||
throw new Error(`"multiplier" must be an integer or (${allowedFloats})`); | ||
return `${multiplier * base}px`; | ||
} | ||
const allowedFloats = new Set([2.5, 1.5, 0.5, 0.25, 0.125]); | ||
allowedFloats.toString = () => [...allowedFloats].join(', '); | ||
const base = 8; | ||
const isAllowed = (multiplier) => Number.isInteger(multiplier) || allowedFloats.has(multiplier); | ||
//# sourceMappingURL=space.js.map |
{ | ||
"name": "@onfido/castor", | ||
"version": "1.0.0-rc.2", | ||
"version": "1.0.0-rc.3", | ||
"description": "Onfido's design system.", | ||
@@ -5,0 +5,0 @@ "author": "Onfido", |
export * from './button/button'; | ||
export * from './description/description'; | ||
export * from './icon/icon'; | ||
export * from './input/input'; | ||
export * from './radio/radio'; | ||
export * from './textarea/textarea'; |
/** | ||
* Returns the `px` size of a multiplier of the base space. | ||
* | ||
* Only integers and (2.5, 1.5, 0.5, 0.25, 0.125) are supported. | ||
* | ||
* @param multiplier How much to multiply the base. | ||
@@ -13,14 +11,5 @@ * | ||
export function space(multiplier: number): string { | ||
if (!isAllowed(multiplier)) | ||
throw new Error(`"multiplier" must be an integer or (${allowedFloats})`); | ||
return `${multiplier * base}px`; | ||
} | ||
const allowedFloats = new Set([2.5, 1.5, 0.5, 0.25, 0.125]); | ||
allowedFloats.toString = () => [...allowedFloats].join(', '); | ||
const base = 8; | ||
const isAllowed = (multiplier: number) => | ||
Number.isInteger(multiplier) || allowedFloats.has(multiplier); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
122132
100
1292
0