sage-nexus-ui 1.7.1 → 1.7.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{jsxs as e,jsx as r}from"react/jsx-runtime";import{useId as t}from"react";import{LineChart as i,AnimatedArea as o}from"@mui/x-charts/LineChart";import{colours as s}from"../theme/tokens.mjs";const a=[s.brilliantGreen,s.jade,s.teal,s.amber,s.terra,s.navy,s.cyan,s.blue];function n(e){return function(t){const i=t.ownerState?.seriesId,s=i?e.get(i):void 0;return r(o,{...t,ownerState:s?{...t.ownerState,gradientId:s}:t.ownerState})}}function p({sx:o,xAxis:s,grid:p,series:l=[],slots:c,children:m,...d}){const f=t().replace(/:/g,""),x=s?.map(e=>({scaleType:"point",...e})),h=l.map((e,r)=>e.area&&!e.id?{...e,id:`${f}s${r}`}:e),u=new Map(h.map((e,r)=>({s:e,i:r})).filter(({s:e})=>e.area).map(({s:e,i:r})=>[e.id,`${f}g${r}`]));return e(i,{colors:a,xAxis:x,grid:p??{horizontal:!0,vertical:!0},series:h,slots:{area:n(u),...c},sx:o,...d,children:[u.size>0&&r("defs",{children:Array.from(u.entries()).map(([t],i)=>e("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[r("stop",{offset:"0%",stopColor:a[i%a.length],stopOpacity:.4}),r("stop",{offset:"100%",stopColor:a[i%a.length],stopOpacity:0})]},t))}),m]})}export{p as NexusLineChart};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useId as t,useRef as o,useMemo as i}from"react";import{AnimatedArea as s,LineChart as a}from"@mui/x-charts/LineChart";import{colours as n}from"../theme/tokens.mjs";const c=[n.brilliantGreen,n.jade,n.teal,n.amber,n.terra,n.navy,n.cyan,n.blue];function p({sx:n,xAxis:p,grid:l,series:m=[],slots:d,children:f,...x}){const h=t().replace(/:/g,""),u=p?.map(e=>({scaleType:"point",...e})),g=m.map((e,r)=>e.area&&!e.id?{...e,id:`${h}s${r}`}:e),y=new Map(g.map((e,r)=>({s:e,i:r})).filter(({s:e})=>e.area).map(({s:e,i:r})=>[e.id,`${h}g${r}`])),w=o(y);w.current=y;const S=i(()=>function(r){const t=r.ownerState?.seriesId,o=t?w.current.get(t):void 0;return e(s,{...r,ownerState:o?{...r.ownerState,gradientId:o}:r.ownerState})},[h]);return r(a,{colors:c,xAxis:u,grid:l??{horizontal:!0,vertical:!0},series:g,slots:{area:S,...d},sx:n,...x,children:[y.size>0&&e("defs",{children:Array.from(y.entries()).map(([,t],o)=>r("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"0%",stopColor:c[o%c.length],stopOpacity:.4}),e("stop",{offset:"100%",stopColor:c[o%c.length],stopOpacity:0})]},t))}),f]})}export{p as NexusLineChart};
@@ -1 +1 @@
1
- const o="1.7.1";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.7.2";export{o as SAGE_NEXUS_UI_VERSION};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",