@up42/up-components 0.0.4 → 0.1.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.
Files changed (121) hide show
  1. package/README.md +44 -8
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/types/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/cjs/types/components/Box/Box.d.ts +5 -0
  5. package/dist/cjs/types/components/Box/Box.stories.d.ts +5 -0
  6. package/dist/cjs/types/components/Box/Box.test.d.ts +1 -0
  7. package/dist/cjs/types/components/Button/Button.d.ts +1 -1
  8. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +5 -0
  9. package/dist/cjs/types/{global/overrides/form/checkbox.d.ts → components/Checkbox/Checkbox.overrides.d.ts} +0 -0
  10. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +4 -0
  11. package/dist/cjs/types/components/Checkbox/Checkbox.test.d.ts +1 -0
  12. package/dist/cjs/types/components/Chip/Chip.d.ts +1 -1
  13. package/dist/cjs/types/components/Container/Container.d.ts +1 -1
  14. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +13 -0
  15. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.stories.d.ts +8 -0
  16. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.test.d.ts +1 -0
  17. package/dist/cjs/types/components/FormInput/FormInput.d.ts +9 -0
  18. package/dist/cjs/types/components/FormInput/FormInput.stories.d.ts +7 -0
  19. package/dist/cjs/types/components/FormInput/FormInput.test.d.ts +1 -0
  20. package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +14 -0
  21. package/dist/cjs/types/components/FormRadio/FormRadio.stories.d.ts +8 -0
  22. package/dist/cjs/types/components/FormRadio/FormRadio.test.d.ts +1 -0
  23. package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +13 -0
  24. package/dist/cjs/types/components/FormSelect/FormSelect.stories.d.ts +7 -0
  25. package/dist/cjs/types/components/FormSelect/FormSelect.test.d.ts +1 -0
  26. package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +8 -0
  27. package/dist/cjs/types/components/FormSwitch/FormSwitch.stories.d.ts +6 -0
  28. package/dist/cjs/types/components/FormSwitch/FormSwitch.test.d.ts +1 -0
  29. package/dist/cjs/types/components/Input/Input.d.ts +7 -0
  30. package/dist/{esm/types/global/overrides/form/input.d.ts → cjs/types/components/Input/Input.overrides.d.ts} +1 -0
  31. package/dist/cjs/types/components/Input/Input.stories.d.ts +6 -0
  32. package/dist/cjs/types/components/Input/Input.test.d.ts +1 -0
  33. package/dist/cjs/types/components/Radio/Radio.d.ts +5 -0
  34. package/dist/cjs/types/{global/overrides/form/radio.d.ts → components/Radio/Radio.overrides.d.ts} +0 -0
  35. package/dist/cjs/types/components/Radio/Radio.stories.d.ts +4 -0
  36. package/dist/cjs/types/components/Radio/Radio.test.d.ts +1 -0
  37. package/dist/cjs/types/components/Select/Select.d.ts +5 -0
  38. package/dist/cjs/types/components/Select/Select.overrides.d.ts +2 -0
  39. package/dist/cjs/types/components/Select/Select.stories.d.ts +6 -0
  40. package/dist/cjs/types/components/Select/Select.test.d.ts +1 -0
  41. package/dist/cjs/types/components/Switch/Switch.d.ts +7 -0
  42. package/dist/cjs/types/{global/overrides/form/switch.d.ts → components/Switch/Switch.overrides.d.ts} +0 -0
  43. package/dist/cjs/types/components/Switch/Switch.stories.d.ts +5 -0
  44. package/dist/cjs/types/components/Switch/Switch.test.d.ts +1 -0
  45. package/dist/cjs/types/components/Typography/Typography.d.ts +1 -1
  46. package/dist/cjs/types/components/index.d.ts +11 -0
  47. package/dist/cjs/types/global/overrides/index.d.ts +0 -4
  48. package/dist/cjs/types/global/tokens/colors/colors.components.d.ts +5 -0
  49. package/dist/cjs/types/global/tokens/components/CodeSnippet.d.ts +6 -0
  50. package/dist/cjs/types/global/tokens/components/CopyToClipboard.d.ts +4 -0
  51. package/dist/cjs/types/global/tokens/components/Header.d.ts +5 -0
  52. package/dist/cjs/types/global/tokens/components/Table.d.ts +9 -0
  53. package/dist/cjs/types/global/tokens/spacing/spacing.components.d.ts +5 -0
  54. package/dist/cjs/types/global/tokens/typogrpahy/typography.components.d.ts +4 -0
  55. package/dist/cjs/types/index.d.ts +3 -1
  56. package/dist/esm/index.js +2 -2
  57. package/dist/esm/types/components/Avatar/Avatar.d.ts +1 -1
  58. package/dist/esm/types/components/Box/Box.d.ts +5 -0
  59. package/dist/esm/types/components/Box/Box.stories.d.ts +5 -0
  60. package/dist/esm/types/components/Box/Box.test.d.ts +1 -0
  61. package/dist/esm/types/components/Button/Button.d.ts +1 -1
  62. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +5 -0
  63. package/dist/esm/types/{global/overrides/form/checkbox.d.ts → components/Checkbox/Checkbox.overrides.d.ts} +0 -0
  64. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +4 -0
  65. package/dist/esm/types/components/Checkbox/Checkbox.test.d.ts +1 -0
  66. package/dist/esm/types/components/Chip/Chip.d.ts +1 -1
  67. package/dist/esm/types/components/Container/Container.d.ts +1 -1
  68. package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +13 -0
  69. package/dist/esm/types/components/FormCheckbox/FormCheckbox.stories.d.ts +8 -0
  70. package/dist/esm/types/components/FormCheckbox/FormCheckbox.test.d.ts +1 -0
  71. package/dist/esm/types/components/FormInput/FormInput.d.ts +9 -0
  72. package/dist/esm/types/components/FormInput/FormInput.stories.d.ts +7 -0
  73. package/dist/esm/types/components/FormInput/FormInput.test.d.ts +1 -0
  74. package/dist/esm/types/components/FormRadio/FormRadio.d.ts +14 -0
  75. package/dist/esm/types/components/FormRadio/FormRadio.stories.d.ts +8 -0
  76. package/dist/esm/types/components/FormRadio/FormRadio.test.d.ts +1 -0
  77. package/dist/esm/types/components/FormSelect/FormSelect.d.ts +13 -0
  78. package/dist/esm/types/components/FormSelect/FormSelect.stories.d.ts +7 -0
  79. package/dist/esm/types/components/FormSelect/FormSelect.test.d.ts +1 -0
  80. package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +8 -0
  81. package/dist/esm/types/components/FormSwitch/FormSwitch.stories.d.ts +6 -0
  82. package/dist/esm/types/components/FormSwitch/FormSwitch.test.d.ts +1 -0
  83. package/dist/esm/types/components/Input/Input.d.ts +7 -0
  84. package/dist/{cjs/types/global/overrides/form/input.d.ts → esm/types/components/Input/Input.overrides.d.ts} +1 -0
  85. package/dist/esm/types/components/Input/Input.stories.d.ts +6 -0
  86. package/dist/esm/types/components/Input/Input.test.d.ts +1 -0
  87. package/dist/esm/types/components/Radio/Radio.d.ts +5 -0
  88. package/dist/esm/types/{global/overrides/form/radio.d.ts → components/Radio/Radio.overrides.d.ts} +0 -0
  89. package/dist/esm/types/components/Radio/Radio.stories.d.ts +4 -0
  90. package/dist/esm/types/components/Radio/Radio.test.d.ts +1 -0
  91. package/dist/esm/types/components/Select/Select.d.ts +5 -0
  92. package/dist/esm/types/components/Select/Select.overrides.d.ts +2 -0
  93. package/dist/esm/types/components/Select/Select.stories.d.ts +6 -0
  94. package/dist/esm/types/components/Select/Select.test.d.ts +1 -0
  95. package/dist/esm/types/components/Switch/Switch.d.ts +7 -0
  96. package/dist/esm/types/{global/overrides/form/switch.d.ts → components/Switch/Switch.overrides.d.ts} +0 -0
  97. package/dist/esm/types/components/Switch/Switch.stories.d.ts +5 -0
  98. package/dist/esm/types/components/Switch/Switch.test.d.ts +1 -0
  99. package/dist/esm/types/components/Typography/Typography.d.ts +1 -1
  100. package/dist/esm/types/components/index.d.ts +11 -0
  101. package/dist/esm/types/global/overrides/index.d.ts +0 -4
  102. package/dist/esm/types/global/tokens/colors/colors.components.d.ts +5 -0
  103. package/dist/esm/types/global/tokens/components/CodeSnippet.d.ts +6 -0
  104. package/dist/esm/types/global/tokens/components/CopyToClipboard.d.ts +4 -0
  105. package/dist/esm/types/global/tokens/components/Header.d.ts +5 -0
  106. package/dist/esm/types/global/tokens/components/Table.d.ts +9 -0
  107. package/dist/esm/types/global/tokens/spacing/spacing.components.d.ts +5 -0
  108. package/dist/esm/types/global/tokens/typogrpahy/typography.components.d.ts +4 -0
  109. package/dist/esm/types/index.d.ts +3 -1
  110. package/dist/index.d.ts +75 -19
  111. package/package.json +20 -5
  112. package/dist/cjs/types/tokens/colors.stories.d.ts +0 -5
  113. package/dist/cjs/types/tokens/elevation.stories.d.ts +0 -5
  114. package/dist/cjs/types/tokens/grid.stories.d.ts +0 -5
  115. package/dist/cjs/types/tokens/spacing.stories.d.ts +0 -5
  116. package/dist/cjs/types/tokens/typography.stories.d.ts +0 -5
  117. package/dist/esm/types/tokens/colors.stories.d.ts +0 -5
  118. package/dist/esm/types/tokens/elevation.stories.d.ts +0 -5
  119. package/dist/esm/types/tokens/grid.stories.d.ts +0 -5
  120. package/dist/esm/types/tokens/spacing.stories.d.ts +0 -5
  121. package/dist/esm/types/tokens/typography.stories.d.ts +0 -5
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{createTheme as e,CircularProgress as r,Chip as a,Avatar as o,Container as i,Grid as n}from"@mui/material";export*from"@mui/material";import t from"react";import{ThemeProvider as l,styled as d}from"@mui/material/styles";import c from"@mui/material/Button";import s from"@mui/material/Typography";
1
+ import e from"@up42/design-system-tokens/dist/json/tokens.json";export{default as tokens}from"@up42/design-system-tokens/dist/json/tokens.json";import{createTheme as t,CssBaseline as o,CircularProgress as r,Chip as n,Avatar as a,Container as i,Grid as l,Box as c,Checkbox as d,FormControl as s,FormLabel as u,FormGroup as m,FormControlLabel as f,FormHelperText as g,Radio as p,RadioGroup as b,Switch as h,Select as y,MenuItem as v,TextField as x}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 C from"@mui/material/Button";import w from"@mui/material/Typography";import M from"@mui/material/InputAdornment";import O from"@mui/material/IconButton";import j from"@mui/material/utils";import P from"react/jsx-runtime";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var f=function(){return f=Object.assign||function(e){for(var r,a=1,o=arguments.length;a<o;a++)for(var i in r=arguments[a])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},f.apply(this,arguments)};function m(e,r){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)r.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(a[o[i]]=e[o[i]])}return a}var g,u,b,p={background:{light:"#f4f5f7",dark:"#dfe1e6",indigo:"#262a59"},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 "},brand:{darkMatter:"#262a59",titanPink:"#d40fa9",planetBlue:"#1dd7f0",greenEarth:"#aed581"},shadow:{default:"#121315"},text:{base:"#121315",light:"#9399a3",inverted:"#ffffff",link:{default:"#20b0c7",visited:"#1d8fa4"}},utility:{active:"#20b0c7",danger:"#e35656",info:"#262a59",success:"#aed581"}},h={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}},y={border:{radius:{default:"0.375rem",small:"0.25rem"},width:"0.0625rem"},font:{base:"16px",heading:{default:"1.728rem",small:"1.44rem",xsmall:"16px"},overline:{large:"1.44rem",default:"0.833rem"},body:{default:"16px"},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:"16px",minorThirdSub1:"0.833rem",minorThirdSub2:"0.694rem",minorThirdSub3:"0.579rem",minorThirdSub4:"0.482rem",minorThirdSub5:"0.402rem",minorThirdSub6:"0.335rem"},spacing:{main:"1.5rem",section:"2rem",header:"1.5rem",article:"1.5rem",paragraph:"1rem",line:"0.5rem",scale1:"0.0625rem",scale2:"0.125rem",scale4:"0.25rem",scale6:"0.375rem",scale8:"0.5rem",scale16:"1rem",scale24:"1.5rem",scale32:"2rem",scale40:"2.5rem",scale48:"3rem",scale56:"3.5rem",scale64:"4rem",scale80:"5rem",scale88:"5.5rem",scale104:"6.5rem",scale112:"7rem",scale120:"7.5rem",scale128:"8rem",scale160:"10rem",scale208:"13rem"}},x={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:h.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:y.spacing.scale8}},colorDefault:{backgroundColor:p.base.gray10,color:p.base.gray60},colorPrimary:{backgroundColor:p.base.indigo10,color:p.base.indigo80},colorSecondary:{backgroundColor:p.base.pink10,color:p.base.pink80},colorError:{backgroundColor:p.base.red10,color:p.base.red50},colorInfo:{backgroundColor:p.base.indigo10,color:p.base.indigo80},colorSuccess:{backgroundColor:p.base.green10,color:p.base.green80}}},k={h1:{fontFamily:h.family.heading,fontSize:y.font.heading.default,fontWeight:700},h2:{fontFamily:h.family.heading,fontSize:y.font.heading.small,fontWeight:700},h3:{fontFamily:h.family.heading,fontSize:y.font.heading.xsmall,fontWeight:700},body1:{fontFamily:h.family.text,fontSize:y.font.body.default},body2:{fontFamily:h.family.text,fontSize:y.font.body.default,fontWeight:700},caption:{fontFamily:h.family.text,fontSize:y.font.caption.default},overline:{fontFamily:h.family.heading,fontSize:y.font.overline.default,letterSpacing:"initial",fontWeight:700,color:p.base.gray60}},v={small:"".concat(y.spacing.scale4," ").concat(y.spacing.scale8),medium:"".concat(y.spacing.scale8," ").concat(y.spacing.scale16),large:"".concat(y.spacing.scale16," ").concat(y.spacing.scale32)},S={styleOverrides:{root:{textTransform:"none",lineHeight:y.spacing.scale16,fontWeight:h.weight.bold,fontFamily:h.family.text},contained:{padding:v.medium},containedSizeSmall:{padding:v.small},containedSizeLarge:{padding:v.large},text:{padding:v.medium},textSizeSmall:{padding:v.small},textSizeLarge:{padding:v.large},outlined:{padding:"7px ".concat(y.spacing.scale16)},outlinedSizeSmall:{padding:v.small},outlinedSizeLarge:{padding:v.large},sizeSmall:{fontSize:y.font.label.default},sizeLarge:{fontSize:y.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"}}}},C={styleOverrides:{root:{color:p.base.gray60,backgroundColor:p.background.dark},sizeSmall:{padding:"3px"}}},z={styleOverrides:{root:{fontFamily:h.family.text,fontSize:y.font.label.default,fontWeight:h.weight.bold,width:y.spacing.scale24,height:y.spacing.scale24,"& .MuiSvgIcon-root":{width:y.spacing.scale16}},colorDefault:{backgroundColor:p.background.dark,"& .MuiSvgIcon-root":{color:p.base.gray60}}}},O={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(y.spacing.scale16),fontFamily:h.family.text,color:p.base.gray60,padding:"0 0 ".concat(y.spacing.scale16," 0"),"&:hover":{color:p.brand.darkMatter,opacity:1},"&$selected":{color:p.brand.darkMatter},"&:focus":{color:p.brand.darkMatter}}},defaultProps:{disableRipple:!0}},M={styleOverrides:{root:{borderBottom:"1px solid ".concat(p.base.gray20)},indicator:{backgroundColor:p.brand.darkMatter}}},w={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:p.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:p.brand.darkMatter},"&$disabled":{opacity:.5}}}},T={styleOverrides:{outlined:{notchedOutline:{borderColor:p.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}},P={styleOverrides:{root:{fontWeight:h.weight.bold,lineHeight:h.lineHeight.medium,fontFamily:h.family.text,fontSize:y.font.caption.default,color:p.text.base,marginBottom:y.spacing.scale8}}},F={styleOverrides:{colorPrimary:{"&$checked":{"&:hover":{backgroundColor:"transparent"}}},root:{paddingTop:4,paddingBottom:4,color:p.border.default,"& svg":{width:"16px",height:"16px"}}}},B={styleOverrides:{root:{marginRight:16},colorSecondary:{color:p.base.gray0,"&$checked":{color:p.base.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:p.base.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:p.background.light,border:"2px solid ".concat(p.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:p.brand.darkMatter,border:"2px solid ".concat(p.brand.darkMatter)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},W=e({typography:f({},k),palette:{background:{default:"#ffffff"},primary:{main:p.brand.darkMatter},secondary:{main:p.brand.titanPink},error:{main:p.utility.danger},info:{main:p.utility.info},success:{main:p.base.green60}},components:{MuiButton:S,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:C,MuiChip:x,MuiInput:T,MuiFormLabel:P,MuiTabs:M,MuiTab:O,MuiAvatar:z,MuiCheckbox:w,MuiRadio:F,MuiSwitch:B,MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}}}}),E=function(e){return t.createElement(l,{theme:W},e.children)},j=d(r)(b||(g=["\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"],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"],Object.defineProperty?Object.defineProperty(g,"raw",{value:u}):g.raw=u,b=g)),$=function(e){var r=e.color,a=void 0===r?"primary":r,o=e.variant,i=void 0===o?"contained":o,n=e.size,l=void 0===n?"medium":n,d=e.loading,s=e.children,g=m(e,["color","variant","size","loading","children"]);return t.createElement(c,f({size:l,variant:i,color:a,disabled:d},g),t.createElement("span",{style:{opacity:d?0:1}},s),d&&t.createElement(j,{size:20,color:"inherit"}))},I=function(e){var r=e.children,a=m(e,["children"]);return t.createElement(s,f({},a),r)},L=function(e){var r=e.label,o=m(e,["label"]);return t.createElement(a,f({size:"small",label:r},o))},R=function(e){var r=e.icon,a=e.firstName,i=void 0===a?"":a,n=e.lastName,l=void 0===n?"":n,d=m(e,["icon","firstName","lastName"]),c="".concat(i.substring(0,1)).concat(l.substring(0,1)).toLocaleUpperCase(),s=c?p.brand.titanPink:p.background.dark;return t.createElement(o,f({sx:f({backgroundColor:s},d.sx)},d),c||r)},D={small:6,medium:8,large:12,fluid:12},H=function(e){var r=e.component,a=void 0===r?"div":r,o=e.size,l=void 0===o?"large":o,d=e.children,c=m(e,["component","size","children"]),s="fluid"===l;return t.createElement(i,f({component:a,disableGutters:s,maxWidth:!s&&"lg",sx:f({display:"flex",justifyContent:"center"},c.sx)},c),t.createElement(n,{container:!0,justifyContent:"center"},t.createElement(n,{item:!0,md:D[l]},d)))};export{R as Avatar,$ as Button,L as Chip,H as Container,I as Typography,E as UpComponentsProvider,W as theme};
15
+ ***************************************************************************** */var W=function(){return W=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},W.apply(this,arguments)};function F(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}var I={styleOverrides:{root:{fontSize:"12px",fontWeight:600,fontFamily:e.font.family.text,"& .MuiChip-icon":{width:"12px",height:"12px",marginLeft:e.size.spacing.scale8}},colorDefault:{backgroundColor:e.color.base.gray10,color:e.color.base.gray60},colorPrimary:{backgroundColor:e.color.base.indigo10,color:e.color.base.indigo80},colorSecondary:{backgroundColor:e.color.base.pink10,color:e.color.base.pink80},colorError:{backgroundColor:e.color.base.red10,color:e.color.base.red50},colorInfo:{backgroundColor:e.color.base.indigo10,color:e.color.base.indigo80},colorSuccess:{backgroundColor:e.color.base.green10,color:e.color.base.green80}}},B={h1:{fontFamily:e.font.family.heading,fontSize:e.size.font.heading.default,fontWeight:e.font.weight.bold,lineHeight:e.font.lineHeight.xlarge},h2:{fontFamily:e.font.family.heading,fontSize:e.size.font.heading.small,fontWeight:e.font.weight.bold,lineHeight:e.font.lineHeight.xlarge},h3:{fontFamily:e.font.family.heading,fontSize:e.size.font.heading.xsmall,fontWeight:e.font.weight.bold,lineHeight:e.font.lineHeight.large},body1:{fontFamily:e.font.family.text,fontSize:e.size.font.body.default,fontWeight:e.font.weight.normal,lineHeight:e.font.lineHeight.large},body2:{fontFamily:e.font.family.text,fontSize:e.size.font.body.default,fontWeight:e.font.weight.bold,lineHeight:e.font.lineHeight.large},caption:{fontFamily:e.font.family.text,fontSize:e.size.font.caption.default,fontWeight:e.font.weight.normal,lineHeight:e.font.lineHeight.medium},overline:{fontFamily:e.font.family.heading,fontSize:e.size.font.overline.default,letterSpacing:"initial",fontWeight:e.font.weight.bold,color:e.color.base.gray60}},H={small:"".concat(e.size.spacing.scale4," ").concat(e.size.spacing.scale8),medium:"".concat(e.size.spacing.scale8," ").concat(e.size.spacing.scale16),large:"".concat(e.size.spacing.scale16," ").concat(e.size.spacing.scale32)},L={styleOverrides:{root:{textTransform:"none",lineHeight:e.size.spacing.scale16,fontWeight:e.font.weight.bold,fontFamily:e.font.family.text},contained:{padding:H.medium},containedSizeSmall:{padding:H.small},containedSizeLarge:{padding:H.large},text:{padding:H.medium},textSizeSmall:{padding:H.small},textSizeLarge:{padding:H.large},outlined:{padding:"7px ".concat(e.size.spacing.scale16)},outlinedSizeSmall:{padding:H.small},outlinedSizeLarge:{padding:H.large},sizeSmall:{fontSize:e.size.font.label.default},sizeLarge:{fontSize:e.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"}}}},R={styleOverrides:{root:{color:e.color.base.gray60,backgroundColor:e.color.background.dark},sizeSmall:{padding:"3px"}}},T={styleOverrides:{root:{fontFamily:e.font.family.text,fontSize:e.size.font.label.default,fontWeight:e.font.weight.bold,width:e.size.spacing.scale24,height:e.size.spacing.scale24,"& .MuiSvgIcon-root":{width:e.size.spacing.scale16}},colorDefault:{backgroundColor:e.color.background.dark,"& .MuiSvgIcon-root":{color:e.color.base.gray60}}}},$={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:e.color.border.default,"& svg":{width:"16px",height:"16px"},"&&:hover":{backgroundColor:"transparent"}},colorPrimary:{"&$checked":{"&&:hover":{backgroundColor:"transparent"}}},colorSecondary:{"&$checked":{color:e.color.brand.darkMatter},"&$disabled":{opacity:.5}}}},_={styleOverrides:{root:{paddingTop:4,paddingBottom:4,color:e.color.border.default,"& svg":{width:"16px",height:"16px"},"&:hover":{background:"none"}}}},A={styleOverrides:{root:{marginRight:16},colorSecondary:{color:e.color.base.gray0,"&$checked":{color:e.color.base.gray0,left:2,"&:hover":{backgroundColor:"transparent"}},"&$disabled":{color:e.color.base.gray0}},track:{position:"absolute",width:48,height:24,borderRadius:12,opacity:1,left:"calc(50% - 48px/2)",top:"calc(50% - 24px/2)",backgroundColor:e.color.background.light,border:"2px solid ".concat(e.color.border.default),boxSizing:"border-box","$checked$checked + &":{opacity:1,backgroundColor:e.color.brand.darkMatter,border:"2px solid ".concat(e.color.brand.darkMatter)},"$disabled$disabled + &":{opacity:.5,cursor:"not-allowed"}},thumb:{boxShadow:"none"}}},q={styleOverrides:{outlined:{position:"relative",padding:e.size.spacing.scale8,fontSize:e.size.font.label.default,borderRadius:e.size.spacing.scale6,width:"100%","&.Mui-disabled":{backgroundColor:e.color.background.dark,color:e.color.text.light}}}},D={styleOverrides:{root:{input:{padding:e.size.spacing.scale8,fontSize:e.size.font.label.default,height:e.size.spacing.scale16},"& .MuiInputAdornment-root":{button:{padding:"0 ".concat(e.size.spacing.scale8," 0 0"),backgroundColor:"transparent"},svg:{width:e.size.spacing.scale16,height:e.size.spacing.scale16}}}}},N={styleOverrides:{outlined:{notchedOutline:{borderColor:e.color.border.default}},root:{underline:{"&:before":{borderBottom:"none"},"&:after":{borderBottom:"none"},"&:hover":{borderBottom:"none"},"&&:hover::before":{border:"none"}}}}};e.size.font.body.default,e.font.family.text,e.color.base.gray100;var V={styleOverrides:{textColorPrimary:{textTransform:"none",minWidth:"auto",fontWeight:700,marginRight:"".concat(e.size.spacing.scale16),fontFamily:e.font.family.text,color:e.color.base.gray60,padding:"0 0 ".concat(e.size.spacing.scale16," 0"),"&:hover":{color:e.color.brand.darkMatter,opacity:1},"&$selected":{color:e.color.brand.darkMatter},"&:focus":{color:e.color.brand.darkMatter}}},defaultProps:{disableRipple:!0}};e.size.font.caption.default;var G,U,J,K,Q={styleOverrides:{root:{borderBottom:"1px solid ".concat(e.color.base.gray20)},indicator:{backgroundColor:e.color.brand.darkMatter}}},X={styleOverrides:{root:{fontWeight:e.font.weight.bold,lineHeight:e.font.lineHeight.medium,fontFamily:e.font.family.text,fontSize:e.size.font.caption.default,color:e.color.text.base,marginBottom:e.size.spacing.scale8}}},Y=t({typography:W({},B),palette:{background:{default:"#ffffff"},primary:{main:e.color.brand.darkMatter},secondary:{main:e.color.brand.titanPink},error:{main:e.color.utility.danger},info:{main:e.color.utility.info},success:{main:e.color.base.green60}},components:{MuiButton:L,MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0}},MuiContainer:{styleOverrides:{maxWidthLg:{"@media (min-width: 1280px)":{maxWidth:"1185px"}}}},MuiIconButton:R,MuiChip:I,MuiInput:N,MuiTextField:D,MuiFormLabel:X,MuiTabs:Q,MuiTab:V,MuiAvatar:T,MuiCheckbox:$,MuiRadio:_,MuiSwitch:A,MuiSelect:q,MuiLink:{styleOverrides:{root:{textDecoration:"none","&:hover":{textDecoration:"underline"}}}},MuiDivider:{styleOverrides:{root:{margin:"16px 0"}}},MuiFormControl:{styleOverrides:{root:{width:"100%"}}}}}),Z=function(e){return z.createElement(z.Fragment,null,z.createElement(o,null),z.createElement(E,{theme:Y},e.children))},ee=S(r)(J||(G=["\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"],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"],Object.defineProperty?Object.defineProperty(G,"raw",{value:U}):G.raw=U,J=G)),te=function(e){var t=e.color,o=void 0===t?"primary":t,r=e.variant,n=void 0===r?"contained":r,a=e.size,i=void 0===a?"medium":a,l=e.loading,c=e.children,d=F(e,["color","variant","size","loading","children"]);return z.createElement(C,W({size:i,variant:n,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 t=e.children,o=F(e,["children"]);return z.createElement(w,W({},o),t)},re=function(e){var t=e.label,o=F(e,["label"]);return z.createElement(n,W({size:"small",label:t},o))},ne=function(t){var o=t.icon,r=t.firstName,n=void 0===r?"":r,i=t.lastName,l=void 0===i?"":i,c=F(t,["icon","firstName","lastName"]),d="".concat(n.substring(0,1)).concat(l.substring(0,1)).toLocaleUpperCase(),s=d?e.color.brand.titanPink:e.color.background.dark;return z.createElement(a,W({sx:W({backgroundColor:s},c.sx)},c),d||o)},ae={small:6,medium:8,large:12,fluid:12},ie=function(e){var t=e.component,o=void 0===t?"div":t,r=e.size,n=void 0===r?"large":r,a=e.children,c=F(e,["component","size","children"]),d="fluid"===n;return z.createElement(i,W({component:o,disableGutters:d,maxWidth:!d&&"lg",sx:W({display:"flex",justifyContent:"center"},c.sx)},c),z.createElement(l,{container:!0,justifyContent:"center"},z.createElement(l,{item:!0,md:ae[n]},a)))},le=function(e){var t=e.children,o=F(e,["children"]);return z.createElement(c,W({},o),t)},ce=function(e){var t=F(e,[]);return z.createElement(d,W({},t))},de=function(t){var o=t.id,r=t.required,n=void 0===r||r,a=t.data,i=t.label,l=t.error,d=t.helperText;return z.createElement(s,null,z.createElement(u,{component:"label",error:l},i," ",n?"":z.createElement(c,{component:"span",sx:{fontWeight:e.font.weight.normal,color:e.color.text.light}},"(optional)")),z.createElement(m,null,a.map((function(t,r){var n=t.value,a=t.label;return z.createElement(f,{key:r,value:n,label:a||"",sx:{fontSize:e.size.font.base,color:e.color.text.base},control:z.createElement(ce,{color:"primary",inputProps:{"data-testid":"".concat(o,"-").concat(r)}})})}))),l&&z.createElement(g,{sx:{marginLeft:0,marginRight:0},error:l},d))},se=function(e){return z.createElement(p,W({},e))},ue=function(t){var o=t.id,r=t.helperText,n=t.label,a=t.error,i=t.required,l=void 0===i||i,d=t.name,m=t.data;return z.createElement(s,{component:"fieldset",error:a},z.createElement(u,{component:"legend"},n," ",l?"":z.createElement(c,{component:"span",sx:{fontWeight:e.font.weight.normal,color:e.color.text.light}},"(optional)")),z.createElement(b,{"aria-label":d,name:d},m.map((function(t,r){var n=t.value,a=t.label;return z.createElement(f,{value:n,key:n,label:a||"",sx:{fontSize:e.size.font.base,color:e.color.text.base},control:z.createElement(se,{color:"primary",inputProps:{"data-testid":"".concat(o,"-").concat(r)}})})}))),a&&z.createElement(g,{sx:{marginLeft:0,marginRight:0}},r))},me=function(e){return z.createElement(h,W({},e))},fe=function(e){var t=e.id,o=e.label,r=e.checked;return z.createElement(s,null,z.createElement(u,{component:"label"},o),z.createElement(f,{control:z.createElement(me,{id:t}),label:"".concat(r?"Active":"Inactive")}))},ge=function(e){return z.createElement(y,W({variant:"outlined"},e))},pe=function(t){var o=t.id,r=t.required,n=void 0===r||r,a=t.options,i=t.label,l=t.error,d=t.placeholder,m=t.helperText;return z.createElement(s,null,z.createElement(u,{component:"label",error:l},i," ",n?"":z.createElement(c,{component:"span",sx:{fontWeight:e.font.weight.normal,color:e.color.text.light}},"(optional)")),z.createElement(ge,{id:o,placeholder:d,error:l},a.map((function(e){return z.createElement(v,{key:e.value,value:e.value},e.text)}))),l&&z.createElement(g,{sx:{marginLeft:0,marginRight:0},error:l},m))},be={},he={exports:{}};(K=he).exports=function(e){return e&&e.__esModule?e:{default:e}},K.exports.__esModule=!0,K.exports.default=K.exports;var ye={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=j}(ye);var ve=he.exports;Object.defineProperty(be,"__esModule",{value:!0});var xe=be.default=void 0,ze=P,ke=(0,ve(ye).default)((0,ze.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}),"VisibilityOutlined");xe=be.default=ke;var Ee={},Se=he.exports;Object.defineProperty(Ee,"__esModule",{value:!0});var Ce=Ee.default=void 0,we=P,Me=(0,Se(ye).default)((0,we.jsx)("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6zm-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14zM2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45 2.01 3.87zm7.5 7.5 2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13zm-3.4-3.4 1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.77-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53z"}),"VisibilityOffOutlined");Ce=Ee.default=Me;var Oe=function(e){var t=e.type,o=F(e,["type"]),r=k(!1),n=r[0],a=r[1],i=W(W({},o.InputProps),"password"===t&&{endAdornment:z.createElement(M,{position:"end"},z.createElement(O,{"aria-label":"toggle password visibility",onClick:function(){return a(!n)},edge:"end"},n?z.createElement(xe,null):z.createElement(Ce,null)))});return z.createElement(x,W({},o,{type:n?"text":t,InputProps:i}))},je=function(t){var o=t.id,r=t.required,n=void 0===r||r,a=t.label,i=t.error,l=t.helperText,d=F(t,["id","required","label","error","helperText"]);return z.createElement(s,null,z.createElement(u,{component:"label",error:i},a," ",!n&&z.createElement(c,{component:"span",sx:{fontWeight:e.font.weight.normal,color:e.color.text.light}},"(optional)")),z.createElement(Oe,W({},d,{id:o,error:i,inputProps:{"data-testid":o}})),i&&z.createElement(g,{sx:{marginLeft:0,marginRight:0},error:i},l))};export{ne as Avatar,le as Box,te as Button,ce as Checkbox,re as Chip,ie as Container,de as FormCheckbox,je as FormInput,ue as FormRadio,pe as FormSelect,fe as FormSwitch,Oe as Input,se as Radio,ge as Select,me as Switch,oe as Typography,Z as UpComponentsProvider,Y as theme};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AvatarProps as MUIAvatarProps } from '@mui/material';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type AvatarProps = MUIGlobalOmit<Omit<MUIAvatarProps, 'children' | 'alt' | 'imgProps' | 'sizes' | 'src' | 'srcSet' | 'variant'>, {
5
5
  firstName?: string;
6
6
  lastName?: string;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps as MUIBoxProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type BoxProps = MUIGlobalOmit<MUIBoxProps>;
5
+ export declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
5
+ export declare const Padding: Story<Omit<import("@mui/material").BoxProps<"div", {}>, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type ButtonProps = MUIGlobalOmit<MUIButtonProps, {
5
5
  loading?: boolean;
6
6
  }>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { CheckboxProps as MUICheckboxProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type CheckboxProps = MUIGlobalOmit<MUICheckboxProps>;
5
+ export declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<import("@mui/material").CheckboxProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ChipProps as MUIChipProps } from '@mui/material';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type ChipProps = MUIGlobalOmit<Omit<MUIChipProps, 'size'>>;
5
5
  export declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ContainerProps as MUIContainerProps } from '@mui/material';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type ContainerProps = MUIGlobalOmit<Omit<MUIContainerProps, 'maxWidth'>, {
5
5
  /**
6
6
  * Determine the max-width of the container.
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { MUIGlobalOmit } from '../../global/utils/types';
3
+ import { CheckboxProps } from '../Checkbox/Checkbox';
4
+ export declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
5
+ data: {
6
+ value: string | number;
7
+ label?: string;
8
+ }[];
9
+ label?: string;
10
+ error?: boolean;
11
+ helperText?: string;
12
+ }>;
13
+ export declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormCheckboxProps } from './FormCheckbox';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormCheckboxProps>>;
7
+ export declare const Required: Story<React.PropsWithChildren<FormCheckboxProps>>;
8
+ export declare const withError: Story<React.PropsWithChildren<FormCheckboxProps>>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { InputProps } from '../Input/Input';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type FormInputProps = MUIGlobalOmit<InputProps, {
5
+ label?: string;
6
+ error?: boolean;
7
+ helperText?: string;
8
+ }>;
9
+ export declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FormInputProps } from './FormInput';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<FormInputProps>;
6
+ export declare const Required: Story<FormInputProps>;
7
+ export declare const withError: Story<FormInputProps>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { RadioGroupProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
5
+ data: {
6
+ value: string | number;
7
+ label?: string;
8
+ }[];
9
+ helperText?: string;
10
+ label?: string;
11
+ error?: boolean;
12
+ required?: boolean;
13
+ }>;
14
+ export declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormRadioProps } from './FormRadio';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormRadioProps>>;
7
+ export declare const Required: Story<React.PropsWithChildren<FormRadioProps>>;
8
+ export declare const withError: Story<React.PropsWithChildren<FormRadioProps>>;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { MUIGlobalOmit } from '../../global/utils/types';
3
+ import { SelectProps } from '../Select/Select';
4
+ export declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
5
+ options: {
6
+ value: string | number;
7
+ text: string;
8
+ }[];
9
+ label?: string;
10
+ error?: boolean;
11
+ helperText?: string;
12
+ }>;
13
+ export declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, }: FormSelectProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { FormSelectProps } from './FormSelect';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Primary: Story<FormSelectProps>;
6
+ export declare const Required: Story<FormSelectProps>;
7
+ export declare const withError: Story<FormSelectProps>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { SwitchProps } from '../Switch/Switch';
3
+ export interface FormSwitchProps extends SwitchProps {
4
+ label?: string;
5
+ id?: string;
6
+ checked?: boolean;
7
+ }
8
+ export declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { FormSwitchProps } from './FormSwitch';
4
+ declare const _default: Meta<import("@storybook/react").Args>;
5
+ export default _default;
6
+ export declare const Primary: Story<React.PropsWithChildren<FormSwitchProps>>;
@@ -0,0 +1,7 @@
1
+ import { HTMLInputTypeAttribute } from 'react';
2
+ import { TextFieldProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
5
+ type?: HTMLInputTypeAttribute;
6
+ };
7
+ export declare const Input: ({ type, ...otherProps }: InputProps) => JSX.Element;
@@ -1,2 +1,3 @@
1
1
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ export declare const MuiTextField: OverridesStyleRules;
2
3
  export declare const MuiInput: OverridesStyleRules;
@@ -0,0 +1,6 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ import { InputProps } from './Input';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Default: Story<InputProps>;
6
+ export declare const Password: Story<InputProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { RadioProps as MUIRadioProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type RadioProps = MUIGlobalOmit<MUIRadioProps>;
5
+ export declare const Radio: (props: RadioProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<import("@mui/material").RadioProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { SelectProps as MUISelectProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type SelectProps = MUIGlobalOmit<Omit<MUISelectProps, 'variant' | 'label'>>;
5
+ export declare const Select: (props: SelectProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
+ export declare const MuiSelect: OverridesStyleRules;
@@ -0,0 +1,6 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ declare const _default: Meta<import("@storybook/react").Args>;
3
+ export default _default;
4
+ export declare const Default: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
5
+ export declare const Disabled: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
6
+ export declare const Error: Story<Omit<Omit<import("@mui/material").SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation">>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SwitchProps as MUISwitchProps } from '@mui/material';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
+ export declare type SwitchProps = MUIGlobalOmit<MUISwitchProps, {
5
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
6
+ }>;
7
+ export declare const Switch: (props: SwitchProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Story, Meta } from '@storybook/react';
2
+ import { SwitchProps } from './Switch';
3
+ declare const _default: Meta<import("@storybook/react").Args>;
4
+ export default _default;
5
+ export declare const Default: Story<SwitchProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
3
- import { MUIGlobalOmit } from 'global/utils/types';
3
+ import { MUIGlobalOmit } from '../../global/utils/types';
4
4
  export declare type TypographyProps = MUIGlobalOmit<MUITypographyProps, {
5
5
  component?: React.ElementType;
6
6
  }>;
@@ -3,3 +3,14 @@ export { Typography } from './Typography/Typography';
3
3
  export { Chip } from './Chip/Chip';
4
4
  export { Avatar } from './Avatar/Avatar';
5
5
  export { Container } from './Container/Container';
6
+ export { Box } from './Box/Box';
7
+ export { Checkbox } from './Checkbox/Checkbox';
8
+ export { FormCheckbox } from './FormCheckbox/FormCheckbox';
9
+ export { Radio } from './Radio/Radio';
10
+ export { FormRadio } from './FormRadio/FormRadio';
11
+ export { Switch } from './Switch/Switch';
12
+ export { FormSwitch } from './FormSwitch/FormSwitch';
13
+ export { Select } from './Select/Select';
14
+ export { FormSelect } from './FormSelect/FormSelect';
15
+ export { Input } from './Input/Input';
16
+ export { FormInput } from './FormInput/FormInput';
@@ -2,8 +2,4 @@ export * from './menuItem';
2
2
  export * from './tab';
3
3
  export * from './tablePagination';
4
4
  export * from './tabs';
5
- export * from './form/checkbox';
6
- export * from './form/input';
7
5
  export * from './form/label';
8
- export * from './form/radio';
9
- export * from './form/switch';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Box } from '../../..';
3
+ export { Box };
4
+ export declare const SemanticColors: () => JSX.Element;
5
+ export declare const Palette: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const CodeSnippet: ({ dark, language, code, }: {
3
+ dark?: boolean | undefined;
4
+ language?: string | undefined;
5
+ code: string;
6
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const CopyToClipboard: ({ label }: {
3
+ label: string;
4
+ }) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Header: ({ title, subtitle }: {
3
+ title: string;
4
+ subtitle: string;
5
+ }) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const Table: {
3
+ Wrapper: ({ rows, columns }: {
4
+ rows: React.ReactNode;
5
+ columns: string[];
6
+ }) => JSX.Element;
7
+ Cell: import("@emotion/styled").StyledComponent<import("@mui/material/TableCell/TableCell").TableCellProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
8
+ Row: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/TableRow/TableRow").TableRowTypeMap<{}, "tr">>;
9
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Box } from '../../..';
3
+ export { Box };
4
+ export declare const SemanticSpacing: () => JSX.Element;
5
+ export declare const SpacingTokens: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const SemanticTypography: () => JSX.Element;
3
+ export declare const FontSizes: () => JSX.Element;
4
+ export declare const FontTokens: () => JSX.Element;
@@ -1,4 +1,6 @@
1
+ import tokens from '@up42/design-system-tokens/dist/json/tokens.json';
1
2
  export * from '@mui/material';
3
+ export { tokens };
2
4
  export { UpComponentsProvider } from './global/UpComponentsProvider/UpComponentsProvider';
3
5
  export { theme } from './global/theme';
4
- export { Button, Typography, Chip, Avatar, Container } from './components';
6
+ export { Button, Typography, Chip, Avatar, Container, Box, Switch, FormSwitch, Checkbox, FormCheckbox, Radio, FormRadio, Select, FormSelect, Input, FormInput, } from './components';
package/dist/index.d.ts CHANGED
@@ -1,32 +1,18 @@
1
1
  /// <reference types="react" />
2
+ export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
2
3
  import * as _mui_material from '@mui/material';
3
- import { ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1 } from '@mui/material';
4
+ import { ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, BoxProps as BoxProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, TextFieldProps } from '@mui/material';
4
5
  export * from '@mui/material';
5
6
  import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
6
7
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
7
- import React from 'react';
8
+ import React, { HTMLInputTypeAttribute } from 'react';
8
9
  import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
9
10
 
10
11
  declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
11
12
 
12
13
  declare const theme: _mui_material.Theme;
13
14
 
14
- type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps &
15
- Omit<
16
- MuiProps,
17
- | 'classes'
18
- | 'disableElevation'
19
- | 'disableFocusRipple'
20
- | 'disableRipple'
21
- | 'focusRipple'
22
- | 'tabIndex'
23
- | 'action'
24
- | 'centerRipple'
25
- | 'disableTouchRipple'
26
- | 'focusVisibleClassName'
27
- | 'LinkComponent'
28
- | 'TouchRippleProps'
29
- >
15
+ declare type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps & Omit<MuiProps, 'classes' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'focusRipple' | 'tabIndex' | 'action' | 'centerRipple' | 'disableTouchRipple' | 'focusVisibleClassName' | 'LinkComponent' | 'TouchRippleProps'>;
30
16
 
31
17
  declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
32
18
  loading?: boolean;
@@ -73,4 +59,74 @@ declare type ContainerProps = MUIGlobalOmit<Omit<ContainerProps$1, 'maxWidth'>,
73
59
  */
74
60
  declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
75
61
 
76
- export { Avatar, Button, Chip, Container, Typography, UpComponentsProvider, theme };
62
+ declare type BoxProps = MUIGlobalOmit<BoxProps$1>;
63
+ declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
64
+
65
+ declare type CheckboxProps = MUIGlobalOmit<CheckboxProps$1>;
66
+ declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
67
+
68
+ declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
69
+ data: {
70
+ value: string | number;
71
+ label?: string;
72
+ }[];
73
+ label?: string;
74
+ error?: boolean;
75
+ helperText?: string;
76
+ }>;
77
+ declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
78
+
79
+ declare type RadioProps = MUIGlobalOmit<RadioProps$1>;
80
+ declare const Radio: (props: RadioProps) => JSX.Element;
81
+
82
+ declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
83
+ data: {
84
+ value: string | number;
85
+ label?: string;
86
+ }[];
87
+ helperText?: string;
88
+ label?: string;
89
+ error?: boolean;
90
+ required?: boolean;
91
+ }>;
92
+ declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
93
+
94
+ declare type SwitchProps = MUIGlobalOmit<SwitchProps$1, {
95
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
96
+ }>;
97
+ declare const Switch: (props: SwitchProps) => JSX.Element;
98
+
99
+ interface FormSwitchProps extends SwitchProps {
100
+ label?: string;
101
+ id?: string;
102
+ checked?: boolean;
103
+ }
104
+ declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
105
+
106
+ declare type SelectProps = MUIGlobalOmit<Omit<SelectProps$1, 'variant' | 'label'>>;
107
+ declare const Select: (props: SelectProps) => JSX.Element;
108
+
109
+ declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
110
+ options: {
111
+ value: string | number;
112
+ text: string;
113
+ }[];
114
+ label?: string;
115
+ error?: boolean;
116
+ helperText?: string;
117
+ }>;
118
+ declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, }: FormSelectProps) => JSX.Element;
119
+
120
+ declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
121
+ type?: HTMLInputTypeAttribute;
122
+ };
123
+ declare const Input: ({ type, ...otherProps }: InputProps) => JSX.Element;
124
+
125
+ declare type FormInputProps = MUIGlobalOmit<InputProps, {
126
+ label?: string;
127
+ error?: boolean;
128
+ helperText?: string;
129
+ }>;
130
+ declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
131
+
132
+ export { Avatar, Box, Button, Checkbox, Chip, Container, FormCheckbox, FormInput, FormRadio, FormSelect, FormSwitch, Input, Radio, Select, Switch, Typography, UpComponentsProvider, theme };