it-data-nexus-ui-library 2.8.0 → 2.8.1

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 r}from"react/jsx-runtime";import{Card as e,CardContent as l}from"@mui/material";import{MetricStat as a}from"./MetricStat.mjs";const o={xs:0,sm:.3,md:.5,lg:1},t=({label:t,value:i,delta:s,deltaColor:m,valueColor:d,size:c,cardSx:x,sx:n})=>{const p=o[c??"md"];return r(e,{sx:[{boxShadow:"none"},...Array.isArray(x)?x:x?[x]:[]],children:r(l,{sx:{p:p,"&:last-child":{pb:p}},children:r(a,{label:t,value:i,delta:s,deltaColor:m,valueColor:d,size:c,sx:n})})})};t.displayName="MetricCard";export{t as MetricCard};
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 +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 a,Caption as l}from"./Typography.mjs";const s=({label:s,value:t,delta:c,deltaColor:n,valueColor:m,size:d,sx:p})=>r(e,{sx:[{gap:.25},...Array.isArray(p)?p:p?[p]:[]],children:[o(i,{sx:{color:"text.secondary"},children:s}),r(e,{direction:"row",sx:{alignItems:"baseline",gap:1},children:[o(a,{size:d,sx:m?{color:m}:void 0,children:t}),c&&o(l,{component:"span",sx:n?{color:n}:void 0,children:c})]})]});s.displayName="MetricStat";export{s as MetricStat};
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 +1 @@
1
- const o="2.8.0";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.8.1";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { AlertProps, BoxProps, SxProps as SxProps$1, Theme as Theme$1, Typograph
4
4
  export { AlertProps, AlertTitle, BoxProps, ButtonBaseProps, CheckboxProps, ChipProps, CircularProgressProps, CollapseProps, ContainerProps, DialogActionsProps, DialogContentProps, DialogContentTextProps, DialogProps, DialogTitleProps, DividerProps, FormControlLabelProps, FormGroupProps, GridProps, MenuItem, PaperProps, SliderProps, StackProps, SwitchProps, TabProps, TableBodyProps, TableCellProps, TableHeadProps, TableProps, TableRowProps, TabsProps, TextFieldProps, Theme, alpha, useMediaQuery, useTheme } from '@mui/material';
5
5
  import { SxProps, Theme } from '@mui/material/styles';
6
6
  import { Components } from 'react-markdown';
7
+ import SvgIcon from '@mui/material/SvgIcon';
7
8
  import { DataGridProps } from '@mui/x-data-grid';
8
9
  export { DataGridProps, GridColDef, GridColumnVisibilityModel, GridPaginationModel, GridRenderCellParams, GridRowsProp, GridSortModel, GridValueGetter } from '@mui/x-data-grid';
9
10
  import { SxProps as SxProps$2 } from '@mui/system';
@@ -594,6 +595,10 @@ interface MetricStatProps {
594
595
  valueColor?: string;
595
596
  /** Size passed to MetricValue. Defaults to 'md' (2rem / 32px). */
596
597
  size?: MetricValueSize;
598
+ /** Optional icon rendered horizontally beside the metric value. */
599
+ icon?: typeof SvgIcon;
600
+ /** MUI theme colour token for the icon. Omit for default text colour. */
601
+ iconColor?: string;
597
602
  sx?: SxProps<Theme>;
598
603
  }
599
604
  /**
@@ -608,7 +613,7 @@ interface MetricStatProps {
608
613
  * large p — not a heading), and the delta is a Caption.
609
614
  */
610
615
  declare const MetricStat: {
611
- ({ label, value, delta, deltaColor, valueColor, size, sx }: MetricStatProps): react.JSX.Element;
616
+ ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, sx, }: MetricStatProps): react.JSX.Element;
612
617
  displayName: string;
613
618
  };
614
619
 
@@ -627,7 +632,7 @@ interface MetricCardProps extends MetricStatProps {
627
632
  * ```
628
633
  */
629
634
  declare const MetricCard: {
630
- ({ label, value, delta, deltaColor, valueColor, size, cardSx, sx, }: MetricCardProps): react.JSX.Element;
635
+ ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, cardSx, sx, }: MetricCardProps): react.JSX.Element;
631
636
  displayName: string;
632
637
  };
633
638
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",