@lunit/design-system 2.2.0 → 2.2.3

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 (351) hide show
  1. package/.babelrc.json +1 -1
  2. package/README.md +22 -21
  3. package/dist/cjs/components/Alert/index.js +1 -1
  4. package/dist/cjs/components/Alert/index.js.map +1 -1
  5. package/dist/cjs/components/Button/index.js +1 -1
  6. package/dist/cjs/components/Button/index.js.map +1 -1
  7. package/dist/cjs/components/Checkbox/index.js +1 -1
  8. package/dist/cjs/components/Checkbox/index.js.map +1 -1
  9. package/dist/cjs/components/Chip/index.js +1 -1
  10. package/dist/cjs/components/Chip/index.js.map +1 -1
  11. package/dist/cjs/components/DataTable/index.js.map +1 -1
  12. package/dist/cjs/components/DatePicker/index.js.map +1 -1
  13. package/dist/cjs/components/Dialog/index.js +1 -1
  14. package/dist/cjs/components/Dialog/index.js.map +1 -1
  15. package/dist/cjs/components/Dropdown/index.js +1 -1
  16. package/dist/cjs/components/Dropdown/index.js.map +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/Alert/Alert.js +8 -8
  32. package/dist/components/Alert/Alert.js.map +1 -1
  33. package/dist/components/Alert/Alert.styled.js +26 -26
  34. package/dist/components/Alert/Alert.styled.js.map +1 -1
  35. package/dist/components/Alert/Alert.utils.js +9 -9
  36. package/dist/components/Alert/Alert.utils.js.map +1 -1
  37. package/dist/components/Alert/index.js +1 -1
  38. package/dist/components/Button/Button.js +23 -17
  39. package/dist/components/Button/Button.js.map +1 -1
  40. package/dist/components/Button/Button.styled.js +88 -88
  41. package/dist/components/Button/Button.styled.js.map +1 -1
  42. package/dist/components/Button/index.js +1 -1
  43. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +9 -9
  44. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -1
  45. package/dist/components/Button/utils/getHoverStyle.js +1 -1
  46. package/dist/components/Button/utils/getHoverStyle.js.map +1 -1
  47. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +6 -12
  48. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -1
  49. package/dist/components/Checkbox/Checkbox.js +9 -9
  50. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  51. package/dist/components/Checkbox/index.js +1 -1
  52. package/dist/components/Chip/Chip.js +29 -26
  53. package/dist/components/Chip/Chip.js.map +1 -1
  54. package/dist/components/Chip/Chip.styled.js +52 -52
  55. package/dist/components/Chip/Chip.styled.js.map +1 -1
  56. package/dist/components/Chip/consts.js +5 -5
  57. package/dist/components/Chip/index.js +1 -1
  58. package/dist/components/DataTable/DataTable.js +1 -1
  59. package/dist/components/DataTable/index.js +1 -1
  60. package/dist/components/DatePicker/DatePicker.js +1 -1
  61. package/dist/components/DatePicker/index.js +1 -1
  62. package/dist/components/Dialog/Dialog.js +18 -18
  63. package/dist/components/Dialog/Dialog.js.map +1 -1
  64. package/dist/components/Dialog/Dialog.styled.js +90 -90
  65. package/dist/components/Dialog/Dialog.styled.js.map +1 -1
  66. package/dist/components/Dialog/components/DialogAction.js +6 -6
  67. package/dist/components/Dialog/index.js +1 -1
  68. package/dist/components/Dropdown/Dropdown.js +23 -21
  69. package/dist/components/Dropdown/Dropdown.js.map +1 -1
  70. package/dist/components/Dropdown/Dropdown.styled.js +85 -86
  71. package/dist/components/Dropdown/Dropdown.styled.js.map +1 -1
  72. package/dist/components/Dropdown/DropdownItem.js +14 -14
  73. package/dist/components/Dropdown/DropdownItem.js.map +1 -1
  74. package/dist/components/Dropdown/index.js +2 -2
  75. package/dist/components/Dropdown/index.js.map +1 -1
  76. package/dist/components/FormLabel/FormLabel.js +1 -1
  77. package/dist/components/FormLabel/FormLabel.styled.js +2 -2
  78. package/dist/components/FormLabel/FormLabel.styled.js.map +1 -1
  79. package/dist/components/FormLabel/index.js +1 -1
  80. package/dist/components/Radio/Radio.js +8 -8
  81. package/dist/components/Radio/Radio.js.map +1 -1
  82. package/dist/components/Radio/index.js +1 -1
  83. package/dist/components/RadioGroup/index.js +1 -1
  84. package/dist/components/TextField/TextField.js +8 -8
  85. package/dist/components/TextField/TextField.js.map +1 -1
  86. package/dist/components/TextField/TextField.style.js +112 -112
  87. package/dist/components/TextField/TextField.style.js.map +1 -1
  88. package/dist/components/TextField/TextFieldIcon.js +2 -2
  89. package/dist/components/TextField/TextFieldIcon.js.map +1 -1
  90. package/dist/components/TextField/index.js +1 -1
  91. package/dist/components/Toast/Toast.js +13 -13
  92. package/dist/components/Toast/Toast.js.map +1 -1
  93. package/dist/components/Toast/Toast.styled.js +26 -26
  94. package/dist/components/Toast/Toast.utils.js +3 -3
  95. package/dist/components/Toast/Toast.utils.js.map +1 -1
  96. package/dist/components/Toast/index.js +1 -1
  97. package/dist/components/Toggle/Toggle.js +3 -4
  98. package/dist/components/Toggle/Toggle.js.map +1 -1
  99. package/dist/components/Toggle/Toggle.styled.js +30 -30
  100. package/dist/components/Toggle/Toggle.styled.js.map +1 -1
  101. package/dist/components/Toggle/index.js +1 -1
  102. package/dist/components/ToggleButton/ToggleButton.js +6 -6
  103. package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
  104. package/dist/components/ToggleButton/ToggleButton.styled.js +20 -20
  105. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
  106. package/dist/components/ToggleButton/index.js +1 -1
  107. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -2
  108. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
  109. package/dist/components/ToggleButtonGroup/index.js +1 -1
  110. package/dist/components/Tooltip/Tooltip.js +1 -1
  111. package/dist/components/Tooltip/index.js +1 -1
  112. package/dist/components/Typography/Typography.js +1 -1
  113. package/dist/components/Typography/Typography.js.map +1 -1
  114. package/dist/components/Typography/index.js +1 -1
  115. package/dist/foundation/Elevation/index.js +27 -27
  116. package/dist/foundation/Elevation/utils.js +1 -1
  117. package/dist/foundation/Elevation/utils.js.map +1 -1
  118. package/dist/foundation/Typography/index.js +35 -35
  119. package/dist/foundation/Typography/index.js.map +1 -1
  120. package/dist/foundation/Typography/tokens.js +136 -136
  121. package/dist/foundation/Typography/tokens.js.map +1 -1
  122. package/dist/foundation/colors/base/blue.js +12 -12
  123. package/dist/foundation/colors/base/green.js +12 -12
  124. package/dist/foundation/colors/base/grey.js +28 -28
  125. package/dist/foundation/colors/base/index.js +11 -11
  126. package/dist/foundation/colors/base/lunitGreen.js +11 -11
  127. package/dist/foundation/colors/base/lunitTeal.js +12 -12
  128. package/dist/foundation/colors/base/magenta.js +12 -12
  129. package/dist/foundation/colors/base/opacity.js +4 -4
  130. package/dist/foundation/colors/base/orange.js +12 -12
  131. package/dist/foundation/colors/base/purple.js +12 -12
  132. package/dist/foundation/colors/base/red.js +12 -12
  133. package/dist/foundation/colors/base/yellow.js +12 -12
  134. package/dist/foundation/colors/index.js +119 -121
  135. package/dist/foundation/colors/index.js.map +1 -1
  136. package/dist/foundation/colors/token/component.js +184 -212
  137. package/dist/foundation/colors/token/component.js.map +1 -1
  138. package/dist/foundation/colors/token/core.js +112 -133
  139. package/dist/foundation/colors/token/core.js.map +1 -1
  140. package/dist/foundation/colors/token/index.js +2 -2
  141. package/dist/foundation/index.js +5 -5
  142. package/dist/index.js +20 -20
  143. package/dist/theme.js +6 -6
  144. package/dist/types/components/Alert/Alert.d.ts +2 -2
  145. package/dist/types/components/Alert/Alert.styled.d.ts +1 -2
  146. package/dist/types/components/Alert/Alert.types.d.ts +2 -2
  147. package/dist/types/components/Alert/Alert.utils.d.ts +1 -1
  148. package/dist/types/components/Alert/index.d.ts +1 -1
  149. package/dist/types/components/Button/Button.d.ts +1 -1
  150. package/dist/types/components/Button/Button.styled.d.ts +226 -227
  151. package/dist/types/components/Button/Button.types.d.ts +16 -16
  152. package/dist/types/components/Button/index.d.ts +1 -1
  153. package/dist/types/components/Button/utils/getButtonPaddingBySizeAndKind.d.ts +4 -4
  154. package/dist/types/components/Button/utils/getHoverStyle.d.ts +2 -1
  155. package/dist/types/components/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +4 -4
  156. package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
  157. package/dist/types/components/Checkbox/index.d.ts +1 -1
  158. package/dist/types/components/Chip/Chip.d.ts +1 -1
  159. package/dist/types/components/Chip/Chip.styled.d.ts +6 -7
  160. package/dist/types/components/Chip/Chip.types.d.ts +15 -14
  161. package/dist/types/components/Chip/index.d.ts +1 -1
  162. package/dist/types/components/DataTable/index.d.ts +1 -1
  163. package/dist/types/components/DatePicker/index.d.ts +1 -1
  164. package/dist/types/components/Dialog/Dialog.d.ts +11 -11
  165. package/dist/types/components/Dialog/Dialog.styled.d.ts +3 -4
  166. package/dist/types/components/Dialog/components/DialogAction.d.ts +2 -2
  167. package/dist/types/components/Dialog/index.d.ts +2 -2
  168. package/dist/types/components/Dropdown/Dropdown.d.ts +2 -2
  169. package/dist/types/components/Dropdown/Dropdown.styled.d.ts +3 -4
  170. package/dist/types/components/Dropdown/Dropdown.types.d.ts +5 -5
  171. package/dist/types/components/Dropdown/DropdownItem.d.ts +3 -3
  172. package/dist/types/components/Dropdown/index.d.ts +3 -3
  173. package/dist/types/components/FormLabel/FormLabel.d.ts +1 -1
  174. package/dist/types/components/FormLabel/index.d.ts +1 -1
  175. package/dist/types/components/Radio/Radio.d.ts +1 -1
  176. package/dist/types/components/Radio/index.d.ts +1 -1
  177. package/dist/types/components/RadioGroup/index.d.ts +1 -1
  178. package/dist/types/components/TextField/TextField.d.ts +2 -2
  179. package/dist/types/components/TextField/TextField.style.d.ts +3 -4
  180. package/dist/types/components/TextField/TextField.types.d.ts +6 -6
  181. package/dist/types/components/TextField/TextFieldIcon.d.ts +2 -2
  182. package/dist/types/components/TextField/index.d.ts +2 -2
  183. package/dist/types/components/Toast/Toast.d.ts +2 -2
  184. package/dist/types/components/Toast/Toast.types.d.ts +3 -3
  185. package/dist/types/components/Toast/Toast.utils.d.ts +1 -1
  186. package/dist/types/components/Toast/index.d.ts +2 -2
  187. package/dist/types/components/Toggle/Toggle.d.ts +1 -1
  188. package/dist/types/components/Toggle/Toggle.styled.d.ts +2 -2
  189. package/dist/types/components/Toggle/Toggle.types.d.ts +3 -3
  190. package/dist/types/components/Toggle/index.d.ts +1 -1
  191. package/dist/types/components/ToggleButton/ToggleButton.d.ts +1 -1
  192. package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -3
  193. package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +10 -10
  194. package/dist/types/components/ToggleButton/index.d.ts +1 -1
  195. package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
  196. package/dist/types/components/ToggleButtonGroup/index.d.ts +1 -1
  197. package/dist/types/components/Tooltip/index.d.ts +1 -1
  198. package/dist/types/components/Typography/Typography.d.ts +6 -6
  199. package/dist/types/components/Typography/index.d.ts +1 -1
  200. package/dist/types/components/index.d.ts +2 -2
  201. package/dist/types/foundation/Elevation/index.d.ts +22 -22
  202. package/dist/types/foundation/Typography/index.d.ts +78 -78
  203. package/dist/types/foundation/Typography/tokens.d.ts +69 -69
  204. package/dist/types/foundation/colors/base/index.d.ts +11 -11
  205. package/dist/types/foundation/colors/index.d.ts +13 -20
  206. package/dist/types/foundation/colors/token/component.d.ts +1 -1
  207. package/dist/types/foundation/colors/token/core.d.ts +1 -1
  208. package/dist/types/foundation/colors/token/index.d.ts +2 -2
  209. package/dist/types/foundation/colors/types.d.ts +0 -7
  210. package/dist/types/foundation/index.d.ts +4 -11
  211. package/dist/types/foundation/spacing.d.ts +1 -1
  212. package/dist/types/index.d.ts +20 -20
  213. package/dist/types/theme.d.ts +1 -1
  214. package/package.json +9 -11
  215. package/src/components/Alert/Alert.styled.ts +39 -49
  216. package/src/components/Alert/Alert.tsx +10 -16
  217. package/src/components/Alert/Alert.types.ts +2 -2
  218. package/src/components/Alert/Alert.utils.ts +13 -22
  219. package/src/components/Alert/index.ts +1 -1
  220. package/src/components/Button/Button.styled.ts +98 -101
  221. package/src/components/Button/Button.tsx +71 -69
  222. package/src/components/Button/Button.types.ts +19 -21
  223. package/src/components/Button/index.ts +1 -1
  224. package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +13 -13
  225. package/src/components/Button/utils/getHoverStyle.ts +4 -2
  226. package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +10 -19
  227. package/src/components/Checkbox/Checkbox.tsx +13 -25
  228. package/src/components/Checkbox/index.ts +1 -1
  229. package/src/components/Chip/Chip.styled.ts +69 -72
  230. package/src/components/Chip/Chip.tsx +33 -55
  231. package/src/components/Chip/Chip.types.ts +17 -25
  232. package/src/components/Chip/consts.ts +5 -5
  233. package/src/components/Chip/index.ts +1 -1
  234. package/src/components/DataTable/DataTable.tsx +2 -2
  235. package/src/components/DataTable/index.ts +1 -1
  236. package/src/components/DatePicker/DatePicker.tsx +2 -2
  237. package/src/components/DatePicker/index.ts +1 -1
  238. package/src/components/Dialog/Dialog.styled.ts +112 -114
  239. package/src/components/Dialog/Dialog.tsx +41 -46
  240. package/src/components/Dialog/components/DialogAction.tsx +8 -8
  241. package/src/components/Dialog/index.ts +3 -3
  242. package/src/components/Dropdown/Dropdown.styled.tsx +88 -89
  243. package/src/components/Dropdown/Dropdown.tsx +29 -30
  244. package/src/components/Dropdown/Dropdown.types.ts +5 -6
  245. package/src/components/Dropdown/DropdownItem.tsx +18 -29
  246. package/src/components/Dropdown/index.ts +3 -7
  247. package/src/components/FormLabel/FormLabel.styled.ts +3 -3
  248. package/src/components/FormLabel/FormLabel.tsx +3 -3
  249. package/src/components/FormLabel/index.ts +1 -1
  250. package/src/components/Radio/Radio.tsx +12 -29
  251. package/src/components/Radio/index.ts +1 -1
  252. package/src/components/RadioGroup/index.ts +1 -1
  253. package/src/components/TextField/TextField.style.ts +123 -132
  254. package/src/components/TextField/TextField.tsx +50 -62
  255. package/src/components/TextField/TextField.types.ts +6 -9
  256. package/src/components/TextField/TextFieldIcon.tsx +4 -7
  257. package/src/components/TextField/index.ts +2 -2
  258. package/src/components/Toast/Toast.styled.ts +26 -26
  259. package/src/components/Toast/Toast.tsx +14 -28
  260. package/src/components/Toast/Toast.types.ts +3 -8
  261. package/src/components/Toast/Toast.utils.ts +5 -8
  262. package/src/components/Toast/index.tsx +2 -2
  263. package/src/components/Toggle/Toggle.styled.ts +31 -32
  264. package/src/components/Toggle/Toggle.tsx +5 -11
  265. package/src/components/Toggle/Toggle.types.ts +3 -3
  266. package/src/components/Toggle/index.ts +1 -1
  267. package/src/components/ToggleButton/ToggleButton.styled.ts +47 -49
  268. package/src/components/ToggleButton/ToggleButton.tsx +91 -97
  269. package/src/components/ToggleButton/ToggleButton.types.ts +10 -10
  270. package/src/components/ToggleButton/index.ts +1 -1
  271. package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +3 -8
  272. package/src/components/ToggleButtonGroup/index.tsx +1 -1
  273. package/src/components/Tooltip/Tooltip.tsx +2 -2
  274. package/src/components/Tooltip/index.ts +1 -1
  275. package/src/components/Typography/Typography.tsx +7 -10
  276. package/src/components/Typography/index.ts +1 -1
  277. package/src/components/index.ts +2 -2
  278. package/src/foundation/Elevation/index.ts +27 -27
  279. package/src/foundation/Elevation/utils.ts +14 -8
  280. package/src/foundation/Typography/index.ts +58 -57
  281. package/src/foundation/Typography/tokens.ts +138 -138
  282. package/src/foundation/colors/base/blue.ts +12 -12
  283. package/src/foundation/colors/base/green.ts +12 -12
  284. package/src/foundation/colors/base/grey.ts +28 -28
  285. package/src/foundation/colors/base/index.ts +11 -11
  286. package/src/foundation/colors/base/lunitGreen.ts +11 -11
  287. package/src/foundation/colors/base/lunitTeal.ts +12 -12
  288. package/src/foundation/colors/base/magenta.ts +12 -12
  289. package/src/foundation/colors/base/opacity.ts +4 -4
  290. package/src/foundation/colors/base/orange.ts +12 -12
  291. package/src/foundation/colors/base/purple.ts +12 -12
  292. package/src/foundation/colors/base/red.ts +12 -12
  293. package/src/foundation/colors/base/yellow.ts +12 -12
  294. package/src/foundation/colors/index.ts +119 -120
  295. package/src/foundation/colors/token/component.ts +185 -213
  296. package/src/foundation/colors/token/core.ts +113 -134
  297. package/src/foundation/colors/token/index.ts +2 -2
  298. package/src/foundation/colors/types.ts +0 -7
  299. package/src/foundation/index.ts +8 -8
  300. package/src/foundation/spacing.ts +1 -1
  301. package/src/index.ts +20 -20
  302. package/src/stories/GettingStarted.mdx +6 -6
  303. package/src/stories/components/Alert/Alert.stories.tsx +38 -45
  304. package/src/stories/components/Button/BasicButton.stories.tsx +68 -59
  305. package/src/stories/components/Button/ButtonDocs.mdx +17 -41
  306. package/src/stories/components/Button/Color.stories.tsx +28 -51
  307. package/src/stories/components/Button/IconButton.stories.tsx +40 -47
  308. package/src/stories/components/Button/Kind.stories.tsx +100 -213
  309. package/src/stories/components/CheckBox/BasicCheckbox.stories.tsx +52 -71
  310. package/src/stories/components/CheckBox/CheckboxDocs.mdx +6 -6
  311. package/src/stories/components/Chip/Chip.stories.tsx +75 -75
  312. package/src/stories/components/Chip/ChipDocs.mdx +12 -13
  313. package/src/stories/components/DataTable/DataTable.stories.tsx +4 -4
  314. package/src/stories/components/DatePicker/DatePicker.stories.tsx +4 -4
  315. package/src/stories/components/Dialog/Dialog.stories.tsx +103 -135
  316. package/src/stories/components/Dialog/DialogDocs.mdx +7 -13
  317. package/src/stories/components/Dropdown/Dropdown.stories.tsx +96 -82
  318. package/src/stories/components/Dropdown/DropdownDocs.mdx +275 -0
  319. package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +40 -47
  320. package/src/stories/components/Dropdown/DropdownItem.stories.tsx +113 -98
  321. package/src/stories/components/SelectControl/RadioGroup.stories.tsx +17 -30
  322. package/src/stories/components/SelectControl/RadioStatus.stories.tsx +16 -23
  323. package/src/stories/components/SelectControl/Toggle.stories.tsx +33 -78
  324. package/src/stories/components/TextField/BasicTextField.stories.tsx +44 -53
  325. package/src/stories/components/TextField/TextFieldDocs.mdx +8 -12
  326. package/src/stories/components/TextField/TextFieldMulti.stories.tsx +39 -55
  327. package/src/stories/components/TextField/TextFieldSingle.stories.tsx +74 -118
  328. package/src/stories/components/TextField/TextFieldSize.stories.tsx +35 -55
  329. package/src/stories/components/Toast/Toast.stories.tsx +35 -50
  330. package/src/stories/components/ToggleButton/Basic.stories.tsx +115 -152
  331. package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +10 -14
  332. package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +141 -200
  333. package/src/stories/components/ToggleButton/WithIcon.stories.tsx +87 -107
  334. package/src/stories/components/Tooltip/Tooltip.stories.tsx +4 -4
  335. package/src/stories/foundation/Elevation/Elevation.stories.tsx +48 -54
  336. package/src/stories/foundation/Elevation/styled.ts +3 -3
  337. package/src/stories/foundation/Typography/Typography.mdx +9 -13
  338. package/src/stories/foundation/Typography/Typography.stories.tsx +25 -41
  339. package/src/stories/foundation/Typography/TypographyGroup.tsx +14 -25
  340. package/src/stories/foundation/Typography/const.ts +13 -19
  341. package/src/stories/foundation/colors/ColorSystem.tsx +42 -40
  342. package/src/stories/foundation/colors/Colors.stories.tsx +40 -41
  343. package/src/stories/foundation/colors/Docs.mdx +73 -77
  344. package/src/stories/foundation/colors/Mui.stories.tsx +6 -8
  345. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +81 -71
  346. package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +7 -7
  347. package/src/stories/foundation/colors/TokenPaletteTable.tsx +23 -49
  348. package/src/stories/foundation/colors/styled.ts +26 -26
  349. package/src/theme.ts +6 -6
  350. package/src/types.d.ts +1 -1
  351. package/tsconfig.build.json +1 -5
@@ -1 +1 @@
1
- {"version":3,"file":"components/Chip/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,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,iBCAvC,EAA+BA,QAAQ,sC,aCAtC,MAAMC,EACF,UADEA,EAEA,YAFAA,EAGJ,QAHIA,EAIF,UAJEA,EAKF,UCMLC,EAAgB,CACpBC,OAAQ,OACRC,MAAO,OACPC,SAAU,OACVC,UAAW,OACX,iBAAkB,CAChBC,QAAS,GAEX,mBAAoB,CAClBC,QAAS,EACTC,aAAc,QAIZC,EAAgB,CACpBC,EACAC,EACAC,KAEA,GAAc,SAAVF,EACF,OAAQE,GACN,KAAKZ,EACH,OAAOW,EAAME,QAAQC,YAAYC,UAAUC,kBAC7C,KAAKhB,EAC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sB,IAAKtB,KAE/C,SAACa,EAAqB,IAAKZ,K","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close16\"","webpack://@lunit/design-system/./src/components/Chip/consts.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.styled.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close16\");","export const CHIP_COLORS = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n ERROR: \"error\",\n WARNING: \"warning\",\n SUCCESS: \"success\",\n} as const;\n","import { Chip as MuiChip, styled } from \"@mui/material\";\nimport { CHIP_COLORS } from \"./consts\";\n\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n ChipColor,\n OutlinedChipProps,\n BaseContainedChipProps,\n EnableContainedChipProps,\n} from \"./Chip.types\";\n\nconst COMMON_STYLES = {\n height: \"22px\",\n width: \"auto\",\n minWidth: \"22px\",\n boxShadow: \"none\",\n \"&.Mui-disabled\": {\n opacity: 1,\n },\n \"& .MuiChip-label\": {\n padding: 0,\n marginInline: \"8px\",\n },\n};\n\nconst getColorToken = (\n token: \"text\" | \"bg\",\n theme: Theme,\n color?: ChipColor\n) => {\n if (token === \"text\") {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_text;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_text;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_text;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_text;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_text;\n default:\n return theme.palette.lunit_token.component.chip_primary_text;\n }\n } else {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_bg;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_bg;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_bg;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_bg;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_bg;\n default:\n return theme.palette.lunit_token.component.chip_primary_bg;\n }\n }\n};\n\nexport const StyledOutlinedChip = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<OutlinedChipProps>(({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: getColorToken(\"text\", theme, color),\n borderColor: getColorToken(\"text\", theme, color),\n}));\n\nexport const StyledContainedChipBase = styled(MuiChip, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<BaseContainedChipProps>(() => ({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: theme.palette.lunit_token.core.text_normal,\n backgroundColor: getColorToken(\"bg\", theme, color),\n\n \"& .MuiSvgIcon-root\": {\n marginBlock: \"3px\",\n marginLeft: \"3px\",\n marginRight: \"4px\",\n height: \"16px\",\n width: \"16px\",\n color: getColorToken(\"text\", theme, color),\n },\n \"& .MuiChip-avatar\": {\n marginBlock: \"3px\",\n marginLeft: \"4px\",\n marginRight: \"5px\",\n height: \"14px\",\n width: \"14px\",\n fontSize: \"11px\",\n fontWeight: 500,\n lineHeight: \"16px\",\n display: \"flex\",\n textAlign: \"center\",\n alignItems: \"center\",\n color: getColorToken(\"bg\", theme, color),\n backgroundColor: getColorToken(\"text\", theme, color),\n },\n}));\n\nexport const StyledContainedChipEnable = styled(StyledContainedChipBase, {\n shouldForwardProp: (prop) => ![\"color\"].includes(prop.toString()),\n})<EnableContainedChipProps>(() => ({ theme, color }) => ({\n /**\n * Setting the z-index of the chip to 0 and the z-index of the pseudo element to -1\n * allows the pseudo element(hover layer) to be rendered between the chip and the chip's children.\n */\n position: \"relative\",\n left: 0,\n right: 0,\n zIndex: 0,\n \"&:hover\": {\n backgroundColor: getColorToken(\"bg\", theme, color),\n },\n \"&:hover::before\": {\n position: \"absolute\",\n zIndex: -1,\n content: '\"\"',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: theme.palette.lunit_token.core.hover,\n borderRadius: \"11px\",\n },\n}));\n\nexport const StyledContainedChipDeletable = styled(\n StyledContainedChipBase\n)<BaseContainedChipProps>(() => ({ theme }) => ({\n \"& .MuiChip-deleteIcon\": {\n marginLeft: \"4px\",\n marginRight: \"3px\",\n },\n\n \"& .delete-icon-hover-layer\": {\n position: \"absolute\",\n zIndex: 1000,\n top: 0,\n left: \"auto\",\n right: 0,\n bottom: 0,\n opacity: 0,\n color: theme.palette.lunit_token.core.hover,\n \":hover\": {\n cursor: \"pointer\",\n opacity: 1,\n },\n },\n}));\n","import React from \"react\";\nimport { Avatar } from \"@mui/material\";\nimport Close16 from \"@lunit/design-system-icons/Close16\";\nimport {\n StyledOutlinedChip,\n StyledContainedChipBase,\n StyledContainedChipEnable,\n StyledContainedChipDeletable,\n} from \"./Chip.styled\";\n\nimport type {\n OutlinedChipProps,\n ReadOnlyContainedChipProps,\n EnableContainedChipProps,\n DeletableContainedChipProps,\n ChipProps,\n ChipType,\n ChipThumbnail,\n} from \"./Chip.types\";\n\nconst Chip: ChipType = (props: ChipProps) => {\n const { kind, variant, onDelete, onClick, ...restProps } = props;\n\n const isOutlined = kind === \"outlined\" || variant === \"outlined\";\n\n if (isOutlined) return <OutlinedChip {...props} />;\n else if (onClick) return <EnableContainedChip {...props} />;\n else if (onDelete) return <DeletableContainedChip {...props} />;\n\n return <ReadOnlyContainedChip {...restProps} />;\n};\n\nconst OutlinedChip = (props: OutlinedChipProps) => {\n const { color = \"primary\", ...restProps } = props;\n\n return (\n <StyledOutlinedChip\n {...restProps}\n variant=\"outlined\"\n disabled\n color={color}\n />\n );\n};\n\n/**\n * Conditional styling for contained chip\n */\nconst getAvatar = (thumbnail: ChipThumbnail | undefined) => {\n if (!thumbnail || typeof thumbnail !== \"string\") return;\n if (thumbnail.length === 0) return <Avatar />;\n return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>;\n};\nconst getIcon = (thumbnail: ChipThumbnail | undefined) => {\n if (thumbnail && typeof thumbnail !== \"string\") return thumbnail;\n return undefined;\n};\nconst getLabelMargin = (\n thumbnail: ChipThumbnail | undefined,\n deletable?: boolean\n) => {\n return {\n marginLeft: thumbnail ? \"0px\" : \"8px\",\n marginRight: deletable ? \"0px\" : \"8px\",\n };\n};\n\nconst ReadOnlyContainedChip = (props: ReadOnlyContainedChipProps) => {\n const { color = \"primary\", thumbnail, sx, variant, ...restProps } = props;\n\n return (\n <StyledContainedChipBase\n {...restProps}\n disabled\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n ...sx,\n }}\n />\n );\n};\n\nconst EnableContainedChip = (props: EnableContainedChipProps) => {\n const {\n color = \"primary\",\n thumbnail,\n onDelete,\n onClick,\n sx,\n variant,\n ...restProps\n } = props;\n\n return (\n <StyledContainedChipEnable\n {...restProps}\n onClick={onClick}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail),\n },\n }}\n />\n );\n};\n\nconst DeleteIconWithHoverLayer = ({ onClick }: { onClick: () => void }) => {\n return (\n <>\n <Close16 />\n <Close16 className=\"delete-icon-hover-layer\" onClick={onClick} />\n </>\n );\n};\nconst DeletableContainedChip = (props: DeletableContainedChipProps) => {\n const {\n color = \"primary\",\n thumbnail,\n onDelete,\n sx,\n variant,\n ...restProps\n } = props;\n\n return (\n <StyledContainedChipDeletable\n {...restProps}\n color={color}\n onDelete={onDelete}\n deleteIcon={<DeleteIconWithHoverLayer onClick={onDelete} />}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n sx={{\n \"& .MuiChip-label\": {\n ...getLabelMargin(thumbnail, Boolean(onDelete)),\n },\n ...sx,\n }}\n />\n );\n};\n\nexport default Chip;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","CHIP_COLORS","COMMON_STYLES","height","width","minWidth","boxShadow","opacity","padding","marginInline","getColorToken","token","theme","color","palette","lunit_token","component","chip_primary_text","chip_secondary_text","chip_error_text","chip_warning_text","chip_success_text","chip_primary_bg","chip_secondary_bg","chip_error_bg","chip_warning_bg","chip_success_bg","StyledOutlinedChip","styled","shouldForwardProp","includes","toString","typography","caption","borderColor","StyledContainedChipBase","core","text_normal","backgroundColor","marginBlock","marginLeft","marginRight","fontSize","fontWeight","lineHeight","display","textAlign","alignItems","StyledContainedChipEnable","position","left","right","zIndex","content","top","bottom","hover","borderRadius","StyledContainedChipDeletable","cursor","OutlinedChip","props","restProps","variant","disabled","getAvatar","thumbnail","length","Avatar","slice","toLocaleUpperCase","getIcon","getLabelMargin","deletable","ReadOnlyContainedChip","sx","avatar","icon","EnableContainedChip","onDelete","onClick","DeleteIconWithHoverLayer","className","DeletableContainedChip","deleteIcon","Boolean","kind"],"sourceRoot":""}
1
+ {"version":3,"file":"components/Chip/index.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,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,iBCAvC,EAA+BA,QAAQ,sC,aCAtC,MAAMC,EACF,UADEA,EAEA,YAFAA,EAGJ,QAHIA,EAIF,UAJEA,EAKF,UCMLC,EAAgB,CACpBC,OAAQ,OACRC,MAA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AkBX,EAZwBd,IACtB,MAAM,KAAEyB,EAAI,QAAEvB,EAAO,SAAEoB,EAAQ,QAAEJ,KAAYjB,GAAcD,EAI3D,MAF4B,aAATyB,GAAmC,aAAZvB,GAEnB,SAACH,EAAY,IAAKC,IACrCkB,GAAgB,SAACD,EAAmB,IAAKjB,IACzCsB,GAAiB,SAACD,EAAsB,IAAKrB,KAE1C,SAACa,EAAqB,IAAKZ,K","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons/Close16\"","webpack://@lunit/design-system/./src/components/Chip/consts.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.styled.ts","webpack://@lunit/design-system/./src/components/Chip/Chip.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons/Close16\");","export const CHIP_COLORS = {\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n ERROR: 'error',\n WARNING: 'warning',\n SUCCESS: 'success',\n} as const;\n","import { Chip as MuiChip, styled } from '@mui/material';\nimport { CHIP_COLORS } from './consts';\n\nimport type { Theme } from '@mui/material/styles';\nimport type {\n ChipColor,\n OutlinedChipProps,\n BaseContainedChipProps,\n EnableContainedChipProps,\n} from './Chip.types';\n\nconst COMMON_STYLES = {\n height: '22px',\n width: 'auto',\n minWidth: '22px',\n boxShadow: 'none',\n '&.Mui-disabled': {\n opacity: 1,\n },\n '& .MuiChip-label': {\n padding: 0,\n marginInline: '8px',\n },\n};\n\nconst getColorToken = (token: 'text' | 'bg', theme: Theme, color?: ChipColor) => {\n if (token === 'text') {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_text;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_text;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_text;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_text;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_text;\n default:\n return theme.palette.lunit_token.component.chip_primary_text;\n }\n } else {\n switch (color) {\n case CHIP_COLORS.PRIMARY:\n return theme.palette.lunit_token.component.chip_primary_bg;\n case CHIP_COLORS.SECONDARY:\n return theme.palette.lunit_token.component.chip_secondary_bg;\n case CHIP_COLORS.ERROR:\n return theme.palette.lunit_token.component.chip_error_bg;\n case CHIP_COLORS.WARNING:\n return theme.palette.lunit_token.component.chip_warning_bg;\n case CHIP_COLORS.SUCCESS:\n return theme.palette.lunit_token.component.chip_success_bg;\n default:\n return theme.palette.lunit_token.component.chip_primary_bg;\n }\n }\n};\n\nexport const StyledOutlinedChip = styled(MuiChip, {\n shouldForwardProp: (prop) => !['color'].includes(prop.toString()),\n})<OutlinedChipProps>(({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: getColorToken('text', theme, color),\n borderColor: getColorToken('text', theme, color),\n}));\n\nexport const StyledContainedChipBase = styled(MuiChip, {\n shouldForwardProp: (prop) => !['color'].includes(prop.toString()),\n})<BaseContainedChipProps>(() => ({ theme, color }) => ({\n ...COMMON_STYLES,\n ...theme.typography.caption,\n\n color: theme.palette.lunit_token.core.text_normal,\n backgroundColor: getColorToken('bg', theme, color),\n\n '& .MuiSvgIcon-root': {\n marginBlock: '3px',\n marginLeft: '3px',\n marginRight: '4px',\n height: '16px',\n width: '16px',\n color: getColorToken('text', theme, color),\n },\n '& .MuiChip-avatar': {\n marginBlock: '3px',\n marginLeft: '4px',\n marginRight: '5px',\n height: '14px',\n width: '14px',\n fontSize: '11px',\n fontWeight: 500,\n lineHeight: '16px',\n display: 'flex',\n textAlign: 'center',\n alignItems: 'center',\n color: getColorToken('bg', theme, color),\n backgroundColor: getColorToken('text', theme, color),\n },\n}));\n\nexport const StyledContainedChipEnable = styled(StyledContainedChipBase, {\n shouldForwardProp: (prop) => !['color'].includes(prop.toString()),\n})<EnableContainedChipProps>(() => ({ theme, color }) => ({\n /**\n * Setting the z-index of the chip to 0 and the z-index of the pseudo element to -1\n * allows the pseudo element(hover layer) to be rendered between the chip and the chip's children.\n */\n position: 'relative',\n left: 0,\n right: 0,\n zIndex: 0,\n '&:hover': {\n backgroundColor: getColorToken('bg', theme, color),\n },\n '&:hover::before': {\n position: 'absolute',\n zIndex: -1,\n content: '\"\"',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: theme.palette.lunit_token.core.status_hover,\n borderRadius: '11px',\n },\n}));\n\nexport const StyledContainedChipDeletable = styled(StyledContainedChipBase)<BaseContainedChipProps>(\n () =>\n ({ theme }) => ({\n '& .MuiChip-deleteIcon': {\n marginLeft: '4px',\n marginRight: '3px',\n },\n\n '& .delete-icon-hover-layer': {\n position: 'absolute',\n zIndex: 1000,\n top: 0,\n left: 'auto',\n right: 0,\n bottom: 0,\n opacity: 0,\n color: theme.palette.lunit_token.core.status_hover,\n ':hover': {\n cursor: 'pointer',\n opacity: 1,\n },\n },\n }),\n);\n","import React from 'react';\nimport { Avatar } from '@mui/material';\nimport Close16 from '@lunit/design-system-icons/Close16';\nimport {\n StyledOutlinedChip,\n StyledContainedChipBase,\n StyledContainedChipEnable,\n StyledContainedChipDeletable,\n} from './Chip.styled';\n\nimport type {\n OutlinedChipProps,\n ReadOnlyContainedChipProps,\n EnableContainedChipProps,\n DeletableContainedChipProps,\n ChipProps,\n ChipType,\n ChipThumbnail,\n} from './Chip.types';\n\nconst OutlinedChip = (props: OutlinedChipProps) => {\n const { color = 'primary', ...restProps } = props;\n\n return <StyledOutlinedChip {...restProps} variant=\"outlined\" disabled color={color} />;\n};\n\n/**\n * Conditional styling for contained chip\n */\nconst getAvatar = (thumbnail: ChipThumbnail | undefined) => {\n if (!thumbnail || typeof thumbnail !== 'string') return;\n if (thumbnail.length === 0) return <Avatar />;\n return <Avatar>{thumbnail.slice(0, 1).toLocaleUpperCase()}</Avatar>;\n};\nconst getIcon = (thumbnail: ChipThumbnail | undefined) => {\n if (thumbnail && typeof thumbnail !== 'string') return thumbnail;\n return undefined;\n};\nconst getLabelMargin = (thumbnail: ChipThumbnail | undefined, deletable?: boolean) => {\n return {\n marginLeft: thumbnail ? '0px' : '8px',\n marginRight: deletable ? '0px' : '8px',\n };\n};\n\nconst ReadOnlyContainedChip = (props: ReadOnlyContainedChipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const { color = 'primary', thumbnail, sx, variant, ...restProps } = props;\n\n return (\n <StyledContainedChipBase\n {...restProps}\n disabled\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n '& .MuiChip-label': {\n ...getLabelMargin(thumbnail),\n },\n ...sx,\n }}\n />\n );\n};\n\nconst EnableContainedChip = (props: EnableContainedChipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const { color = 'primary', thumbnail, onClick, variant, ...restProps } = props;\n\n return (\n <StyledContainedChipEnable\n {...restProps}\n onClick={onClick}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n color={color}\n sx={{\n '& .MuiChip-label': {\n ...getLabelMargin(thumbnail),\n },\n }}\n />\n );\n};\n\nconst DeleteIconWithHoverLayer = ({ onClick }: { onClick: () => void }) => {\n return (\n <>\n <Close16 />\n <Close16 className=\"delete-icon-hover-layer\" onClick={onClick} />\n </>\n );\n};\nconst DeletableContainedChip = (props: DeletableContainedChipProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const { color = 'primary', thumbnail, onDelete, sx, variant, ...restProps } = props;\n\n return (\n <StyledContainedChipDeletable\n {...restProps}\n color={color}\n onDelete={onDelete}\n deleteIcon={<DeleteIconWithHoverLayer onClick={onDelete} />}\n avatar={getAvatar(thumbnail)}\n icon={getIcon(thumbnail)}\n sx={{\n '& .MuiChip-label': {\n ...getLabelMargin(thumbnail, Boolean(onDelete)),\n },\n ...sx,\n }}\n />\n );\n};\n\nconst Chip: ChipType = (props: ChipProps) => {\n const { kind, variant, onDelete, onClick, ...restProps } = props;\n\n const isOutlined = kind === 'outlined' || variant === 'outlined';\n\n if (isOutlined) return <OutlinedChip {...props} />;\n if (onClick) return <EnableContainedChip {...props} />;\n if (onDelete) return <DeletableContainedChip {...props} />;\n\n return <ReadOnlyContainedChip {...restProps} />;\n};\n\nexport default Chip;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","CHIP_COLORS","COMMON_STYLES","height","width","minWidth","boxShadow","opacity","padding","marginInline","getColorToken","token","theme","color","palette","lunit_token","component","chip_primary_text","chip_secondary_text","chip_error_text","chip_warning_text","chip_success_text","chip_primary_bg","chip_secondary_bg","chip_error_bg","chip_warning_bg","chip_success_bg","StyledOutlinedChip","styled","shouldForwardProp","includes","toString","typography","caption","borderColor","StyledContainedChipBase","core","text_normal","backgroundColor","marginBlock","marginLeft","marginRight","fontSize","fontWeight","lineHeight","display","textAlign","alignItems","StyledContainedChipEnable","position","left","right","zIndex","content","top","bottom","status_hover","borderRadius","StyledContainedChipDeletable","cursor","OutlinedChip","props","restProps","variant","disabled","getAvatar","thumbnail","length","Avatar","slice","toLocaleUpperCase","getIcon","getLabelMargin","deletable","ReadOnlyContainedChip","sx","avatar","icon","EnableContainedChip","onClick","DeleteIconWithHoverLayer","className","DeletableContainedChip","onDelete","deleteIcon","Boolean","kind"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"components/DataTable/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,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,iBCO7C,EAJkB,KACT,SAAC,EAAAC,IAAG,wB","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/DataTable/DataTable.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import React from \"react\";\nimport { Box } from \"@mui/material\";\n\nconst DataTable = () => {\n return <Box>DataTable</Box>;\n};\n\nexport default DataTable;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Box"],"sourceRoot":""}
1
+ {"version":3,"file":"components/DataTable/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,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,iBCO7C,EAJkB,KACT,SAAC,EAAAC,IAAG,wB","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/DataTable/DataTable.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import React from 'react';\nimport { Box } from '@mui/material';\n\nconst DataTable = () => {\n return <Box>DataTable</Box>;\n};\n\nexport default DataTable;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Box"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"components/DatePicker/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,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,iBCO7C,EAJmB,KACV,SAAC,EAAAC,IAAG,yB","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import React from \"react\";\nimport { Box } from \"@mui/material\";\n\nconst DatePicker = () => {\n return <Box>DatePicker</Box>;\n};\n\nexport default DatePicker;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Box"],"sourceRoot":""}
1
+ {"version":3,"file":"components/DatePicker/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,MAAM,EAA+BC,QAAQ,qBCAvC,EAA+BA,QAAQ,iBCO7C,EAJmB,KACV,SAAC,EAAAC,IAAG,yB","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"@mui/material\"","webpack://@lunit/design-system/./src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","import React from 'react';\nimport { Box } from '@mui/material';\n\nconst DatePicker = () => {\n return <Box>DatePicker</Box>;\n};\n\nexport default DatePicker;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","Box"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>T});const t=require("react/jsx-runtime"),n=require("react"),i=require("react-dom"),r=require("@lunit/design-system-icons"),l=require("@mui/material/styles"),a=(0,l.styled)("div")({display:"flex",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-end",gap:12});function d(e){const{children:o,justifyContent:n,sx:i}=e;return(0,t.jsx)(a,{id:"dialog-action","data-testid":"dialog-action",className:"dialog-action",sx:{justifyContent:n,...i},children:o})}const s={small:{width:"320px",maxWidth:"320px"},medium:{width:"500px",maxWidth:"840px"},modal:{position:"relative"},nonModal:{position:"fixed",top:"30px",right:"30px"}},c={small:{display:"flex",alignItems:"center",height:"52px",maxHeight:"100%",padding:"20px 20px 4px 20px"},medium:{display:"flex",alignItems:"center",height:"64px",maxHeight:"100%",padding:"30px 32px 6px 32px"}},p={small:{paddingInline:"20px calc(20px - 10px)",paddingTop:"8px",paddingBottom:"28px"},smallAction:{paddingInline:"20px calc(20px - 10px)",paddingBlock:"8px"},medium:{paddingInline:"32px calc(32px - 14px)",paddingTop:"16px",paddingBottom:"32px"},mediumAction:{paddingInline:"32px calc(32px - 14px)",paddingBlock:"16px"}},x={small:{height:"64px",padding:"8px 20px 20px 20px"},medium:{height:"84px",padding:"16px 32px 32px 32px"}},m=(0,l.styled)("div")({position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(17, 17, 19, 0.7)",zIndex:1e3,display:"grid",placeItems:"center"}),u=(0,l.styled)("div")(({theme:e,size:o,nonModal:t,type:n})=>({zIndex:1001,maxHeight:"80vh",display:"flex",flexDirection:"column",boxSizing:"border-box",borderRadius:"10px",backgroundColor:e.palette.lunit_token.core.bg_03,color:e.palette.lunit_token.core.text_normal,...s["small"===o?"small":"medium"],...s[t?"nonModal":"modal"],"& #dialog-title":{...c["small"===o?"small":"medium"]},"& #dialog-content":{...p["small"===o&&"passive"!==n?"smallAction":"small"===o?"small":"medium"===o&&"passive"!==n?"mediumAction":"medium"],scrollbarGutter:"stable","::-webkit-scrollbar":{width:"small"===o?"10px":"14px"},"::webkit-scrollbar-track":{background:"transparent"},"::-webkit-scrollbar-thumb":{backgroundClip:"padding-box",border:"2px solid transparent",borderRadius:"10px",backgroundColor:e.palette.lunit_token.component.scrollbars_bg}},"& #dialog-action":{...x["small"===o?"small":"medium"]}})),h=(0,l.styled)("header")({display:"flex",width:"100%",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-start",gap:"8px"}),g=(0,l.styled)("div")({display:"flex",justifyContent:"center",width:"20px",height:"20px","& .MuiSvgIcon-root":{display:"flex",justifyContent:"center",width:"20px",height:"20px",fontSize:"20px"}}),b=(0,l.styled)("div")(({theme:e})=>({...e.typography.body2_14_regular,flex:"1 1 auto",overflowY:"scroll"})),y=require("@mui/material"),_=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||t?"8px 12px":"7px 11px":"outlined"!==e||t?"10px 12px":"9px 11px",f=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px":"3px":"medium"===o?"outlined"!==e||t?"8px":"7px":"outlined"!==e||t?"12px":"11px",k=e=>({position:"relative",zIndex:0,backgroundColor:e}),v="8px",I=({size:e,kind:o,hasIconOnly:t,typography:n,selected:i=!1})=>({..."small"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...n.button1,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"44px",height:"44px"}}),j=({kind:e,color:o,lunit_token:t})=>({..."contained"===e&&"primary"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_primary_bg,"&:hover":k(t.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,backgroundColor:t.component.btn_secondary_bg,"&:hover":k(t.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_error_bg,"&:hover":k(t.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:t.component.btn_error_text,"&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:`1px solid ${t.component.btn_primary_border}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:`1px solid ${t.core.border_medium}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_secondary_text}}}),z=({lunit_token:e})=>({fontWeight:"500",borderRadius:v,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.hover,borderRadius:v}}),w=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),C=(0,l.styled)(y.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})(({theme:{typography:e,palette:{lunit_token:o}},kind:t,size:n,color:i,hasIconOnly:r})=>({...z({lunit_token:o}),...w({size:n,hasIconOnly:r}),...I({size:n,kind:t,hasIconOnly:r,typography:e}),...j({kind:t,color:i,lunit_token:o})})),O=(0,n.forwardRef)((e,o)=>{const{kind:n,variant:i,icon:r,children:l,startIcon:a}=e,d=Boolean((a||r)&&!l);return"outlined"===n||"outlined"===i?(0,t.jsx)(R,{...e,ref:o,hasIconOnly:d}):"ghost"===n||"text"===i||"ghost"===i?(0,t.jsx)(M,{...e,ref:o,hasIconOnly:d}):(0,t.jsx)(N,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:d})}),M=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:l,startIcon:a,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`ghost ${r||""}`,kind:"ghost",color:e.color??"primary",size:n,startIcon:a||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:l})})}),R=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:l,startIcon:a,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`outlined ${r||""}`,kind:"outlined",color:e.color??"primary",size:n,startIcon:a||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:l})})}),N=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:l,startIcon:a,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(C,{...c,ref:o,className:`${e.kind??"contained"} ${r||""}`,kind:e.kind??"contained",color:e.color??"primary",size:n,startIcon:a||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:l})})}),$=O,S=require("@mui/material/Typography");var P=e.n(S);const B=e=>(0,t.jsx)(P(),{...e});function q({dialogProps:e}){const{nonModal:o=!1,onClose:n,title:i,titleIcon:l,titleVariant:a="headline5",children:s,actions:c,type:p,size:x="small",sx:m,style:y,className:_}=e;return(0,t.jsxs)(u,{role:"dialog","aria-labelledby":"dialog-title",size:x,nonModal:o,type:p,sx:{...m},style:y,className:`dialog elevation2 ${_??""}`,children:[(0,t.jsxs)(h,{id:"dialog-title",className:"dialog-title-wrapper",children:[l&&(0,t.jsx)(g,{className:"dialog-title-icon",children:l}),(0,t.jsx)(B,{component:"h2",id:"dialog-title-text",variant:a,children:i}),"passive"===p&&(0,t.jsx)($,{id:"dialog-title-close-button","data-testid":"dialog-title-close-button",kind:"ghost",color:"secondary",icon:(0,t.jsx)(r.Close,{}),onClick:n,sx:{marginRight:0,marginLeft:"auto"}})]}),(0,t.jsx)(b,{id:"dialog-content",children:s}),"action"===p&&null!==c?(0,t.jsx)(d,{children:c}):null]})}const T=function(e){const{isOpen:o,type:r,nonModal:l=!1,onClose:a}=e,d="action"===r&&!l,s="passive"===r&&!l;return(0,n.useEffect)(()=>{if(o&&s)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&a()}},[o,s,a]),o?(0,i.createPortal)(l?(0,t.jsx)(q,{dialogProps:{...e}}):(0,t.jsx)(m,{onClick:function(o){(s||d&&e.enableBackdropClose)&&o.target===o.currentTarget&&a()},"data-testid":"dialog-backdrop",children:(0,t.jsx)(q,{dialogProps:{...e}})}),document.body):null};module.exports=o})();
1
+ (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>q});const t=require("react/jsx-runtime"),n=require("react"),i=require("react-dom"),r=require("@lunit/design-system-icons"),a=require("@mui/material/styles"),l=(0,a.styled)("div")({display:"flex",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-end",gap:12});function d(e){const{children:o,justifyContent:n,sx:i}=e;return(0,t.jsx)(l,{id:"dialog-action","data-testid":"dialog-action",className:"dialog-action",sx:{justifyContent:n,...i},children:o})}const s={small:{width:"320px",maxWidth:"320px"},medium:{width:"500px",maxWidth:"840px"},modal:{position:"relative"},nonModal:{position:"fixed",top:"30px",right:"30px"}},c={small:{display:"flex",alignItems:"center",height:"52px",maxHeight:"100%",padding:"20px 20px 4px 20px"},medium:{display:"flex",alignItems:"center",height:"64px",maxHeight:"100%",padding:"30px 32px 6px 32px"}},p={small:{paddingInline:"20px calc(20px - 10px)",paddingTop:"8px",paddingBottom:"28px"},smallAction:{paddingInline:"20px calc(20px - 10px)",paddingBlock:"8px"},medium:{paddingInline:"32px calc(32px - 14px)",paddingTop:"16px",paddingBottom:"32px"},mediumAction:{paddingInline:"32px calc(32px - 14px)",paddingBlock:"16px"}},x={small:{height:"64px",padding:"8px 20px 20px 20px"},medium:{height:"84px",padding:"16px 32px 32px 32px"}},m=(0,a.styled)("div")({position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(17, 17, 19, 0.7)",zIndex:1e3,display:"grid",placeItems:"center"}),u=(0,a.styled)("div")(({theme:e,size:o,nonModal:t,type:n})=>({zIndex:1001,maxHeight:"80vh",display:"flex",flexDirection:"column",boxSizing:"border-box",borderRadius:"10px",backgroundColor:e.palette.lunit_token.core.bg_03,color:e.palette.lunit_token.core.text_normal,...s["small"===o?"small":"medium"],...s[t?"nonModal":"modal"],"& #dialog-title":{...c["small"===o?"small":"medium"]},"& #dialog-content":{...p["small"===o&&"passive"!==n?"smallAction":"small"===o?"small":"medium"===o&&"passive"!==n?"mediumAction":"medium"],scrollbarGutter:"stable","::-webkit-scrollbar":{width:"small"===o?"10px":"14px"},"::webkit-scrollbar-track":{background:"transparent"},"::-webkit-scrollbar-thumb":{backgroundClip:"padding-box",border:"2px solid transparent",borderRadius:"10px",backgroundColor:e.palette.lunit_token.component.scrollbars_bg}},"& #dialog-action":{...x["small"===o?"small":"medium"]}})),h=(0,a.styled)("header")({display:"flex",width:"100%",flex:"0 0 auto",alignItems:"center",justifyContent:"flex-start",gap:"8px"}),g=(0,a.styled)("div")({display:"flex",justifyContent:"center",width:"20px",height:"20px","& .MuiSvgIcon-root":{display:"flex",justifyContent:"center",width:"20px",height:"20px",fontSize:"20px"}}),b=(0,a.styled)("div")(({theme:e})=>({...e.typography.body2_14_regular,flex:"1 1 auto",overflowY:"scroll"})),y=require("@mui/material"),_=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px 8px":"3px 7px":"medium"===o?"outlined"!==e||t?"8px 12px":"7px 11px":"outlined"!==e||t?"10px 12px":"9px 11px",f=({kind:e,size:o,selected:t=!1})=>"small"===o?"outlined"!==e||t?"4px":"3px":"medium"===o?"outlined"!==e||t?"8px":"7px":"outlined"!==e||t?"12px":"11px",k=e=>({position:"relative",zIndex:0,backgroundColor:e}),v="8px",I=({size:e,kind:o,hasIconOnly:t,typography:n,selected:i=!1})=>({..."small"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"28px",height:"28px"},..."medium"===e&&{...n.button2,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"36px",height:"36px"},..."large"===e&&{...n.button1,padding:`${t?f({kind:o,size:e,selected:i}):_({kind:o,size:e,selected:i})}`,minWidth:"44px",height:"44px"}}),j=({kind:e,color:o,lunit_token:t})=>({..."contained"===e&&"primary"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_primary_bg,"&:hover":k(t.component.btn_primary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."contained"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,backgroundColor:t.component.btn_secondary_bg,"&:hover":k(t.component.btn_secondary_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."contained"===e&&"error"===o&&{color:t.component.btn_primary_text_2,backgroundColor:t.component.btn_error_bg,"&:hover":k(t.component.btn_error_bg),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_2}},..."ghost"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_primary_text_1}},..."ghost"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:"none","&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_secondary_text}},..."ghost"===e&&"error"===o&&{color:t.component.btn_error_text,"&:hover":k("none"),"&.Mui-disabled":{opacity:.38,border:"none",color:t.component.btn_error_text}},..."outlined"===e&&"primary"===o&&{color:t.component.btn_primary_text_1,border:`1px solid ${t.component.btn_primary_border}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.status_hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_primary_text_1}},..."outlined"===e&&"secondary"===o&&{color:t.component.btn_secondary_text,border:`1px solid ${t.core.border_medium}`,"&:hover":k("none"),"&:hover:before":{content:"''",position:"absolute",left:"-1px",top:"-1px",width:"calc(100% + 2px)",height:"calc(100% + 2px)",zIndex:-1,backgroundColor:t.core.status_hover,borderRadius:v},"&.Mui-disabled":{opacity:.38,color:t.component.btn_secondary_text}}}),z=({lunit_token:e})=>({fontWeight:"500",borderRadius:v,textTransform:"initial","&.Mui-focusVisible":{"&::after":{position:"absolute",width:"calc(100% + 6px)",height:"calc(100% + 6px)",content:'""',borderRadius:"11px",border:`1px solid ${e.core.status_focused}`,boxSizing:"border-box"}},"&:hover:before":{content:"''",position:"absolute",left:0,top:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.core.status_hover,borderRadius:v}}),C=({size:e,hasIconOnly:o})=>({"& .MuiButton-startIcon":{margin:0,marginRight:o?"0px":"large"===e?"8px":"4px","*:nth-of-type(1)":{fontSize:"20px"}}}),w=(0,a.styled)(y.Button,{shouldForwardProp:e=>!["kind","hasIconOnly","variant"].includes(e)})(({theme:{typography:e,palette:{lunit_token:o}},kind:t,size:n,color:i,hasIconOnly:r})=>({...z({lunit_token:o}),...C({size:n,hasIconOnly:r}),...I({size:n,kind:t,hasIconOnly:r,typography:e}),...j({kind:t,color:i,lunit_token:o})})),O=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(w,{...c,ref:o,className:`ghost ${r||""}`,kind:"ghost",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})}),M=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(w,{...c,ref:o,className:`outlined ${r||""}`,kind:"outlined",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})}),R=(0,n.forwardRef)((e,o)=>{const{size:n="small",icon:i,className:r,children:a,startIcon:l,hasIconOnly:d,variant:s,...c}=e;return(0,t.jsx)(w,{...c,ref:o,className:`${e.kind??"contained"} ${r||""}`,kind:e.kind??"contained",color:e.color??"primary",size:n,startIcon:l||i,hasIconOnly:d,children:!d&&(0,t.jsx)(t.Fragment,{children:a})})}),N=(0,n.forwardRef)((e,o)=>{const{kind:n,variant:i,icon:r,children:a,startIcon:l}=e,d=Boolean((l||r)&&!a);return"outlined"===n||"outlined"===i?(0,t.jsx)(M,{...e,ref:o,hasIconOnly:d}):"ghost"===n||"text"===i||"ghost"===i?(0,t.jsx)(O,{...e,ref:o,hasIconOnly:d}):(0,t.jsx)(R,{...e,kind:"contained",variant:"contained",ref:o,hasIconOnly:d})}),$=require("@mui/material/Typography");var S=e.n($);const B=e=>(0,t.jsx)(S(),{...e});function P({dialogProps:e}){const{nonModal:o=!1,onClose:n,title:i,titleIcon:a,titleVariant:l="headline5",children:s,actions:c,type:p,size:x="small",sx:m,style:y,className:_}=e;return(0,t.jsxs)(u,{role:"dialog","aria-labelledby":"dialog-title",size:x,nonModal:o,type:p,sx:{...m},style:y,className:`dialog elevation2 ${_??""}`,children:[(0,t.jsxs)(h,{id:"dialog-title",className:"dialog-title-wrapper",children:[a&&(0,t.jsx)(g,{className:"dialog-title-icon",children:a}),(0,t.jsx)(B,{component:"h2",id:"dialog-title-text",variant:l,children:i}),"passive"===p&&(0,t.jsx)(N,{id:"dialog-title-close-button","data-testid":"dialog-title-close-button",kind:"ghost",color:"secondary",icon:(0,t.jsx)(r.Close,{}),onClick:n,sx:{marginRight:0,marginLeft:"auto"}})]}),(0,t.jsx)(b,{id:"dialog-content",children:s}),"action"===p&&null!==c?(0,t.jsx)(d,{children:c}):null]})}const q=function(e){const{isOpen:o,type:r,nonModal:a=!1,onClose:l}=e,d="action"===r&&!a,s="passive"===r&&!a,c=(0,n.useCallback)(o=>{(s||d&&e.enableBackdropClose)&&o.target===o.currentTarget&&l()},[s,d,e.enableBackdropClose,l]);return(0,n.useEffect)(()=>{if(o&&s)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&l()}},[o,s,l]),o?(0,i.createPortal)(a?(0,t.jsx)(P,{dialogProps:{...e}}):(0,t.jsx)(m,{onClick:c,"data-testid":"dialog-backdrop",children:(0,t.jsx)(P,{dialogProps:{...e}})}),document.body):null};module.exports=o})();
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/Dialog/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,EAAo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,KAAK,QACLhB,MAAM,YACNmD,MAAM,SAAC,EAAAgB,MAAK,IACZC,QAASR,EACTrG,GAAI,CACFoF,YAAa,EACb0B,WAAY,cAKpB,SAAC1D,EAAmB,CAACnD,GAAG,iBAAgB,SAAEF,IAChC,WAATkC,GAAiC,OAAZwE,GAGpB,SAAC5G,EAAY,UAAE4G,IACb,OAGV,CAEA,QAnHA,SAAgB3G,GACd,MAAM,OAAEiH,EAAM,KAAE9E,EAAI,SAAEvB,GAAW,EAAK,QAAE2F,GAAYvG,EAE9CkH,EAAyB,WAAT/E,IAAsBvB,EACtCuG,EAA0B,YAAThF,IAAuBvB,EA2B9C,OAfA,IAAAwG,WAAU,KAER,GADmBH,GAAUE,EAS7B,OAFAE,SAASC,iBAAiB,UAAWC,GAE9B,KACLF,SAASG,oBAAoB,UAAWD,IAP1C,SAASA,EAAeE,GACJ,WAAdA,EAAMhJ,KAAkB8H,GAC9B,GAOC,CAACU,EAAQE,EAAgBZ,IAEvBU,GACE,IAAAS,cACL9G,GACE,SAACyF,EAAU,CAACC,YAAa,IAAKtG,MAE9B,SAAC2B,EAAc,CACboF,QA/BN,SAA6BY,IAEzBR,GAAmBD,GAAiBlH,EAAM4H,sBAGxCD,EAAEE,SAAWF,EAAEG,eAEnBvB,GACF,EAuBkC,cAChB,kBAAiB,UAE7B,SAACF,EAAU,CAACC,YAAa,IAAKtG,OAIlCqH,SAASU,MAbS,IAetB,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"react-dom\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Dialog/components/DialogAction.tsx","webpack://@lunit/design-system/./src/components/Dialog/Dialog.styled.ts","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","webpack://@lunit/design-system/external commonjs \"@mui/material/Typography\"","webpack://@lunit/design-system/./src/components/Typography/Typography.tsx","webpack://@lunit/design-system/./src/components/Dialog/Dialog.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(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import React from \"react\";\nimport { styled } from \"@mui/material/styles\";\n\ninterface DialogActionProps {\n children: React.ReactNode;\n justifyContent?: React.CSSProperties[\"justifyContent\"];\n sx?: React.CSSProperties;\n}\n\nconst StyledDialogActions = styled(\"div\")({\n display: \"flex\",\n flex: \"0 0 auto\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: 12,\n});\n\nexport function DialogAction(props: DialogActionProps) {\n const { children, justifyContent, sx } = props;\n\n return (\n <StyledDialogActions\n id=\"dialog-action\"\n data-testid=\"dialog-action\"\n className=\"dialog-action\"\n sx={{\n justifyContent,\n ...sx,\n }}\n >\n {children}\n </StyledDialogActions>\n );\n}\n\nexport default DialogAction;\n","import { styled } from \"@mui/material/styles\";\n\nimport type { DialogBase } from \"./Dialog\";\nimport type { CSSObject } from \"@mui/material/styles\";\n\nexport interface DialogElementStyle {\n [key: string]: CSSObject;\n}\n\nexport type DialogStyle = Pick<DialogBase, \"size\" | \"type\" | \"nonModal\">;\n\nconst DIALOG_WRAPPER_STYLE: DialogElementStyle = {\n small: {\n width: \"320px\",\n maxWidth: \"320px\",\n },\n medium: {\n width: \"500px\",\n maxWidth: \"840px\",\n },\n modal: {\n position: \"relative\",\n },\n nonModal: {\n position: \"fixed\",\n top: \"30px\",\n right: \"30px\",\n },\n};\n\nconst DIALOG_TITLE_STYLE: DialogElementStyle = {\n small: {\n display: \"flex\",\n alignItems: \"center\",\n height: \"52px\",\n maxHeight: \"100%\",\n padding: \"20px 20px 4px 20px\", // Title's X button pluses 2px to paddingTop and Bottom\n },\n medium: {\n display: \"flex\",\n alignItems: \"center\",\n height: \"64px\",\n maxHeight: \"100%\",\n padding: \"30px 32px 6px 32px\", // Title's X button pluses 2px to paddingTop and Bottom\n },\n};\n\nconst DIALOG_CONTENT_STYLE: DialogElementStyle = {\n small: {\n paddingInline: \"20px calc(20px - 10px)\",\n paddingTop: \"8px\",\n paddingBottom: \"28px\",\n },\n smallAction: {\n paddingInline: \"20px calc(20px - 10px)\",\n paddingBlock: \"8px\",\n },\n medium: {\n paddingInline: \"32px calc(32px - 14px)\",\n paddingTop: \"16px\",\n paddingBottom: \"32px\",\n },\n mediumAction: {\n paddingInline: \"32px calc(32px - 14px)\",\n paddingBlock: \"16px\",\n },\n};\n\nconst DIALOG_ACTION_STYLE: DialogElementStyle = {\n small: {\n height: \"64px\",\n padding: \"8px 20px 20px 20px\",\n },\n medium: {\n height: \"84px\",\n padding: \"16px 32px 32px 32px\",\n },\n};\n\nexport const StyledBackdrop = styled(\"div\")({\n position: \"fixed\",\n top: 0,\n left: 0,\n width: \"100%\",\n height: \"100%\",\n backgroundColor: \"rgba(17, 17, 19, 0.7)\",\n zIndex: 1000,\n display: \"grid\",\n placeItems: \"center\",\n});\n\nexport const StyledDialog = styled(\"div\")<DialogStyle>(\n ({ theme, size, nonModal, type }) => ({\n zIndex: 1001,\n maxHeight: \"80vh\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n borderRadius: \"10px\",\n backgroundColor: theme.palette.lunit_token.core.bg_03,\n color: theme.palette.lunit_token.core.text_normal,\n\n ...DIALOG_WRAPPER_STYLE[size === \"small\" ? \"small\" : \"medium\"],\n ...DIALOG_WRAPPER_STYLE[nonModal ? \"nonModal\" : \"modal\"],\n\n \"& #dialog-title\": {\n ...DIALOG_TITLE_STYLE[size === \"small\" ? \"small\" : \"medium\"],\n },\n\n \"& #dialog-content\": {\n ...DIALOG_CONTENT_STYLE[\n size === \"small\" && type !== \"passive\"\n ? \"smallAction\"\n : size === \"small\"\n ? \"small\"\n : size === \"medium\" && type !== \"passive\"\n ? \"mediumAction\"\n : \"medium\"\n ],\n\n scrollbarGutter: \"stable\",\n \"::-webkit-scrollbar\": {\n width: size === \"small\" ? \"10px\" : \"14px\",\n },\n \"::webkit-scrollbar-track\": {\n background: \"transparent\",\n },\n \"::-webkit-scrollbar-thumb\": {\n backgroundClip: \"padding-box\",\n border: `2px solid transparent`,\n /**\n * Figma's border-radius is 6px, but actual border radius is 10px since padding 2px is added.\n */\n borderRadius: \"10px\",\n backgroundColor: theme.palette.lunit_token.component.scrollbars_bg,\n },\n },\n\n \"& #dialog-action\": {\n ...DIALOG_ACTION_STYLE[size === \"small\" ? \"small\" : \"medium\"],\n },\n })\n);\n\nexport const StyledDialogTitle = styled(\"header\")({\n display: \"flex\",\n width: \"100%\",\n flex: \"0 0 auto\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n gap: \"8px\",\n});\n\nexport const StyledDialogTitleIconWrapper = styled(\"div\")({\n display: \"flex\",\n justifyContent: \"center\",\n width: \"20px\",\n height: \"20px\",\n \"& .MuiSvgIcon-root\": {\n display: \"flex\",\n justifyContent: \"center\",\n width: \"20px\",\n height: \"20px\",\n fontSize: \"20px\",\n },\n});\n\nexport const StyledDialogContent = styled(\"div\")(({ theme }) => ({\n ...theme.typography.body2_14_regular,\n flex: \"1 1 auto\",\n overflowY: \"scroll\",\n}));\n","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","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Typography\");","import React from \"react\";\nimport MuiTypography from \"@mui/material/Typography\";\n\nimport type { TypographyProps } from \"@mui/material/Typography\";\nimport type { TypographyPropsVariantOverridesType } from \"../../foundation/Typography\";\n\ndeclare module \"@mui/material/Typography\" {\n interface TypographyPropsVariantOverrides\n extends TypographyPropsVariantOverridesType {}\n}\n\nconst Typography = <C extends React.ElementType>(\n props: TypographyProps<C, { component?: C }>\n) => {\n return <MuiTypography {...props} />;\n};\n\nexport default Typography;\n","import React, { useEffect } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { Close } from \"@lunit/design-system-icons\";\n\nimport { DialogAction } from \"./components/DialogAction\";\nimport {\n StyledBackdrop,\n StyledDialog,\n StyledDialogContent,\n StyledDialogTitle,\n StyledDialogTitleIconWrapper,\n} from \"./Dialog.styled\";\nimport Button from \"../Button\";\nimport Typography from \"../Typography\";\n\nimport type { SxProps } from \"@mui/material/styles\";\nimport type { TypographyProps } from \"@mui/material\";\n\nexport interface DialogBase {\n isOpen: boolean;\n onClose(): void;\n type?: \"passive\" | \"action\"; // default passive\n nonModal?: boolean; // default false\n title: string;\n titleIcon?: React.ReactNode;\n titleVariant?: TypographyProps[\"variant\"];\n children: React.ReactNode;\n actions?: React.ReactNode;\n enableBackdropClose?: boolean;\n size?: \"small\" | \"medium\"; // default \"small\"\n sx?: SxProps;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport interface PassiveDialogType extends DialogBase {\n type: \"passive\";\n actions?: undefined;\n enableBackdropClose?: true;\n}\nexport interface ActionDialogType extends DialogBase {\n type: \"action\";\n actions: React.ReactNode;\n enableBackdropClose?: boolean;\n}\n\nexport interface PassiveModalProps extends PassiveDialogType {\n nonModal?: false;\n}\nexport interface ActionModalProps extends ActionDialogType {\n nonModal?: false;\n}\nexport type ModalProps = PassiveModalProps | ActionModalProps;\n\nexport interface PassiveNonModalProps extends PassiveDialogType {\n nonModal?: true;\n}\nexport interface ActionNonModalProps extends ActionDialogType {\n nonModal?: true;\n enableBackdropClose?: false;\n}\nexport type NonModalProps = PassiveNonModalProps | ActionNonModalProps;\n\nexport type DialogProps = ModalProps | NonModalProps;\n\nfunction Dialog(props: DialogProps) {\n const { isOpen, type, nonModal = false, onClose } = props;\n\n const isActionModal = type === \"action\" && !nonModal;\n const isPassiveModal = type === \"passive\" && !nonModal;\n\n function handleBackdropClose(e: React.MouseEvent<HTMLDivElement>) {\n const isClosable =\n isPassiveModal || (isActionModal && props.enableBackdropClose);\n\n if (!isClosable) return;\n if (e.target !== e.currentTarget) return;\n\n onClose();\n }\n\n useEffect(() => {\n const isClosable = isOpen && isPassiveModal;\n if (!isClosable) return;\n\n function handleEscClose(event: KeyboardEvent) {\n if (event.key === \"Escape\") onClose();\n }\n\n document.addEventListener(\"keydown\", handleEscClose);\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscClose);\n };\n }, [isOpen, isPassiveModal, onClose]);\n\n if (!isOpen) return null;\n return createPortal(\n nonModal ? (\n <DialogBase dialogProps={{ ...props }} />\n ) : (\n <StyledBackdrop\n onClick={handleBackdropClose}\n data-testid=\"dialog-backdrop\"\n >\n <DialogBase dialogProps={{ ...props }} />\n </StyledBackdrop>\n ),\n\n document.body\n );\n}\n\nfunction DialogBase({ dialogProps }: { dialogProps: DialogBase }) {\n const {\n nonModal = false,\n onClose,\n title,\n titleIcon,\n titleVariant = \"headline5\",\n children,\n actions,\n type,\n size = \"small\",\n sx,\n style,\n className,\n } = dialogProps;\n\n return (\n <StyledDialog\n role=\"dialog\"\n aria-labelledby=\"dialog-title\"\n size={size}\n nonModal={nonModal}\n type={type}\n sx={{\n ...sx,\n }}\n style={style}\n className={`dialog elevation2 ${className ?? \"\"}`}\n >\n <StyledDialogTitle id=\"dialog-title\" className=\"dialog-title-wrapper\">\n {titleIcon && (\n <StyledDialogTitleIconWrapper className=\"dialog-title-icon\">\n {titleIcon}\n </StyledDialogTitleIconWrapper>\n )}\n <Typography\n component=\"h2\"\n id=\"dialog-title-text\"\n variant={titleVariant}\n >\n {title}\n </Typography>\n {type === \"passive\" && (\n <Button\n id=\"dialog-title-close-button\"\n data-testid=\"dialog-title-close-button\"\n kind=\"ghost\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n sx={{\n marginRight: 0,\n marginLeft: \"auto\",\n }}\n />\n )}\n </StyledDialogTitle>\n <StyledDialogContent id=\"dialog-content\">{children}</StyledDialogContent>\n {type === \"action\" && actions !== null ? (\n // `actions !== null` is used to not render DialogAction when actions is undefined\n // There was a case when actions is undefined, but DialogAction is rendered with null children\n <DialogAction>{actions}</DialogAction>\n ) : null}\n </StyledDialog>\n );\n}\n\nexport default Dialog;\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","StyledDialogActions","styled","display","flex","alignItems","justifyContent","gap","DialogAction","props","children","sx","id","className","DIALOG_WRAPPER_STYLE","small","width","maxWidth","medium","modal","position","nonModal","top","right","DIALOG_TITLE_STYLE","height","maxHeight","padding","DIALOG_CONTENT_STYLE","paddingInline","paddingTop","paddingBottom","smallAction","paddingBlock","mediumAction","DIALOG_ACTION_STYLE","StyledBackdrop","left","backgroundColor","zIndex","placeItems","StyledDialog","theme","size","type","flexDirection","boxSizing","borderRadius","palette","lunit_token","core","bg_03","color","text_normal","scrollbarGutter","background","backgroundClip","border","component","scrollbars_bg","StyledDialogTitle","StyledDialogTitleIconWrapper","fontSize","StyledDialogContent","typography","body2_14_regular","overflowY","getButtonPaddingBySizeAndKind","kind","selected","getIconButtonPaddingBySizeAndKind","sizeStyle","hasIconOnly","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","hover","border_medium","commonStyle","fontWeight","textTransform","focused","iconStyle","margin","marginRight","CustomButton","shouldForwardProp","includes","Button","forwardRef","ref","variant","icon","startIcon","Boolean","OutlinedButton","GhostButton","ContainedButton","restProps","DialogBase","dialogProps","onClose","title","titleIcon","titleVariant","actions","style","role","Close","onClick","marginLeft","isOpen","isActionModal","isPassiveModal","useEffect","document","addEventListener","handleEscClose","removeEventListener","event","createPortal","e","enableBackdropClose","target","currentTarget","body"],"sourceRoot":""}
1
+ {"version":3,"file":"components/Dialog/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,O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GV,CAEA,QA9GA,SAAgB3G,GACd,MAAM,OAAEiH,EAAM,KAAE9E,EAAI,SAAEvB,GAAW,EAAK,QAAE2F,GAAYvG,EAE9CkH,EAAyB,WAAT/E,IAAsBvB,EACtCuG,EAA0B,YAAThF,IAAuBvB,EAExCwG,GAAsB,IAAAC,aACzBC,KACoBH,GAAmBD,GAAiBlH,EAAMuH,sBAGzDD,EAAEE,SAAWF,EAAEG,eAEnBlB,KAEF,CAACY,EAAgBD,EAAelH,EAAMuH,oBAAqBhB,IAkB7D,OAfA,IAAAmB,WAAU,KAER,GADmBT,GAAUE,EAS7B,OAFAQ,SAASC,iBAAiB,UAAWC,GAE9B,KACLF,SAASG,oBAAoB,UAAWD,IAP1C,SAASA,EAAeE,GACJ,WAAdA,EAAMtJ,KAAkB8H,GAC9B,GAOC,CAACU,EAAQE,EAAgBZ,IAEvBU,GACE,IAAAe,cACLpH,GACE,SAACyF,EAAU,CAACC,YAAa,IAAKtG,MAE9B,SAAC2B,EAAc,CAACoF,QAASK,EAAmB,cAAc,kBAAiB,UACzE,SAACf,EAAU,CAACC,YAAa,IAAKtG,OAIlC2H,SAASM,MAVS,IAYtB,E","sources":["webpack://@lunit/design-system/webpack/bootstrap","webpack://@lunit/design-system/webpack/runtime/compat get default export","webpack://@lunit/design-system/webpack/runtime/define property getters","webpack://@lunit/design-system/webpack/runtime/hasOwnProperty shorthand","webpack://@lunit/design-system/webpack/runtime/make namespace object","webpack://@lunit/design-system/external commonjs \"react/jsx-runtime\"","webpack://@lunit/design-system/external commonjs \"react\"","webpack://@lunit/design-system/external commonjs \"react-dom\"","webpack://@lunit/design-system/external commonjs \"@lunit/design-system-icons\"","webpack://@lunit/design-system/external commonjs \"@mui/material/styles\"","webpack://@lunit/design-system/./src/components/Dialog/components/DialogAction.tsx","webpack://@lunit/design-system/./src/components/Dialog/Dialog.styled.ts","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","webpack://@lunit/design-system/external commonjs \"@mui/material/Typography\"","webpack://@lunit/design-system/./src/components/Typography/Typography.tsx","webpack://@lunit/design-system/./src/components/Dialog/Dialog.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(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@lunit/design-system-icons\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/styles\");","import React from 'react';\nimport { styled } from '@mui/material/styles';\n\ninterface DialogActionProps {\n children: React.ReactNode;\n justifyContent?: React.CSSProperties['justifyContent'];\n sx?: React.CSSProperties;\n}\n\nconst StyledDialogActions = styled('div')({\n display: 'flex',\n flex: '0 0 auto',\n alignItems: 'center',\n justifyContent: 'flex-end',\n gap: 12,\n});\n\nexport function DialogAction(props: DialogActionProps) {\n const { children, justifyContent, sx } = props;\n\n return (\n <StyledDialogActions\n id=\"dialog-action\"\n data-testid=\"dialog-action\"\n className=\"dialog-action\"\n sx={{\n justifyContent,\n ...sx,\n }}\n >\n {children}\n </StyledDialogActions>\n );\n}\n\nexport default DialogAction;\n","import { styled } from '@mui/material/styles';\n\nimport type { DialogBaseProps } from './Dialog';\nimport type { CSSObject } from '@mui/material/styles';\n\nexport interface DialogElementStyle {\n [key: string]: CSSObject;\n}\n\nexport type DialogStyle = Pick<DialogBaseProps, 'size' | 'type' | 'nonModal'>;\n\nconst DIALOG_WRAPPER_STYLE: DialogElementStyle = {\n small: {\n width: '320px',\n maxWidth: '320px',\n },\n medium: {\n width: '500px',\n maxWidth: '840px',\n },\n modal: {\n position: 'relative',\n },\n nonModal: {\n position: 'fixed',\n top: '30px',\n right: '30px',\n },\n};\n\nconst DIALOG_TITLE_STYLE: DialogElementStyle = {\n small: {\n display: 'flex',\n alignItems: 'center',\n height: '52px',\n maxHeight: '100%',\n padding: '20px 20px 4px 20px', // Title's X button pluses 2px to paddingTop and Bottom\n },\n medium: {\n display: 'flex',\n alignItems: 'center',\n height: '64px',\n maxHeight: '100%',\n padding: '30px 32px 6px 32px', // Title's X button pluses 2px to paddingTop and Bottom\n },\n};\n\nconst DIALOG_CONTENT_STYLE: DialogElementStyle = {\n small: {\n paddingInline: '20px calc(20px - 10px)',\n paddingTop: '8px',\n paddingBottom: '28px',\n },\n smallAction: {\n paddingInline: '20px calc(20px - 10px)',\n paddingBlock: '8px',\n },\n medium: {\n paddingInline: '32px calc(32px - 14px)',\n paddingTop: '16px',\n paddingBottom: '32px',\n },\n mediumAction: {\n paddingInline: '32px calc(32px - 14px)',\n paddingBlock: '16px',\n },\n};\n\nconst DIALOG_ACTION_STYLE: DialogElementStyle = {\n small: {\n height: '64px',\n padding: '8px 20px 20px 20px',\n },\n medium: {\n height: '84px',\n padding: '16px 32px 32px 32px',\n },\n};\n\nexport const StyledBackdrop = styled('div')({\n position: 'fixed',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'rgba(17, 17, 19, 0.7)',\n zIndex: 1000,\n display: 'grid',\n placeItems: 'center',\n});\n\nexport const StyledDialog = styled('div')<DialogStyle>(({ theme, size, nonModal, type }) => ({\n zIndex: 1001,\n maxHeight: '80vh',\n display: 'flex',\n flexDirection: 'column',\n boxSizing: 'border-box',\n borderRadius: '10px',\n backgroundColor: theme.palette.lunit_token.core.bg_03,\n color: theme.palette.lunit_token.core.text_normal,\n\n ...DIALOG_WRAPPER_STYLE[size === 'small' ? 'small' : 'medium'],\n ...DIALOG_WRAPPER_STYLE[nonModal ? 'nonModal' : 'modal'],\n\n '& #dialog-title': {\n ...DIALOG_TITLE_STYLE[size === 'small' ? 'small' : 'medium'],\n },\n\n '& #dialog-content': {\n ...DIALOG_CONTENT_STYLE[\n size === 'small' && type !== 'passive'\n ? 'smallAction'\n : size === 'small'\n ? 'small'\n : size === 'medium' && type !== 'passive'\n ? 'mediumAction'\n : 'medium'\n ],\n\n scrollbarGutter: 'stable',\n '::-webkit-scrollbar': {\n width: size === 'small' ? '10px' : '14px',\n },\n '::webkit-scrollbar-track': {\n background: 'transparent',\n },\n '::-webkit-scrollbar-thumb': {\n backgroundClip: 'padding-box',\n border: `2px solid transparent`,\n /**\n * Figma's border-radius is 6px, but actual border radius is 10px since padding 2px is added.\n */\n borderRadius: '10px',\n backgroundColor: theme.palette.lunit_token.component.scrollbars_bg,\n },\n },\n\n '& #dialog-action': {\n ...DIALOG_ACTION_STYLE[size === 'small' ? 'small' : 'medium'],\n },\n}));\n\nexport const StyledDialogTitle = styled('header')({\n display: 'flex',\n width: '100%',\n flex: '0 0 auto',\n alignItems: 'center',\n justifyContent: 'flex-start',\n gap: '8px',\n});\n\nexport const StyledDialogTitleIconWrapper = styled('div')({\n display: 'flex',\n justifyContent: 'center',\n width: '20px',\n height: '20px',\n '& .MuiSvgIcon-root': {\n display: 'flex',\n justifyContent: 'center',\n width: '20px',\n height: '20px',\n fontSize: '20px',\n },\n});\n\nexport const StyledDialogContent = styled('div')(({ theme }) => ({\n ...theme.typography.body2_14_regular,\n flex: '1 1 auto',\n overflowY: 'scroll',\n}));\n","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<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 getIconButtonPaddingBySizeAndKind = ({\n kind,\n size,\n selected = false,\n}: GetIconButtonPaddingBySizeAndKindProps) => {\n if (size === 'small') {\n return kind === 'outlined' && !selected ? `${4 - OUTLINED_BORDER_WIDTH}px` : '4px';\n }\n\n if (size === 'medium') {\n return kind === 'outlined' && !selected ? `${8 - OUTLINED_BORDER_WIDTH}px` : '8px';\n }\n\n // size === \"large\"\n return kind === 'outlined' && !selected ? `${12 - OUTLINED_BORDER_WIDTH}px` : '12px';\n};\n","import { CSSProperties } from 'react';\n\nconst getHoverStyle = (backgroundColor: 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 { TypographyVariants } from '@mui/material/styles';\n\ntype KindStyleParams = Pick<ButtonProps, 'kind' | 'color'> & {\n lunit_token: ColorToken;\n};\n\ntype CustomButtonProps = ButtonProps & { hasIconOnly: boolean };\n\ntype sizeStyleParams = Pick<CustomButtonProps, 'size' | 'hasIconOnly' | 'kind'> &\n Pick<ToggleButtonProps, 'selected'> & { typography: TypographyVariants };\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.status_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.status_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.status_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.status_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 GhostButton = forwardRef<HTMLButtonElement, GhostButtonProps & { hasIconOnly: boolean }>(\n (props, ref) => {\n const {\n size = 'small',\n icon,\n className,\n children,\n startIcon,\n hasIconOnly,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n variant: _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);\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 // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n variant: _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 // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n variant: _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\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\nexport default Button;\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material/Typography\");","import React from 'react';\nimport MuiTypography from '@mui/material/Typography';\n\nimport type { TypographyProps } from '@mui/material/Typography';\nimport type { TypographyPropsVariantOverridesType } from '../../foundation/Typography';\n\ndeclare module '@mui/material/Typography' {\n interface TypographyPropsVariantOverrides extends TypographyPropsVariantOverridesType {}\n}\n\nconst Typography = <C extends React.ElementType>(props: TypographyProps<C, { component?: C }>) => {\n return <MuiTypography {...props} />;\n};\n\nexport default Typography;\n","import React, { useEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Close } from '@lunit/design-system-icons';\n\nimport { DialogAction } from './components/DialogAction';\nimport {\n StyledBackdrop,\n StyledDialog,\n StyledDialogContent,\n StyledDialogTitle,\n StyledDialogTitleIconWrapper,\n} from './Dialog.styled';\nimport Button from '../Button';\nimport Typography from '../Typography';\n\nimport type { SxProps } from '@mui/material/styles';\nimport type { TypographyProps } from '@mui/material';\n\nexport interface DialogBaseProps {\n isOpen: boolean;\n onClose(): void;\n type?: 'passive' | 'action'; // default passive\n nonModal?: boolean; // default false\n title: string;\n titleIcon?: React.ReactNode;\n titleVariant?: TypographyProps['variant'];\n children: React.ReactNode;\n actions?: React.ReactNode;\n enableBackdropClose?: boolean;\n size?: 'small' | 'medium'; // default \"small\"\n sx?: SxProps;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport interface PassiveDialogType extends DialogBaseProps {\n type: 'passive';\n actions?: undefined;\n enableBackdropClose?: true;\n}\nexport interface ActionDialogType extends DialogBaseProps {\n type: 'action';\n actions: React.ReactNode;\n enableBackdropClose?: boolean;\n}\n\nexport interface PassiveModalProps extends PassiveDialogType {\n nonModal?: false;\n}\nexport interface ActionModalProps extends ActionDialogType {\n nonModal?: false;\n}\nexport type ModalProps = PassiveModalProps | ActionModalProps;\n\nexport interface PassiveNonModalProps extends PassiveDialogType {\n nonModal?: true;\n}\nexport interface ActionNonModalProps extends ActionDialogType {\n nonModal?: true;\n enableBackdropClose?: false;\n}\nexport type NonModalProps = PassiveNonModalProps | ActionNonModalProps;\n\nexport type DialogProps = ModalProps | NonModalProps;\n\nfunction Dialog(props: DialogProps) {\n const { isOpen, type, nonModal = false, onClose } = props;\n\n const isActionModal = type === 'action' && !nonModal;\n const isPassiveModal = type === 'passive' && !nonModal;\n\n const handleBackdropClose = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n const isClosable = isPassiveModal || (isActionModal && props.enableBackdropClose);\n\n if (!isClosable) return;\n if (e.target !== e.currentTarget) return;\n\n onClose();\n },\n [isPassiveModal, isActionModal, props.enableBackdropClose, onClose],\n );\n\n useEffect(() => {\n const isClosable = isOpen && isPassiveModal;\n if (!isClosable) return;\n\n function handleEscClose(event: KeyboardEvent) {\n if (event.key === 'Escape') onClose();\n }\n\n document.addEventListener('keydown', handleEscClose);\n\n return () => {\n document.removeEventListener('keydown', handleEscClose);\n };\n }, [isOpen, isPassiveModal, onClose]);\n\n if (!isOpen) return null;\n return createPortal(\n nonModal ? (\n <DialogBase dialogProps={{ ...props }} />\n ) : (\n <StyledBackdrop onClick={handleBackdropClose} data-testid=\"dialog-backdrop\">\n <DialogBase dialogProps={{ ...props }} />\n </StyledBackdrop>\n ),\n\n document.body,\n );\n}\n\nfunction DialogBase({ dialogProps }: { dialogProps: DialogBaseProps }) {\n const {\n nonModal = false,\n onClose,\n title,\n titleIcon,\n titleVariant = 'headline5',\n children,\n actions,\n type,\n size = 'small',\n sx,\n style,\n className,\n } = dialogProps;\n\n return (\n <StyledDialog\n role=\"dialog\"\n aria-labelledby=\"dialog-title\"\n size={size}\n nonModal={nonModal}\n type={type}\n sx={{\n ...sx,\n }}\n style={style}\n className={`dialog elevation2 ${className ?? ''}`}\n >\n <StyledDialogTitle id=\"dialog-title\" className=\"dialog-title-wrapper\">\n {titleIcon && (\n <StyledDialogTitleIconWrapper className=\"dialog-title-icon\">\n {titleIcon}\n </StyledDialogTitleIconWrapper>\n )}\n <Typography component=\"h2\" id=\"dialog-title-text\" variant={titleVariant}>\n {title}\n </Typography>\n {type === 'passive' && (\n <Button\n id=\"dialog-title-close-button\"\n data-testid=\"dialog-title-close-button\"\n kind=\"ghost\"\n color=\"secondary\"\n icon={<Close />}\n onClick={onClose}\n sx={{\n marginRight: 0,\n marginLeft: 'auto',\n }}\n />\n )}\n </StyledDialogTitle>\n <StyledDialogContent id=\"dialog-content\">{children}</StyledDialogContent>\n {type === 'action' && actions !== null ? (\n // `actions !== null` is used to not render DialogAction when actions is undefined\n // There was a case when actions is undefined, but DialogAction is rendered with null children\n <DialogAction>{actions}</DialogAction>\n ) : null}\n </StyledDialog>\n );\n}\n\nexport default Dialog;\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","StyledDialogActions","styled","display","flex","alignItems","justifyContent","gap","DialogAction","props","children","sx","id","className","DIALOG_WRAPPER_STYLE","small","width","maxWidth","medium","modal","position","nonModal","top","right","DIALOG_TITLE_STYLE","height","maxHeight","padding","DIALOG_CONTENT_STYLE","paddingInline","paddingTop","paddingBottom","smallAction","paddingBlock","mediumAction","DIALOG_ACTION_STYLE","StyledBackdrop","left","backgroundColor","zIndex","placeItems","StyledDialog","theme","size","type","flexDirection","boxSizing","borderRadius","palette","lunit_token","core","bg_03","color","text_normal","scrollbarGutter","background","backgroundClip","border","component","scrollbars_bg","StyledDialogTitle","StyledDialogTitleIconWrapper","fontSize","StyledDialogContent","typography","body2_14_regular","overflowY","getButtonPaddingBySizeAndKind","kind","selected","getIconButtonPaddingBySizeAndKind","sizeStyle","hasIconOnly","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","status_hover","border_medium","commonStyle","fontWeight","textTransform","status_focused","iconStyle","margin","marginRight","CustomButton","shouldForwardProp","includes","GhostButton","forwardRef","ref","icon","startIcon","variant","_variant","restProps","OutlinedButton","ContainedButton","Boolean","DialogBase","dialogProps","onClose","title","titleIcon","titleVariant","actions","style","role","Close","onClick","marginLeft","isOpen","isActionModal","isPassiveModal","handleBackdropClose","useCallback","e","enableBackdropClose","target","currentTarget","useEffect","document","addEventListener","handleEscClose","removeEventListener","event","createPortal","body"],"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 i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},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,{DropdownDivider:()=>L,DropdownItem:()=>z,DropdownSubtitle:()=>P,default:()=>b});const o=require("react/jsx-runtime"),i=require("react"),r=require("@lunit/design-system-icons/ArrowDownSm");var n=e.n(r);const l=require("@mui/material/styles"),d=require("@mui/material/Box");var a=e.n(d);const s=require("@mui/material/Select");var p=e.n(s);const c=require("@mui/material/MenuItem");var u=e.n(c);const x={small:{height:"28px",padding:"4px 12px",iconTop:"4px",iconRight:"12px"},medium:{height:"36px",padding:"8px 16px",iconTop:"8px",iconRight:"16px"},large:{height:"44px",padding:"10px 16px",iconTop:"12px",iconRight:"16px"}},h=(0,l.styled)(p(),{shouldForwardProp:e=>!["selectSize","select"].includes(e)})(({theme:e,selectSize:t})=>({..."large"===t?{...e.typography.body1_16_regular}:{...e.typography.body2_14_regular},height:x[t||"medium"].height,padding:x[t||"medium"].padding,backgroundColor:e.palette.lunit_token.component.textfield_bg,overflow:"hidden","& .MuiSelect-select":{paddingTop:0,paddingBottom:0,paddingRight:"28px !important",color:e.palette.lunit_token.core.text_normal},"&.MuiInputBase-root":{borderRadius:"8px",border:"none","&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"}},"& .MuiInput-input":{"&:focus":{backgroundColor:"transparent"}},"&::after":{border:"none"},"&::before":{border:"none"},"&:hover":{position:"relative",zIndex:0,backgroundColor:e.palette.lunit_token.component.textfield_bg,border:"none"},"&:hover::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.palette.lunit_token.core.hover,border:"none"},"&.Mui-focused::before":{border:`1px solid ${e.palette.lunit_token.core.focused}`,content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,borderRadius:"8px",transition:"none"},"&.Mui-disabled":{opacity:.38},"&.Mui-disabled:before":{borderBottomStyle:"none"},"&.Mui-error::before":{border:`1px solid ${e.palette.lunit_token.component.textfield_border_error}`,content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,borderRadius:"8px",transition:"none"},"& .MuiSvgIcon-root":{width:"20px",height:"20px",top:x[t||"medium"].iconTop,right:x[t||"medium"].iconRight,color:e.palette.lunit_token.core.text_normal,"&.Mui-disabled":{color:e.palette.lunit_token.core.text_normal}}})),g=(0,l.styled)(u())(({theme:e})=>({...e.typography.body2_14_regular,padding:"8px",borderRadius:"8px",color:e.palette.lunit_token.core.text_normal,backgroundColor:"transparent",display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"8px","&:hover":{backgroundColor:e.palette.lunit_token.core.hover},"&.Mui-focusVisible":{backgroundColor:"transparent","&:hover":{backgroundColor:e.palette.lunit_token.core.hover}},"& .multipleChecked":{display:"none"},"&.filledStyle":{backgroundColor:e.palette.lunit_token.core.selected}})),m=(0,l.styled)(a())({width:"20px",height:"20px",marginRight:"8px"}),b=(0,i.forwardRef)((e,t)=>{const{select:i="single",size:r="medium",className:l,children:d,sx:a,...s}=e;return(0,o.jsx)(h,{className:l,variant:"standard",multiple:"multiple"===i,IconComponent:e=>(0,o.jsx)(n(),{...e}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{marginTop:"4px",padding:"0px 8px",borderRadius:"8px",backgroundColor:e=>e.palette.lunit_token.core.bg_02},className:`elevation2 ${l||"light1"}`},MenuListProps:{sx:{"& .singleChecked":{display:"single"===i?"inherit":"none"},"& .multipleChecked":{display:"multiple"===i?"inherit !important":"none"}}}},sx:a,selectSize:r,...s,ref:t,children:d})}),f=require("@mui/material"),_=require("@lunit/design-system-icons/Check");var y=e.n(_);const v=require("@mui/material/Checkbox");var C=e.n(v);const k=(0,l.styled)(C())(({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"}})),w={width:18,height:18},j=(0,l.styled)("span")(({theme:e})=>({...w,borderRadius:"20%",boxShadow:`inset 0 0 0 1.5px ${e.palette.lunit_token.component.selectcontrol_off}`})),M=()=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,o.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"})}),S=()=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,o.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"})}),R=e=>(0,o.jsx)(k,{disableRipple:!0,icon:(0,o.jsx)(j,{}),checkedIcon:(0,o.jsx)(M,{}),indeterminateIcon:(0,o.jsx)(S,{}),...e}),q=require("@mui/material/Typography");var I=e.n(q);const T=e=>(0,o.jsx)(I(),{...e});function z(e){const{leftIcon:t,rightText:i,selected:r,isFilledStyle:n,children:l,sx:d,...a}=e;return(0,o.jsxs)(g,{className:n&&r?"filledStyle":void 0,sx:d,...a,children:[(0,o.jsxs)(f.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start"},children:[!n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m,{className:"singleChecked",children:r&&(0,o.jsx)(y(),{fontSize:"small"})}),(0,o.jsx)(R,{className:"multipleChecked",sx:{mr:2},checked:r})]}),t&&(0,o.jsx)(m,{children:t}),l]}),(0,o.jsx)(f.Box,{children:i&&(0,o.jsx)(T,{variant:"body2_14_medium",sx:{color:e=>e.palette.lunit_token.core.text_light},children:i})})]})}function L({sx:e}){return(0,o.jsx)(f.Divider,{sx:{margin:"8px -8px",borderColor:e=>e.palette.lunit_token.component.dropdown_divider_border,...e}})}function P({title:e,sx:t}){return(0,o.jsx)(f.ListSubheader,{sx:{typography:"body3_12_semibold",padding:"4px 8px",color:e=>e.palette.lunit_token.core.text_light,backgroundColor:"transparent",...t},children:e})}P.muiSkipListHighlight=!0,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 i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},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,{DropdownDivider:()=>T,DropdownItem:()=>q,DropdownSubtitle:()=>z,default:()=>g});const o=require("react/jsx-runtime"),i=require("react"),r=require("@lunit/design-system-icons/ArrowDownSm");var n=e.n(r);const l=require("@mui/material/styles"),d=require("@mui/material/Select");var s=e.n(d);const a=require("@mui/material/MenuItem");var p=e.n(a);const u={small:{height:"28px",padding:"4px 12px",iconTop:"4px",iconRight:"12px"},medium:{height:"36px",padding:"8px 16px",iconTop:"8px",iconRight:"16px"},large:{height:"44px",padding:"10px 16px",iconTop:"12px",iconRight:"16px"}},c=(0,l.styled)(s(),{shouldForwardProp:e=>!["selectSize","select"].includes(e)})(({theme:e,selectSize:t})=>({..."large"===t?{...e.typography.body1_16_regular}:{...e.typography.body2_14_regular},height:u[t||"medium"].height,padding:u[t||"medium"].padding,backgroundColor:e.palette.lunit_token.component.textfield_bg,overflow:"hidden","& .MuiSelect-select":{paddingTop:0,paddingBottom:0,paddingRight:"28px !important",color:e.palette.lunit_token.core.text_normal},"&.MuiInputBase-root":{borderRadius:"8px",border:"none","&:hover:not(.Mui-disabled, .Mui-error):before":{border:"none"}},"& .MuiInput-input":{"&:focus":{backgroundColor:"transparent"}},"&::after":{border:"none"},"&::before":{border:"none"},"&:hover":{position:"relative",zIndex:0,backgroundColor:e.palette.lunit_token.component.textfield_bg,border:"none"},"&:hover::before":{content:'""',position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,backgroundColor:e.palette.lunit_token.core.status_hover,border:"none"},"&.Mui-focused::before":{border:`1px solid ${e.palette.lunit_token.core.status_focused}`,content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,borderRadius:"8px",transition:"none"},"&.Mui-disabled":{opacity:.38},"&.Mui-disabled:before":{borderBottomStyle:"none"},"&.Mui-error::before":{border:`1px solid ${e.palette.lunit_token.component.textfield_border_error}`,content:'""',position:"absolute",top:0,bottom:0,left:0,right:0,borderRadius:"8px",transition:"none"},"& .MuiSvgIcon-root":{width:"20px",height:"20px",top:u[t||"medium"].iconTop,right:u[t||"medium"].iconRight,color:e.palette.lunit_token.core.text_normal,"&.Mui-disabled":{color:e.palette.lunit_token.core.text_normal}}})),h=(0,l.styled)(p())(({theme:e})=>({...e.typography.body2_14_regular,padding:"8px",borderRadius:"8px",color:e.palette.lunit_token.core.text_normal,backgroundColor:"transparent",display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"8px","&:hover":{backgroundColor:e.palette.lunit_token.core.status_hover},"&.Mui-focusVisible":{backgroundColor:"transparent","&:hover":{backgroundColor:e.palette.lunit_token.core.status_hover}},"& .multipleChecked":{display:"none"},"&.filledStyle":{backgroundColor:e.palette.lunit_token.core.status_selected}})),x=(0,l.styled)("div")({width:"20px",height:"20px",marginRight:"8px"}),g=(0,i.forwardRef)((e,t)=>{const{select:r="single",size:l="medium",className:d,children:s,sx:a,...p}=e,u=(0,i.useCallback)(e=>(0,o.jsx)(n(),{...e}),[]);return(0,o.jsx)(c,{className:d,variant:"standard",multiple:"multiple"===r,IconComponent:u,MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{marginTop:"4px",padding:"0px 8px",borderRadius:"8px",backgroundColor:e=>e.palette.lunit_token.core.bg_02},className:`elevation2 ${d||"light1"}`},slotProps:{list:{sx:{"& .singleChecked":{display:"single"===r?"inherit":"none"},"& .multipleChecked":{display:"multiple"===r?"inherit !important":"none"}}}}},sx:a,selectSize:l,...p,ref:t,children:s})}),m=require("@mui/material"),b=require("@lunit/design-system-icons/Check");var f=e.n(b);const _=require("@mui/material/Checkbox");var y=e.n(_);const C=(0,l.styled)(y())(({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.status_focused}`,borderRadius:"7px"}})),v={width:18,height:18},k=(0,l.styled)("span")(({theme:e})=>({...v,borderRadius:"20%",boxShadow:`inset 0 0 0 1.5px ${e.palette.lunit_token.component.selectcontrol_off}`})),w=()=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,o.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"})}),j=()=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,o.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"})}),M=e=>(0,o.jsx)(C,{disableRipple:!0,icon:(0,o.jsx)(k,{}),checkedIcon:(0,o.jsx)(w,{}),indeterminateIcon:(0,o.jsx)(j,{}),...e}),S=require("@mui/material/Typography");var R=e.n(S);const I=e=>(0,o.jsx)(R(),{...e});function q(e){const{leftIcon:t,rightText:i,selected:r,isFilledStyle:n,children:l,sx:d,...s}=e;return(0,o.jsxs)(h,{className:n&&r?"filledStyle":void 0,sx:d,...s,children:[(0,o.jsxs)(m.Box,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start"},children:[!n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{className:"singleChecked",children:r&&(0,o.jsx)(f(),{fontSize:"small"})}),(0,o.jsx)(M,{className:"multipleChecked",sx:{mr:2},checked:r})]}),t&&(0,o.jsx)(x,{children:t}),l]}),(0,o.jsx)(m.Box,{children:i&&(0,o.jsx)(I,{variant:"body2_14_medium",sx:{color:e=>e.palette.lunit_token.core.text_light},children:i})})]})}function T({sx:e}){return(0,o.jsx)(m.Divider,{sx:{margin:"8px -8px",borderColor:e=>e.palette.lunit_token.component.dropdown_divider_border,...e}})}function z({title:e,sx:t}){return(0,o.jsx)(m.ListSubheader,{sx:{typography:"body3_12_semibold",padding:"4px 8px",color:e=>e.palette.lunit_token.core.text_light,backgroundColor:"transparent",...t},children:e})}z.muiSkipListHighlight=!0,module.exports=t})();
2
2
  //# sourceMappingURL=index.js.map