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.d.ts +6 -0
- package/dist/index.esm.js +43 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +43 -37
- package/dist/index.js.map +1 -1
- package/dist/types/components/TotalDoughnutChart/TotalDoughnutChart.d.ts +6 -0
- package/dist/types/components/TotalDoughnutChart/TotalDoughnutChart.stories.d.ts +111 -82
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -838,6 +838,7 @@ declare namespace TotalDoughnutChart {
|
|
|
838
838
|
const className: PropTypes.Requireable<string>;
|
|
839
839
|
const title: PropTypes.Requireable<string>;
|
|
840
840
|
const value: PropTypes.Requireable<number>;
|
|
841
|
+
const rootFont: PropTypes.Requireable<string>;
|
|
841
842
|
const addingBenchmark: PropTypes.Requireable<boolean>;
|
|
842
843
|
const dotCut: PropTypes.Requireable<boolean>;
|
|
843
844
|
const currencySign: PropTypes.Requireable<boolean>;
|
|
@@ -847,6 +848,7 @@ declare namespace TotalDoughnutChart {
|
|
|
847
848
|
value: PropTypes.Requireable<number>;
|
|
848
849
|
name: PropTypes.Requireable<string>;
|
|
849
850
|
}>[]>;
|
|
851
|
+
const legendBelow: PropTypes.Requireable<boolean>;
|
|
850
852
|
const itemsPercentagesValueAside: PropTypes.Requireable<boolean>;
|
|
851
853
|
const itemsBoldedValues: PropTypes.Requireable<boolean>;
|
|
852
854
|
const itemsValuesSeparateLine: PropTypes.Requireable<boolean>;
|
|
@@ -867,6 +869,8 @@ declare namespace TotalDoughnutChart {
|
|
|
867
869
|
export { title_1 as title };
|
|
868
870
|
const value_1: number;
|
|
869
871
|
export { value_1 as value };
|
|
872
|
+
const rootFont_1: string;
|
|
873
|
+
export { rootFont_1 as rootFont };
|
|
870
874
|
const addingBenchmark_1: boolean;
|
|
871
875
|
export { addingBenchmark_1 as addingBenchmark };
|
|
872
876
|
const dotCut_1: boolean;
|
|
@@ -877,6 +881,8 @@ declare namespace TotalDoughnutChart {
|
|
|
877
881
|
export { currencyType_1 as currencyType };
|
|
878
882
|
const legendData_1: any[];
|
|
879
883
|
export { legendData_1 as legendData };
|
|
884
|
+
const legendBelow_1: boolean;
|
|
885
|
+
export { legendBelow_1 as legendBelow };
|
|
880
886
|
const itemsPercentagesValueAside_1: boolean;
|
|
881
887
|
export { itemsPercentagesValueAside_1 as itemsPercentagesValueAside };
|
|
882
888
|
const itemsBoldedValues_1: boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -26343,28 +26343,24 @@ const scrollableStyles$5 = `
|
|
|
26343
26343
|
overflow-y: auto;
|
|
26344
26344
|
|
|
26345
26345
|
&::-webkit-scrollbar {
|
|
26346
|
-
width: 8px
|
|
26346
|
+
width: 0.5em; /* 8px → 0.5em */
|
|
26347
26347
|
}
|
|
26348
26348
|
|
|
26349
26349
|
&::-webkit-scrollbar-track {
|
|
26350
26350
|
background: #E8E8E8;
|
|
26351
|
-
border-radius: 5px;
|
|
26352
26351
|
}
|
|
26353
26352
|
|
|
26354
26353
|
&::-webkit-scrollbar-thumb {
|
|
26355
26354
|
background: #D0D0D0;
|
|
26356
|
-
border-radius: 5px;
|
|
26357
26355
|
}
|
|
26358
26356
|
`;
|
|
26359
26357
|
const ControlsContainer$4 = styled.div`
|
|
26360
26358
|
position: relative;
|
|
26361
26359
|
font-family: "Poppins", sans-serif;
|
|
26362
|
-
font-
|
|
26363
|
-
font-size: ${props => props.rootFont};
|
|
26360
|
+
font-size: ${props => props.rootFont || '1em'}; /* Base font size */
|
|
26364
26361
|
color: ${props => props.textColor};
|
|
26365
26362
|
width: ${props => props.width};
|
|
26366
26363
|
height: ${props => props.height};
|
|
26367
|
-
border-radius: 12px;
|
|
26368
26364
|
display: flex;
|
|
26369
26365
|
align-items: center;
|
|
26370
26366
|
@media (max-width: 1536px) {
|
|
@@ -26386,79 +26382,79 @@ const Controls$3 = styled.div`
|
|
|
26386
26382
|
const TooltipDiv$2 = styled.div`
|
|
26387
26383
|
display: flex;
|
|
26388
26384
|
background: white;
|
|
26389
|
-
|
|
26390
|
-
border-radius: 5px;
|
|
26391
|
-
padding: 6px 10px;
|
|
26385
|
+
padding: 0.375em 0.625em; /* 6px 10px → 0.375em 0.625em */
|
|
26392
26386
|
margin: 0;
|
|
26393
26387
|
`;
|
|
26394
26388
|
const TooltipLabel$2 = styled.p`
|
|
26395
26389
|
color: #212121;
|
|
26396
26390
|
font-family: "Poppins", sans-serif;
|
|
26397
|
-
font-size: 12px
|
|
26391
|
+
font-size: 0.75em; /* 12px → 0.75em */
|
|
26398
26392
|
font-weight: 400;
|
|
26399
26393
|
font-style: normal;
|
|
26400
|
-
width: max-content;
|
|
26394
|
+
width: max-content;
|
|
26401
26395
|
line-height: normal;
|
|
26402
26396
|
margin: 0;
|
|
26403
26397
|
`;
|
|
26404
26398
|
const TitleAndValueContainer$1 = styled.div`
|
|
26405
26399
|
display: flex;
|
|
26406
26400
|
flex-direction: column;
|
|
26407
|
-
padding: 0 20px
|
|
26401
|
+
padding: 0 1.25em; /* 20px → 1.25em */
|
|
26408
26402
|
`;
|
|
26409
26403
|
const Title$9 = styled.h4`
|
|
26410
26404
|
font-weight: 500;
|
|
26411
|
-
font-size: ${props => props.titleFontSize};
|
|
26405
|
+
font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
|
|
26412
26406
|
margin: 0;
|
|
26413
26407
|
@media (max-width: 1536px) {
|
|
26414
|
-
font-size: 14px
|
|
26408
|
+
font-size: 0.875em; /* 14px → 0.875em */
|
|
26415
26409
|
}
|
|
26416
26410
|
@media (max-width: 1366px) {
|
|
26417
|
-
font-size: 12px
|
|
26411
|
+
font-size: 0.75em; /* 12px → 0.75em */
|
|
26418
26412
|
}
|
|
26419
26413
|
`;
|
|
26420
26414
|
const CurrencySignAndFormattedValueContainer = styled.div`
|
|
26421
26415
|
display: flex;
|
|
26422
26416
|
align-items: center;
|
|
26423
|
-
gap: 5px
|
|
26417
|
+
gap: 0.3125em; /* 5px → 0.3125em */
|
|
26424
26418
|
align-items: baseline;
|
|
26425
26419
|
`;
|
|
26426
26420
|
const CurrencySign$1 = styled.span`
|
|
26427
26421
|
font-weight: 500;
|
|
26428
|
-
font-size: 16px
|
|
26422
|
+
font-size: 1em; /* 16px → 1em */
|
|
26429
26423
|
@media (max-width: 1536px) {
|
|
26430
|
-
font-size: 14px
|
|
26424
|
+
font-size: 0.875em; /* 14px → 0.875em */
|
|
26431
26425
|
}
|
|
26432
26426
|
@media (max-width: 1366px) {
|
|
26433
|
-
font-size: 11px
|
|
26427
|
+
font-size: 0.6875em; /* 11px → 0.6875em */
|
|
26434
26428
|
}
|
|
26435
26429
|
`;
|
|
26436
26430
|
const FormattedValue$1 = styled.div`
|
|
26437
26431
|
font-weight: 500;
|
|
26438
|
-
font-size: ${props => props.FormattedValueFontSize};
|
|
26432
|
+
font-size: ${props => props.FormattedValueFontSize || '2.5em'}; /* Default: 40px → 2.5em */
|
|
26439
26433
|
@media (max-width: 1536px) {
|
|
26440
|
-
font-size: 24px
|
|
26434
|
+
font-size: 1.5em; /* 24px → 1.5em */
|
|
26441
26435
|
}
|
|
26442
26436
|
@media (max-width: 1366px) {
|
|
26443
|
-
font-size: 20px
|
|
26437
|
+
font-size: 1.25em; /* 20px → 1.25em */
|
|
26444
26438
|
}
|
|
26445
26439
|
`;
|
|
26446
26440
|
const TextAfterValue = styled.div`
|
|
26447
26441
|
font-weight: 400;
|
|
26448
|
-
font-size: 12px
|
|
26442
|
+
font-size: 0.75em; /* 12px → 0.75em */
|
|
26449
26443
|
@media (max-width: 1536px) {
|
|
26450
|
-
font-size: 11px
|
|
26444
|
+
font-size: 0.6875em; /* 11px → 0.6875em */
|
|
26451
26445
|
}
|
|
26452
26446
|
@media (max-width: 1366px) {
|
|
26453
|
-
font-size: 10px
|
|
26447
|
+
font-size: 0.625em; /* 10px → 0.625em */
|
|
26454
26448
|
}
|
|
26455
26449
|
`;
|
|
26456
26450
|
const DoughnutChartAndLegendContainer = styled.div`
|
|
26457
26451
|
display: flex;
|
|
26452
|
+
flex-direction: ${props => props.legendBelow ? 'column' : 'row'};
|
|
26453
|
+
gap: 0.75em; /* 12px → 0.75em */
|
|
26458
26454
|
justify-content: space-between;
|
|
26459
26455
|
margin-top: auto;
|
|
26460
|
-
padding: 0 20px
|
|
26461
|
-
margin-bottom:
|
|
26456
|
+
padding: 0 1.25em; /* 20px → 1.25em */
|
|
26457
|
+
margin-bottom: 1.25em; /* 20px → 1.25em */
|
|
26462
26458
|
`;
|
|
26463
26459
|
const DoughnutChartContainer = styled.div`
|
|
26464
26460
|
display: flex;
|
|
@@ -26467,16 +26463,16 @@ const DoughnutChartContainer = styled.div`
|
|
|
26467
26463
|
min-height: 90px;
|
|
26468
26464
|
`;
|
|
26469
26465
|
const LegendContainer$2 = styled.div`
|
|
26470
|
-
padding-left: 10px
|
|
26466
|
+
padding-left: 0.625em; /* 10px → 0.625em */
|
|
26471
26467
|
display: flex;
|
|
26472
26468
|
flex-direction: column;
|
|
26473
26469
|
justify-content: space-evenly;
|
|
26474
26470
|
`;
|
|
26475
26471
|
const LegendControlsContainer = styled.div`
|
|
26476
26472
|
display: flex;
|
|
26477
|
-
gap: 0.
|
|
26473
|
+
gap: 0.5em; /* 8px → 0.5em */
|
|
26478
26474
|
align-items: center;
|
|
26479
|
-
margin-bottom: 0.
|
|
26475
|
+
margin-bottom: 0.375em; /* 6px → 0.375em */
|
|
26480
26476
|
`;
|
|
26481
26477
|
const LegendTitleAndFormatedValueContainer = styled.div`
|
|
26482
26478
|
flex-grow: 1;
|
|
@@ -26493,38 +26489,41 @@ const LegendColorRectangle = styled.div`
|
|
|
26493
26489
|
`;
|
|
26494
26490
|
const LegendTitle = styled.h5`
|
|
26495
26491
|
font-weight: 400;
|
|
26496
|
-
font-size: 16px
|
|
26497
|
-
gap: 5px
|
|
26492
|
+
font-size: 1em; /* 16px → 1em */
|
|
26493
|
+
gap: 0.3125em; /* 5px → 0.3125em */
|
|
26498
26494
|
margin: 0;
|
|
26499
26495
|
display: flex;
|
|
26500
26496
|
justify-content: space-between;
|
|
26501
26497
|
@media (max-width: 1536px) {
|
|
26502
|
-
font-size: 11px
|
|
26498
|
+
font-size: 0.6875em; /* 11px → 0.6875em */
|
|
26503
26499
|
}
|
|
26504
26500
|
@media (max-width: 1366px) {
|
|
26505
|
-
font-size: 10px
|
|
26501
|
+
font-size: 0.625em; /* 10px → 0.625em */
|
|
26506
26502
|
}
|
|
26507
26503
|
`;
|
|
26508
26504
|
const LegendFormattedValue = styled.span`
|
|
26509
26505
|
font-weight: 500;
|
|
26506
|
+
font-size: 0.875em; /* 14px → 0.875em */
|
|
26510
26507
|
white-space: nowrap;
|
|
26511
26508
|
`;
|
|
26512
26509
|
|
|
26513
26510
|
const TotalDoughnutChart = props => {
|
|
26514
26511
|
const {
|
|
26515
26512
|
className,
|
|
26513
|
+
width,
|
|
26514
|
+
height,
|
|
26516
26515
|
title,
|
|
26517
26516
|
value,
|
|
26517
|
+
rootFont,
|
|
26518
26518
|
addingBenchmark,
|
|
26519
26519
|
dotCut,
|
|
26520
26520
|
currencySign,
|
|
26521
26521
|
currencyType,
|
|
26522
26522
|
legendData,
|
|
26523
|
+
legendBelow,
|
|
26523
26524
|
itemsPercentagesValueAside,
|
|
26524
26525
|
itemsBoldedValues,
|
|
26525
26526
|
itemsValuesSeparateLine,
|
|
26526
|
-
width,
|
|
26527
|
-
height,
|
|
26528
26527
|
textcolor,
|
|
26529
26528
|
titleFontSize,
|
|
26530
26529
|
FormattedValueFontSize,
|
|
@@ -26591,6 +26590,7 @@ const TotalDoughnutChart = props => {
|
|
|
26591
26590
|
className: className,
|
|
26592
26591
|
height: height,
|
|
26593
26592
|
width: width,
|
|
26593
|
+
rootFont: rootFont,
|
|
26594
26594
|
textcolor: textcolor
|
|
26595
26595
|
}, legendData.length === 0 || legendData.every(item => item.value === undefined || item.value === null) ? /*#__PURE__*/React$1.createElement(NoDataFoundMessage, {
|
|
26596
26596
|
className: "NoDataFoundMessage",
|
|
@@ -26614,7 +26614,9 @@ const TotalDoughnutChart = props => {
|
|
|
26614
26614
|
className: "CurrencySign"
|
|
26615
26615
|
}, 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$1.createElement(TextAfterValue, {
|
|
26616
26616
|
className: "TextAfterValue"
|
|
26617
|
-
}, textAfterValue) : '', addingBenchmark && /*#__PURE__*/React$1.createElement(Benchmark, null))), /*#__PURE__*/React$1.createElement(DoughnutChartAndLegendContainer,
|
|
26617
|
+
}, textAfterValue) : '', addingBenchmark && /*#__PURE__*/React$1.createElement(Benchmark, null))), /*#__PURE__*/React$1.createElement(DoughnutChartAndLegendContainer, {
|
|
26618
|
+
legendBelow: legendBelow
|
|
26619
|
+
}, /*#__PURE__*/React$1.createElement(DoughnutChartContainer, {
|
|
26618
26620
|
width: width,
|
|
26619
26621
|
height: height,
|
|
26620
26622
|
ref: DoughnutChartContainerRef
|
|
@@ -26649,6 +26651,7 @@ TotalDoughnutChart.propTypes = {
|
|
|
26649
26651
|
className: PropTypes.string,
|
|
26650
26652
|
title: PropTypes.string,
|
|
26651
26653
|
value: PropTypes.number,
|
|
26654
|
+
rootFont: PropTypes.string,
|
|
26652
26655
|
addingBenchmark: PropTypes.bool,
|
|
26653
26656
|
dotCut: PropTypes.bool,
|
|
26654
26657
|
currencySign: PropTypes.bool,
|
|
@@ -26658,6 +26661,7 @@ TotalDoughnutChart.propTypes = {
|
|
|
26658
26661
|
value: PropTypes.number,
|
|
26659
26662
|
name: PropTypes.string
|
|
26660
26663
|
})),
|
|
26664
|
+
legendBelow: PropTypes.bool,
|
|
26661
26665
|
itemsPercentagesValueAside: PropTypes.bool,
|
|
26662
26666
|
itemsBoldedValues: PropTypes.bool,
|
|
26663
26667
|
itemsValuesSeparateLine: PropTypes.bool,
|
|
@@ -26675,11 +26679,13 @@ TotalDoughnutChart.defaultProps = {
|
|
|
26675
26679
|
className: '',
|
|
26676
26680
|
title: '',
|
|
26677
26681
|
value: 0,
|
|
26682
|
+
rootFont: '18px',
|
|
26678
26683
|
addingBenchmark: false,
|
|
26679
26684
|
dotCut: false,
|
|
26680
26685
|
currencySign: false,
|
|
26681
26686
|
currencyType: 'USD',
|
|
26682
26687
|
legendData: [],
|
|
26688
|
+
legendBelow: false,
|
|
26683
26689
|
itemsPercentagesValueAside: true,
|
|
26684
26690
|
itemsBoldedValues: true,
|
|
26685
26691
|
itemsValuesSeparateLine: true,
|