it-data-nexus-ui-library 2.4.11 → 2.4.12
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{jsxs as r,jsx as e}from"react/jsx-runtime";import{Stack as i}from"./_Primitives/Stack.mjs";import{H4 as o,MetricValue as a,Caption as
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Stack as i}from"./_Primitives/Stack.mjs";import{H4 as o,MetricValue as a,Caption as l}from"./Typography.mjs";const t=({label:t,value:s,delta:c,deltaColor:m,valueColor:n,size:p,sx:d})=>r(i,{sx:[{gap:.25},...Array.isArray(d)?d:d?[d]:[]],children:[e(o,{children:t}),r(i,{direction:"row",sx:{alignItems:"baseline",gap:1},children:[e(a,{size:p,color:n,children:s}),c&&e(l,{component:"span",sx:m?{color:m}:void 0,children:c})]})]});t.displayName="MetricStat";export{t as MetricStat};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="2.4.
|
|
1
|
+
const o="2.4.12";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -562,6 +562,11 @@ interface MetricStatProps {
|
|
|
562
562
|
* Use `ragColorForDelta(delta)` from `it-data-nexus-ui-library` to derive this. Omit for neutral grey.
|
|
563
563
|
*/
|
|
564
564
|
deltaColor?: string;
|
|
565
|
+
/**
|
|
566
|
+
* MUI theme colour token for the value text (e.g. `'success.main'` / `'error.main'`).
|
|
567
|
+
* Use for RAG-coloured values where the colour carries meaning. Omit for default text colour.
|
|
568
|
+
*/
|
|
569
|
+
valueColor?: string;
|
|
565
570
|
/** Size passed to MetricValue. Defaults to 'md' (2rem / 32px). */
|
|
566
571
|
size?: MetricValueSize;
|
|
567
572
|
sx?: SxProps<Theme>;
|
|
@@ -578,7 +583,7 @@ interface MetricStatProps {
|
|
|
578
583
|
* large p — not a heading), and the delta is a Caption.
|
|
579
584
|
*/
|
|
580
585
|
declare const MetricStat: {
|
|
581
|
-
({ label, value, delta, deltaColor, size, sx }: MetricStatProps): react.JSX.Element;
|
|
586
|
+
({ label, value, delta, deltaColor, valueColor, size, sx }: MetricStatProps): react.JSX.Element;
|
|
582
587
|
displayName: string;
|
|
583
588
|
};
|
|
584
589
|
|