it-data-nexus-ui-library 2.4.0 → 2.4.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 e}from"react/jsx-runtime";import{Card as l,CardContent as a}from"@mui/material";import{MetricStat as r}from"./MetricStat.mjs";const t=({label:t,value:o,delta:i,deltaColor:m,size:d})=>e(l,{sx:{boxShadow:"none"},children:e(a,{sx:{p:1,"&:last-child":{pb:1}},children:e(r,{label:t,value:o,delta:i,deltaColor:m,size:d})})});t.displayName="MetricCard";export{t as MetricCard};
1
+ import{jsx as e}from"react/jsx-runtime";import{Card as l,CardContent as r}from"@mui/material";import{MetricStat as t}from"./MetricStat.mjs";const a={xs:0,sm:.3,md:.5,lg:1},o=({label:o,value:i,delta:m,deltaColor:d,size:s})=>{const c=a[s??"md"];return e(l,{sx:{boxShadow:"none"},children:e(r,{sx:{p:c,"&:last-child":{pb:c}},children:e(t,{label:o,value:i,delta:m,deltaColor:d,size:s})})})};o.displayName="MetricCard";export{o as MetricCard};
@@ -1 +1 @@
1
- import{jsx as a}from"react/jsx-runtime";import{Typography as t}from"@mui/material";import{forwardRef as r}from"react";const e=r((r,e)=>a(t,{ref:e,variant:"h1",...r}));e.displayName="H1";const i=r((r,e)=>a(t,{ref:e,variant:"h2",...r}));i.displayName="H2";const n=r((r,e)=>a(t,{ref:e,variant:"h3",...r}));n.displayName="H3";const o=r((r,e)=>a(t,{ref:e,variant:"h4",...r}));o.displayName="H4";const m=r((r,e)=>a(t,{ref:e,variant:"actionBarTitle",component:"h1",...r}));m.displayName="ActionBarTitle";const s=r((r,e)=>a(t,{ref:e,variant:"body1",...r}));s.displayName="Body1";const p=r((r,e)=>a(t,{ref:e,variant:"chatWindowBody",...r}));p.displayName="ChatWindowBody";const c=r((r,e)=>a(t,{ref:e,variant:"body2",...r}));c.displayName="Body2";const d=r((r,e)=>a(t,{ref:e,variant:"caption",...r}));d.displayName="Caption";const y=r((r,e)=>a(t,{ref:e,variant:"inherit",component:"span",...r}));y.displayName="Span";const l={sm:"1.5rem",md:"2rem",lg:"2.5rem"},f=r(({size:r="md",sx:e,...i},n)=>a(t,{ref:n,component:"p",sx:[{fontSize:l[r],fontWeight:700,lineHeight:1.1,letterSpacing:"-0.02em",color:"text.primary",margin:0},...Array.isArray(e)?e:e?[e]:[]],...i}));f.displayName="MetricValue";export{m as ActionBarTitle,s as Body1,c as Body2,d as Caption,p as ChatWindowBody,e as H1,i as H2,n as H3,o as H4,f as MetricValue,y as Span};
1
+ import{jsx as a}from"react/jsx-runtime";import{Typography as t}from"@mui/material";import{forwardRef as r}from"react";const e=r((r,e)=>a(t,{ref:e,variant:"h1",...r}));e.displayName="H1";const i=r((r,e)=>a(t,{ref:e,variant:"h2",...r}));i.displayName="H2";const n=r((r,e)=>a(t,{ref:e,variant:"h3",...r}));n.displayName="H3";const o=r((r,e)=>a(t,{ref:e,variant:"h4",...r}));o.displayName="H4";const m=r((r,e)=>a(t,{ref:e,variant:"actionBarTitle",component:"h1",...r}));m.displayName="ActionBarTitle";const s=r((r,e)=>a(t,{ref:e,variant:"body1",...r}));s.displayName="Body1";const p=r((r,e)=>a(t,{ref:e,variant:"chatWindowBody",...r}));p.displayName="ChatWindowBody";const c=r((r,e)=>a(t,{ref:e,variant:"body2",...r}));c.displayName="Body2";const d=r((r,e)=>a(t,{ref:e,variant:"caption",...r}));d.displayName="Caption";const y=r((r,e)=>a(t,{ref:e,variant:"inherit",component:"span",...r}));y.displayName="Span";const l={xs:"1.1rem",sm:"1.5rem",md:"2rem",lg:"2.5rem"},f=r(({size:r="md",sx:e,...i},n)=>a(t,{ref:n,component:"p",sx:[{fontSize:l[r],fontWeight:700,lineHeight:1.1,letterSpacing:"-0.02em",color:"text.primary",margin:0},...Array.isArray(e)?e:e?[e]:[]],...i}));f.displayName="MetricValue";export{m as ActionBarTitle,s as Body1,c as Body2,d as Caption,p as ChatWindowBody,e as H1,i as H2,n as H3,o as H4,f as MetricValue,y as Span};
@@ -1 +1 @@
1
- const o="2.4.0";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.4.2";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -541,7 +541,7 @@ declare const ChatWindowBody: react.ForwardRefExoticComponent<Omit<Props, "ref">
541
541
  declare const Body2: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
542
542
  declare const Caption: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
543
543
  declare const Span: react.ForwardRefExoticComponent<Omit<Props, "ref"> & react.RefAttributes<HTMLElement>>;
544
- type MetricValueSize = "sm" | "md" | "lg";
544
+ type MetricValueSize = "xs" | "sm" | "md" | "lg";
545
545
  type MetricValueProps = Omit<TypographyProps, "variant"> & {
546
546
  size?: MetricValueSize;
547
547
  };
@@ -581,15 +581,15 @@ declare const MetricStat: {
581
581
 
582
582
  type MetricCardProps = MetricStatProps;
583
583
  /**
584
- * A MetricStat inside a solid Card with 8px padding. Use inside GlassCard or
585
- * GlassPaper where metric values need a solid background to remain readable.
584
+ * A MetricStat inside a solid Card. Padding scales down for `size="xs"`.
585
+ * Use inside GlassCard or GlassPaper where metric values need a solid background to remain readable.
586
586
  *
587
587
  * ```tsx
588
588
  * <MetricCard label="Monthly Active Users" value="1.35M" delta="+13%" deltaColor={ragColorForDelta('+13%')} />
589
589
  * ```
590
590
  */
591
591
  declare const MetricCard: {
592
- ({ label, value, delta, deltaColor, size }: MetricCardProps): react.JSX.Element;
592
+ ({ label, value, delta, deltaColor, size, }: MetricCardProps): react.JSX.Element;
593
593
  displayName: string;
594
594
  };
595
595
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",