it-data-nexus-ui-library 2.9.2 → 2.9.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Card as l,CardContent as a}from"@mui/material";import{MetricStat as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Card as l,CardContent as a}from"@mui/material";import{MetricStat as e}from"./MetricStat.mjs";const r={xs:0,sm:.3,md:.5,lg:1},i=({label:i,value:t,delta:n,deltaColor:m,valueColor:c,size:s,icon:d,iconColor:p,iconSize:u,valueRowGap:x,labelGap:b,alignValueToBottom:C,cardSx:h,sx:v})=>{const S=r[s??"md"];return o(l,{sx:[{boxShadow:"none"},...Array.isArray(h)?h:h?[h]:[]],children:o(a,{sx:{p:S,...C?{height:"100%",boxSizing:"border-box"}:{},"&:last-child":{pb:S}},children:o(e,{label:i,value:t,delta:n,deltaColor:m,valueColor:c,size:s,icon:d,iconColor:p,iconSize:u,valueRowGap:x,labelGap:b,alignValueToBottom:C,sx:v})})})};i.displayName="MetricCard";export{i as MetricCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{Stack as r}from"./_Primitives/Stack.mjs";import{H4 as i,MetricValue as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{Stack as r}from"./_Primitives/Stack.mjs";import{H4 as i,MetricValue as l,Caption as t}from"./Typography.mjs";const a=({label:a,value:n,delta:s,deltaColor:c,valueColor:m,size:p,icon:d,iconColor:x,iconSize:h,valueRowGap:g=1,labelGap:f=.25,alignValueToBottom:u=!1,sx:y})=>e(r,{sx:[{gap:f,...u?{height:"100%",justifyContent:"space-between"}:{}},...Array.isArray(y)?y:y?[y]:[]],children:[o(i,{sx:{color:"text.secondary"},children:a}),e(r,{direction:"row",sx:{alignItems:"center",gap:g},children:[d&&o(d,{"aria-hidden":"true",sx:{color:x,fontSize:h??("lg"===p?40:"sm"===p?28:"xs"===p?22:34)}}),o(l,{size:p,sx:m?{color:m}:void 0,children:n}),s&&o(t,{component:"span",sx:[{alignSelf:"flex-end",pb:.25},...c?[{color:c}]:[]],children:s})]})]});a.displayName="MetricStat";export{a as MetricStat};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="2.9.
|
|
1
|
+
const o="2.9.3";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -635,6 +635,10 @@ interface MetricStatProps {
|
|
|
635
635
|
icon?: typeof SvgIcon;
|
|
636
636
|
/** MUI theme colour token for the icon. Omit for default text colour. */
|
|
637
637
|
iconColor?: string;
|
|
638
|
+
/** Optional icon size in pixels. Defaults to the size associated with the metric value. */
|
|
639
|
+
iconSize?: number;
|
|
640
|
+
/** Gap between the icon, value, and delta row items. Defaults to 1. */
|
|
641
|
+
valueRowGap?: number | string;
|
|
638
642
|
/** Gap between the metric label and the value row. Defaults to 0.25. */
|
|
639
643
|
labelGap?: number | string;
|
|
640
644
|
/** Align the value row to the bottom when the metric has a constrained height. */
|
|
@@ -653,7 +657,7 @@ interface MetricStatProps {
|
|
|
653
657
|
* large p — not a heading), and the delta is a Caption.
|
|
654
658
|
*/
|
|
655
659
|
declare const MetricStat: {
|
|
656
|
-
({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, alignValueToBottom, sx, }: MetricStatProps): react.JSX.Element;
|
|
660
|
+
({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, iconSize, valueRowGap, labelGap, alignValueToBottom, sx, }: MetricStatProps): react.JSX.Element;
|
|
657
661
|
displayName: string;
|
|
658
662
|
};
|
|
659
663
|
|
|
@@ -672,7 +676,7 @@ interface MetricCardProps extends MetricStatProps {
|
|
|
672
676
|
* ```
|
|
673
677
|
*/
|
|
674
678
|
declare const MetricCard: {
|
|
675
|
-
({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, alignValueToBottom, cardSx, sx, }: MetricCardProps): react.JSX.Element;
|
|
679
|
+
({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, iconSize, valueRowGap, labelGap, alignValueToBottom, cardSx, sx, }: MetricCardProps): react.JSX.Element;
|
|
676
680
|
displayName: string;
|
|
677
681
|
};
|
|
678
682
|
|