sag_components 2.0.0-beta76 → 2.0.0-beta78

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/index.esm.js CHANGED
@@ -23884,7 +23884,6 @@ const Label$2 = styled.label`
23884
23884
  font-size: 14px;
23885
23885
  font-weight: 500;
23886
23886
  color: ${props => props.disabled ? '#D0D0D0' : '212121'};
23887
- font-family: "Poppins";
23888
23887
  white-space: nowrap;
23889
23888
  `;
23890
23889
  const InputContainer$1 = styled.div`
@@ -23896,7 +23895,6 @@ const InputContainer$1 = styled.div`
23896
23895
  overflow: hidden;
23897
23896
  padding: 6px 16px;
23898
23897
  margin-bottom: 8px;
23899
- width: 256px;
23900
23898
  height: 24px;
23901
23899
  border: 1px solid
23902
23900
  ${props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1'};
@@ -23956,7 +23954,6 @@ const OptionsSubContainer$1 = styled.ul`
23956
23954
  left: 0;
23957
23955
  z-index: 101;
23958
23956
  width: calc(100% - 23px);
23959
- font-family: "Poppins";
23960
23957
  border-radius: 4px;
23961
23958
  background-color: white;
23962
23959
  display: ${props => props.showoptions && props.filteredoptions?.length > 0 ? 'block' : 'none'};
@@ -23968,9 +23965,7 @@ const OptionItem$1 = styled.li`
23968
23965
  padding: 10px;
23969
23966
  cursor: pointer;
23970
23967
  color: #212121;
23971
- font-family: "Poppins";
23972
23968
  font-size: 14px;
23973
- font-style: normal;
23974
23969
  font-weight: 400;
23975
23970
  transition: background-color 0.3s;
23976
23971
  background-color: ${props => props.selected ? '#C7E4FF' : '#fff'};
@@ -23995,21 +23990,22 @@ const DeleteIcon = styled.div`
23995
23990
  position: absolute;
23996
23991
  `;
23997
23992
 
23998
- const QuickFilterDropdownSingle = ({
23999
- label,
24000
- hoverColor,
24001
- options,
24002
- selectedValue,
24003
- placeHolder,
24004
- onChange,
24005
- disabled,
24006
- width,
24007
- error,
24008
- errorMessage,
24009
- xIconShow,
24010
- labelColor,
24011
- showLabelOnTop
24012
- }) => {
23993
+ const QuickFilterDropdownSingle = _ref => {
23994
+ let {
23995
+ label,
23996
+ hoverColor,
23997
+ options,
23998
+ selectedValue,
23999
+ placeHolder,
24000
+ onChange,
24001
+ disabled,
24002
+ width,
24003
+ error,
24004
+ errorMessage,
24005
+ xIconShow,
24006
+ labelColor,
24007
+ showLabelOnTop
24008
+ } = _ref;
24013
24009
  const [isFocused, setIsFocused] = useState(false);
24014
24010
  const [showOptions, setShowOptions] = useState(false);
24015
24011
  const [inputValue, setInputValue] = useState("");
@@ -30348,6 +30344,13 @@ const BubbleChart = _ref => {
30348
30344
  const distance = Math.max(Math.abs(max - median), Math.abs(min - median));
30349
30345
  return [median - distance, median + distance];
30350
30346
  };
30347
+
30348
+ // const calculateDomainBasedOnMedian = (min, max, median) => {
30349
+ // // Always include all data points, and add a small padding
30350
+ // const padding = (max - min) * 0.1 || 1; // fallback to 1 if min==max
30351
+ // return [min - padding, max + padding];
30352
+ // };
30353
+
30351
30354
  const xDom = calculateDomainBasedOnMedian(minX, maxX, medianX);
30352
30355
  const yDom = calculateDomainBasedOnMedian(minY, maxY, medianY);
30353
30356
 
@@ -30789,10 +30792,10 @@ const BubbleChart = _ref => {
30789
30792
  onMouseMove: handleChartMouseMove,
30790
30793
  cursor: curosrMouse,
30791
30794
  margin: {
30792
- top: 100,
30795
+ top: 80,
30793
30796
  right: 190,
30794
- bottom: 50,
30795
- left: 180
30797
+ bottom: 80,
30798
+ left: 190
30796
30799
  },
30797
30800
  "data-testid": "scatter-chart"
30798
30801
  }, renderGradients(), /*#__PURE__*/React$1.createElement(XAxis, {
@@ -30848,7 +30851,7 @@ const BubbleChart = _ref => {
30848
30851
  label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
30849
30852
  value: topHeader,
30850
30853
  position: "top",
30851
- offset: 40,
30854
+ offset: 60,
30852
30855
  fill: '#484A4C',
30853
30856
  fontSize: 16,
30854
30857
  fontWeight: 500
@@ -30874,7 +30877,7 @@ const BubbleChart = _ref => {
30874
30877
  label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
30875
30878
  value: bottomHeader,
30876
30879
  position: "bottom",
30877
- offset: 30,
30880
+ offset: 60,
30878
30881
  fill: '#484A4C',
30879
30882
  fontSize: 16,
30880
30883
  fontWeight: 500
@@ -30987,6 +30990,25 @@ const BubbleChart = _ref => {
30987
30990
  // Calculate the exact position of the median point in the SVG
30988
30991
  const xPos = viewBox.x + (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]) * viewBox.width;
30989
30992
  const yPos = viewBox.y + (1 - (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0])) * viewBox.height;
30993
+
30994
+ // Calculate normalized position of median in domain
30995
+ // const xNorm = (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]);
30996
+ // const yNorm = (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0]);
30997
+
30998
+ // // If median is within 2% of the edge, center the label
30999
+ // const isXEdge = xNorm < 0.02 || xNorm > 0.98;
31000
+ // const isYEdge = yNorm < 0.02 || yNorm > 0.98;
31001
+
31002
+ // let xPos, yPos;
31003
+ // if (isXEdge || isYEdge) {
31004
+ // // Center of SVG
31005
+ // xPos = viewBox.x + viewBox.width / 2;
31006
+ // yPos = viewBox.y + viewBox.height / 2;
31007
+ // } else {
31008
+ // // Median's data position
31009
+ // xPos = viewBox.x + xNorm * viewBox.width;
31010
+ // yPos = viewBox.y + (1 - yNorm) * viewBox.height;
31011
+ // }
30990
31012
  return /*#__PURE__*/React$1.createElement("text", {
30991
31013
  x: xPos,
30992
31014
  y: yPos,