@lunit/design-system 1.0.0 → 2.0.0

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 (109) hide show
  1. package/dist/cjs/components/Alert/index.js +1 -1
  2. package/dist/cjs/components/Alert/index.js.map +1 -1
  3. package/dist/cjs/components/Button/index.js +1 -1
  4. package/dist/cjs/components/Button/index.js.map +1 -1
  5. package/dist/cjs/components/Checkbox/index.js +1 -1
  6. package/dist/cjs/components/Checkbox/index.js.map +1 -1
  7. package/dist/cjs/components/Dialog/index.js +2 -0
  8. package/dist/cjs/components/Dialog/index.js.map +1 -0
  9. package/dist/cjs/components/Radio/index.js +1 -1
  10. package/dist/cjs/components/Radio/index.js.map +1 -1
  11. package/dist/cjs/components/ToggleButton/index.js +1 -1
  12. package/dist/cjs/components/ToggleButton/index.js.map +1 -1
  13. package/dist/cjs/index.js +1 -1
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/components/Button/Button.styled.js +1 -1
  16. package/dist/components/Button/Button.styled.js.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.js +9 -19
  18. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  19. package/dist/components/Dialog/Dialog.js +61 -0
  20. package/dist/components/Dialog/Dialog.js.map +1 -0
  21. package/dist/components/Dialog/Dialog.styled.js +137 -0
  22. package/dist/components/Dialog/Dialog.styled.js.map +1 -0
  23. package/dist/components/Dialog/components/DialogAction.js +18 -0
  24. package/dist/components/Dialog/components/DialogAction.js.map +1 -0
  25. package/dist/components/Dialog/index.js +2 -0
  26. package/dist/components/Dialog/index.js.map +1 -0
  27. package/dist/components/Radio/Radio.js +7 -21
  28. package/dist/components/Radio/Radio.js.map +1 -1
  29. package/dist/components/ToggleButton/ToggleButton.styled.js +1 -1
  30. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
  31. package/dist/foundation/Elevation/index.js +1 -1
  32. package/dist/foundation/Elevation/index.js.map +1 -1
  33. package/dist/foundation/Typography/index.js +0 -6
  34. package/dist/foundation/Typography/index.js.map +1 -1
  35. package/dist/foundation/Typography/tokens.js +1 -1
  36. package/dist/foundation/colors/base/grey.js +3 -1
  37. package/dist/foundation/colors/base/grey.js.map +1 -1
  38. package/dist/foundation/colors/index.js +5 -6
  39. package/dist/foundation/colors/index.js.map +1 -1
  40. package/dist/foundation/colors/token/component.js +31 -115
  41. package/dist/foundation/colors/token/component.js.map +1 -1
  42. package/dist/foundation/colors/token/core.js +43 -75
  43. package/dist/foundation/colors/token/core.js.map +1 -1
  44. package/dist/index.js +1 -1
  45. package/dist/index.js.map +1 -1
  46. package/dist/types/components/Alert/Alert.utils.d.ts +3 -3
  47. package/dist/types/components/Button/Button.styled.d.ts +9 -9
  48. package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
  49. package/dist/types/components/Dialog/Dialog.d.ts +50 -0
  50. package/dist/types/components/Dialog/Dialog.styled.d.ts +12 -0
  51. package/dist/types/components/Dialog/components/DialogAction.d.ts +8 -0
  52. package/dist/types/components/Dialog/index.d.ts +2 -0
  53. package/dist/types/components/Toast/Toast.utils.d.ts +1 -1
  54. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
  55. package/dist/types/foundation/Elevation/index.d.ts +1 -1
  56. package/dist/types/foundation/Typography/index.d.ts +1 -7
  57. package/dist/types/foundation/Typography/tokens.d.ts +1 -1
  58. package/dist/types/foundation/colors/base/grey.d.ts +2 -0
  59. package/dist/types/foundation/colors/index.d.ts +5 -6
  60. package/dist/types/foundation/colors/token/types.d.ts +0 -2
  61. package/dist/types/foundation/colors/types.d.ts +78 -76
  62. package/dist/types/foundation/index.d.ts +5 -0
  63. package/dist/types/index.d.ts +1 -1
  64. package/package.json +1 -1
  65. package/src/components/Button/Button.styled.ts +1 -1
  66. package/src/components/Checkbox/Checkbox.tsx +39 -22
  67. package/src/components/Dialog/Dialog.styled.ts +165 -0
  68. package/src/components/Dialog/Dialog.tsx +195 -0
  69. package/src/components/Dialog/components/DialogAction.tsx +36 -0
  70. package/src/components/Dialog/index.ts +14 -0
  71. package/src/components/Radio/Radio.tsx +37 -25
  72. package/src/components/ToggleButton/ToggleButton.styled.ts +1 -1
  73. package/src/foundation/Elevation/index.ts +1 -1
  74. package/src/foundation/Typography/index.ts +0 -6
  75. package/src/foundation/Typography/tokens.ts +1 -1
  76. package/src/foundation/colors/base/grey.ts +3 -1
  77. package/src/foundation/colors/index.ts +5 -6
  78. package/src/foundation/colors/token/component.ts +24 -108
  79. package/src/foundation/colors/token/core.ts +39 -71
  80. package/src/foundation/colors/token/types.ts +0 -2
  81. package/src/foundation/colors/types.ts +78 -75
  82. package/src/index.ts +1 -1
  83. package/src/stories/GettingStarted.mdx +88 -0
  84. package/src/stories/components/Button/BasicButton.stories.tsx +80 -52
  85. package/src/stories/components/Button/ButtonDocs.mdx +187 -0
  86. package/src/stories/components/Button/Color.stories.tsx +132 -0
  87. package/src/stories/components/Button/IconButton.stories.tsx +41 -35
  88. package/src/stories/components/Button/Kind.stories.tsx +13 -52
  89. package/src/stories/components/{SelectControl/Checkbox.stories.tsx → CheckBox/BasicCheckbox.stories.tsx} +84 -105
  90. package/src/stories/components/CheckBox/CheckboxDocs.mdx +85 -0
  91. package/src/stories/components/Chip/Chip.stories.tsx +65 -0
  92. package/src/stories/components/Chip/ChipDocs.mdx +132 -0
  93. package/src/stories/components/Dialog/Dialog.stories.tsx +320 -0
  94. package/src/stories/components/TextField/BasicTextField.stories.tsx +214 -0
  95. package/src/stories/components/TextField/TextFieldDocs.mdx +140 -0
  96. package/src/stories/components/TextField/TextFieldSize.stories.tsx +26 -3
  97. package/src/stories/components/ToggleButton/Basic.stories.tsx +312 -0
  98. package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +180 -0
  99. package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +65 -0
  100. package/src/stories/components/ToggleButton/WithIcon.stories.tsx +138 -0
  101. package/src/stories/foundation/Typography/Typography.mdx +31 -46
  102. package/src/stories/foundation/Typography/Typography.stories.tsx +30 -1
  103. package/src/stories/foundation/colors/ColorSystem.tsx +86 -0
  104. package/src/stories/foundation/colors/Docs.mdx +225 -0
  105. package/src/stories/foundation/colors/TokenPaletteTable.tsx +1 -5
  106. package/src/components/Modal/Modal.tsx +0 -8
  107. package/src/components/Modal/index.ts +0 -1
  108. package/src/stories/components/Modal/Modal.stories.tsx +0 -15
  109. package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +0 -44
@@ -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:()=>B});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 l=require("@lunit/design-system-icons/Warning16");var c=e.n(l);const s=require("@lunit/design-system-icons/Information16");var d=e.n(s);const p=require("@lunit/design-system-icons/Close");var u=e.n(p);const m=require("react"),x=require("@mui/material"),_=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_bg;case"warning":return e.palette.lunit_token.component.alert_warning_bg;case"error":return e.palette.lunit_token.component.alert_error_bg;default:return e.palette.lunit_token.component.alert_success_bg}},b=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_border;case"warning":return e.palette.lunit_token.component.alert_warning_border;case"error":return e.palette.lunit_token.component.alert_error_border;default:return e.palette.lunit_token.component.alert_success_border}},h=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.core.icon_info_02;case"warning":return e.palette.lunit_token.core.icon_warning_02;case"error":return e.palette.lunit_token.core.icon_error_02;default:return e.palette.lunit_token.core.icon_success_02}},g=(0,x.styled)(x.Alert)((({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${b(o,e)}`,backgroundColor:_(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.lunit_token.core.text_normal}}))),f=(0,x.styled)("div")((({theme:e})=>({color:e.palette.lunit_token.core.text_normal}))),k=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),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",z=({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}),w="8px",M=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...t.button1,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"44px",height:"44px"}}),O=({kind:e,color:o,lunit_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:w},"&.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:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),R=({lunit_token:e})=>({fontWeight:"500",borderRadius:w,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:w}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),S=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})((({theme:{typography:e,palette:{lunit_token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...R({lunit_token:o}),...C({size:t,hasIconOnly:i}),...M({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,lunit_token:o})}))),$=(0,m.forwardRef)(((e,o)=>{const{kind:t,variant:r,icon:i,children:a,startIcon:l}=e,c=Boolean((l||i)&&!a);return"outlined"===t||"outlined"===r?(0,n.jsx)(A,{...e,ref:o,hasIconOnly:c}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(q,{...e,ref:o,hasIconOnly:c}):(0,n.jsx)(T,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:c})})),q=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`ghost ${i||""}`,kind:"ghost",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),A=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),T=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),N=$,W={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(d(),{variant:"filled"}),warning:(0,n.jsx)(c(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},B=(0,m.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:l,...c}=e;return(0,n.jsxs)(g,{ref:o,severity:r,iconMapping:W,slots:{closeButton:()=>(0,n.jsx)(N,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:l})},onClose:l,...c,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(f,{children:i}),a&&(0,n.jsx)(k,{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:()=>B});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 l=require("@lunit/design-system-icons/Warning16");var c=e.n(l);const s=require("@lunit/design-system-icons/Information16");var d=e.n(s);const p=require("@lunit/design-system-icons/Close");var u=e.n(p);const m=require("react"),x=require("@mui/material"),_=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_bg;case"warning":return e.palette.lunit_token.component.alert_warning_bg;case"error":return e.palette.lunit_token.component.alert_error_bg;default:return e.palette.lunit_token.component.alert_success_bg}},b=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_border;case"warning":return e.palette.lunit_token.component.alert_warning_border;case"error":return e.palette.lunit_token.component.alert_error_border;default:return e.palette.lunit_token.component.alert_success_border}},h=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.core.icon_info_02;case"warning":return e.palette.lunit_token.core.icon_warning_02;case"error":return e.palette.lunit_token.core.icon_error_02;default:return e.palette.lunit_token.core.icon_success_02}},g=(0,x.styled)(x.Alert)((({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${b(o,e)}`,backgroundColor:_(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.lunit_token.core.text_normal}}))),f=(0,x.styled)("div")((({theme:e})=>({color:e.palette.lunit_token.core.text_normal}))),k=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),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",z=({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}),w="8px",M=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...t.button1,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"44px",height:"44px"}}),O=({kind:e,color:o,lunit_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:w},"&.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.core.border_medium}`,"&: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:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),R=({lunit_token:e})=>({fontWeight:"500",borderRadius:w,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:w}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),S=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})((({theme:{typography:e,palette:{lunit_token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...R({lunit_token:o}),...C({size:t,hasIconOnly:i}),...M({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,lunit_token:o})}))),$=(0,m.forwardRef)(((e,o)=>{const{kind:t,variant:r,icon:i,children:a,startIcon:l}=e,c=Boolean((l||i)&&!a);return"outlined"===t||"outlined"===r?(0,n.jsx)(A,{...e,ref:o,hasIconOnly:c}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(q,{...e,ref:o,hasIconOnly:c}):(0,n.jsx)(T,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:c})})),q=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`ghost ${i||""}`,kind:"ghost",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),A=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),T=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),N=$,W={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(d(),{variant:"filled"}),warning:(0,n.jsx)(c(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},B=(0,m.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:l,...c}=e;return(0,n.jsxs)(g,{ref:o,severity:r,iconMapping:W,slots:{closeButton:()=>(0,n.jsx)(N,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:l})},onClose:l,...c,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(f,{children:i}),a&&(0,n.jsx)(k,{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,QACx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BjC,YAAaA,EAAW,UAEtBA,IAAe,8BAAGkC,KAEvB,IAGH,ICvHMQ,EAAc,CAClBC,SAAS,SAAC,IAAO,CAACX,QAAQ,WAC1BY,MAAM,SAAC,IAAW,CAACZ,QAAQ,WAC3Ba,SAAS,SAAC,IAAO,CAACb,QAAQ,WAC1Bc,OAAO,SAAC,IAAK,CAACd,QAAQ,YA+BxB,GA5Bc,IAAAH,aAAuC,CAACC,EAAOC,KAC3D,MAAM,MAAEgB,EAAK,SAAEjG,EAAQ,SAAEoF,EAAQ,aAAEc,EAAY,QAAEC,KAAYC,GAASpB,EACtE,OACE,UAAC7D,EAAW,CACV8D,IAAKA,EACLjF,SAAUA,EACVqG,YAAaT,EACbU,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACL5D,KAAK,QACLC,KAAK,QACLf,MAAM,YACNsD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC/D,EAAgB,UAAE+D,KAC7B,SAACzD,EAAmB,UAAE4C,IACrBc,IAAgB,SAACzD,EAAkB,UAAEyD,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.lunit_token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_bg;\n default:\n return theme.palette.lunit_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.lunit_token.component.alert_info_border;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_border;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_border;\n default:\n return theme.palette.lunit_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.lunit_token.core.icon_info_02;\n case \"warning\":\n return theme.palette.lunit_token.core.icon_warning_02;\n case \"error\":\n return theme.palette.lunit_token.core.icon_error_02;\n default:\n return theme.palette.lunit_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.lunit_token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.lunit_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 lunit_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 height: \"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 height: \"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 height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_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: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_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 ${lunit_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: lunit_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 margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\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","lunit_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","CustomButton","shouldForwardProp","includes","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps","MAPPED_ICON","success","info","warning","error","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,EAA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D,MAAM,MAAEgB,EAAK,SAAEjG,EAAQ,SAAEoF,EAAQ,aAAEc,EAAY,QAAEC,KAAYC,GAASpB,EACtE,OACE,UAAC7D,EAAW,CACV8D,IAAKA,EACLjF,SAAUA,EACVqG,YAAaT,EACbU,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACL5D,KAAK,QACLC,KAAK,QACLf,MAAM,YACNsD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC/D,EAAgB,UAAE+D,KAC7B,SAACzD,EAAmB,UAAE4C,IACrBc,IAAgB,SAACzD,EAAkB,UAAEyD,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.lunit_token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_bg;\n default:\n return theme.palette.lunit_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.lunit_token.component.alert_info_border;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_border;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_border;\n default:\n return theme.palette.lunit_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.lunit_token.core.icon_info_02;\n case \"warning\":\n return theme.palette.lunit_token.core.icon_warning_02;\n case \"error\":\n return theme.palette.lunit_token.core.icon_error_02;\n default:\n return theme.palette.lunit_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.lunit_token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.lunit_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 lunit_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 height: \"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 height: \"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 height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_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: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_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 ${lunit_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: lunit_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 margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\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","lunit_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","border_medium","commonStyle","textTransform","focused","boxSizing","iconStyle","CustomButton","shouldForwardProp","includes","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps","MAPPED_ICON","success","info","warning","error","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:()=>g});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material/styles"),i=require("@mui/material"),c=({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",a=({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",d=o=>({position:"relative",zIndex:0,backgroundColor:o}),l="8px",s=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===o&&{...t.button1,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"44px",height:"44px"}}),p=({kind:o,color:e,lunit_token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":d(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":d(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":d(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":d("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":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":d("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":d("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"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":d("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}}}),b=({lunit_token:o})=>({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 ${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:l}}),m=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),x=(0,r.styled)(i.Button,{shouldForwardProp:o=>!["kind","hasIconOnly","variant"].includes(o)})((({theme:{typography:o,palette:{lunit_token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...b({lunit_token:e}),...m({size:t,hasIconOnly:i}),...s({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,lunit_token:e})}))),h=(0,t.forwardRef)(((o,e)=>{const{kind:t,variant:r,icon:i,children:c,startIcon:a}=o,d=Boolean((a||i)&&!c);return"outlined"===t||"outlined"===r?(0,n.jsx)(y,{...o,ref:e,hasIconOnly:d}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(u,{...o,ref:e,hasIconOnly:d}):(0,n.jsx)(_,{...o,kind:"contained",variant:"contained",ref:e,hasIconOnly:d})})),u=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`ghost ${i||""}`,kind:"ghost",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),y=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),_=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),g=h;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:()=>g});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material/styles"),i=require("@mui/material"),c=({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",a=({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",d=o=>({position:"relative",zIndex:0,backgroundColor:o}),l="8px",s=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===o&&{...t.button1,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"44px",height:"44px"}}),p=({kind:o,color:e,lunit_token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":d(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":d(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":d(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":d("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":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":d("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":d("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"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.core.border_medium}`,"&:hover":d("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}}}),b=({lunit_token:o})=>({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 ${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:l}}),m=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),x=(0,r.styled)(i.Button,{shouldForwardProp:o=>!["kind","hasIconOnly","variant"].includes(o)})((({theme:{typography:o,palette:{lunit_token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...b({lunit_token:e}),...m({size:t,hasIconOnly:i}),...s({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,lunit_token:e})}))),h=(0,t.forwardRef)(((o,e)=>{const{kind:t,variant:r,icon:i,children:c,startIcon:a}=o,d=Boolean((a||i)&&!c);return"outlined"===t||"outlined"===r?(0,n.jsx)(y,{...o,ref:e,hasIconOnly:d}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(u,{...o,ref:e,hasIconOnly:d}):(0,n.jsx)(_,{...o,kind:"contained",variant:"contained",ref:e,hasIconOnly:d})})),u=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`ghost ${i||""}`,kind:"ghost",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),y=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),_=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),g=h;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,SCAvC,EAA+BA,QAAQ,wBCAvC,EAA+BA,QAAQ,iBCahCC,EAAgC,EAC3CC,OACAC,OACAC,YAAW,KAEE,UAATD,EACc,aAATD,GAAwBE,EAE3B,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0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGH,I","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 \"react\"","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(\"react\");","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 lunit_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 height: \"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 height: \"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 height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_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: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_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 ${lunit_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: lunit_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 margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\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","height","button1","kindStyle","color","lunit_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","core","hover","btn_secondary_border","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","CustomButton","styled","shouldForwardProp","includes","theme","palette","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps"],"sourceRoot":""}
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,SCAvC,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,EAE3B,YADA,WChBOC,EAAoC,EAC/CH,OACAC,OACAC,YAAW,KAEE,UAATD,EACc,aAATD,GAAwBE,EAE3B,MADA,MAIO,WAATD,EACc,aAATD,GAAwBE,EAE3B,MADA,MAKU,aAATF,GAAwBE,EAE3B,OADA,OC7BN,EANuBE,I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,EAAI,UACJO,EAAS,SACTN,EAAQ,UACRC,EAAS,YACTlD,EAAW,QACX+C,KACGS,GACDX,EAEJ,OACE,SAACR,EAAY,IACPmB,EACJV,IAAKA,EACLS,UAAW,SAASA,GAAwB,KAC5ChE,KAAK,QACLiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGGG,GAAiB,IAAAR,aAGrB,CAACC,EAAOC,KACR,MAAM,KACJtD,EAAO,QAAO,KACdwD,EAAI,UACJO,EAAS,SACTN,EAAQ,UACRC,EAAS,YACTlD,EAAW,QACX+C,KACGS,GACDX,EAEJ,OACE,SAACR,EAAY,IACPmB,EACJV,IAAKA,EACLS,UAAW,YAAYA,GAAwB,KAC/ChE,KAAK,WACLiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGGK,GAAkB,IAAAV,aAGtB,CAACC,EAAOC,KACR,MAAM,KACJtD,EAAO,QAAO,KACdwD,EAAI,UACJO,EAAS,SACTN,EAAQ,UACRC,EAAS,YACTlD,EAAW,QACX+C,KACGS,GACDX,EAEJ,OACE,SAACR,EAAY,IACPmB,EACJV,IAAKA,EACLS,UAAW,GAAGV,EAAMtD,MAAQ,eAAegE,GAAwB,KACnEhE,KAAMsD,EAAMtD,MAAQ,YACpBiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGH,I","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 \"react\"","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(\"react\");","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 lunit_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 height: \"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 height: \"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 height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_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: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\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: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_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 ${lunit_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: lunit_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 margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\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","height","button1","kindStyle","color","lunit_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","core","hover","border_medium","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","CustomButton","styled","shouldForwardProp","includes","theme","palette","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps"],"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 l in o)e.o(o,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:o[l]})},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:()=>C});const o=require("react/jsx-runtime"),l=require("@mui/material/styles"),r=require("@mui/material/Checkbox");var n=e.n(r);const a=(0,l.styled)(n())((({theme:e})=>({width:20,height:20,padding:1,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",width:24,height:24,border:`1px solid ${e.palette.lunit_token.core.focused}`,borderRadius:"7px"}}))),s={width:18,height:18},d=(0,l.styled)("span")((({theme:e})=>({...s,backgroundColor:e.palette.lunit_token.component.selectcontrol_off,maskImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V14C1.5 15.3807 2.61929 16.5 4 16.5H14C15.3807 16.5 16.5 15.3807 16.5 14V4C16.5 2.61929 15.3807 1.5 14 1.5ZM4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4Z' /%3E%3C/svg%3E\")"}))),i=(0,l.styled)("span")((({theme:e})=>({...s,backgroundColor:e.palette.lunit_token.component.selectcontrol_on,maskImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4ZM14.2516 7.14413C14.6074 6.72168 14.5533 6.09083 14.1309 5.73508C13.7084 5.37933 13.0776 5.43341 12.7218 5.85586L8.31824 11.0851L5.14993 8.37556C4.7302 8.01661 4.09895 8.06588 3.74 8.48561C3.38105 8.90533 3.43032 9.53658 3.85005 9.89553L7.78416 13.26C7.98672 13.4332 8.25006 13.5184 8.51571 13.4967C8.78135 13.4749 9.02732 13.348 9.19901 13.1441L14.2516 7.14413Z' /%3E%3C/svg%3E\")"}))),u=(0,l.styled)("span")((({theme:e})=>({...s,backgroundColor:e.palette.lunit_token.component.selectcontrol_on,maskImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4ZM4 8C3.44772 8 3 8.44771 3 9C3 9.5523 3.44771 10 4 10H14C14.5523 10 15 9.5523 15 9C15 8.44772 14.5523 8 14 8H4Z' /%3E%3C/svg%3E\")"}))),C=e=>(0,o.jsx)(a,{disableRipple:!0,icon:(0,o.jsx)(d,{}),checkedIcon:(0,o.jsx)(i,{}),indeterminateIcon:(0,o.jsx)(u,{}),...e});module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},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:()=>c});const i=require("react/jsx-runtime"),o=require("@mui/material/styles"),l=require("@mui/material/Checkbox");var r=e.n(l);const d=(0,o.styled)(r())((({theme:e})=>({width:20,height:20,padding:0,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",width:24,height:24,border:`1px solid ${e.palette.lunit_token.core.focused}`,borderRadius:"7px"}}))),n={width:18,height:18},s=(0,o.styled)("span")((({theme:e})=>({...n,borderRadius:"20%",boxShadow:`inset 0 0 0 1.5px ${e.palette.lunit_token.component.selectcontrol_off}`}))),a=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z",fill:"#00C9EA"})}),u=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z",fill:"#00C9EA"})}),c=e=>(0,i.jsx)(d,{disableRipple:!0,icon:(0,i.jsx)(s,{}),checkedIcon:(0,i.jsx)(a,{}),indeterminateIcon:(0,i.jsx)(u,{}),...e});module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Checkbox/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,wBCAvC,EAA+BA,QAAQ,0B,aCK7C,MAAMC,GAAiB,IAAAC,QAAO,IAAP,EAAoB,EAAGC,YAAY,CACxDC,MAAO,GACPC,OAAQ,GACRC,QAAS,EACT,iBAAkB,CAChBC,QAAS,KAEX,2BAA4B,CAC1BC,QAAS,KACTC,SAAU,WACVL,MAAO,GACPC,OAAQ,GACRK,OAAQ,aAAaP,EAAMQ,QAAQC,YAAYC,KAAKC,UACpDC,aAAc,WAIZC,EAAW,CACfZ,MAAO,GACPC,OAAQ,IAGJY,GAAc,IAAAf,QAAO,OAAP,EAAe,EAAGC,YAAY,IAC7Ca,EACHE,gBAAiBf,EAAMQ,QAAQC,YAAYO,UAAUC,kBACrDC,UACE,6bAKEC,GAAc,IAAApB,QAAO,OAAP,EAAe,EAAGC,YAAY,IAC7Ca,EACHE,gBAAiBf,EAAMQ,QAAQC,YAAYO,UAAUI,iBACrDF,UACE,qpBAKEG,GAAoB,IAAAtB,QAAO,OAAP,EAAe,EAAGC,YAAY,IACnDa,EACHE,gBAAiBf,EAAMQ,QAAQC,YAAYO,UAAUI,iBACrDF,UACE,0ZAiBJ,EAZkBI,IAEd,SAACxB,EAAc,CACbyB,eAAa,EACbC,MAAM,SAACV,EAAW,IAClBW,aAAa,SAACN,EAAW,IACzBO,mBAAmB,SAACL,EAAiB,OACjCC,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 \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material/Checkbox\"","webpack://@lunit/design-system/./src/components/Checkbox/Checkbox.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/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Checkbox\");","import React from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport MuiCheckbox from \"@mui/material/Checkbox\";\nimport type { CheckboxProps } from \"@mui/material\";\n\nconst CustomCheckbox = styled(MuiCheckbox)(({ theme }) => ({\n width: 20,\n height: 20,\n padding: 1,\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-focusVisible:after\": {\n content: '\"\"',\n position: \"absolute\",\n width: 24,\n height: 24,\n border: `1px solid ${theme.palette.lunit_token.core.focused}`,\n borderRadius: \"7px\",\n },\n}));\n\nconst iconSize = {\n width: 18,\n height: 18,\n};\n\nconst DefaultIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n backgroundColor: theme.palette.lunit_token.component.selectcontrol_off,\n maskImage:\n \"url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath\" +\n \" fill-rule='evenodd' clip-rule='evenodd' d='M14 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V14C1.5 15.3807 2.61929 16.5 4 16.5H14C15.3807 \" +\n \"16.5 16.5 15.3807 16.5 14V4C16.5 2.61929 15.3807 1.5 14 1.5ZM4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4Z' /%3E%3C/svg%3E\\\")\",\n}));\n\nconst CheckedIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n backgroundColor: theme.palette.lunit_token.component.selectcontrol_on,\n maskImage:\n \"url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath\" +\n \" fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4ZM14.2516 \" +\n \"7.14413C14.6074 6.72168 14.5533 6.09083 14.1309 5.73508C13.7084 5.37933 13.0776 5.43341 12.7218 5.85586L8.31824 11.0851L5.14993 8.37556C4.7302 8.01661 4.09895 8.06588 3.74 8.48561C3.38105 8.90533 3.43032 9.53658 3.85005 9.89553L7.78416 13.26C7.98672 13.4332 8.25006 13.5184 8.51571 13.4967C8.78135 13.4749 9.02732 13.348 9.19901 13.1441L14.2516 7.14413Z' /%3E%3C/svg%3E\\\")\",\n}));\n\nconst IndeterminateIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n backgroundColor: theme.palette.lunit_token.component.selectcontrol_on,\n maskImage:\n \"url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath\" +\n \" fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 \" +\n \"14 0H4ZM4 8C3.44772 8 3 8.44771 3 9C3 9.5523 3.44771 10 4 10H14C14.5523 10 15 9.5523 15 9C15 8.44772 14.5523 8 14 8H4Z' /%3E%3C/svg%3E\\\")\",\n}));\n\nconst Checkbox = (props: CheckboxProps) => {\n return (\n <CustomCheckbox\n disableRipple\n icon={<DefaultIcon />}\n checkedIcon={<CheckedIcon />}\n indeterminateIcon={<IndeterminateIcon />}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\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","CustomCheckbox","styled","theme","width","height","padding","opacity","content","position","border","palette","lunit_token","core","focused","borderRadius","iconSize","DefaultIcon","backgroundColor","component","selectcontrol_off","maskImage","CheckedIcon","selectcontrol_on","IndeterminateIcon","props","disableRipple","icon","checkedIcon","indeterminateIcon"],"sourceRoot":""}
1
+ {"version":3,"file":"components/Checkbox/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,wBCAvC,EAA+BA,QAAQ,0B,aCK7C,MAAMC,GAAiB,IAAAC,QAAO,IAAP,EAAoB,EAAGC,YAAY,CACxDC,MAAO,GACPC,OAAQ,GACRC,QAAS,EACT,iBAAkB,CAChBC,QAAS,KAEX,2BAA4B,CAC1BC,QAAS,KACTC,SAAU,WACVL,MAAO,GACPC,OAAQ,GACRK,OAAQ,aAAaP,EAAMQ,QAAQC,YAAYC,KAAKC,UACpDC,aAAc,WAIZC,EAAW,CACfZ,MAAO,GACPC,OAAQ,IAGJY,GAAc,IAAAf,QAAO,OAAP,EAAe,EAAGC,YAAY,IAC7Ca,EACHD,aAAc,MACdG,UAAW,qBAAqBf,EAAMQ,QAAQC,YAAYO,UAAUC,wBAGhEC,EAAc,KAEhB,gBACEC,MAAM,6BACNlB,MAAM,KACNC,OAAO,KACPkB,QAAQ,YACRC,KAAK,OAAM,UAEX,6BACY,UAAS,YACT,UACV1C,EAAE,meACF0C,KAAK,cAMPC,EAAoB,KAEtB,gBACEH,MAAM,6BACNlB,MAAM,KACNC,OAAO,KACPkB,QAAQ,YACRC,KAAK,OAAM,UAEX,6BACY,UAAS,YACT,UACV1C,EAAE,kPACF0C,KAAK,cAkBb,EAZkBE,IAEd,SAACzB,EAAc,CACb0B,eAAa,EACbC,MAAM,SAACX,EAAW,IAClBY,aAAa,SAACR,EAAW,IACzBS,mBAAmB,SAACL,EAAiB,OACjCC,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 \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material/Checkbox\"","webpack://@lunit/design-system/./src/components/Checkbox/Checkbox.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/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Checkbox\");","import React from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport MuiCheckbox from \"@mui/material/Checkbox\";\nimport type { CheckboxProps } from \"@mui/material\";\n\nconst CustomCheckbox = styled(MuiCheckbox)(({ theme }) => ({\n width: 20,\n height: 20,\n padding: 0,\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-focusVisible:after\": {\n content: '\"\"',\n position: \"absolute\",\n width: 24,\n height: 24,\n border: `1px solid ${theme.palette.lunit_token.core.focused}`,\n borderRadius: \"7px\",\n },\n}));\n\nconst iconSize = {\n width: 18,\n height: 18,\n};\n\nconst DefaultIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n borderRadius: \"20%\",\n boxShadow: `inset 0 0 0 1.5px ${theme.palette.lunit_token.component.selectcontrol_off}`,\n}));\n\nconst CheckedIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst IndeterminateIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst Checkbox = (props: CheckboxProps) => {\n return (\n <CustomCheckbox\n disableRipple\n icon={<DefaultIcon />}\n checkedIcon={<CheckedIcon />}\n indeterminateIcon={<IndeterminateIcon />}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\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","CustomCheckbox","styled","theme","width","height","padding","opacity","content","position","border","palette","lunit_token","core","focused","borderRadius","iconSize","DefaultIcon","boxShadow","component","selectcontrol_off","CheckedIcon","xmlns","viewBox","fill","IndeterminateIcon","props","disableRipple","icon","checkedIcon","indeterminateIcon"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},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:()=>E});const t=require("react/jsx-runtime"),n=require("react"),i=require("react-dom"),r=require("@lunit/design-system-icons"),a=require("@mui/material/styles"),l=(0,a.styled)("div")({display:"flex",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-end",gap:8});function d(e){const{children:o,justifyContent:n,sx:i}=e;return(0,t.jsx)(l,{id:"dialog-action","data-testid":"dialog-action",className:"dialog-action",sx:{justifyContent:n,...i},children:o})}const s={small:{width:"320px",maxWidth:"320px"},medium:{width:"500px",maxWidth:"840px"},modal:{position:"relative",boxShadow:"0px 12px 24px 8px rgba(0, 0, 0, 0.12), 0px 12px 44px 3px rgba(0, 0, 0, 0.18)"},nonModal:{position:"fixed",top:"30px",right:"30px",boxShadow:"0px 12px 24px 8px rgba(0, 0, 0, 0.36), 0px 12px 44px 3px rgba(0, 0, 0, 0.48)"}},c={small:{height:"52px",maxHeight:"100%",padding:"20px 20px 8px 20px"},medium:{height:"64px",maxHeight:"100%",padding:"30px 32px 6px 32px"}},p={small:{paddingInline:"20px calc(20px - 10px)",paddingBottom:"28px"},smallAction:{paddingInline:"20px calc(20px - 10px)",paddingBottom:"8px"},medium:{paddingInline:"32px calc(32px - 14px)",paddingBottom:"32px"},mediumAction:{paddingInline:"32px calc(32px - 14px)",paddingBottom:"16px"}},x={small:{height:"64px",padding:"8px 20px 20px 20px"},medium:{height:"84px",padding:"16px 32px 32px 32px"}},m=(0,a.styled)("div")({position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(17, 17, 19, 0.7)",zIndex:1e3,display:"grid",placeItems:"center"}),u=(0,a.styled)("div")((({theme:e,size:o,nonModal:t,type:n})=>({zIndex:1001,maxHeight:"80vh",display:"flex",flexDirection:"column",boxSizing:"border-box",borderRadius:"10px",backgroundColor:e.palette.lunit_token.core.bg_03,color:e.palette.lunit_token.core.text_normal,...s["small"===o?"small":"medium"],...s[t?"nonModal":"modal"],"& #dialog-title":{...c["small"===o?"small":"medium"]},"& #dialog-content":{...p["small"===o&&"passive"!==n?"smallAction":"small"===o?"small":"medium"===o&&"passive"!==n?"mediumAction":"medium"],scrollbarGutter:"stable","::-webkit-scrollbar":{width:"small"===o?"10px":"14px"},"::webkit-scrollbar-track":{background:"transparent"},"::-webkit-scrollbar-thumb":{backgroundClip:"padding-box",border:"2px solid transparent",borderRadius:"10px",backgroundColor:e.palette.lunit_token.component.scrollbars_bg}},"& #dialog-action":{...x["small"===o?"small":"medium"]}}))),b=(0,a.styled)("header")({display:"flex",width:"100%",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-start",gap:"8px"}),h=(0,a.styled)("div")({display:"flex",justifyContent:"center",width:"20px",height:"20px",position:"relative",marginBottom:"1px"}),g=(0,a.styled)("div")((({theme:e})=>({...e.typography.body2_14_regular,flex:"1 1 auto",overflowY:"scroll"}))),y=require("@mui/material"),_=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||t?"8px 12px":"7px 11px":"outlined"!==e||t?"10px 12px":"9px 11px",f=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px":"3px":"medium"===o?"outlined"!==e||t?"8px":"7px":"outlined"!==e||t?"12px":"11px",k=e=>({position:"relative",zIndex:0,backgroundColor:e}),v="8px",I=({size:e,kind:o,hasIconOnly:t,typography:n,selected:i=!1})=>({..."small"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...n.button1,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"44px",height:"44px"}}),j=({kind:e,color:o,lunit_token:t})=>({..."contained"===e&&"primary"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_primary_bg,"&:hover":k(t.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,backgroundColor:t.component.btn_secondary_bg,"&:hover":k(t.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_error_bg,"&:hover":k(t.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:t.component.btn_error_text,"&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:`1px solid ${t.component.btn_primary_border}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:`1px solid ${t.core.border_medium}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_secondary_text}}}),z=({lunit_token:e})=>({fontWeight:"500",borderRadius:v,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:v}}),w=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),C=(0,a.styled)(y.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})((({theme:{typography:e,palette:{lunit_token:o}},kind:t,size:n,color:i,hasIconOnly:r})=>({...z({lunit_token:o}),...w({size:n,hasIconOnly:r}),...I({size:n,kind:t,hasIconOnly:r,typography:e}),...j({kind:t,color:i,lunit_token:o})}))),O=(0,n.forwardRef)(((e,o)=>{const{kind:n,variant:i,icon:r,children:a,startIcon:l}=e,d=Boolean((l||r)&&!a);return"outlined"===n||"outlined"===i?(0,t.jsx)(B,{...e,ref:o,hasIconOnly:d}):"ghost"===n||"text"===i||"ghost"===i?(0,t.jsx)(M,{...e,ref:o,hasIconOnly:d}):(0,t.jsx)(R,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:d})})),M=(0,n.forwardRef)(((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`ghost ${r||""}`,kind:"ghost",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})})),B=(0,n.forwardRef)(((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`outlined ${r||""}`,kind:"outlined",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})})),R=(0,n.forwardRef)(((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`${e.kind??"contained"} ${r||""}`,kind:e.kind??"contained",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})})),N=O,$=require("@mui/material/Typography");var S=e.n($);const P=e=>(0,t.jsx)(S(),{...e});function q({dialogProps:e}){const{nonModal:o=!1,onClose:n,title:i,titleIcon:a,titleVariant:l="headline5",children:s,actions:c,type:p,size:x="small",sx:m,style:y,className:_}=e;return(0,t.jsxs)(u,{role:"dialog","aria-labelledby":"dialog-title",size:x,nonModal:o,type:p,sx:{...m},style:y,className:`dialog ${_??""}`,children:[(0,t.jsxs)(b,{id:"dialog-title",className:"dialog-title-wrapper",children:[a&&(0,t.jsx)(h,{className:"dialog-title-icon",children:a}),(0,t.jsx)(P,{component:"h2",id:"dialog-title-text",variant:l,children:i}),"passive"===p&&(0,t.jsx)(N,{id:"dialog-title-close-button","data-testid":"dialog-title-close-button",kind:"ghost",color:"secondary",icon:(0,t.jsx)(r.Close,{}),onClick:n,sx:{marginRight:0,marginLeft:"auto"}})]}),(0,t.jsx)(g,{id:"dialog-content",children:s}),"action"===p&&null!==c?(0,t.jsx)(d,{children:c}):null]})}const E=function(e){const{isOpen:o,type:r,nonModal:a=!1,onClose:l}=e,d="action"===r&&!a,s="passive"===r&&!a,c="action"===r&&a;return(0,n.useEffect)((()=>{if(o&&(s||d&&e.enableBackdropClose||c&&e.enableBackButtonClose))return document.addEventListener("keydown",t),document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",t),document.removeEventListener("keydown",n)};function t(e){"Escape"===e.key&&l()}function n(e){"Backspace"===e.key&&l()}}),[o,s,l]),o?(0,i.createPortal)(a?(0,t.jsx)(q,{dialogProps:{...e}}):(0,t.jsx)(m,{onClick:function(o){(s||d&&e.enableBackdropClose)&&o.target===o.currentTarget&&l()},"data-testid":"dialog-backdrop",children:(0,t.jsx)(q,{dialogProps:{...e}})}),document.body):null};module.exports=o})();
2
+ //# sourceMappingURL=index.js.map