@lunit/design-system 1.0.0-a.5 → 1.0.0-b.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/components/Alert/index.js +1 -1
- package/dist/cjs/components/Alert/index.js.map +1 -1
- package/dist/cjs/components/Button/index.js +1 -1
- package/dist/cjs/components/Button/index.js.map +1 -1
- package/dist/cjs/components/Checkbox/index.js +1 -1
- package/dist/cjs/components/Checkbox/index.js.map +1 -1
- package/dist/cjs/components/Chip/index.js +1 -1
- package/dist/cjs/components/Chip/index.js.map +1 -1
- package/dist/cjs/components/Radio/index.js +1 -1
- package/dist/cjs/components/Radio/index.js.map +1 -1
- package/dist/cjs/components/TextField/index.js +1 -1
- package/dist/cjs/components/TextField/index.js.map +1 -1
- package/dist/cjs/components/Toggle/index.js +1 -1
- package/dist/cjs/components/Toggle/index.js.map +1 -1
- package/dist/cjs/components/ToggleButton/index.js +1 -1
- package/dist/cjs/components/ToggleButton/index.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/components/Alert/Alert.styled.js +2 -2
- package/dist/components/Alert/Alert.styled.js.map +1 -1
- package/dist/components/Alert/Alert.utils.js +12 -12
- package/dist/components/Alert/Alert.utils.js.map +1 -1
- package/dist/components/Button/Button.styled.js +33 -33
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +4 -4
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +15 -15
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +27 -27
- package/dist/components/TextField/TextField.style.js.map +1 -1
- package/dist/components/Toast/Toast.styled.js +3 -3
- package/dist/components/Toast/Toast.styled.js.map +1 -1
- package/dist/components/Toast/Toast.utils.js +4 -4
- package/dist/components/Toast/Toast.utils.js.map +1 -1
- package/dist/components/Toggle/Toggle.styled.js +20 -20
- package/dist/components/Toggle/Toggle.styled.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.styled.js +7 -7
- package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
- package/dist/foundation/Elevation/index.js +4 -4
- package/dist/foundation/Elevation/index.js.map +1 -1
- package/dist/foundation/colors/index.js +3 -2
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/theme.js +3 -2
- package/dist/theme.js.map +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +7 -7
- package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
- package/dist/types/components/Toggle/Toggle.styled.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
- package/dist/types/foundation/colors/index.d.ts +6 -6
- package/dist/types/foundation/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/theme.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Alert/Alert.styled.ts +2 -2
- package/src/components/Alert/Alert.utils.ts +12 -12
- package/src/components/Button/Button.styled.ts +34 -34
- package/src/components/Checkbox/Checkbox.tsx +4 -4
- package/src/components/Chip/Chip.styled.ts +15 -15
- package/src/components/Radio/Radio.tsx +3 -3
- package/src/components/TextField/TextField.style.ts +28 -28
- package/src/components/Toast/Toast.styled.ts +3 -3
- package/src/components/Toast/Toast.utils.ts +4 -4
- package/src/components/Toggle/Toggle.styled.ts +42 -39
- package/src/components/ToggleButton/ToggleButton.styled.ts +7 -7
- package/src/foundation/Elevation/index.ts +4 -4
- package/src/foundation/colors/index.ts +29 -26
- package/src/index.ts +1 -1
- package/src/stories/components/Alert/Alert.stories.tsx +1 -1
- package/src/stories/foundation/Typography/TypographyGroup.tsx +1 -1
- package/src/stories/foundation/colors/Colors.stories.tsx +3 -3
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +21 -19
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +6 -4
- package/src/stories/foundation/colors/styled.ts +1 -1
- package/src/theme.ts +5 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- At `repository root` location
|
|
6
6
|
- `npm i` : Install node modules and set Nx environment
|
|
7
|
-
- `nx storybook @lunit/design-system` : Runs [storybook](
|
|
7
|
+
- `nx storybook @lunit/design-system` : Runs [storybook](https://storybook.js.org) local dev server on http://localhost:6006
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>A});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var
|
|
1
|
+
(()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>A});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var l=e.n(i);const a=require("@lunit/design-system-icons/Warning16");var c=e.n(a);const d=require("@lunit/design-system-icons/Information16");var s=e.n(d);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}},g=(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}},h=(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:`${g(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}}))),k=(0,x.styled)("div")((({theme:e})=>({color:e.palette.lunit_token.core.text_normal}))),f=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),z=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",w=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",j=e=>({position:"relative",zIndex:0,backgroundColor:e}),M="8px",I=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===e&&{...t.button2,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===e&&{...t.button1,padding:`${n?w({kind:o,size:e,selected:r}):z({kind:o,size:e,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),O=({kind:e,color:o,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:M},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:M},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),C=({lunit_token:e})=>({fontWeight:"500",borderRadius:M,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:M}}),S=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:o?"0px":"large"===e?"8px":"4px"}}),$=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly"].includes(e)})((({theme:{typography:e,palette:{lunit_token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...C({lunit_token:o}),...S({size:t,hasIconOnly:i}),...I({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,lunit_token:o})}))),R=e=>{const{size:o="small",color:t="primary",icon:r,className:i,children:l,...a}=e,c=Boolean(r&&!l);return(0,n.jsx)(n.Fragment,{children:"outlined"===e.kind?(0,n.jsx)($,{...a,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:o,startIcon:r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:l})}):(0,n.jsx)($,{...a,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:o,startIcon:r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:l})})})},q={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(s(),{variant:"filled"}),warning:(0,n.jsx)(c(),{variant:"filled"}),error:(0,n.jsx)(l(),{variant:"filled"})},A=(0,m.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:l,onClose:a,...c}=e;return(0,n.jsxs)(h,{ref:o,severity:r,iconMapping:q,slots:{closeButton:()=>(0,n.jsx)(R,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:a})},onClose:a,...c,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(k,{children:i}),l&&(0,n.jsx)(f,{children:l})]})}));module.exports=o})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Alert/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,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EACX9B,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgC,OAI3B,ECjCGI,EAAc,CAClBC,SAAS,SAAC,IAAO,CAACC,QAAQ,WAC1BC,MAAM,SAAC,IAAW,CAACD,QAAQ,WAC3BE,SAAS,SAAC,IAAO,CAACF,QAAQ,WAC1BG,OAAO,SAAC,IAAK,CAACH,QAAQ,YA+BxB,GA5Bc,IAAAI,aAAuC,CAACb,EAAOc,KAC3D,MAAM,MAAEC,EAAK,SAAE9F,EAAQ,SAAEkF,EAAQ,aAAEa,EAAY,QAAEC,KAAYC,GAASlB,EACtE,OACE,UAAC5D,EAAW,CACV0E,IAAKA,EACL7F,SAAUA,EACVkG,YAAaZ,EACba,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACLzD,KAAK,QACLC,KAAK,QACLf,MAAM,YACNmD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC5D,EAAgB,UAAE4D,KAC7B,SAACtD,EAAmB,UAAE0C,IACrBa,IAAgB,SAACtD,EAAkB,UAAEsD,MAEzC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.token.component.alert_error_bg;\n default:\n return theme.palette.token.component.alert_success_bg;\n }\n};\n\nexport const getBorderColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.component.alert_info_border;\n case \"warning\":\n return theme.palette.token.component.alert_warning_border;\n case \"error\":\n return theme.palette.token.component.alert_error_border;\n default:\n return theme.palette.token.component.alert_success_border;\n }\n};\n\nexport const getIconColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.token.core.icon_info_02;\n case \"warning\":\n return theme.palette.token.core.icon_warning_02;\n case \"error\":\n return theme.palette.token.core.icon_error_02;\n default:\n return theme.palette.token.core.icon_success_02;\n }\n};\n","import {\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n styled,\n} from \"@mui/material\";\nimport type { AlertProps } from \"./Alert.types\";\nimport {\n getBorderColor,\n getBackgroundColor,\n getIconColor,\n} from \"./Alert.utils\";\n\nexport const StyledAlert = styled(MuiAlert)<AlertProps>(\n ({ severity, theme }) => ({\n \"&.MuiAlert-root\": {\n display: \"flex\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: `1px solid ${getBorderColor(theme, severity)}`,\n backgroundColor: getBackgroundColor(theme, severity),\n boxShadow: \"none\",\n },\n \"& .MuiAlert-icon\": {\n padding: \"4px\",\n marginRight: \"0\",\n fontSize: \"20px\",\n color: `${getIconColor(theme, severity)} !important`,\n },\n \"& .MuiAlert-message\": {\n width: \"100%\",\n minHeight: \"28px\",\n padding: \"4px 0 0\",\n margin: \"0 8px 0 8px\",\n },\n \"& .MuiAlert-action\": {\n margin: 0,\n padding: 0,\n },\n \"& .MuiSvgIcon-root\": {\n height: \"20px\",\n width: \"20px\",\n },\n })\n);\n\nexport const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({\n \"&.MuiAlertTitle-root\": {\n marginTop: 0,\n marginBottom: 8,\n fontWeight: 700,\n fontSize: \"14px\",\n lineHeight: \"20px\",\n color: theme.palette.token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.token.core.text_normal,\n}));\n\nexport const StyledBottomAction = styled(\"div\")({\n marginTop: \"12px\",\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n backgroundColor: token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","token","component","alert_info_bg","alert_warning_bg","alert_error_bg","alert_success_bg","getBorderColor","alert_info_border","alert_warning_border","alert_error_border","alert_success_border","getIconColor","core","icon_info_02","icon_warning_02","icon_error_02","icon_success_02","StyledAlert","styled","display","padding","borderRadius","border","backgroundColor","boxShadow","marginRight","fontSize","color","width","minHeight","margin","height","StyledAlertTitle","marginTop","marginBottom","fontWeight","lineHeight","text_normal","StyledAlertChildren","StyledBottomAction","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","position","zIndex","sizeStyle","hasIconOnly","typography","button2","minWidth","button1","kindStyle","btn_primary_text_2","btn_primary_bg","opacity","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","hover","btn_secondary_border","commonStyle","textTransform","focused","boxSizing","iconStyle","svg","CustomButton","shouldForwardProp","includes","props","icon","className","children","buttonProps","Boolean","startIcon","MAPPED_ICON","success","variant","info","warning","error","forwardRef","ref","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
|
|
1
|
+
{"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,EAAS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PO,EACJF,UAAW,GAAGF,EAAMpC,MAAQ,eAC1BsC,GAAwB,KAE1BtC,KAAMoC,EAAMpC,MAAQ,YACpBd,MAAOkD,EAAMlD,OAAS,UACtBe,KAAMA,EACNyC,UAAWL,EACX9B,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgC,OAI3B,ECjCGI,EAAc,CAClBC,SAAS,SAAC,IAAO,CAACC,QAAQ,WAC1BC,MAAM,SAAC,IAAW,CAACD,QAAQ,WAC3BE,SAAS,SAAC,IAAO,CAACF,QAAQ,WAC1BG,OAAO,SAAC,IAAK,CAACH,QAAQ,YA+BxB,GA5Bc,IAAAI,aAAuC,CAACb,EAAOc,KAC3D,MAAM,MAAEC,EAAK,SAAE9F,EAAQ,SAAEkF,EAAQ,aAAEa,EAAY,QAAEC,KAAYC,GAASlB,EACtE,OACE,UAAC5D,EAAW,CACV0E,IAAKA,EACL7F,SAAUA,EACVkG,YAAaZ,EACba,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACLzD,KAAK,QACLC,KAAK,QACLf,MAAM,YACNmD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC5D,EAAgB,UAAE4D,KAC7B,SAACtD,EAAmB,UAAE0C,IACrBa,IAAgB,SAACtD,EAAkB,UAAEsD,MAEzC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.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 minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, 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 width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { 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 from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","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","svg","CustomButton","shouldForwardProp","includes","props","icon","className","children","buttonProps","Boolean","startIcon","MAPPED_ICON","success","variant","info","warning","error","forwardRef","ref","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>m});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",d=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",c=o=>({position:"relative",zIndex:0,backgroundColor:o}),a="8px",
|
|
1
|
+
(()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>m});const n=require("react/jsx-runtime"),t=require("@mui/material/styles"),r=require("@mui/material"),i=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",d=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",c=o=>({position:"relative",zIndex:0,backgroundColor:o}),a="8px",l=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"28px",minHeight:"28px"},..."medium"===o&&{...t.button2,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"36px",minHeight:"36px"},..."large"===o&&{...t.button1,padding:`${n?d({kind:e,size:o,selected:r}):i({kind:e,size:o,selected:r})}`,minWidth:"44px",minHeight:"44px"}}),p=({kind:o,color:e,lunit_token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":c(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":c(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===o&&"error"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":c(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:"none","&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":c("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:a},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.component.btn_secondary_border}`,"&:hover":c("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:a},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),s=({lunit_token:o})=>({fontWeight:"500",borderRadius:a,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${o.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:o.core.hover,borderRadius:a}}),b=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}},svg:{width:"20px",height:"20px",margin:0,marginRight:e?"0px":"large"===o?"8px":"4px"}}),x=(0,t.styled)(r.Button,{shouldForwardProp:o=>!["kind","hasIconOnly"].includes(o)})((({theme:{typography:o,palette:{lunit_token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...s({lunit_token:e}),...b({size:t,hasIconOnly:i}),...l({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,lunit_token:e})}))),m=o=>{const{size:e="small",color:t="primary",icon:r,className:i,children:d,...c}=o,a=Boolean(r&&!d);return(0,n.jsx)(n.Fragment,{children:"outlined"===o.kind?(0,n.jsx)(x,{...c,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:e,startIcon:r,hasIconOnly:a,children:!a&&(0,n.jsx)(n.Fragment,{children:d})}):(0,n.jsx)(x,{...c,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:e,startIcon:r,hasIconOnly:a,children:!a&&(0,n.jsx)(n.Fragment,{children:d})})})};module.exports=e})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Button/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wBCAvC,EAA+BA,QAAQ,iBCahCC,EAAgC,EAC3CC,OACAC,OACAC,YAAW,KAEE,UAATD,EACc,aAATD,GAAwBE,EAE3B,UADA,UAIO,WAATD,EACc,aAATD,GAAwBE,EAE3B,WADA,WAKU,aAATF,GAAwBE,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,IAAkD,CACvEC,SAAU,WACVC,OAAQ,EACRF,oBCsBIG,EAAe,MAERC,EAAY,EACvBP,OACAD,OACAS,cACAC,aACA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2D,UAAWL,EACX9C,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgD,OAI3B,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n backgroundColor: token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: token.component.btn_primary_text_2,\n backgroundColor: token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${token.component.btn_secondary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ token }: { token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, token }),\n })\n);\n","import React from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","minHeight","button1","kindStyle","color","token","component","btn_primary_text_2","btn_primary_bg","opacity","border","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","width","height","core","hover","btn_secondary_border","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","svg","CustomButton","styled","shouldForwardProp","includes","theme","palette","props","icon","className","children","buttonProps","Boolean","startIcon"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/Button/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wBCAvC,EAA+BA,QAAQ,iBCahCC,EAAgC,EAC3CC,OACAC,OACAC,YAAW,KAEE,UAATD,EACc,aAATD,GAAwBE,EAE3B,UADA,UAIO,WAATD,EACc,aAATD,GAAwBE,EAE3B,WADA,WAKU,aAATF,GAAwBE,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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,IACPU,EACJF,UAAW,GAAGF,EAAMtD,MAAQ,eAC1BwD,GAAwB,KAE1BxD,KAAMsD,EAAMtD,MAAQ,YACpBiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN2D,UAAWL,EACX9C,YAAaA,EAAW,UAEtBA,IAAe,8BAAGgD,OAI3B,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n 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 minHeight: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n minHeight: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n minHeight: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, 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 width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n // This style was added for Mui Button Svg Icon handling\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n svg: {\n width: \"20px\",\n height: \"20px\",\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { 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 from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type { ButtonProps } from \"./Button.types\";\n\nconst Button = (props: ButtonProps) => {\n const {\n size = \"small\",\n color = \"primary\",\n icon,\n className,\n children,\n ...buttonProps\n } = props;\n const hasIconOnly = Boolean(icon && !children);\n\n return (\n <>\n {/** props.kind 사용 이유: props.color 내 타입 좁히기 활용을 위해 사용 */}\n {props.kind === \"outlined\" ? (\n <CustomButton\n {...buttonProps}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n ) : (\n <CustomButton\n {...buttonProps}\n className={`${props.kind ?? \"contained\"} ${\n className ? className : \"\"\n }`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n )}\n </>\n );\n};\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","minHeight","button1","kindStyle","color","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","height","core","hover","btn_secondary_border","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","svg","CustomButton","styled","shouldForwardProp","includes","theme","palette","props","icon","className","children","buttonProps","Boolean","startIcon"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var 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
|
|
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})();
|
|
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,EAAM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AA+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,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>M});const o=require("react/jsx-runtime"),r=require("@mui/material"),n=require("@lunit/design-system-icons/Close16");var i=e.n(n);const
|
|
1
|
+
(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>M});const o=require("react/jsx-runtime"),r=require("@mui/material"),n=require("@lunit/design-system-icons/Close16");var i=e.n(n);const l="primary",a="secondary",c="error",p="warning",s="success",u={"&.MuiChip-root":{height:"22px",width:"auto",minWidth:"22px",boxShadow:"none"},"&.Mui-disabled":{opacity:1},"& .MuiChip-label":{display:"flex",alignItems:"center",textAlign:"center",padding:0,marginInline:"8px"}},h=(e,t,o)=>{if("text"===e)switch(o){case l:return t.palette.lunit_token.component.chip_primary_text;case a:return t.palette.lunit_token.component.chip_secondary_text;case c:return t.palette.lunit_token.component.chip_error_text;case p:return t.palette.lunit_token.component.chip_warning_text;case s:return t.palette.lunit_token.component.chip_success_text;default:return t.palette.lunit_token.component.chip_primary_text}else switch(o){case l:return t.palette.lunit_token.component.chip_primary_bg;case a:return t.palette.lunit_token.component.chip_secondary_bg;case c:return t.palette.lunit_token.component.chip_error_bg;case p:return t.palette.lunit_token.component.chip_warning_bg;case s:return t.palette.lunit_token.component.chip_success_bg;default:return t.palette.lunit_token.component.chip_primary_bg}},d=(0,r.styled)(r.Chip,{shouldForwardProp:e=>!["color"].includes(e.toString())})((({theme:e,color:t})=>({...u,...e.typography.caption,color:h("text",e,t),borderColor:h("text",e,t)}))),x=(0,r.styled)(r.Chip,{shouldForwardProp:e=>!["color"].includes(e.toString())})((()=>({theme:e,color:t})=>({...u,...e.typography.caption,color:e.palette.lunit_token.core.text_normal,backgroundColor:h("bg",e,t),"& .MuiSvgIcon-root":{marginBlock:"3px",marginLeft:"3px",marginRight:"4px",height:"16px",width:"16px",color:h("text",e,t)},"& .MuiChip-avatar":{marginBlock:"3px",marginLeft:"4px",marginRight:"5px",height:"14px",width:"14px",fontSize:"11px",fontWeight:500,lineHeight:"16px",display:"flex",textAlign:"center",alignItems:"center",color:h("bg",e,t),backgroundColor:h("text",e,t)}}))),g=(0,r.styled)(x,{shouldForwardProp:e=>!["color"].includes(e.toString())})((()=>({theme:e,color:t})=>({"&.MuiChip-root":{position:"relative",left:0,right:0,zIndex:0},"&:hover":{backgroundColor:h("bg",e,t)},"&.MuiChip-root:hover::before":{position:"absolute",zIndex:-1,content:'""',top:0,left:0,right:0,bottom:0,backgroundColor:e.palette.lunit_token.core.hover,borderRadius:"11px"}}))),m=(0,r.styled)(x)((()=>({theme:e})=>({"& .MuiChip-deleteIcon":{marginLeft:"4px",marginRight:"3px"},"& .delete-icon-hover-layer":{position:"absolute",zIndex:1e3,top:0,left:"auto",right:0,bottom:0,opacity:0,color:e.palette.lunit_token.core.hover,":hover":{cursor:"pointer",opacity:1}}}))),_=e=>{const{color:t="primary",...r}=e;return(0,o.jsx)(d,{...r,variant:"outlined",disabled:!0,color:t})},b=e=>{if(e&&"string"==typeof e)return 0===e.length?(0,o.jsx)(r.Avatar,{}):(0,o.jsx)(r.Avatar,{children:e.slice(0,1).toLocaleUpperCase()})},y=e=>{if(e&&"string"!=typeof e)return e},k=(e,t)=>({marginLeft:e?"0px":"8px",marginRight:t?"0px":"8px"}),f=e=>{const{color:t="primary",thumbnail:r,sx:n,...i}=e;return(0,o.jsx)(x,{...i,disabled:!0,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)},...n}})},C=e=>{const{color:t="primary",thumbnail:r,onClick:n,sx:i,...l}=e;return(0,o.jsx)(g,{...l,onClick:n,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)}}})},v=({onClick:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i(),{}),(0,o.jsx)(i(),{className:"delete-icon-hover-layer",onClick:e})]}),j=e=>{const{color:t="primary",thumbnail:r,onDelete:n,sx:i,...l}=e;return(0,o.jsx)(m,{...l,color:t,onDelete:n,deleteIcon:(0,o.jsx)(v,{onClick:n}),avatar:b(r),icon:y(r),sx:{"& .MuiChip-label":{...k(r,Boolean(n))},...i}})},M=e=>{const{kind:t,onDelete:r,onClick:n,...i}=e;return"outlined"===t?(0,o.jsx)(_,{...e}):n?(0,o.jsx)(C,{...e}):r?(0,o.jsx)(j,{...e}):(0,o.jsx)(f,{...i})};module.exports=t})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Chip/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,iBCAvC,EAA+BA,QAAQ,sC,aCAtC,MAAMC,EACF,UADEA,EAEA,YAFAA,EAGJ,QAHIA,EAIF,UAJEA,EAKF,UCMLC,EAAgB,CACpB,iBAAkB,CAChBC,OAAQ,OACRC,MAAO,OACPC,SAAU,OACVC,UAAW,QAEb,iBAAkB,CAChBC,QAAS,GAEX,mBAAoB,CAClBC,QAAS,OACTC,WAAY,SACZC,UAAW,SACXC,QAAS,EACTC,aAAc,QAIZC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yB,GAA4B,SAAC1B,EAAY,IAAKC,IACzCkB,GAAgB,SAACD,EAAmB,IAAKjB,IACzCsB,GAAiB,SAACD,EAAsB,IAAKrB,KAE/C,SAACa,EAAqB,IAAKZ,GAAa,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close16\"","webpack://@lunit/design-system/./src/components/Chip/consts.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.styled.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.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\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close16\");","export const CHIP_COLORS = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n ERROR: \"error\",\n WARNING: \"warning\",\n SUCCESS: \"success\",\n} as const;\n","import { Chip as MuiChip, styled } from \"@mui/material\";\nimport { CHIP_COLORS } from \"./consts\";\n\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n ChipColor,\n OutlinedChipProps,\n BaseContainedChipProps,\n EnableContainedChipProps,\n} from \"./Chip.types\";\n\nconst COMMON_STYLES = {\n \"&.MuiChip-root\": {\n height: \"22px\",\n width: \"auto\",\n minWidth: \"22px\",\n boxShadow: \"none\",\n },\n \"&.Mui-disabled\": {\n opacity: 1,\n },\n \"& .MuiChip-label\": {\n display: \"flex\",\n alignItems: \"center\",\n textAlign: \"center\",\n padding: 0,\n marginInline: \"8px\",\n },\n};\n\nconst getColorToken = (\n token: \"text\" | \"bg\",\n theme: Theme,\n color?: ChipColor\n) => {\n if (token === \"text\") {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.token.component.chip_primary_text;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.token.component.chip_secondary_text;\n case CHIP_COLORS.ERROR:\n return theme.palette.token.component.chip_error_text;\n case CHIP_COLORS.WARNING:\n return theme.palette.token.component.chip_warning_text;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.token.component.chip_success_text;\n default:\n return theme.palette.token.component.chip_primary_text;\n }\n } else {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.token.component.chip_primary_bg;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.token.component.chip_secondary_bg;\n case CHIP_COLORS.ERROR:\n return theme.palette.token.component.chip_error_bg;\n case CHIP_COLORS.WARNING:\n return theme.palette.token.component.chip_warning_bg;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.token.component.chip_success_bg;\n default:\n return theme.palette.token.component.chip_primary_bg;\n }\n }\n};\n\nexport const StyledOutlinedChip = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<OutlinedChipProps>(({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: getColorToken(\"text\", theme, color),\n borderColor: getColorToken(\"text\", theme, color),\n}));\n\nexport const StyledContainedChipBase = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<BaseContainedChipProps>(() => ({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: theme.palette.token.core.text_normal,\n backgroundColor: getColorToken(\"bg\", theme, color),\n\n \"& .MuiSvgIcon-root\": {\n marginBlock: \"3px\",\n marginLeft: \"3px\",\n marginRight: \"4px\",\n height: \"16px\",\n width: \"16px\",\n color: getColorToken(\"text\", theme, color),\n },\n \"& .MuiChip-avatar\": {\n marginBlock: \"3px\",\n marginLeft: \"4px\",\n marginRight: \"5px\",\n height: \"14px\",\n width: \"14px\",\n fontSize: \"11px\",\n fontWeight: 500,\n lineHeight: \"16px\",\n display: \"flex\",\n textAlign: \"center\",\n alignItems: \"center\",\n color: getColorToken(\"bg\", theme, color),\n backgroundColor: getColorToken(\"text\", theme, color),\n },\n}));\n\nexport const StyledContainedChipEnable = styled(StyledContainedChipBase, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<EnableContainedChipProps>(() => ({ theme, color }) => ({\n /**\n * Setting the z-index of the chip to 0 and the z-index of the pseudo element to -1\n * allows the pseudo element(hover layer) to be rendered between the chip and the chip's children.\n */\n \"&.MuiChip-root\": {\n position: \"relative\",\n left: 0,\n right: 0,\n zIndex: 0,\n },\n \"&:hover\": {\n backgroundColor: getColorToken(\"bg\", theme, color),\n },\n \"&.MuiChip-root:hover::before\": {\n position: \"absolute\",\n zIndex: -1,\n content: '\"\"',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: theme.palette.token.core.hover,\n borderRadius: \"11px\",\n },\n}));\n\nexport const StyledContainedChipDeletable = styled(\n StyledContainedChipBase\n)<BaseContainedChipProps>(() => ({ theme }) => ({\n \"& .MuiChip-deleteIcon\": {\n marginLeft: \"4px\",\n marginRight: \"3px\",\n },\n\n \"& .delete-icon-hover-layer\": {\n position: \"absolute\",\n zIndex: 1000,\n top: 0,\n left: \"auto\",\n right: 0,\n bottom: 0,\n opacity: 0,\n color: theme.palette.token.core.hover,\n \":hover\": {\n cursor: \"pointer\",\n opacity: 1,\n },\n },\n}));\n","import React from \"react\";\nimport { Avatar } from \"@mui/material\";\nimport Close16 from \"@lunit/design-system-icons/Close16\";\nimport {\n StyledOutlinedChip,\n StyledContainedChipBase,\n StyledContainedChipEnable,\n StyledContainedChipDeletable,\n} from \"./Chip.styled\";\n\nimport type {\n OutlinedChipProps,\n ReadOnlyContainedChipProps,\n EnableContainedChipProps,\n DeletableContainedChipProps,\n ChipProps,\n ChipThumbnail,\n} from \"./Chip.types\";\n\nconst Chip = (props: ChipProps) => {\n const { kind, onDelete, onClick, ...restProps } = props;\n if (kind === \"outlined\") return <OutlinedChip {...props} />;\n else if (onClick) return <EnableContainedChip {...props} />;\n else if (onDelete) return <DeletableContainedChip {...props} />;\n\n return <ReadOnlyContainedChip {...restProps} />;\n};\n\nconst OutlinedChip = (props: OutlinedChipProps) => {\n const { color = \"primary\", ...restProps } = props;\n\n return (\n <StyledOutlinedChip\n {...restProps}\n variant=\"outlined\"\n disabled\n color={color}\n />\n );\n};\n\n/**\n * Conditional styling for contained chip\n */\nconst getAvatar = (thumbnail: ChipThumbnail | undefined) => {\n if (!thumbnail || typeof thumbnail !== \"string\") return;\n if (thumbnail.length === 0) return <Avatar />;\n return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>;\n};\nconst getIcon = (thumbnail: ChipThumbnail | undefined) => {\n if (thumbnail && typeof thumbnail !== \"string\") return thumbnail;\n return undefined;\n};\nconst getLabelMargin = (\n thumbnail: ChipThumbnail | undefined,\n deletable?: boolean\n) => {\n return {\n marginLeft: thumbnail ? \"0px\" : \"8px\",\n marginRight: deletable ? \"0px\" : \"8px\",\n };\n};\n\nconst ReadOnlyContainedChip = (props: ReadOnlyContainedChipProps) => {\n const { color = \"primary\", thumbnail, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipBase\n {...restProps}\n disabled\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n ...sx,\n }}\n />\n );\n};\n\nconst EnableContainedChip = (props: EnableContainedChipProps) => {\n const { color = \"primary\", thumbnail, onClick, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipEnable\n {...restProps}\n onClick={onClick}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n }}\n />\n );\n};\n\nconst DeleteIconWithHoverLayer = ({ onClick }: { onClick: () => void }) => {\n return (\n <>\n <Close16 />\n <Close16 className=\"delete-icon-hover-layer\" onClick={onClick} />\n </>\n );\n};\nconst DeletableContainedChip = (props: DeletableContainedChipProps) => {\n const { color = \"primary\", thumbnail, onDelete, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipDeletable\n {...restProps}\n color={color}\n onDelete={onDelete}\n deleteIcon={<DeleteIconWithHoverLayer onClick={onDelete} />}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail, Boolean(onDelete)),\n },\n ...sx,\n }}\n />\n );\n};\n\nexport default Chip;\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","CHIP_COLORS","COMMON_STYLES","height","width","minWidth","boxShadow","opacity","display","alignItems","textAlign","padding","marginInline","getColorToken","token","theme","color","palette","component","chip_primary_text","chip_secondary_text","chip_error_text","chip_warning_text","chip_success_text","chip_primary_bg","chip_secondary_bg","chip_error_bg","chip_warning_bg","chip_success_bg","StyledOutlinedChip","styled","shouldForwardProp","includes","toString","typography","caption","borderColor","StyledContainedChipBase","core","text_normal","backgroundColor","marginBlock","marginLeft","marginRight","fontSize","fontWeight","lineHeight","StyledContainedChipEnable","position","left","right","zIndex","content","top","bottom","hover","borderRadius","StyledContainedChipDeletable","cursor","OutlinedChip","props","restProps","variant","disabled","getAvatar","thumbnail","length","Avatar","slice","toLocaleUpperCase","getIcon","getLabelMargin","deletable","ReadOnlyContainedChip","sx","avatar","icon","EnableContainedChip","onClick","DeleteIconWithHoverLayer","className","DeletableContainedChip","onDelete","deleteIcon","Boolean","kind"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/Chip/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,iBCAvC,EAA+BA,QAAQ,sC,aCAtC,MAAMC,EACF,UADEA,EAEA,YAFAA,EAGJ,QAHIA,EAIF,UAJEA,EAKF,UCM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,OAAQX,EAAUC,GAClBW,KAAMN,EAAQL,GACdS,GAAI,CACF,mBAAoB,IACfH,EAAeN,EAAWmB,QAAQF,QAEpCR,IAGR,EAGH,EAhHcd,IACZ,MAAM,KAAEyB,EAAI,SAAEH,EAAQ,QAAEJ,KAAYjB,GAAcD,EAClD,MAAa,aAATyB,GAA4B,SAAC1B,EAAY,IAAKC,IACzCkB,GAAgB,SAACD,EAAmB,IAAKjB,IACzCsB,GAAiB,SAACD,EAAsB,IAAKrB,KAE/C,SAACa,EAAqB,IAAKZ,GAAa,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close16\"","webpack://@lunit/design-system/./src/components/Chip/consts.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.styled.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.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\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close16\");","export const CHIP_COLORS = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n ERROR: \"error\",\n WARNING: \"warning\",\n SUCCESS: \"success\",\n} as const;\n","import { Chip as MuiChip, styled } from \"@mui/material\";\nimport { CHIP_COLORS } from \"./consts\";\n\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n ChipColor,\n OutlinedChipProps,\n BaseContainedChipProps,\n EnableContainedChipProps,\n} from \"./Chip.types\";\n\nconst COMMON_STYLES = {\n \"&.MuiChip-root\": {\n height: \"22px\",\n width: \"auto\",\n minWidth: \"22px\",\n boxShadow: \"none\",\n },\n \"&.Mui-disabled\": {\n opacity: 1,\n },\n \"& .MuiChip-label\": {\n display: \"flex\",\n alignItems: \"center\",\n textAlign: \"center\",\n padding: 0,\n marginInline: \"8px\",\n },\n};\n\nconst getColorToken = (\n token: \"text\" | \"bg\",\n theme: Theme,\n color?: ChipColor\n) => {\n if (token === \"text\") {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_text;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_text;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_text;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_text;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_text;\n default:\n return theme.palette.lunit_token.component.chip_primary_text;\n }\n } else {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_bg;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_bg;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_bg;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_bg;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_bg;\n default:\n return theme.palette.lunit_token.component.chip_primary_bg;\n }\n }\n};\n\nexport const StyledOutlinedChip = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<OutlinedChipProps>(({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: getColorToken(\"text\", theme, color),\n borderColor: getColorToken(\"text\", theme, color),\n}));\n\nexport const StyledContainedChipBase = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<BaseContainedChipProps>(() => ({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: theme.palette.lunit_token.core.text_normal,\n backgroundColor: getColorToken(\"bg\", theme, color),\n\n \"& .MuiSvgIcon-root\": {\n marginBlock: \"3px\",\n marginLeft: \"3px\",\n marginRight: \"4px\",\n height: \"16px\",\n width: \"16px\",\n color: getColorToken(\"text\", theme, color),\n },\n \"& .MuiChip-avatar\": {\n marginBlock: \"3px\",\n marginLeft: \"4px\",\n marginRight: \"5px\",\n height: \"14px\",\n width: \"14px\",\n fontSize: \"11px\",\n fontWeight: 500,\n lineHeight: \"16px\",\n display: \"flex\",\n textAlign: \"center\",\n alignItems: \"center\",\n color: getColorToken(\"bg\", theme, color),\n backgroundColor: getColorToken(\"text\", theme, color),\n },\n}));\n\nexport const StyledContainedChipEnable = styled(StyledContainedChipBase, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<EnableContainedChipProps>(() => ({ theme, color }) => ({\n /**\n * Setting the z-index of the chip to 0 and the z-index of the pseudo element to -1\n * allows the pseudo element(hover layer) to be rendered between the chip and the chip's children.\n */\n \"&.MuiChip-root\": {\n position: \"relative\",\n left: 0,\n right: 0,\n zIndex: 0,\n },\n \"&:hover\": {\n backgroundColor: getColorToken(\"bg\", theme, color),\n },\n \"&.MuiChip-root:hover::before\": {\n position: \"absolute\",\n zIndex: -1,\n content: '\"\"',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: theme.palette.lunit_token.core.hover,\n borderRadius: \"11px\",\n },\n}));\n\nexport const StyledContainedChipDeletable = styled(\n StyledContainedChipBase\n)<BaseContainedChipProps>(() => ({ theme }) => ({\n \"& .MuiChip-deleteIcon\": {\n marginLeft: \"4px\",\n marginRight: \"3px\",\n },\n\n \"& .delete-icon-hover-layer\": {\n position: \"absolute\",\n zIndex: 1000,\n top: 0,\n left: \"auto\",\n right: 0,\n bottom: 0,\n opacity: 0,\n color: theme.palette.lunit_token.core.hover,\n \":hover\": {\n cursor: \"pointer\",\n opacity: 1,\n },\n },\n}));\n","import React from \"react\";\nimport { Avatar } from \"@mui/material\";\nimport Close16 from \"@lunit/design-system-icons/Close16\";\nimport {\n StyledOutlinedChip,\n StyledContainedChipBase,\n StyledContainedChipEnable,\n StyledContainedChipDeletable,\n} from \"./Chip.styled\";\n\nimport type {\n OutlinedChipProps,\n ReadOnlyContainedChipProps,\n EnableContainedChipProps,\n DeletableContainedChipProps,\n ChipProps,\n ChipThumbnail,\n} from \"./Chip.types\";\n\nconst Chip = (props: ChipProps) => {\n const { kind, onDelete, onClick, ...restProps } = props;\n if (kind === \"outlined\") return <OutlinedChip {...props} />;\n else if (onClick) return <EnableContainedChip {...props} />;\n else if (onDelete) return <DeletableContainedChip {...props} />;\n\n return <ReadOnlyContainedChip {...restProps} />;\n};\n\nconst OutlinedChip = (props: OutlinedChipProps) => {\n const { color = \"primary\", ...restProps } = props;\n\n return (\n <StyledOutlinedChip\n {...restProps}\n variant=\"outlined\"\n disabled\n color={color}\n />\n );\n};\n\n/**\n * Conditional styling for contained chip\n */\nconst getAvatar = (thumbnail: ChipThumbnail | undefined) => {\n if (!thumbnail || typeof thumbnail !== \"string\") return;\n if (thumbnail.length === 0) return <Avatar />;\n return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>;\n};\nconst getIcon = (thumbnail: ChipThumbnail | undefined) => {\n if (thumbnail && typeof thumbnail !== \"string\") return thumbnail;\n return undefined;\n};\nconst getLabelMargin = (\n thumbnail: ChipThumbnail | undefined,\n deletable?: boolean\n) => {\n return {\n marginLeft: thumbnail ? \"0px\" : \"8px\",\n marginRight: deletable ? \"0px\" : \"8px\",\n };\n};\n\nconst ReadOnlyContainedChip = (props: ReadOnlyContainedChipProps) => {\n const { color = \"primary\", thumbnail, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipBase\n {...restProps}\n disabled\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n ...sx,\n }}\n />\n );\n};\n\nconst EnableContainedChip = (props: EnableContainedChipProps) => {\n const { color = \"primary\", thumbnail, onClick, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipEnable\n {...restProps}\n onClick={onClick}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n }}\n />\n );\n};\n\nconst DeleteIconWithHoverLayer = ({ onClick }: { onClick: () => void }) => {\n return (\n <>\n <Close16 />\n <Close16 className=\"delete-icon-hover-layer\" onClick={onClick} />\n </>\n );\n};\nconst DeletableContainedChip = (props: DeletableContainedChipProps) => {\n const { color = \"primary\", thumbnail, onDelete, sx, ...restProps } = props;\n\n return (\n <StyledContainedChipDeletable\n {...restProps}\n color={color}\n onDelete={onDelete}\n deleteIcon={<DeleteIconWithHoverLayer onClick={onDelete} />}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail, Boolean(onDelete)),\n },\n ...sx,\n }}\n />\n );\n};\n\nexport default Chip;\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","CHIP_COLORS","COMMON_STYLES","height","width","minWidth","boxShadow","opacity","display","alignItems","textAlign","padding","marginInline","getColorToken","token","theme","color","palette","lunit_token","component","chip_primary_text","chip_secondary_text","chip_error_text","chip_warning_text","chip_success_text","chip_primary_bg","chip_secondary_bg","chip_error_bg","chip_warning_bg","chip_success_bg","StyledOutlinedChip","styled","shouldForwardProp","includes","toString","typography","caption","borderColor","StyledContainedChipBase","core","text_normal","backgroundColor","marginBlock","marginLeft","marginRight","fontSize","fontWeight","lineHeight","StyledContainedChipEnable","position","left","right","zIndex","content","top","bottom","hover","borderRadius","StyledContainedChipDeletable","cursor","OutlinedChip","props","restProps","variant","disabled","getAvatar","thumbnail","length","Avatar","slice","toLocaleUpperCase","getIcon","getLabelMargin","deletable","ReadOnlyContainedChip","sx","avatar","icon","EnableContainedChip","onClick","DeleteIconWithHoverLayer","className","DeletableContainedChip","onDelete","deleteIcon","Boolean","kind"],"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:()=>u});const o=require("react/jsx-runtime"),l=require("@mui/material/styles"),r=require("@mui/material/Radio");var a=e.n(r);const s=(0,l.styled)(a())((({theme:e})=>({padding:0,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",display:"block",width:24,height:24,backgroundColor:e.palette.
|
|
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:()=>u});const o=require("react/jsx-runtime"),l=require("@mui/material/styles"),r=require("@mui/material/Radio");var a=e.n(r);const s=(0,l.styled)(a())((({theme:e})=>({padding:0,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",display:"block",width:24,height:24,backgroundColor:e.palette.lunit_token.core.focused,maskImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z' /%3E%3C/svg%3E\")"}}))),d={width:20,height:20},i=(0,l.styled)("span")((({theme:e})=>({...d,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 20 20'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5ZM10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19Z' /%3E%3C/svg%3E\")"}))),n=(0,l.styled)("span")((({theme:e})=>({...d,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 20 20'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5C7.23858 5 5 7.23858 5 10C5 12.7614 7.23858 15 10 15ZM10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19Z' /%3E%3C/svg%3E\")"}))),u=e=>(0,o.jsx)(s,{disableRipple:!0,icon:(0,o.jsx)(i,{}),checkedIcon:(0,o.jsx)(n,{}),...e});module.exports=t})();
|
|
2
2
|
//# sourceMappingURL=index.js.map
|