it-data-nexus-ui-library 2.8.2 → 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 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
+ 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 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
+ 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.2";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.8.3";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -601,6 +601,8 @@ interface MetricStatProps {
601
601
  iconColor?: string;
602
602
  /** Gap between the metric label and the value row. Defaults to 0.25. */
603
603
  labelGap?: number | string;
604
+ /** Align the value row to the bottom when the metric has a constrained height. */
605
+ alignValueToBottom?: boolean;
604
606
  sx?: SxProps<Theme>;
605
607
  }
606
608
  /**
@@ -615,7 +617,7 @@ interface MetricStatProps {
615
617
  * large p — not a heading), and the delta is a Caption.
616
618
  */
617
619
  declare const MetricStat: {
618
- ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, sx, }: MetricStatProps): react.JSX.Element;
620
+ ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, alignValueToBottom, sx, }: MetricStatProps): react.JSX.Element;
619
621
  displayName: string;
620
622
  };
621
623
 
@@ -634,7 +636,7 @@ interface MetricCardProps extends MetricStatProps {
634
636
  * ```
635
637
  */
636
638
  declare const MetricCard: {
637
- ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, cardSx, sx, }: MetricCardProps): react.JSX.Element;
639
+ ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, alignValueToBottom, cardSx, sx, }: MetricCardProps): react.JSX.Element;
638
640
  displayName: string;
639
641
  };
640
642
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",