@lidofinance/lido-ui 3.42.1 → 3.42.2
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/cjs/chart-proportion/ChartProportion.js +2 -1
- package/dist/cjs/chart-proportion/ChartProportion.js.map +1 -1
- package/dist/esm/chart-proportion/ChartProportion.mjs +2 -1
- package/dist/esm/chart-proportion/ChartProportion.mjs.map +1 -1
- package/dist/types/chart-proportion/ChartProportion.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ const ChartProportion = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
41
41
|
label
|
|
42
42
|
} = item;
|
|
43
43
|
const isShowLabel = showLabels && label;
|
|
44
|
+
const showProgressLine = value > 0 && progress > 0 && progress < 100;
|
|
44
45
|
return /*#__PURE__*/jsxRuntime.jsxs(ChartProportionStyles.ProportionStyle, {
|
|
45
46
|
$flexGrow: value,
|
|
46
47
|
$backgroundColor: color,
|
|
@@ -54,7 +55,7 @@ const ChartProportion = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
54
55
|
$backgroundColor: color,
|
|
55
56
|
$border: border,
|
|
56
57
|
$borderSize: borderSize,
|
|
57
|
-
children:
|
|
58
|
+
children: showProgressLine && /*#__PURE__*/jsxRuntime.jsx(ChartProportionStyles.ProportionProgressLineStyle, {})
|
|
58
59
|
})]
|
|
59
60
|
}, index);
|
|
60
61
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartProportion.js","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport {\n ProportionStyle,\n WrapperStyle,\n ProportionProgressStyle,\n ProportionProgressLineStyle,\n ProportionLabelStyle,\n} from './ChartProportionStyles.js'\nimport { ChartProportionProps } from './types.js'\n\nexport const ChartProportion = forwardRef(\n (props: ChartProportionProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n margin,\n borderSize,\n ...rest\n } = props\n\n if (loading) {\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n {data.map((item, index) => {\n const { color, value, progress, label } = item\n const isShowLabel = showLabels && label\n\n return (\n <ProportionStyle\n key={index}\n $flexGrow={value}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n $margin={margin}\n >\n {isShowLabel && (\n <ProportionLabelStyle>{label}</ProportionLabelStyle>\n )}\n <ProportionProgressStyle\n $progress={progress}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n >\n {
|
|
1
|
+
{"version":3,"file":"ChartProportion.js","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport {\n ProportionStyle,\n WrapperStyle,\n ProportionProgressStyle,\n ProportionProgressLineStyle,\n ProportionLabelStyle,\n} from './ChartProportionStyles.js'\nimport { ChartProportionProps } from './types.js'\n\nexport const ChartProportion = forwardRef(\n (props: ChartProportionProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n margin,\n borderSize,\n ...rest\n } = props\n\n if (loading) {\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n {data.map((item, index) => {\n const { color, value, progress, label } = item\n const isShowLabel = showLabels && label\n const showProgressLine = value > 0 && progress > 0 && progress < 100\n\n return (\n <ProportionStyle\n key={index}\n $flexGrow={value}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n $margin={margin}\n >\n {isShowLabel && (\n <ProportionLabelStyle>{label}</ProportionLabelStyle>\n )}\n <ProportionProgressStyle\n $progress={progress}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n >\n {showProgressLine && <ProportionProgressLineStyle />}\n </ProportionProgressStyle>\n </ProportionStyle>\n )\n })}\n </WrapperStyle>\n )\n },\n)\nChartProportion.displayName = 'ChartProportion'\n"],"names":["ChartProportion","forwardRef","props","ref","loading","onClick","children","height","border","data","showLabels","margin","borderSize","rest","_jsx","WrapperStyle","$height","InlineLoader","map","item","index","color","value","progress","label","isShowLabel","showProgressLine","_jsxs","ProportionStyle","$flexGrow","$backgroundColor","$border","$borderSize","$margin","ProportionLabelStyle","ProportionProgressStyle","$progress","ProportionProgressLineStyle","displayName"],"mappings":";;;;;;;;;;AAaO,MAAMA,eAAe,gBAAGC,gBAAU,CACvC,CAACC,KAA2B,EAAEC,GAAkC,KAAK;EACnE,MAAM;AACJC,IAAAA,OAAO,GAAG,KAAK;IACfC,OAAO;IACPC,QAAQ;IACRC,MAAM;IACNC,MAAM;IACNC,IAAI;IACJC,UAAU;IACVC,MAAM;IACNC,UAAU;IACV,GAAGC,IAAAA;AACL,GAAC,GAAGX,KAAK,CAAA;AAET,EAAA,IAAIE,OAAO,EAAE;IACX,oBACEU,cAAA,CAACC,kCAAY,EAAA;AAACC,MAAAA,OAAO,EAAET,MAAO;AAACJ,MAAAA,GAAG,EAAEA,GAAI;AAAA,MAAA,GAAKU,IAAI;AAAAP,MAAAA,QAAA,eAC/CQ,cAAA,CAACG,yBAAY,EAAE,EAAA,CAAA;AAAC,KACJ,CAAC,CAAA;AAEnB,GAAA;EAEA,oBACEH,cAAA,CAACC,kCAAY,EAAA;AAACC,IAAAA,OAAO,EAAET,MAAO;AAACJ,IAAAA,GAAG,EAAEA,GAAI;AAAA,IAAA,GAAKU,IAAI;IAAAP,QAAA,EAC9CG,IAAI,CAACS,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;MACzB,MAAM;QAAEC,KAAK;QAAEC,KAAK;QAAEC,QAAQ;AAAEC,QAAAA,KAAAA;AAAM,OAAC,GAAGL,IAAI,CAAA;AAC9C,MAAA,MAAMM,WAAW,GAAGf,UAAU,IAAIc,KAAK,CAAA;AACvC,MAAA,MAAME,gBAAgB,GAAGJ,KAAK,GAAG,CAAC,IAAIC,QAAQ,GAAG,CAAC,IAAIA,QAAQ,GAAG,GAAG,CAAA;MAEpE,oBACEI,eAAA,CAACC,qCAAe,EAAA;AAEdC,QAAAA,SAAS,EAAEP,KAAM;AACjBQ,QAAAA,gBAAgB,EAAET,KAAM;AACxBU,QAAAA,OAAO,EAAEvB,MAAO;AAChBwB,QAAAA,WAAW,EAAEpB,UAAW;AACxBqB,QAAAA,OAAO,EAAEtB,MAAO;AAAAL,QAAAA,QAAA,EAEfmB,CAAAA,WAAW,iBACVX,cAAA,CAACoB,0CAAoB,EAAA;AAAA5B,UAAAA,QAAA,EAAEkB,KAAAA;AAAK,SAAuB,CACpD,eACDV,cAAA,CAACqB,6CAAuB,EAAA;AACtBC,UAAAA,SAAS,EAAEb,QAAS;AACpBO,UAAAA,gBAAgB,EAAET,KAAM;AACxBU,UAAAA,OAAO,EAAEvB,MAAO;AAChBwB,UAAAA,WAAW,EAAEpB,UAAW;AAAAN,UAAAA,QAAA,EAEvBoB,gBAAgB,iBAAIZ,cAAA,CAACuB,iDAA2B,EAAE,EAAA,CAAA;AAAC,SAC7B,CAAC,CAAA;AAAA,OAAA,EAjBrBjB,KAkBU,CAAC,CAAA;KAErB,CAAA;AAAC,GACU,CAAC,CAAA;AAEnB,CACF,EAAC;AACDpB,eAAe,CAACsC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -37,6 +37,7 @@ const ChartProportion = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
37
37
|
label
|
|
38
38
|
} = item;
|
|
39
39
|
const isShowLabel = showLabels && label;
|
|
40
|
+
const showProgressLine = value > 0 && progress > 0 && progress < 100;
|
|
40
41
|
return /*#__PURE__*/jsxs(ProportionStyle, {
|
|
41
42
|
$flexGrow: value,
|
|
42
43
|
$backgroundColor: color,
|
|
@@ -50,7 +51,7 @@ const ChartProportion = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
50
51
|
$backgroundColor: color,
|
|
51
52
|
$border: border,
|
|
52
53
|
$borderSize: borderSize,
|
|
53
|
-
children:
|
|
54
|
+
children: showProgressLine && /*#__PURE__*/jsx(ProportionProgressLineStyle, {})
|
|
54
55
|
})]
|
|
55
56
|
}, index);
|
|
56
57
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartProportion.mjs","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport {\n ProportionStyle,\n WrapperStyle,\n ProportionProgressStyle,\n ProportionProgressLineStyle,\n ProportionLabelStyle,\n} from './ChartProportionStyles.js'\nimport { ChartProportionProps } from './types.js'\n\nexport const ChartProportion = forwardRef(\n (props: ChartProportionProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n margin,\n borderSize,\n ...rest\n } = props\n\n if (loading) {\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n {data.map((item, index) => {\n const { color, value, progress, label } = item\n const isShowLabel = showLabels && label\n\n return (\n <ProportionStyle\n key={index}\n $flexGrow={value}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n $margin={margin}\n >\n {isShowLabel && (\n <ProportionLabelStyle>{label}</ProportionLabelStyle>\n )}\n <ProportionProgressStyle\n $progress={progress}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n >\n {
|
|
1
|
+
{"version":3,"file":"ChartProportion.mjs","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"sourcesContent":["import { ForwardedRef, forwardRef } from 'react'\n\nimport { InlineLoader } from '../loaders/index.js'\n\nimport {\n ProportionStyle,\n WrapperStyle,\n ProportionProgressStyle,\n ProportionProgressLineStyle,\n ProportionLabelStyle,\n} from './ChartProportionStyles.js'\nimport { ChartProportionProps } from './types.js'\n\nexport const ChartProportion = forwardRef(\n (props: ChartProportionProps, ref?: ForwardedRef<HTMLDivElement>) => {\n const {\n loading = false,\n onClick,\n children,\n height,\n border,\n data,\n showLabels,\n margin,\n borderSize,\n ...rest\n } = props\n\n if (loading) {\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n <InlineLoader />\n </WrapperStyle>\n )\n }\n\n return (\n <WrapperStyle $height={height} ref={ref} {...rest}>\n {data.map((item, index) => {\n const { color, value, progress, label } = item\n const isShowLabel = showLabels && label\n const showProgressLine = value > 0 && progress > 0 && progress < 100\n\n return (\n <ProportionStyle\n key={index}\n $flexGrow={value}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n $margin={margin}\n >\n {isShowLabel && (\n <ProportionLabelStyle>{label}</ProportionLabelStyle>\n )}\n <ProportionProgressStyle\n $progress={progress}\n $backgroundColor={color}\n $border={border}\n $borderSize={borderSize}\n >\n {showProgressLine && <ProportionProgressLineStyle />}\n </ProportionProgressStyle>\n </ProportionStyle>\n )\n })}\n </WrapperStyle>\n )\n },\n)\nChartProportion.displayName = 'ChartProportion'\n"],"names":["ChartProportion","forwardRef","props","ref","loading","onClick","children","height","border","data","showLabels","margin","borderSize","rest","_jsx","WrapperStyle","$height","InlineLoader","map","item","index","color","value","progress","label","isShowLabel","showProgressLine","_jsxs","ProportionStyle","$flexGrow","$backgroundColor","$border","$borderSize","$margin","ProportionLabelStyle","ProportionProgressStyle","$progress","ProportionProgressLineStyle","displayName"],"mappings":";;;;;;AAaO,MAAMA,eAAe,gBAAGC,UAAU,CACvC,CAACC,KAA2B,EAAEC,GAAkC,KAAK;EACnE,MAAM;AACJC,IAAAA,OAAO,GAAG,KAAK;IACfC,OAAO;IAC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A,CAACqB,uBAAuB,EAAA;AACtBC,UAAAA,SAAS,EAAEb,QAAS;AACpBO,UAAAA,gBAAgB,EAAET,KAAM;AACxBU,UAAAA,OAAO,EAAEvB,MAAO;AAChBwB,UAAAA,WAAW,EAAEpB,UAAW;AAAAN,UAAAA,QAAA,EAEvBoB,gBAAgB,iBAAIZ,GAAA,CAACuB,2BAA2B,EAAE,EAAA,CAAA;AAAC,SAC7B,CAAC,CAAA;AAAA,OAAA,EAjBrBjB,KAkBU,CAAC,CAAA;KAErB,CAAA;AAAC,GACU,CAAC,CAAA;AAEnB,CACF,EAAC;AACDpB,eAAe,CAACsC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartProportion.d.ts","sourceRoot":"","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"names":[],"mappings":";AAaA,eAAO,MAAM,eAAe;;;
|
|
1
|
+
{"version":3,"file":"ChartProportion.d.ts","sourceRoot":"","sources":["../../../packages/chart-proportion/ChartProportion.tsx"],"names":[],"mappings":";AAaA,eAAO,MAAM,eAAe;;;6GAwD3B,CAAA"}
|