it-data-nexus-ui-library 2.9.5 → 2.9.6

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 e,jsxs as r,Fragment as i}from"react/jsx-runtime";import{Card as o,CardContent as t,Box as l}from"@mui/material";import{useTheme as n}from"@mui/material/styles";import{H4 as a,MetricValue as s,Body2 as d}from"./Typography.mjs";import{colours as c}from"./Theme/tokens.mjs";const m=({icon:m,label:p,value:x,subtext:h,trend:f="flat",sx:y,children:u,...g})=>{const v=n(),b={up:c.jade,flat:v.palette.text.secondary,down:c.cherry},j=void 0!==m||void 0!==p||void 0!==x||void 0!==h;return e(o,{...g,sx:[{boxShadow:"none"},...Array.isArray(y)?y:y?[y]:[]],children:e(t,{sx:{display:"flex",flexDirection:"column",gap:.5,"&:last-child":{pb:2}},children:j?r(i,{children:[(m||p)&&r(l,{sx:{display:"flex",alignItems:"center",gap:.75},children:[m&&e(l,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",color:"text.secondary"},children:m}),p&&e(a,{children:p})]}),x&&e(s,{children:x}),h&&e(d,{sx:{color:b[f]},children:h})]}):u})})};export{m as Card};
1
+ import{jsx as r,jsxs as e,Fragment as i}from"react/jsx-runtime";import{Card as t,CardContent as o,Box as l}from"@mui/material";import{useTheme as n}from"@mui/material/styles";import{H4 as a,MetricValue as s,Body2 as c}from"./Typography.mjs";import{colours as d}from"./Theme/tokens.mjs";const m=({icon:m,label:x,value:p,subtext:h,trend:y="flat",sx:f,contentSx:u,children:g,...v})=>{const b=n(),j={up:d.jade,flat:b.palette.text.secondary,down:d.cherry},A=void 0!==m||void 0!==x||void 0!==p||void 0!==h;return r(t,{...v,sx:[{boxShadow:"none"},...Array.isArray(f)?f:f?[f]:[]],children:r(o,{sx:[{display:"flex",flexDirection:"column",gap:.5,"&:last-child":{pb:2}},...Array.isArray(u)?u:u?[u]:[]],children:A?e(i,{children:[(m||x)&&e(l,{sx:{display:"flex",alignItems:"center",gap:.75},children:[m&&r(l,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",color:"text.secondary"},children:m}),x&&r(a,{children:x})]}),p&&r(s,{children:p}),h&&r(c,{sx:{color:j[y]},children:h})]}):g})})};export{m as Card};
@@ -1 +1 @@
1
- const o="2.9.5";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.9.6";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -765,8 +765,15 @@ interface CardProps extends CardProps$1 {
765
765
  subtext?: string;
766
766
  /** Controls the colour of subtext. */
767
767
  trend?: CardTrend;
768
+ /**
769
+ * `sx` applied directly to the inner `CardContent`. Use this (not a
770
+ * `sx={{ "& .MuiCardContent-root": ... }}` selector on `Card`) to override
771
+ * the default padding — a selector targeting the class can lose to the
772
+ * `&:last-child` padding rule depending on style-injection order.
773
+ */
774
+ contentSx?: SxProps<Theme>;
768
775
  }
769
- declare const Card: ({ icon, label, value, subtext, trend, sx, children, ...rest }: CardProps) => react.JSX.Element;
776
+ declare const Card: ({ icon, label, value, subtext, trend, sx, contentSx, children, ...rest }: CardProps) => react.JSX.Element;
770
777
 
771
778
  type AiCardProps = CardProps;
772
779
  declare const AiCard: ({ sx, children, ...rest }: AiCardProps) => react.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.9.5",
3
+ "version": "2.9.6",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",