it-data-nexus-ui-library 2.10.16 → 2.10.18

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 i,jsxs as e}from"react/jsx-runtime";import{alpha as r}from"@mui/material/styles";import{AiCard as t}from"./AiCard.mjs";import{ButtonBase as o}from"./Buttons/ButtonBase.mjs";import{Card as s}from"./Card.mjs";import{H2 as a,H3 as d}from"./Typography.mjs";import{Stack as n}from"./_Primitives/Stack.mjs";import l from"@mui/material/Box";const x=i=>Array.isArray(i)?i:i?[i]:[],m=({ai:m=!1,title:p,subtitle:h,maxWidth:c=350,display:f=!1,icon:u,headerAdornment:b,children:y,footer:g,sx:v,cardSx:S,contentSx:w,headerSx:C,headerAdornmentSx:j,iconSx:A,titleSx:R,subtitleSx:B,bodySx:I,footerSx:W,...D})=>{const $=m?t:s;return i(o,{...D,sx:[{alignItems:"stretch",borderRadius:f?{xs:2,sm:4}:1,maxWidth:c,textAlign:"left",transition:"filter .18s ease","&:hover > div":{boxShadow:i=>`0 8px 20px ${r(i.palette.text.primary,.12)}, 0 1px 3px ${r(i.palette.text.primary,.07)}`,borderColor:i=>r(i.palette.primary.main,.7)},"&:active":{filter:"brightness(.98)",transitionDuration:".08s"},"&:active > div":{boxShadow:i=>`0 2px 6px ${r(i.palette.text.primary,.1)}`,transitionDuration:".08s"},"&:focus-visible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:3},"&.Mui-disabled":{opacity:.5},"& > div":{display:"flex",width:"100%",height:"100%",transition:"box-shadow .18s ease, border-color .18s ease",borderRadius:f?{xs:2,sm:4}:void 0},"& > div::before":{borderRadius:f?{xs:2,sm:4}:void 0},"& > div::after":{borderRadius:f?{xs:2,sm:4}:void 0}},...x(v)],children:i($,{sx:[{width:"100%",height:"100%",borderRadius:f?{xs:2,sm:4}:void 0,border:m?"none":"1px solid",borderColor:m?void 0:i=>r(i.palette.primary.main,.5),"& .MuiCardContent-root":{display:"flex",width:"100%",height:"100%",flexDirection:"column"}},...x(S)],children:e(n,{sx:[{width:"100%",height:"100%",gap:1.5},...x(w)],children:[e(n,{direction:"row",sx:[{alignItems:"flex-start",justifyContent:"space-between",gap:1,flexWrap:"wrap"},...x(C)],children:[e(n,{direction:"row",sx:{alignItems:"center",gap:1,minWidth:0},children:[u&&i(l,{sx:[{display:"flex",alignItems:"center",flexShrink:0},...x(A)],children:u}),i(a,{sx:R,children:p})]}),b&&i(l,{sx:j,children:b})]}),h&&i(d,{sx:[{color:"text.secondary"},...x(B)],children:h}),y&&i(n,{sx:[{gap:1},...x(I)],children:y}),g&&i(n,{sx:[{mt:"auto"},...x(W)],children:g})]})})})},p=e=>i(m,{...e}),h=e=>i(m,{...e,ai:!0});export{h as AiButtonTile,p as ButtonTile};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{alpha as t}from"@mui/material/styles";import{AiCard as r}from"./AiCard.mjs";import{ButtonBase as o}from"./Buttons/ButtonBase.mjs";import{Card as a}from"./Card.mjs";import{H2 as s,H3 as d}from"./Typography.mjs";import{Stack as n}from"./_Primitives/Stack.mjs";import l from"@mui/material/Box";const m=e=>Array.isArray(e)?e:e?[e]:[],x=({ai:x=!1,title:p,subtitle:h,maxWidth:c=350,display:f=!1,icon:u,headerAdornment:b,children:y,footer:g,sx:v,cardSx:S,contentSx:w,headerSx:C,headerAdornmentSx:j,iconSx:A,titleSx:R,subtitleSx:k,bodySx:B,footerSx:I,...W})=>{const D=x?r:a;return e(o,{...W,sx:[{alignItems:"stretch",borderRadius:f?{xs:2,sm:4}:1,maxWidth:c,textAlign:"left",transition:"filter .18s ease","&:hover > div":{boxShadow:e=>`0 8px 20px ${t(e.palette.text.primary,.12)}, 0 1px 3px ${t(e.palette.text.primary,.07)}`,borderColor:e=>t(e.palette.primary.main,"dark"===e.palette.mode?.7:.3)},"&:active":{filter:"brightness(.98)",transitionDuration:".08s"},"&:active > div":{boxShadow:e=>`0 2px 6px ${t(e.palette.text.primary,.1)}`,transitionDuration:".08s"},"&:focus-visible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:3},"&.Mui-disabled":{opacity:.5},"& > div":{display:"flex",width:"100%",height:"100%",transition:"box-shadow .18s ease, border-color .18s ease",borderRadius:f?{xs:2,sm:4}:void 0},"& > div::before":{borderRadius:f?{xs:2,sm:4}:void 0},"& > div::after":{borderRadius:f?{xs:2,sm:4}:void 0}},...m(v)],children:e(D,{sx:[{width:"100%",height:"100%",borderRadius:f?{xs:2,sm:4}:void 0,border:x?"none":"1px solid",borderColor:x?void 0:e=>t(e.palette.primary.main,"dark"===e.palette.mode?.4:.2),"& .MuiCardContent-root":{display:"flex",width:"100%",height:"100%",flexDirection:"column"}},...m(S)],children:i(n,{sx:[{width:"100%",height:"100%",gap:1.5},...m(w)],children:[i(n,{direction:"row",sx:[{alignItems:"flex-start",justifyContent:"space-between",gap:1,flexWrap:"wrap"},...m(C)],children:[i(n,{direction:"row",sx:{alignItems:"center",gap:1,minWidth:0},children:[u&&e(l,{sx:[{display:"flex",alignItems:"center",flexShrink:0},...m(A)],children:u}),e(s,{sx:R,children:p})]}),b&&e(l,{sx:j,children:b})]}),h&&e(d,{sx:[{color:"text.secondary"},...m(k)],children:h}),y&&e(n,{sx:[{gap:1},...m(B)],children:y}),g&&e(n,{sx:[{mt:"auto"},...m(I)],children:g})]})})})},p=i=>e(x,{...i}),h=i=>e(x,{...i,ai:!0});export{h as AiButtonTile,p as ButtonTile};
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,Children as o,useState as i,useCallback as n,useEffect as l}from"react";import s from"@mui/icons-material/ChevronLeftRounded";import a from"@mui/icons-material/ChevronRightRounded";import c from"@mui/material/Box";import{Stack as d}from"./_Primitives/Stack.mjs";import{IconButton as m}from"./Buttons/IconButton.mjs";import{Caption as u}from"./Typography.mjs";const f={xs:1,sm:2,md:3,lg:4},h=["xs","sm","md","lg"],p={disableRipple:!0,disableFocusRipple:!0,sx:e=>({"&.Mui-focusVisible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2}})},b=({children:b,"aria-label":g,itemsPerView:x,gap:v=2.5,previousLabel:y="Previous",nextLabel:$="Next",itemLabel:w,itemsPerGroup:A=1,sx:L})=>{const S=r(null),W=r(null),j=r(null),B=o.toArray(b),R=B.length,[C,O]=i({start:!0,end:!0}),[k,E]=i(new Set),I=n(()=>{const e=S.current;e&&O({start:e.scrollLeft<=2,end:e.scrollLeft+e.clientWidth>=e.scrollWidth-2})},[]);l(()=>{const e=S.current;if(!e)return;I();const t=new ResizeObserver(I);t.observe(e),e.addEventListener("scroll",I,{passive:!0});const r=new Set,o=new IntersectionObserver(e=>{for(const t of e){const e=Number(t.target.dataset.index);t.intersectionRatio>=.5?r.add(e):r.delete(e)}E(new Set(r))},{root:e,threshold:[0,.5,1]});for(const t of Array.from(e.children))o.observe(t);return()=>{t.disconnect(),o.disconnect(),e.removeEventListener("scroll",I)}},[R,I]),l(()=>{Array.from(S.current?.children??[]).forEach((e,t)=>{e.toggleAttribute("inert",k.size>0&&!k.has(t))})},[k,R]),l(()=>{const e=C.end?"next":C.start?"previous":null;if(e&&j.current===e){const t="next"===e?"previous":"next";W.current?.querySelector(`[data-control="${t}"]:not(:disabled)`)?.focus()}},[C]);const M=e=>{const t=S.current,r=t?.children[0];if(!t||!r)return;const o=t.children[1],i=o?o.offsetLeft-r.offsetLeft:r.offsetWidth;t.scrollBy({left:e*i,behavior:"undefined"!=typeof window&&Boolean(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)?"instant":"smooth"})},P=Array.from(k).sort((e,t)=>e-t),F=R*A,N=0===P.length?"":1===P.length?`Showing ${P[0]*A+1} of ${F}`:`Showing ${P[0]*A+1}–${Math.min((P[P.length-1]+1)*A,F)} of ${F}`,z=x&&Object.keys(x).length>0?x:f,T={xs:h.map(e=>z[e]).find(e=>void 0!==e),...z},V=e=>Object.fromEntries(Object.entries(T).filter(e=>void 0!==e[1]).map(([t,r])=>[t,`calc((100% - ${e.spacing(v)} * ${r-1}) / ${r})`]));return e(d,{sx:[{gap:1.5,minWidth:0,maxWidth:"100%"},...Array.isArray(L)?L:L?[L]:[]],children:[t(c,{ref:S,role:"region","aria-label":g,tabIndex:0,sx:e=>({display:"grid",gridAutoFlow:"column",gridAutoColumns:V(e),gap:v,minWidth:0,overflowX:"auto",overscrollBehaviorX:"contain",scrollSnapType:"x mandatory",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},scrollBehavior:"smooth","@media (prefers-reduced-motion: reduce)":{scrollBehavior:"auto"},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2,borderRadius:1}}),children:B.map((e,r)=>t(c,{"data-index":r,role:"group","aria-roledescription":"slide","aria-label":A>1?`${r*A+1}–${Math.min((r+1)*A,F)} of ${F}`:`${r+1} of ${R}`,sx:{minWidth:0,scrollSnapAlign:"start"},children:e},r))}),e(d,{ref:W,direction:"row",onFocus:e=>{j.current=e.target.dataset.control??null},sx:{justifyContent:"center",alignItems:"center",gap:1.5},children:[t(m,{...p,"data-control":"previous",title:y,onClick:()=>M(-1),disabled:C.start,children:t(s,{})}),t(u,{"aria-live":"polite",sx:{minWidth:"9ch",textAlign:"center"},children:w?N?`${N} ${w}`:`${F} ${w}`:N}),t(m,{...p,"data-control":"next",title:$,onClick:()=>M(1),disabled:C.end,children:t(a,{})})]})]})};b.displayName="Carousel";export{b as Carousel};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,Children as o,useState as i,useCallback as n,useEffect as l}from"react";import s from"@mui/icons-material/ChevronLeftRounded";import a from"@mui/icons-material/ChevronRightRounded";import c from"@mui/material/Box";import{Stack as d}from"./_Primitives/Stack.mjs";import{IconButton as m}from"./Buttons/IconButton.mjs";import{Caption as u}from"./Typography.mjs";const f={xs:1,sm:2,md:3,lg:4},h=["xs","sm","md","lg","xl"],p={disableRipple:!0,disableFocusRipple:!0,sx:e=>({"&.Mui-focusVisible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2}})},b=({children:b,"aria-label":g,itemsPerView:x,gap:v=2.5,previousLabel:y="Previous",nextLabel:$="Next",itemLabel:w,itemsPerGroup:A=1,sx:L})=>{const S=r(null),W=r(null),j=r(null),B=o.toArray(b),R=B.length,[C,O]=i({start:!0,end:!0}),[k,E]=i(new Set),I=n(()=>{const e=S.current;e&&O({start:e.scrollLeft<=2,end:e.scrollLeft+e.clientWidth>=e.scrollWidth-2})},[]);l(()=>{const e=S.current;if(!e)return;I();const t=new ResizeObserver(I);t.observe(e),e.addEventListener("scroll",I,{passive:!0});const r=new Set,o=new IntersectionObserver(e=>{for(const t of e){const e=Number(t.target.dataset.index);t.intersectionRatio>=.5?r.add(e):r.delete(e)}E(new Set(r))},{root:e,threshold:[0,.5,1]});for(const t of Array.from(e.children))o.observe(t);return()=>{t.disconnect(),o.disconnect(),e.removeEventListener("scroll",I)}},[R,I]),l(()=>{Array.from(S.current?.children??[]).forEach((e,t)=>{e.toggleAttribute("inert",k.size>0&&!k.has(t))})},[k,R]),l(()=>{const e=C.end?"next":C.start?"previous":null;if(e&&j.current===e){const t="next"===e?"previous":"next";W.current?.querySelector(`[data-control="${t}"]:not(:disabled)`)?.focus()}},[C]);const M=e=>{const t=S.current,r=t?.children[0];if(!t||!r)return;const o=t.children[1],i=o?o.offsetLeft-r.offsetLeft:r.offsetWidth;t.scrollBy({left:e*i,behavior:"undefined"!=typeof window&&Boolean(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)?"instant":"smooth"})},P=Array.from(k).sort((e,t)=>e-t),F=R*A,N=0===P.length?"":1===P.length?`Showing ${P[0]*A+1} of ${F}`:`Showing ${P[0]*A+1}–${Math.min((P[P.length-1]+1)*A,F)} of ${F}`,z=x&&Object.keys(x).length>0?x:f,T={xs:h.map(e=>z[e]).find(e=>void 0!==e),...z},V=e=>Object.fromEntries(Object.entries(T).filter(e=>void 0!==e[1]).map(([t,r])=>[t,`calc((100% - ${e.spacing(v)} * ${r-1}) / ${r})`]));return e(d,{sx:[{gap:1.5,minWidth:0,maxWidth:"100%"},...Array.isArray(L)?L:L?[L]:[]],children:[t(c,{ref:S,role:"region","aria-label":g,tabIndex:0,sx:e=>({display:"grid",gridAutoFlow:"column",gridAutoColumns:V(e),gap:v,minWidth:0,overflowX:"auto",overscrollBehaviorX:"contain",scrollSnapType:"x mandatory",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},scrollBehavior:"smooth","@media (prefers-reduced-motion: reduce)":{scrollBehavior:"auto"},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2,borderRadius:1}}),children:B.map((e,r)=>t(c,{"data-index":r,role:"group","aria-roledescription":"slide","aria-label":A>1?`${r*A+1}–${Math.min((r+1)*A,F)} of ${F}`:`${r+1} of ${R}`,sx:{minWidth:0,scrollSnapAlign:"start"},children:e},r))}),e(d,{ref:W,direction:"row",onFocus:e=>{j.current=e.target.dataset.control??null},sx:{justifyContent:"center",alignItems:"center",gap:1.5},children:[t(m,{...p,"data-control":"previous",title:y,onClick:()=>M(-1),disabled:C.start,children:t(s,{})}),t(u,{"aria-live":"polite",sx:{minWidth:"9ch",textAlign:"center"},children:w?N?`${N} ${w}`:`${F} ${w}`:N}),t(m,{...p,"data-control":"next",title:$,onClick:()=>M(1),disabled:C.end,children:t(a,{})})]})]})};b.displayName="Carousel";export{b as Carousel};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{Paper as e}from"@mui/material";const i=({children:i,...m})=>r(e,{...m,children:i});export{i as Paper};
1
+ import{jsx as r}from"react/jsx-runtime";import{Paper as i}from"@mui/material";const s=({display:s,sx:a,children:e,...m})=>r(i,{...m,sx:[...s?[{borderRadius:{xs:2,sm:4}}]:[],...Array.isArray(a)?a:a?[a]:[]],children:e});export{s as Paper};
@@ -1 +1 @@
1
- const o="2.10.16";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.10.18";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -871,12 +871,16 @@ declare const GlassCard: ({ sx, ...rest }: GlassCardProps) => react.JSX.Element;
871
871
  type AiGlassCardProps = GlassCardProps;
872
872
  declare const AiGlassCard: ({ sx, children, ...rest }: AiGlassCardProps) => react.JSX.Element;
873
873
 
874
- declare const Paper: ({ children, ...rest }: PaperProps) => react.JSX.Element;
874
+ interface NexusPaperProps extends PaperProps {
875
+ /** Applies the display-scale border radius (16px mobile / 32px desktop) for marketing and website contexts. */
876
+ display?: boolean;
877
+ }
878
+ declare const Paper: ({ display, sx, children, ...rest }: NexusPaperProps) => react.JSX.Element;
875
879
 
876
880
  type AiPaperProps = PaperProps;
877
881
  declare const AiPaper: ({ sx, children, ...rest }: AiPaperProps) => react.JSX.Element;
878
882
 
879
- type GlassPaperProps = PaperProps;
883
+ type GlassPaperProps = NexusPaperProps;
880
884
  declare const GlassPaper: ({ sx, children, ...rest }: GlassPaperProps) => react.JSX.Element;
881
885
 
882
886
  type AiGlassPaperProps = GlassPaperProps;
@@ -1054,7 +1058,7 @@ type GlassPaperAsyncProps = Omit<GlassPaperProps, "children"> & {
1054
1058
  };
1055
1059
  declare const GlassPaperAsync: ({ title, description, actions, isLoading, isError, errorMessage, children, ...rest }: GlassPaperAsyncProps) => react.JSX.Element;
1056
1060
 
1057
- type PaperAsyncProps = Omit<PaperProps, "children"> & {
1061
+ type PaperAsyncProps = Omit<NexusPaperProps, "children"> & {
1058
1062
  title: string;
1059
1063
  titleComponent?: "h2" | "h3" | "h4";
1060
1064
  titleSx?: SxProps<Theme>;
@@ -1702,7 +1706,7 @@ interface SectionNavProps {
1702
1706
  */
1703
1707
  declare const SectionNav: ({ items, "aria-label": ariaLabel, scrollRoot, sticky, glass, stickyOffset, justifyContent, sx, }: SectionNavProps) => react.JSX.Element;
1704
1708
 
1705
- type CarouselBreakpoint = "xs" | "sm" | "md" | "lg";
1709
+ type CarouselBreakpoint = "xs" | "sm" | "md" | "lg" | "xl";
1706
1710
  /** Cards visible at once per breakpoint. Fractions leave the next card peeking, e.g. `1.15`. */
1707
1711
  type CarouselItemsPerView = Partial<Record<CarouselBreakpoint, number>>;
1708
1712
  interface CarouselProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.10.16",
3
+ "version": "2.10.18",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",