@open-tender/utils 0.1.99 → 0.1.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/.DS_Store
CHANGED
|
Binary file
|
|
@@ -20,7 +20,7 @@ export declare const objRemsToPixels: <T extends Partial<ThemeLayout & {
|
|
|
20
20
|
xxBig: string;
|
|
21
21
|
xxSmall: string;
|
|
22
22
|
}>>(object: T, responsive?: boolean) => Partial<T>;
|
|
23
|
-
export declare const pixelsToInt: (pixels: string) =>
|
|
24
|
-
export declare const pixelsToFloat: (pixels: string) =>
|
|
23
|
+
export declare const pixelsToInt: (pixels: string) => number;
|
|
24
|
+
export declare const pixelsToFloat: (pixels: string) => number;
|
|
25
25
|
export declare const decorateTheme: (theme: Theme) => AppTheme;
|
|
26
26
|
export declare const hexToRgbA: (hex: string, opacity: number) => string | null;
|
package/dist/cjs/utils/theme.js
CHANGED
|
@@ -31,7 +31,7 @@ const pixelsToInt = (pixels) => {
|
|
|
31
31
|
return parseInt(pixels.replace('px', ''));
|
|
32
32
|
}
|
|
33
33
|
catch (err) {
|
|
34
|
-
return
|
|
34
|
+
return 0;
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
exports.pixelsToInt = pixelsToInt;
|
|
@@ -40,7 +40,7 @@ const pixelsToFloat = (pixels) => {
|
|
|
40
40
|
return parseFloat(pixels.replace('px', ''));
|
|
41
41
|
}
|
|
42
42
|
catch (err) {
|
|
43
|
-
return
|
|
43
|
+
return 0.0;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
exports.pixelsToFloat = pixelsToFloat;
|
|
@@ -20,7 +20,7 @@ export declare const objRemsToPixels: <T extends Partial<ThemeLayout & {
|
|
|
20
20
|
xxBig: string;
|
|
21
21
|
xxSmall: string;
|
|
22
22
|
}>>(object: T, responsive?: boolean) => Partial<T>;
|
|
23
|
-
export declare const pixelsToInt: (pixels: string) =>
|
|
24
|
-
export declare const pixelsToFloat: (pixels: string) =>
|
|
23
|
+
export declare const pixelsToInt: (pixels: string) => number;
|
|
24
|
+
export declare const pixelsToFloat: (pixels: string) => number;
|
|
25
25
|
export declare const decorateTheme: (theme: Theme) => AppTheme;
|
|
26
26
|
export declare const hexToRgbA: (hex: string, opacity: number) => string | null;
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -24,7 +24,7 @@ export const pixelsToInt = (pixels) => {
|
|
|
24
24
|
return parseInt(pixels.replace('px', ''));
|
|
25
25
|
}
|
|
26
26
|
catch (err) {
|
|
27
|
-
return
|
|
27
|
+
return 0;
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
export const pixelsToFloat = (pixels) => {
|
|
@@ -32,7 +32,7 @@ export const pixelsToFloat = (pixels) => {
|
|
|
32
32
|
return parseFloat(pixels.replace('px', ''));
|
|
33
33
|
}
|
|
34
34
|
catch (err) {
|
|
35
|
-
return
|
|
35
|
+
return 0.0;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
const paddingToPixels = (padding) => {
|
package/package.json
CHANGED