sag_components 2.0.0-beta41 → 2.0.0-beta43

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.js CHANGED
@@ -26353,28 +26353,24 @@ const scrollableStyles$5 = `
26353
26353
  overflow-y: auto;
26354
26354
 
26355
26355
  &::-webkit-scrollbar {
26356
- width: 8px;
26356
+ width: 0.5em; /* 8px → 0.5em */
26357
26357
  }
26358
26358
 
26359
26359
  &::-webkit-scrollbar-track {
26360
26360
  background: #E8E8E8;
26361
- border-radius: 5px;
26362
26361
  }
26363
26362
 
26364
26363
  &::-webkit-scrollbar-thumb {
26365
26364
  background: #D0D0D0;
26366
- border-radius: 5px;
26367
26365
  }
26368
26366
  `;
26369
26367
  const ControlsContainer$4 = styled__default["default"].div`
26370
26368
  position: relative;
26371
26369
  font-family: "Poppins", sans-serif;
26372
- font-style: normal;
26373
- font-size: ${props => props.rootFont};
26370
+ font-size: ${props => props.rootFont || '1em'}; /* Base font size */
26374
26371
  color: ${props => props.textColor};
26375
26372
  width: ${props => props.width};
26376
26373
  height: ${props => props.height};
26377
- border-radius: 12px;
26378
26374
  display: flex;
26379
26375
  align-items: center;
26380
26376
  @media (max-width: 1536px) {
@@ -26396,79 +26392,79 @@ const Controls$3 = styled__default["default"].div`
26396
26392
  const TooltipDiv$2 = styled__default["default"].div`
26397
26393
  display: flex;
26398
26394
  background: white;
26399
- box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
26400
- border-radius: 5px;
26401
- padding: 6px 10px;
26395
+ padding: 0.375em 0.625em; /* 6px 10px 0.375em 0.625em */
26402
26396
  margin: 0;
26403
26397
  `;
26404
26398
  const TooltipLabel$2 = styled__default["default"].p`
26405
26399
  color: #212121;
26406
26400
  font-family: "Poppins", sans-serif;
26407
- font-size: 12px;
26401
+ font-size: 0.75em; /* 12px → 0.75em */
26408
26402
  font-weight: 400;
26409
26403
  font-style: normal;
26410
- width: max-content; // fit-content;
26404
+ width: max-content;
26411
26405
  line-height: normal;
26412
26406
  margin: 0;
26413
26407
  `;
26414
26408
  const TitleAndValueContainer$1 = styled__default["default"].div`
26415
26409
  display: flex;
26416
26410
  flex-direction: column;
26417
- padding: 0 20px;
26411
+ padding: 0 1.25em; /* 20px → 1.25em */
26418
26412
  `;
26419
26413
  const Title$9 = styled__default["default"].h4`
26420
26414
  font-weight: 500;
26421
- font-size: ${props => props.titleFontSize};
26415
+ font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
26422
26416
  margin: 0;
26423
26417
  @media (max-width: 1536px) {
26424
- font-size: 14px;
26418
+ font-size: 0.875em; /* 14px → 0.875em */
26425
26419
  }
26426
26420
  @media (max-width: 1366px) {
26427
- font-size: 12px;
26421
+ font-size: 0.75em; /* 12px → 0.75em */
26428
26422
  }
26429
26423
  `;
26430
26424
  const CurrencySignAndFormattedValueContainer = styled__default["default"].div`
26431
26425
  display: flex;
26432
26426
  align-items: center;
26433
- gap: 5px;
26427
+ gap: 0.3125em; /* 5px → 0.3125em */
26434
26428
  align-items: baseline;
26435
26429
  `;
26436
26430
  const CurrencySign$1 = styled__default["default"].span`
26437
26431
  font-weight: 500;
26438
- font-size: 16px;
26432
+ font-size: 1em; /* 16px → 1em */
26439
26433
  @media (max-width: 1536px) {
26440
- font-size: 14px;
26434
+ font-size: 0.875em; /* 14px → 0.875em */
26441
26435
  }
26442
26436
  @media (max-width: 1366px) {
26443
- font-size: 11px;
26437
+ font-size: 0.6875em; /* 11px → 0.6875em */
26444
26438
  }
26445
26439
  `;
26446
26440
  const FormattedValue$1 = styled__default["default"].div`
26447
26441
  font-weight: 500;
26448
- font-size: ${props => props.FormattedValueFontSize};
26442
+ font-size: ${props => props.FormattedValueFontSize || '2.5em'}; /* Default: 40px → 2.5em */
26449
26443
  @media (max-width: 1536px) {
26450
- font-size: 24px;
26444
+ font-size: 1.5em; /* 24px → 1.5em */
26451
26445
  }
26452
26446
  @media (max-width: 1366px) {
26453
- font-size: 20px;
26447
+ font-size: 1.25em; /* 20px → 1.25em */
26454
26448
  }
26455
26449
  `;
26456
26450
  const TextAfterValue = styled__default["default"].div`
26457
26451
  font-weight: 400;
26458
- font-size: 12px;
26452
+ font-size: 0.75em; /* 12px → 0.75em */
26459
26453
  @media (max-width: 1536px) {
26460
- font-size: 11px;
26454
+ font-size: 0.6875em; /* 11px → 0.6875em */
26461
26455
  }
26462
26456
  @media (max-width: 1366px) {
26463
- font-size: 10px;
26457
+ font-size: 0.625em; /* 10px → 0.625em */
26464
26458
  }
26465
26459
  `;
26466
26460
  const DoughnutChartAndLegendContainer = styled__default["default"].div`
26467
26461
  display: flex;
26462
+ flex-direction: ${props => props.legendBelow ? 'column' : 'row'};
26463
+ gap: 0.75em; /* 12px → 0.75em */
26468
26464
  justify-content: space-between;
26469
26465
  margin-top: auto;
26470
- padding: 0 20px ;
26471
- margin-bottom: 20px;
26466
+ padding: 0 1.25em; /* 20px → 1.25em */
26467
+ margin-bottom: 1.25em; /* 20px → 1.25em */
26472
26468
  `;
26473
26469
  const DoughnutChartContainer = styled__default["default"].div`
26474
26470
  display: flex;
@@ -26477,16 +26473,16 @@ const DoughnutChartContainer = styled__default["default"].div`
26477
26473
  min-height: 90px;
26478
26474
  `;
26479
26475
  const LegendContainer$2 = styled__default["default"].div`
26480
- padding-left: 10px;
26476
+ padding-left: 0.625em; /* 10px → 0.625em */
26481
26477
  display: flex;
26482
26478
  flex-direction: column;
26483
26479
  justify-content: space-evenly;
26484
26480
  `;
26485
26481
  const LegendControlsContainer = styled__default["default"].div`
26486
26482
  display: flex;
26487
- gap: 0.5rem;
26483
+ gap: 0.5em; /* 8px → 0.5em */
26488
26484
  align-items: center;
26489
- margin-bottom: 0.375rem;
26485
+ margin-bottom: 0.375em; /* 6px → 0.375em */
26490
26486
  `;
26491
26487
  const LegendTitleAndFormatedValueContainer = styled__default["default"].div`
26492
26488
  flex-grow: 1;
@@ -26503,38 +26499,41 @@ const LegendColorRectangle = styled__default["default"].div`
26503
26499
  `;
26504
26500
  const LegendTitle = styled__default["default"].h5`
26505
26501
  font-weight: 400;
26506
- font-size: 16px;
26507
- gap: 5px;
26502
+ font-size: 1em; /* 16px → 1em */
26503
+ gap: 0.3125em; /* 5px → 0.3125em */
26508
26504
  margin: 0;
26509
26505
  display: flex;
26510
26506
  justify-content: space-between;
26511
26507
  @media (max-width: 1536px) {
26512
- font-size: 11px;
26508
+ font-size: 0.6875em; /* 11px → 0.6875em */
26513
26509
  }
26514
26510
  @media (max-width: 1366px) {
26515
- font-size: 10px;
26511
+ font-size: 0.625em; /* 10px → 0.625em */
26516
26512
  }
26517
26513
  `;
26518
26514
  const LegendFormattedValue = styled__default["default"].span`
26519
26515
  font-weight: 500;
26516
+ font-size: 0.875em; /* 14px → 0.875em */
26520
26517
  white-space: nowrap;
26521
26518
  `;
26522
26519
 
26523
26520
  const TotalDoughnutChart = props => {
26524
26521
  const {
26525
26522
  className,
26523
+ width,
26524
+ height,
26526
26525
  title,
26527
26526
  value,
26527
+ rootFont,
26528
26528
  addingBenchmark,
26529
26529
  dotCut,
26530
26530
  currencySign,
26531
26531
  currencyType,
26532
26532
  legendData,
26533
+ legendBelow,
26533
26534
  itemsPercentagesValueAside,
26534
26535
  itemsBoldedValues,
26535
26536
  itemsValuesSeparateLine,
26536
- width,
26537
- height,
26538
26537
  textcolor,
26539
26538
  titleFontSize,
26540
26539
  FormattedValueFontSize,
@@ -26601,6 +26600,7 @@ const TotalDoughnutChart = props => {
26601
26600
  className: className,
26602
26601
  height: height,
26603
26602
  width: width,
26603
+ rootFont: rootFont,
26604
26604
  textcolor: textcolor
26605
26605
  }, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
26606
26606
  className: "NoDataFoundMessage",
@@ -26624,7 +26624,9 @@ const TotalDoughnutChart = props => {
26624
26624
  className: "CurrencySign"
26625
26625
  }, currencySign ? getCurrencySign(currencyType, value) : ''), dotCut ? getFormattedValue(value && Math.abs(value) > 0 && value % 1 !== 0 ? value?.toFixed(2) : value) : getNumberWithCommas(value), dotCut ? getFormattedUnits(value) : ''), textAfterValue ? /*#__PURE__*/React__default["default"].createElement(TextAfterValue, {
26626
26626
  className: "TextAfterValue"
26627
- }, textAfterValue) : '', addingBenchmark && /*#__PURE__*/React__default["default"].createElement(Benchmark, null))), /*#__PURE__*/React__default["default"].createElement(DoughnutChartAndLegendContainer, null, /*#__PURE__*/React__default["default"].createElement(DoughnutChartContainer, {
26627
+ }, textAfterValue) : '', addingBenchmark && /*#__PURE__*/React__default["default"].createElement(Benchmark, null))), /*#__PURE__*/React__default["default"].createElement(DoughnutChartAndLegendContainer, {
26628
+ legendBelow: legendBelow
26629
+ }, /*#__PURE__*/React__default["default"].createElement(DoughnutChartContainer, {
26628
26630
  width: width,
26629
26631
  height: height,
26630
26632
  ref: DoughnutChartContainerRef
@@ -26659,6 +26661,7 @@ TotalDoughnutChart.propTypes = {
26659
26661
  className: PropTypes.string,
26660
26662
  title: PropTypes.string,
26661
26663
  value: PropTypes.number,
26664
+ rootFont: PropTypes.string,
26662
26665
  addingBenchmark: PropTypes.bool,
26663
26666
  dotCut: PropTypes.bool,
26664
26667
  currencySign: PropTypes.bool,
@@ -26668,6 +26671,7 @@ TotalDoughnutChart.propTypes = {
26668
26671
  value: PropTypes.number,
26669
26672
  name: PropTypes.string
26670
26673
  })),
26674
+ legendBelow: PropTypes.bool,
26671
26675
  itemsPercentagesValueAside: PropTypes.bool,
26672
26676
  itemsBoldedValues: PropTypes.bool,
26673
26677
  itemsValuesSeparateLine: PropTypes.bool,
@@ -26685,11 +26689,13 @@ TotalDoughnutChart.defaultProps = {
26685
26689
  className: '',
26686
26690
  title: '',
26687
26691
  value: 0,
26692
+ rootFont: '18px',
26688
26693
  addingBenchmark: false,
26689
26694
  dotCut: false,
26690
26695
  currencySign: false,
26691
26696
  currencyType: 'USD',
26692
26697
  legendData: [],
26698
+ legendBelow: false,
26693
26699
  itemsPercentagesValueAside: true,
26694
26700
  itemsBoldedValues: true,
26695
26701
  itemsValuesSeparateLine: true,