aefis-core-ui 2.1.19 → 2.1.20

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.
@@ -4797,7 +4797,8 @@ const ListItem = props => {
4797
4797
  style: listItemStyle,
4798
4798
  disabled: props.disabled,
4799
4799
  dense: props.dense,
4800
- selected: props.selected
4800
+ selected: props.selected,
4801
+ component: "li"
4801
4802
  };
4802
4803
  if (props.display === "horizontal") {
4803
4804
  listItemArgs["sx"] = {
@@ -13558,7 +13559,7 @@ const color = percent => {
13558
13559
  return percent ? dynamicSuccess[percent] : inProgress["default"];
13559
13560
  };
13560
13561
  const Chart = props => {
13561
- let bgColor = props.dynamicColor ? color(props.percentValue) : props.showComplete && props.percentValue === 100 ? goalMet["default"] : color();
13562
+ const bgColor = props.customSeriesColor || (props.dynamicColor ? color(props.percentValue) : props.showComplete && props.percentValue === 100 ? goalMet["default"] : color());
13562
13563
  const XSmallSlider = withStyles$1({
13563
13564
  root: {
13564
13565
  borderRadius: 10,
@@ -13639,7 +13640,8 @@ Chart.propTypes = {
13639
13640
  percentValue: PropTypes.number,
13640
13641
  showComplete: PropTypes.any,
13641
13642
  size: PropTypes.string,
13642
- label: PropTypes.string
13643
+ label: PropTypes.string,
13644
+ customSeriesColor: PropTypes.string
13643
13645
  };
13644
13646
  const SliderChart = props => {
13645
13647
  const classes = useStyles$a();
@@ -13669,7 +13671,7 @@ const SliderChart = props => {
13669
13671
  }), props.title && props.title !== "" && props.showTitle && /*#__PURE__*/jsx(Typography, {
13670
13672
  variant: "h3",
13671
13673
  sx: titleStyle,
13672
- component: "span",
13674
+ component: props.titleComponent,
13673
13675
  children: props.title
13674
13676
  }), /*#__PURE__*/jsxs(Box$1, {
13675
13677
  className: classes.chartContainer,
@@ -13690,17 +13692,22 @@ const SliderChart = props => {
13690
13692
  })]
13691
13693
  });
13692
13694
  };
13695
+ SliderChart.defaultProps = {
13696
+ titleComponent: "div"
13697
+ };
13693
13698
  SliderChart.propTypes = {
13694
13699
  dynamicColor: PropTypes.bool,
13695
13700
  height: PropTypes.any,
13696
13701
  percentValue: PropTypes.any,
13697
13702
  size: PropTypes.string,
13698
13703
  title: PropTypes.string,
13704
+ titleComponent: PropTypes.any,
13699
13705
  subtitle: PropTypes.string,
13700
13706
  width: PropTypes.any,
13701
13707
  color: PropTypes.any,
13702
13708
  description: PropTypes.string,
13703
- showTitle: PropTypes.bool
13709
+ showTitle: PropTypes.bool,
13710
+ customSeriesColor: PropTypes.string
13704
13711
  };
13705
13712
 
13706
13713
  const getPercent = (total, value, roundPercent) => {
@@ -13738,6 +13745,8 @@ ProgressChart.propTypes = {
13738
13745
  description: PropTypes.string,
13739
13746
  /** The title of the progress chart. */
13740
13747
  title: PropTypes.string,
13748
+ /** The component to use to render the title. Only available in slider charts. */
13749
+ titleComponent: PropTypes.string,
13741
13750
  /** The subtitle of the progress chart. */
13742
13751
  subtitle: PropTypes.string,
13743
13752
  /** For "circle" progress chart, the main display value. Default is the percentage. */
@@ -13755,7 +13764,9 @@ ProgressChart.propTypes = {
13755
13764
  /** Automatically round the percentage value. */
13756
13765
  roundPercent: PropTypes.bool,
13757
13766
  /** Even if title given, do not display it. */
13758
- showTitle: PropTypes.bool
13767
+ showTitle: PropTypes.bool,
13768
+ /** If provided, will override the color the the series of the chart. Only active for slider charts. */
13769
+ customSeriesColor: PropTypes.string
13759
13770
  };
13760
13771
 
13761
13772
  const sortObjectBy = (field, reverse, primer) => {