it-data-nexus-ui-library 2.11.5 → 2.11.7

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,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
+ 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{H3 as s,H2 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,titleSize:h="default",titleComponent:c="h2",titleMaxLines:f,subtitle:u,maxWidth:b=350,display:y=!1,icon:v,headerAdornment:g,children:w,footer:S,sx:C,cardSx:j,contentSx:k,headerSx:W,headerAdornmentSx:A,iconSx:B,titleSx:R,subtitleSx:I,bodySx:D,footerSx:M,...$})=>{const L=x?r:a,O="compact"===h?s:d,z=[{overflowWrap:"anywhere"},void 0!==f&&f>0?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:f,overflow:"hidden"}:{},...m(R)];return e(o,{...$,sx:[{alignItems:"stretch",borderRadius:y?{xs:2,sm:4}:1,maxWidth:b,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:y?{xs:2,sm:4}:void 0},"& > div::before":{borderRadius:y?{xs:2,sm:4}:void 0},"& > div::after":{borderRadius:y?{xs:2,sm:4}:void 0}},...m(C)],children:e(L,{sx:[{width:"100%",height:"100%",borderRadius:y?{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(j)],children:i(n,{sx:[{width:"100%",height:"100%",gap:1.5},...m(k)],children:[i(n,{direction:"row",sx:[{alignItems:"flex-start",justifyContent:"space-between",gap:1,flexWrap:"wrap"},...m(W)],children:[i(n,{direction:"row",sx:{alignItems:"center",gap:1,minWidth:0},children:[v&&e(l,{sx:[{display:"flex",alignItems:"center",flexShrink:0},...m(B)],children:v}),e(O,{component:c,sx:z,title:void 0!==f&&f>0&&"string"==typeof p?p:void 0,children:p})]}),g&&e(l,{sx:A,children:g})]}),u&&e(s,{sx:[{color:"text.secondary"},...m(I)],children:u}),w&&e(n,{sx:[{gap:1},...m(D)],children:w}),S&&e(n,{sx:[{mt:"auto"},...m(M)],children:S})]})})})},p=i=>e(x,{...i}),h=i=>e(x,{...i,ai:!0});export{h as AiButtonTile,p as ButtonTile};
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{SecondaryButton as o}from"../Buttons/SecondaryButton.mjs";import{alpha as t}from"@mui/material";import{useTheme as e}from"@mui/material/styles";import{colours as i}from"../Theme/tokens.mjs";const n=({item:n,isActive:d,collapsed:a,linkComponent:l,onSelect:m})=>{const s="dark"===e().palette.mode?i.jadeLight:i.jadeDark,c=n.icon;return r(o,{startIcon:r(c,{}),fullWidth:!0,...l?{component:l}:{},...l?{href:n.href}:{},title:a?n.label:void 0,"aria-current":d?"page":void 0,onClick:m?()=>m(n):void 0,sx:[{justifyContent:a?"center":"flex-start",px:1,borderRadius:1,minWidth:0,color:s,borderColor:a?"transparent":s,borderWidth:a?0:"1.5px",borderStyle:"solid",backgroundColor:"transparent","&:hover":{color:s,borderColor:a?"transparent":s,borderWidth:a?0:"1.5px",backgroundColor:t(s,.15)},"&.Mui-disabled":{color:t(s,.6),borderColor:a?"transparent":t(s,.6),borderWidth:a?0:"1.5px"},"& .MuiButton-startIcon":{marginRight:a?0:void 0,marginLeft:0}},d&&{backgroundColor:t(s,.35),borderLeftColor:s,borderLeftWidth:"3px",borderLeftStyle:"solid",fontWeight:700,"&:hover":{backgroundColor:t(s,.28)}}],children:!a&&r("span",{children:n.label})},n.href)};export{n as SideBladeNavListItem};
1
+ import{jsxs as r,jsx as o}from"react/jsx-runtime";import{SecondaryButton as t}from"../Buttons/SecondaryButton.mjs";import e from"@mui/material/Box";import{alpha as i}from"@mui/material";import{useTheme as n}from"@mui/material/styles";import{colours as a}from"../Theme/tokens.mjs";const l=({item:l,isActive:d,collapsed:m,linkComponent:s,onSelect:c})=>{const p="dark"===n().palette.mode?a.jadeLight:a.jadeDark,h=l.icon;return r(t,{startIcon:o(h,{}),fullWidth:!0,...s?{component:s}:{},...s?{href:l.href}:{},title:m?l.label:void 0,"aria-current":d?"page":void 0,onClick:c?()=>c(l):void 0,sx:[{justifyContent:m?"center":"flex-start",px:1,borderRadius:1,minWidth:0,color:p,borderColor:m?"transparent":p,borderWidth:m?0:"1.5px",borderStyle:"solid",backgroundColor:"transparent","&:hover":{color:p,borderColor:m?"transparent":p,borderWidth:m?0:"1.5px",backgroundColor:i(p,.15)},"&.Mui-disabled":{color:i(p,.6),borderColor:m?"transparent":i(p,.6),borderWidth:m?0:"1.5px"},"& .MuiButton-startIcon":{marginRight:m?0:void 0,marginLeft:0}},d&&{backgroundColor:i(p,.35),borderLeftColor:p,borderLeftWidth:"3px",borderLeftStyle:"solid",fontWeight:700,"&:hover":{backgroundColor:i(p,.28)}}],children:[!m&&o("span",{children:l.label}),!m&&l.chip&&o(e,{component:"span",sx:{display:"inline-flex",ml:1},children:l.chip})]},l.href)};export{l as SideBladeNavListItem};
@@ -1 +1 @@
1
- const o="2.11.5";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.11.7";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -921,13 +921,13 @@ declare const ButtonBase: (props: ButtonBaseProps) => react.JSX.Element;
921
921
 
922
922
  interface ButtonTileProps extends Omit<ButtonBaseProps, "children" | "title"> {
923
923
  title: ReactNode;
924
+ titleSize?: "default" | "compact";
925
+ titleComponent?: ElementType;
926
+ titleMaxLines?: number;
924
927
  subtitle?: ReactNode;
925
- /** Maximum tile width. Defaults to 350px. */
926
928
  maxWidth?: number | string;
927
929
  icon?: ReactNode;
928
- /** Non-interactive content displayed at the end of the title row, such as a status badge. */
929
930
  headerAdornment?: ReactNode;
930
- /** Applies the display-scale border radius (16px mobile / 32px desktop) for marketing and website contexts. */
931
931
  display?: boolean;
932
932
  children?: ReactNode;
933
933
  footer?: ReactNode;
@@ -1392,6 +1392,7 @@ interface SideBladeNavItem {
1392
1392
  icon: ComponentType<{
1393
1393
  className?: string;
1394
1394
  }>;
1395
+ chip?: ReactNode;
1395
1396
  }
1396
1397
  interface SideBladeNavListItemProps {
1397
1398
  item: SideBladeNavItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-data-nexus-ui-library",
3
- "version": "2.11.5",
3
+ "version": "2.11.7",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",