it-data-nexus-ui-library 2.8.1 → 2.8.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.
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Card as r,CardContent as l}from"@mui/material";import{MetricStat as e}from"./MetricStat.mjs";const a={xs:0,sm:.3,md:.5,lg:1},i=({label:i,value:t,delta:s,deltaColor:m,valueColor:c,size:d,icon:n,iconColor:x,cardSx:p,sx:u})=>{const C=a[d??"md"];return o(r,{sx:[{boxShadow:"none"},...Array.isArray(p)?p:p?[p]:[]],children:o(l,{sx:{p:C,"&:last-child":{pb:C}},children:o(e,{label:i,value:t,delta:s,deltaColor:m,valueColor:c,size:d,icon:n,iconColor:x,sx:u})})})};i.displayName="MetricCard";export{i as MetricCard};
1
+ import{jsx as l}from"react/jsx-runtime";import{Card as o,CardContent as r}from"@mui/material";import{MetricStat as a}from"./MetricStat.mjs";const e={xs:0,sm:.3,md:.5,lg:1},i=({label:i,value:t,delta:s,deltaColor:m,valueColor:c,size:d,icon:n,iconColor:p,labelGap:x,cardSx:u,sx:C})=>{const b=e[d??"md"];return l(o,{sx:[{boxShadow:"none"},...Array.isArray(u)?u:u?[u]:[]],children:l(r,{sx:{p:b,"&:last-child":{pb:b}},children:l(a,{label:i,value:t,delta:s,deltaColor:m,valueColor:c,size:d,icon:n,iconColor:p,labelGap:x,sx:C})})})};i.displayName="MetricCard";export{i as MetricCard};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as o}from"react/jsx-runtime";import{Stack as e}from"./_Primitives/Stack.mjs";import{H4 as i,MetricValue as l,Caption as t}from"./Typography.mjs";const a=({label:a,value:s,delta:n,deltaColor:c,valueColor:d,size:m,icon:x,iconColor:p,sx:h})=>r(e,{sx:[{gap:.25},...Array.isArray(h)?h:h?[h]:[]],children:[o(i,{sx:{color:"text.secondary"},children:a}),r(e,{direction:"row",sx:{alignItems:"center",gap:1},children:[x&&o(x,{"aria-hidden":"true",sx:{color:p,fontSize:"lg"===m?40:"sm"===m?28:"xs"===m?22:34}}),o(l,{size:m,sx:d?{color:d}:void 0,children:s}),n&&o(t,{component:"span",sx:[{alignSelf:"flex-end"},...c?[{color:c}]:[]],children:n})]})]});a.displayName="MetricStat";export{a as MetricStat};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Stack as o}from"./_Primitives/Stack.mjs";import{H4 as i,MetricValue as l,Caption as a}from"./Typography.mjs";const t=({label:t,value:s,delta:n,deltaColor:c,valueColor:d,size:m,icon:p,iconColor:x,labelGap:h=.25,sx:f})=>r(o,{sx:[{gap:h},...Array.isArray(f)?f:f?[f]:[]],children:[e(i,{sx:{color:"text.secondary"},children:t}),r(o,{direction:"row",sx:{alignItems:"center",gap:1},children:[p&&e(p,{"aria-hidden":"true",sx:{color:x,fontSize:"lg"===m?40:"sm"===m?28:"xs"===m?22:34}}),e(l,{size:m,sx:d?{color:d}:void 0,children:s}),n&&e(a,{component:"span",sx:[{alignSelf:"flex-end",pb:.25},...c?[{color:c}]:[]],children:n})]})]});t.displayName="MetricStat";export{t as MetricStat};
@@ -1 +1 @@
1
- const o="2.8.1";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.8.2";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -599,6 +599,8 @@ 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;
602
604
  sx?: SxProps<Theme>;
603
605
  }
604
606
  /**
@@ -613,7 +615,7 @@ interface MetricStatProps {
613
615
  * large p — not a heading), and the delta is a Caption.
614
616
  */
615
617
  declare const MetricStat: {
616
- ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, sx, }: MetricStatProps): react.JSX.Element;
618
+ ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, sx, }: MetricStatProps): react.JSX.Element;
617
619
  displayName: string;
618
620
  };
619
621
 
@@ -632,7 +634,7 @@ interface MetricCardProps extends MetricStatProps {
632
634
  * ```
633
635
  */
634
636
  declare const MetricCard: {
635
- ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, cardSx, sx, }: MetricCardProps): react.JSX.Element;
637
+ ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, cardSx, sx, }: MetricCardProps): react.JSX.Element;
636
638
  displayName: string;
637
639
  };
638
640
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",