@up42/up-components 0.1.8 → 0.2.1
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.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/components/Link/Link.d.ts +31 -4
- package/dist/cjs/types/components/Link/Link.stories.d.ts +5 -1
- package/dist/cjs/types/components/Link/Link.test.d.ts +1 -0
- package/dist/cjs/types/global/icons/index.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/components/Link/Link.d.ts +31 -4
- package/dist/esm/types/components/Link/Link.stories.d.ts +5 -1
- package/dist/esm/types/components/Link/Link.test.d.ts +1 -0
- package/dist/esm/types/global/icons/index.d.ts +2 -0
- package/dist/index.d.ts +30 -2
- package/package.json +4 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@mui/material"),r=require("react"),o=require("@mui/material/styles"),t=require("@mui/material/Button"),n=require("@mui/material/Typography"),a=require("@mui/material/InputAdornment"),i=require("@mui/material/IconButton"),l=require("@mui/icons-material/VisibilityOutlined"),c=require("@mui/icons-material/VisibilityOffOutlined");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=d(r),s=d(t),u=d(n),p=d(a),g=d(i),m=d(l),h=d(c),b={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",base:{indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315"},border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},y=function(){return y=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},y.apply(this,arguments)};function x(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}var v={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:b.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:b.size.spacing.scale8}},colorDefault:{backgroundColor:b.color.gray10,color:b.color.gray60},colorPrimary:{backgroundColor:b.color.indigo10,color:b.color.indigo80},colorSecondary:{backgroundColor:b.color.pink10,color:b.color.pink80},colorError:{backgroundColor:b.color.red10,color:b.color.red50},colorInfo:{backgroundColor:b.color.indigo10,color:b.color.indigo80},colorSuccess:{backgroundColor:b.color.green10,color:b.color.green80}}},k={h1:{fontFamily:b.font.family.heading,fontSize:b.size.font.heading.default,fontWeight:b.font.weight.bold,lineHeight:b.font.lineHeight.xlarge},h2:{fontFamily:b.font.family.heading,fontSize:b.size.font.heading.small,fontWeight:b.font.weight.bold,lineHeight:b.font.lineHeight.xlarge},h3:{fontFamily:b.font.family.heading,fontSize:b.size.font.heading.xsmall,fontWeight:b.font.weight.bold,lineHeight:b.font.lineHeight.large},body1:{fontFamily:b.font.family.text,fontSize:b.size.font.body.default,fontWeight:b.font.weight.normal,lineHeight:b.font.lineHeight.large},body2:{fontFamily:b.font.family.text,fontSize:b.size.font.body.default,fontWeight:b.font.weight.bold,lineHeight:b.font.lineHeight.large},caption:{fontFamily:b.font.family.text,fontSize:b.size.font.caption.default,fontWeight:b.font.weight.normal,lineHeight:b.font.lineHeight.medium},overline:{fontFamily:b.font.family.heading,fontSize:b.size.font.overline.default,letterSpacing:"initial",fontWeight:b.font.weight.bold,color:b.color.gray60}},z={small:"".concat(b.size.spacing.scale4," ").concat(b.size.spacing.scale8),medium:"".concat(b.size.spacing.scale8," ").concat(b.size.spacing.scale16),large:"".concat(b.size.spacing.scale16," ").concat(b.size.spacing.scale32)},S={styleOverrides:{root:{textTransform:"none",lineHeight:b.size.spacing.scale16,fontWeight:b.font.weight.bold,fontFamily:b.font.family.text},contained:{padding:z.medium},containedSizeSmall:{padding:z.small},containedSizeLarge:{padding:z.large},text:{padding:z.medium},textSizeSmall:{padding:z.small},textSizeLarge:{padding:z.large},outlined:{padding:"7px ".concat(b.size.spacing.scale16)},outlinedSizeSmall:{padding:z.small},outlinedSizeLarge:{padding:z.large},sizeSmall:{fontSize:b.size.font.label.default},sizeLarge:{fontSize:b.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},E={styleOverrides:{root:{color:b.color.gray60,backgroundColor:b.color.background.dark},sizeSmall:{padding:"3px"}}},C={styleOverrides:{root:{fontFamily:b.font.family.text,fontSize:b.size.font.label.default,fontWeight:b.font.weight.bold,width:b.size.spacing.scale24,height:b.size.spacing.scale24,"& .MuiSvgIcon-root":{width:b.size.spacing.scale16}},colorDefault:{backgroundColor:b.color.background.dark,"& .MuiSvgIcon-root":{color:b.color.gray60}}}},w={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:b.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:b.color.primary},"&$disabled":{opacity:.5}}}},F={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:b.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},O={styleOverrides:{root:{marginRight:16},colorSecondary:{color:b.color.gray0,"&$checked":{color:b.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:b.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:b.color.background.light,border:"2px solid ".concat(b.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:b.color.primary,border:"2px solid ".concat(b.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},T={styleOverrides:{outlined:{position:"relative",padding:b.size.spacing.scale8,fontSize:b.size.font.label.default,borderRadius:b.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:b.color.background.dark,color:b.color.text.light}}}},M={styleOverrides:{root:{input:{padding:b.size.spacing.scale8,fontSize:b.size.font.label.default,height:b.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(b.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:b.size.spacing.scale16,height:b.size.spacing.scale16}}}}},L={styleOverrides:{outlined:{notchedOutline:{borderColor:b.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}};b.size.font.body.default,b.font.family.text,b.color.gray100;var P={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(b.size.spacing.scale16),fontFamily:b.font.family.text,color:b.color.gray60,padding:"0 0 ".concat(b.size.spacing.scale16," 0"),"&:hover":{color:b.color.primary,opacity:1},"&$selected":{color:b.color.primary},"&:focus":{color:b.color.primary}}},defaultProps:{disableRipple:!0}};b.size.font.caption.default;var B,H,W,I={styleOverrides:{root:{borderBottom:"1px solid ".concat(b.color.gray20)},indicator:{backgroundColor:b.color.primary}}},R={styleOverrides:{root:{fontWeight:b.font.weight.bold,lineHeight:b.font.lineHeight.medium,fontFamily:b.font.family.text,fontSize:b.size.font.caption.default,color:b.color.text.base,marginBottom:b.size.spacing.scale8}}},j=e.createTheme({typography:y({},k),palette:{background:{default:"#ffffff"},primary:{main:b.color.primary},secondary:{main:b.color.secondary},error:{main:b.color.error},info:{main:b.color.info},success:{main:b.color.success}},components:{MuiButton:S,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:E,MuiChip:v,MuiInput:L,MuiTextField:M,MuiFormLabel:R,MuiTabs:I,MuiTab:P,MuiAvatar:C,MuiCheckbox:w,MuiRadio:F,MuiSwitch:O,MuiSelect:T,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),q=o.styled(e.CircularProgress)(W||(B=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],H=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(B,"raw",{value:H}):B.raw=H,W=B)),$={small:6,medium:8,large:12,fluid:12},A=function(r){var o=x(r,[]);return f.default.createElement(e.Checkbox,y({},o))},G=function(r){return f.default.createElement(e.Radio,y({},r))},N=function(r){return f.default.createElement(e.Switch,y({},r))},X=function(r){return f.default.createElement(e.Select,y({variant:"outlined"},r))},D=function(o){var t=o.type,n=x(o,["type"]),a=r.useState(!1),i=a[0],l=a[1],c=y(y({},n.InputProps),"password"===t&&{endAdornment:f.default.createElement(p.default,{position:"end"},f.default.createElement(g.default,{"aria-label":"toggle password visibility",onClick:function(){return l(!i)},edge:"end"},i?f.default.createElement(m.default,null):f.default.createElement(h.default,null)))});return f.default.createElement(e.TextField,y({},n,{type:i?"text":t,InputProps:c}))};exports.Avatar=function(r){var o=r.icon,t=r.firstName,n=void 0===t?"":t,a=r.lastName,i=void 0===a?"":a,l=x(r,["icon","firstName","lastName"]),c="".concat(n.substring(0,1)).concat(i.substring(0,1)).toLocaleUpperCase(),d=c?b.color.secondary:b.color.background.dark;return f.default.createElement(e.Avatar,y({sx:y({backgroundColor:d},l.sx)},l),c||o)},exports.Box=function(r){var o=r.children,t=x(r,["children"]);return f.default.createElement(e.Box,y({},t),o)},exports.Button=function(e){var r=e.color,o=void 0===r?"primary":r,t=e.variant,n=void 0===t?"contained":t,a=e.size,i=void 0===a?"medium":a,l=e.loading,c=e.children,d=x(e,["color","variant","size","loading","children"]);return f.default.createElement(s.default,y({size:i,variant:n,color:o,disabled:l},d),f.default.createElement("span",{style:{opacity:l?0:1}},c),l&&f.default.createElement(q,{size:20,color:"inherit"}))},exports.Checkbox=A,exports.Chip=function(r){var o=r.label,t=x(r,["label"]);return f.default.createElement(e.Chip,y({size:"small",label:o},t))},exports.Container=function(r){var o=r.component,t=void 0===o?"div":o,n=r.size,a=void 0===n?"large":n,i=r.children,l=x(r,["component","size","children"]),c="fluid"===a;return f.default.createElement(e.Container,y({component:t,disableGutters:c,maxWidth:!c&&"lg",sx:y({display:"flex",justifyContent:"center"},l.sx)},l),f.default.createElement(e.Grid,{container:!0,justifyContent:"center"},f.default.createElement(e.Grid,{item:!0,md:$[a]},i)))},exports.FormCheckbox=function(r){var o=r.id,t=r.required,n=void 0===t||t,a=r.data,i=r.label,l=r.error,c=r.helperText;return f.default.createElement(e.FormControl,null,f.default.createElement(e.FormLabel,{component:"label",error:l},i," ",n?"":f.default.createElement(e.Box,{component:"span",sx:{fontWeight:b.font.weight.normal,color:b.color.text.light}},"(optional)")),f.default.createElement(e.FormGroup,null,a.map((function(r,t){var n=r.value,a=r.label;return f.default.createElement(e.FormControlLabel,{key:t,value:n,label:a||"",sx:{fontSize:b.size.font.base,color:b.color.text.base},control:f.default.createElement(A,{color:"primary",inputProps:{"data-testid":"".concat(o,"-").concat(t)}})})}))),l&&f.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:l},c))},exports.FormInput=function(r){var o=r.id,t=r.required,n=void 0===t||t,a=r.label,i=r.error,l=r.helperText,c=x(r,["id","required","label","error","helperText"]);return f.default.createElement(e.FormControl,null,f.default.createElement(e.FormLabel,{component:"label",error:i},a," ",!n&&f.default.createElement(e.Box,{component:"span",sx:{fontWeight:b.font.weight.normal,color:b.color.text.light}},"(optional)")),f.default.createElement(D,y({},c,{id:o,error:i,inputProps:{"data-testid":o}})),i&&f.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:i},l))},exports.FormRadio=function(r){var o=r.id,t=r.helperText,n=r.label,a=r.error,i=r.required,l=void 0===i||i,c=r.name,d=r.data;return f.default.createElement(e.FormControl,{component:"fieldset",error:a},f.default.createElement(e.FormLabel,{component:"legend"},n," ",l?"":f.default.createElement(e.Box,{component:"span",sx:{fontWeight:b.font.weight.normal,color:b.color.text.light}},"(optional)")),f.default.createElement(e.RadioGroup,{"aria-label":c,name:c},d.map((function(r,t){var n=r.value,a=r.label;return f.default.createElement(e.FormControlLabel,{value:n,key:n,label:a||"",sx:{fontSize:b.size.font.base,color:b.color.text.base},control:f.default.createElement(G,{color:"primary",inputProps:{"data-testid":"".concat(o,"-").concat(t)}})})}))),a&&f.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0}},t))},exports.FormSelect=function(r){var o=r.id,t=r.required,n=void 0===t||t,a=r.options,i=r.label,l=r.error,c=r.placeholder,d=r.helperText;return f.default.createElement(e.FormControl,null,f.default.createElement(e.FormLabel,{component:"label",error:l},i," ",n?"":f.default.createElement(e.Box,{component:"span",sx:{fontWeight:b.font.weight.normal,color:b.color.text.light}},"(optional)")),f.default.createElement(X,{id:o,placeholder:c,error:l},a.map((function(r){return f.default.createElement(e.MenuItem,{key:r.value,value:r.value},r.text)}))),l&&f.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:l},d))},exports.FormSwitch=function(r){var o=r.id,t=r.label,n=r.checked;return f.default.createElement(e.FormControl,null,f.default.createElement(e.FormLabel,{component:"label"},t),f.default.createElement(e.FormControlLabel,{control:f.default.createElement(N,{id:o}),label:"".concat(n?"Active":"Inactive")}))},exports.Input=D,exports.Link=function(r){var o=r.children,t=x(r,["children"]);return f.default.createElement(e.Link,y({underline:"hover",variant:"caption",component:"span"},t),o)},exports.Radio=G,exports.Select=X,exports.Switch=N,exports.Typography=function(e){var r=e.children,o=x(e,["children"]);return f.default.createElement(u.default,y({},o),r)},exports.UpComponentsProvider=function(r){return f.default.createElement(f.default.Fragment,null,f.default.createElement(e.CssBaseline,null),f.default.createElement(o.ThemeProvider,{theme:j},r.children))},exports.theme=j,exports.tokens=b,Object.keys(e).forEach((function(r){"default"===r||exports.hasOwnProperty(r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})}));
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@mui/material"),r=require("react"),t=require("@mui/material/styles"),o=require("@mui/material/Button"),n=require("@mui/material/Typography"),a=require("@mui/material/InputAdornment"),i=require("@mui/material/IconButton"),l=require("@mui/icons-material/VisibilityOutlined"),c=require("@mui/icons-material/VisibilityOffOutlined");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var s=d(r),u=f(r),p=d(o),m=d(n),g=d(a),h=d(i),b=d(l),x=d(c),y={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},v=function(){return v=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},v.apply(this,arguments)};function z(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)r.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]])}return t}var k={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:y.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:y.size.spacing.scale8}},colorDefault:{backgroundColor:y.color.gray10,color:y.color.gray60},colorPrimary:{backgroundColor:y.color.indigo10,color:y.color.indigo80},colorSecondary:{backgroundColor:y.color.pink10,color:y.color.pink80},colorError:{backgroundColor:y.color.red10,color:y.color.error},colorInfo:{backgroundColor:y.color.indigo10,color:y.color.indigo80},colorSuccess:{backgroundColor:y.color.green10,color:y.color.green80}}},E={h1:{fontFamily:y.font.family.heading,fontSize:y.size.font.heading.default,fontWeight:y.font.weight.bold,lineHeight:y.font.lineHeight.xlarge},h2:{fontFamily:y.font.family.heading,fontSize:y.size.font.heading.small,fontWeight:y.font.weight.bold,lineHeight:y.font.lineHeight.xlarge},h3:{fontFamily:y.font.family.heading,fontSize:y.size.font.heading.xsmall,fontWeight:y.font.weight.bold,lineHeight:y.font.lineHeight.large},body1:{fontFamily:y.font.family.text,fontSize:y.size.font.body.default,fontWeight:y.font.weight.normal,lineHeight:y.font.lineHeight.large},body2:{fontFamily:y.font.family.text,fontSize:y.size.font.body.default,fontWeight:y.font.weight.bold,lineHeight:y.font.lineHeight.large},caption:{fontFamily:y.font.family.text,fontSize:y.size.font.caption.default,fontWeight:y.font.weight.normal,lineHeight:y.font.lineHeight.medium},overline:{fontFamily:y.font.family.heading,fontSize:y.size.font.overline.default,letterSpacing:"initial",fontWeight:y.font.weight.bold,color:y.color.gray60}},S={small:"".concat(y.size.spacing.scale4," ").concat(y.size.spacing.scale8),medium:"".concat(y.size.spacing.scale8," ").concat(y.size.spacing.scale16),large:"".concat(y.size.spacing.scale16," ").concat(y.size.spacing.scale32)},C={styleOverrides:{root:{textTransform:"none",lineHeight:y.size.spacing.scale16,fontWeight:y.font.weight.bold,fontFamily:y.font.family.text},contained:{padding:S.medium},containedSizeSmall:{padding:S.small},containedSizeLarge:{padding:S.large},text:{padding:S.medium},textSizeSmall:{padding:S.small},textSizeLarge:{padding:S.large},outlined:{padding:"7px ".concat(y.size.spacing.scale16)},outlinedSizeSmall:{padding:S.small},outlinedSizeLarge:{padding:S.large},sizeSmall:{fontSize:y.size.font.label.default},sizeLarge:{fontSize:y.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},w={styleOverrides:{root:{color:y.color.gray60,backgroundColor:y.color.background.dark},sizeSmall:{padding:"3px"}}},O={styleOverrides:{root:{fontFamily:y.font.family.text,fontSize:y.size.font.label.default,fontWeight:y.font.weight.bold,width:y.size.spacing.scale24,height:y.size.spacing.scale24,"& .MuiSvgIcon-root":{width:y.size.spacing.scale16}},colorDefault:{backgroundColor:y.color.background.dark,"& .MuiSvgIcon-root":{color:y.color.gray60}}}},F={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:y.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:y.color.primary},"&$disabled":{opacity:.5}}}},T={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:y.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},L={styleOverrides:{root:{marginRight:16},colorSecondary:{color:y.color.gray0,"&$checked":{color:y.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:y.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:y.color.background.light,border:"2px solid ".concat(y.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:y.color.primary,border:"2px solid ".concat(y.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},M={styleOverrides:{outlined:{position:"relative",padding:y.size.spacing.scale8,fontSize:y.size.font.label.default,borderRadius:y.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:y.color.background.dark,color:y.color.text.light}}}},P={styleOverrides:{root:{input:{padding:y.size.spacing.scale8,fontSize:y.size.font.label.default,height:y.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(y.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:y.size.spacing.scale16,height:y.size.spacing.scale16}}}}},j={styleOverrides:{outlined:{notchedOutline:{borderColor:y.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}};y.size.font.body.default,y.font.family.text,y.color.gray100;var B={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(y.size.spacing.scale16),fontFamily:y.font.family.text,color:y.color.gray60,padding:"0 0 ".concat(y.size.spacing.scale16," 0"),"&:hover":{color:y.color.primary,opacity:1},"&$selected":{color:y.color.primary},"&:focus":{color:y.color.primary}}},defaultProps:{disableRipple:!0}};y.size.font.caption.default;var W,H,I,R,q={styleOverrides:{root:{borderBottom:"1px solid ".concat(y.color.gray20)},indicator:{backgroundColor:y.color.primary}}},A={styleOverrides:{root:{fontWeight:y.font.weight.bold,lineHeight:y.font.lineHeight.medium,fontFamily:y.font.family.text,fontSize:y.size.font.caption.default,color:y.color.text.base,marginBottom:y.size.spacing.scale8}}},$=e.createTheme({typography:v({},E),palette:{background:{default:"#ffffff"},primary:{main:y.color.primary},secondary:{main:y.color.secondary},error:{main:y.color.error},info:{main:y.color.info},success:{main:y.color.success}},components:{MuiButton:C,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:w,MuiChip:k,MuiInput:j,MuiTextField:P,MuiFormLabel:A,MuiTabs:q,MuiTab:B,MuiAvatar:O,MuiCheckbox:F,MuiRadio:T,MuiSwitch:L,MuiSelect:M,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),N=t.styled(e.CircularProgress)(I||(W=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],H=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(W,"raw",{value:H}):W.raw=H,I=W)),G={small:6,medium:8,large:12,fluid:12},V=function(r){var t=z(r,[]);return s.default.createElement(e.Checkbox,v({},t))},_=function(r){return s.default.createElement(e.Radio,v({},r))},D=function(r){return s.default.createElement(e.Switch,v({},r))},X=function(r){return s.default.createElement(e.Select,v({variant:"outlined"},r))},U=function(t){var o=t.type,n=z(t,["type"]),a=r.useState(!1),i=a[0],l=a[1],c=v(v({},n.InputProps),"password"===o&&{endAdornment:s.default.createElement(g.default,{position:"end"},s.default.createElement(h.default,{"aria-label":"toggle password visibility",onClick:function(){return l(!i)},edge:"end"},i?s.default.createElement(b.default,null):s.default.createElement(x.default,null)))});return s.default.createElement(e.TextField,v({},n,{type:i?"text":o,InputProps:c}))};function J(){return J=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},J.apply(this,arguments)}var K=function(e){return u.createElement("svg",J({viewBox:"0 0 24 24"},e),R||(R=u.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12.141 4.894H3.576A1.977 1.977 0 0 0 1.6 6.871v14.494c0 1.09.885 1.976 1.976 1.976h14.495a1.977 1.977 0 0 0 1.976-1.976V12.8M17.412 1.6h4.94a.99.99 0 0 1 .99.988V7.53m-10.883 4.952L23.05 1.89"})))};exports.Avatar=function(r){var t=r.icon,o=r.firstName,n=void 0===o?"":o,a=r.lastName,i=void 0===a?"":a,l=z(r,["icon","firstName","lastName"]),c="".concat(n.substring(0,1)).concat(i.substring(0,1)).toLocaleUpperCase(),d=c?y.color.secondary:y.color.background.dark;return s.default.createElement(e.Avatar,v({sx:v({backgroundColor:d},l.sx)},l),c||t)},exports.Box=function(r){var t=r.children,o=z(r,["children"]);return s.default.createElement(e.Box,v({},o),t)},exports.Button=function(e){var r=e.color,t=void 0===r?"primary":r,o=e.variant,n=void 0===o?"contained":o,a=e.size,i=void 0===a?"medium":a,l=e.loading,c=e.children,d=z(e,["color","variant","size","loading","children"]);return s.default.createElement(p.default,v({size:i,variant:n,color:t,disabled:l},d),s.default.createElement("span",{style:{opacity:l?0:1}},c),l&&s.default.createElement(N,{size:20,color:"inherit"}))},exports.Checkbox=V,exports.Chip=function(r){var t=r.label,o=z(r,["label"]);return s.default.createElement(e.Chip,v({size:"small",label:t},o))},exports.Container=function(r){var t=r.component,o=void 0===t?"div":t,n=r.size,a=void 0===n?"large":n,i=r.children,l=z(r,["component","size","children"]),c="fluid"===a;return s.default.createElement(e.Container,v({component:o,disableGutters:c,maxWidth:!c&&"lg",sx:v({display:"flex",justifyContent:"center"},l.sx)},l),s.default.createElement(e.Grid,{container:!0,justifyContent:"center"},s.default.createElement(e.Grid,{item:!0,md:G[a]},i)))},exports.FormCheckbox=function(r){var t=r.id,o=r.required,n=void 0===o||o,a=r.data,i=r.label,l=r.error,c=r.helperText;return s.default.createElement(e.FormControl,null,s.default.createElement(e.FormLabel,{component:"label",error:l},i," ",n?"":s.default.createElement(e.Box,{component:"span",sx:{fontWeight:y.font.weight.normal,color:y.color.text.light}},"(optional)")),s.default.createElement(e.FormGroup,null,a.map((function(r,o){var n=r.value,a=r.label;return s.default.createElement(e.FormControlLabel,{key:o,value:n,label:a||"",sx:{fontSize:y.size.font.base,color:y.color.text.base},control:s.default.createElement(V,{color:"primary",inputProps:{"data-testid":"".concat(t,"-").concat(o)}})})}))),l&&s.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:l},c))},exports.FormInput=function(r){var t=r.id,o=r.required,n=void 0===o||o,a=r.label,i=r.error,l=r.helperText,c=z(r,["id","required","label","error","helperText"]);return s.default.createElement(e.FormControl,null,s.default.createElement(e.FormLabel,{component:"label",error:i},a," ",!n&&s.default.createElement(e.Box,{component:"span",sx:{fontWeight:y.font.weight.normal,color:y.color.text.light}},"(optional)")),s.default.createElement(U,v({},c,{id:t,error:i,inputProps:{"data-testid":t}})),i&&s.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:i},l))},exports.FormRadio=function(r){var t=r.id,o=r.helperText,n=r.label,a=r.error,i=r.required,l=void 0===i||i,c=r.name,d=r.data;return s.default.createElement(e.FormControl,{component:"fieldset",error:a},s.default.createElement(e.FormLabel,{component:"legend"},n," ",l?"":s.default.createElement(e.Box,{component:"span",sx:{fontWeight:y.font.weight.normal,color:y.color.text.light}},"(optional)")),s.default.createElement(e.RadioGroup,{"aria-label":c,name:c},d.map((function(r,o){var n=r.value,a=r.label;return s.default.createElement(e.FormControlLabel,{value:n,key:n,label:a||"",sx:{fontSize:y.size.font.base,color:y.color.text.base},control:s.default.createElement(_,{color:"primary",inputProps:{"data-testid":"".concat(t,"-").concat(o)}})})}))),a&&s.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0}},o))},exports.FormSelect=function(r){var t=r.id,o=r.required,n=void 0===o||o,a=r.options,i=r.label,l=r.error,c=r.placeholder,d=r.helperText;return s.default.createElement(e.FormControl,null,s.default.createElement(e.FormLabel,{component:"label",error:l},i," ",n?"":s.default.createElement(e.Box,{component:"span",sx:{fontWeight:y.font.weight.normal,color:y.color.text.light}},"(optional)")),s.default.createElement(X,{id:t,placeholder:c,error:l},a.map((function(r){return s.default.createElement(e.MenuItem,{key:r.value,value:r.value},r.text)}))),l&&s.default.createElement(e.FormHelperText,{sx:{marginLeft:0,marginRight:0},error:l},d))},exports.FormSwitch=function(r){var t=r.id,o=r.label,n=r.checked;return s.default.createElement(e.FormControl,null,s.default.createElement(e.FormLabel,{component:"label"},o),s.default.createElement(e.FormControlLabel,{control:s.default.createElement(D,{id:t}),label:"".concat(n?"Active":"Inactive")}))},exports.Input=U,exports.Link=function(r){var t,o=r.children,n=r.underline,a=void 0===n?"hover":n,i=r.toParentNavigation,l=z(r,["children","underline","toParentNavigation"]),c=null===(t=l.href)||void 0===t?void 0:t.startsWith("https"),d={variant:"caption",underline:a};return i?s.default.createElement(e.Link,v({},d,l,{onClick:function(){return e=i,void window.parent.postMessage({type:"NAVIGATION",content:e},"*");var e}}),o):s.default.createElement(e.Link,v({},d,c&&{target:"_blank",rel:"noopener noreferrer"},l),o,c&&s.default.createElement(e.SvgIcon,{component:K,fontSize:"inherit",sx:{marginLeft:".25em"}}))},exports.Radio=_,exports.Select=X,exports.Switch=D,exports.Typography=function(e){var r=e.children,t=z(e,["children"]);return s.default.createElement(m.default,v({},t),r)},exports.UpComponentsProvider=function(r){return s.default.createElement(s.default.Fragment,null,s.default.createElement(e.CssBaseline,null),s.default.createElement(t.ThemeProvider,{theme:$},r.children))},exports.theme=$,exports.tokens=y,Object.keys(e).forEach((function(r){"default"===r||exports.hasOwnProperty(r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})}));
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { LinkProps as MuiLinkProps } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare type LinkProps<C extends React.ElementType> = MuiLinkProps<C, {
|
|
4
|
+
component?: C;
|
|
5
|
+
}> & {
|
|
6
|
+
/**
|
|
7
|
+
* it expects a client-side path to be sent to the parent container.
|
|
8
|
+
* `toParentNabigation="/my.path"`
|
|
9
|
+
*
|
|
10
|
+
* - It uses the `window.postMessage()` API: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage.
|
|
11
|
+
* - Parent message listener: https://github.com/up42/console-ui/blob/master/plugins/iframe-message-handler.js#L7-L9
|
|
12
|
+
*/
|
|
13
|
+
toParentNavigation?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* ### Routing Libraries
|
|
17
|
+
* You can achieve the integration with third-party routing libraries (i.e `@reach/router`) with the `component` prop.
|
|
18
|
+
* You can learn more about this here: https://mui.com/guides/routing/#component-prop
|
|
19
|
+
*
|
|
20
|
+
* ```js
|
|
21
|
+
* import { Link as RouterLink } from '@reach/router'
|
|
22
|
+
* import { Link } from '@up42/up-components'
|
|
23
|
+
*
|
|
24
|
+
* <Link component={RouterLink} to="/my-path">
|
|
25
|
+
* client-side navigation link.
|
|
26
|
+
* </Link>
|
|
27
|
+
```
|
|
28
|
+
*
|
|
29
|
+
* ### Parent Navigation
|
|
30
|
+
* this component exposes `toParentNavigation` prop that facilitates between iframe and parent container's client-side navigation.
|
|
31
|
+
*/
|
|
32
|
+
export declare const Link: <C extends React.ElementType<any>>({ children, underline, toParentNavigation, ...props }: LinkProps<C>) => JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const Internal: Story<import("@storybook/react").Args>;
|
|
5
|
+
export declare const External: Story<import("@storybook/react").Args>;
|
|
6
|
+
export declare const ParentCommunication: Story<import("@storybook/react").Args>;
|
|
7
|
+
export declare const Button: Story<import("@storybook/react").Args>;
|
|
8
|
+
export declare const Error: Story<import("@storybook/react").Args>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createTheme as e,CssBaseline as r,CircularProgress as o,Chip as n,Avatar as t,Container as i,Grid as a,Box as l,Checkbox as c,FormControl as d,FormLabel as f,FormGroup as s,FormControlLabel as g,FormHelperText as m,Radio as p,RadioGroup as u,Switch as h,Select as b,MenuItem as y,TextField as x,Link as v}from"@mui/material";export*from"@mui/material";import z,{useState as k}from"react";import{ThemeProvider as E,styled as S}from"@mui/material/styles";import w from"@mui/material/Button";import C from"@mui/material/Typography";import O from"@mui/material/InputAdornment";import T from"@mui/material/IconButton";import M from"@mui/icons-material/VisibilityOutlined";import W from"@mui/icons-material/VisibilityOffOutlined";var P={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",base:{indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315"},border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},F=function(){return F=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++)for(var t in r=arguments[o])Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e},F.apply(this,arguments)};function L(e,r){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)r.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(o[n[t]]=e[n[t]])}return o}var H={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:P.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:P.size.spacing.scale8}},colorDefault:{backgroundColor:P.color.gray10,color:P.color.gray60},colorPrimary:{backgroundColor:P.color.indigo10,color:P.color.indigo80},colorSecondary:{backgroundColor:P.color.pink10,color:P.color.pink80},colorError:{backgroundColor:P.color.red10,color:P.color.red50},colorInfo:{backgroundColor:P.color.indigo10,color:P.color.indigo80},colorSuccess:{backgroundColor:P.color.green10,color:P.color.green80}}},B={h1:{fontFamily:P.font.family.heading,fontSize:P.size.font.heading.default,fontWeight:P.font.weight.bold,lineHeight:P.font.lineHeight.xlarge},h2:{fontFamily:P.font.family.heading,fontSize:P.size.font.heading.small,fontWeight:P.font.weight.bold,lineHeight:P.font.lineHeight.xlarge},h3:{fontFamily:P.font.family.heading,fontSize:P.size.font.heading.xsmall,fontWeight:P.font.weight.bold,lineHeight:P.font.lineHeight.large},body1:{fontFamily:P.font.family.text,fontSize:P.size.font.body.default,fontWeight:P.font.weight.normal,lineHeight:P.font.lineHeight.large},body2:{fontFamily:P.font.family.text,fontSize:P.size.font.body.default,fontWeight:P.font.weight.bold,lineHeight:P.font.lineHeight.large},caption:{fontFamily:P.font.family.text,fontSize:P.size.font.caption.default,fontWeight:P.font.weight.normal,lineHeight:P.font.lineHeight.medium},overline:{fontFamily:P.font.family.heading,fontSize:P.size.font.overline.default,letterSpacing:"initial",fontWeight:P.font.weight.bold,color:P.color.gray60}},I={small:"".concat(P.size.spacing.scale4," ").concat(P.size.spacing.scale8),medium:"".concat(P.size.spacing.scale8," ").concat(P.size.spacing.scale16),large:"".concat(P.size.spacing.scale16," ").concat(P.size.spacing.scale32)},R={styleOverrides:{root:{textTransform:"none",lineHeight:P.size.spacing.scale16,fontWeight:P.font.weight.bold,fontFamily:P.font.family.text},contained:{padding:I.medium},containedSizeSmall:{padding:I.small},containedSizeLarge:{padding:I.large},text:{padding:I.medium},textSizeSmall:{padding:I.small},textSizeLarge:{padding:I.large},outlined:{padding:"7px ".concat(P.size.spacing.scale16)},outlinedSizeSmall:{padding:I.small},outlinedSizeLarge:{padding:I.large},sizeSmall:{fontSize:P.size.font.label.default},sizeLarge:{fontSize:P.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},j={styleOverrides:{root:{color:P.color.gray60,backgroundColor:P.color.background.dark},sizeSmall:{padding:"3px"}}},$={styleOverrides:{root:{fontFamily:P.font.family.text,fontSize:P.size.font.label.default,fontWeight:P.font.weight.bold,width:P.size.spacing.scale24,height:P.size.spacing.scale24,"& .MuiSvgIcon-root":{width:P.size.spacing.scale16}},colorDefault:{backgroundColor:P.color.background.dark,"& .MuiSvgIcon-root":{color:P.color.gray60}}}},A={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:P.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:P.color.primary},"&$disabled":{opacity:.5}}}},q={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:P.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},N={styleOverrides:{root:{marginRight:16},colorSecondary:{color:P.color.gray0,"&$checked":{color:P.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:P.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:P.color.background.light,border:"2px solid ".concat(P.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:P.color.primary,border:"2px solid ".concat(P.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},X={styleOverrides:{outlined:{position:"relative",padding:P.size.spacing.scale8,fontSize:P.size.font.label.default,borderRadius:P.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:P.color.background.dark,color:P.color.text.light}}}},D={styleOverrides:{root:{input:{padding:P.size.spacing.scale8,fontSize:P.size.font.label.default,height:P.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(P.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:P.size.spacing.scale16,height:P.size.spacing.scale16}}}}},V={styleOverrides:{outlined:{notchedOutline:{borderColor:P.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}};P.size.font.body.default,P.font.family.text,P.color.gray100;var G={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(P.size.spacing.scale16),fontFamily:P.font.family.text,color:P.color.gray60,padding:"0 0 ".concat(P.size.spacing.scale16," 0"),"&:hover":{color:P.color.primary,opacity:1},"&$selected":{color:P.color.primary},"&:focus":{color:P.color.primary}}},defaultProps:{disableRipple:!0}};P.size.font.caption.default;var U,J,K,Q={styleOverrides:{root:{borderBottom:"1px solid ".concat(P.color.gray20)},indicator:{backgroundColor:P.color.primary}}},Y={styleOverrides:{root:{fontWeight:P.font.weight.bold,lineHeight:P.font.lineHeight.medium,fontFamily:P.font.family.text,fontSize:P.size.font.caption.default,color:P.color.text.base,marginBottom:P.size.spacing.scale8}}},Z=e({typography:F({},B),palette:{background:{default:"#ffffff"},primary:{main:P.color.primary},secondary:{main:P.color.secondary},error:{main:P.color.error},info:{main:P.color.info},success:{main:P.color.success}},components:{MuiButton:R,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:j,MuiChip:H,MuiInput:V,MuiTextField:D,MuiFormLabel:Y,MuiTabs:Q,MuiTab:G,MuiAvatar:$,MuiCheckbox:A,MuiRadio:q,MuiSwitch:N,MuiSelect:X,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),_=function(e){return z.createElement(z.Fragment,null,z.createElement(r,null),z.createElement(E,{theme:Z},e.children))},ee=S(o)(K||(U=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],J=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(U,"raw",{value:J}):U.raw=J,K=U)),re=function(e){var r=e.color,o=void 0===r?"primary":r,n=e.variant,t=void 0===n?"contained":n,i=e.size,a=void 0===i?"medium":i,l=e.loading,c=e.children,d=L(e,["color","variant","size","loading","children"]);return z.createElement(w,F({size:a,variant:t,color:o,disabled:l},d),z.createElement("span",{style:{opacity:l?0:1}},c),l&&z.createElement(ee,{size:20,color:"inherit"}))},oe=function(e){var r=e.children,o=L(e,["children"]);return z.createElement(C,F({},o),r)},ne=function(e){var r=e.label,o=L(e,["label"]);return z.createElement(n,F({size:"small",label:r},o))},te=function(e){var r=e.icon,o=e.firstName,n=void 0===o?"":o,i=e.lastName,a=void 0===i?"":i,l=L(e,["icon","firstName","lastName"]),c="".concat(n.substring(0,1)).concat(a.substring(0,1)).toLocaleUpperCase(),d=c?P.color.secondary:P.color.background.dark;return z.createElement(t,F({sx:F({backgroundColor:d},l.sx)},l),c||r)},ie={small:6,medium:8,large:12,fluid:12},ae=function(e){var r=e.component,o=void 0===r?"div":r,n=e.size,t=void 0===n?"large":n,l=e.children,c=L(e,["component","size","children"]),d="fluid"===t;return z.createElement(i,F({component:o,disableGutters:d,maxWidth:!d&&"lg",sx:F({display:"flex",justifyContent:"center"},c.sx)},c),z.createElement(a,{container:!0,justifyContent:"center"},z.createElement(a,{item:!0,md:ie[t]},l)))},le=function(e){var r=e.children,o=L(e,["children"]);return z.createElement(l,F({},o),r)},ce=function(e){var r=L(e,[]);return z.createElement(c,F({},r))},de=function(e){var r=e.id,o=e.required,n=void 0===o||o,t=e.data,i=e.label,a=e.error,c=e.helperText;return z.createElement(d,null,z.createElement(f,{component:"label",error:a},i," ",n?"":z.createElement(l,{component:"span",sx:{fontWeight:P.font.weight.normal,color:P.color.text.light}},"(optional)")),z.createElement(s,null,t.map((function(e,o){var n=e.value,t=e.label;return z.createElement(g,{key:o,value:n,label:t||"",sx:{fontSize:P.size.font.base,color:P.color.text.base},control:z.createElement(ce,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)}})})}))),a&&z.createElement(m,{sx:{marginLeft:0,marginRight:0},error:a},c))},fe=function(e){return z.createElement(p,F({},e))},se=function(e){var r=e.id,o=e.helperText,n=e.label,t=e.error,i=e.required,a=void 0===i||i,c=e.name,s=e.data;return z.createElement(d,{component:"fieldset",error:t},z.createElement(f,{component:"legend"},n," ",a?"":z.createElement(l,{component:"span",sx:{fontWeight:P.font.weight.normal,color:P.color.text.light}},"(optional)")),z.createElement(u,{"aria-label":c,name:c},s.map((function(e,o){var n=e.value,t=e.label;return z.createElement(g,{value:n,key:n,label:t||"",sx:{fontSize:P.size.font.base,color:P.color.text.base},control:z.createElement(fe,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)}})})}))),t&&z.createElement(m,{sx:{marginLeft:0,marginRight:0}},o))},ge=function(e){return z.createElement(h,F({},e))},me=function(e){var r=e.id,o=e.label,n=e.checked;return z.createElement(d,null,z.createElement(f,{component:"label"},o),z.createElement(g,{control:z.createElement(ge,{id:r}),label:"".concat(n?"Active":"Inactive")}))},pe=function(e){return z.createElement(b,F({variant:"outlined"},e))},ue=function(e){var r=e.id,o=e.required,n=void 0===o||o,t=e.options,i=e.label,a=e.error,c=e.placeholder,s=e.helperText;return z.createElement(d,null,z.createElement(f,{component:"label",error:a},i," ",n?"":z.createElement(l,{component:"span",sx:{fontWeight:P.font.weight.normal,color:P.color.text.light}},"(optional)")),z.createElement(pe,{id:r,placeholder:c,error:a},t.map((function(e){return z.createElement(y,{key:e.value,value:e.value},e.text)}))),a&&z.createElement(m,{sx:{marginLeft:0,marginRight:0},error:a},s))},he=function(e){var r=e.type,o=L(e,["type"]),n=k(!1),t=n[0],i=n[1],a=F(F({},o.InputProps),"password"===r&&{endAdornment:z.createElement(O,{position:"end"},z.createElement(T,{"aria-label":"toggle password visibility",onClick:function(){return i(!t)},edge:"end"},t?z.createElement(M,null):z.createElement(W,null)))});return z.createElement(x,F({},o,{type:t?"text":r,InputProps:a}))},be=function(e){var r=e.id,o=e.required,n=void 0===o||o,t=e.label,i=e.error,a=e.helperText,c=L(e,["id","required","label","error","helperText"]);return z.createElement(d,null,z.createElement(f,{component:"label",error:i},t," ",!n&&z.createElement(l,{component:"span",sx:{fontWeight:P.font.weight.normal,color:P.color.text.light}},"(optional)")),z.createElement(he,F({},c,{id:r,error:i,inputProps:{"data-testid":r}})),i&&z.createElement(m,{sx:{marginLeft:0,marginRight:0},error:i},a))},ye=function(e){var r=e.children,o=L(e,["children"]);return z.createElement(v,F({underline:"hover",variant:"caption",component:"span"},o),r)};export{te as Avatar,le as Box,re as Button,ce as Checkbox,ne as Chip,ae as Container,de as FormCheckbox,be as FormInput,se as FormRadio,ue as FormSelect,me as FormSwitch,he as Input,ye as Link,fe as Radio,pe as Select,ge as Switch,oe as Typography,_ as UpComponentsProvider,Z as theme,P as tokens};
|
|
1
|
+
import{createTheme as e,CssBaseline as r,CircularProgress as o,Chip as t,Avatar as n,Container as i,Grid as a,Box as l,Checkbox as c,FormControl as d,FormLabel as s,FormGroup as f,FormControlLabel as m,FormHelperText as p,Radio as g,RadioGroup as u,Switch as h,Select as b,MenuItem as y,TextField as x,Link as v,SvgIcon as z}from"@mui/material";export*from"@mui/material";import*as k from"react";import E,{useState as S}from"react";import{ThemeProvider as w,styled as O}from"@mui/material/styles";import C from"@mui/material/Button";import T from"@mui/material/Typography";import M from"@mui/material/InputAdornment";import P from"@mui/material/IconButton";import W from"@mui/icons-material/VisibilityOutlined";import L from"@mui/icons-material/VisibilityOffOutlined";var F={animation:{speed:{normal:"0.5s",fast:"0.08s",slow:"1s"}},color:{background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},primary:"#262a59",secondary:"#d40fa9",info:"#262a59",error:"#e35656",success:"#aed581",indigo0:"#f4f4f6",indigo10:"#e9e9ee",indigo20:"#bdbfcd",indigo30:"#a8aabd",indigo40:"#9294ac",indigo50:"#7d7f9b",indigo60:"#67698a",indigo70:"#51557a",indigo80:"#3b3f69",indigo90:"#262a59",indigo100:"#161833",pink0:"#fff3ff",pink10:"#fedafd",pink20:"#fdc0fb",pink30:"#f98ef3",pink40:"#f362e8",pink50:"#ec3ed7",pink60:"#d40fa9",pink70:"#b0027c",pink80:"#990165",pink90:"#820050",pink100:"#390325",cyan0:"#f4ffff",cyan10:"#c6ffff",cyan20:"#96ffff",cyan30:"#59effc",cyan40:"#1dd7f0",cyan50:"#20b0c7",cyan60:"#1d8fa4",cyan70:"#167286",cyan80:"#0e5a6d",cyan90:"#064658",cyan100:"#103645",green0:"#f8fff4",green10:"#e2fccc",green20:"#e2fccc",green30:"#aed581",green40:"#8eaf65",green50:"#728f4b",green60:"#5a7533",green70:"#476020",green80:"#374e10",green90:"#2b3f05",green100:"#223300",red0:"#fff7f4",red10:"#ffe4db",red20:"#fcc4bb",red30:"#efa299",red40:"#e67e78",red50:"#e35656",red60:"#b83d3c",red70:"#922524",red80:"#6f1110",red90:"#500404",red100:"#330000",gray0:"#ffffff",gray10:"#f4f5f7",gray20:"#dfe1e6",gray30:"#c1c7d0",gray40:"#a8afba",gray50:"#9399a3",gray60:"#777c85",gray70:"#575b61",gray80:"#3c3e42",gray90:"#222426",gray100:"#121315",border:{default:"#dfe1e6"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}}},font:{family:{heading:"'Roboto Condensed', sans-serif",text:"'Source Sans Pro', sans-serif",code:"'Source Code Pro', monospace"},lineHeight:{medium:"1rem",large:"1.5rem",xlarge:"2rem",xxlarge:"3rem"},weight:{normal:400,bold:700}},size:{border:{radius:{default:"6px",small:"4px"},width:"1px"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"1rem"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"1rem"},caption:{default:"0.833rem",large:"1.44rem"},label:{default:"0.833rem",large:"1.44rem"},minorThird10:"6.192rem",minorThird9:"5.16rem",minorThird8:"4.3rem",minorThird7:"3.583rem",minorThird6:"2.986rem",minorThird5:"2.488rem",minorThird4:"2.074rem",minorThird3:"1.728rem",minorThird2:"1.44rem",minorThird1:"1.2rem",minorThird0:"1rem",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacingXS:"8px",spacingS:"16px",spacingM:"24px",spacingL:"32px",spacingXL:"40px",spacingXXL:"48px",spacing:{main:"24px",section:"32px",header:"24px",article:"24px",paragraph:"16px",line:"8px",scale1:"1px",scale2:"2px",scale4:"4px",scale6:"6px",scale8:"8px",scale16:"16px",scale24:"24px",scale32:"32px",scale40:"40px",scale48:"48px",scale56:"56px",scale64:"64px",scale72:"72px",scale80:"80px",scale88:"88px",scale96:"96px",scale104:"104px",scale112:"112px",scale120:"120px",scale128:"128px",scale160:"160px",scale208:"208px"}}},H=function(){return H=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},H.apply(this,arguments)};function I(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(o[t[n]]=e[t[n]])}return o}var B={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:F.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:F.size.spacing.scale8}},colorDefault:{backgroundColor:F.color.gray10,color:F.color.gray60},colorPrimary:{backgroundColor:F.color.indigo10,color:F.color.indigo80},colorSecondary:{backgroundColor:F.color.pink10,color:F.color.pink80},colorError:{backgroundColor:F.color.red10,color:F.color.error},colorInfo:{backgroundColor:F.color.indigo10,color:F.color.indigo80},colorSuccess:{backgroundColor:F.color.green10,color:F.color.green80}}},j={h1:{fontFamily:F.font.family.heading,fontSize:F.size.font.heading.default,fontWeight:F.font.weight.bold,lineHeight:F.font.lineHeight.xlarge},h2:{fontFamily:F.font.family.heading,fontSize:F.size.font.heading.small,fontWeight:F.font.weight.bold,lineHeight:F.font.lineHeight.xlarge},h3:{fontFamily:F.font.family.heading,fontSize:F.size.font.heading.xsmall,fontWeight:F.font.weight.bold,lineHeight:F.font.lineHeight.large},body1:{fontFamily:F.font.family.text,fontSize:F.size.font.body.default,fontWeight:F.font.weight.normal,lineHeight:F.font.lineHeight.large},body2:{fontFamily:F.font.family.text,fontSize:F.size.font.body.default,fontWeight:F.font.weight.bold,lineHeight:F.font.lineHeight.large},caption:{fontFamily:F.font.family.text,fontSize:F.size.font.caption.default,fontWeight:F.font.weight.normal,lineHeight:F.font.lineHeight.medium},overline:{fontFamily:F.font.family.heading,fontSize:F.size.font.overline.default,letterSpacing:"initial",fontWeight:F.font.weight.bold,color:F.color.gray60}},R={small:"".concat(F.size.spacing.scale4," ").concat(F.size.spacing.scale8),medium:"".concat(F.size.spacing.scale8," ").concat(F.size.spacing.scale16),large:"".concat(F.size.spacing.scale16," ").concat(F.size.spacing.scale32)},$={styleOverrides:{root:{textTransform:"none",lineHeight:F.size.spacing.scale16,fontWeight:F.font.weight.bold,fontFamily:F.font.family.text},contained:{padding:R.medium},containedSizeSmall:{padding:R.small},containedSizeLarge:{padding:R.large},text:{padding:R.medium},textSizeSmall:{padding:R.small},textSizeLarge:{padding:R.large},outlined:{padding:"7px ".concat(F.size.spacing.scale16)},outlinedSizeSmall:{padding:R.small},outlinedSizeLarge:{padding:R.large},sizeSmall:{fontSize:F.size.font.label.default},sizeLarge:{fontSize:F.size.font.label.large},startIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}},endIcon:{"& svg":{fill:"currentColor",width:"12px",height:"12px"}}},defaultProps:{disableFocusRipple:!0},MuiIconButton:{root:{"&&:hover":{backgroundColor:"transparent"}}}},A={styleOverrides:{root:{color:F.color.gray60,backgroundColor:F.color.background.dark},sizeSmall:{padding:"3px"}}},N={styleOverrides:{root:{fontFamily:F.font.family.text,fontSize:F.size.font.label.default,fontWeight:F.font.weight.bold,width:F.size.spacing.scale24,height:F.size.spacing.scale24,"& .MuiSvgIcon-root":{width:F.size.spacing.scale16}},colorDefault:{backgroundColor:F.color.background.dark,"& .MuiSvgIcon-root":{color:F.color.gray60}}}},q={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:F.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:F.color.primary},"&$disabled":{opacity:.5}}}},V={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:F.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},X={styleOverrides:{root:{marginRight:16},colorSecondary:{color:F.color.gray0,"&$checked":{color:F.color.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:F.color.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:F.color.background.light,border:"2px solid ".concat(F.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:F.color.primary,border:"2px solid ".concat(F.color.primary)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},D={styleOverrides:{outlined:{position:"relative",padding:F.size.spacing.scale8,fontSize:F.size.font.label.default,borderRadius:F.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:F.color.background.dark,color:F.color.text.light}}}},G={styleOverrides:{root:{input:{padding:F.size.spacing.scale8,fontSize:F.size.font.label.default,height:F.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(F.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:F.size.spacing.scale16,height:F.size.spacing.scale16}}}}},U={styleOverrides:{outlined:{notchedOutline:{borderColor:F.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}};F.size.font.body.default,F.font.family.text,F.color.gray100;var _={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(F.size.spacing.scale16),fontFamily:F.font.family.text,color:F.color.gray60,padding:"0 0 ".concat(F.size.spacing.scale16," 0"),"&:hover":{color:F.color.primary,opacity:1},"&$selected":{color:F.color.primary},"&:focus":{color:F.color.primary}}},defaultProps:{disableRipple:!0}};F.size.font.caption.default;var J,K,Q,Y,Z={styleOverrides:{root:{borderBottom:"1px solid ".concat(F.color.gray20)},indicator:{backgroundColor:F.color.primary}}},ee={styleOverrides:{root:{fontWeight:F.font.weight.bold,lineHeight:F.font.lineHeight.medium,fontFamily:F.font.family.text,fontSize:F.size.font.caption.default,color:F.color.text.base,marginBottom:F.size.spacing.scale8}}},re=e({typography:H({},j),palette:{background:{default:"#ffffff"},primary:{main:F.color.primary},secondary:{main:F.color.secondary},error:{main:F.color.error},info:{main:F.color.info},success:{main:F.color.success}},components:{MuiButton:$,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:A,MuiChip:B,MuiInput:U,MuiTextField:G,MuiFormLabel:ee,MuiTabs:Z,MuiTab:_,MuiAvatar:N,MuiCheckbox:q,MuiRadio:V,MuiSwitch:X,MuiSelect:D,MuiLink:{styleOverrides:{root:{cursor:"pointer"}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),oe=function(e){return E.createElement(E.Fragment,null,E.createElement(r,null),E.createElement(w,{theme:re},e.children))},te=O(o)(Q||(J=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],K=["\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n"],Object.defineProperty?Object.defineProperty(J,"raw",{value:K}):J.raw=K,Q=J)),ne=function(e){var r=e.color,o=void 0===r?"primary":r,t=e.variant,n=void 0===t?"contained":t,i=e.size,a=void 0===i?"medium":i,l=e.loading,c=e.children,d=I(e,["color","variant","size","loading","children"]);return E.createElement(C,H({size:a,variant:n,color:o,disabled:l},d),E.createElement("span",{style:{opacity:l?0:1}},c),l&&E.createElement(te,{size:20,color:"inherit"}))},ie=function(e){var r=e.children,o=I(e,["children"]);return E.createElement(T,H({},o),r)},ae=function(e){var r=e.label,o=I(e,["label"]);return E.createElement(t,H({size:"small",label:r},o))},le=function(e){var r=e.icon,o=e.firstName,t=void 0===o?"":o,i=e.lastName,a=void 0===i?"":i,l=I(e,["icon","firstName","lastName"]),c="".concat(t.substring(0,1)).concat(a.substring(0,1)).toLocaleUpperCase(),d=c?F.color.secondary:F.color.background.dark;return E.createElement(n,H({sx:H({backgroundColor:d},l.sx)},l),c||r)},ce={small:6,medium:8,large:12,fluid:12},de=function(e){var r=e.component,o=void 0===r?"div":r,t=e.size,n=void 0===t?"large":t,l=e.children,c=I(e,["component","size","children"]),d="fluid"===n;return E.createElement(i,H({component:o,disableGutters:d,maxWidth:!d&&"lg",sx:H({display:"flex",justifyContent:"center"},c.sx)},c),E.createElement(a,{container:!0,justifyContent:"center"},E.createElement(a,{item:!0,md:ce[n]},l)))},se=function(e){var r=e.children,o=I(e,["children"]);return E.createElement(l,H({},o),r)},fe=function(e){var r=I(e,[]);return E.createElement(c,H({},r))},me=function(e){var r=e.id,o=e.required,t=void 0===o||o,n=e.data,i=e.label,a=e.error,c=e.helperText;return E.createElement(d,null,E.createElement(s,{component:"label",error:a},i," ",t?"":E.createElement(l,{component:"span",sx:{fontWeight:F.font.weight.normal,color:F.color.text.light}},"(optional)")),E.createElement(f,null,n.map((function(e,o){var t=e.value,n=e.label;return E.createElement(m,{key:o,value:t,label:n||"",sx:{fontSize:F.size.font.base,color:F.color.text.base},control:E.createElement(fe,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)}})})}))),a&&E.createElement(p,{sx:{marginLeft:0,marginRight:0},error:a},c))},pe=function(e){return E.createElement(g,H({},e))},ge=function(e){var r=e.id,o=e.helperText,t=e.label,n=e.error,i=e.required,a=void 0===i||i,c=e.name,f=e.data;return E.createElement(d,{component:"fieldset",error:n},E.createElement(s,{component:"legend"},t," ",a?"":E.createElement(l,{component:"span",sx:{fontWeight:F.font.weight.normal,color:F.color.text.light}},"(optional)")),E.createElement(u,{"aria-label":c,name:c},f.map((function(e,o){var t=e.value,n=e.label;return E.createElement(m,{value:t,key:t,label:n||"",sx:{fontSize:F.size.font.base,color:F.color.text.base},control:E.createElement(pe,{color:"primary",inputProps:{"data-testid":"".concat(r,"-").concat(o)}})})}))),n&&E.createElement(p,{sx:{marginLeft:0,marginRight:0}},o))},ue=function(e){return E.createElement(h,H({},e))},he=function(e){var r=e.id,o=e.label,t=e.checked;return E.createElement(d,null,E.createElement(s,{component:"label"},o),E.createElement(m,{control:E.createElement(ue,{id:r}),label:"".concat(t?"Active":"Inactive")}))},be=function(e){return E.createElement(b,H({variant:"outlined"},e))},ye=function(e){var r=e.id,o=e.required,t=void 0===o||o,n=e.options,i=e.label,a=e.error,c=e.placeholder,f=e.helperText;return E.createElement(d,null,E.createElement(s,{component:"label",error:a},i," ",t?"":E.createElement(l,{component:"span",sx:{fontWeight:F.font.weight.normal,color:F.color.text.light}},"(optional)")),E.createElement(be,{id:r,placeholder:c,error:a},n.map((function(e){return E.createElement(y,{key:e.value,value:e.value},e.text)}))),a&&E.createElement(p,{sx:{marginLeft:0,marginRight:0},error:a},f))},xe=function(e){var r=e.type,o=I(e,["type"]),t=S(!1),n=t[0],i=t[1],a=H(H({},o.InputProps),"password"===r&&{endAdornment:E.createElement(M,{position:"end"},E.createElement(P,{"aria-label":"toggle password visibility",onClick:function(){return i(!n)},edge:"end"},n?E.createElement(W,null):E.createElement(L,null)))});return E.createElement(x,H({},o,{type:n?"text":r,InputProps:a}))},ve=function(e){var r=e.id,o=e.required,t=void 0===o||o,n=e.label,i=e.error,a=e.helperText,c=I(e,["id","required","label","error","helperText"]);return E.createElement(d,null,E.createElement(s,{component:"label",error:i},n," ",!t&&E.createElement(l,{component:"span",sx:{fontWeight:F.font.weight.normal,color:F.color.text.light}},"(optional)")),E.createElement(xe,H({},c,{id:r,error:i,inputProps:{"data-testid":r}})),i&&E.createElement(p,{sx:{marginLeft:0,marginRight:0},error:i},a))};function ze(){return ze=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},ze.apply(this,arguments)}var ke=function(e){return k.createElement("svg",ze({viewBox:"0 0 24 24"},e),Y||(Y=k.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12.141 4.894H3.576A1.977 1.977 0 0 0 1.6 6.871v14.494c0 1.09.885 1.976 1.976 1.976h14.495a1.977 1.977 0 0 0 1.976-1.976V12.8M17.412 1.6h4.94a.99.99 0 0 1 .99.988V7.53m-10.883 4.952L23.05 1.89"})))},Ee=function(e){var r,o=e.children,t=e.underline,n=void 0===t?"hover":t,i=e.toParentNavigation,a=I(e,["children","underline","toParentNavigation"]),l=null===(r=a.href)||void 0===r?void 0:r.startsWith("https"),c={variant:"caption",underline:n};return i?E.createElement(v,H({},c,a,{onClick:function(){return e=i,void window.parent.postMessage({type:"NAVIGATION",content:e},"*");var e}}),o):E.createElement(v,H({},c,l&&{target:"_blank",rel:"noopener noreferrer"},a),o,l&&E.createElement(z,{component:ke,fontSize:"inherit",sx:{marginLeft:".25em"}}))};export{le as Avatar,se as Box,ne as Button,fe as Checkbox,ae as Chip,de as Container,me as FormCheckbox,ve as FormInput,ge as FormRadio,ye as FormSelect,he as FormSwitch,xe as Input,Ee as Link,pe as Radio,be as Select,ue as Switch,ie as Typography,oe as UpComponentsProvider,re as theme,F as tokens};
|
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { LinkProps as MuiLinkProps } from '@mui/material';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare type LinkProps<C extends React.ElementType> = MuiLinkProps<C, {
|
|
4
|
+
component?: C;
|
|
5
|
+
}> & {
|
|
6
|
+
/**
|
|
7
|
+
* it expects a client-side path to be sent to the parent container.
|
|
8
|
+
* `toParentNabigation="/my.path"`
|
|
9
|
+
*
|
|
10
|
+
* - It uses the `window.postMessage()` API: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage.
|
|
11
|
+
* - Parent message listener: https://github.com/up42/console-ui/blob/master/plugins/iframe-message-handler.js#L7-L9
|
|
12
|
+
*/
|
|
13
|
+
toParentNavigation?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* ### Routing Libraries
|
|
17
|
+
* You can achieve the integration with third-party routing libraries (i.e `@reach/router`) with the `component` prop.
|
|
18
|
+
* You can learn more about this here: https://mui.com/guides/routing/#component-prop
|
|
19
|
+
*
|
|
20
|
+
* ```js
|
|
21
|
+
* import { Link as RouterLink } from '@reach/router'
|
|
22
|
+
* import { Link } from '@up42/up-components'
|
|
23
|
+
*
|
|
24
|
+
* <Link component={RouterLink} to="/my-path">
|
|
25
|
+
* client-side navigation link.
|
|
26
|
+
* </Link>
|
|
27
|
+
```
|
|
28
|
+
*
|
|
29
|
+
* ### Parent Navigation
|
|
30
|
+
* this component exposes `toParentNavigation` prop that facilitates between iframe and parent container's client-side navigation.
|
|
31
|
+
*/
|
|
32
|
+
export declare const Link: <C extends React.ElementType<any>>({ children, underline, toParentNavigation, ...props }: LinkProps<C>) => JSX.Element;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const Internal: Story<import("@storybook/react").Args>;
|
|
5
|
+
export declare const External: Story<import("@storybook/react").Args>;
|
|
6
|
+
export declare const ParentCommunication: Story<import("@storybook/react").Args>;
|
|
7
|
+
export declare const Button: Story<import("@storybook/react").Args>;
|
|
8
|
+
export declare const Error: Story<import("@storybook/react").Args>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -144,7 +144,35 @@ declare type FormInputProps = MUIGlobalOmit<InputProps, {
|
|
|
144
144
|
}>;
|
|
145
145
|
declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
|
|
146
146
|
|
|
147
|
-
declare type LinkProps =
|
|
148
|
-
|
|
147
|
+
declare type LinkProps<C extends React.ElementType> = LinkProps$1<C, {
|
|
148
|
+
component?: C;
|
|
149
|
+
}> & {
|
|
150
|
+
/**
|
|
151
|
+
* it expects a client-side path to be sent to the parent container.
|
|
152
|
+
* `toParentNabigation="/my.path"`
|
|
153
|
+
*
|
|
154
|
+
* - It uses the `window.postMessage()` API: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage.
|
|
155
|
+
* - Parent message listener: https://github.com/up42/console-ui/blob/master/plugins/iframe-message-handler.js#L7-L9
|
|
156
|
+
*/
|
|
157
|
+
toParentNavigation?: string;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* ### Routing Libraries
|
|
161
|
+
* You can achieve the integration with third-party routing libraries (i.e `@reach/router`) with the `component` prop.
|
|
162
|
+
* You can learn more about this here: https://mui.com/guides/routing/#component-prop
|
|
163
|
+
*
|
|
164
|
+
* ```js
|
|
165
|
+
* import { Link as RouterLink } from '@reach/router'
|
|
166
|
+
* import { Link } from '@up42/up-components'
|
|
167
|
+
*
|
|
168
|
+
* <Link component={RouterLink} to="/my-path">
|
|
169
|
+
* client-side navigation link.
|
|
170
|
+
* </Link>
|
|
171
|
+
```
|
|
172
|
+
*
|
|
173
|
+
* ### Parent Navigation
|
|
174
|
+
* this component exposes `toParentNavigation` prop that facilitates between iframe and parent container's client-side navigation.
|
|
175
|
+
*/
|
|
176
|
+
declare const Link: <C extends React.ElementType<any>>({ children, underline, toParentNavigation, ...props }: LinkProps<C>) => JSX.Element;
|
|
149
177
|
|
|
150
178
|
export { Avatar, Box, Button, Checkbox, Chip, Container, FormCheckbox, FormInput, FormRadio, FormSelect, FormSwitch, Input, Link, Radio, Select, Switch, Typography, UpComponentsProvider, theme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepare": "husky install"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@up42/design-system-tokens": "^
|
|
27
|
+
"@up42/design-system-tokens": "^3.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/core": "^7.16.10",
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
"@storybook/builder-webpack5": "^6.4.13",
|
|
51
51
|
"@storybook/manager-webpack5": "^6.4.13",
|
|
52
52
|
"@storybook/react": "^6.4.13",
|
|
53
|
+
"@svgr/rollup": "^6.2.1",
|
|
54
|
+
"@svgr/webpack": "^6.2.1",
|
|
53
55
|
"@testing-library/react": "^12.1.2",
|
|
54
56
|
"@types/jest": "^27.4.0",
|
|
55
57
|
"@types/react": "^17.0.38",
|