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.
package/dist/components/Card.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
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.
|
|
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;
|