@lunit/design-system 1.0.0-a.4 → 1.0.0-a.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/components/Alert/index.js +1 -1
  3. package/dist/cjs/components/Alert/index.js.map +1 -1
  4. package/dist/cjs/components/Button/index.js +1 -1
  5. package/dist/cjs/components/Button/index.js.map +1 -1
  6. package/dist/cjs/components/TextField/index.js +1 -1
  7. package/dist/cjs/components/TextField/index.js.map +1 -1
  8. package/dist/cjs/components/ToggleButton/index.js +1 -1
  9. package/dist/cjs/components/ToggleButton/index.js.map +1 -1
  10. package/dist/cjs/components/Typography/index.js +2 -0
  11. package/dist/cjs/components/Typography/index.js.map +1 -0
  12. package/dist/cjs/index.js +1 -1
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/components/Alert/Alert.js.map +1 -1
  15. package/dist/components/Button/Button.js +2 -2
  16. package/dist/components/Button/Button.js.map +1 -1
  17. package/dist/components/Button/Button.styled.js +42 -21
  18. package/dist/components/Button/Button.styled.js.map +1 -1
  19. package/dist/components/TextField/TextField.js +3 -3
  20. package/dist/components/TextField/TextField.js.map +1 -1
  21. package/dist/components/TextField/TextField.style.js +3 -0
  22. package/dist/components/TextField/TextField.style.js.map +1 -1
  23. package/dist/components/Toast/Toast.js +1 -1
  24. package/dist/components/Toast/Toast.js.map +1 -1
  25. package/dist/components/Toast/index.js +1 -1
  26. package/dist/components/Toast/index.js.map +1 -1
  27. package/dist/components/Typography/index.js +3 -0
  28. package/dist/components/Typography/index.js.map +1 -0
  29. package/dist/foundation/Typography/index.js.map +1 -1
  30. package/dist/foundation/colors/index.js +9 -11
  31. package/dist/foundation/colors/index.js.map +1 -1
  32. package/dist/foundation/colors/token/component.js +22 -38
  33. package/dist/foundation/colors/token/component.js.map +1 -1
  34. package/dist/index.js +3 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/types/components/Button/Button.styled.d.ts +39 -19
  37. package/dist/types/components/Button/Button.types.d.ts +1 -1
  38. package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
  39. package/dist/types/components/Chip/Chip.types.d.ts +1 -0
  40. package/dist/types/components/TextField/TextField.style.d.ts +3 -1
  41. package/dist/types/components/TextField/TextField.types.d.ts +2 -3
  42. package/dist/types/components/TextField/TextFieldIcon.d.ts +1 -0
  43. package/dist/types/components/Toast/index.d.ts +2 -1
  44. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
  45. package/dist/types/components/Typography/index.d.ts +7 -0
  46. package/dist/types/foundation/Typography/index.d.ts +1 -5
  47. package/dist/types/foundation/colors/index.d.ts +9 -11
  48. package/dist/types/foundation/colors/types.d.ts +9 -11
  49. package/dist/types/foundation/index.d.ts +9 -11
  50. package/dist/types/index.d.ts +3 -0
  51. package/package.json +21 -16
  52. package/src/components/Button/Button.styled.ts +42 -22
  53. package/src/components/Button/Button.tsx +12 -10
  54. package/src/components/Button/Button.types.ts +1 -1
  55. package/src/components/TextField/TextField.style.ts +3 -0
  56. package/src/components/TextField/TextField.tsx +3 -3
  57. package/src/components/TextField/TextField.types.ts +1 -3
  58. package/src/components/Toast/Toast.tsx +1 -1
  59. package/src/components/Toast/index.tsx +2 -1
  60. package/src/components/Typography/index.ts +9 -0
  61. package/src/foundation/Typography/index.ts +2 -6
  62. package/src/foundation/colors/index.ts +9 -11
  63. package/src/foundation/colors/token/component.ts +22 -38
  64. package/src/foundation/colors/types.ts +9 -11
  65. package/src/index.ts +3 -0
  66. package/src/stories/components/Button/Kind.stories.tsx +38 -5
  67. package/src/stories/components/Toast/Toast.stories.tsx +1 -1
  68. package/src/stories/foundation/Typography/Typography.mdx +1 -1
  69. package/src/stories/foundation/Typography/Typography.stories.tsx +3 -1
  70. package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +2 -2
  71. package/src/stories/foundation/Typography/TypographyGroup.tsx +3 -7
package/README.md CHANGED
@@ -3,8 +3,8 @@
3
3
  ## Development
4
4
 
5
5
  - At `repository root` location
6
- - `yarn` : Install node modules and set lerna environment
7
- - `yarn storybook:design-system` : Runs [storybook](http://localhost:6006) local dev server on http://localhost:6006
6
+ - `npm i` : Install node modules and set Nx environment
7
+ - `nx storybook @lunit/design-system` : Runs [storybook](http://localhost:6006) local dev server on http://localhost:6006
8
8
 
9
9
  ## Usage
10
10
 
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>A});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var a=e.n(i);const c=require("@lunit/design-system-icons/Warning16");var d=e.n(c);const l=require("@lunit/design-system-icons/Information16");var s=e.n(l);const p=require("@lunit/design-system-icons/Close");var u=e.n(p);const m=require("react"),x=require("@mui/material"),g=(e,o)=>{switch(o){case"info":return e.palette.token.component.alert_info_bg;case"warning":return e.palette.token.component.alert_warning_bg;case"error":return e.palette.token.component.alert_error_bg;default:return e.palette.token.component.alert_success_bg}},_=(e,o)=>{switch(o){case"info":return e.palette.token.component.alert_info_border;case"warning":return e.palette.token.component.alert_warning_border;case"error":return e.palette.token.component.alert_error_border;default:return e.palette.token.component.alert_success_border}},b=(e,o)=>{switch(o){case"info":return e.palette.token.core.icon_info_02;case"warning":return e.palette.token.core.icon_warning_02;case"error":return e.palette.token.core.icon_error_02;default:return e.palette.token.core.icon_success_02}},h=(0,x.styled)(x.Alert)((({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${_(o,e)}`,backgroundColor:g(o,e),boxShadow:"none"},"& .MuiAlert-icon":{padding:"4px",marginRight:"0",fontSize:"20px",color:`${b(o,e)} !important`},"& .MuiAlert-message":{width:"100%",minHeight:"28px",padding:"4px 0 0",margin:"0 8px 0 8px"},"& .MuiAlert-action":{margin:0,padding:0},"& .MuiSvgIcon-root":{height:"20px",width:"20px"}}))),y=(0,x.styled)(x.AlertTitle)((({theme:e})=>({"&.MuiAlertTitle-root":{marginTop:0,marginBottom:8,fontWeight:700,fontSize:"14px",lineHeight:"20px",color:e.palette.token.core.text_normal}}))),k=(0,x.styled)("div")((({theme:e})=>({color:e.palette.token.core.text_normal}))),f=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),z=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",w=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",j=e=>({position:"relative",zIndex:0,backgroundColor:e}),M="8px",I=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===e&&{...t.button1,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),O=({kind:e,color:o,token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_contained_primary_text,backgroundColor:n.component.btn_contained_primary_bg,"&:hover":j(n.component.btn_contained_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_primary_text}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_contained_secondary_text,backgroundColor:n.component.btn_contained_secondary_bg,"&:hover":j(n.component.btn_contained_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_contained_error_text,backgroundColor:n.component.btn_contained_error_bg,"&:hover":j(n.component.btn_contained_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_error_text}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_ghost_primary_text,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_primary_text}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_ghost_secondary_text,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_ghost_error_text,"&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_outlined_primary_text,border:`1px solid ${n.component.btn_outlined_primary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:M},"&.Mui-disabled":{opacity:.38,color:n.component.btn_outlined_primary_text}}}),S=({token:e})=>({fontWeight:"500",borderRadius:M,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:M}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px"}}),$=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...S({token:o}),...C({size:t,hasIconOnly:i}),...I({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,token:o})}))),q=e=>{const{kind:o="contained",size:t="small",color:r="primary",icon:i,className:a,children:c,...d}=e,l=Boolean(i&&!c);return(0,n.jsx)(n.Fragment,{children:"contained"===o||"ghost"===o?(0,n.jsx)($,{className:`${o} ${a||""}`,kind:o,color:r,size:t,startIcon:i,hasIconOnly:l,...d,children:!l&&(0,n.jsx)(n.Fragment,{children:c})}):(0,n.jsx)($,{className:`outlined ${a||""}`,kind:"outlined",color:"primary",size:t,startIcon:i,hasIconOnly:l,...d,children:!l&&(0,n.jsx)(n.Fragment,{children:c})})})},R={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(s(),{variant:"filled"}),warning:(0,n.jsx)(d(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},A=(0,m.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:c,...d}=e;return(0,n.jsxs)(h,{ref:o,severity:r,iconMapping:R,slots:{closeButton:()=>(0,n.jsx)(q,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:c})},onClose:c,...d,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(k,{children:i}),a&&(0,n.jsx)(f,{children:a})]})}));module.exports=o})();
1
+ (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>A});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var a=e.n(i);const c=require("@lunit/design-system-icons/Warning16");var l=e.n(c);const d=require("@lunit/design-system-icons/Information16");var s=e.n(d);const p=require("@lunit/design-system-icons/Close");var m=e.n(p);const u=require("react"),x=require("@mui/material"),b=(e,o)=>{switch(o){case"info":return e.palette.token.component.alert_info_bg;case"warning":return e.palette.token.component.alert_warning_bg;case"error":return e.palette.token.component.alert_error_bg;default:return e.palette.token.component.alert_success_bg}},g=(e,o)=>{switch(o){case"info":return e.palette.token.component.alert_info_border;case"warning":return e.palette.token.component.alert_warning_border;case"error":return e.palette.token.component.alert_error_border;default:return e.palette.token.component.alert_success_border}},h=(e,o)=>{switch(o){case"info":return e.palette.token.core.icon_info_02;case"warning":return e.palette.token.core.icon_warning_02;case"error":return e.palette.token.core.icon_error_02;default:return e.palette.token.core.icon_success_02}},_=(0,x.styled)(x.Alert)((({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${g(o,e)}`,backgroundColor:b(o,e),boxShadow:"none"},"& .MuiAlert-icon":{padding:"4px",marginRight:"0",fontSize:"20px",color:`${h(o,e)} !important`},"& .MuiAlert-message":{width:"100%",minHeight:"28px",padding:"4px 0 0",margin:"0 8px 0 8px"},"& .MuiAlert-action":{margin:0,padding:0},"& .MuiSvgIcon-root":{height:"20px",width:"20px"}}))),y=(0,x.styled)(x.AlertTitle)((({theme:e})=>({"&.MuiAlertTitle-root":{marginTop:0,marginBottom:8,fontWeight:700,fontSize:"14px",lineHeight:"20px",color:e.palette.token.core.text_normal}}))),k=(0,x.styled)("div")((({theme:e})=>({color:e.palette.token.core.text_normal}))),f=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),z=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",w=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",j=e=>({position:"relative",zIndex:0,backgroundColor:e}),M="8px",I=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===e&&{...t.button1,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),O=({kind:e,color:o,token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":j(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":j(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":j(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_error_text,"&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:M},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:M},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),C=({token:e})=>({fontWeight:"500",borderRadius:M,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:M}}),S=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px"}}),$=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...C({token:o}),...S({size:t,hasIconOnly:i}),...I({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,token:o})}))),R=e=>{const{size:o="small",color:t="primary",icon:r,className:i,children:a,...c}=e,l=Boolean(r&&!a);return(0,n.jsx)(n.Fragment,{children:"outlined"===e.kind?(0,n.jsx)($,{...c,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:o,startIcon:r,hasIconOnly:l,children:!l&&(0,n.jsx)(n.Fragment,{children:a})}):(0,n.jsx)($,{...c,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:o,startIcon:r,hasIconOnly:l,children:!l&&(0,n.jsx)(n.Fragment,{children:a})})})},q={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(s(),{variant:"filled"}),warning:(0,n.jsx)(l(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},A=(0,u.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:c,...l}=e;return(0,n.jsxs)(_,{ref:o,severity:r,iconMapping:q,slots:{closeButton:()=>(0,n.jsx)(R,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(m(),{}),onClick:c})},onClose:c,...l,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(k,{children:i}),a&&(0,n.jsx)(f,{children:a})]})}));module.exports=o})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Alert/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAAS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,QAAQ,YA+BxB,GA5Bc,IAAAI,aAAuC,CAACb,EAAOc,KAC3D,MAAM,MAAEC,EAAK,SAAEhG,EAAQ,SAAEoF,EAAQ,aAAEa,EAAY,QAAEC,KAAYC,GAASlB,EACtE,OACE,UAAC9D,EAAW,CACV4E,IAAKA,EACL/F,SAAUA,EACVoG,YAAaZ,EACba,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACL3D,KAAK,QACLC,KAAK,QACLf,MAAM,YACNqD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC9D,EAAgB,UAAE8D,KAC7B,SAACxD,EAAmB,UAAE4C,IACrBa,IAAgB,SAACxD,EAAkB,UAAEwD,MAEzC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.token.component.alert_error_bg;\n default:\n return theme.palette.token.component.alert_success_bg;\n }\n};\n\nexport const getBorderColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_border;\n case \"warning\":\n return theme.palette.token.component.alert_warning_border;\n case \"error\":\n return theme.palette.token.component.alert_error_border;\n default:\n return theme.palette.token.component.alert_success_border;\n }\n};\n\nexport const getIconColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.core.icon_info_02;\n case \"warning\":\n return theme.palette.token.core.icon_warning_02;\n case \"error\":\n return theme.palette.token.core.icon_error_02;\n default:\n return theme.palette.token.core.icon_success_02;\n }\n};\n","import {\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n styled,\n} from \"@mui/material\";\nimport type { AlertProps } from \"./Alert.types\";\nimport {\n getBorderColor,\n getBackgroundColor,\n getIconColor,\n} from \"./Alert.utils\";\n\nexport const StyledAlert = styled(MuiAlert)<AlertProps>(\n ({ severity, theme }) => ({\n \"&.MuiAlert-root\": {\n display: \"flex\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: `1px solid ${getBorderColor(theme, severity)}`,\n backgroundColor: getBackgroundColor(theme, severity),\n boxShadow: \"none\",\n },\n \"& .MuiAlert-icon\": {\n padding: \"4px\",\n marginRight: \"0\",\n fontSize: \"20px\",\n color: `${getIconColor(theme, severity)} !important`,\n },\n \"& .MuiAlert-message\": {\n width: \"100%\",\n minHeight: \"28px\",\n padding: \"4px 0 0\",\n margin: \"0 8px 0 8px\",\n },\n \"& .MuiAlert-action\": {\n margin: 0,\n padding: 0,\n },\n \"& .MuiSvgIcon-root\": {\n height: \"20px\",\n width: \"20px\",\n },\n })\n);\n\nexport const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({\n \"&.MuiAlertTitle-root\": {\n marginTop: 0,\n marginBottom: 8,\n fontWeight: 700,\n fontSize: \"14px\",\n lineHeight: \"20px\",\n color: theme.palette.token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.token.core.text_normal,\n}));\n\nexport const StyledBottomAction = styled(\"div\")({\n marginTop: \"12px\",\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_contained_primary_text,\n backgroundColor: token.component.btn_contained_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_primary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_contained_secondary_text,\n\n backgroundColor: token.component.btn_contained_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_contained_error_text,\n backgroundColor: token.component.btn_contained_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_error_text,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_ghost_primary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_primary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_ghost_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_ghost_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_outlined_primary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_outlined_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_outlined_primary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n kind = \"contained\",\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {kind === \"contained\" || kind === \"ghost\" ? (\n <CustomButton\n className={`${kind} ${className ? className : \"\"}`}\n kind={kind}\n color={color}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n {...buttonProps}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color=\"primary\"\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n {...buttonProps}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\n\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","token","component","alert_info_bg","alert_warning_bg","alert_error_bg","alert_success_bg","getBorderColor","alert_info_border","alert_warning_border","alert_error_border","alert_success_border","getIconColor","core","icon_info_02","icon_warning_02","icon_error_02","icon_success_02","StyledAlert","styled","display","padding","borderRadius","border","backgroundColor","boxShadow","marginRight","fontSize","color","width","minHeight","margin","height","StyledAlertTitle","marginTop","marginBottom","fontWeight","lineHeight","text_normal","StyledAlertChildren","StyledBottomAction","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","position","zIndex","sizeStyle","hasIconOnly","typography","button2","minWidth","button1","kindStyle","btn_contained_primary_text","btn_contained_primary_bg","opacity","btn_contained_secondary_text","btn_contained_secondary_bg","btn_contained_error_text","btn_contained_error_bg","btn_ghost_primary_text","btn_ghost_secondary_text","btn_ghost_error_text","btn_outlined_primary_text","btn_outlined_primary_border","content","left","top","hover","commonStyle","textTransform","focused","boxSizing","iconStyle","svg","CustomButton","shouldForwardProp","includes","props","icon","className","children","buttonProps","Boolean","startIcon","MAPPED_ICON","success","variant","info","warning","error","forwardRef","ref","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
1
+ {"version":3,"file":"components/Alert/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,sC,aCA7C,MAAM,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,4C,aCA7C,MAAM,EAA+BA,QAAQ,oC,aCA7C,MAAM,EAA+BA,QAAQ,SCAvC,EAA+BA,QAAQ,iBCEhCC,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A,EACL7F,SAAUA,EACVkG,YAAaZ,EACba,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACLzD,KAAK,QACLC,KAAK,QACLf,MAAM,YACNmD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC5D,EAAgB,UAAE4D,KAC7B,SAACtD,EAAmB,UAAE0C,IACrBa,IAAgB,SAACtD,EAAkB,UAAEsD,MAEzC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.token.component.alert_error_bg;\n default:\n return theme.palette.token.component.alert_success_bg;\n }\n};\n\nexport const getBorderColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_border;\n case \"warning\":\n return theme.palette.token.component.alert_warning_border;\n case \"error\":\n return theme.palette.token.component.alert_error_border;\n default:\n return theme.palette.token.component.alert_success_border;\n }\n};\n\nexport const getIconColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.core.icon_info_02;\n case \"warning\":\n return theme.palette.token.core.icon_warning_02;\n case \"error\":\n return theme.palette.token.core.icon_error_02;\n default:\n return theme.palette.token.core.icon_success_02;\n }\n};\n","import {\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n styled,\n} from \"@mui/material\";\nimport type { AlertProps } from \"./Alert.types\";\nimport {\n getBorderColor,\n getBackgroundColor,\n getIconColor,\n} from \"./Alert.utils\";\n\nexport const StyledAlert = styled(MuiAlert)<AlertProps>(\n ({ severity, theme }) => ({\n \"&.MuiAlert-root\": {\n display: \"flex\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: `1px solid ${getBorderColor(theme, severity)}`,\n backgroundColor: getBackgroundColor(theme, severity),\n boxShadow: \"none\",\n },\n \"& .MuiAlert-icon\": {\n padding: \"4px\",\n marginRight: \"0\",\n fontSize: \"20px\",\n color: `${getIconColor(theme, severity)} !important`,\n },\n \"& .MuiAlert-message\": {\n width: \"100%\",\n minHeight: \"28px\",\n padding: \"4px 0 0\",\n margin: \"0 8px 0 8px\",\n },\n \"& .MuiAlert-action\": {\n margin: 0,\n padding: 0,\n },\n \"& .MuiSvgIcon-root\": {\n height: \"20px\",\n width: \"20px\",\n },\n })\n);\n\nexport const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({\n \"&.MuiAlertTitle-root\": {\n marginTop: 0,\n marginBottom: 8,\n fontWeight: 700,\n fontSize: \"14px\",\n lineHeight: \"20px\",\n color: theme.palette.token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.token.core.text_normal,\n}));\n\nexport const StyledBottomAction = styled(\"div\")({\n marginTop: \"12px\",\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n backgroundColor: token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","token","component","alert_info_bg","alert_warning_bg","alert_error_bg","alert_success_bg","getBorderColor","alert_info_border","alert_warning_border","alert_error_border","alert_success_border","getIconColor","core","icon_info_02","icon_warning_02","icon_error_02","icon_success_02","StyledAlert","styled","display","padding","borderRadius","border","backgroundColor","boxShadow","marginRight","fontSize","color","width","minHeight","margin","height","StyledAlertTitle","marginTop","marginBottom","fontWeight","lineHeight","text_normal","StyledAlertChildren","StyledBottomAction","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","position","zIndex","sizeStyle","hasIconOnly","typography","button2","minWidth","button1","kindStyle","btn_primary_text_2","btn_primary_bg","opacity","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","hover","btn_secondary_border","commonStyle","textTransform","focused","boxSizing","iconStyle","svg","CustomButton","shouldForwardProp","includes","props","icon","className","children","buttonProps","Boolean","startIcon","MAPPED_ICON","success","variant","info","warning","error","forwardRef","ref","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>x});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",d=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",c=o=>({position:"relative",zIndex:0,backgroundColor:o}),a="8px",l=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===o&&{...t.button1,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),p=({kind:o,color:e,token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_contained_primary_text,backgroundColor:n.component.btn_contained_primary_bg,"&:hover":c(n.component.btn_contained_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_primary_text}},..."contained"===o&&"secondary"===e&&{color:n.component.btn_contained_secondary_text,backgroundColor:n.component.btn_contained_secondary_bg,"&:hover":c(n.component.btn_contained_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_secondary_text}},..."contained"===o&&"error"===e&&{color:n.component.btn_contained_error_text,backgroundColor:n.component.btn_contained_error_bg,"&:hover":c(n.component.btn_contained_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_error_text}},..."ghost"===o&&"primary"===e&&{color:n.component.btn_ghost_primary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_primary_text}},..."ghost"===o&&"secondary"===e&&{color:n.component.btn_ghost_secondary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_ghost_error_text,"&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_error_text}},..."outlined"===o&&"primary"===e&&{color:n.component.btn_outlined_primary_text,border:`1px solid ${n.component.btn_outlined_primary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:a},"&.Mui-disabled":{opacity:.38,color:n.component.btn_outlined_primary_text}}}),s=({token:o})=>({fontWeight:"500",borderRadius:a,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${o.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:o.core.hover,borderRadius:a}}),b=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px"}}),m=(0,t.styled)(r.Button,{shouldForwardProp:o=>!["kind","hasIconOnly"].includes(o)})((({theme:{typography:o,palette:{token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...s({token:e}),...b({size:t,hasIconOnly:i}),...l({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,token:e})}))),x=o=>{const{kind:e="contained",size:t="small",color:r="primary",icon:i,className:d,children:c,...a}=o,l=Boolean(i&&!c);return(0,n.jsx)(n.Fragment,{children:"contained"===e||"ghost"===e?(0,n.jsx)(m,{className:`${e} ${d||""}`,kind:e,color:r,size:t,startIcon:i,hasIconOnly:l,...a,children:!l&&(0,n.jsx)(n.Fragment,{children:c})}):(0,n.jsx)(m,{className:`outlined ${d||""}`,kind:"outlined",color:"primary",size:t,startIcon:i,hasIconOnly:l,...a,children:!l&&(0,n.jsx)(n.Fragment,{children:c})})})};module.exports=e})();
1
+ (()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>m});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",d=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",c=o=>({position:"relative",zIndex:0,backgroundColor:o}),a="8px",p=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===o&&{...t.button1,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),l=({kind:o,color:e,token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":c(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":c(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===o&&"error"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":c(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:a},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:a},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),s=({token:o})=>({fontWeight:"500",borderRadius:a,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${o.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:o.core.hover,borderRadius:a}}),b=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px"}}),x=(0,t.styled)(r.Button,{shouldForwardProp:o=>!["kind","hasIconOnly"].includes(o)})((({theme:{typography:o,palette:{token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...s({token:e}),...b({size:t,hasIconOnly:i}),...p({size:t,kind:n,hasIconOnly:i,typography:o}),...l({kind:n,color:r,token:e})}))),m=o=>{const{size:e="small",color:t="primary",icon:r,className:i,children:d,...c}=o,a=Boolean(r&&!d);return(0,n.jsx)(n.Fragment,{children:"outlined"===o.kind?(0,n.jsx)(x,{...c,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:e,startIcon:r,hasIconOnly:a,children:!a&&(0,n.jsx)(n.Fragment,{children:d})}):(0,n.jsx)(x,{...c,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:e,startIcon:r,hasIconOnly:a,children:!a&&(0,n.jsx)(n.Fragment,{children:d})})})};module.exports=e})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Button/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wBCAvC,EAA+BA,QAAQ,iBCahCC,EAAgC,EAC3CC,OACAC,OACAC,YAAW,KAEE,UAATD,EACc,aAATD,GAAwBE,EAE3B,UADA,UAIO,WAATD,EACc,aAATD,GAAwBE,EAE3B,WADA,WAKU,aAATF,GAAwBE,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/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_contained_primary_text,\n backgroundColor: token.component.btn_contained_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_primary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_contained_secondary_text,\n\n backgroundColor: token.component.btn_contained_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_contained_error_text,\n backgroundColor: token.component.btn_contained_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_contained_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_contained_error_text,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_ghost_primary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_primary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_ghost_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_ghost_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_ghost_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_outlined_primary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_outlined_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_outlined_primary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n kind = \"contained\",\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {kind === \"contained\" || kind === \"ghost\" ? (\n <CustomButton\n className={`${kind} ${className ? className : \"\"}`}\n kind={kind}\n color={color}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n {...buttonProps}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color=\"primary\"\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n {...buttonProps}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","minHeight","button1","kindStyle","color","token","component","btn_contained_primary_text","btn_contained_primary_bg","opacity","border","btn_contained_secondary_text","btn_contained_secondary_bg","btn_contained_error_text","btn_contained_error_bg","btn_ghost_primary_text","btn_ghost_secondary_text","btn_ghost_error_text","btn_outlined_primary_text","btn_outlined_primary_border","content","left","top","width","height","core","hover","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","svg","CustomButton","styled","shouldForwardProp","includes","theme","palette","props","icon","className","children","buttonProps","Boolean","startIcon"],"sourceRoot":""}
1
+ {"version":3,"file":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AiB,UAATR,EAAmB,MAAQ,MAG9D,mBAAoB,CAClB6C,SAAU,SAGdC,IAAK,CACHd,MAAO,OACPC,OAAQ,OACRU,OAAQ,EACRC,YAAapC,EAAc,MAAiB,UAATR,EAAmB,MAAQ,SAIrD+C,GAAe,IAAAC,QAAO,SAAW,CAC5CC,kBAAoB3D,IACV,CAAC,OAAQ,eAAe4D,SAAS5D,IAFjB,EAK1B,EACE6D,OACE1C,aACA2C,SAAWnC,UAEblB,OACAC,OACAgB,QACAR,kBACI,IACD6B,EAAY,CAAEpB,aACdyB,EAAU,CAAE1C,OAAMQ,mBAClBD,EAAU,CAAEP,OAAMD,OAAMS,cAAaC,kBACrCM,EAAU,CAAEhB,OAAMiB,QAAOC,cCtMhC,EA7CgBoC,IACd,MAAM,KACJrD,EAAO,QAAO,MACdgB,EAAQ,UAAS,KACjBsC,EAAI,UACJC,EAAS,SACTC,KACGC,GACDJ,EACE7C,EAAckD,QAAQJ,IAASE,GAErC,OACE,8BAEkB,aAAfH,EAAMtD,MACL,SAACgD,EAAY,IACPU,EACJF,UAAW,YAAYA,GAAwB,KAC/CxD,KAAK,WACLiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN2D,UAAWL,EACX9C,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgD,OAGtB,SAACT,EAAY,IACPU,EACJF,UAAW,GAAGF,EAAMtD,MAAQ,eAC1BwD,GAAwB,KAE1BxD,KAAMsD,EAAMtD,MAAQ,YACpBiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN2D,UAAWL,EACX9C,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgD,OAI3B,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n backgroundColor: token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","minHeight","button1","kindStyle","color","token","component","btn_primary_text_2","btn_primary_bg","opacity","border","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","width","height","core","hover","btn_secondary_border","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","svg","CustomButton","styled","shouldForwardProp","includes","theme","palette","props","icon","className","children","buttonProps","Boolean","startIcon"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>h});const o=require("react/jsx-runtime"),r=require("@mui/material/TextField");var i=e.n(r);const n=require("@mui/material/styles"),a=({size:e,multiline:t,hasLeftIcon:o,hasRightIcon:r})=>t?(({size:e})=>{switch(e){case"small":return"4px 4px 4px 12px";case"medium":return"8px 4px 8px 16px";case"large":return"10px 4px 10px 16px"}})({size:e}):(({size:e,hasLeftIcon:t,hasRightIcon:o})=>{switch(e){case"small":return`4px ${o?"8px":"12px"} 4px ${t?"8px":"12px"}}`;case"medium":return`8px ${o?"12px":"16px"} 8px ${t?"12px":"16px"}}`;case"large":return`10px ${o?"12px":"16px"} 10px ${t?"12px":"16px"}}`}})({size:e,hasLeftIcon:o,hasRightIcon:r}),l=({token:e})=>({"& .MuiOutlinedInput-root":{borderRadius:"8px",width:"100%","& fieldset":{border:"none"},"&.Mui-error fieldset":{border:`1px solid ${e.component.textfield_border_error}`},"&.Mui-focused fieldset":{border:`1px solid ${e.core.focused}`},"&.Mui-disabled":{opacity:.38,"&:hover::before":{backgroundColor:e.component.textfield_bg}},"& input, textarea":{padding:0,textOverflow:"ellipsis","&::placeholder":{color:e.core.text_medium,opacity:1,WebkitTextFillColor:e.core.text_medium}},"& textarea":{height:"100% !important",overflowY:"scroll !important","&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-thumb":{borderRadius:"6px",backgroundColor:e.component.scrollbars_bg}},background:e.component.textfield_bg,overflow:"hidden",color:e.core.text_normal,"&:hover":{position:"relative",zIndex:0,backgroundColor:e.component.textfield_bg},"&:hover::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover},"&.Mui-focused":{"&:hover::before":{backgroundColor:e.component.textfield_bg}}},"& .MuiFormHelperText-root":{"&.Mui-disabled":{opacity:.38},"&.Mui-error":{color:e.core.text_error}}}),c=({token:e,textFieldSize:t,hasLeftIcon:o,hasRightIcon:r,typography:i,multiline:n})=>({..."small"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body2_14_regular},"& input":{height:"20px"},"& textarea":{minHeight:"92px",paddingRight:"2px"}},"& .MuiFormHelperText-root":{...i.body2_14_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}},..."medium"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body2_14_regular},"& input":{height:"20px"},"& textarea":{minHeight:"84px",paddingRight:"6px"}},"& .MuiFormHelperText-root":{...i.body2_14_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}},..."large"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body1_16_regular},"& input":{height:"24px"},"& textarea":{minHeight:"80px",paddingRight:"6px"}},"& .MuiFormHelperText-root":{...i.body1_16_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}}}),p=(0,n.styled)(i(),{shouldForwardProp:e=>!["leftIconSx","rightIconSx","leftIcon","rightIcon","textFieldSize","hasLeftIcon","hasRightIcon","onLeftIconClick","onRightIconClick"].includes(e)})((({theme:{typography:e,palette:{token:t}},multiline:o,textFieldSize:r,hasLeftIcon:i,hasRightIcon:n})=>({...l({token:t}),...c({token:t,textFieldSize:r,hasLeftIcon:i,hasRightIcon:n,typography:e,multiline:o})}))),d=(0,n.styled)("div")((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:"28px",minHeight:"28px",margin:"-4px 0","& svg":{width:"20px",height:"20px",color:e.palette.token.core.text_normal}}))),x=({sx:e,icon:t,onIconClick:r})=>(0,o.jsx)(d,{sx:{cursor:r?"pointer":"auto",...e},onClick:r,children:t}),s=e=>{const{size:t,leftIcon:r,rightIcon:i,leftIconSx:n,rightIconSx:a,onLeftIconClick:l,onRightIconClick:c,...d}=e;return(0,o.jsx)(p,{...d,textFieldSize:t,hasLeftIcon:Boolean(r),hasRightIcon:Boolean(i),InputProps:{startAdornment:r&&(0,o.jsx)(x,{sx:{marginRight:"4px",...n},icon:r,onIconClick:l}),endAdornment:i&&(0,o.jsx)(x,{sx:{marginLeft:"4px",...a},icon:i,onIconClick:c})}})},u=({size:e,onChange:t,...r})=>(0,o.jsx)(p,{...r,textFieldSize:e,multiline:!0}),h=e=>{const{rows:t,size:r="small",multiline:i=!1,variant:n="outlined",...a}=e;return i?(0,o.jsx)(u,{...a,maxRows:1/0,size:r,variant:n,rows:t}):(0,o.jsx)(s,{...a,size:r,variant:n})};module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>h});const o=require("react/jsx-runtime"),r=require("@mui/material/TextField");var i=e.n(r);const n=require("@mui/material/styles"),a=({size:e,multiline:t,hasLeftIcon:o,hasRightIcon:r})=>t?(({size:e})=>{switch(e){case"small":return"4px 4px 4px 12px";case"medium":return"8px 4px 8px 16px";case"large":return"10px 4px 10px 16px"}})({size:e}):(({size:e,hasLeftIcon:t,hasRightIcon:o})=>{switch(e){case"small":return`4px ${o?"8px":"12px"} 4px ${t?"8px":"12px"}}`;case"medium":return`8px ${o?"12px":"16px"} 8px ${t?"12px":"16px"}}`;case"large":return`10px ${o?"12px":"16px"} 10px ${t?"12px":"16px"}}`}})({size:e,hasLeftIcon:o,hasRightIcon:r}),l=({token:e})=>({"&.MuiTextField-root":{width:"100%"},"& .MuiOutlinedInput-root":{borderRadius:"8px",width:"100%","& fieldset":{border:"none"},"&.Mui-error fieldset":{border:`1px solid ${e.component.textfield_border_error}`},"&.Mui-focused fieldset":{border:`1px solid ${e.core.focused}`},"&.Mui-disabled":{opacity:.38,"&:hover::before":{backgroundColor:e.component.textfield_bg}},"& input, textarea":{padding:0,textOverflow:"ellipsis","&::placeholder":{color:e.core.text_medium,opacity:1,WebkitTextFillColor:e.core.text_medium}},"& textarea":{height:"100% !important",overflowY:"scroll !important","&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-thumb":{borderRadius:"6px",backgroundColor:e.component.scrollbars_bg}},background:e.component.textfield_bg,overflow:"hidden",color:e.core.text_normal,"&:hover":{position:"relative",zIndex:0,backgroundColor:e.component.textfield_bg},"&:hover::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover},"&.Mui-focused":{"&:hover::before":{backgroundColor:e.component.textfield_bg}}},"& .MuiFormHelperText-root":{"&.Mui-disabled":{opacity:.38},"&.Mui-error":{color:e.core.text_error}}}),c=({token:e,textFieldSize:t,hasLeftIcon:o,hasRightIcon:r,typography:i,multiline:n})=>({..."small"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body2_14_regular},"& input":{height:"20px"},"& textarea":{minHeight:"92px",paddingRight:"2px"}},"& .MuiFormHelperText-root":{...i.body2_14_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}},..."medium"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body2_14_regular},"& input":{height:"20px"},"& textarea":{minHeight:"84px",paddingRight:"6px"}},"& .MuiFormHelperText-root":{...i.body2_14_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}},..."large"===t&&{"& .MuiInputBase-root":{padding:a({size:t,hasLeftIcon:o,hasRightIcon:r,multiline:n}),"& input, textarea":{...i.body1_16_regular},"& input":{height:"24px"},"& textarea":{minHeight:"80px",paddingRight:"6px"}},"& .MuiFormHelperText-root":{...i.body1_16_regular,color:e.core.text_medium,margin:0,marginTop:"4px",paddingLeft:"4px","&.Mui-disabled":{color:e.core.text_medium,opacity:.38},"&.Mui-error":{color:e.core.text_error}}}}),p=(0,n.styled)(i(),{shouldForwardProp:e=>!["leftIconSx","rightIconSx","leftIcon","rightIcon","textFieldSize","hasLeftIcon","hasRightIcon","onLeftIconClick","onRightIconClick"].includes(e)})((({theme:{typography:e,palette:{token:t}},multiline:o,textFieldSize:r,hasLeftIcon:i,hasRightIcon:n})=>({...l({token:t}),...c({token:t,textFieldSize:r,hasLeftIcon:i,hasRightIcon:n,typography:e,multiline:o})}))),d=(0,n.styled)("div")((({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:"28px",minHeight:"28px",margin:"-4px 0","& svg":{width:"20px",height:"20px",color:e.palette.token.core.text_normal}}))),x=({sx:e,icon:t,onIconClick:r})=>(0,o.jsx)(d,{sx:{cursor:r?"pointer":"auto",...e},onClick:r,children:t}),s=e=>{const{size:t="small",leftIcon:r,rightIcon:i,leftIconSx:n,rightIconSx:a,onLeftIconClick:l,onRightIconClick:c,...d}=e;return(0,o.jsx)(p,{...d,textFieldSize:t,hasLeftIcon:Boolean(r),hasRightIcon:Boolean(i),InputProps:{startAdornment:r&&(0,o.jsx)(x,{sx:{marginRight:"4px",...n},icon:r,onIconClick:l}),endAdornment:i&&(0,o.jsx)(x,{sx:{marginLeft:"4px",...a},icon:i,onIconClick:c})}})},u=({size:e="small",onChange:t,...r})=>(0,o.jsx)(p,{...r,textFieldSize:e,multiline:!0}),h=e=>{const{rows:t,size:r,multiline:i=!1,variant:n="outlined",...a}=e;return i?(0,o.jsx)(u,{...a,maxRows:1/0,size:r,variant:n,rows:t}):(0,o.jsx)(s,{...a,size:r,variant:n})};module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/TextField/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC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C,EAAa,CACZP,GAAI,CAAEiB,YAAa,SAAUR,GAC7BR,KAAMM,EACNL,YAAaS,IAGjBO,aAAcV,IACZ,SAAC,EAAa,CACZR,GAAI,CAAEmB,WAAY,SAAUT,GAC5BT,KAAMO,EACNN,YAAaU,MAKtB,EAGGQ,EAAiB,EACrB7E,OACA8E,cACGR,MAEI,SAACxB,EAAa,IAAKwB,EAAWjC,cAAerC,EAAMC,WAAS,IAyBrE,EAtBmB8D,IACjB,MAAM,KACJgB,EAAI,KACJ/E,EAAO,QAAO,UACdC,GAAY,EAAK,QACjB+E,EAAU,cACPV,GACDP,EAEJ,OAAO9D,GACL,SAAC4E,EAAc,IACTP,EACJW,QAASC,IACTlF,KAAMA,EACNgF,QAASA,EACTD,KAAMA,KAGR,SAACjB,EAAe,IAAKQ,EAAWtE,KAAMA,EAAMgF,QAASA,GACtD,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/TextField\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/TextField/TextField.style.ts","webpack://@lunit/design-system/./src/components/TextField/TextFieldIcon.tsx","webpack://@lunit/design-system/./src/components/TextField/TextField.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TextField\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import MuiTextField from \"@mui/material/TextField\";\nimport { styled } from \"@mui/material/styles\";\n\nimport type { ColorToken } from \"@/foundation/colors/types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\nimport type { TextFieldProps, TextFieldSize } from \"./TextField.types\";\n\ntype BaseTextFieldProps = Omit<TextFieldProps, \"size\"> & {\n textFieldSize: TextFieldSize;\n hasLeftIcon?: boolean;\n hasRightIcon?: boolean;\n};\n\ninterface GetTextFieldPaddingBySizeParams {\n multiline?: boolean;\n size: TextFieldSize;\n hasLeftIcon?: boolean;\n hasRightIcon?: boolean;\n}\n\nconst getSinglelineTextFieldPaddingByIconAndSize = ({\n size,\n hasLeftIcon,\n hasRightIcon,\n}: Pick<\n GetTextFieldPaddingBySizeParams,\n \"size\" | \"hasLeftIcon\" | \"hasRightIcon\"\n>) => {\n switch (size) {\n case \"small\":\n return `4px ${hasRightIcon ? \"8px\" : \"12px\"} 4px ${\n hasLeftIcon ? \"8px\" : \"12px\"\n }}`;\n case \"medium\":\n return `8px ${hasRightIcon ? \"12px\" : \"16px\"} 8px ${\n hasLeftIcon ? \"12px\" : \"16px\"\n }}`;\n case \"large\":\n return `10px ${hasRightIcon ? \"12px\" : \"16px\"} 10px ${\n hasLeftIcon ? \"12px\" : \"16px\"\n }}`;\n }\n};\n\nconst getMultilineTextFieldPaddingByIconAndSize = ({\n size,\n}: Pick<GetTextFieldPaddingBySizeParams, \"size\">) => {\n switch (size) {\n case \"small\":\n return \"4px 4px 4px 12px\";\n case \"medium\":\n return \"8px 4px 8px 16px\";\n case \"large\":\n return \"10px 4px 10px 16px\";\n }\n};\n\nconst getTextFieldPaddingBySize = ({\n size,\n multiline,\n hasLeftIcon,\n hasRightIcon,\n}: GetTextFieldPaddingBySizeParams) => {\n return multiline\n ? getMultilineTextFieldPaddingByIconAndSize({ size })\n : getSinglelineTextFieldPaddingByIconAndSize({\n size,\n hasLeftIcon,\n hasRightIcon,\n });\n};\n\nconst commonStyle = ({ token }: { token: ColorToken }) => ({\n \"& .MuiOutlinedInput-root\": {\n borderRadius: \"8px\",\n width: \"100%\",\n\n \"& fieldset\": {\n border: \"none\",\n },\n \"&.Mui-error fieldset\": {\n border: `1px solid ${token.component.textfield_border_error}`,\n },\n \"&.Mui-focused fieldset\": {\n border: `1px solid ${token.core.focused}`,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n \"&:hover::before\": {\n backgroundColor: token.component.textfield_bg,\n },\n },\n \"& input, textarea\": {\n padding: 0,\n textOverflow: \"ellipsis\",\n \"&::placeholder\": {\n color: token.core.text_medium,\n opacity: 1,\n WebkitTextFillColor: token.core.text_medium,\n },\n },\n \"& textarea\": {\n height: \"100% !important\",\n overflowY: \"scroll !important\",\n \"&::-webkit-scrollbar\": {\n width: \"6px\",\n },\n \"&::-webkit-scrollbar-thumb\": {\n borderRadius: \"6px\",\n backgroundColor: token.component.scrollbars_bg,\n },\n },\n background: token.component.textfield_bg,\n overflow: \"hidden\",\n color: token.core.text_normal,\n \"&:hover\": {\n position: \"relative\",\n zIndex: 0,\n backgroundColor: token.component.textfield_bg,\n },\n \"&:hover::before\": {\n content: '\"\"',\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n },\n \"&.Mui-focused\": {\n \"&:hover::before\": {\n backgroundColor: token.component.textfield_bg,\n },\n },\n },\n \"& .MuiFormHelperText-root\": {\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n});\n\nconst sizeStyle = ({\n token,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n typography,\n multiline,\n}: Pick<\n BaseTextFieldProps,\n \"textFieldSize\" | \"hasLeftIcon\" | \"hasRightIcon\" | \"multiline\"\n> & { token: ColorToken; typography: Typography }) => ({\n ...(textFieldSize === \"small\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body2_14_regular,\n },\n \"& input\": {\n height: \"20px\",\n },\n \"& textarea\": {\n minHeight: \"92px\",\n paddingRight: \"2px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body2_14_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n ...(textFieldSize === \"medium\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body2_14_regular,\n },\n \"& input\": {\n height: \"20px\",\n },\n \"& textarea\": {\n minHeight: \"84px\",\n paddingRight: \"6px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body2_14_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n ...(textFieldSize === \"large\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body1_16_regular,\n },\n \"& input\": {\n height: \"24px\",\n },\n \"& textarea\": {\n minHeight: \"80px\",\n paddingRight: \"6px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body1_16_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n});\n\nconst BaseTextField = styled(MuiTextField, {\n shouldForwardProp: (prop: string) =>\n ![\n \"leftIconSx\",\n \"rightIconSx\",\n \"leftIcon\",\n \"rightIcon\",\n \"textFieldSize\",\n \"hasLeftIcon\",\n \"hasRightIcon\",\n \"onLeftIconClick\",\n \"onRightIconClick\",\n ].includes(prop),\n})<BaseTextFieldProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n multiline,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n }) => ({\n ...commonStyle({ token }),\n ...sizeStyle({\n token,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n typography,\n multiline,\n }),\n })\n);\n\nconst IconWrapper = styled(\"div\")(({ theme }) => ({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minWidth: \"28px\",\n minHeight: \"28px\",\n margin: \"-4px 0\",\n\n \"& svg\": {\n width: \"20px\",\n height: \"20px\",\n color: theme.palette.token.core.text_normal,\n },\n}));\n\nexport { BaseTextField, IconWrapper };\n","import React from \"react\";\n\nimport { IconWrapper } from \"./TextField.style\";\n\nimport type { SxProps } from \"@mui/material\";\n\ninterface TextFieldProps {\n sx?: SxProps;\n icon: JSX.Element;\n onIconClick?: () => void;\n}\n\nconst TextFieldIcon = ({ sx, icon, onIconClick }: TextFieldProps) => {\n return (\n <IconWrapper\n sx={{ cursor: onIconClick ? \"pointer\" : \"auto\", ...sx }}\n onClick={onIconClick}\n >\n {icon}\n </IconWrapper>\n );\n};\n\nexport default TextFieldIcon;\n","import React from \"react\";\n\nimport TextFieldIcon from \"./TextFieldIcon\";\nimport { BaseTextField } from \"./TextField.style\";\n\nimport type {\n TextFieldProps,\n MultiTextFieldProps,\n SingleTextFieldProps,\n} from \"./TextField.types\";\n\nconst SingleTextField = (props: SingleTextFieldProps) => {\n const {\n size,\n leftIcon,\n rightIcon,\n leftIconSx,\n rightIconSx,\n onLeftIconClick,\n onRightIconClick,\n ...restProps\n } = props;\n\n return (\n <BaseTextField\n {...restProps}\n textFieldSize={size}\n hasLeftIcon={Boolean(leftIcon)}\n hasRightIcon={Boolean(rightIcon)}\n InputProps={{\n startAdornment: leftIcon && (\n <TextFieldIcon\n sx={{ marginRight: \"4px\", ...leftIconSx }}\n icon={leftIcon}\n onIconClick={onLeftIconClick}\n />\n ),\n endAdornment: rightIcon && (\n <TextFieldIcon\n sx={{ marginLeft: \"4px\", ...rightIconSx }}\n icon={rightIcon}\n onIconClick={onRightIconClick}\n />\n ),\n }}\n />\n );\n};\n\nconst MultiTextField = ({\n size,\n onChange,\n ...restProps\n}: MultiTextFieldProps) => {\n return <BaseTextField {...restProps} textFieldSize={size} multiline />;\n};\n\nconst TextField = (props: TextFieldProps) => {\n const {\n rows,\n size = \"small\",\n multiline = false,\n variant = \"outlined\",\n ...restProps\n } = props;\n\n return multiline ? (\n <MultiTextField\n {...restProps}\n maxRows={Infinity}\n size={size}\n variant={variant}\n rows={rows}\n />\n ) : (\n <SingleTextField {...restProps} size={size} variant={variant} />\n );\n};\n\nexport default TextField;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getTextFieldPaddingBySize","size","multiline","hasLeftIcon","hasRightIcon","getMultilineTextFieldPaddingByIconAndSize","getSinglelineTextFieldPaddingByIconAndSize","commonStyle","token","borderRadius","width","border","component","textfield_border_error","core","focused","opacity","backgroundColor","textfield_bg","padding","textOverflow","color","text_medium","WebkitTextFillColor","height","overflowY","scrollbars_bg","background","overflow","text_normal","position","zIndex","content","top","left","hover","text_error","sizeStyle","textFieldSize","typography","body2_14_regular","minHeight","paddingRight","margin","marginTop","paddingLeft","body1_16_regular","BaseTextField","styled","shouldForwardProp","includes","theme","palette","IconWrapper","display","alignItems","justifyContent","minWidth","sx","icon","onIconClick","cursor","onClick","SingleTextField","props","leftIcon","rightIcon","leftIconSx","rightIconSx","onLeftIconClick","onRightIconClick","restProps","Boolean","InputProps","startAdornment","marginRight","endAdornment","marginLeft","MultiTextField","onChange","rows","variant","maxRows","Infinity"],"sourceRoot":""}
1
+ {"version":3,"file":"components/TextField/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,2B,aCA7C,MAAM,EAA+BA,QAAQ,wBCyDvCC,EAA4B,EAChCC,OACAC,YACAC,cACAC,kBAE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OAAO,QACP8E,cACGR,MAEI,SAACxB,EAAa,IAAKwB,EAAWjC,cAAerC,EAAMC,WAAS,IAyBrE,EAtBmB8D,IACjB,MAAM,KACJgB,EAAI,KACJ/E,EAAI,UACJC,GAAY,EAAK,QACjB+E,EAAU,cACPV,GACDP,EAEJ,OAAO9D,GACL,SAAC4E,EAAc,IACTP,EACJW,QAASC,IACTlF,KAAMA,EACNgF,QAASA,EACTD,KAAMA,KAGR,SAACjB,EAAe,IAAKQ,EAAWtE,KAAMA,EAAMgF,QAASA,GACtD,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/TextField\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/TextField/TextField.style.ts","webpack://@lunit/design-system/./src/components/TextField/TextFieldIcon.tsx","webpack://@lunit/design-system/./src/components/TextField/TextField.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/TextField\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import MuiTextField from \"@mui/material/TextField\";\nimport { styled } from \"@mui/material/styles\";\n\nimport type { ColorToken } from \"@/foundation/colors/types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\nimport type { TextFieldProps, TextFieldSize } from \"./TextField.types\";\n\ntype BaseTextFieldProps = Omit<TextFieldProps, \"size\"> & {\n textFieldSize: TextFieldSize;\n hasLeftIcon?: boolean;\n hasRightIcon?: boolean;\n};\n\ninterface GetTextFieldPaddingBySizeParams {\n multiline?: boolean;\n size: TextFieldSize;\n hasLeftIcon?: boolean;\n hasRightIcon?: boolean;\n}\n\nconst getSinglelineTextFieldPaddingByIconAndSize = ({\n size,\n hasLeftIcon,\n hasRightIcon,\n}: Pick<\n GetTextFieldPaddingBySizeParams,\n \"size\" | \"hasLeftIcon\" | \"hasRightIcon\"\n>) => {\n switch (size) {\n case \"small\":\n return `4px ${hasRightIcon ? \"8px\" : \"12px\"} 4px ${\n hasLeftIcon ? \"8px\" : \"12px\"\n }}`;\n case \"medium\":\n return `8px ${hasRightIcon ? \"12px\" : \"16px\"} 8px ${\n hasLeftIcon ? \"12px\" : \"16px\"\n }}`;\n case \"large\":\n return `10px ${hasRightIcon ? \"12px\" : \"16px\"} 10px ${\n hasLeftIcon ? \"12px\" : \"16px\"\n }}`;\n }\n};\n\nconst getMultilineTextFieldPaddingByIconAndSize = ({\n size,\n}: Pick<GetTextFieldPaddingBySizeParams, \"size\">) => {\n switch (size) {\n case \"small\":\n return \"4px 4px 4px 12px\";\n case \"medium\":\n return \"8px 4px 8px 16px\";\n case \"large\":\n return \"10px 4px 10px 16px\";\n }\n};\n\nconst getTextFieldPaddingBySize = ({\n size,\n multiline,\n hasLeftIcon,\n hasRightIcon,\n}: GetTextFieldPaddingBySizeParams) => {\n return multiline\n ? getMultilineTextFieldPaddingByIconAndSize({ size })\n : getSinglelineTextFieldPaddingByIconAndSize({\n size,\n hasLeftIcon,\n hasRightIcon,\n });\n};\n\nconst commonStyle = ({ token }: { token: ColorToken }) => ({\n \"&.MuiTextField-root\": {\n width: \"100%\",\n },\n \"& .MuiOutlinedInput-root\": {\n borderRadius: \"8px\",\n width: \"100%\",\n\n \"& fieldset\": {\n border: \"none\",\n },\n \"&.Mui-error fieldset\": {\n border: `1px solid ${token.component.textfield_border_error}`,\n },\n \"&.Mui-focused fieldset\": {\n border: `1px solid ${token.core.focused}`,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n \"&:hover::before\": {\n backgroundColor: token.component.textfield_bg,\n },\n },\n \"& input, textarea\": {\n padding: 0,\n textOverflow: \"ellipsis\",\n \"&::placeholder\": {\n color: token.core.text_medium,\n opacity: 1,\n WebkitTextFillColor: token.core.text_medium,\n },\n },\n \"& textarea\": {\n height: \"100% !important\",\n overflowY: \"scroll !important\",\n \"&::-webkit-scrollbar\": {\n width: \"6px\",\n },\n \"&::-webkit-scrollbar-thumb\": {\n borderRadius: \"6px\",\n backgroundColor: token.component.scrollbars_bg,\n },\n },\n background: token.component.textfield_bg,\n overflow: \"hidden\",\n color: token.core.text_normal,\n \"&:hover\": {\n position: \"relative\",\n zIndex: 0,\n backgroundColor: token.component.textfield_bg,\n },\n \"&:hover::before\": {\n content: '\"\"',\n position: \"absolute\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n },\n \"&.Mui-focused\": {\n \"&:hover::before\": {\n backgroundColor: token.component.textfield_bg,\n },\n },\n },\n \"& .MuiFormHelperText-root\": {\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n});\n\nconst sizeStyle = ({\n token,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n typography,\n multiline,\n}: Pick<\n BaseTextFieldProps,\n \"textFieldSize\" | \"hasLeftIcon\" | \"hasRightIcon\" | \"multiline\"\n> & { token: ColorToken; typography: Typography }) => ({\n ...(textFieldSize === \"small\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body2_14_regular,\n },\n \"& input\": {\n height: \"20px\",\n },\n \"& textarea\": {\n minHeight: \"92px\",\n paddingRight: \"2px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body2_14_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n ...(textFieldSize === \"medium\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body2_14_regular,\n },\n \"& input\": {\n height: \"20px\",\n },\n \"& textarea\": {\n minHeight: \"84px\",\n paddingRight: \"6px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body2_14_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n ...(textFieldSize === \"large\" && {\n \"& .MuiInputBase-root\": {\n padding: getTextFieldPaddingBySize({\n size: textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n multiline,\n }),\n \"& input, textarea\": {\n ...typography.body1_16_regular,\n },\n \"& input\": {\n height: \"24px\",\n },\n \"& textarea\": {\n minHeight: \"80px\",\n paddingRight: \"6px\",\n },\n },\n \"& .MuiFormHelperText-root\": {\n ...typography.body1_16_regular,\n color: token.core.text_medium,\n margin: 0,\n marginTop: \"4px\",\n paddingLeft: \"4px\",\n\n \"&.Mui-disabled\": {\n color: token.core.text_medium,\n opacity: 0.38,\n },\n \"&.Mui-error\": {\n color: token.core.text_error,\n },\n },\n }),\n});\n\nconst BaseTextField = styled(MuiTextField, {\n shouldForwardProp: (prop: string) =>\n ![\n \"leftIconSx\",\n \"rightIconSx\",\n \"leftIcon\",\n \"rightIcon\",\n \"textFieldSize\",\n \"hasLeftIcon\",\n \"hasRightIcon\",\n \"onLeftIconClick\",\n \"onRightIconClick\",\n ].includes(prop),\n})<BaseTextFieldProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n multiline,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n }) => ({\n ...commonStyle({ token }),\n ...sizeStyle({\n token,\n textFieldSize,\n hasLeftIcon,\n hasRightIcon,\n typography,\n multiline,\n }),\n })\n);\n\nconst IconWrapper = styled(\"div\")(({ theme }) => ({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minWidth: \"28px\",\n minHeight: \"28px\",\n margin: \"-4px 0\",\n\n \"& svg\": {\n width: \"20px\",\n height: \"20px\",\n color: theme.palette.token.core.text_normal,\n },\n}));\n\nexport { BaseTextField, IconWrapper };\n","import React from \"react\";\n\nimport { IconWrapper } from \"./TextField.style\";\n\nimport type { SxProps } from \"@mui/material\";\n\ninterface TextFieldProps {\n sx?: SxProps;\n icon: JSX.Element;\n onIconClick?: () => void;\n}\n\nconst TextFieldIcon = ({ sx, icon, onIconClick }: TextFieldProps) => {\n return (\n <IconWrapper\n sx={{ cursor: onIconClick ? \"pointer\" : \"auto\", ...sx }}\n onClick={onIconClick}\n >\n {icon}\n </IconWrapper>\n );\n};\n\nexport default TextFieldIcon;\n","import React from \"react\";\n\nimport TextFieldIcon from \"./TextFieldIcon\";\nimport { BaseTextField } from \"./TextField.style\";\n\nimport type {\n TextFieldProps,\n MultiTextFieldProps,\n SingleTextFieldProps,\n} from \"./TextField.types\";\n\nconst SingleTextField = (props: SingleTextFieldProps) => {\n const {\n size = \"small\",\n leftIcon,\n rightIcon,\n leftIconSx,\n rightIconSx,\n onLeftIconClick,\n onRightIconClick,\n ...restProps\n } = props;\n\n return (\n <BaseTextField\n {...restProps}\n textFieldSize={size}\n hasLeftIcon={Boolean(leftIcon)}\n hasRightIcon={Boolean(rightIcon)}\n InputProps={{\n startAdornment: leftIcon && (\n <TextFieldIcon\n sx={{ marginRight: \"4px\", ...leftIconSx }}\n icon={leftIcon}\n onIconClick={onLeftIconClick}\n />\n ),\n endAdornment: rightIcon && (\n <TextFieldIcon\n sx={{ marginLeft: \"4px\", ...rightIconSx }}\n icon={rightIcon}\n onIconClick={onRightIconClick}\n />\n ),\n }}\n />\n );\n};\n\nconst MultiTextField = ({\n size = \"small\",\n onChange,\n ...restProps\n}: MultiTextFieldProps) => {\n return <BaseTextField {...restProps} textFieldSize={size} multiline />;\n};\n\nconst TextField = (props: TextFieldProps) => {\n const {\n rows,\n size,\n multiline = false,\n variant = \"outlined\",\n ...restProps\n } = props;\n\n return multiline ? (\n <MultiTextField\n {...restProps}\n maxRows={Infinity}\n size={size}\n variant={variant}\n rows={rows}\n />\n ) : (\n <SingleTextField {...restProps} size={size} variant={variant} />\n );\n};\n\nexport default TextField;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getTextFieldPaddingBySize","size","multiline","hasLeftIcon","hasRightIcon","getMultilineTextFieldPaddingByIconAndSize","getSinglelineTextFieldPaddingByIconAndSize","commonStyle","token","width","borderRadius","border","component","textfield_border_error","core","focused","opacity","backgroundColor","textfield_bg","padding","textOverflow","color","text_medium","WebkitTextFillColor","height","overflowY","scrollbars_bg","background","overflow","text_normal","position","zIndex","content","top","left","hover","text_error","sizeStyle","textFieldSize","typography","body2_14_regular","minHeight","paddingRight","margin","marginTop","paddingLeft","body1_16_regular","BaseTextField","styled","shouldForwardProp","includes","theme","palette","IconWrapper","display","alignItems","justifyContent","minWidth","sx","icon","onIconClick","cursor","onClick","SingleTextField","props","leftIcon","rightIcon","leftIconSx","rightIconSx","onLeftIconClick","onRightIconClick","restProps","Boolean","InputProps","startAdornment","marginRight","endAdornment","marginLeft","MultiTextField","onChange","rows","variant","maxRows","Infinity"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>h});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",d=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",c=e=>({position:"relative",zIndex:0,backgroundColor:e}),l="8px",a=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===e&&{...t.button2,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===e&&{...t.button1,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),s=({kind:e,color:o,token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_contained_primary_text,backgroundColor:n.component.btn_contained_primary_bg,"&:hover":c(n.component.btn_contained_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_primary_text}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_contained_secondary_text,backgroundColor:n.component.btn_contained_secondary_bg,"&:hover":c(n.component.btn_contained_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_contained_error_text,backgroundColor:n.component.btn_contained_error_bg,"&:hover":c(n.component.btn_contained_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_contained_error_text}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_ghost_primary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_primary_text}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_ghost_secondary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_ghost_error_text,"&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_ghost_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_outlined_primary_text,border:`1px solid ${n.component.btn_outlined_primary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_outlined_primary_text}}}),p=({token:e})=>({fontWeight:"500",borderRadius:l,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:l}}),b=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px"}}),m=((0,t.styled)(r.Button,{shouldForwardProp:e=>!["kind","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...p({token:o}),...b({size:t,hasIconOnly:i}),...a({size:t,kind:n,hasIconOnly:i,typography:e}),...s({kind:n,color:r,token:o})}))),(0,t.styled)(r.ToggleButton,{shouldForwardProp:e=>!["icon","kind","selectedColor","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,selectedColor:i,hasIconOnly:d,selected:c})=>({border:"none",...p({token:o}),...b({size:t,hasIconOnly:d}),...a({size:t,kind:n,hasIconOnly:d,selected:c,typography:e}),...s({kind:n,color:r,token:o}),..."primary"===i&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:o.component.btn_selected_primary_bg,color:o.component.btn_selected_primary_text}},..."secondary"===i&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:o.component.btn_selected_secondary_bg,color:o.component.btn_selected_secondary_text}}})))),u=(0,t.styled)("div")({display:"flex",alignItems:"center"}),h=e=>{const{kind:o="contained",size:t="small",color:r="primary",selectedColor:i="primary",className:d="",icon:c,selected:l,children:a,...s}=e,p=Boolean(c&&!a),b=d.replace("MuiToggleButtonGroup-grouped","").replace("MuiToggleButtonGroup-groupedHorizontal","");return(0,n.jsx)(n.Fragment,{children:"contained"===o||"ghost"===o?(0,n.jsx)(m,{className:`${o} ${b}`,selected:l,kind:o,color:r,size:t,hasIconOnly:p,selectedColor:i,disableRipple:!0,disableFocusRipple:!0,...s,children:p?c:(0,n.jsx)(n.Fragment,{children:c?(0,n.jsxs)(u,{children:[c,a]}):a})}):(0,n.jsx)(m,{className:`outlined ${b}`,selected:l,kind:"outlined",color:"primary",size:t,hasIconOnly:p,selectedColor:i,disableRipple:!0,disableFocusRipple:!0,...s,children:p?c:(0,n.jsx)(n.Fragment,{children:c?(0,n.jsxs)(u,{children:[c,a]}):a})})})};module.exports=o})();
1
+ (()=>{"use strict";var e={d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>u});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",d=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",c=e=>({position:"relative",zIndex:0,backgroundColor:e}),l="8px",p=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===e&&{...t.button2,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===e&&{...t.button1,padding:`${n?d({kind:o,size:e,selected:r}):i({kind:o,size:e,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),a=({kind:e,color:o,token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":c(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":c(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":c(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_error_text,"&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),s=({token:e})=>({fontWeight:"500",borderRadius:l,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:l}}),b=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px"}}),m=((0,t.styled)(r.Button,{shouldForwardProp:e=>!["kind","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...s({token:o}),...b({size:t,hasIconOnly:i}),...p({size:t,kind:n,hasIconOnly:i,typography:e}),...a({kind:n,color:r,token:o})}))),(0,t.styled)(r.ToggleButton,{shouldForwardProp:e=>!["icon","kind","selectedColor","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{token:o}},kind:n,size:t,color:r,selectedColor:i,hasIconOnly:d,selected:c})=>({border:"none",...s({token:o}),...b({size:t,hasIconOnly:d}),...p({size:t,kind:n,hasIconOnly:d,selected:c,typography:e}),...a({kind:n,color:r,token:o}),..."primary"===i&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:o.component.btn_selected_primary_bg,color:o.component.btn_selected_primary_text}},..."secondary"===i&&{"&.Mui-selected, &.Mui-selected:hover":{border:"none",backgroundColor:o.component.btn_selected_secondary_bg,color:o.component.btn_selected_secondary_text}}})))),x=(0,t.styled)("div")({display:"flex",alignItems:"center"}),u=e=>{const{kind:o="contained",size:t="small",color:r="primary",selectedColor:i="primary",className:d="",icon:c,selected:l,children:p,...a}=e,s=Boolean(c&&!p),b=d.replace("MuiToggleButtonGroup-grouped","").replace("MuiToggleButtonGroup-groupedHorizontal","");return(0,n.jsx)(n.Fragment,{children:"contained"===o||"ghost"===o?(0,n.jsx)(m,{className:`${o} ${b}`,selected:l,kind:o,color:r,size:t,hasIconOnly:s,selectedColor:i,disableRipple:!0,disableFocusRipple:!0,...a,children:s?c:(0,n.jsx)(n.Fragment,{children:c?(0,n.jsxs)(x,{children:[c,p]}):p})}):(0,n.jsx)(m,{className:`outlined ${b}`,selected:l,kind:"outlined",color:"primary",size:t,hasIconOnly:s,selectedColor:i,disableRipple:!0,disableFocusRipple:!0,...a,children:s?c:(0,n.jsx)(n.Fragment,{children:c?(0,n.jsxs)(x,{children:[c,p]}):p})})})};module.exports=o})();
2
2
  //# sourceMappingURL=index.js.map