@groupeactual/ui-kit 1.6.0-beta.8 → 1.6.0-beta.9
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +1 -1
- package/dist/es/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/Chip/Chip.tsx +12 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"notistack": "^3.0.1",
|
|
53
53
|
"react": "^18.3.1",
|
|
54
54
|
"react-dom": "^18.3.1",
|
|
55
|
-
"@groupeactual/design-tokens": "1.6.0-beta.
|
|
55
|
+
"@groupeactual/design-tokens": "1.6.0-beta.9"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"react": "^18.3.1",
|
|
@@ -49,22 +49,19 @@ const Chip = ({
|
|
|
49
49
|
|
|
50
50
|
const ref = useRef<HTMLDivElement>(null);
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
} else if (props.color || variant === 'status') {
|
|
60
|
-
return 'white';
|
|
61
|
-
} else if (variant === 'filled' || variant === 'statusFilled') {
|
|
62
|
-
// opacity 0.08
|
|
63
|
-
return `${backgroundColor}14`;
|
|
64
|
-
}
|
|
52
|
+
let backgroundColor: string =
|
|
53
|
+
props.color && theme.palette[props.color]
|
|
54
|
+
? typeof theme.palette[props.color] === 'object'
|
|
55
|
+
? theme.palette[props.color]['main']
|
|
56
|
+
: theme.palette[props.color]
|
|
57
|
+
: (props.color ?? 'white');
|
|
65
58
|
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
if (variant === 'filled' || variant === 'statusFilled') {
|
|
60
|
+
// opacity 0.08
|
|
61
|
+
backgroundColor = `${backgroundColor}14`;
|
|
62
|
+
} else if (variant === 'status') {
|
|
63
|
+
backgroundColor = 'white';
|
|
64
|
+
}
|
|
68
65
|
|
|
69
66
|
return (
|
|
70
67
|
<Tooltip title={tooltip} placement="right-start" open={isTooltipOpen}>
|