sage-nexus-ui 1.9.4 → 1.9.5

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 r,jsxs as e}from"react/jsx-runtime";import{Tooltip as a,Box as t}from"@mui/material";import{useTheme as o,alpha as i}from"@mui/material/styles";import{Body1 as m}from"./Typography.mjs";import{RagDot as c}from"./RagDot.mjs";const s=r=>"jade"===r?"On Track":"amber"===r?"At Risk":"cherry"===r?"Off Track":void 0,l=({label:l,status:n,colour:p})=>{const d=o(),f=p||(r=>{if(r)return"On Track"===r?"jade":"At Risk"===r?"amber":"Off Track"===r?"cherry":void 0})(n)||"jade",u="jade"===f?d.palette.success.main:"amber"===f?d.palette.warning.main:"cherry"===f?d.palette.error.main:f,h=l??n??s(f)??"On Track",k=n??s(f)??"On Track";return r(a,{title:h,arrow:!0,children:e(t,{sx:{display:"flex",alignItems:"center",gap:.75,px:.5,borderRadius:1,border:"1px solid",borderColor:u,bgcolor:i(u,.12),flexShrink:0},children:[r(m,{sx:{color:u,whiteSpace:"nowrap"},children:h}),r(c,{status:k})]})})};export{l as RagChip};
1
+ import{jsx as r}from"react/jsx-runtime";import{Tooltip as a}from"@mui/material";import{useTheme as i,alpha as e}from"@mui/material/styles";import{Chip as t}from"./Chip.mjs";import{RagDot as o}from"./RagDot.mjs";const m=r=>"jade"===r?"On Track":"amber"===r?"At Risk":"cherry"===r?"Off Track":void 0,l=({label:l,status:n,colour:s,size:c="small",variant:u="outlined",sx:d,...p})=>{const f=i(),k=s||(r=>{if(r)return"On Track"===r?"jade":"At Risk"===r?"amber":"Off Track"===r?"cherry":void 0})(n)||"jade",b="jade"===k?f.palette.success.main:"amber"===k?f.palette.warning.main:"cherry"===k?f.palette.error.main:k,h=l??n??m(k)??"On Track",j=n??m(k)??"On Track";return r(a,{title:h,arrow:!0,children:r(t,{label:h,icon:r(o,{status:j}),size:c,variant:u,sx:[{color:b,px:1,borderColor:"outlined"===u?b:void 0,backgroundColor:e(b,"filled"===u?.2:.12),"& .MuiChip-label":{color:b},"& .MuiChip-icon":{marginLeft:.75,marginRight:0}},...Array.isArray(d)?d:d?[d]:[]],...p})})};export{l as RagChip};
@@ -1 +1 @@
1
- const o="1.9.4";export{o as SAGE_NEXUS_UI_VERSION};
1
+ const o="1.9.5";export{o as SAGE_NEXUS_UI_VERSION};
package/dist/index.d.ts CHANGED
@@ -532,12 +532,12 @@ interface RagDotProps {
532
532
  declare const RagDot: ({ status }: RagDotProps) => react_jsx_runtime.JSX.Element;
533
533
 
534
534
  type ColourProp = "jade" | "amber" | "cherry" | string;
535
- interface RagChipProps {
536
- label?: string;
535
+ interface RagChipProps extends Omit<ChipProps, "label" | "color" | "icon"> {
536
+ label?: ChipProps["label"];
537
537
  status?: string;
538
538
  colour?: ColourProp;
539
539
  }
540
- declare const RagChip: ({ label, status, colour }: RagChipProps) => react_jsx_runtime.JSX.Element;
540
+ declare const RagChip: ({ label, status, colour, size, variant, sx, ...rest }: RagChipProps) => react_jsx_runtime.JSX.Element;
541
541
 
542
542
  interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component"> {
543
543
  href: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sage-nexus-ui",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Nexus core components",
5
5
  "license": "ISC",
6
6
  "author": "emsmart-sage",