@corva/ui 0.53.0-4 → 0.53.0-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
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AA+CA,aAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,2DAKrB,gBAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusBadge/index.tsx"],"names":[],"mappings":";AA+CA,aAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,2DAKrB,gBAAgB,KAAG,WA4BrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as n}from"react/jsx-runtime";import a from"moment";import r from"classnames";import{makeStyles as i,Typography as o}from"@material-ui/core";import{Tooltip as s}from"../Tooltip/Tooltip.js";import{BADGE_ICONS as c,TOOLTIPS as p,WARNING as l,BADGE_ICON_STATUSES as m}from"./constants.js";var g=i((function(e){return{statusBadgeWrapper:{backgroundColor:e.palette.background.b4,display:"flex",height:30},statusBadgeContent:{display:"flex",flexDirection:function(e){return e.isWarningTypeIcon?"row-reverse":"initial"},justifyContent:function(e){return e.isWarningTypeIcon&&"flex-end"},padding:"12px 0 2px 2px",whiteSpace:"nowrap",width:"calc(100% - 140px)"},text:{fontSize:"10px",lineHeight:"12px",alignSelf:"center"},timestamp:{color:e.palette.primary.text6,marginLeft:function(e){var t=e.isWarningTypeIcon,n=e.isIconType;return!t&&n&&8}},warningMessage:{color:e.palette.primary.text1,marginLeft:4,textOverflow:"ellipsis",overflow:"hidden",fontSize:"12px"},badgeIcon:{fontSize:"16px"},warning:{color:e.palette.warning.main,marginLeft:8},error:{color:e.palette.error.main},success:{color:e.palette.success.bright}}})),d=function(i){var d=i.iconType,f=i.lastTimestamp,u=i.warningMessage,x=i.isMobile,y=d==m.warning,h=g({isWarningTypeIcon:y,isIconType:!!d}),w=c[d],b=p[d];return u&&(b="".concat(p[d],". ").concat(u)),t("div",e({className:h.statusBadgeWrapper},{children:n("div",e({className:h.statusBadgeContent},{children:[y&&!x&&t(o,e({variant:"body1",className:r(h.text,h.warningMessage)},{children:u?"".concat(l,". ").concat(u):l})),d&&t(s,e({title:b,placement:"top"},{children:t(w,{className:r(h.badgeIcon,h[d])})})),n(o,e({variant:"body1",className:r(h.text,h.timestamp)},{children:["Last Update: ",a.unix(f).format("M/D/YYYY h:mm a")]}))]}))}))};export{d as StatusBadge};
|