@docflow/component-library
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -1,2 +0,2 @@ | ||
import*as e from"react";import t from"react";import o from"@material-ui/core/Button";import{makeStyles as a,Typography as r,styled as n,Tooltip as l}from"@material-ui/core";import{makeStyles as i,createGenerateClassName as p,createMuiTheme as s,ThemeProvider as c,StylesProvider as d}from"@material-ui/core/styles"; | ||
import*as e from"react";import t from"react";import o from"@material-ui/core/Button";import{makeStyles as a,Typography as n,styled as r,Tooltip as i}from"@material-ui/core";import{makeStyles as l,createGenerateClassName as s,createMuiTheme as p,ThemeProvider as c,StylesProvider as d}from"@material-ui/core/styles"; | ||
/*! ***************************************************************************** | ||
@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function g(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(o[a[r]]=e[a[r]])}return o}const b=e=>Object.assign({transitionTimingFunction:"ease-in-out",transitionDuration:"0.1s",textTransform:"none",borderRadius:"6px",boxShadow:e.shadow.none},e.typography.textStyles.M200),F=e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.B400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.B500,boxShadow:e.shadow.none},"&:active":{background:`linear-gradient(0deg, ${e.palette.N50A}, ${e.palette.N50A}), ${e.palette.B500}`,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}),x=e=>({variant:t})=>{switch(t){case"tertiary":return(e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.N0,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);case"danger":return(e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.R400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.R300,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.R500,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);default:return Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.N20,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N40,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}})}},m=e=>Object.assign(Object.assign({},b(e)),{border:"0px",outline:`${e.palette.N40} solid 1px !important`,backgroundColor:e.palette.N0,color:e.palette.N300,"&:hover":{border:"0px",backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{border:"0px",backgroundColor:e.palette.N20A,color:e.palette.N60}}),u=e=>t=>({"& > *:first-child":Object.assign({},"default"!==t.size||t.hasLabel?{fontSize:e.typography.fontSizes[200],paddingTop:"3px",paddingBottom:"3px"}:{fontSize:e.typography.fontSizes[100],paddingTop:"2px",paddingBottom:"2px"})});const h=a((e=>({root:e=>Object.assign(Object.assign({},(e.hasIcon,{minWidth:"20px"})),{outlineOffset:"0px !important",padding:"default"===e.size?"6px 10px":"10px"}),containedPrimary:F(e),containedSecondary:x(e),outlinedSecondary:m(e),iconSizeMedium:u(e),startIcon:e=>e.hasLabel?{marginLeft:"0px"}:{margin:"0px"}})),{classNamePrefix:"docflow-button"}),N=e=>{var{children:a,onClick:r,type:n="button",disabled:l=!1,variant:i="primary",size:p="default",to:s,fullWidth:c,icon:d,linkComponent:b,tooltip:F,tooltipPlacement:x}=e,m=g(e,["children","onClick","type","disabled","variant","size","to","fullWidth","icon","linkComponent","tooltip","tooltipPlacement"]);const u="outlined"===i?"outlined":"contained",N="primary"===i?"primary":"secondary",y=h({variant:i,size:p,hasIcon:!!d,hasLabel:!!a}),A=Object.assign(Object.assign({startIcon:d,classes:y,type:n,color:N,variant:u,onClick:r,disabled:l,size:"medium",fullWidth:c,disableRipple:!0},s&&{to:s,component:b}),m);return F?t.createElement(v,{tooltip:F,placement:x},t.createElement(o,Object.assign({},A),a)):t.createElement(o,Object.assign({},A),a)},y=(e,t)=>{switch(t){case"secondary":return e.palette.N100;case"action":return e.palette.B400;case"success":return e.palette.G400;case"danger":return e.palette.R400;default:return e.palette.N700}};const A=i((function(e){return{root:t=>Object.assign(Object.assign({},e.typography.textStyles[`${t.weight.charAt(0).toUpperCase()}${t.size}`]),{color:y(e,t.color)})}}),{classNamePrefix:"docflow-typography"}),f=e=>{var{children:o,color:a="main",size:n="200",weight:l="regular",renderAs:i="span"}=e,p=g(e,["children","color","size","weight","renderAs"]);const s=A({size:n,weight:l,color:a}),c="span"===i?"body2":"p"===i?"body1":i;return t.createElement(r,Object.assign({classes:s,variant:c},p),o)};const O=n("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.M100))),w=n("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.R100))),j=n("div")((({theme:e})=>Object.assign(Object.assign({color:e.palette.N70},e.typography.textStyles.M100),{marginTop:"6px"}))),C=({tooltip:e,secondaryTooltip:o,tertiaryTooltip:a})=>t.createElement(t.Fragment,null,t.createElement(O,null,e),o&&t.createElement(w,null,o),a&&t.createElement(j,null,a)),E=a((e=>({tooltip:{backgroundColor:e.palette.N700,borderRadius:"6px",padding:"5px 10px",boxShadow:e.shadow.S100}})),{classNamePrefix:"docflow-button"}),v=e=>{var{children:o,tooltip:a,secondaryTooltip:r,tertiaryTooltip:n,placement:i="bottom",open:p}=e,s=g(e,["children","tooltip","secondaryTooltip","tertiaryTooltip","placement","open"]);const c=E(),d=Object.assign({classes:c},s),b=t.createElement(C,{tooltip:a,secondaryTooltip:r,tertiaryTooltip:n}),F=void 0!==p?{open:p,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0}:{};return t.createElement(l,Object.assign({title:b,open:p,placement:i},F,d),t.createElement("span",null,o))};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},S.apply(this,arguments)}var B=function(t){return e.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},t))};const k=(e,t)=>{e=e.substr(1);const o=new RegExp(`.{1,${e.length/3}}`,"g");let a=e.match(o);return a&&1===a[0].length&&(a=a.map((e=>e+e))),a?`rgba(${a.map((e=>parseInt(e,16))).join(", ")}, ${t})`:""},T={N0:"#FFFFFF",N10:"#FAFAFB",N20:"#F5F6F6",N30:"#EBECEE",N40:"#E1E2E4",N50:"#C3C6CA",N60:"#AFB2B8",N70:"#A5A8AF",N80:"#969AA2",N90:"#878C95",N100:"#787D87",N200:"#696F7A",N300:"#5A616D",N400:"#4E5561",N500:"#3F4754",N600:"#323A49",N700:"#202939",N800:"#121B2C",N900:"#050F21",N0A:k("#FFFFFF",.01),N10A:k("#050F21",.02),N20A:k("#050F21",.04),N30A:k("#050F21",.08),N40A:k("#050F21",.12),N50A:k("#050F21",.24),N60A:k("#050F21",.32),N70A:k("#050F21",.36),N80A:k("#050F21",.42),N90A:k("#050F21",.48),N100A:k("#050F21",.54),N200A:k("#050F21",.6),N300A:k("#050F21",.66),N400A:k("#050F21",.71),N500A:k("#050F21",.77),N600A:k("#050F21",.82),N700A:k("#050F21",.89),N800A:k("#050F21",.95),N900A:k("#050F21",1)};var P=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},{R50:"#FFEBE6",R75:"#FFBDAD",R100:"#FF8F73",R200:"#FF7452",R300:"#FF5630",R400:"#DE350B",R500:"#BF2600"}),{Y50:"#FFFAE6",Y75:"#FFF0B3",Y100:"#FFE680",Y200:"#FFC300",Y300:"#FFAA00",Y400:"#FF9500",Y500:"#FF8800"}),{G50:"#E3FCEF",G75:"#ABF5D1",G100:"#79F2C0",G200:"#57D9A3",G300:"#36B37E",G400:"#00875A",G500:"#006644"}),{T50:"#E6FCFF",T75:"#B3F5FF",T100:"#79E2F2",T200:"#00C7E6",T300:"#00B8D9",T400:"#00A3BF",T500:"#008DA6"}),{B50:"#EFF4FF",B75:"#DEE9FF",B100:"#ADC8FF",B200:"#7CA8FF",B300:"#4B87FF",B400:"#1C69FF",B500:"#0049DC"}),{P50:"#EAE6FF",P75:"#C0B6F2",P100:"#998DD9",P200:"#8777D9",P300:"#6554C0",P400:"#5243AA",P500:"#403294"}),T);const z='"Roboto", "Helvetica", "Arial", sans-serif',R={100:"12px",200:"14px",300:"16px",400:"18px",500:"20px",600:"24px",700:"30px",800:"36px",900:"40px"},D={regular:400,medium:500,bold:700},$={100:"16px",200:"20px",300:"24px",400:"26px",500:"28px",600:"32px",700:"36px",800:"40px",900:"48px"},G={100:"0.005em",200:"0.005em",300:"0.005em",400:"0.005em",500:"0.005em",600:"0.005em",700:"0.0025em",800:"0em",900:"0em"},L=(e,t)=>({fontFamily:z,fontSize:R[e],fontWeight:D[t],lineHeight:$[e],letterSpacing:G[e]});const Y={palette:P,typography:{fontFamily:z,fontSizes:R,fontWeights:D,lineHeights:$,letterSpacings:G,textStyles:(()=>{const e=Object.keys(D);return Object.keys(R).reduce(((t,o)=>{for(const a of e){t[a.charAt(0).toUpperCase()+o]=L(o,a)}return t}),{})})()},shadow:{none:"none",S100:"0px 1px 3px rgba(10, 29, 69, 0.16), 0px 0px 1px rgba(10, 29, 69, 0.16)",S200:"0px 2px 8px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S300:"0px 4px 12px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S400:"0px 8px 18px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S500:"0px 12px 24px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)"}},I={secondary:Y.palette.N100,action:Y.palette.B400,success:Y.palette.G400,danger:Y.palette.R400,main:Y.palette.N700},M={100:"20px",200:"24px",300:"32px"},W=({color:e="main",size:o="200",weight:a="regular",name:r="person-circle"})=>t.createElement("svg",{"aria-hidden":"true",fill:I[e],width:M[o],height:M[o]},t.createElement("use",{xlinkHref:`${B}#${r}-${a}`})),H=p({productionPrefix:"docflow-"}),U=s(Object.assign(Object.assign({},Y),{props:{MuiTypography:{variantMapping:{body1:"p",body2:"span"}}}})),q=({children:e})=>t.createElement(t.Fragment,null,t.createElement(c,{theme:U},t.createElement(d,{generateClassName:H},e)));export{N as Button,W as Icon,q as ThemeProvider,v as Tooltip,f as Typography}; | ||
***************************************************************************** */function g(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}const b=e=>Object.assign({transitionTimingFunction:"ease-in-out",transitionDuration:"0.1s",textTransform:"none",borderRadius:"6px",boxShadow:e.shadow.none},e.typography.textStyles.M200),F=e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.B400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.B500,boxShadow:e.shadow.none},"&:active":{background:`linear-gradient(0deg, ${e.palette.N50A}, ${e.palette.N50A}), ${e.palette.B500}`,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}),x=e=>({variant:t})=>{switch(t){case"tertiary":return(e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.N0,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);case"danger":return(e=>Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.R400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.R300,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.R500,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);default:return Object.assign(Object.assign({},b(e)),{backgroundColor:e.palette.N20,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N40,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}})}},m=e=>Object.assign(Object.assign({},b(e)),{border:"0px",outline:`${e.palette.N40} solid 1px !important`,backgroundColor:e.palette.N0,color:e.palette.N300,"&:hover":{border:"0px",backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{border:"0px",backgroundColor:e.palette.N20A,color:e.palette.N60}}),u=e=>t=>({"& > *:first-child":Object.assign({},"default"!==t.size||t.hasLabel?{fontSize:e.typography.fontSizes[200],paddingTop:"3px",paddingBottom:"3px"}:{fontSize:e.typography.fontSizes[100],paddingTop:"2px",paddingBottom:"2px"})});const h=a((e=>({root:e=>Object.assign(Object.assign({},(e.hasIcon,{minWidth:"20px"})),{outlineOffset:"0px !important",padding:"default"===e.size?"6px 10px":"10px"}),containedPrimary:F(e),containedSecondary:x(e),outlinedSecondary:m(e),iconSizeMedium:u(e),startIcon:e=>e.hasLabel?{marginLeft:"0px"}:{margin:"0px"}})),{classNamePrefix:"docflow-button"}),N=e=>{var{children:a,onClick:n,type:r="button",disabled:i=!1,variant:l="primary",size:s="default",to:p,fullWidth:c,icon:d,linkComponent:b,tooltip:F,tooltipPlacement:x}=e,m=g(e,["children","onClick","type","disabled","variant","size","to","fullWidth","icon","linkComponent","tooltip","tooltipPlacement"]);const u="outlined"===l?"outlined":"contained",N="primary"===l?"primary":"secondary",y=h({variant:l,size:s,hasIcon:!!d,hasLabel:!!a}),A=Object.assign(Object.assign({startIcon:d,classes:y,type:r,color:N,variant:u,onClick:n,disabled:i,size:"medium",fullWidth:c,disableRipple:!0},p&&{to:p,component:b}),m);return F?t.createElement(v,{tooltip:F,placement:x},t.createElement(o,Object.assign({},A),a)):t.createElement(o,Object.assign({},A),a)},y=(e,t)=>{switch(t){case"secondary":return e.palette.N100;case"action":return e.palette.B400;case"success":return e.palette.G400;case"danger":return e.palette.R400;default:return e.palette.N700}};const A=l((function(e){return{root:t=>Object.assign(Object.assign({},e.typography.textStyles[`${t.weight.charAt(0).toUpperCase()}${t.size}`]),{color:y(e,t.color)})}}),{classNamePrefix:"docflow-typography"}),f=e=>{var{children:o,color:a="main",size:r="200",weight:i="regular",renderAs:l="span"}=e,s=g(e,["children","color","size","weight","renderAs"]);const p=A({size:r,weight:i,color:a}),c="span"===l?"body2":"p"===l?"body1":l;return t.createElement(n,Object.assign({classes:p,variant:c},s),o)};const O=r("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.M100))),j=r("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.R100))),w=r("div")((({theme:e})=>Object.assign(Object.assign({color:e.palette.N70},e.typography.textStyles.M100),{marginTop:"6px"}))),C=({tooltip:e,secondaryTooltip:o,tertiaryTooltip:a})=>t.createElement(t.Fragment,null,t.createElement(O,null,e),o&&t.createElement(j,null,o),a&&t.createElement(w,null,a)),E=a((e=>({tooltip:{backgroundColor:e.palette.N700,borderRadius:"6px",padding:"5px 10px",boxShadow:e.shadow.S100}})),{classNamePrefix:"docflow-button"}),v=e=>{var{children:o,tooltip:a,secondaryTooltip:n,tertiaryTooltip:r,placement:l="bottom",open:s}=e,p=g(e,["children","tooltip","secondaryTooltip","tertiaryTooltip","placement","open"]);const c=E(),d=Object.assign({classes:c},p),b=t.createElement(C,{tooltip:a,secondaryTooltip:n,tertiaryTooltip:r}),F=void 0!==s?{open:s,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0}:{};return t.createElement(i,Object.assign({title:b,open:s,placement:l},F,d),t.createElement("span",null,o))};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},S.apply(this,arguments)}var B=function(t){return e.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},t))};const k=(e,t)=>{e=e.substr(1);const o=new RegExp(`.{1,${e.length/3}}`,"g");let a=e.match(o);return a&&1===a[0].length&&(a=a.map((e=>e+e))),a?`rgba(${a.map((e=>parseInt(e,16))).join(", ")}, ${t})`:""},T={N0:"#FFFFFF",N10:"#FAFAFB",N20:"#F5F6F6",N30:"#EBECEE",N40:"#E1E2E4",N50:"#C3C6CA",N60:"#AFB2B8",N70:"#A5A8AF",N80:"#969AA2",N90:"#878C95",N100:"#787D87",N200:"#696F7A",N300:"#5A616D",N400:"#4E5561",N500:"#3F4754",N600:"#323A49",N700:"#202939",N800:"#121B2C",N900:"#050F21",N0A:k("#FFFFFF",.01),N10A:k("#050F21",.02),N20A:k("#050F21",.04),N30A:k("#050F21",.08),N40A:k("#050F21",.12),N50A:k("#050F21",.24),N60A:k("#050F21",.32),N70A:k("#050F21",.36),N80A:k("#050F21",.42),N90A:k("#050F21",.48),N100A:k("#050F21",.54),N200A:k("#050F21",.6),N300A:k("#050F21",.66),N400A:k("#050F21",.71),N500A:k("#050F21",.77),N600A:k("#050F21",.82),N700A:k("#050F21",.89),N800A:k("#050F21",.95),N900A:k("#050F21",1)};var P=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},{R50:"#FFEBE6",R75:"#FFBDAD",R100:"#FF8F73",R200:"#FF7452",R300:"#FF5630",R400:"#DE350B",R500:"#BF2600"}),{Y50:"#FFFAE6",Y75:"#FFF0B3",Y100:"#FFE680",Y200:"#FFC300",Y300:"#FFAA00",Y400:"#FF9500",Y500:"#FF8800"}),{G50:"#E3FCEF",G75:"#ABF5D1",G100:"#79F2C0",G200:"#57D9A3",G300:"#36B37E",G400:"#00875A",G500:"#006644"}),{T50:"#E6FCFF",T75:"#B3F5FF",T100:"#79E2F2",T200:"#00C7E6",T300:"#00B8D9",T400:"#00A3BF",T500:"#008DA6"}),{B50:"#EFF4FF",B75:"#DEE9FF",B100:"#ADC8FF",B200:"#7CA8FF",B300:"#4B87FF",B400:"#1C69FF",B500:"#0049DC"}),{P50:"#EAE6FF",P75:"#C0B6F2",P100:"#998DD9",P200:"#8777D9",P300:"#6554C0",P400:"#5243AA",P500:"#403294"}),T),{primary:{main:"#1C69FF"},secondary:{main:"#1C69FF"}});const z='"Roboto", "Helvetica", "Arial", sans-serif',R={100:"12px",200:"14px",300:"16px",400:"18px",500:"20px",600:"24px",700:"30px",800:"36px",900:"40px"},D={regular:400,medium:500,bold:700},$={100:"16px",200:"20px",300:"24px",400:"26px",500:"28px",600:"32px",700:"36px",800:"40px",900:"48px"},G={100:"0.005em",200:"0.005em",300:"0.005em",400:"0.005em",500:"0.005em",600:"0.005em",700:"0.0025em",800:"0em",900:"0em"},L=(e,t)=>({fontFamily:z,fontSize:R[e],fontWeight:D[t],lineHeight:$[e],letterSpacing:G[e]});const Y={palette:P,typography:{fontFamily:z,fontSizes:R,fontWeights:D,lineHeights:$,letterSpacings:G,textStyles:(()=>{const e=Object.keys(D);return Object.keys(R).reduce(((t,o)=>{for(const a of e){t[a.charAt(0).toUpperCase()+o]=L(o,a)}return t}),{})})()},shadow:{none:"none",S100:"0px 1px 3px rgba(10, 29, 69, 0.16), 0px 0px 1px rgba(10, 29, 69, 0.16)",S200:"0px 2px 8px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S300:"0px 4px 12px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S400:"0px 8px 18px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S500:"0px 12px 24px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)"}},I={secondary:Y.palette.N100,action:Y.palette.B400,success:Y.palette.G400,danger:Y.palette.R400,main:Y.palette.N700},M={100:"20px",200:"24px",300:"32px"},W=({color:e="main",size:o="200",weight:a="regular",name:n="person-circle"})=>t.createElement("svg",{"aria-hidden":"true",fill:I[e],width:M[o],height:M[o]},t.createElement("use",{xlinkHref:`${B}#${n}-${a}`})),H=s({productionPrefix:"docflow-"}),U=p(Object.assign(Object.assign({},Y),{props:{MuiTypography:{variantMapping:{body1:"p",body2:"span"}}}})),q=({children:e})=>t.createElement(t.Fragment,null,t.createElement(c,{theme:U},t.createElement(d,{generateClassName:H},e)));export{N as Button,W as Icon,q as ThemeProvider,v as Tooltip,f as Typography}; | ||
//# sourceMappingURL=index.js.map |
declare const theme: { | ||
palette: { | ||
readonly primary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly secondary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly N0: string; | ||
@@ -4,0 +10,0 @@ readonly N10: string; |
declare const _default: { | ||
readonly primary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly secondary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly N0: string; | ||
@@ -3,0 +9,0 @@ readonly N10: string; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@material-ui/core/Button"),o=require("@material-ui/core"),a=require("@material-ui/core/styles");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var l=r(e),i=n(e),s=r(t); | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@material-ui/core/Button"),a=require("@material-ui/core"),o=require("@material-ui/core/styles");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var l=r(e),i=n(e),s=r(t); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. | ||
***************************************************************************** */ | ||
function p(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(o[a[r]]=e[a[r]])}return o}const c=e=>Object.assign({transitionTimingFunction:"ease-in-out",transitionDuration:"0.1s",textTransform:"none",borderRadius:"6px",boxShadow:e.shadow.none},e.typography.textStyles.M200),d=e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.B400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.B500,boxShadow:e.shadow.none},"&:active":{background:`linear-gradient(0deg, ${e.palette.N50A}, ${e.palette.N50A}), ${e.palette.B500}`,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}),u=e=>({variant:t})=>{switch(t){case"tertiary":return(e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.N0,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);case"danger":return(e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.R400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.R300,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.R500,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);default:return Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.N20,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N40,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}})}},b=e=>Object.assign(Object.assign({},c(e)),{border:"0px",outline:`${e.palette.N40} solid 1px !important`,backgroundColor:e.palette.N0,color:e.palette.N300,"&:hover":{border:"0px",backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{border:"0px",backgroundColor:e.palette.N20A,color:e.palette.N60}}),g=e=>t=>({"& > *:first-child":Object.assign({},"default"!==t.size||t.hasLabel?{fontSize:e.typography.fontSizes[200],paddingTop:"3px",paddingBottom:"3px"}:{fontSize:e.typography.fontSizes[100],paddingTop:"2px",paddingBottom:"2px"})});const x=o.makeStyles((e=>({root:e=>Object.assign(Object.assign({},(e.hasIcon,{minWidth:"20px"})),{outlineOffset:"0px !important",padding:"default"===e.size?"6px 10px":"10px"}),containedPrimary:d(e),containedSecondary:u(e),outlinedSecondary:b(e),iconSizeMedium:g(e),startIcon:e=>e.hasLabel?{marginLeft:"0px"}:{margin:"0px"}})),{classNamePrefix:"docflow-button"}),F=(e,t)=>{switch(t){case"secondary":return e.palette.N100;case"action":return e.palette.B400;case"success":return e.palette.G400;case"danger":return e.palette.R400;default:return e.palette.N700}};const h=a.makeStyles((function(e){return{root:t=>Object.assign(Object.assign({},e.typography.textStyles[`${t.weight.charAt(0).toUpperCase()}${t.size}`]),{color:F(e,t.color)})}}),{classNamePrefix:"docflow-typography"});const m=o.styled("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.M100))),f=o.styled("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.R100))),y=o.styled("div")((({theme:e})=>Object.assign(Object.assign({color:e.palette.N70},e.typography.textStyles.M100),{marginTop:"6px"}))),N=({tooltip:e,secondaryTooltip:t,tertiaryTooltip:o})=>l.default.createElement(l.default.Fragment,null,l.default.createElement(m,null,e),t&&l.default.createElement(f,null,t),o&&l.default.createElement(y,null,o)),O=o.makeStyles((e=>({tooltip:{backgroundColor:e.palette.N700,borderRadius:"6px",padding:"5px 10px",boxShadow:e.shadow.S100}})),{classNamePrefix:"docflow-button"}),A=e=>{var{children:t,tooltip:a,secondaryTooltip:r,tertiaryTooltip:n,placement:i="bottom",open:s}=e,c=p(e,["children","tooltip","secondaryTooltip","tertiaryTooltip","placement","open"]);const d=O(),u=Object.assign({classes:d},c),b=l.default.createElement(N,{tooltip:a,secondaryTooltip:r,tertiaryTooltip:n}),g=void 0!==s?{open:s,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0}:{};return l.default.createElement(o.Tooltip,Object.assign({title:b,open:s,placement:i},g,u),l.default.createElement("span",null,t))};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},j.apply(this,arguments)}var w=function(e){return i.createElement("svg",j({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e))};const C=(e,t)=>{e=e.substr(1);const o=new RegExp(`.{1,${e.length/3}}`,"g");let a=e.match(o);return a&&1===a[0].length&&(a=a.map((e=>e+e))),a?`rgba(${a.map((e=>parseInt(e,16))).join(", ")}, ${t})`:""},v={N0:"#FFFFFF",N10:"#FAFAFB",N20:"#F5F6F6",N30:"#EBECEE",N40:"#E1E2E4",N50:"#C3C6CA",N60:"#AFB2B8",N70:"#A5A8AF",N80:"#969AA2",N90:"#878C95",N100:"#787D87",N200:"#696F7A",N300:"#5A616D",N400:"#4E5561",N500:"#3F4754",N600:"#323A49",N700:"#202939",N800:"#121B2C",N900:"#050F21",N0A:C("#FFFFFF",.01),N10A:C("#050F21",.02),N20A:C("#050F21",.04),N30A:C("#050F21",.08),N40A:C("#050F21",.12),N50A:C("#050F21",.24),N60A:C("#050F21",.32),N70A:C("#050F21",.36),N80A:C("#050F21",.42),N90A:C("#050F21",.48),N100A:C("#050F21",.54),N200A:C("#050F21",.6),N300A:C("#050F21",.66),N400A:C("#050F21",.71),N500A:C("#050F21",.77),N600A:C("#050F21",.82),N700A:C("#050F21",.89),N800A:C("#050F21",.95),N900A:C("#050F21",1)};var E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},{R50:"#FFEBE6",R75:"#FFBDAD",R100:"#FF8F73",R200:"#FF7452",R300:"#FF5630",R400:"#DE350B",R500:"#BF2600"}),{Y50:"#FFFAE6",Y75:"#FFF0B3",Y100:"#FFE680",Y200:"#FFC300",Y300:"#FFAA00",Y400:"#FF9500",Y500:"#FF8800"}),{G50:"#E3FCEF",G75:"#ABF5D1",G100:"#79F2C0",G200:"#57D9A3",G300:"#36B37E",G400:"#00875A",G500:"#006644"}),{T50:"#E6FCFF",T75:"#B3F5FF",T100:"#79E2F2",T200:"#00C7E6",T300:"#00B8D9",T400:"#00A3BF",T500:"#008DA6"}),{B50:"#EFF4FF",B75:"#DEE9FF",B100:"#ADC8FF",B200:"#7CA8FF",B300:"#4B87FF",B400:"#1C69FF",B500:"#0049DC"}),{P50:"#EAE6FF",P75:"#C0B6F2",P100:"#998DD9",P200:"#8777D9",P300:"#6554C0",P400:"#5243AA",P500:"#403294"}),v);const S='"Roboto", "Helvetica", "Arial", sans-serif',k={100:"12px",200:"14px",300:"16px",400:"18px",500:"20px",600:"24px",700:"30px",800:"36px",900:"40px"},B={regular:400,medium:500,bold:700},T={100:"16px",200:"20px",300:"24px",400:"26px",500:"28px",600:"32px",700:"36px",800:"40px",900:"48px"},P={100:"0.005em",200:"0.005em",300:"0.005em",400:"0.005em",500:"0.005em",600:"0.005em",700:"0.0025em",800:"0em",900:"0em"},z=(e,t)=>({fontFamily:S,fontSize:k[e],fontWeight:B[t],lineHeight:T[e],letterSpacing:P[e]});const R={palette:E,typography:{fontFamily:S,fontSizes:k,fontWeights:B,lineHeights:T,letterSpacings:P,textStyles:(()=>{const e=Object.keys(B);return Object.keys(k).reduce(((t,o)=>{for(const a of e){t[a.charAt(0).toUpperCase()+o]=z(o,a)}return t}),{})})()},shadow:{none:"none",S100:"0px 1px 3px rgba(10, 29, 69, 0.16), 0px 0px 1px rgba(10, 29, 69, 0.16)",S200:"0px 2px 8px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S300:"0px 4px 12px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S400:"0px 8px 18px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S500:"0px 12px 24px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)"}},D={secondary:R.palette.N100,action:R.palette.B400,success:R.palette.G400,danger:R.palette.R400,main:R.palette.N700},$={100:"20px",200:"24px",300:"32px"},G=a.createGenerateClassName({productionPrefix:"docflow-"}),M=a.createMuiTheme(Object.assign(Object.assign({},R),{props:{MuiTypography:{variantMapping:{body1:"p",body2:"span"}}}}));exports.Button=e=>{var{children:t,onClick:o,type:a="button",disabled:r=!1,variant:n="primary",size:i="default",to:c,fullWidth:d,icon:u,linkComponent:b,tooltip:g,tooltipPlacement:F}=e,h=p(e,["children","onClick","type","disabled","variant","size","to","fullWidth","icon","linkComponent","tooltip","tooltipPlacement"]);const m="outlined"===n?"outlined":"contained",f="primary"===n?"primary":"secondary",y=x({variant:n,size:i,hasIcon:!!u,hasLabel:!!t}),N=Object.assign(Object.assign({startIcon:u,classes:y,type:a,color:f,variant:m,onClick:o,disabled:r,size:"medium",fullWidth:d,disableRipple:!0},c&&{to:c,component:b}),h);return g?l.default.createElement(A,{tooltip:g,placement:F},l.default.createElement(s.default,Object.assign({},N),t)):l.default.createElement(s.default,Object.assign({},N),t)},exports.Icon=({color:e="main",size:t="200",weight:o="regular",name:a="person-circle"})=>l.default.createElement("svg",{"aria-hidden":"true",fill:D[e],width:$[t],height:$[t]},l.default.createElement("use",{xlinkHref:`${w}#${a}-${o}`})),exports.ThemeProvider=({children:e})=>l.default.createElement(l.default.Fragment,null,l.default.createElement(a.ThemeProvider,{theme:M},l.default.createElement(a.StylesProvider,{generateClassName:G},e))),exports.Tooltip=A,exports.Typography=e=>{var{children:t,color:a="main",size:r="200",weight:n="regular",renderAs:i="span"}=e,s=p(e,["children","color","size","weight","renderAs"]);const c=h({size:r,weight:n,color:a}),d="span"===i?"body2":"p"===i?"body1":i;return l.default.createElement(o.Typography,Object.assign({classes:c,variant:d},s),t)}; | ||
function p(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]])}return a}const c=e=>Object.assign({transitionTimingFunction:"ease-in-out",transitionDuration:"0.1s",textTransform:"none",borderRadius:"6px",boxShadow:e.shadow.none},e.typography.textStyles.M200),d=e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.B400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.B500,boxShadow:e.shadow.none},"&:active":{background:`linear-gradient(0deg, ${e.palette.N50A}, ${e.palette.N50A}), ${e.palette.B500}`,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}),u=e=>({variant:t})=>{switch(t){case"tertiary":return(e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.N0,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);case"danger":return(e=>Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.R400,color:e.palette.N0,"&:hover":{backgroundColor:e.palette.R300,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.R500,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}}))(e);default:return Object.assign(Object.assign({},c(e)),{backgroundColor:e.palette.N20,color:e.palette.N700,"&:hover":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N40,boxShadow:e.shadow.none},"&:disabled":{backgroundColor:e.palette.N20A,color:e.palette.N60}})}},b=e=>Object.assign(Object.assign({},c(e)),{border:"0px",outline:`${e.palette.N40} solid 1px !important`,backgroundColor:e.palette.N0,color:e.palette.N300,"&:hover":{border:"0px",backgroundColor:e.palette.N20,boxShadow:e.shadow.none},"&:active":{backgroundColor:e.palette.N30,boxShadow:e.shadow.none},"&:disabled":{border:"0px",backgroundColor:e.palette.N20A,color:e.palette.N60}}),g=e=>t=>({"& > *:first-child":Object.assign({},"default"!==t.size||t.hasLabel?{fontSize:e.typography.fontSizes[200],paddingTop:"3px",paddingBottom:"3px"}:{fontSize:e.typography.fontSizes[100],paddingTop:"2px",paddingBottom:"2px"})});const F=a.makeStyles((e=>({root:e=>Object.assign(Object.assign({},(e.hasIcon,{minWidth:"20px"})),{outlineOffset:"0px !important",padding:"default"===e.size?"6px 10px":"10px"}),containedPrimary:d(e),containedSecondary:u(e),outlinedSecondary:b(e),iconSizeMedium:g(e),startIcon:e=>e.hasLabel?{marginLeft:"0px"}:{margin:"0px"}})),{classNamePrefix:"docflow-button"}),x=(e,t)=>{switch(t){case"secondary":return e.palette.N100;case"action":return e.palette.B400;case"success":return e.palette.G400;case"danger":return e.palette.R400;default:return e.palette.N700}};const h=o.makeStyles((function(e){return{root:t=>Object.assign(Object.assign({},e.typography.textStyles[`${t.weight.charAt(0).toUpperCase()}${t.size}`]),{color:x(e,t.color)})}}),{classNamePrefix:"docflow-typography"});const m=a.styled("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.M100))),y=a.styled("div")((({theme:e})=>Object.assign({color:e.palette.N0},e.typography.textStyles.R100))),f=a.styled("div")((({theme:e})=>Object.assign(Object.assign({color:e.palette.N70},e.typography.textStyles.M100),{marginTop:"6px"}))),N=({tooltip:e,secondaryTooltip:t,tertiaryTooltip:a})=>l.default.createElement(l.default.Fragment,null,l.default.createElement(m,null,e),t&&l.default.createElement(y,null,t),a&&l.default.createElement(f,null,a)),O=a.makeStyles((e=>({tooltip:{backgroundColor:e.palette.N700,borderRadius:"6px",padding:"5px 10px",boxShadow:e.shadow.S100}})),{classNamePrefix:"docflow-button"}),A=e=>{var{children:t,tooltip:o,secondaryTooltip:r,tertiaryTooltip:n,placement:i="bottom",open:s}=e,c=p(e,["children","tooltip","secondaryTooltip","tertiaryTooltip","placement","open"]);const d=O(),u=Object.assign({classes:d},c),b=l.default.createElement(N,{tooltip:o,secondaryTooltip:r,tertiaryTooltip:n}),g=void 0!==s?{open:s,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0}:{};return l.default.createElement(a.Tooltip,Object.assign({title:b,open:s,placement:i},g,u),l.default.createElement("span",null,t))};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},j.apply(this,arguments)}var w=function(e){return i.createElement("svg",j({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e))};const C=(e,t)=>{e=e.substr(1);const a=new RegExp(`.{1,${e.length/3}}`,"g");let o=e.match(a);return o&&1===o[0].length&&(o=o.map((e=>e+e))),o?`rgba(${o.map((e=>parseInt(e,16))).join(", ")}, ${t})`:""},v={N0:"#FFFFFF",N10:"#FAFAFB",N20:"#F5F6F6",N30:"#EBECEE",N40:"#E1E2E4",N50:"#C3C6CA",N60:"#AFB2B8",N70:"#A5A8AF",N80:"#969AA2",N90:"#878C95",N100:"#787D87",N200:"#696F7A",N300:"#5A616D",N400:"#4E5561",N500:"#3F4754",N600:"#323A49",N700:"#202939",N800:"#121B2C",N900:"#050F21",N0A:C("#FFFFFF",.01),N10A:C("#050F21",.02),N20A:C("#050F21",.04),N30A:C("#050F21",.08),N40A:C("#050F21",.12),N50A:C("#050F21",.24),N60A:C("#050F21",.32),N70A:C("#050F21",.36),N80A:C("#050F21",.42),N90A:C("#050F21",.48),N100A:C("#050F21",.54),N200A:C("#050F21",.6),N300A:C("#050F21",.66),N400A:C("#050F21",.71),N500A:C("#050F21",.77),N600A:C("#050F21",.82),N700A:C("#050F21",.89),N800A:C("#050F21",.95),N900A:C("#050F21",1)};var E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},{R50:"#FFEBE6",R75:"#FFBDAD",R100:"#FF8F73",R200:"#FF7452",R300:"#FF5630",R400:"#DE350B",R500:"#BF2600"}),{Y50:"#FFFAE6",Y75:"#FFF0B3",Y100:"#FFE680",Y200:"#FFC300",Y300:"#FFAA00",Y400:"#FF9500",Y500:"#FF8800"}),{G50:"#E3FCEF",G75:"#ABF5D1",G100:"#79F2C0",G200:"#57D9A3",G300:"#36B37E",G400:"#00875A",G500:"#006644"}),{T50:"#E6FCFF",T75:"#B3F5FF",T100:"#79E2F2",T200:"#00C7E6",T300:"#00B8D9",T400:"#00A3BF",T500:"#008DA6"}),{B50:"#EFF4FF",B75:"#DEE9FF",B100:"#ADC8FF",B200:"#7CA8FF",B300:"#4B87FF",B400:"#1C69FF",B500:"#0049DC"}),{P50:"#EAE6FF",P75:"#C0B6F2",P100:"#998DD9",P200:"#8777D9",P300:"#6554C0",P400:"#5243AA",P500:"#403294"}),v),{primary:{main:"#1C69FF"},secondary:{main:"#1C69FF"}});const S='"Roboto", "Helvetica", "Arial", sans-serif',k={100:"12px",200:"14px",300:"16px",400:"18px",500:"20px",600:"24px",700:"30px",800:"36px",900:"40px"},B={regular:400,medium:500,bold:700},T={100:"16px",200:"20px",300:"24px",400:"26px",500:"28px",600:"32px",700:"36px",800:"40px",900:"48px"},P={100:"0.005em",200:"0.005em",300:"0.005em",400:"0.005em",500:"0.005em",600:"0.005em",700:"0.0025em",800:"0em",900:"0em"},z=(e,t)=>({fontFamily:S,fontSize:k[e],fontWeight:B[t],lineHeight:T[e],letterSpacing:P[e]});const R={palette:E,typography:{fontFamily:S,fontSizes:k,fontWeights:B,lineHeights:T,letterSpacings:P,textStyles:(()=>{const e=Object.keys(B);return Object.keys(k).reduce(((t,a)=>{for(const o of e){t[o.charAt(0).toUpperCase()+a]=z(a,o)}return t}),{})})()},shadow:{none:"none",S100:"0px 1px 3px rgba(10, 29, 69, 0.16), 0px 0px 1px rgba(10, 29, 69, 0.16)",S200:"0px 2px 8px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S300:"0px 4px 12px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S400:"0px 8px 18px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)",S500:"0px 12px 24px rgba(10, 29, 69, 0.2), 0px 0px 1px rgba(10, 29, 69, 0.16)"}},D={secondary:R.palette.N100,action:R.palette.B400,success:R.palette.G400,danger:R.palette.R400,main:R.palette.N700},$={100:"20px",200:"24px",300:"32px"},G=o.createGenerateClassName({productionPrefix:"docflow-"}),M=o.createMuiTheme(Object.assign(Object.assign({},R),{props:{MuiTypography:{variantMapping:{body1:"p",body2:"span"}}}}));exports.Button=e=>{var{children:t,onClick:a,type:o="button",disabled:r=!1,variant:n="primary",size:i="default",to:c,fullWidth:d,icon:u,linkComponent:b,tooltip:g,tooltipPlacement:x}=e,h=p(e,["children","onClick","type","disabled","variant","size","to","fullWidth","icon","linkComponent","tooltip","tooltipPlacement"]);const m="outlined"===n?"outlined":"contained",y="primary"===n?"primary":"secondary",f=F({variant:n,size:i,hasIcon:!!u,hasLabel:!!t}),N=Object.assign(Object.assign({startIcon:u,classes:f,type:o,color:y,variant:m,onClick:a,disabled:r,size:"medium",fullWidth:d,disableRipple:!0},c&&{to:c,component:b}),h);return g?l.default.createElement(A,{tooltip:g,placement:x},l.default.createElement(s.default,Object.assign({},N),t)):l.default.createElement(s.default,Object.assign({},N),t)},exports.Icon=({color:e="main",size:t="200",weight:a="regular",name:o="person-circle"})=>l.default.createElement("svg",{"aria-hidden":"true",fill:D[e],width:$[t],height:$[t]},l.default.createElement("use",{xlinkHref:`${w}#${o}-${a}`})),exports.ThemeProvider=({children:e})=>l.default.createElement(l.default.Fragment,null,l.default.createElement(o.ThemeProvider,{theme:M},l.default.createElement(o.StylesProvider,{generateClassName:G},e))),exports.Tooltip=A,exports.Typography=e=>{var{children:t,color:o="main",size:r="200",weight:n="regular",renderAs:i="span"}=e,s=p(e,["children","color","size","weight","renderAs"]);const c=h({size:r,weight:n,color:o}),d="span"===i?"body2":"p"===i?"body1":i;return l.default.createElement(a.Typography,Object.assign({classes:c,variant:d},s),t)}; | ||
//# sourceMappingURL=index.js.map |
declare const theme: { | ||
palette: { | ||
readonly primary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly secondary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly N0: string; | ||
@@ -4,0 +10,0 @@ readonly N10: string; |
declare const _default: { | ||
readonly primary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly secondary: { | ||
readonly main: "#1C69FF"; | ||
}; | ||
readonly N0: string; | ||
@@ -3,0 +9,0 @@ readonly N10: string; |
{ | ||
"name": "@docflow/component-library", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Docflow component library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1454238
1025
1