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

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
- const o="2.11.5";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="2.11.6";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -921,6 +921,12 @@ declare const ButtonBase: (props: ButtonBaseProps) => react.JSX.Element;
921
921
 
922
922
  interface ButtonTileProps extends Omit<ButtonBaseProps, "children" | "title"> {
923
923
  title: ReactNode;
924
+ /** `"compact"` renders the title with the H3 typography scale instead of H2. Defaults to `"default"`. */
925
+ titleSize?: "default" | "compact";
926
+ /** Element rendered for the title. Defaults to `h2` for both sizes so heading order is unchanged. */
927
+ titleComponent?: ElementType;
928
+ /** Clamps the title to this many lines. The full text stays in the DOM; string titles also get a native `title` tooltip. Unset means no clamp. */
929
+ titleMaxLines?: number;
924
930
  subtitle?: ReactNode;
925
931
  /** Maximum tile width. Defaults to 350px. */
926
932
  maxWidth?: number | string;
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.6",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",