it-data-nexus-ui-library 2.8.0 → 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 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 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 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 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.0";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
@@ -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,12 @@ 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;
602
+ /** Gap between the metric label and the value row. Defaults to 0.25. */
603
+ labelGap?: number | string;
597
604
  sx?: SxProps<Theme>;
598
605
  }
599
606
  /**
@@ -608,7 +615,7 @@ interface MetricStatProps {
608
615
  * large p — not a heading), and the delta is a Caption.
609
616
  */
610
617
  declare const MetricStat: {
611
- ({ label, value, delta, deltaColor, valueColor, size, sx }: MetricStatProps): react.JSX.Element;
618
+ ({ label, value, delta, deltaColor, valueColor, size, icon: Icon, iconColor, labelGap, sx, }: MetricStatProps): react.JSX.Element;
612
619
  displayName: string;
613
620
  };
614
621
 
@@ -627,7 +634,7 @@ interface MetricCardProps extends MetricStatProps {
627
634
  * ```
628
635
  */
629
636
  declare const MetricCard: {
630
- ({ label, value, delta, deltaColor, valueColor, size, cardSx, sx, }: MetricCardProps): react.JSX.Element;
637
+ ({ label, value, delta, deltaColor, valueColor, size, icon, iconColor, labelGap, cardSx, sx, }: MetricCardProps): react.JSX.Element;
631
638
  displayName: string;
632
639
  };
633
640
 
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.2",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",