it-data-nexus-ui-library 2.9.2 → 2.9.4

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 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
+ 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 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
+ 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 a,Caption as l}from"./Typography.mjs";const t=({label:t,value:n,delta:s,deltaColor:c,valueColor:m,size:p,icon:d,iconColor:x,iconSize:h,valueRowGap:g=1,labelGap:u=.25,alignValueToBottom:y=!1,sx:f})=>e(r,{sx:[{gap:u,...y?{height:"100%",justifyContent:"space-between"}:{}},...Array.isArray(f)?f:f?[f]:[]],children:[o(i,{sx:{color:"text.secondary"},children:t}),e(r,{direction:"row",sx:{alignItems:"baseline",gap:g},children:[d&&o(d,{"aria-hidden":"true",sx:{alignSelf:"center",color:x,fontSize:h??("lg"===p?40:"sm"===p?28:"xs"===p?22:34)}}),o(a,{size:p,sx:m?{color:m}:void 0,children:n}),s&&o(l,{component:"span",sx:[...c?[{color:c}]:[]],children:s})]})]});t.displayName="MetricStat";export{t as MetricStat};
@@ -1 +1 @@
1
- const o="2.9.2";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.9.4";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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.9.2",
3
+ "version": "2.9.4",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",