@connectif/ui-components 9.1.0 → 9.1.1

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,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [9.1.1] - 2026-07-14
4
+
5
+ ### Added
6
+
7
+ - `dateCalendar`: fake date for today in date calendar story.
8
+ - `BarChart` added coverage for bar color assignment with fallback to the series color.
9
+
10
+ ### Changed
11
+
12
+ - `Autocomplete`: Now click away when dropdown menu is open does not close dialogs.
13
+ - `BarChart`: added optional `barBorderRadius` prop and support for per-item `color` / `comparisonColor` overrides in series data.
14
+
3
15
  ## [9.1.0] - 2026-07-09
4
16
 
5
17
  ### Added
@@ -27,6 +27,10 @@ export type BarChartProps = {
27
27
  * Grid lines color
28
28
  */
29
29
  gridLineColor?: string;
30
+ /**
31
+ * Border radius applied to bars.
32
+ */
33
+ barBorderRadius?: number;
30
34
  /**
31
35
  * Optional callback to be called when the chart is clicked.
32
36
  */
@@ -76,6 +80,10 @@ export type BarChartProps = {
76
80
  * The value to display in the chart for this serie item.
77
81
  */
78
82
  value: number;
83
+ /**
84
+ * The color to use for this specific bar.
85
+ */
86
+ color?: string;
79
87
  /**
80
88
  * The text shown in label to represent the increment value of this item.
81
89
  */
@@ -92,6 +100,10 @@ export type BarChartProps = {
92
100
  * The comparison value to display in the chart for this serie item.
93
101
  */
94
102
  comparisonValue?: number;
103
+ /**
104
+ * The comparison color to use for this specific bar.
105
+ */
106
+ comparisonColor?: string;
95
107
  /**
96
108
  * The text to use for this item as value in tooltip.
97
109
  */
@@ -102,5 +114,5 @@ export type BarChartProps = {
102
114
  /**
103
115
  * A bar chart component to display numeric data grouped by categories and series.
104
116
  */
105
- declare const BarChart: ({ style, isLoading, series, categories, labelColor, gridLineColor, gridLabelSize, chartRef, yAxisLabelFormatter, tooltipEntryFormatter, onClick }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
117
+ declare const BarChart: ({ style, isLoading, series, categories, labelColor, gridLineColor, barBorderRadius, gridLabelSize, chartRef, yAxisLabelFormatter, tooltipEntryFormatter, onClick }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
106
118
  export default BarChart;
package/dist/index.js CHANGED
@@ -12811,6 +12811,7 @@ var BarChart2 = ({
12811
12811
  categories = [],
12812
12812
  labelColor = grey400,
12813
12813
  gridLineColor = grey200,
12814
+ barBorderRadius = 4,
12814
12815
  gridLabelSize = "sm",
12815
12816
  chartRef,
12816
12817
  yAxisLabelFormatter = (value) => `${value}`,
@@ -12829,10 +12830,10 @@ var BarChart2 = ({
12829
12830
  barGap: 0,
12830
12831
  backgroundStyle: {
12831
12832
  color: alpha2(grey200, 0.32),
12832
- borderRadius: [4, 4, 0, 0]
12833
+ borderRadius: [barBorderRadius, barBorderRadius, 0, 0]
12833
12834
  },
12834
12835
  itemStyle: {
12835
- borderRadius: [4, 4, 0, 0]
12836
+ borderRadius: [barBorderRadius, barBorderRadius, 0, 0]
12836
12837
  },
12837
12838
  label: {
12838
12839
  formatter(params) {
@@ -12865,7 +12866,7 @@ var BarChart2 = ({
12865
12866
  value: value !== 0 ? value : null,
12866
12867
  itemStyle: {
12867
12868
  color: color2,
12868
- borderRadius: value > 0 ? [4, 4, 0, 0] : [0, 0, 4, 4]
12869
+ borderRadius: value > 0 ? [barBorderRadius, barBorderRadius, 0, 0] : [0, 0, barBorderRadius, barBorderRadius]
12869
12870
  },
12870
12871
  label: {
12871
12872
  show: !!(incrementLabelValue && incrementLabelType),
@@ -12919,7 +12920,7 @@ var BarChart2 = ({
12919
12920
  value: (comparisonValue || 0) !== 0 ? comparisonValue : null,
12920
12921
  itemStyle: {
12921
12922
  color: comparisonColor,
12922
- borderRadius: (comparisonValue || 0) > 0 ? [4, 4, 0, 0] : [0, 0, 4, 4]
12923
+ borderRadius: (comparisonValue || 0) > 0 ? [barBorderRadius, barBorderRadius, 0, 0] : [0, 0, barBorderRadius, barBorderRadius]
12923
12924
  },
12924
12925
  label: {
12925
12926
  show: false
@@ -12995,12 +12996,14 @@ var BarChart2 = ({
12995
12996
  ({
12996
12997
  tooltipValue,
12997
12998
  value,
12999
+ color: itemColor,
12998
13000
  comparisonTooltipValue,
12999
13001
  comparisonValue,
13002
+ comparisonColor: itemComparisonColor,
13000
13003
  incrementLabelType,
13001
13004
  incrementLabelValue
13002
13005
  }) => comparisonValue < value ? getOptionsForMainBar({
13003
- color: color2,
13006
+ color: itemColor ?? color2,
13004
13007
  tooltipName,
13005
13008
  tooltipValue,
13006
13009
  value,
@@ -13008,7 +13011,7 @@ var BarChart2 = ({
13008
13011
  incrementLabelValue,
13009
13012
  tooltipOrder: serieIndex
13010
13013
  }) : getOptionsForComparisonBar({
13011
- comparisonColor,
13014
+ comparisonColor: itemComparisonColor ?? comparisonColor,
13012
13015
  comparisonTooltipName,
13013
13016
  comparisonTooltipValue,
13014
13017
  comparisonValue,
@@ -13027,18 +13030,20 @@ var BarChart2 = ({
13027
13030
  ({
13028
13031
  tooltipValue,
13029
13032
  value,
13033
+ color: itemColor,
13030
13034
  comparisonTooltipValue,
13031
13035
  comparisonValue,
13036
+ comparisonColor: itemComparisonColor,
13032
13037
  incrementLabelType,
13033
13038
  incrementLabelValue
13034
13039
  }) => isComparison && comparisonValue < value ? getOptionsForComparisonBar({
13035
- comparisonColor,
13040
+ comparisonColor: itemComparisonColor ?? comparisonColor,
13036
13041
  comparisonTooltipName,
13037
13042
  comparisonTooltipValue,
13038
13043
  comparisonValue,
13039
13044
  tooltipOrder: serieIndex
13040
13045
  }) : getOptionsForMainBar({
13041
- color: color2,
13046
+ color: itemColor ?? color2,
13042
13047
  tooltipName,
13043
13048
  tooltipValue,
13044
13049
  value,
@@ -25082,6 +25087,19 @@ var Autocomplete = function Autocomplete2({
25082
25087
  anchorRef.current,
25083
25088
  event.target
25084
25089
  )) {
25090
+ document.addEventListener(
25091
+ "click",
25092
+ (e) => {
25093
+ const target = e.target;
25094
+ if (target.closest(".MuiDialog-container") === target) {
25095
+ e.stopPropagation();
25096
+ }
25097
+ },
25098
+ {
25099
+ capture: true,
25100
+ once: true
25101
+ }
25102
+ );
25085
25103
  closePopover();
25086
25104
  if (inputValue) {
25087
25105
  onSearch && onSearch("");