@lunit/design-system 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +107 -7
  2. package/dist/cjs/components/Alert/index.js +1 -1
  3. package/dist/cjs/components/Alert/index.js.map +1 -1
  4. package/dist/cjs/components/Button/index.js +1 -1
  5. package/dist/cjs/components/Button/index.js.map +1 -1
  6. package/dist/cjs/components/Checkbox/index.js +1 -1
  7. package/dist/cjs/components/Checkbox/index.js.map +1 -1
  8. package/dist/cjs/components/Chip/index.js +1 -1
  9. package/dist/cjs/components/Chip/index.js.map +1 -1
  10. package/dist/cjs/components/DataTable/index.js.map +1 -1
  11. package/dist/cjs/components/DatePicker/index.js.map +1 -1
  12. package/dist/cjs/components/Dialog/index.js +1 -1
  13. package/dist/cjs/components/Dialog/index.js.map +1 -1
  14. package/dist/cjs/components/Dropdown/index.js +1 -1
  15. package/dist/cjs/components/Dropdown/index.js.map +1 -1
  16. package/dist/cjs/components/FormLabel/index.js +1 -1
  17. package/dist/cjs/components/FormLabel/index.js.map +1 -1
  18. package/dist/cjs/components/Radio/index.js +1 -1
  19. package/dist/cjs/components/Radio/index.js.map +1 -1
  20. package/dist/cjs/components/RadioGroup/index.js.map +1 -1
  21. package/dist/cjs/components/TextField/index.js +1 -1
  22. package/dist/cjs/components/TextField/index.js.map +1 -1
  23. package/dist/cjs/components/Toggle/index.js +1 -1
  24. package/dist/cjs/components/Toggle/index.js.map +1 -1
  25. package/dist/cjs/components/ToggleButton/index.js +1 -1
  26. package/dist/cjs/components/ToggleButton/index.js.map +1 -1
  27. package/dist/cjs/components/Tooltip/index.js.map +1 -1
  28. package/dist/cjs/components/Typography/index.js.map +1 -1
  29. package/dist/cjs/index.js +1 -1
  30. package/dist/cjs/index.js.map +1 -1
  31. package/dist/components/Chip/Chip.styled.js +9 -16
  32. package/dist/components/Chip/Chip.styled.js.map +1 -1
  33. package/dist/components/Dialog/Dialog.js +0 -6
  34. package/dist/components/Dialog/Dialog.js.map +1 -1
  35. package/dist/components/Dropdown/Dropdown.js +37 -4
  36. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  37. package/dist/components/Dropdown/Dropdown.styled.js +161 -0
  38. package/dist/components/Dropdown/Dropdown.styled.js.map +1 -0
  39. package/dist/components/Dropdown/Dropdown.types.js +2 -0
  40. package/dist/components/Dropdown/Dropdown.types.js.map +1 -0
  41. package/dist/components/Dropdown/DropdownItem.js +36 -0
  42. package/dist/components/Dropdown/DropdownItem.js.map +1 -0
  43. package/dist/components/Dropdown/index.js +1 -0
  44. package/dist/components/Dropdown/index.js.map +1 -1
  45. package/dist/components/TextField/TextField.js +1 -1
  46. package/dist/components/TextField/TextField.js.map +1 -1
  47. package/dist/components/TextField/TextField.style.js +27 -3
  48. package/dist/components/TextField/TextField.style.js.map +1 -1
  49. package/dist/foundation/Typography/index.js +5 -0
  50. package/dist/foundation/Typography/index.js.map +1 -1
  51. package/dist/foundation/Typography/tokens.js +44 -0
  52. package/dist/foundation/Typography/tokens.js.map +1 -1
  53. package/dist/foundation/colors/base/blue.js +12 -10
  54. package/dist/foundation/colors/base/blue.js.map +1 -1
  55. package/dist/foundation/colors/base/green.js +11 -9
  56. package/dist/foundation/colors/base/green.js.map +1 -1
  57. package/dist/foundation/colors/base/grey.js +30 -15
  58. package/dist/foundation/colors/base/grey.js.map +1 -1
  59. package/dist/foundation/colors/base/lunitTeal.js +2 -0
  60. package/dist/foundation/colors/base/lunitTeal.js.map +1 -1
  61. package/dist/foundation/colors/base/magenta.js +3 -1
  62. package/dist/foundation/colors/base/magenta.js.map +1 -1
  63. package/dist/foundation/colors/base/orange.js +11 -9
  64. package/dist/foundation/colors/base/orange.js.map +1 -1
  65. package/dist/foundation/colors/base/purple.js +3 -1
  66. package/dist/foundation/colors/base/purple.js.map +1 -1
  67. package/dist/foundation/colors/base/red.js +5 -3
  68. package/dist/foundation/colors/base/red.js.map +1 -1
  69. package/dist/foundation/colors/base/yellow.js +12 -10
  70. package/dist/foundation/colors/base/yellow.js.map +1 -1
  71. package/dist/foundation/colors/index.js +3 -0
  72. package/dist/foundation/colors/index.js.map +1 -1
  73. package/dist/foundation/colors/token/component.js +26 -22
  74. package/dist/foundation/colors/token/component.js.map +1 -1
  75. package/dist/foundation/colors/token/core.js +21 -0
  76. package/dist/foundation/colors/token/core.js.map +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/index.js.map +1 -1
  79. package/dist/types/components/Button/Button.styled.d.ts +35 -50
  80. package/dist/types/components/Chip/Chip.styled.d.ts +4 -76
  81. package/dist/types/components/Chip/Chip.types.d.ts +1 -1
  82. package/dist/types/components/Dialog/Dialog.d.ts +0 -3
  83. package/dist/types/components/Dropdown/Dropdown.d.ts +3 -1
  84. package/dist/types/components/Dropdown/Dropdown.styled.d.ts +7 -0
  85. package/dist/types/components/Dropdown/Dropdown.types.d.ts +11 -0
  86. package/dist/types/components/Dropdown/DropdownItem.d.ts +13 -0
  87. package/dist/types/components/Dropdown/index.d.ts +2 -0
  88. package/dist/types/components/TextField/TextField.types.d.ts +1 -1
  89. package/dist/types/components/TextField/TextFieldIcon.d.ts +1 -1
  90. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +1 -32
  91. package/dist/types/components/Typography/Typography.d.ts +1 -1
  92. package/dist/types/foundation/Typography/index.d.ts +21 -1
  93. package/dist/types/foundation/Typography/tokens.d.ts +15 -0
  94. package/dist/types/foundation/colors/base/blue.d.ts +2 -0
  95. package/dist/types/foundation/colors/base/green.d.ts +2 -0
  96. package/dist/types/foundation/colors/base/grey.d.ts +15 -0
  97. package/dist/types/foundation/colors/base/lunitTeal.d.ts +2 -0
  98. package/dist/types/foundation/colors/base/magenta.d.ts +2 -0
  99. package/dist/types/foundation/colors/base/orange.d.ts +2 -0
  100. package/dist/types/foundation/colors/base/purple.d.ts +2 -0
  101. package/dist/types/foundation/colors/base/red.d.ts +2 -0
  102. package/dist/types/foundation/colors/base/yellow.d.ts +2 -0
  103. package/dist/types/foundation/colors/index.d.ts +3 -0
  104. package/dist/types/foundation/colors/types.d.ts +3 -0
  105. package/dist/types/foundation/index.d.ts +3 -0
  106. package/dist/types/index.d.ts +1 -1
  107. package/package.json +20 -22
  108. package/src/components/Chip/Chip.styled.ts +9 -16
  109. package/src/components/Chip/Chip.types.ts +2 -0
  110. package/src/components/Dialog/Dialog.tsx +0 -8
  111. package/src/components/Dropdown/Dropdown.styled.tsx +170 -0
  112. package/src/components/Dropdown/Dropdown.tsx +59 -8
  113. package/src/components/Dropdown/Dropdown.types.ts +17 -0
  114. package/src/components/Dropdown/DropdownItem.tsx +107 -0
  115. package/src/components/Dropdown/index.ts +6 -0
  116. package/src/components/TextField/TextField.style.ts +28 -3
  117. package/src/components/TextField/TextField.tsx +1 -7
  118. package/src/components/TextField/TextField.types.ts +2 -0
  119. package/src/components/TextField/TextFieldIcon.tsx +1 -1
  120. package/src/foundation/Typography/index.ts +10 -0
  121. package/src/foundation/Typography/tokens.ts +45 -0
  122. package/src/foundation/colors/base/blue.ts +12 -10
  123. package/src/foundation/colors/base/green.ts +11 -9
  124. package/src/foundation/colors/base/grey.ts +30 -15
  125. package/src/foundation/colors/base/lunitTeal.ts +2 -0
  126. package/src/foundation/colors/base/magenta.ts +3 -1
  127. package/src/foundation/colors/base/orange.ts +11 -9
  128. package/src/foundation/colors/base/purple.ts +3 -1
  129. package/src/foundation/colors/base/red.ts +5 -3
  130. package/src/foundation/colors/base/yellow.ts +12 -10
  131. package/src/foundation/colors/index.ts +3 -0
  132. package/src/foundation/colors/token/component.ts +26 -22
  133. package/src/foundation/colors/token/core.ts +21 -0
  134. package/src/foundation/colors/types.ts +3 -0
  135. package/src/index.ts +6 -1
  136. package/src/stories/GettingStarted.mdx +10 -16
  137. package/src/stories/components/Alert/Alert.stories.tsx +3 -3
  138. package/src/stories/components/Button/BasicButton.stories.tsx +2 -2
  139. package/src/stories/components/Button/ButtonDocs.mdx +1 -1
  140. package/src/stories/components/Button/Color.stories.tsx +2 -2
  141. package/src/stories/components/Button/IconButton.stories.tsx +2 -2
  142. package/src/stories/components/Button/Kind.stories.tsx +2 -2
  143. package/src/stories/components/CheckBox/BasicCheckbox.stories.tsx +2 -2
  144. package/src/stories/components/CheckBox/CheckboxDocs.mdx +1 -1
  145. package/src/stories/components/Chip/Chip.stories.tsx +20 -2
  146. package/src/stories/components/Chip/ChipDocs.mdx +21 -1
  147. package/src/stories/components/DataTable/DataTable.stories.tsx +1 -1
  148. package/src/stories/components/DatePicker/DatePicker.stories.tsx +1 -1
  149. package/src/stories/components/Dialog/Dialog.stories.tsx +19 -8
  150. package/src/stories/components/Dialog/DialogDocs.mdx +3 -11
  151. package/src/stories/components/Dropdown/Dropdown.stories.tsx +299 -10
  152. package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +221 -0
  153. package/src/stories/components/Dropdown/DropdownItem.stories.tsx +360 -0
  154. package/src/stories/components/SelectControl/RadioGroup.stories.tsx +1 -1
  155. package/src/stories/components/SelectControl/RadioStatus.stories.tsx +1 -1
  156. package/src/stories/components/SelectControl/Toggle.stories.tsx +2 -2
  157. package/src/stories/components/TextField/BasicTextField.stories.tsx +37 -16
  158. package/src/stories/components/TextField/TextFieldDocs.mdx +13 -1
  159. package/src/stories/components/TextField/TextFieldMulti.stories.tsx +8 -11
  160. package/src/stories/components/TextField/TextFieldSingle.stories.tsx +8 -11
  161. package/src/stories/components/TextField/TextFieldSize.stories.tsx +7 -8
  162. package/src/stories/components/Toast/Toast.stories.tsx +8 -3
  163. package/src/stories/components/ToggleButton/Basic.stories.tsx +152 -113
  164. package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +1 -1
  165. package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +5 -5
  166. package/src/stories/components/ToggleButton/WithIcon.stories.tsx +2 -2
  167. package/src/stories/components/Tooltip/Tooltip.stories.tsx +1 -1
  168. package/src/stories/foundation/Elevation/Elevation.stories.tsx +1 -20
  169. package/src/stories/foundation/Typography/Typography.mdx +1 -1
  170. package/src/stories/foundation/Typography/Typography.stories.tsx +14 -1
  171. package/src/stories/foundation/Typography/const.ts +6 -1
  172. package/src/stories/foundation/colors/Colors.stories.tsx +2 -2
  173. package/src/stories/foundation/colors/Docs.mdx +1 -1
  174. package/src/stories/foundation/colors/Mui.stories.tsx +1 -1
  175. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +1 -1
  176. package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +1 -1
  177. package/src/stories/foundation/colors/TokenPaletteTable.tsx +19 -1
  178. package/tsconfig.json +0 -1
  179. package/dist/cjs/components/Modal/index.js +0 -2
  180. package/dist/cjs/components/Modal/index.js.map +0 -1
  181. package/dist/components/Modal/Modal.js +0 -7
  182. package/dist/components/Modal/Modal.js.map +0 -1
  183. package/dist/components/Modal/index.js +0 -2
  184. package/dist/components/Modal/index.js.map +0 -1
  185. package/dist/types/components/Modal/Modal.d.ts +0 -2
  186. package/dist/types/components/Modal/index.d.ts +0 -1
  187. package/src/stories/components/ToggleButton/Group.stories.tsx +0 -221
package/README.md CHANGED
@@ -1,17 +1,117 @@
1
1
  # Lunit Design System
2
2
 
3
+ ## Introduction
4
+
5
+ Lunit Design System Library is a collection of reusable components and styles that are used to build Lunit's products.<br />
6
+ It is built on top of Material UI, a popular React UI framework.
7
+
8
+ - [Design System Component Storybook](https://main--62d7d1f2efc8a1e364b5e5e8.chromatic.com/?path=/docs/getting-started-overview--docs)
9
+ - [Design System Figma](https://www.figma.com/design/9CoirIDPof6exynJosiGXi/Design-System_2.0.0_Latest?node-id=0-1&p=f&m=dev)
10
+
11
+ ## Installation
12
+
13
+ Currently, the design system only supports material ui v5, so you need to install those versions.
14
+
15
+ ```bash
16
+ npm install @emotion/react@11.14.0 @emotion/styled@11.11.0 @mui/material@5.18.0 @lunit/design-system
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ### 1. Setting Provider
22
+
23
+ ```tsx
24
+ import {
25
+ createTheme,
26
+ ThemeProvider as MuiThemeProvider,
27
+ } from "@mui/material/styles";
28
+ import { deepmerge } from "@mui/utils";
29
+ import CssBaseline from "@mui/material/CssBaseline";
30
+ import { themeOptions } from "@lunit/design-system";
31
+
32
+ const theme = createTheme(
33
+ deepmerge(themeOptions, {
34
+ typography: {
35
+ fontFamily: ["Pretendard Variable"],
36
+ },
37
+ })
38
+ );
39
+
40
+ function ThemeProvider({ children }: { children: React.ReactNode }) {
41
+ return (
42
+ <MuiThemeProvider theme={theme}>
43
+ <CssBaseline />
44
+ {children}
45
+ </MuiThemeProvider>
46
+ );
47
+ }
48
+
49
+ function App() {
50
+ return (
51
+ <ThemeProvider>
52
+ <YourApp />
53
+ </ThemeProvider>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ### 2. Setting Pretendard Font
59
+
60
+ #### React App with vite
61
+
62
+ Download the PretendardVariable.woff2 font in [Pretendard GitHub](https://github.com/orioncactus/pretendard?tab=readme-ov-file#%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C) and place it in your css file.
63
+
64
+ ```css
65
+ @font-face {
66
+ font-family: "Pretendard Variable";
67
+ src: url("./assets/fonts/PretendardVariable.woff2") format("woff2");
68
+ }
69
+ ```
70
+
71
+ #### Next App
72
+
73
+ Apply the Pretendard font using NextFont in the Provider.
74
+
75
+ ```tsx
76
+ import localFont from "next/font/local";
77
+
78
+ const pretendard = localFont({
79
+ src: "./fonts/PretendardVariable.woff2",
80
+ });
81
+
82
+ const theme = createTheme(
83
+ deepmerge(themeOptions, {
84
+ typography: {
85
+ fontFamily: [pretendard.style.fontFamily, "Pretendard Variable"],
86
+ },
87
+ })
88
+ );
89
+ ```
90
+
91
+ #### Setting Theme color
92
+
93
+ The color token in the design system shows different colors depending on the theme you have set up.<br />
94
+ Here's how to set the color theme.
95
+
96
+ > Note: If you don't set a theme, the `Dark 1 theme` is applied,<br />
97
+ > and the text may not be visible if the background is white. <br />
98
+ > You can fix this by modifying the theme. Please refer to the guide below
99
+
100
+ - [how to set themes of lunit design system docs](https://main--62d7d1f2efc8a1e364b5e5e8.chromatic.com/?path=/docs/foundation-colors--docs#how-to-set-themes)
101
+
3
102
  ## Development
4
103
 
5
104
  - At `repository root` location
6
105
  - `npm i` : Install node modules and set Nx environment
7
- - `nx storybook @lunit/design-system` : Runs [storybook](https://storybook.js.org) local dev server on http://localhost:6006
8
-
9
- ## Usage
106
+ - `npm run storybook:design-system` : Runs [storybook](https://storybook.js.org) local dev server on http://localhost:6006
10
107
 
11
108
  ### Create Story
12
109
 
13
- A story is simply a case in which one component is executable.
14
- You can browse the stories in the UI and see the code behind them in files that end with `.stories.js(jsx)` or `.stories.ts(tsx)`.
110
+ A story is simply a case in which one component is executable.<br />
111
+ You can browse the stories in the UI and see the code behind them in files<br />
112
+ that end with `.stories.js(jsx)` or `.stories.ts(tsx)`.
113
+
114
+ - [Writing stories Docs](https://storybook.js.org/docs/react/writing-stories/introductio)
15
115
 
16
116
  ```jsx
17
117
  // Button.stories.js|jsx
@@ -29,6 +129,6 @@ export default {
29
129
  export const Primary = () => <Button primary>Button</Button>;
30
130
  ```
31
131
 
32
- ### Documentation
132
+ ## Deployment
33
133
 
34
- Documentation can be found [Storybook's docs site](https://storybook.js.org/docs/react/writing-stories/introduction).
134
+ - [@lunit/design-system npm publish docs](https://lunit.atlassian.net/wiki/x/FoKe8)
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>B});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var a=e.n(i);const l=require("@lunit/design-system-icons/Warning16");var c=e.n(l);const s=require("@lunit/design-system-icons/Information16");var d=e.n(s);const p=require("@lunit/design-system-icons/Close");var u=e.n(p);const m=require("react"),x=require("@mui/material"),_=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_bg;case"warning":return e.palette.lunit_token.component.alert_warning_bg;case"error":return e.palette.lunit_token.component.alert_error_bg;default:return e.palette.lunit_token.component.alert_success_bg}},b=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_border;case"warning":return e.palette.lunit_token.component.alert_warning_border;case"error":return e.palette.lunit_token.component.alert_error_border;default:return e.palette.lunit_token.component.alert_success_border}},h=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.core.icon_info_02;case"warning":return e.palette.lunit_token.core.icon_warning_02;case"error":return e.palette.lunit_token.core.icon_error_02;default:return e.palette.lunit_token.core.icon_success_02}},g=(0,x.styled)(x.Alert)((({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${b(o,e)}`,backgroundColor:_(o,e),boxShadow:"none"},"& .MuiAlert-icon":{padding:"4px",marginRight:"0",fontSize:"20px",color:`${h(o,e)} !important`},"& .MuiAlert-message":{width:"100%",minHeight:"28px",padding:"4px 0 0",margin:"0 8px 0 8px"},"& .MuiAlert-action":{margin:0,padding:0},"& .MuiSvgIcon-root":{height:"20px",width:"20px"}}))),y=(0,x.styled)(x.AlertTitle)((({theme:e})=>({"&.MuiAlertTitle-root":{marginTop:0,marginBottom:8,fontWeight:700,fontSize:"14px",lineHeight:"20px",color:e.palette.lunit_token.core.text_normal}}))),f=(0,x.styled)("div")((({theme:e})=>({color:e.palette.lunit_token.core.text_normal}))),k=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),I=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",z=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",j=e=>({position:"relative",zIndex:0,backgroundColor:e}),w="8px",M=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...t.button1,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"44px",height:"44px"}}),O=({kind:e,color:o,lunit_token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":j(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":j(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":j(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_error_text,"&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:`1px solid ${n.core.border_medium}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),R=({lunit_token:e})=>({fontWeight:"500",borderRadius:w,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:w}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),S=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})((({theme:{typography:e,palette:{lunit_token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...R({lunit_token:o}),...C({size:t,hasIconOnly:i}),...M({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,lunit_token:o})}))),$=(0,m.forwardRef)(((e,o)=>{const{kind:t,variant:r,icon:i,children:a,startIcon:l}=e,c=Boolean((l||i)&&!a);return"outlined"===t||"outlined"===r?(0,n.jsx)(A,{...e,ref:o,hasIconOnly:c}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(q,{...e,ref:o,hasIconOnly:c}):(0,n.jsx)(T,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:c})})),q=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`ghost ${i||""}`,kind:"ghost",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),A=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),T=(0,m.forwardRef)(((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})})),N=$,W={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(d(),{variant:"filled"}),warning:(0,n.jsx)(c(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},B=(0,m.forwardRef)(((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:l,...c}=e;return(0,n.jsxs)(g,{ref:o,severity:r,iconMapping:W,slots:{closeButton:()=>(0,n.jsx)(N,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:l})},onClose:l,...c,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(f,{children:i}),a&&(0,n.jsx)(k,{children:a})]})}));module.exports=o})();
1
+ (()=>{"use strict";var e={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return e.d(n,{a:n}),n},d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>B});const n=require("react/jsx-runtime"),t=require("@lunit/design-system-icons/Success16");var r=e.n(t);const i=require("@lunit/design-system-icons/Error16");var a=e.n(i);const l=require("@lunit/design-system-icons/Warning16");var c=e.n(l);const s=require("@lunit/design-system-icons/Information16");var d=e.n(s);const p=require("@lunit/design-system-icons/Close");var u=e.n(p);const m=require("react"),x=require("@mui/material"),_=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_bg;case"warning":return e.palette.lunit_token.component.alert_warning_bg;case"error":return e.palette.lunit_token.component.alert_error_bg;default:return e.palette.lunit_token.component.alert_success_bg}},b=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.component.alert_info_border;case"warning":return e.palette.lunit_token.component.alert_warning_border;case"error":return e.palette.lunit_token.component.alert_error_border;default:return e.palette.lunit_token.component.alert_success_border}},h=(e,o)=>{switch(o){case"info":return e.palette.lunit_token.core.icon_info_02;case"warning":return e.palette.lunit_token.core.icon_warning_02;case"error":return e.palette.lunit_token.core.icon_error_02;default:return e.palette.lunit_token.core.icon_success_02}},g=(0,x.styled)(x.Alert)(({severity:e,theme:o})=>({"&.MuiAlert-root":{display:"flex",padding:"12px",borderRadius:"8px",border:`1px solid ${b(o,e)}`,backgroundColor:_(o,e),boxShadow:"none"},"& .MuiAlert-icon":{padding:"4px",marginRight:"0",fontSize:"20px",color:`${h(o,e)} !important`},"& .MuiAlert-message":{width:"100%",minHeight:"28px",padding:"4px 0 0",margin:"0 8px 0 8px"},"& .MuiAlert-action":{margin:0,padding:0},"& .MuiSvgIcon-root":{height:"20px",width:"20px"}})),y=(0,x.styled)(x.AlertTitle)(({theme:e})=>({"&.MuiAlertTitle-root":{marginTop:0,marginBottom:8,fontWeight:700,fontSize:"14px",lineHeight:"20px",color:e.palette.lunit_token.core.text_normal}})),f=(0,x.styled)("div")(({theme:e})=>({color:e.palette.lunit_token.core.text_normal})),k=(0,x.styled)("div")({marginTop:"12px"}),v=require("@mui/material/styles"),I=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||n?"8px 12px":"7px 11px":"outlined"!==e||n?"10px 12px":"9px 11px",z=({kind:e,size:o,selected:n=!1})=>"small"===o?"outlined"!==e||n?"4px":"3px":"medium"===o?"outlined"!==e||n?"8px":"7px":"outlined"!==e||n?"12px":"11px",j=e=>({position:"relative",zIndex:0,backgroundColor:e}),w="8px",M=({size:e,kind:o,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...t.button2,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...t.button1,padding:`${n?z({kind:o,size:e,selected:r}):I({kind:o,size:e,selected:r})}`,minWidth:"44px",height:"44px"}}),O=({kind:e,color:o,lunit_token:n})=>({..."contained"===e&&"primary"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":j(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":j(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":j(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:"none","&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:n.component.btn_error_text,"&:hover":j("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:n.component.btn_secondary_text,border:`1px solid ${n.core.border_medium}`,"&:hover":j("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:w},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),R=({lunit_token:e})=>({fontWeight:"500",borderRadius:w,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:w}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),S=(0,v.styled)(x.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})(({theme:{typography:e,palette:{lunit_token:o}},kind:n,size:t,color:r,hasIconOnly:i})=>({...R({lunit_token:o}),...C({size:t,hasIconOnly:i}),...M({size:t,kind:n,hasIconOnly:i,typography:e}),...O({kind:n,color:r,lunit_token:o})})),$=(0,m.forwardRef)((e,o)=>{const{kind:t,variant:r,icon:i,children:a,startIcon:l}=e,c=Boolean((l||i)&&!a);return"outlined"===t||"outlined"===r?(0,n.jsx)(A,{...e,ref:o,hasIconOnly:c}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(q,{...e,ref:o,hasIconOnly:c}):(0,n.jsx)(T,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:c})}),q=(0,m.forwardRef)((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`ghost ${i||""}`,kind:"ghost",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})}),A=(0,m.forwardRef)((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`outlined ${i||""}`,kind:"outlined",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})}),T=(0,m.forwardRef)((e,o)=>{const{size:t="small",icon:r,className:i,children:a,startIcon:l,hasIconOnly:c,variant:s,...d}=e;return(0,n.jsx)(S,{...d,ref:o,className:`${e.kind??"contained"} ${i||""}`,kind:e.kind??"contained",color:e.color??"primary",size:t,startIcon:l||r,hasIconOnly:c,children:!c&&(0,n.jsx)(n.Fragment,{children:a})})}),N=$,W={success:(0,n.jsx)(r(),{variant:"filled"}),info:(0,n.jsx)(d(),{variant:"filled"}),warning:(0,n.jsx)(c(),{variant:"filled"}),error:(0,n.jsx)(a(),{variant:"filled"})},B=(0,m.forwardRef)((e,o)=>{const{title:t,severity:r,children:i,bottomAction:a,onClose:l,...c}=e;return(0,n.jsxs)(g,{ref:o,severity:r,iconMapping:W,slots:{closeButton:()=>(0,n.jsx)(N,{kind:"ghost",size:"small",color:"secondary",icon:(0,n.jsx)(u(),{}),onClick:l})},onClose:l,...c,children:[t&&(0,n.jsx)(y,{children:t}),(0,n.jsx)(f,{children:i}),a&&(0,n.jsx)(k,{children:a})]})});module.exports=o})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Alert/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,sC,aCA7C,MAAM,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,4C,aCA7C,MAAM,EAA+BA,QAAQ,oC,aCA7C,MAAM,EAA+BA,QAAQ,SCAv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unit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_bg;\n default:\n return theme.palette.lunit_token.component.alert_success_bg;\n }\n};\n\nexport const getBorderColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.component.alert_info_border;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_border;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_border;\n default:\n return theme.palette.lunit_token.component.alert_success_border;\n }\n};\n\nexport const getIconColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.core.icon_info_02;\n case \"warning\":\n return theme.palette.lunit_token.core.icon_warning_02;\n case \"error\":\n return theme.palette.lunit_token.core.icon_error_02;\n default:\n return theme.palette.lunit_token.core.icon_success_02;\n }\n};\n","import {\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n styled,\n} from \"@mui/material\";\nimport type { AlertProps } from \"./Alert.types\";\nimport {\n getBorderColor,\n getBackgroundColor,\n getIconColor,\n} from \"./Alert.utils\";\n\nexport const StyledAlert = styled(MuiAlert)<AlertProps>(\n ({ severity, theme }) => ({\n \"&.MuiAlert-root\": {\n display: \"flex\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: `1px solid ${getBorderColor(theme, severity)}`,\n backgroundColor: getBackgroundColor(theme, severity),\n boxShadow: \"none\",\n },\n \"& .MuiAlert-icon\": {\n padding: \"4px\",\n marginRight: \"0\",\n fontSize: \"20px\",\n color: `${getIconColor(theme, severity)} !important`,\n },\n \"& .MuiAlert-message\": {\n width: \"100%\",\n minHeight: \"28px\",\n padding: \"4px 0 0\",\n margin: \"0 8px 0 8px\",\n },\n \"& .MuiAlert-action\": {\n margin: 0,\n padding: 0,\n },\n \"& .MuiSvgIcon-root\": {\n height: \"20px\",\n width: \"20px\",\n },\n })\n);\n\nexport const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({\n \"&.MuiAlertTitle-root\": {\n marginTop: 0,\n marginBottom: 8,\n fontWeight: 700,\n fontSize: \"14px\",\n lineHeight: \"20px\",\n color: theme.palette.lunit_token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.lunit_token.core.text_normal,\n}));\n\nexport const StyledBottomAction = styled(\"div\")({\n marginTop: \"12px\",\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n lunit_token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n height: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n height: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${lunit_token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","lunit_token","component","alert_info_bg","alert_warning_bg","alert_error_bg","alert_success_bg","getBorderColor","alert_info_border","alert_warning_border","alert_error_border","alert_success_border","getIconColor","core","icon_info_02","icon_warning_02","icon_error_02","icon_success_02","StyledAlert","styled","display","padding","borderRadius","border","backgroundColor","boxShadow","marginRight","fontSize","color","width","minHeight","margin","height","StyledAlertTitle","marginTop","marginBottom","fontWeight","lineHeight","text_normal","StyledAlertChildren","StyledBottomAction","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","position","zIndex","sizeStyle","hasIconOnly","typography","button2","minWidth","button1","kindStyle","btn_primary_text_2","btn_primary_bg","opacity","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","hover","border_medium","commonStyle","textTransform","focused","boxSizing","iconStyle","CustomButton","shouldForwardProp","includes","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps","MAPPED_ICON","success","info","warning","error","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
1
+ {"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,GCLRF,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,MCJ3ER,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,M,mCCLvD,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,sC,aCA7C,MAAM,EAA+BA,QAAQ,wC,aCA7C,MAAM,EAA+BA,QAAQ,4C,aCA7C,MAAM,EAA+BA,QAAQ,oC,aCA7C,MAAM,EAA+BA,QAAQ,SCAvC,EAA+BA,QAAQ,iBCEhCC,EAAqB,CAChCC,EACAC,KAEA,OAAQA,GACN,IAAK,OACH,OAAOD,EAAME,QAAQC,YAAYC,UAAUC,cAC7C,IAAK,UACH,OAAOL,EAAME,QAAQC,YAAYC,UAAUE,iBAC7C,IAAK,QACH,OAAON,EAAME,QAAQC,YAAYC,UAAUG,eAC7C,QACE,OAAOP,EAAME,QAAQC,YAAYC,UAAUI,mBAIpCC,EAAiB,CAC5BT,EACAC,KAEA,OAAQA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OACE,SAACL,EAAY,IACPgB,EACJV,IAAKA,EACLS,UAAW,GAAGV,EAAMrC,MAAQ,eAAe+C,GAAwB,KACnE/C,KAAMqC,EAAMrC,MAAQ,YACpBd,MAAOmD,EAAMnD,OAAS,UACtBe,KAAMA,EACNyC,UAAWA,GAAaF,EACxBjC,YAAaA,EAAW,UAEtBA,IAAe,8BAAGkC,QAK1B,ICvHMQ,EAAc,CAClBC,SAAS,SAAC,IAAO,CAACX,QAAQ,WAC1BY,MAAM,SAAC,IAAW,CAACZ,QAAQ,WAC3Ba,SAAS,SAAC,IAAO,CAACb,QAAQ,WAC1Bc,OAAO,SAAC,IAAK,CAACd,QAAQ,YA+BxB,GA5Bc,IAAAH,YAAuC,CAACC,EAAOC,KAC3D,MAAM,MAAEgB,EAAK,SAAEjG,EAAQ,SAAEoF,EAAQ,aAAEc,EAAY,QAAEC,KAAYC,GAASpB,EACtE,OACE,UAAC7D,EAAW,CACV8D,IAAKA,EACLjF,SAAUA,EACVqG,YAAaT,EACbU,MAAO,CACLC,YAAa,KACX,SAAC,EAAM,CACL5D,KAAK,QACLC,KAAK,QACLf,MAAM,YACNsD,MAAM,SAAC,IAAK,IACZqB,QAASL,KAIfA,QAASA,KACLC,EAAI,UAEPH,IAAS,SAAC/D,EAAgB,UAAE+D,KAC7B,SAACzD,EAAmB,UAAE4C,IACrBc,IAAgB,SAACzD,EAAkB,UAAEyD,S","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Success16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Error16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Warning16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Information16\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Alert/Alert.utils.ts","webpack://@lunit/design-system/./src/components/Alert/Alert.styled.ts","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx","webpack://@lunit/design-system/./src/components/Alert/Alert.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Success16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Error16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Warning16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Information16\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { AlertColor, Theme } from \"@mui/material\";\n\nexport const getBackgroundColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.component.alert_info_bg;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_bg;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_bg;\n default:\n return theme.palette.lunit_token.component.alert_success_bg;\n }\n};\n\nexport const getBorderColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.component.alert_info_border;\n case \"warning\":\n return theme.palette.lunit_token.component.alert_warning_border;\n case \"error\":\n return theme.palette.lunit_token.component.alert_error_border;\n default:\n return theme.palette.lunit_token.component.alert_success_border;\n }\n};\n\nexport const getIconColor = (\n theme: Theme,\n severity: AlertColor | undefined\n) => {\n switch (severity) {\n case \"info\":\n return theme.palette.lunit_token.core.icon_info_02;\n case \"warning\":\n return theme.palette.lunit_token.core.icon_warning_02;\n case \"error\":\n return theme.palette.lunit_token.core.icon_error_02;\n default:\n return theme.palette.lunit_token.core.icon_success_02;\n }\n};\n","import {\n Alert as MuiAlert,\n AlertTitle as MuiAlertTitle,\n styled,\n} from \"@mui/material\";\nimport type { AlertProps } from \"./Alert.types\";\nimport {\n getBorderColor,\n getBackgroundColor,\n getIconColor,\n} from \"./Alert.utils\";\n\nexport const StyledAlert = styled(MuiAlert)<AlertProps>(\n ({ severity, theme }) => ({\n \"&.MuiAlert-root\": {\n display: \"flex\",\n padding: \"12px\",\n borderRadius: \"8px\",\n border: `1px solid ${getBorderColor(theme, severity)}`,\n backgroundColor: getBackgroundColor(theme, severity),\n boxShadow: \"none\",\n },\n \"& .MuiAlert-icon\": {\n padding: \"4px\",\n marginRight: \"0\",\n fontSize: \"20px\",\n color: `${getIconColor(theme, severity)} !important`,\n },\n \"& .MuiAlert-message\": {\n width: \"100%\",\n minHeight: \"28px\",\n padding: \"4px 0 0\",\n margin: \"0 8px 0 8px\",\n },\n \"& .MuiAlert-action\": {\n margin: 0,\n padding: 0,\n },\n \"& .MuiSvgIcon-root\": {\n height: \"20px\",\n width: \"20px\",\n },\n })\n);\n\nexport const StyledAlertTitle = styled(MuiAlertTitle)(({ theme }) => ({\n \"&.MuiAlertTitle-root\": {\n marginTop: 0,\n marginBottom: 8,\n fontWeight: 700,\n fontSize: \"14px\",\n lineHeight: \"20px\",\n color: theme.palette.lunit_token.core.text_normal,\n },\n}));\n\nexport const StyledAlertChildren = styled(\"div\")(({ theme }) => ({\n color: theme.palette.lunit_token.core.text_normal,\n}));\n\nexport const StyledBottomAction = styled(\"div\")({\n marginTop: \"12px\",\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n lunit_token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n height: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n height: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${lunit_token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nexport default Button;\n","import Success from \"@lunit/design-system-icons/Success16\";\nimport Error from \"@lunit/design-system-icons/Error16\";\nimport Warning from \"@lunit/design-system-icons/Warning16\";\nimport Information from \"@lunit/design-system-icons/Information16\";\nimport Close from \"@lunit/design-system-icons/Close\";\nimport React, { forwardRef } from \"react\";\nimport {\n StyledAlert,\n StyledAlertTitle,\n StyledAlertChildren,\n StyledBottomAction,\n} from \"./Alert.styled\";\nimport { AlertProps } from \"./Alert.types\";\nimport Button from \"../Button\";\n\nconst MAPPED_ICON = {\n success: <Success variant=\"filled\" />,\n info: <Information variant=\"filled\" />,\n warning: <Warning variant=\"filled\" />,\n error: <Error variant=\"filled\" />,\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const { title, severity, children, bottomAction, onClose, ...rest } = props;\n return (\n <StyledAlert\n ref={ref}\n severity={severity}\n iconMapping={MAPPED_ICON}\n slots={{\n closeButton: () => (\n <Button\n kind=\"ghost\"\n size=\"small\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n />\n ),\n }}\n onClose={onClose}\n {...rest}\n >\n {title && <StyledAlertTitle>{title}</StyledAlertTitle>}\n <StyledAlertChildren>{children}</StyledAlertChildren>\n {bottomAction && <StyledBottomAction>{bottomAction}</StyledBottomAction>}\n </StyledAlert>\n );\n});\n\nexport default Alert;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getBackgroundColor","theme","severity","palette","lunit_token","component","alert_info_bg","alert_warning_bg","alert_error_bg","alert_success_bg","getBorderColor","alert_info_border","alert_warning_border","alert_error_border","alert_success_border","getIconColor","core","icon_info_02","icon_warning_02","icon_error_02","icon_success_02","StyledAlert","styled","display","padding","borderRadius","border","backgroundColor","boxShadow","marginRight","fontSize","color","width","minHeight","margin","height","StyledAlertTitle","marginTop","marginBottom","fontWeight","lineHeight","text_normal","StyledAlertChildren","StyledBottomAction","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","position","zIndex","sizeStyle","hasIconOnly","typography","button2","minWidth","button1","kindStyle","btn_primary_text_2","btn_primary_bg","opacity","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","hover","border_medium","commonStyle","textTransform","focused","boxSizing","iconStyle","CustomButton","shouldForwardProp","includes","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps","MAPPED_ICON","success","info","warning","error","title","bottomAction","onClose","rest","iconMapping","slots","closeButton","onClick"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>g});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material/styles"),i=require("@mui/material"),c=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",a=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",d=o=>({position:"relative",zIndex:0,backgroundColor:o}),l="8px",s=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===o&&{...t.button1,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"44px",height:"44px"}}),p=({kind:o,color:e,lunit_token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":d(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":d(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===o&&"error"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":d(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:"none","&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:"none","&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":d("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.core.border_medium}`,"&:hover":d("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),b=({lunit_token:o})=>({fontWeight:"500",borderRadius:l,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${o.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:o.core.hover,borderRadius:l}}),m=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),x=(0,r.styled)(i.Button,{shouldForwardProp:o=>!["kind","hasIconOnly","variant"].includes(o)})((({theme:{typography:o,palette:{lunit_token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...b({lunit_token:e}),...m({size:t,hasIconOnly:i}),...s({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,lunit_token:e})}))),h=(0,t.forwardRef)(((o,e)=>{const{kind:t,variant:r,icon:i,children:c,startIcon:a}=o,d=Boolean((a||i)&&!c);return"outlined"===t||"outlined"===r?(0,n.jsx)(y,{...o,ref:e,hasIconOnly:d}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(u,{...o,ref:e,hasIconOnly:d}):(0,n.jsx)(_,{...o,kind:"contained",variant:"contained",ref:e,hasIconOnly:d})})),u=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`ghost ${i||""}`,kind:"ghost",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),y=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),_=(0,t.forwardRef)(((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})})),g=h;module.exports=e})();
1
+ (()=>{"use strict";var o={d:(e,n)=>{for(var t in n)o.o(n,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{default:()=>g});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material/styles"),i=require("@mui/material"),c=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px 8px":"3px 7px":"medium"===e?"outlined"!==o||n?"8px 12px":"7px 11px":"outlined"!==o||n?"10px 12px":"9px 11px",a=({kind:o,size:e,selected:n=!1})=>"small"===e?"outlined"!==o||n?"4px":"3px":"medium"===e?"outlined"!==o||n?"8px":"7px":"outlined"!==o||n?"12px":"11px",d=o=>({position:"relative",zIndex:0,backgroundColor:o}),l="8px",s=({size:o,kind:e,hasIconOnly:n,typography:t,selected:r=!1})=>({..."small"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"28px",height:"28px"},..."medium"===o&&{...t.button2,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"36px",height:"36px"},..."large"===o&&{...t.button1,padding:`${n?a({kind:e,size:o,selected:r}):c({kind:e,size:o,selected:r})}`,minWidth:"44px",height:"44px"}}),p=({kind:o,color:e,lunit_token:n})=>({..."contained"===o&&"primary"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_primary_bg,"&:hover":d(n.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."contained"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,backgroundColor:n.component.btn_secondary_bg,"&:hover":d(n.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."contained"===o&&"error"===e&&{color:n.component.btn_primary_text_2,backgroundColor:n.component.btn_error_bg,"&:hover":d(n.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_2}},..."ghost"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:"none","&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_primary_text_1}},..."ghost"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:"none","&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_secondary_text}},..."ghost"===o&&"error"===e&&{color:n.component.btn_error_text,"&:hover":d("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:n.component.btn_error_text}},..."outlined"===o&&"primary"===e&&{color:n.component.btn_primary_text_1,border:`1px solid ${n.component.btn_primary_border}`,"&:hover":d("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_primary_text_1}},..."outlined"===o&&"secondary"===e&&{color:n.component.btn_secondary_text,border:`1px solid ${n.core.border_medium}`,"&:hover":d("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:n.core.hover,borderRadius:l},"&.Mui-disabled":{opacity:.38,color:n.component.btn_secondary_text}}}),b=({lunit_token:o})=>({fontWeight:"500",borderRadius:l,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${o.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:o.core.hover,borderRadius:l}}),m=({size:o,hasIconOnly:e})=>({"& .MuiButton-startIcon":{margin:0,marginRight:e?"0px":"large"===o?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),x=(0,r.styled)(i.Button,{shouldForwardProp:o=>!["kind","hasIconOnly","variant"].includes(o)})(({theme:{typography:o,palette:{lunit_token:e}},kind:n,size:t,color:r,hasIconOnly:i})=>({...b({lunit_token:e}),...m({size:t,hasIconOnly:i}),...s({size:t,kind:n,hasIconOnly:i,typography:o}),...p({kind:n,color:r,lunit_token:e})})),h=(0,t.forwardRef)((o,e)=>{const{kind:t,variant:r,icon:i,children:c,startIcon:a}=o,d=Boolean((a||i)&&!c);return"outlined"===t||"outlined"===r?(0,n.jsx)(y,{...o,ref:e,hasIconOnly:d}):"ghost"===t||"text"===r||"ghost"===r?(0,n.jsx)(u,{...o,ref:e,hasIconOnly:d}):(0,n.jsx)(_,{...o,kind:"contained",variant:"contained",ref:e,hasIconOnly:d})}),u=(0,t.forwardRef)((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`ghost ${i||""}`,kind:"ghost",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})}),y=(0,t.forwardRef)((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`outlined ${i||""}`,kind:"outlined",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})}),_=(0,t.forwardRef)((o,e)=>{const{size:t="small",icon:r,className:i,children:c,startIcon:a,hasIconOnly:d,variant:l,...s}=o;return(0,n.jsx)(x,{...s,ref:e,className:`${o.kind??"contained"} ${i||""}`,kind:o.kind??"contained",color:o.color??"primary",size:t,startIcon:a||r,hasIconOnly:d,children:!d&&(0,n.jsx)(n.Fragment,{children:c})})}),g=h;module.exports=e})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Button/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAE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iB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGGK,GAAkB,IAAAV,aAGtB,CAACC,EAAOC,KACR,MAAM,KACJtD,EAAO,QAAO,KACdwD,EAAI,UACJO,EAAS,SACTN,EAAQ,UACRC,EAAS,YACTlD,EAAW,QACX+C,KACGS,GACDX,EAEJ,OACE,SAACR,EAAY,IACPmB,EACJV,IAAKA,EACLS,UAAW,GAAGV,EAAMtD,MAAQ,eAAegE,GAAwB,KACnEhE,KAAMsD,EAAMtD,MAAQ,YACpBiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,KAEvB,IAGH,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n lunit_token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n height: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n height: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${lunit_token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","height","button1","kindStyle","color","lunit_token","component","btn_primary_text_2","btn_primary_bg","opacity","border","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","width","core","hover","border_medium","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","CustomButton","styled","shouldForwardProp","includes","theme","palette","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps"],"sourceRoot":""}
1
+ {"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,MCJ3EH,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,M,mCCLvD,M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Y,IACPmB,EACJV,IAAKA,EACLS,UAAW,GAAGV,EAAMtD,MAAQ,eAAegE,GAAwB,KACnEhE,KAAMsD,EAAMtD,MAAQ,YACpBiB,MAAOqC,EAAMrC,OAAS,UACtBhB,KAAMA,EACN0D,UAAWA,GAAaF,EACxBhD,YAAaA,EAAW,UAEtBA,IAAe,8BAAGiD,QAK1B,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/Button/utils/getButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts","webpack://@lunit/design-system/./src/components/Button/utils/getHoverStyle.ts","webpack://@lunit/design-system/./src/components/Button/Button.styled.ts","webpack://@lunit/design-system/./src/components/Button/Button.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetButtonPaddingBySizeAndKindParams = Pick<ButtonProps, \"kind\" | \"size\"> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetButtonPaddingBySizeAndKindParams) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px ${8 - OUTLINED_BORDER_WIDTH}px`\n : \"4px 8px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"8px 12px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${10 - OUTLINED_BORDER_WIDTH}px ${12 - OUTLINED_BORDER_WIDTH}px`\n : \"10px 12px\";\n};\n","import { OUTLINED_BORDER_WIDTH } from \"../const\";\n\nimport type { ButtonProps } from \"../Button.types\";\nimport { ToggleButtonProps } from \"@/components/ToggleButton/ToggleButton.types\";\n\ntype GetIconButtonPaddingBySizeAndKindProps = Pick<\n ButtonProps,\n \"kind\" | \"size\"\n> &\n Pick<ToggleButtonProps, \"selected\">;\n\n/**\n * When kind is outlined,\n * the padding value must include the border width of outlined.\n * This function takes care of this.\n */\nexport const getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === \"small\") {\n return kind === \"outlined\" && !selected\n ? `${4 - OUTLINED_BORDER_WIDTH}px`\n : \"4px\";\n }\n\n if (size === \"medium\") {\n return kind === \"outlined\" && !selected\n ? `${8 - OUTLINED_BORDER_WIDTH}px`\n : \"8px\";\n }\n\n // size === \"large\"\n return kind === \"outlined\" && !selected\n ? `${12 - OUTLINED_BORDER_WIDTH}px`\n : \"12px\";\n};\n","const getHoverStyle = (backgroundColor: React.CSSProperties[\"color\"]) => ({\n position: \"relative\",\n zIndex: 0,\n backgroundColor,\n});\n\nexport default getHoverStyle;\n","import { styled } from \"@mui/material/styles\";\nimport { Button as MuiButton } from \"@mui/material\";\n\nimport { ColorToken } from \"@/foundation/colors/types\";\nimport { PADDING_OF_FOCUS, OUTLINED_BORDER_WIDTH } from \"./const\";\nimport { getButtonPaddingBySizeAndKind } from \"./utils/getButtonPaddingBySizeAndKind\";\nimport { getIconButtonPaddingBySizeAndKind } from \"./utils/getIconButtonPaddingBySizeAndKind\";\nimport getHoverStyle from \"./utils/getHoverStyle\";\n\nimport type { ButtonProps } from \"./Button.types\";\nimport type { ToggleButtonProps } from \"../ToggleButton/ToggleButton.types\";\nimport type { Typography } from \"@mui/material/styles/createTypography\";\n\ntype KindStyleParams = Pick<ButtonProps, \"kind\" | \"color\"> & {\n lunit_token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<\n CustomButtonProps,\n \"size\" | \"hasIconOnly\" | \"kind\"\n> &\n Pick<ToggleButtonProps, \"selected\"> & { typography: Typography };\n\nconst borderRadius = \"8px\";\n\nexport const sizeStyle = ({\n size,\n kind,\n hasIconOnly,\n typography,\n selected = false,\n}: sizeStyleParams) => ({\n ...(size === \"small\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"28px\",\n height: \"28px\",\n }),\n ...(size === \"medium\" && {\n ...typography.button2,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"36px\",\n height: \"36px\",\n }),\n ...(size === \"large\" && {\n ...typography.button1,\n padding: `${\n hasIconOnly\n ? getIconButtonPaddingBySizeAndKind({ kind, size, selected })\n : getButtonPaddingBySizeAndKind({ kind, size, selected })\n }`,\n minWidth: \"44px\",\n height: \"44px\",\n }),\n});\n\nexport const kindStyle = ({ kind, color, lunit_token }: KindStyleParams) => ({\n // kind: container\n ...(kind === \"contained\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_primary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_primary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n backgroundColor: lunit_token.component.btn_secondary_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_secondary_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"contained\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_primary_text_2,\n backgroundColor: lunit_token.component.btn_error_bg,\n \"&:hover\": getHoverStyle(lunit_token.component.btn_error_bg),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_2,\n },\n }),\n // kind: ghost\n ...(kind === \"ghost\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: \"none\",\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n ...(kind === \"ghost\" &&\n color === \"error\" && {\n color: lunit_token.component.btn_error_text,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&.Mui-disabled\": {\n opacity: 0.38,\n border: \"none\",\n color: lunit_token.component.btn_error_text,\n },\n }),\n // kind: outlined\n ...(kind === \"outlined\" &&\n color === \"primary\" && {\n color: lunit_token.component.btn_primary_text_1,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.component.btn_primary_border}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_primary_text_1,\n },\n }),\n ...(kind === \"outlined\" &&\n color === \"secondary\" && {\n color: lunit_token.component.btn_secondary_text,\n border: `${OUTLINED_BORDER_WIDTH}px solid ${lunit_token.core.border_medium}`,\n \"&:hover\": getHoverStyle(\"none\"),\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: \"-1px\",\n top: \"-1px\",\n width: \"calc(100% + 2px)\",\n height: \"calc(100% + 2px)\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n \"&.Mui-disabled\": {\n opacity: 0.38,\n color: lunit_token.component.btn_secondary_text,\n },\n }),\n});\n\nexport const commonStyle = ({ lunit_token }: { lunit_token: ColorToken }) =>\n ({\n fontWeight: \"500\",\n borderRadius,\n textTransform: \"initial\",\n \"&.Mui-focusVisible\": {\n \"&::after\": {\n position: \"absolute\",\n width: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n height: `calc(100% + ${PADDING_OF_FOCUS}px)`,\n content: '\"\"',\n borderRadius: \"11px\",\n border: `1px solid ${lunit_token.core.focused}`,\n boxSizing: \"border-box\",\n },\n },\n \"&:hover:before\": {\n content: \"''\",\n position: \"absolute\",\n left: 0,\n top: 0,\n width: \"100%\",\n height: \"100%\",\n zIndex: -1,\n backgroundColor: lunit_token.core.hover,\n borderRadius,\n },\n } as const);\n\nexport const iconStyle = ({\n size,\n hasIconOnly,\n}: Pick<CustomButtonProps, \"size\" | \"hasIconOnly\">) => ({\n \"& .MuiButton-startIcon\": {\n margin: 0,\n marginRight: hasIconOnly ? \"0px\" : size === \"large\" ? \"8px\" : \"4px\",\n\n \"*:nth-of-type(1)\": {\n fontSize: \"20px\",\n },\n },\n});\n\nexport const CustomButton = styled(MuiButton, {\n shouldForwardProp: (prop: string) => {\n return ![\"kind\", \"hasIconOnly\", \"variant\"].includes(prop);\n },\n})<CustomButtonProps>(\n ({\n theme: {\n typography,\n palette: { lunit_token },\n },\n kind,\n size,\n color,\n hasIconOnly,\n }) => ({\n ...commonStyle({ lunit_token }),\n ...iconStyle({ size, hasIconOnly }),\n ...sizeStyle({ size, kind, hasIconOnly, typography }),\n ...kindStyle({ kind, color, lunit_token }),\n })\n);\n","import React, { forwardRef } from \"react\";\n\nimport { CustomButton } from \"./Button.styled\";\n\nimport type {\n ButtonType,\n ButtonProps,\n GhostButtonProps,\n OutlinedButtonProps,\n ContainedButtonProps,\n} from \"./Button.types\";\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n const { kind, variant, icon, children, startIcon } = props;\n const hasIconOnly = Boolean((startIcon || icon) && !children);\n\n if (kind === \"outlined\" || variant === \"outlined\") {\n return <OutlinedButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n if (kind === \"ghost\" || variant === \"text\" || variant === \"ghost\") {\n return <GhostButton {...props} ref={ref} hasIconOnly={hasIconOnly} />;\n }\n\n return (\n <ContainedButton\n {...props}\n kind=\"contained\"\n variant=\"contained\"\n ref={ref}\n hasIconOnly={hasIconOnly}\n />\n );\n\n /**\n * There is an issue between React 18, Mui's OverridableComponent type and the\n * type coercion to temporarily fix it.\n * https://github.com/lunit-io/design-system/pull/143#issuecomment-1831127232\n */\n}) as ButtonType;\n\nconst GhostButton = forwardRef<\n HTMLButtonElement,\n GhostButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`ghost ${className ? className : \"\"}`}\n kind=\"ghost\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst OutlinedButton = forwardRef<\n HTMLButtonElement,\n OutlinedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`outlined ${className ? className : \"\"}`}\n kind=\"outlined\"\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nconst ContainedButton = forwardRef<\n HTMLButtonElement,\n ContainedButtonProps & { hasIconOnly: boolean }\n>((props, ref) => {\n const {\n size = \"small\",\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n variant,\n ...restProps\n } = props;\n\n return (\n <CustomButton\n {...restProps}\n ref={ref}\n className={`${props.kind ?? \"contained\"} ${className ? className : \"\"}`}\n kind={props.kind ?? \"contained\"}\n color={props.color ?? \"primary\"}\n size={size}\n startIcon={startIcon || icon}\n hasIconOnly={hasIconOnly}\n >\n {!hasIconOnly && <>{children}</>}\n </CustomButton>\n );\n});\n\nexport default Button;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getButtonPaddingBySizeAndKind","kind","size","selected","getIconButtonPaddingBySizeAndKind","backgroundColor","position","zIndex","borderRadius","sizeStyle","hasIconOnly","typography","button2","padding","minWidth","height","button1","kindStyle","color","lunit_token","component","btn_primary_text_2","btn_primary_bg","opacity","border","btn_secondary_text","btn_secondary_bg","btn_error_bg","btn_primary_text_1","btn_error_text","btn_primary_border","content","left","top","width","core","hover","border_medium","commonStyle","fontWeight","textTransform","focused","boxSizing","iconStyle","margin","marginRight","fontSize","CustomButton","styled","shouldForwardProp","includes","theme","palette","Button","forwardRef","props","ref","variant","icon","children","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","className","restProps"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>c});const i=require("react/jsx-runtime"),o=require("@mui/material/styles"),l=require("@mui/material/Checkbox");var d=e.n(l);const r=(0,o.styled)(d())((({theme:e})=>({width:20,height:20,padding:0,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",width:24,height:24,border:`1px solid ${e.palette.lunit_token.core.focused}`,borderRadius:"7px"}}))),n={width:18,height:18},s=(0,o.styled)("span")((({theme:e})=>({...n,borderRadius:"20%",boxShadow:`inset 0 0 0 1.5px ${e.palette.lunit_token.component.selectcontrol_off}`}))),a=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z",fill:"#00C9EA"})}),u=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z",fill:"#00C9EA"})}),c=e=>(0,i.jsx)(r,{disableRipple:!0,icon:(0,i.jsx)(s,{}),checkedIcon:(0,i.jsx)(a,{}),indeterminateIcon:(0,i.jsx)(u,{}),...e});module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>c});const i=require("react/jsx-runtime"),o=require("@mui/material/styles"),l=require("@mui/material/Checkbox");var d=e.n(l);const r=(0,o.styled)(d())(({theme:e})=>({width:20,height:20,padding:0,"&.Mui-disabled":{opacity:.38},"&.Mui-focusVisible:after":{content:'""',position:"absolute",width:24,height:24,border:`1px solid ${e.palette.lunit_token.core.focused}`,borderRadius:"7px"}})),n={width:18,height:18},s=(0,o.styled)("span")(({theme:e})=>({...n,borderRadius:"20%",boxShadow:`inset 0 0 0 1.5px ${e.palette.lunit_token.component.selectcontrol_off}`})),a=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z",fill:"#00C9EA"})}),u=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z",fill:"#00C9EA"})}),c=e=>(0,i.jsx)(r,{disableRipple:!0,icon:(0,i.jsx)(s,{}),checkedIcon:(0,i.jsx)(a,{}),indeterminateIcon:(0,i.jsx)(u,{}),...e});module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Checkbox/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,mCCL9D,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,wBCAvC,EAA+BA,QAAQ,0B,aCK7C,MAAMC,GAAiB,IAAAC,QAAO,IAAP,EAAoB,EAAGC,YAAY,CACxDC,MAAO,GACPC,OAAQ,GACRC,QAAS,EACT,iBAAkB,CAChBC,QAAS,KAEX,2BAA4B,CAC1BC,QAAS,KACTC,SAAU,WACVL,MAAO,GACPC,OAAQ,GACRK,OAAQ,aAAaP,EAAMQ,QAAQC,YAAYC,KAAKC,UACpDC,aAAc,WAIZC,EAAW,CACfZ,MAAO,GACPC,OAAQ,IAGJY,GAAc,IAAAf,QAAO,OAAP,EAAe,EAAGC,YAAY,IAC7Ca,EACHD,aAAc,MACdG,UAAW,qBAAqBf,EAAMQ,QAAQC,YAAYO,UAAUC,wBAGhEC,EAAc,KAEhB,gBACEC,MAAM,6BACNlB,MAAM,KACNC,OAAO,KACPkB,QAAQ,YACRC,KAAK,OAAM,UAEX,iBACEC,SAAS,UACTC,SAAS,UACT5C,EAAE,meACF0C,KAAK,cAMPG,EAAoB,KAEtB,gBACEL,MAAM,6BACNlB,MAAM,KACNC,OAAO,KACPkB,QAAQ,YACRC,KAAK,OAAM,UAEX,iBACEC,SAAS,UACTC,SAAS,UACT5C,EAAE,kPACF0C,KAAK,cAkBb,EAZkBI,IAEd,SAAC3B,EAAc,CACb4B,eAAa,EACbC,MAAM,SAACb,EAAW,IAClBc,aAAa,SAACV,EAAW,IACzBW,mBAAmB,SAACL,EAAiB,OACjCC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material/Checkbox\"","webpack://@lunit/design-system/./src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Checkbox\");","import React from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport MuiCheckbox from \"@mui/material/Checkbox\";\nimport type { CheckboxProps } from \"@mui/material\";\n\nconst CustomCheckbox = styled(MuiCheckbox)(({ theme }) => ({\n width: 20,\n height: 20,\n padding: 0,\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-focusVisible:after\": {\n content: '\"\"',\n position: \"absolute\",\n width: 24,\n height: 24,\n border: `1px solid ${theme.palette.lunit_token.core.focused}`,\n borderRadius: \"7px\",\n },\n}));\n\nconst iconSize = {\n width: 18,\n height: 18,\n};\n\nconst DefaultIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n borderRadius: \"20%\",\n boxShadow: `inset 0 0 0 1.5px ${theme.palette.lunit_token.component.selectcontrol_off}`,\n}));\n\nconst CheckedIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst IndeterminateIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst Checkbox = (props: CheckboxProps) => {\n return (\n <CustomCheckbox\n disableRipple\n icon={<DefaultIcon />}\n checkedIcon={<CheckedIcon />}\n indeterminateIcon={<IndeterminateIcon />}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","CustomCheckbox","styled","theme","width","height","padding","opacity","content","position","border","palette","lunit_token","core","focused","borderRadius","iconSize","DefaultIcon","boxShadow","component","selectcontrol_off","CheckedIcon","xmlns","viewBox","fill","fillRule","clipRule","IndeterminateIcon","props","disableRipple","icon","checkedIcon","indeterminateIcon"],"sourceRoot":""}
1
+ {"version":3,"file":"components/Checkbox/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAE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PACF0C,KAAK,cAkBb,EAZkBI,IAEd,SAAC3B,EAAc,CACb4B,eAAa,EACbC,MAAM,SAACb,EAAW,IAClBc,aAAa,SAACV,EAAW,IACzBW,mBAAmB,SAACL,EAAiB,OACjCC,I","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/external commonjs \"@mui/material/Checkbox\"","webpack://@lunit/design-system/./src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Checkbox\");","import React from \"react\";\nimport { styled } from \"@mui/material/styles\";\nimport MuiCheckbox from \"@mui/material/Checkbox\";\nimport type { CheckboxProps } from \"@mui/material\";\n\nconst CustomCheckbox = styled(MuiCheckbox)(({ theme }) => ({\n width: 20,\n height: 20,\n padding: 0,\n \"&.Mui-disabled\": {\n opacity: 0.38,\n },\n \"&.Mui-focusVisible:after\": {\n content: '\"\"',\n position: \"absolute\",\n width: 24,\n height: 24,\n border: `1px solid ${theme.palette.lunit_token.core.focused}`,\n borderRadius: \"7px\",\n },\n}));\n\nconst iconSize = {\n width: 18,\n height: 18,\n};\n\nconst DefaultIcon = styled(\"span\")(({ theme }) => ({\n ...iconSize,\n borderRadius: \"20%\",\n boxShadow: `inset 0 0 0 1.5px ${theme.palette.lunit_token.component.selectcontrol_off}`,\n}));\n\nconst CheckedIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM15.2516 8.14413C15.6074 7.72168 15.5533 7.09083 15.1309 6.73508C14.7084 6.37933 14.0776 6.43341 13.7218 6.85586L9.31824 12.0851L6.14993 9.37556C5.7302 9.01661 5.09895 9.06588 4.74 9.48561C4.38105 9.90533 4.43032 10.5366 4.85005 10.8955L8.78416 14.26C8.98672 14.4332 9.25006 14.5184 9.51571 14.4967C9.78135 14.4749 10.0273 14.348 10.199 14.1441L15.2516 8.14413Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst IndeterminateIcon = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5 1C2.79086 1 1 2.79086 1 5V15C1 17.2091 2.79086 19 5 19H15C17.2091 19 19 17.2091 19 15V5C19 2.79086 17.2091 1 15 1H5ZM5 9C4.44772 9 4 9.44771 4 10C4 10.5523 4.44771 11 5 11L15 11C15.5523 11 16 10.5523 16 10C16 9.44772 15.5523 9 15 9L5 9Z\"\n fill=\"#00C9EA\"\n />\n </svg>\n );\n};\n\nconst Checkbox = (props: CheckboxProps) => {\n return (\n <CustomCheckbox\n disableRipple\n icon={<DefaultIcon />}\n checkedIcon={<CheckedIcon />}\n indeterminateIcon={<IndeterminateIcon />}\n {...props}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","CustomCheckbox","styled","theme","width","height","padding","opacity","content","position","border","palette","lunit_token","core","focused","borderRadius","iconSize","DefaultIcon","boxShadow","component","selectcontrol_off","CheckedIcon","xmlns","viewBox","fill","fillRule","clipRule","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 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"}},d=(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}},h=(0,r.styled)(r.Chip,{shouldForwardProp:e=>!["color"].includes(e.toString())})((({theme:e,color:t})=>({...u,...e.typography.caption,color:d("text",e,t),borderColor:d("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:d("bg",e,t),"& .MuiSvgIcon-root":{marginBlock:"3px",marginLeft:"3px",marginRight:"4px",height:"16px",width:"16px",color:d("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:d("bg",e,t),backgroundColor:d("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:d("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)(h,{...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,variant:i,...l}=e;return(0,o.jsx)(x,{...l,disabled:!0,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)},...n}})},v=e=>{const{color:t="primary",thumbnail:r,onDelete:n,onClick:i,sx:l,variant:a,...c}=e;return(0,o.jsx)(g,{...c,onClick:i,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)}}})},C=({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,variant:l,...a}=e;return(0,o.jsx)(m,{...a,color:t,onDelete:n,deleteIcon:(0,o.jsx)(C,{onClick:n}),avatar:b(r),icon:y(r),sx:{"& .MuiChip-label":{...k(r,Boolean(n))},...i}})},M=e=>{const{kind:t,variant:r,onDelete:n,onClick:i,...l}=e;return"outlined"===t||"outlined"===r?(0,o.jsx)(_,{...e}):i?(0,o.jsx)(v,{...e}):n?(0,o.jsx)(j,{...e}):(0,o.jsx)(f,{...l})};module.exports=t})();
1
+ (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>w});const o=require("react/jsx-runtime"),r=require("@mui/material"),n=require("@lunit/design-system-icons/Close16");var i=e.n(n);const a="primary",l="secondary",c="error",p="warning",s="success",u={height:"22px",width:"auto",minWidth:"22px",boxShadow:"none","&.Mui-disabled":{opacity:1},"& .MuiChip-label":{padding:0,marginInline:"8px"}},d=(e,t,o)=>{if("text"===e)switch(o){case a:return t.palette.lunit_token.component.chip_primary_text;case l: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 a:return t.palette.lunit_token.component.chip_primary_bg;case l: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}},h=(0,r.styled)(r.Chip,{shouldForwardProp:e=>!["color"].includes(e.toString())})(({theme:e,color:t})=>({...u,...e.typography.caption,color:d("text",e,t),borderColor:d("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:d("bg",e,t),"& .MuiSvgIcon-root":{marginBlock:"3px",marginLeft:"3px",marginRight:"4px",height:"16px",width:"16px",color:d("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:d("bg",e,t),backgroundColor:d("text",e,t)}})),g=(0,r.styled)(x,{shouldForwardProp:e=>!["color"].includes(e.toString())})(()=>({theme:e,color:t})=>({position:"relative",left:0,right:0,zIndex:0,"&:hover":{backgroundColor:d("bg",e,t)},"&: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)(h,{...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,variant:i,...a}=e;return(0,o.jsx)(x,{...a,disabled:!0,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)},...n}})},v=e=>{const{color:t="primary",thumbnail:r,onDelete:n,onClick:i,sx:a,variant:l,...c}=e;return(0,o.jsx)(g,{...c,onClick:i,avatar:b(r),icon:y(r),color:t,sx:{"& .MuiChip-label":{...k(r)}}})},C=({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,variant:a,...l}=e;return(0,o.jsx)(m,{...l,color:t,onDelete:n,deleteIcon:(0,o.jsx)(C,{onClick:n}),avatar:b(r),icon:y(r),sx:{"& .MuiChip-label":{...k(r,Boolean(n))},...i}})},w=e=>{const{kind:t,variant:r,onDelete:n,onClick:i,...a}=e;return"outlined"===t||"outlined"===r?(0,o.jsx)(_,{...e}):i?(0,o.jsx)(v,{...e}):n?(0,o.jsx)(j,{...e}):(0,o.jsx)(f,{...a})};module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map