@lunit/design-system 1.0.0-a.1 → 1.0.0-a.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 (410) hide show
  1. package/.babelrc.json +16 -0
  2. package/dist/cjs/components/Alert/index.js +2 -0
  3. package/dist/cjs/components/Alert/index.js.map +1 -0
  4. package/dist/cjs/components/Button/index.js +2 -0
  5. package/dist/cjs/components/Button/index.js.map +1 -0
  6. package/dist/cjs/components/Checkbox/index.js +2 -0
  7. package/dist/cjs/components/Checkbox/index.js.map +1 -0
  8. package/dist/cjs/components/Chip/index.js +2 -0
  9. package/dist/cjs/components/Chip/index.js.map +1 -0
  10. package/dist/cjs/components/DataTable/index.js +2 -0
  11. package/dist/cjs/components/DataTable/index.js.map +1 -0
  12. package/dist/cjs/components/DatePicker/index.js +2 -0
  13. package/dist/cjs/components/DatePicker/index.js.map +1 -0
  14. package/dist/cjs/components/Dropdown/index.js +2 -0
  15. package/dist/cjs/components/Dropdown/index.js.map +1 -0
  16. package/dist/cjs/components/FormLabel/index.js +2 -0
  17. package/dist/cjs/components/FormLabel/index.js.map +1 -0
  18. package/dist/cjs/components/Modal/index.js +2 -0
  19. package/dist/cjs/components/Modal/index.js.map +1 -0
  20. package/dist/cjs/components/Radio/index.js +2 -0
  21. package/dist/cjs/components/Radio/index.js.map +1 -0
  22. package/dist/cjs/components/RadioGroup/index.js +2 -0
  23. package/dist/cjs/components/RadioGroup/index.js.map +1 -0
  24. package/dist/cjs/components/TextField/index.js +2 -0
  25. package/dist/cjs/components/TextField/index.js.map +1 -0
  26. package/dist/cjs/components/Toggle/index.js +2 -0
  27. package/dist/cjs/components/Toggle/index.js.map +1 -0
  28. package/dist/cjs/components/ToggleButton/index.js +2 -0
  29. package/dist/cjs/components/ToggleButton/index.js.map +1 -0
  30. package/dist/cjs/components/Tooltip/index.js +2 -0
  31. package/dist/cjs/components/Tooltip/index.js.map +1 -0
  32. package/dist/cjs/index.js +2 -0
  33. package/dist/cjs/index.js.map +1 -0
  34. package/dist/components/Alert/Alert.js +19 -0
  35. package/dist/components/Alert/Alert.js.map +1 -0
  36. package/dist/components/Alert/Alert.styled.js +48 -0
  37. package/dist/components/Alert/Alert.styled.js.map +1 -0
  38. package/dist/components/Alert/Alert.types.js +2 -0
  39. package/dist/components/Alert/Alert.types.js.map +1 -0
  40. package/dist/components/Alert/Alert.utils..js +38 -0
  41. package/dist/components/Alert/Alert.utils..js.map +1 -0
  42. package/dist/components/Alert/index.js +1 -1
  43. package/dist/components/Alert/index.js.map +1 -1
  44. package/dist/components/Button/Button.js +9 -0
  45. package/dist/components/Button/Button.js.map +1 -0
  46. package/dist/components/Button/Button.styled.js +180 -0
  47. package/dist/components/Button/Button.styled.js.map +1 -0
  48. package/dist/components/Button/Button.types.js +2 -0
  49. package/dist/components/Button/Button.types.js.map +1 -0
  50. package/dist/components/Button/const.js +3 -0
  51. package/dist/components/Button/const.js.map +1 -0
  52. package/dist/components/Button/index.js +1 -1
  53. package/dist/components/Button/index.js.map +1 -1
  54. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +23 -0
  55. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -0
  56. package/dist/components/Button/utils/getHoverStyle.js +7 -0
  57. package/dist/components/Button/utils/getHoverStyle.js.map +1 -0
  58. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +23 -0
  59. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -0
  60. package/dist/components/Checkbox/Checkbox.js +49 -0
  61. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  62. package/dist/components/Checkbox/index.js +1 -1
  63. package/dist/components/Checkbox/index.js.map +1 -1
  64. package/dist/components/Chip/Chip.js +70 -0
  65. package/dist/components/Chip/Chip.js.map +1 -0
  66. package/dist/components/Chip/Chip.styled.js +142 -0
  67. package/dist/components/Chip/Chip.styled.js.map +1 -0
  68. package/dist/components/Chip/Chip.types.js +2 -0
  69. package/dist/components/Chip/Chip.types.js.map +1 -0
  70. package/dist/components/Chip/consts.js +8 -0
  71. package/dist/components/Chip/consts.js.map +1 -0
  72. package/dist/components/Chip/index.js +1 -1
  73. package/dist/components/Chip/index.js.map +1 -1
  74. package/dist/components/DataTable/DataTable.js +7 -0
  75. package/dist/components/DataTable/DataTable.js.map +1 -0
  76. package/dist/components/DataTable/index.js +1 -1
  77. package/dist/components/DataTable/index.js.map +1 -1
  78. package/dist/components/DatePicker/DatePicker.js +7 -0
  79. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  80. package/dist/components/DatePicker/index.js +1 -1
  81. package/dist/components/DatePicker/index.js.map +1 -1
  82. package/dist/components/Dropdown/Dropdown.js +7 -0
  83. package/dist/components/Dropdown/Dropdown.js.map +1 -0
  84. package/dist/components/Dropdown/index.js +1 -1
  85. package/dist/components/Dropdown/index.js.map +1 -1
  86. package/dist/components/FormLabel/FormLabel.js +7 -0
  87. package/dist/components/FormLabel/FormLabel.js.map +1 -0
  88. package/dist/components/FormLabel/FormLabel.styled.js +8 -0
  89. package/dist/components/FormLabel/FormLabel.styled.js.map +1 -0
  90. package/dist/components/FormLabel/index.js +1 -1
  91. package/dist/components/FormLabel/index.js.map +1 -1
  92. package/dist/components/Modal/Modal.js +7 -0
  93. package/dist/components/Modal/Modal.js.map +1 -0
  94. package/dist/components/Modal/index.js +1 -1
  95. package/dist/components/Modal/index.js.map +1 -1
  96. package/dist/components/Radio/Radio.js +43 -0
  97. package/dist/components/Radio/Radio.js.map +1 -0
  98. package/dist/components/Radio/index.js +1 -1
  99. package/dist/components/Radio/index.js.map +1 -1
  100. package/dist/components/RadioGroup/index.js +2 -1
  101. package/dist/components/RadioGroup/index.js.map +1 -1
  102. package/dist/components/TextField/TextField.js +19 -0
  103. package/dist/components/TextField/TextField.js.map +1 -0
  104. package/dist/components/TextField/TextField.style.js +245 -0
  105. package/dist/components/TextField/TextField.style.js.map +1 -0
  106. package/dist/components/TextField/TextField.types.js +2 -0
  107. package/dist/components/TextField/TextField.types.js.map +1 -0
  108. package/dist/components/TextField/TextFieldIcon.js +7 -0
  109. package/dist/components/TextField/TextFieldIcon.js.map +1 -0
  110. package/dist/components/TextField/index.js +1 -1
  111. package/dist/components/TextField/index.js.map +1 -1
  112. package/dist/components/Toast/Toast.js +26 -0
  113. package/dist/components/Toast/Toast.js.map +1 -0
  114. package/dist/components/Toast/Toast.styled.js +49 -0
  115. package/dist/components/Toast/Toast.styled.js.map +1 -0
  116. package/dist/components/Toast/Toast.types.js +2 -0
  117. package/dist/components/Toast/Toast.types.js.map +1 -0
  118. package/dist/components/Toast/Toast.utils.js +14 -0
  119. package/dist/components/Toast/Toast.utils.js.map +1 -0
  120. package/dist/components/Toast/index.js +2 -0
  121. package/dist/components/Toast/index.js.map +1 -0
  122. package/dist/components/Toggle/Toggle.js +13 -0
  123. package/dist/components/Toggle/Toggle.js.map +1 -0
  124. package/dist/components/Toggle/Toggle.styled.js +155 -0
  125. package/dist/components/Toggle/Toggle.styled.js.map +1 -0
  126. package/dist/components/Toggle/Toggle.types.js +2 -0
  127. package/dist/components/Toggle/Toggle.types.js.map +1 -0
  128. package/dist/components/Toggle/index.js +1 -1
  129. package/dist/components/Toggle/index.js.map +1 -1
  130. package/dist/components/ToggleButton/ToggleButton.js +12 -0
  131. package/dist/components/ToggleButton/ToggleButton.js.map +1 -0
  132. package/dist/components/ToggleButton/ToggleButton.styled.js +35 -0
  133. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -0
  134. package/dist/components/ToggleButton/ToggleButton.types.js +2 -0
  135. package/dist/components/ToggleButton/ToggleButton.types.js.map +1 -0
  136. package/dist/components/ToggleButton/index.js +1 -1
  137. package/dist/components/ToggleButton/index.js.map +1 -1
  138. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +7 -0
  139. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
  140. package/dist/components/ToggleButtonGroup/index.js +2 -0
  141. package/dist/components/ToggleButtonGroup/index.js.map +1 -0
  142. package/dist/components/Tooltip/Tooltip.js +7 -0
  143. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  144. package/dist/components/Tooltip/index.js +1 -1
  145. package/dist/components/Tooltip/index.js.map +1 -1
  146. package/dist/components/index.js +7 -0
  147. package/dist/components/index.js.map +1 -0
  148. package/dist/foundation/Elevation/index.js +66 -0
  149. package/dist/foundation/Elevation/index.js.map +1 -0
  150. package/dist/foundation/Elevation/utils.js +9 -0
  151. package/dist/foundation/Elevation/utils.js.map +1 -0
  152. package/dist/foundation/Typography/index.js +62 -0
  153. package/dist/foundation/Typography/index.js.map +1 -0
  154. package/dist/foundation/Typography/tokens.js +155 -0
  155. package/dist/foundation/Typography/tokens.js.map +1 -0
  156. package/dist/foundation/colors/base/blue.js +26 -0
  157. package/dist/foundation/colors/base/blue.js.map +1 -0
  158. package/dist/foundation/colors/base/green.js +26 -0
  159. package/dist/foundation/colors/base/green.js.map +1 -0
  160. package/dist/foundation/colors/base/grey.js +52 -0
  161. package/dist/foundation/colors/base/grey.js.map +1 -0
  162. package/dist/foundation/colors/base/index.js +12 -0
  163. package/dist/foundation/colors/base/index.js.map +1 -0
  164. package/dist/foundation/colors/base/lunitGreen.js +26 -0
  165. package/dist/foundation/colors/base/lunitGreen.js.map +1 -0
  166. package/dist/foundation/colors/base/lunitTeal.js +26 -0
  167. package/dist/foundation/colors/base/lunitTeal.js.map +1 -0
  168. package/dist/foundation/colors/base/magenta.js +26 -0
  169. package/dist/foundation/colors/base/magenta.js.map +1 -0
  170. package/dist/foundation/colors/base/opacity.js +7 -0
  171. package/dist/foundation/colors/base/opacity.js.map +1 -0
  172. package/dist/foundation/colors/base/orange.js +26 -0
  173. package/dist/foundation/colors/base/orange.js.map +1 -0
  174. package/dist/foundation/colors/base/purple.js +26 -0
  175. package/dist/foundation/colors/base/purple.js.map +1 -0
  176. package/dist/foundation/colors/base/red.js +26 -0
  177. package/dist/foundation/colors/base/red.js.map +1 -0
  178. package/dist/foundation/colors/base/yellow.js +26 -0
  179. package/dist/foundation/colors/base/yellow.js.map +1 -0
  180. package/dist/foundation/colors/index.js +208 -0
  181. package/dist/foundation/colors/index.js.map +1 -0
  182. package/dist/foundation/colors/token/component.js +423 -0
  183. package/dist/foundation/colors/token/component.js.map +1 -0
  184. package/dist/foundation/colors/token/core.js +206 -0
  185. package/dist/foundation/colors/token/core.js.map +1 -0
  186. package/dist/foundation/colors/token/index.js +3 -0
  187. package/dist/foundation/colors/token/index.js.map +1 -0
  188. package/dist/foundation/colors/token/types.js +2 -0
  189. package/dist/foundation/colors/token/types.js.map +1 -0
  190. package/dist/foundation/colors/types.js +2 -0
  191. package/dist/foundation/colors/types.js.map +1 -0
  192. package/dist/foundation/index.js +13 -0
  193. package/dist/foundation/index.js.map +1 -0
  194. package/dist/foundation/spacing.js +2 -0
  195. package/dist/foundation/spacing.js.map +1 -0
  196. package/dist/index.js +17 -1
  197. package/dist/index.js.map +1 -1
  198. package/dist/theme.js +39 -0
  199. package/dist/theme.js.map +1 -0
  200. package/dist/types/components/Alert/Alert.d.ts +4 -0
  201. package/dist/types/components/Alert/Alert.styled.d.ts +6 -0
  202. package/dist/types/components/Alert/Alert.types.d.ts +9 -0
  203. package/dist/types/components/Alert/Alert.utils..d.ts +4 -0
  204. package/dist/types/components/Button/Button.d.ts +3 -0
  205. package/dist/{components → types/components}/Button/Button.styled.d.ts +26 -2
  206. package/dist/{components → types/components}/Button/Button.types.d.ts +4 -4
  207. package/dist/types/components/Button/utils/getHoverStyle.d.ts +6 -0
  208. package/dist/types/components/Chip/Chip.styled.d.ts +79 -0
  209. package/dist/{components → types/components}/Chip/Chip.types.d.ts +1 -1
  210. package/dist/types/components/TextField/TextField.d.ts +3 -0
  211. package/dist/types/components/TextField/TextField.style.d.ts +9 -0
  212. package/dist/types/components/TextField/TextField.types.d.ts +29 -0
  213. package/dist/types/components/TextField/TextFieldIcon.d.ts +8 -0
  214. package/dist/types/components/TextField/index.d.ts +2 -0
  215. package/dist/types/components/Toast/Toast.d.ts +4 -0
  216. package/dist/types/components/Toast/Toast.styled.d.ts +1 -0
  217. package/dist/types/components/Toast/Toast.types.d.ts +4 -0
  218. package/dist/types/components/Toast/Toast.utils.d.ts +2 -0
  219. package/dist/types/components/Toast/index.d.ts +1 -0
  220. package/dist/{components → types/components}/ToggleButton/ToggleButton.styled.d.ts +1 -1
  221. package/dist/{components → types/components}/ToggleButton/ToggleButton.types.d.ts +4 -4
  222. package/dist/{foundation → types/foundation}/colors/base/grey.d.ts +16 -0
  223. package/dist/{foundation → types/foundation}/colors/base/lunitGreen.d.ts +2 -2
  224. package/dist/{foundation → types/foundation}/colors/base/lunitTeal.d.ts +2 -2
  225. package/dist/{foundation → types/foundation}/colors/index.d.ts +42 -9
  226. package/dist/{foundation → types/foundation}/colors/types.d.ts +1 -3
  227. package/dist/{foundation → types/foundation}/index.d.ts +37 -5
  228. package/dist/{index.d.ts → types/index.d.ts} +1 -0
  229. package/package.json +37 -23
  230. package/src/components/Alert/Alert.styled.ts +60 -0
  231. package/src/components/Alert/Alert.tsx +53 -0
  232. package/src/components/Alert/Alert.types.ts +10 -0
  233. package/src/components/Alert/Alert.utils..ts +41 -0
  234. package/src/components/Alert/index.ts +1 -0
  235. package/src/components/Button/Button.styled.ts +232 -0
  236. package/src/components/Button/Button.tsx +50 -0
  237. package/src/components/Button/Button.types.ts +25 -0
  238. package/src/components/Button/const.ts +2 -0
  239. package/src/components/Button/index.ts +1 -0
  240. package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +35 -0
  241. package/src/components/Button/utils/getHoverStyle.ts +7 -0
  242. package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +38 -0
  243. package/src/components/Checkbox/Checkbox.tsx +67 -0
  244. package/src/components/Checkbox/index.ts +1 -0
  245. package/src/components/Chip/Chip.styled.ts +164 -0
  246. package/src/components/Chip/Chip.tsx +132 -0
  247. package/src/components/Chip/Chip.types.ts +56 -0
  248. package/src/components/Chip/consts.ts +7 -0
  249. package/src/components/Chip/index.ts +1 -0
  250. package/src/components/DataTable/DataTable.tsx +8 -0
  251. package/src/components/DataTable/index.ts +1 -0
  252. package/src/components/DatePicker/DatePicker.tsx +8 -0
  253. package/src/components/DatePicker/index.ts +1 -0
  254. package/src/components/Dropdown/Dropdown.tsx +11 -0
  255. package/src/components/Dropdown/index.ts +1 -0
  256. package/src/components/FormLabel/FormLabel.styled.ts +8 -0
  257. package/src/components/FormLabel/FormLabel.tsx +9 -0
  258. package/src/components/FormLabel/index.ts +1 -0
  259. package/src/components/Modal/Modal.tsx +8 -0
  260. package/src/components/Modal/index.ts +1 -0
  261. package/src/components/Radio/Radio.tsx +58 -0
  262. package/src/components/Radio/index.ts +1 -0
  263. package/src/components/RadioGroup/index.ts +2 -0
  264. package/src/components/TextField/TextField.style.ts +316 -0
  265. package/src/components/TextField/TextField.tsx +80 -0
  266. package/src/components/TextField/TextField.types.ts +38 -0
  267. package/src/components/TextField/TextFieldIcon.tsx +24 -0
  268. package/src/components/TextField/index.ts +7 -0
  269. package/src/components/Toast/Toast.styled.ts +49 -0
  270. package/src/components/Toast/Toast.tsx +66 -0
  271. package/src/components/Toast/Toast.types.ts +14 -0
  272. package/src/components/Toast/Toast.utils.ts +15 -0
  273. package/src/components/Toast/index.tsx +1 -0
  274. package/src/components/Toggle/Toggle.styled.ts +162 -0
  275. package/src/components/Toggle/Toggle.tsx +18 -0
  276. package/src/components/Toggle/Toggle.types.ts +14 -0
  277. package/src/components/Toggle/index.ts +1 -0
  278. package/src/components/ToggleButton/ToggleButton.styled.ts +58 -0
  279. package/src/components/ToggleButton/ToggleButton.tsx +89 -0
  280. package/src/components/ToggleButton/ToggleButton.types.ts +25 -0
  281. package/src/components/ToggleButton/index.ts +1 -0
  282. package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +13 -0
  283. package/src/components/ToggleButtonGroup/index.tsx +1 -0
  284. package/src/components/Tooltip/Tooltip.tsx +9 -0
  285. package/src/components/Tooltip/index.ts +1 -0
  286. package/src/components/index.ts +9 -0
  287. package/src/foundation/Elevation/index.ts +72 -0
  288. package/src/foundation/Elevation/utils.ts +11 -0
  289. package/src/foundation/Typography/index.ts +96 -0
  290. package/src/foundation/Typography/tokens.ts +162 -0
  291. package/src/foundation/colors/base/blue.ts +27 -0
  292. package/src/foundation/colors/base/green.ts +27 -0
  293. package/src/foundation/colors/base/grey.ts +53 -0
  294. package/src/foundation/colors/base/index.ts +11 -0
  295. package/src/foundation/colors/base/lunitGreen.ts +27 -0
  296. package/src/foundation/colors/base/lunitTeal.ts +27 -0
  297. package/src/foundation/colors/base/magenta.ts +27 -0
  298. package/src/foundation/colors/base/opacity.ts +6 -0
  299. package/src/foundation/colors/base/orange.ts +27 -0
  300. package/src/foundation/colors/base/purple.ts +27 -0
  301. package/src/foundation/colors/base/red.ts +27 -0
  302. package/src/foundation/colors/base/yellow.ts +27 -0
  303. package/src/foundation/colors/index.ts +256 -0
  304. package/src/foundation/colors/token/component.ts +430 -0
  305. package/src/foundation/colors/token/core.ts +211 -0
  306. package/src/foundation/colors/token/index.ts +2 -0
  307. package/src/foundation/colors/token/types.ts +8 -0
  308. package/src/foundation/colors/types.ts +83 -0
  309. package/src/foundation/index.ts +25 -0
  310. package/src/foundation/spacing.ts +3 -0
  311. package/src/index.ts +18 -0
  312. package/src/stories/components/Alert/Alert.stories.tsx +157 -0
  313. package/src/stories/components/Button/BasicButton.stories.tsx +168 -0
  314. package/src/stories/components/Button/IconButton.stories.tsx +139 -0
  315. package/src/stories/components/Button/Kind.stories.tsx +540 -0
  316. package/src/stories/components/Chip/Chip.stories.tsx +208 -0
  317. package/src/stories/components/DataTable/DataTable.stories.tsx +15 -0
  318. package/src/stories/components/DatePicker/DatePicker.stories.tsx +15 -0
  319. package/src/stories/components/Dropdown/Dropdown.stories.tsx +21 -0
  320. package/src/stories/components/Modal/Modal.stories.tsx +15 -0
  321. package/src/stories/components/SelectControl/Checkbox.stories.tsx +256 -0
  322. package/src/stories/components/SelectControl/RadioGroup.stories.tsx +68 -0
  323. package/src/stories/components/SelectControl/RadioStatus.stories.tsx +93 -0
  324. package/src/stories/components/SelectControl/Toggle.stories.tsx +443 -0
  325. package/src/stories/components/TextField/TextFieldMulti.stories.tsx +137 -0
  326. package/src/stories/components/TextField/TextFieldSingle.stories.tsx +283 -0
  327. package/src/stories/components/TextField/TextFieldSize.stories.tsx +134 -0
  328. package/src/stories/components/Toast/Toast.stories.tsx +152 -0
  329. package/src/stories/components/ToggleButton/Basic.stories.tsx +346 -0
  330. package/src/stories/components/ToggleButton/Group.stories.tsx +221 -0
  331. package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +708 -0
  332. package/src/stories/components/ToggleButton/WithIcon.stories.tsx +292 -0
  333. package/src/stories/components/Tooltip/Tooltip.stories.tsx +15 -0
  334. package/src/stories/foundation/Elevation/Elevation.stories.tsx +268 -0
  335. package/src/stories/foundation/Elevation/styled.ts +12 -0
  336. package/src/stories/foundation/Typography/Typography.mdx +76 -0
  337. package/src/stories/foundation/Typography/Typography.stories.tsx +101 -0
  338. package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +44 -0
  339. package/src/stories/foundation/Typography/TypographyGroup.tsx +71 -0
  340. package/src/stories/foundation/Typography/const.ts +25 -0
  341. package/src/stories/foundation/colors/Colors.stories.tsx +66 -0
  342. package/src/stories/foundation/colors/Mui.stories.tsx +18 -0
  343. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +167 -0
  344. package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +28 -0
  345. package/src/stories/foundation/colors/TokenPaletteTable.tsx +127 -0
  346. package/src/stories/foundation/colors/styled.ts +39 -0
  347. package/src/theme.ts +46 -0
  348. package/src/types.d.ts +4 -0
  349. package/tsconfig.build.json +2 -0
  350. package/dist/components/Alert/Alert.d.ts +0 -2
  351. package/dist/components/Button/Button.d.ts +0 -3
  352. package/dist/components/Chip/Chip.styled.d.ts +0 -41
  353. package/dist/components/HelloWorld/HelloWorld.d.ts +0 -28
  354. package/dist/components/TextField/TextField.d.ts +0 -2
  355. package/dist/components/TextField/index.d.ts +0 -1
  356. package/webpack.config.js +0 -51
  357. /package/dist/{components → types/components}/Alert/index.d.ts +0 -0
  358. /package/dist/{components → types/components}/Button/const.d.ts +0 -0
  359. /package/dist/{components → types/components}/Button/index.d.ts +0 -0
  360. /package/dist/{components → types/components}/Button/utils/getButtonPaddingBySizeAndKind.d.ts +0 -0
  361. /package/dist/{components → types/components}/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +0 -0
  362. /package/dist/{components → types/components}/Checkbox/Checkbox.d.ts +0 -0
  363. /package/dist/{components → types/components}/Checkbox/index.d.ts +0 -0
  364. /package/dist/{components → types/components}/Chip/Chip.d.ts +0 -0
  365. /package/dist/{components → types/components}/Chip/consts.d.ts +0 -0
  366. /package/dist/{components → types/components}/Chip/index.d.ts +0 -0
  367. /package/dist/{components → types/components}/DataTable/DataTable.d.ts +0 -0
  368. /package/dist/{components → types/components}/DataTable/index.d.ts +0 -0
  369. /package/dist/{components → types/components}/DatePicker/DatePicker.d.ts +0 -0
  370. /package/dist/{components → types/components}/DatePicker/index.d.ts +0 -0
  371. /package/dist/{components → types/components}/Dropdown/Dropdown.d.ts +0 -0
  372. /package/dist/{components → types/components}/Dropdown/index.d.ts +0 -0
  373. /package/dist/{components → types/components}/FormLabel/FormLabel.d.ts +0 -0
  374. /package/dist/{components → types/components}/FormLabel/FormLabel.styled.d.ts +0 -0
  375. /package/dist/{components → types/components}/FormLabel/index.d.ts +0 -0
  376. /package/dist/{components → types/components}/Modal/Modal.d.ts +0 -0
  377. /package/dist/{components → types/components}/Modal/index.d.ts +0 -0
  378. /package/dist/{components → types/components}/Radio/Radio.d.ts +0 -0
  379. /package/dist/{components → types/components}/Radio/index.d.ts +0 -0
  380. /package/dist/{components → types/components}/RadioGroup/index.d.ts +0 -0
  381. /package/dist/{components → types/components}/Toggle/Toggle.d.ts +0 -0
  382. /package/dist/{components → types/components}/Toggle/Toggle.styled.d.ts +0 -0
  383. /package/dist/{components → types/components}/Toggle/Toggle.types.d.ts +0 -0
  384. /package/dist/{components → types/components}/Toggle/index.d.ts +0 -0
  385. /package/dist/{components → types/components}/ToggleButton/ToggleButton.d.ts +0 -0
  386. /package/dist/{components → types/components}/ToggleButton/index.d.ts +0 -0
  387. /package/dist/{components → types/components}/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -0
  388. /package/dist/{components → types/components}/ToggleButtonGroup/index.d.ts +0 -0
  389. /package/dist/{components → types/components}/Tooltip/Tooltip.d.ts +0 -0
  390. /package/dist/{components → types/components}/Tooltip/index.d.ts +0 -0
  391. /package/dist/{components → types/components}/index.d.ts +0 -0
  392. /package/dist/{foundation → types/foundation}/Elevation/index.d.ts +0 -0
  393. /package/dist/{foundation → types/foundation}/Elevation/utils.d.ts +0 -0
  394. /package/dist/{foundation → types/foundation}/Typography/index.d.ts +0 -0
  395. /package/dist/{foundation → types/foundation}/Typography/tokens.d.ts +0 -0
  396. /package/dist/{foundation → types/foundation}/colors/base/blue.d.ts +0 -0
  397. /package/dist/{foundation → types/foundation}/colors/base/green.d.ts +0 -0
  398. /package/dist/{foundation → types/foundation}/colors/base/index.d.ts +0 -0
  399. /package/dist/{foundation → types/foundation}/colors/base/magenta.d.ts +0 -0
  400. /package/dist/{foundation → types/foundation}/colors/base/opacity.d.ts +0 -0
  401. /package/dist/{foundation → types/foundation}/colors/base/orange.d.ts +0 -0
  402. /package/dist/{foundation → types/foundation}/colors/base/purple.d.ts +0 -0
  403. /package/dist/{foundation → types/foundation}/colors/base/red.d.ts +0 -0
  404. /package/dist/{foundation → types/foundation}/colors/base/yellow.d.ts +0 -0
  405. /package/dist/{foundation → types/foundation}/colors/token/component.d.ts +0 -0
  406. /package/dist/{foundation → types/foundation}/colors/token/core.d.ts +0 -0
  407. /package/dist/{foundation → types/foundation}/colors/token/index.d.ts +0 -0
  408. /package/dist/{foundation → types/foundation}/colors/token/types.d.ts +0 -0
  409. /package/dist/{foundation → types/foundation}/spacing.d.ts +0 -0
  410. /package/dist/{theme.d.ts → types/theme.d.ts} +0 -0
@@ -0,0 +1,139 @@
1
+ import React from "react";
2
+ import Bell from "@lunit/design-system-icons/Bell";
3
+ import { action } from "@storybook/addon-actions";
4
+
5
+ import Button from "@/components/Button";
6
+
7
+ import type { StoryFn, Meta } from "@storybook/react";
8
+
9
+ export default {
10
+ title: "Components/Button",
11
+ component: Button,
12
+ args: {
13
+ kind: "contained",
14
+ color: "primary",
15
+ disabled: false,
16
+ size: "small",
17
+ onClick: action("onClick"),
18
+ },
19
+ argTypes: {
20
+ icon: {
21
+ control: false,
22
+ description: `Use this prop when you want to add icon.
23
+ \n It is added to the left of the text criteria`,
24
+ table: {
25
+ defaultValue: { summary: "undefined" },
26
+ type: { summary: "React.ReactNode" },
27
+ },
28
+ },
29
+ kind: {
30
+ control: {
31
+ type: "radio",
32
+ },
33
+ options: ["contained", "outlined", "ghost"],
34
+ description: "Button has three Kinds Contained, Outlined, Ghost",
35
+ table: {
36
+ defaultValue: { summary: "contained" },
37
+ },
38
+ },
39
+ color: {
40
+ control: {
41
+ type: "radio",
42
+ },
43
+ options: ["primary", "secondary", "error"],
44
+ table: {
45
+ defaultValue: { summary: "primary" },
46
+ },
47
+ },
48
+ disabled: {
49
+ control: {
50
+ type: "boolean",
51
+ },
52
+ table: {
53
+ defaultValue: { summary: "false" },
54
+ },
55
+ },
56
+ size: {
57
+ control: {
58
+ type: "radio",
59
+ },
60
+ options: ["small", "medium", "large"],
61
+ table: {
62
+ defaultValue: { summary: "small" },
63
+ },
64
+ },
65
+ onClick: {
66
+ type: "function",
67
+ control: {
68
+ type: "radio",
69
+ },
70
+ options: ["function", undefined],
71
+ mapping: {
72
+ function: action("onClick"),
73
+ undefined: undefined,
74
+ },
75
+ description:
76
+ "It is a callback function that is called when the button is clicked.",
77
+ },
78
+ },
79
+ parameters: {
80
+ controls: {
81
+ include: [
82
+ "children",
83
+ "icon",
84
+ "onClick",
85
+ "disabled",
86
+ "size",
87
+ "kind",
88
+ "color",
89
+ ],
90
+ },
91
+ docs: {
92
+ description: {
93
+ component: `It is a Clickable Icon Button. For more details, please
94
+ see [Material-UI Button](https://mui.com/material-ui/react-button/).`,
95
+ },
96
+ },
97
+ },
98
+ } as Meta<typeof Button>;
99
+
100
+ const IconButtonTemplate: StoryFn<typeof Button> = (args) => (
101
+ <Button icon={<Bell />} {...args}>
102
+ {args.children}
103
+ </Button>
104
+ );
105
+
106
+ export const IconOnlyButton = {
107
+ render: IconButtonTemplate,
108
+
109
+ argTypes: {
110
+ children: {
111
+ control: false,
112
+ type: "string",
113
+ table: {
114
+ defaultValue: { summary: "undefined" },
115
+ },
116
+ },
117
+ },
118
+
119
+ name: "Icon only",
120
+ };
121
+
122
+ export const IconWithTextButton = {
123
+ render: IconButtonTemplate,
124
+
125
+ args: {
126
+ children: "Text",
127
+ },
128
+
129
+ argTypes: {
130
+ children: {
131
+ type: "string",
132
+ table: {
133
+ defaultValue: { summary: "undefined" },
134
+ },
135
+ },
136
+ },
137
+
138
+ name: "Icon",
139
+ };
@@ -0,0 +1,540 @@
1
+ import React from "react";
2
+ import {
3
+ Table,
4
+ TableHead,
5
+ TableRow,
6
+ TableBody,
7
+ TableCell,
8
+ } from "@mui/material";
9
+ import { action } from "@storybook/addon-actions";
10
+
11
+ import Button from "@/components/Button";
12
+
13
+ import type { StoryFn, Meta } from "@storybook/react";
14
+
15
+ export default {
16
+ title: "Components/Button",
17
+ component: Button,
18
+ args: {
19
+ kind: "contained",
20
+ children: "Text",
21
+ disabled: false,
22
+ size: "small",
23
+ onClick: action("onClick"),
24
+ },
25
+ argTypes: {
26
+ children: {
27
+ type: "string",
28
+ },
29
+ disabled: {
30
+ control: {
31
+ type: "boolean",
32
+ },
33
+ table: {
34
+ defaultValue: { summary: "false" },
35
+ },
36
+ },
37
+ size: {
38
+ control: {
39
+ type: "radio",
40
+ },
41
+ options: ["small", "medium", "large"],
42
+ table: {
43
+ defaultValue: { summary: "small" },
44
+ },
45
+ },
46
+ onClick: {
47
+ type: "function",
48
+ control: {
49
+ type: "radio",
50
+ },
51
+ options: ["function", undefined],
52
+ mapping: {
53
+ function: action("onClick"),
54
+ undefined: undefined,
55
+ },
56
+ description:
57
+ "It is a callback function that is called when the button is clicked.",
58
+ },
59
+ kind: {
60
+ control: false,
61
+ options: ["contained", "outlined", "ghost"],
62
+ description: "Button has three Kinds Contained, Outlined, Ghost",
63
+ table: {
64
+ defaultValue: { summary: "contained" },
65
+ },
66
+ },
67
+ },
68
+ parameters: {
69
+ controls: {
70
+ include: ["onClick", "children", "color", "size", "disabled", "kind"],
71
+ },
72
+ pseudo: {
73
+ hover: [
74
+ "#hover1",
75
+ "#hover2",
76
+ "#hover3",
77
+ "#hover4",
78
+ "#hover5",
79
+ "#hover6",
80
+ "#hover7",
81
+ ],
82
+ },
83
+ docs: {
84
+ description: {
85
+ component: `It is a kind Button docs. For more details, please
86
+ see [Material-UI Button](https://mui.com/material-ui/react-button/).`,
87
+ },
88
+ },
89
+ },
90
+ } as Meta<typeof Button>;
91
+
92
+ const ButtonTemplate: StoryFn<typeof Button> = ({
93
+ kind,
94
+ color,
95
+ children,
96
+ ...restProps
97
+ }) => {
98
+ return (
99
+ <>
100
+ <Table sx={{ width: 600 }}>
101
+ <TableHead>
102
+ <TableRow>
103
+ <TableCell
104
+ colSpan={3}
105
+ sx={{
106
+ typography: "body1_16_semibold",
107
+ color: "inherit",
108
+ }}
109
+ >
110
+ Kind
111
+ </TableCell>
112
+ </TableRow>
113
+ <TableRow>
114
+ <TableCell
115
+ sx={{
116
+ width: "33.33333%",
117
+ typography: "body2_14_medium",
118
+ color: "inherit",
119
+ }}
120
+ >
121
+ Contained(default)
122
+ </TableCell>
123
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
124
+ Outlined
125
+ </TableCell>
126
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
127
+ Ghost
128
+ </TableCell>
129
+ </TableRow>
130
+ </TableHead>
131
+ <TableBody>
132
+ <TableRow>
133
+ <TableCell>
134
+ <Button color={color} {...restProps}>
135
+ {children}
136
+ </Button>
137
+ </TableCell>
138
+ <TableCell>
139
+ <Button kind="outlined" color="primary" {...restProps}>
140
+ {children}
141
+ </Button>
142
+ </TableCell>
143
+ <TableCell>
144
+ <Button kind="ghost" color={color} {...restProps}>
145
+ {children}
146
+ </Button>
147
+ </TableCell>
148
+ </TableRow>
149
+ </TableBody>
150
+ </Table>
151
+ </>
152
+ );
153
+ };
154
+
155
+ export const Kind = {
156
+ render: ButtonTemplate,
157
+ };
158
+
159
+ const ContainedButtonTemplate: StoryFn<typeof Button> = (args) => {
160
+ return (
161
+ <>
162
+ <Table sx={{ width: 650 }}>
163
+ <TableHead>
164
+ <TableRow>
165
+ <TableCell></TableCell>
166
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
167
+ Contained Primary
168
+ </TableCell>
169
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
170
+ Contained Secondary
171
+ </TableCell>
172
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
173
+ Contained Error
174
+ </TableCell>
175
+ </TableRow>
176
+ </TableHead>
177
+ <TableBody>
178
+ <TableRow>
179
+ <TableCell
180
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
181
+ >
182
+ Enable
183
+ </TableCell>
184
+ <TableCell>
185
+ <Button {...args} kind="contained">
186
+ {args.children}
187
+ </Button>
188
+ </TableCell>
189
+ <TableCell>
190
+ <Button {...args} kind="contained" color="secondary">
191
+ {args.children}
192
+ </Button>
193
+ </TableCell>
194
+ <TableCell>
195
+ <Button {...args} kind="contained" color="error">
196
+ {args.children}
197
+ </Button>
198
+ </TableCell>
199
+ </TableRow>
200
+ <TableRow>
201
+ <TableCell
202
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
203
+ >
204
+ Hover
205
+ </TableCell>
206
+ <TableCell>
207
+ <Button {...args} id="hover1" kind="contained">
208
+ {args.children}
209
+ </Button>
210
+ </TableCell>
211
+ <TableCell>
212
+ <Button {...args} id="hover2" kind="contained" color="secondary">
213
+ {args.children}
214
+ </Button>
215
+ </TableCell>
216
+ <TableCell>
217
+ <Button {...args} id="hover3" kind="contained" color="error">
218
+ {args.children}
219
+ </Button>
220
+ </TableCell>
221
+ </TableRow>
222
+ <TableRow>
223
+ <TableCell
224
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
225
+ >
226
+ Focus
227
+ </TableCell>
228
+ <TableCell>
229
+ <Button {...args} kind="contained" className="Mui-focusVisible">
230
+ {args.children}
231
+ </Button>
232
+ </TableCell>
233
+ <TableCell>
234
+ <Button
235
+ {...args}
236
+ kind="contained"
237
+ color="secondary"
238
+ className="Mui-focusVisible"
239
+ >
240
+ {args.children}
241
+ </Button>
242
+ </TableCell>
243
+ <TableCell>
244
+ <Button
245
+ {...args}
246
+ kind="contained"
247
+ color="error"
248
+ className="Mui-focusVisible"
249
+ >
250
+ {args.children}
251
+ </Button>
252
+ </TableCell>
253
+ </TableRow>
254
+ <TableRow>
255
+ <TableCell
256
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
257
+ >
258
+ Disabled
259
+ </TableCell>
260
+ <TableCell>
261
+ <Button {...args} kind="contained" disabled>
262
+ {args.children}
263
+ </Button>
264
+ </TableCell>
265
+ <TableCell>
266
+ <Button {...args} kind="contained" color="secondary" disabled>
267
+ {args.children}
268
+ </Button>
269
+ </TableCell>
270
+ <TableCell>
271
+ <Button {...args} kind="contained" color="error" disabled>
272
+ {args.children}
273
+ </Button>
274
+ </TableCell>
275
+ </TableRow>
276
+ </TableBody>
277
+ </Table>
278
+ </>
279
+ );
280
+ };
281
+
282
+ export const KindContained = {
283
+ render: ContainedButtonTemplate,
284
+
285
+ argTypes: {
286
+ color: {
287
+ control: "false",
288
+ options: ["primary", "secondary", "error"],
289
+ defaultValue: "primary",
290
+ description: `The color of the component.
291
+ \n It supports both default and custom theme colors,
292
+ \n which can be added as shown in the palette customization guide.`,
293
+ table: {
294
+ defaultValue: { summary: "primary" },
295
+ },
296
+ },
297
+ },
298
+
299
+ name: "Kind: Contained",
300
+ };
301
+
302
+ const GhostButtonTemplate: StoryFn<typeof Button> = (args) => {
303
+ return (
304
+ <>
305
+ <Table sx={{ width: 650 }}>
306
+ <TableHead>
307
+ <TableRow>
308
+ <TableCell></TableCell>
309
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
310
+ Ghost Primary
311
+ </TableCell>
312
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
313
+ Ghost Secondary
314
+ </TableCell>
315
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
316
+ Ghost Error
317
+ </TableCell>
318
+ </TableRow>
319
+ </TableHead>
320
+ <TableBody>
321
+ <TableRow>
322
+ <TableCell
323
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
324
+ >
325
+ Enable
326
+ </TableCell>
327
+ <TableCell>
328
+ <Button {...args} kind="ghost">
329
+ {args.children}
330
+ </Button>
331
+ </TableCell>
332
+ <TableCell>
333
+ <Button {...args} kind="ghost" color="secondary">
334
+ {args.children}
335
+ </Button>
336
+ </TableCell>
337
+ <TableCell>
338
+ <Button {...args} kind="ghost" color="error">
339
+ {args.children}
340
+ </Button>
341
+ </TableCell>
342
+ </TableRow>
343
+ <TableRow>
344
+ <TableCell
345
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
346
+ >
347
+ Hover
348
+ </TableCell>
349
+ <TableCell>
350
+ <Button {...args} id="hover4" kind="ghost">
351
+ {args.children}
352
+ </Button>
353
+ </TableCell>
354
+ <TableCell>
355
+ <Button {...args} id="hover5" kind="ghost" color="secondary">
356
+ {args.children}
357
+ </Button>
358
+ </TableCell>
359
+ <TableCell>
360
+ <Button {...args} id="hover6" kind="ghost" color="error">
361
+ {args.children}
362
+ </Button>
363
+ </TableCell>
364
+ </TableRow>
365
+ <TableRow>
366
+ <TableCell
367
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
368
+ >
369
+ Focus
370
+ </TableCell>
371
+ <TableCell>
372
+ <Button {...args} kind="ghost" className="Mui-focusVisible">
373
+ {args.children}
374
+ </Button>
375
+ </TableCell>
376
+ <TableCell>
377
+ <Button
378
+ {...args}
379
+ kind="ghost"
380
+ color="secondary"
381
+ className="Mui-focusVisible"
382
+ >
383
+ {args.children}
384
+ </Button>
385
+ </TableCell>
386
+ <TableCell>
387
+ <Button
388
+ {...args}
389
+ kind="ghost"
390
+ color="error"
391
+ className="Mui-focusVisible"
392
+ >
393
+ {args.children}
394
+ </Button>
395
+ </TableCell>
396
+ </TableRow>
397
+ <TableRow>
398
+ <TableCell
399
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
400
+ >
401
+ Disabled
402
+ </TableCell>
403
+ <TableCell>
404
+ <Button {...args} kind="ghost" disabled>
405
+ {args.children}
406
+ </Button>
407
+ </TableCell>
408
+ <TableCell>
409
+ <Button {...args} kind="ghost" color="secondary" disabled>
410
+ {args.children}
411
+ </Button>
412
+ </TableCell>
413
+ <TableCell>
414
+ <Button {...args} kind="ghost" color="error" disabled>
415
+ {args.children}
416
+ </Button>
417
+ </TableCell>
418
+ </TableRow>
419
+ </TableBody>
420
+ </Table>
421
+ <br />
422
+ <br />
423
+ </>
424
+ );
425
+ };
426
+
427
+ export const KindGhost = {
428
+ render: GhostButtonTemplate,
429
+
430
+ argTypes: {
431
+ color: {
432
+ control: "false",
433
+ options: ["primary", "secondary", "error"],
434
+ description: `The color of the component.
435
+ \n It supports both default and custom theme colors,
436
+ \n which can be added as shown in the palette customization guide.`,
437
+ defaultValue: "primary",
438
+ table: {
439
+ defaultValue: { summary: "primary" },
440
+ },
441
+ },
442
+ },
443
+
444
+ name: "Kind: Ghost",
445
+ };
446
+
447
+ const OutlinedButtonTemplate: StoryFn<typeof Button> = ({
448
+ color,
449
+ ...restProps
450
+ }) => {
451
+ return (
452
+ <>
453
+ <Table sx={{ width: 250 }}>
454
+ <TableHead>
455
+ <TableRow>
456
+ <TableCell></TableCell>
457
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
458
+ Outlined Primary
459
+ </TableCell>
460
+ </TableRow>
461
+ </TableHead>
462
+ <TableBody>
463
+ <TableRow>
464
+ <TableCell
465
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
466
+ >
467
+ Enable
468
+ </TableCell>
469
+ <TableCell>
470
+ <Button {...restProps} kind="outlined">
471
+ Text
472
+ </Button>
473
+ </TableCell>
474
+ </TableRow>
475
+ <TableRow>
476
+ <TableCell
477
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
478
+ >
479
+ Hover
480
+ </TableCell>
481
+ <TableCell>
482
+ <Button {...restProps} id="hover7" kind="outlined">
483
+ Text
484
+ </Button>
485
+ </TableCell>
486
+ </TableRow>
487
+ <TableRow>
488
+ <TableCell
489
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
490
+ >
491
+ Focus
492
+ </TableCell>
493
+ <TableCell>
494
+ <Button
495
+ {...restProps}
496
+ kind="outlined"
497
+ className="Mui-focusVisible"
498
+ >
499
+ Text
500
+ </Button>
501
+ </TableCell>
502
+ </TableRow>
503
+ <TableRow>
504
+ <TableCell
505
+ sx={{ typography: "body2_14_regular", color: "inherit" }}
506
+ >
507
+ Disabled
508
+ </TableCell>
509
+ <TableCell>
510
+ <Button {...restProps} kind="outlined" disabled>
511
+ Text
512
+ </Button>
513
+ </TableCell>
514
+ </TableRow>
515
+ </TableBody>
516
+ </Table>
517
+ </>
518
+ );
519
+ };
520
+
521
+ export const KindOutlined = {
522
+ render: OutlinedButtonTemplate,
523
+
524
+ argTypes: {
525
+ color: {
526
+ control: "false",
527
+ options: ["primary"],
528
+ defaultValue: "primary",
529
+ description: `The color of the component.
530
+ \n It supports both default and custom theme colors,
531
+ \n which can be added as shown in the palette customization guide.`,
532
+ table: {
533
+ type: { summary: "primary" },
534
+ defaultValue: { summary: "primary" },
535
+ },
536
+ },
537
+ },
538
+
539
+ name: "Kind: Outlined",
540
+ };