it-data-nexus-ui-library 2.8.1 → 2.8.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
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Card as l,CardContent as a}from"@mui/material";import{MetricStat as r}from"./MetricStat.mjs";const e={xs:0,sm:.3,md:.5,lg:1},i=({label:i,value:t,delta:m,deltaColor:n,valueColor:s,size:d,icon:c,iconColor:x,labelGap:b,alignValueToBottom:p,cardSx:u,sx:C})=>{const h=e[d??"md"];return o(l,{sx:[{boxShadow:"none"},...Array.isArray(u)?u:u?[u]:[]],children:o(a,{sx:{p:h,...p?{height:"100%",boxSizing:"border-box"}:{},"&:last-child":{pb:h}},children:o(r,{label:i,value:t,delta:m,deltaColor:n,valueColor:s,size:d,icon:c,iconColor:x,labelGap:b,alignValueToBottom:p,sx:C})})})};i.displayName="MetricCard";export{i as MetricCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs 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 t,Caption as l}from"./Typography.mjs";const a=({label:a,value:n,delta:s,deltaColor:c,valueColor:m,size:d,icon:p,iconColor:x,labelGap:h=.25,alignValueToBottom:g=!1,sx:f})=>e(r,{sx:[{gap:h,...g?{height:"100%",justifyContent:"space-between"}:{}},...Array.isArray(f)?f:f?[f]:[]],children:[o(i,{sx:{color:"text.secondary"},children:a}),e(r,{direction:"row",sx:{alignItems:"center",gap:1},children:[p&&o(p,{"aria-hidden":"true",sx:{color:x,fontSize:"lg"===d?40:"sm"===d?28:"xs"===d?22:34}}),o(t,{size:d,sx:m?{color:m}:void 0,children:n}),s&&o(l,{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.8.
|
|
1
|
+
const o="2.8.3";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -599,6 +599,10 @@ interface MetricStatProps {
|
|
|
599
599
|
icon?: typeof SvgIcon;
|
|
600
600
|
/** MUI theme colour token for the icon. Omit for default text colour. */
|
|
601
601
|
iconColor?: string;
|
|
602
|
+
/** Gap between the metric label and the value row. Defaults to 0.25. */
|
|
603
|
+
labelGap?: number | string;
|
|
604
|
+
/** Align the value row to the bottom when the metric has a constrained height. */
|
|
605
|
+
alignValueToBottom?: boolean;
|
|
602
606
|
sx?: SxProps<Theme>;
|
|
603
607
|
}
|
|
604
608
|
/**
|
|
@@ -613,7 +617,7 @@ interface MetricStatProps {
|
|
|
613
617
|
* large p — not a heading), and the delta is a Caption.
|
|
614
618
|
*/
|
|
615
619
|
declare const MetricStat: {
|
|
616
|
-
({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, sx, }: MetricStatProps): react.JSX.Element;
|
|
620
|
+
({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, alignValueToBottom, sx, }: MetricStatProps): react.JSX.Element;
|
|
617
621
|
displayName: string;
|
|
618
622
|
};
|
|
619
623
|
|
|
@@ -632,7 +636,7 @@ interface MetricCardProps extends MetricStatProps {
|
|
|
632
636
|
* ```
|
|
633
637
|
*/
|
|
634
638
|
declare const MetricCard: {
|
|
635
|
-
({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, cardSx, sx, }: MetricCardProps): react.JSX.Element;
|
|
639
|
+
({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, alignValueToBottom, cardSx, sx, }: MetricCardProps): react.JSX.Element;
|
|
636
640
|
displayName: string;
|
|
637
641
|
};
|
|
638
642
|
|