sevago-sso-fe 1.0.92 → 1.0.93
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.
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
export type TagType = 'success' | 'warning' | 'info' | 'secondary' | 'primary' | 'error';
|
|
4
4
|
export type TagSize = 'large' | 'medium' | 'small';
|
|
5
5
|
export type TagVariant = 'contained' | 'outlined' | 'outlined-border';
|
|
6
|
-
export declare const lightenColor: (hex
|
|
6
|
+
export declare const lightenColor: (hex?: string, percent?: number) => string;
|
|
7
7
|
export interface TagElementProps {
|
|
8
8
|
type: string;
|
|
9
9
|
content: string;
|
package/dist/index.cjs.js
CHANGED
|
@@ -7104,9 +7104,12 @@ const LinkWrapProductRow = material.styled(LinkElement)(({ theme }) => ({
|
|
|
7104
7104
|
gap: PADDING_GAP_ITEM,
|
|
7105
7105
|
backgroundColor: theme.palette.background.default
|
|
7106
7106
|
}));
|
|
7107
|
-
const lightenColor = (hex, percent) => {
|
|
7107
|
+
const lightenColor = (hex, percent = 0) => {
|
|
7108
|
+
if (!hex || !/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(hex)) {
|
|
7109
|
+
return COLOR_CONSTANT.white;
|
|
7110
|
+
}
|
|
7108
7111
|
let r, g, b;
|
|
7109
|
-
if (hex
|
|
7112
|
+
if (hex.length === 7) {
|
|
7110
7113
|
r = parseInt(hex.slice(1, 3), 16);
|
|
7111
7114
|
g = parseInt(hex.slice(3, 5), 16);
|
|
7112
7115
|
b = parseInt(hex.slice(5, 7), 16);
|