@mtes-mct/monitor-ui 3.0.1 → 3.1.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.0.1](https://github.com/MTES-MCT/monitor-ui/compare/v3.0.0...v3.0.1) (2023-02-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **formiks:** remove useMemo on fieldValue ([3ec8602](https://github.com/MTES-MCT/monitor-ui/commit/3ec86027dbcaf0f0faa4e92ad05d86a134e6c575))
7
+
1
8
  # [3.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v2.19.2...v3.0.0) (2023-02-21)
2
9
 
3
10
 
package/index.js CHANGED
@@ -2803,18 +2803,19 @@ const Disk = styled.span `
2803
2803
  border-radius: 50%;
2804
2804
  `;
2805
2805
 
2806
- function Tag({ accent, bullet, children, color, Icon, isLight = false, ...nativeProps }) {
2806
+ function Tag({ accent, bullet, bulletColor, children, color, Icon, isLight = false, ...nativeProps }) {
2807
2807
  const commonChildren = useMemo(() => {
2808
2808
  const defaultColor = color || THEME.color.gunMetal;
2809
- const bulletColor = accent
2810
- ? {
2811
- [Accent.PRIMARY]: THEME.color.gunMetal,
2812
- [Accent.SECONDARY]: THEME.color.gunMetal,
2813
- [Accent.TERTIARY]: THEME.color.white
2814
- }[accent]
2815
- : defaultColor;
2816
- return (jsxs(Fragment, { children: [Icon && jsx(Icon, { size: 1 }), bullet === TagBullet.DISK && jsx(Disk, { "$color": bulletColor }), children] }));
2817
- }, [accent, bullet, color, children, Icon]);
2809
+ const controlledBulletColor = bulletColor ||
2810
+ (accent
2811
+ ? {
2812
+ [Accent.PRIMARY]: THEME.color.gunMetal,
2813
+ [Accent.SECONDARY]: THEME.color.gunMetal,
2814
+ [Accent.TERTIARY]: THEME.color.white
2815
+ }[accent]
2816
+ : defaultColor);
2817
+ return (jsxs(Fragment, { children: [Icon && jsx(Icon, { size: 1 }), bullet === TagBullet.DISK && jsx(Disk, { "$color": controlledBulletColor }), children] }));
2818
+ }, [accent, bullet, bulletColor, color, children, Icon]);
2818
2819
  const commonProps = useMemo(() => ({
2819
2820
  $isLight: isLight,
2820
2821
  children: commonChildren,