it-data-nexus-ui-library 2.6.2 → 2.6.3
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}from"react/jsx-runtime";import{Button as o}from"@mui/material";import{useTheme as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Button as o}from"@mui/material";import{useTheme as r,darken as t,alpha as i}from"@mui/material/styles";import{colours as a}from"../../theme/tokens.mjs";const n={small:{height:28,px:"14px",fontSize:"0.7rem"},medium:{height:40,px:"20px",fontSize:"0.9375rem"},large:{height:48,px:"28px",fontSize:"1rem"}},l=({color:l="primary",size:m="medium",children:s,sx:d,...p})=>{const c=r(),h="dark"===c.palette.mode,x="error"===l,u=x?c.palette.error.main:h?a.jadeLight:a.jadeDark,g=x?c.palette.error.dark:h?t(a.jadeLight,.3):a.jadeLight,f=x?c.palette.error.contrastText:h?a.black:a.white,b=x?i(f,.6):h?i(a.black,1):i(a.white,.5),{height:k,px:z,fontSize:S}=n[m];return e(o,{variant:"contained",size:m,sx:[{borderRadius:999,minHeight:k,paddingInline:z,fontSize:S,fontFamily:"inherit",backgroundColor:u,color:f,transition:"color 160ms ease, background-color 160ms ease, box-shadow 160ms ease","&:hover":{backgroundColor:g,color:f,boxShadow:`0 2px 6px ${i(u,.25)}`},"&:active":{boxShadow:`0 1px 3px ${i(u,.15)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:3},"&.Mui-disabled":{backgroundColor:i(u,.6),color:b,pointerEvents:"auto",cursor:"not-allowed"}},...Array.isArray(d)?d:d?[d]:[]],...p,children:s})};export{l as PrimaryButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Button as o}from"@mui/material";import{useTheme as e,alpha as i}from"@mui/material/styles";import{colours as t}from"../../theme/tokens.mjs";const a={small:{height:28,px:"14px",fontSize:"0.7rem"},medium:{height:40,px:"20px",fontSize:"0.9375rem"},large:{height:48,px:"28px",fontSize:"1rem"}},d=({color:d="primary",size:n="medium",children:l,sx:m,...s})=>{const p=e(),x="dark"===p.palette.mode,h="error"===d?p.palette.error.main:x?t.jadeLight:t.jadeDark,{height:c,px:u,fontSize:b}=a[n];return r(o,{variant:"outlined",size:n,sx:[{borderRadius:999,minHeight:c,paddingInline:u,fontSize:b,fontFamily:"inherit",backgroundColor:"transparent",color:h,borderColor:h,borderWidth:"1.5px",transition:"color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease","&:hover":{backgroundColor:i(h,x?.2:.15),borderColor:h,borderWidth:"1.5px",color:h,boxShadow:`0 2px 6px ${i(h,.12)}`},"&:active":{boxShadow:`0 1px 3px ${i(h,.08)}`},"&:focus-visible":{outline:`2px solid ${h}`,outlineOffset:3},"&.Mui-disabled":{borderColor:i(h,.6),color:i(h,.6),borderWidth:"1.5px",pointerEvents:"auto",cursor:"not-allowed"}},...Array.isArray(m)?m:m?[m]:[]],...s,children:l})};export{d as SecondaryButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="2.6.
|
|
1
|
+
const o="2.6.3";export{o as SAGE_NEXUS_UI_VERSION};
|
package/dist/index.d.ts
CHANGED
|
@@ -673,6 +673,7 @@ interface AccordionSingleProps {
|
|
|
673
673
|
declare const AccordionSingle: ({ summary, children, defaultExpanded, expanded, onChange, disabled, summaryProps, expandIcon, sx, detailsSx, }: AccordionSingleProps) => react.JSX.Element;
|
|
674
674
|
|
|
675
675
|
interface SecondaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
|
|
676
|
+
color?: "primary" | "error";
|
|
676
677
|
size?: "small" | "medium" | "large";
|
|
677
678
|
}
|
|
678
679
|
declare const SecondaryButton: React.FC<SecondaryButtonProps>;
|
|
@@ -1042,6 +1043,7 @@ interface SageLogoSvgProps {
|
|
|
1042
1043
|
declare const SageLogoSvg: ({ height, className, "aria-label": ariaLabel, }: SageLogoSvgProps) => react.JSX.Element;
|
|
1043
1044
|
|
|
1044
1045
|
interface PrimaryButtonProps extends Omit<ButtonProps, "variant" | "color"> {
|
|
1046
|
+
color?: "primary" | "error";
|
|
1045
1047
|
size?: "small" | "medium" | "large";
|
|
1046
1048
|
}
|
|
1047
1049
|
declare const PrimaryButton: React.FC<PrimaryButtonProps>;
|
|
@@ -1086,7 +1088,7 @@ declare const RagChip: ({ label, status, colour, size, variant, sx, ...rest }: R
|
|
|
1086
1088
|
*/
|
|
1087
1089
|
declare const ragColorForDelta: (delta: string) => string;
|
|
1088
1090
|
|
|
1089
|
-
interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component"> {
|
|
1091
|
+
interface SecondaryButtonLinkProps extends Omit<SecondaryButtonProps, "href" | "component" | "color"> {
|
|
1090
1092
|
href: string;
|
|
1091
1093
|
color?: string;
|
|
1092
1094
|
openInNewTab?: boolean;
|