@lunit/design-system 1.0.0-a.1 → 1.0.0-a.2

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/dist/cjs/components/Alert/index.js +2 -0
  2. package/dist/cjs/components/Alert/index.js.map +1 -0
  3. package/dist/cjs/components/Button/index.js +2 -0
  4. package/dist/cjs/components/Button/index.js.map +1 -0
  5. package/dist/cjs/components/Checkbox/index.js +2 -0
  6. package/dist/cjs/components/Checkbox/index.js.map +1 -0
  7. package/dist/cjs/components/Chip/index.js +2 -0
  8. package/dist/cjs/components/Chip/index.js.map +1 -0
  9. package/dist/cjs/components/DataTable/index.js +2 -0
  10. package/dist/cjs/components/DataTable/index.js.map +1 -0
  11. package/dist/cjs/components/DatePicker/index.js +2 -0
  12. package/dist/cjs/components/DatePicker/index.js.map +1 -0
  13. package/dist/cjs/components/Dropdown/index.js +2 -0
  14. package/dist/cjs/components/Dropdown/index.js.map +1 -0
  15. package/dist/cjs/components/FormLabel/index.js +2 -0
  16. package/dist/cjs/components/FormLabel/index.js.map +1 -0
  17. package/dist/cjs/components/Modal/index.js +2 -0
  18. package/dist/cjs/components/Modal/index.js.map +1 -0
  19. package/dist/cjs/components/Radio/index.js +2 -0
  20. package/dist/cjs/components/Radio/index.js.map +1 -0
  21. package/dist/cjs/components/RadioGroup/index.js +2 -0
  22. package/dist/cjs/components/RadioGroup/index.js.map +1 -0
  23. package/dist/cjs/components/TextField/index.js +2 -0
  24. package/dist/cjs/components/TextField/index.js.map +1 -0
  25. package/dist/cjs/components/Toggle/index.js +2 -0
  26. package/dist/cjs/components/Toggle/index.js.map +1 -0
  27. package/dist/cjs/components/ToggleButton/index.js +2 -0
  28. package/dist/cjs/components/ToggleButton/index.js.map +1 -0
  29. package/dist/cjs/components/Tooltip/index.js +2 -0
  30. package/dist/cjs/components/Tooltip/index.js.map +1 -0
  31. package/dist/cjs/index.js +2 -0
  32. package/dist/cjs/index.js.map +1 -0
  33. package/dist/components/Alert/Alert.js +7 -0
  34. package/dist/components/Alert/Alert.js.map +1 -0
  35. package/dist/components/Alert/index.js +1 -1
  36. package/dist/components/Alert/index.js.map +1 -1
  37. package/dist/components/Button/Button.js +9 -0
  38. package/dist/components/Button/Button.js.map +1 -0
  39. package/dist/components/Button/Button.styled.js +170 -0
  40. package/dist/components/Button/Button.styled.js.map +1 -0
  41. package/dist/components/Button/Button.types.js +2 -0
  42. package/dist/components/Button/Button.types.js.map +1 -0
  43. package/dist/components/Button/const.js +3 -0
  44. package/dist/components/Button/const.js.map +1 -0
  45. package/dist/components/Button/index.js +1 -1
  46. package/dist/components/Button/index.js.map +1 -1
  47. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +23 -0
  48. package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -0
  49. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +23 -0
  50. package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -0
  51. package/dist/components/Checkbox/Checkbox.js +49 -0
  52. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  53. package/dist/components/Checkbox/index.js +1 -1
  54. package/dist/components/Checkbox/index.js.map +1 -1
  55. package/dist/components/Chip/Chip.js +70 -0
  56. package/dist/components/Chip/Chip.js.map +1 -0
  57. package/dist/components/Chip/Chip.styled.js +143 -0
  58. package/dist/components/Chip/Chip.styled.js.map +1 -0
  59. package/dist/components/Chip/Chip.types.js +2 -0
  60. package/dist/components/Chip/Chip.types.js.map +1 -0
  61. package/dist/components/Chip/consts.js +8 -0
  62. package/dist/components/Chip/consts.js.map +1 -0
  63. package/dist/components/Chip/index.js +1 -1
  64. package/dist/components/Chip/index.js.map +1 -1
  65. package/dist/components/DataTable/DataTable.js +7 -0
  66. package/dist/components/DataTable/DataTable.js.map +1 -0
  67. package/dist/components/DataTable/index.js +1 -1
  68. package/dist/components/DataTable/index.js.map +1 -1
  69. package/dist/components/DatePicker/DatePicker.js +7 -0
  70. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  71. package/dist/components/DatePicker/index.js +1 -1
  72. package/dist/components/DatePicker/index.js.map +1 -1
  73. package/dist/components/Dropdown/Dropdown.js +7 -0
  74. package/dist/components/Dropdown/Dropdown.js.map +1 -0
  75. package/dist/components/Dropdown/index.js +1 -1
  76. package/dist/components/Dropdown/index.js.map +1 -1
  77. package/dist/components/FormLabel/FormLabel.js +7 -0
  78. package/dist/components/FormLabel/FormLabel.js.map +1 -0
  79. package/dist/components/FormLabel/FormLabel.styled.js +8 -0
  80. package/dist/components/FormLabel/FormLabel.styled.js.map +1 -0
  81. package/dist/components/FormLabel/index.js +1 -1
  82. package/dist/components/FormLabel/index.js.map +1 -1
  83. package/dist/components/Modal/Modal.js +7 -0
  84. package/dist/components/Modal/Modal.js.map +1 -0
  85. package/dist/components/Modal/index.js +1 -1
  86. package/dist/components/Modal/index.js.map +1 -1
  87. package/dist/components/Radio/Radio.js +43 -0
  88. package/dist/components/Radio/Radio.js.map +1 -0
  89. package/dist/components/Radio/index.js +1 -1
  90. package/dist/components/Radio/index.js.map +1 -1
  91. package/dist/components/RadioGroup/index.js +2 -1
  92. package/dist/components/RadioGroup/index.js.map +1 -1
  93. package/dist/components/TextField/TextField.js +7 -0
  94. package/dist/components/TextField/TextField.js.map +1 -0
  95. package/dist/components/TextField/index.js +1 -1
  96. package/dist/components/TextField/index.js.map +1 -1
  97. package/dist/components/Toggle/Toggle.js +13 -0
  98. package/dist/components/Toggle/Toggle.js.map +1 -0
  99. package/dist/components/Toggle/Toggle.styled.js +155 -0
  100. package/dist/components/Toggle/Toggle.styled.js.map +1 -0
  101. package/dist/components/Toggle/Toggle.types.js +2 -0
  102. package/dist/components/Toggle/Toggle.types.js.map +1 -0
  103. package/dist/components/Toggle/index.js +1 -1
  104. package/dist/components/Toggle/index.js.map +1 -1
  105. package/dist/components/ToggleButton/ToggleButton.js +12 -0
  106. package/dist/components/ToggleButton/ToggleButton.js.map +1 -0
  107. package/dist/components/ToggleButton/ToggleButton.styled.js +35 -0
  108. package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -0
  109. package/dist/components/ToggleButton/ToggleButton.types.js +2 -0
  110. package/dist/components/ToggleButton/ToggleButton.types.js.map +1 -0
  111. package/dist/components/ToggleButton/index.js +1 -1
  112. package/dist/components/ToggleButton/index.js.map +1 -1
  113. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +7 -0
  114. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
  115. package/dist/components/ToggleButtonGroup/index.js +2 -0
  116. package/dist/components/ToggleButtonGroup/index.js.map +1 -0
  117. package/dist/components/Tooltip/Tooltip.js +7 -0
  118. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  119. package/dist/components/Tooltip/index.js +1 -1
  120. package/dist/components/Tooltip/index.js.map +1 -1
  121. package/dist/components/index.js +7 -0
  122. package/dist/components/index.js.map +1 -0
  123. package/dist/foundation/Elevation/index.js +66 -0
  124. package/dist/foundation/Elevation/index.js.map +1 -0
  125. package/dist/foundation/Elevation/utils.js +9 -0
  126. package/dist/foundation/Elevation/utils.js.map +1 -0
  127. package/dist/foundation/Typography/index.js +62 -0
  128. package/dist/foundation/Typography/index.js.map +1 -0
  129. package/dist/foundation/Typography/tokens.js +155 -0
  130. package/dist/foundation/Typography/tokens.js.map +1 -0
  131. package/dist/foundation/colors/base/blue.js +26 -0
  132. package/dist/foundation/colors/base/blue.js.map +1 -0
  133. package/dist/foundation/colors/base/green.js +26 -0
  134. package/dist/foundation/colors/base/green.js.map +1 -0
  135. package/dist/foundation/colors/base/grey.js +36 -0
  136. package/dist/foundation/colors/base/grey.js.map +1 -0
  137. package/dist/foundation/colors/base/index.js +12 -0
  138. package/dist/foundation/colors/base/index.js.map +1 -0
  139. package/dist/foundation/colors/base/lunitGreen.js +26 -0
  140. package/dist/foundation/colors/base/lunitGreen.js.map +1 -0
  141. package/dist/foundation/colors/base/lunitTeal.js +26 -0
  142. package/dist/foundation/colors/base/lunitTeal.js.map +1 -0
  143. package/dist/foundation/colors/base/magenta.js +26 -0
  144. package/dist/foundation/colors/base/magenta.js.map +1 -0
  145. package/dist/foundation/colors/base/opacity.js +7 -0
  146. package/dist/foundation/colors/base/opacity.js.map +1 -0
  147. package/dist/foundation/colors/base/orange.js +26 -0
  148. package/dist/foundation/colors/base/orange.js.map +1 -0
  149. package/dist/foundation/colors/base/purple.js +26 -0
  150. package/dist/foundation/colors/base/purple.js.map +1 -0
  151. package/dist/foundation/colors/base/red.js +26 -0
  152. package/dist/foundation/colors/base/red.js.map +1 -0
  153. package/dist/foundation/colors/base/yellow.js +26 -0
  154. package/dist/foundation/colors/base/yellow.js.map +1 -0
  155. package/dist/foundation/colors/index.js +188 -0
  156. package/dist/foundation/colors/index.js.map +1 -0
  157. package/dist/foundation/colors/token/component.js +449 -0
  158. package/dist/foundation/colors/token/component.js.map +1 -0
  159. package/dist/foundation/colors/token/core.js +199 -0
  160. package/dist/foundation/colors/token/core.js.map +1 -0
  161. package/dist/foundation/colors/token/index.js +3 -0
  162. package/dist/foundation/colors/token/index.js.map +1 -0
  163. package/dist/foundation/colors/token/types.js +2 -0
  164. package/dist/foundation/colors/token/types.js.map +1 -0
  165. package/dist/foundation/colors/types.js +2 -0
  166. package/dist/foundation/colors/types.js.map +1 -0
  167. package/dist/foundation/index.js +13 -0
  168. package/dist/foundation/index.js.map +1 -0
  169. package/dist/foundation/spacing.js +2 -0
  170. package/dist/foundation/spacing.js.map +1 -0
  171. package/dist/index.js +16 -1
  172. package/dist/index.js.map +1 -1
  173. package/dist/theme.js +34 -0
  174. package/dist/theme.js.map +1 -0
  175. package/dist/types/components/Chip/Chip.styled.d.ts +79 -0
  176. package/package.json +19 -10
  177. package/src/components/Alert/Alert.tsx +9 -0
  178. package/src/components/Alert/index.ts +1 -0
  179. package/src/components/Button/Button.styled.ts +220 -0
  180. package/src/components/Button/Button.tsx +54 -0
  181. package/src/components/Button/Button.types.ts +25 -0
  182. package/src/components/Button/const.ts +2 -0
  183. package/src/components/Button/index.ts +1 -0
  184. package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +35 -0
  185. package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +38 -0
  186. package/src/components/Checkbox/Checkbox.tsx +67 -0
  187. package/src/components/Checkbox/index.ts +1 -0
  188. package/src/components/Chip/Chip.styled.ts +162 -0
  189. package/src/components/Chip/Chip.tsx +132 -0
  190. package/src/components/Chip/Chip.types.ts +56 -0
  191. package/src/components/Chip/consts.ts +7 -0
  192. package/src/components/Chip/index.ts +1 -0
  193. package/src/components/DataTable/DataTable.tsx +8 -0
  194. package/src/components/DataTable/index.ts +1 -0
  195. package/src/components/DatePicker/DatePicker.tsx +8 -0
  196. package/src/components/DatePicker/index.ts +1 -0
  197. package/src/components/Dropdown/Dropdown.tsx +11 -0
  198. package/src/components/Dropdown/index.ts +1 -0
  199. package/src/components/FormLabel/FormLabel.styled.ts +8 -0
  200. package/src/components/FormLabel/FormLabel.tsx +9 -0
  201. package/src/components/FormLabel/index.ts +1 -0
  202. package/src/components/Modal/Modal.tsx +8 -0
  203. package/src/components/Modal/index.ts +1 -0
  204. package/src/components/Radio/Radio.tsx +58 -0
  205. package/src/components/Radio/index.ts +1 -0
  206. package/src/components/RadioGroup/index.ts +2 -0
  207. package/src/components/TextField/TextField.tsx +8 -0
  208. package/src/components/TextField/index.ts +1 -0
  209. package/src/components/Toggle/Toggle.styled.ts +162 -0
  210. package/src/components/Toggle/Toggle.tsx +18 -0
  211. package/src/components/Toggle/Toggle.types.ts +14 -0
  212. package/src/components/Toggle/index.ts +1 -0
  213. package/src/components/ToggleButton/ToggleButton.styled.ts +58 -0
  214. package/src/components/ToggleButton/ToggleButton.tsx +89 -0
  215. package/src/components/ToggleButton/ToggleButton.types.ts +28 -0
  216. package/src/components/ToggleButton/index.ts +1 -0
  217. package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +13 -0
  218. package/src/components/ToggleButtonGroup/index.tsx +1 -0
  219. package/src/components/Tooltip/Tooltip.tsx +9 -0
  220. package/src/components/Tooltip/index.ts +1 -0
  221. package/src/components/index.ts +9 -0
  222. package/src/foundation/Elevation/index.ts +72 -0
  223. package/src/foundation/Elevation/utils.ts +11 -0
  224. package/src/foundation/Typography/index.ts +96 -0
  225. package/src/foundation/Typography/tokens.ts +162 -0
  226. package/src/foundation/colors/base/blue.ts +27 -0
  227. package/src/foundation/colors/base/green.ts +27 -0
  228. package/src/foundation/colors/base/grey.ts +36 -0
  229. package/src/foundation/colors/base/index.ts +11 -0
  230. package/src/foundation/colors/base/lunitGreen.ts +27 -0
  231. package/src/foundation/colors/base/lunitTeal.ts +27 -0
  232. package/src/foundation/colors/base/magenta.ts +27 -0
  233. package/src/foundation/colors/base/opacity.ts +6 -0
  234. package/src/foundation/colors/base/orange.ts +27 -0
  235. package/src/foundation/colors/base/purple.ts +27 -0
  236. package/src/foundation/colors/base/red.ts +27 -0
  237. package/src/foundation/colors/base/yellow.ts +27 -0
  238. package/src/foundation/colors/index.ts +235 -0
  239. package/src/foundation/colors/token/component.ts +456 -0
  240. package/src/foundation/colors/token/core.ts +204 -0
  241. package/src/foundation/colors/token/index.ts +2 -0
  242. package/src/foundation/colors/token/types.ts +8 -0
  243. package/src/foundation/colors/types.ts +85 -0
  244. package/src/foundation/index.ts +25 -0
  245. package/src/foundation/spacing.ts +3 -0
  246. package/src/index.ts +17 -0
  247. package/src/stories/components/Alert/Alert.stories.tsx +13 -0
  248. package/src/stories/components/Button/BasicButton.stories.tsx +177 -0
  249. package/src/stories/components/Button/IconButton.stories.tsx +128 -0
  250. package/src/stories/components/Button/Kind.stories.tsx +514 -0
  251. package/src/stories/components/Chip/Chip.stories.tsx +196 -0
  252. package/src/stories/components/DataTable/DataTable.stories.tsx +13 -0
  253. package/src/stories/components/DatePicker/DatePicker.stories.tsx +13 -0
  254. package/src/stories/components/Dropdown/Dropdown.stories.tsx +15 -0
  255. package/src/stories/components/Modal/Modal.stories.tsx +13 -0
  256. package/src/stories/components/SelectControl/Checkbox.stories.tsx +248 -0
  257. package/src/stories/components/SelectControl/RadioGroup.stories.tsx +67 -0
  258. package/src/stories/components/SelectControl/RadioStatus.stories.tsx +91 -0
  259. package/src/stories/components/SelectControl/Toggle.stories.tsx +429 -0
  260. package/src/stories/components/TextField/TextField.stories.tsx +13 -0
  261. package/src/stories/components/ToggleButton/Basic.stories.tsx +342 -0
  262. package/src/stories/components/ToggleButton/Group.stories.tsx +221 -0
  263. package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +698 -0
  264. package/src/stories/components/ToggleButton/WithIcon.stories.tsx +293 -0
  265. package/src/stories/components/Tooltip/Tooltip.stories.tsx +13 -0
  266. package/src/stories/foundation/Elevation/Elevation.stories.tsx +264 -0
  267. package/src/stories/foundation/Elevation/styled.ts +12 -0
  268. package/src/stories/foundation/Typography/Typography.stories.mdx +71 -0
  269. package/src/stories/foundation/Typography/Typography.stories.tsx +91 -0
  270. package/src/stories/foundation/Typography/TypographyGroup.tsx +71 -0
  271. package/src/stories/foundation/Typography/const.ts +25 -0
  272. package/src/stories/foundation/colors/Colors.stories.tsx +64 -0
  273. package/src/stories/foundation/colors/Token.inComponent.stories.tsx +167 -0
  274. package/src/stories/foundation/colors/Token.stories.tsx +190 -0
  275. package/src/stories/foundation/colors/styled.ts +39 -0
  276. package/src/theme.ts +41 -0
  277. package/src/types.d.ts +4 -0
  278. package/tsconfig.build.json +2 -0
  279. package/dist/components/Chip/Chip.styled.d.ts +0 -41
  280. package/dist/components/HelloWorld/HelloWorld.d.ts +0 -28
  281. package/webpack.config.js +0 -51
  282. /package/dist/{components → types/components}/Alert/Alert.d.ts +0 -0
  283. /package/dist/{components → types/components}/Alert/index.d.ts +0 -0
  284. /package/dist/{components → types/components}/Button/Button.d.ts +0 -0
  285. /package/dist/{components → types/components}/Button/Button.styled.d.ts +0 -0
  286. /package/dist/{components → types/components}/Button/Button.types.d.ts +0 -0
  287. /package/dist/{components → types/components}/Button/const.d.ts +0 -0
  288. /package/dist/{components → types/components}/Button/index.d.ts +0 -0
  289. /package/dist/{components → types/components}/Button/utils/getButtonPaddingBySizeAndKind.d.ts +0 -0
  290. /package/dist/{components → types/components}/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +0 -0
  291. /package/dist/{components → types/components}/Checkbox/Checkbox.d.ts +0 -0
  292. /package/dist/{components → types/components}/Checkbox/index.d.ts +0 -0
  293. /package/dist/{components → types/components}/Chip/Chip.d.ts +0 -0
  294. /package/dist/{components → types/components}/Chip/Chip.types.d.ts +0 -0
  295. /package/dist/{components → types/components}/Chip/consts.d.ts +0 -0
  296. /package/dist/{components → types/components}/Chip/index.d.ts +0 -0
  297. /package/dist/{components → types/components}/DataTable/DataTable.d.ts +0 -0
  298. /package/dist/{components → types/components}/DataTable/index.d.ts +0 -0
  299. /package/dist/{components → types/components}/DatePicker/DatePicker.d.ts +0 -0
  300. /package/dist/{components → types/components}/DatePicker/index.d.ts +0 -0
  301. /package/dist/{components → types/components}/Dropdown/Dropdown.d.ts +0 -0
  302. /package/dist/{components → types/components}/Dropdown/index.d.ts +0 -0
  303. /package/dist/{components → types/components}/FormLabel/FormLabel.d.ts +0 -0
  304. /package/dist/{components → types/components}/FormLabel/FormLabel.styled.d.ts +0 -0
  305. /package/dist/{components → types/components}/FormLabel/index.d.ts +0 -0
  306. /package/dist/{components → types/components}/Modal/Modal.d.ts +0 -0
  307. /package/dist/{components → types/components}/Modal/index.d.ts +0 -0
  308. /package/dist/{components → types/components}/Radio/Radio.d.ts +0 -0
  309. /package/dist/{components → types/components}/Radio/index.d.ts +0 -0
  310. /package/dist/{components → types/components}/RadioGroup/index.d.ts +0 -0
  311. /package/dist/{components → types/components}/TextField/TextField.d.ts +0 -0
  312. /package/dist/{components → types/components}/TextField/index.d.ts +0 -0
  313. /package/dist/{components → types/components}/Toggle/Toggle.d.ts +0 -0
  314. /package/dist/{components → types/components}/Toggle/Toggle.styled.d.ts +0 -0
  315. /package/dist/{components → types/components}/Toggle/Toggle.types.d.ts +0 -0
  316. /package/dist/{components → types/components}/Toggle/index.d.ts +0 -0
  317. /package/dist/{components → types/components}/ToggleButton/ToggleButton.d.ts +0 -0
  318. /package/dist/{components → types/components}/ToggleButton/ToggleButton.styled.d.ts +0 -0
  319. /package/dist/{components → types/components}/ToggleButton/ToggleButton.types.d.ts +0 -0
  320. /package/dist/{components → types/components}/ToggleButton/index.d.ts +0 -0
  321. /package/dist/{components → types/components}/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -0
  322. /package/dist/{components → types/components}/ToggleButtonGroup/index.d.ts +0 -0
  323. /package/dist/{components → types/components}/Tooltip/Tooltip.d.ts +0 -0
  324. /package/dist/{components → types/components}/Tooltip/index.d.ts +0 -0
  325. /package/dist/{components → types/components}/index.d.ts +0 -0
  326. /package/dist/{foundation → types/foundation}/Elevation/index.d.ts +0 -0
  327. /package/dist/{foundation → types/foundation}/Elevation/utils.d.ts +0 -0
  328. /package/dist/{foundation → types/foundation}/Typography/index.d.ts +0 -0
  329. /package/dist/{foundation → types/foundation}/Typography/tokens.d.ts +0 -0
  330. /package/dist/{foundation → types/foundation}/colors/base/blue.d.ts +0 -0
  331. /package/dist/{foundation → types/foundation}/colors/base/green.d.ts +0 -0
  332. /package/dist/{foundation → types/foundation}/colors/base/grey.d.ts +0 -0
  333. /package/dist/{foundation → types/foundation}/colors/base/index.d.ts +0 -0
  334. /package/dist/{foundation → types/foundation}/colors/base/lunitGreen.d.ts +0 -0
  335. /package/dist/{foundation → types/foundation}/colors/base/lunitTeal.d.ts +0 -0
  336. /package/dist/{foundation → types/foundation}/colors/base/magenta.d.ts +0 -0
  337. /package/dist/{foundation → types/foundation}/colors/base/opacity.d.ts +0 -0
  338. /package/dist/{foundation → types/foundation}/colors/base/orange.d.ts +0 -0
  339. /package/dist/{foundation → types/foundation}/colors/base/purple.d.ts +0 -0
  340. /package/dist/{foundation → types/foundation}/colors/base/red.d.ts +0 -0
  341. /package/dist/{foundation → types/foundation}/colors/base/yellow.d.ts +0 -0
  342. /package/dist/{foundation → types/foundation}/colors/index.d.ts +0 -0
  343. /package/dist/{foundation → types/foundation}/colors/token/component.d.ts +0 -0
  344. /package/dist/{foundation → types/foundation}/colors/token/core.d.ts +0 -0
  345. /package/dist/{foundation → types/foundation}/colors/token/index.d.ts +0 -0
  346. /package/dist/{foundation → types/foundation}/colors/token/types.d.ts +0 -0
  347. /package/dist/{foundation → types/foundation}/colors/types.d.ts +0 -0
  348. /package/dist/{foundation → types/foundation}/index.d.ts +0 -0
  349. /package/dist/{foundation → types/foundation}/spacing.d.ts +0 -0
  350. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  351. /package/dist/{theme.d.ts → types/theme.d.ts} +0 -0
@@ -0,0 +1,293 @@
1
+ import React, { useState } 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
+ import { Bell } from "@lunit/design-system-icons";
11
+
12
+ import ToggleButton from "@/components/ToggleButton";
13
+
14
+ import type { ComponentStory, ComponentMeta } from "@storybook/react";
15
+
16
+ export default {
17
+ title: "Components/ToggleButton",
18
+ component: ToggleButton,
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
+ \n and only Icon can be checked when used with hasIconOnly.`,
25
+ table: {
26
+ defaultValue: { summary: "undefined" },
27
+ type: { summary: "React.ReactNode" },
28
+ },
29
+ },
30
+ hasIconOnly: {
31
+ description: `Option to handle so that only icons can be inserted
32
+ \n If set to false, you can add Text.`,
33
+ table: {
34
+ defaultValue: { summary: "false" },
35
+ },
36
+ },
37
+ value: {
38
+ control: false,
39
+ table: { type: { summary: "any" } },
40
+ },
41
+ selected: {
42
+ control: false,
43
+ table: {
44
+ defaultValue: { summary: "false" },
45
+ },
46
+ },
47
+ selectedColor: {
48
+ control: false,
49
+ options: ["primary", "secondary"],
50
+ description:
51
+ "The color of the button when it is in an select state. It has nothing to do with active button",
52
+ table: {
53
+ defaultValue: { summary: "primary" },
54
+ },
55
+ },
56
+ color: {
57
+ control: {
58
+ type: "radio",
59
+ },
60
+ options: ["primary", "secondary"],
61
+ defaultValue: "primary",
62
+ description: "Button has three Kinds Contained, Ghost",
63
+ table: {
64
+ defaultValue: { summary: "primary" },
65
+ },
66
+ },
67
+ kind: {
68
+ control: {
69
+ type: "radio",
70
+ },
71
+ options: ["contained", "outlined", "ghost"],
72
+ defaultValue: "contained",
73
+ table: {
74
+ defaultValue: { summary: "contained" },
75
+ },
76
+ },
77
+ children: {
78
+ type: "string",
79
+ },
80
+ disabled: {
81
+ control: {
82
+ type: "boolean",
83
+ },
84
+ defaultValue: false,
85
+ table: {
86
+ defaultValue: { summary: "false" },
87
+ },
88
+ },
89
+ size: {
90
+ control: {
91
+ type: "radio",
92
+ },
93
+ options: ["small", "medium", "large"],
94
+ defaultValue: "small",
95
+ table: {
96
+ defaultValue: { summary: "small" },
97
+ },
98
+ },
99
+ onClick: {
100
+ type: "function",
101
+ control: {
102
+ type: "select",
103
+ },
104
+ options: ["function", undefined],
105
+ mapping: {
106
+ function: action("onClick"),
107
+ undefined: undefined,
108
+ },
109
+ defaultValue: "function",
110
+ description:
111
+ "It is a callback function that is called when the button is clicked.",
112
+ },
113
+ onChange: {
114
+ type: "function",
115
+ control: false,
116
+ options: ["function", undefined],
117
+ mapping: {
118
+ function: action("onChange"),
119
+ undefined: undefined,
120
+ },
121
+ defaultValue: "function",
122
+ },
123
+ },
124
+ args: {
125
+ selected: true,
126
+ kind: "contained",
127
+ },
128
+ parameters: {
129
+ controls: {
130
+ include: [
131
+ "icon",
132
+ "value",
133
+ "kind",
134
+ "selectedColor",
135
+ "onClick",
136
+ "children",
137
+ "disabled",
138
+ "size",
139
+ "selected",
140
+ "color",
141
+ "onChange",
142
+ ],
143
+ },
144
+ docs: {
145
+ description: {
146
+ component: `A Toggle Button can be used to group related options. please
147
+ see [Material-UI Toggle Button](https://mui.com/material-ui/react-toggle-button/).`,
148
+ },
149
+ },
150
+ },
151
+ } as ComponentMeta<typeof ToggleButton>;
152
+
153
+ const Template: ComponentStory<typeof ToggleButton> = (arg) => {
154
+ const [values, setValues] = useState({
155
+ primary: true,
156
+ secondary: true,
157
+ });
158
+
159
+ const handleChange = (value: keyof typeof values) => {
160
+ setValues({
161
+ ...values,
162
+ [value]: !values[value],
163
+ });
164
+ };
165
+
166
+ return (
167
+ <Table sx={{ width: 330 }}>
168
+ <TableHead>
169
+ <TableRow>
170
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
171
+ Selected color
172
+ </TableCell>
173
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
174
+ Primary
175
+ </TableCell>
176
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
177
+ Secondary
178
+ </TableCell>
179
+ </TableRow>
180
+ </TableHead>
181
+ <TableBody>
182
+ <TableRow>
183
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
184
+ Selected
185
+ </TableCell>
186
+ <TableCell>
187
+ <ToggleButton
188
+ {...arg}
189
+ icon={<Bell />}
190
+ value="primary"
191
+ onChange={() => handleChange("primary")}
192
+ selected={values.primary}
193
+ >
194
+ {arg.children}
195
+ </ToggleButton>
196
+ </TableCell>
197
+ <TableCell>
198
+ <ToggleButton
199
+ {...arg}
200
+ icon={<Bell />}
201
+ selectedColor="secondary"
202
+ value="secondary"
203
+ onChange={() => handleChange("secondary")}
204
+ selected={values.secondary}
205
+ >
206
+ {arg.children}
207
+ </ToggleButton>
208
+ </TableCell>
209
+ </TableRow>
210
+ </TableBody>
211
+ </Table>
212
+ );
213
+ };
214
+
215
+ export const IconStory = Template.bind({});
216
+ IconStory.storyName = "Icon";
217
+ IconStory.argTypes = {
218
+ children: {
219
+ type: "string",
220
+ defaultValue: "text",
221
+ },
222
+ };
223
+
224
+ const IconOnlyTemplate: ComponentStory<typeof ToggleButton> = (arg) => {
225
+ const [values, setValues] = useState({
226
+ primary: true,
227
+ secondary: true,
228
+ });
229
+
230
+ const handleChange = (value: keyof typeof values) => {
231
+ setValues({
232
+ ...values,
233
+ [value]: !values[value],
234
+ });
235
+ };
236
+
237
+ return (
238
+ <Table sx={{ width: 330 }}>
239
+ <TableHead>
240
+ <TableRow>
241
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
242
+ Selected color
243
+ </TableCell>
244
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
245
+ Primary
246
+ </TableCell>
247
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
248
+ Secondary
249
+ </TableCell>
250
+ </TableRow>
251
+ </TableHead>
252
+ <TableBody>
253
+ <TableRow>
254
+ <TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
255
+ Selected
256
+ </TableCell>
257
+ <TableCell>
258
+ <ToggleButton
259
+ {...arg}
260
+ icon={<Bell />}
261
+ value="primary"
262
+ onChange={() => handleChange("primary")}
263
+ selected={values.primary}
264
+ >
265
+ {arg.children}
266
+ </ToggleButton>
267
+ </TableCell>
268
+ <TableCell>
269
+ <ToggleButton
270
+ {...arg}
271
+ icon={<Bell />}
272
+ selectedColor="secondary"
273
+ value="secondary"
274
+ onChange={() => handleChange("secondary")}
275
+ selected={values.secondary}
276
+ >
277
+ {arg.children}
278
+ </ToggleButton>
279
+ </TableCell>
280
+ </TableRow>
281
+ </TableBody>
282
+ </Table>
283
+ );
284
+ };
285
+
286
+ export const WithIconOnlyStory = IconOnlyTemplate.bind({});
287
+ WithIconOnlyStory.storyName = "Icon only";
288
+ WithIconOnlyStory.argTypes = {
289
+ children: {
290
+ type: "string",
291
+ controls: false,
292
+ },
293
+ };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
3
+
4
+ import Tooltip from "@/components/Tooltip";
5
+
6
+ export default {
7
+ title: "Components/Tooltip",
8
+ component: Tooltip,
9
+ } as ComponentMeta<typeof Tooltip>;
10
+
11
+ const Template: ComponentStory<typeof Tooltip> = () => <Tooltip />;
12
+
13
+ export const LunitChip = Template.bind({});
@@ -0,0 +1,264 @@
1
+ import React, { useState } from "react";
2
+ import { ComponentStory, ComponentMeta } from "@storybook/react";
3
+ import {
4
+ Alert,
5
+ Box,
6
+ Button,
7
+ Dialog,
8
+ DialogContent,
9
+ DialogTitle,
10
+ MenuItem,
11
+ Paper,
12
+ Select,
13
+ TextField,
14
+ Tooltip,
15
+ } from "@mui/material";
16
+ import { DatePicker, LocalizationProvider } from "@mui/x-date-pickers";
17
+ import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
18
+ import { Dayjs } from "dayjs";
19
+ import { Container, Title } from "./styled";
20
+
21
+ interface ElevationProps {
22
+ surface: string;
23
+ isBase: boolean;
24
+ }
25
+
26
+ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
27
+ const [open, setOpen] = useState<boolean>(false);
28
+
29
+ const handleClose = () => {
30
+ setOpen((prev: boolean) => !prev);
31
+ };
32
+
33
+ const handleClickOpen = () => {
34
+ setOpen(true);
35
+ };
36
+
37
+ const [value, setValue] = React.useState<Dayjs | null>(null);
38
+
39
+ if (isBase) {
40
+ return (
41
+ <Box
42
+ sx={{
43
+ p: 4,
44
+ }}
45
+ >
46
+ <Title>Base Elevation</Title>
47
+ <Container>
48
+ <Box
49
+ sx={{
50
+ width: "300px",
51
+ height: "100px",
52
+ overflow: "hidden",
53
+ p: 3,
54
+ }}
55
+ className="elevation1"
56
+ >
57
+ Level 1
58
+ </Box>
59
+ <Box
60
+ sx={{
61
+ width: "300px",
62
+ height: "100px",
63
+ overflow: "hidden",
64
+ p: 3,
65
+ }}
66
+ className="elevation2"
67
+ >
68
+ Level 2
69
+ </Box>
70
+ </Container>
71
+
72
+ <Title>Paper</Title>
73
+ <Container>
74
+ <Paper
75
+ sx={{
76
+ width: "300px",
77
+ height: "100px",
78
+ overflow: "hidden",
79
+ p: 3,
80
+ }}
81
+ />
82
+ </Container>
83
+
84
+ <Title>Dropdown</Title>
85
+ <Container>
86
+ <Select
87
+ label="Select option"
88
+ value="option1"
89
+ MenuProps={{
90
+ className: surface,
91
+ }}
92
+ >
93
+ <MenuItem value="option1">Option 1</MenuItem>
94
+ <MenuItem value="option2">Option 2</MenuItem>
95
+ <MenuItem value="option3">Option 3</MenuItem>
96
+ </Select>
97
+ </Container>
98
+
99
+ <Title>Date Picker</Title>
100
+ <Container>
101
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
102
+ <DatePicker
103
+ label="Basic example"
104
+ value={value}
105
+ onChange={(newValue) => {
106
+ setValue(newValue);
107
+ }}
108
+ renderInput={(params) => <TextField {...params} />}
109
+ PaperProps={{
110
+ className: surface,
111
+ }}
112
+ />
113
+ </LocalizationProvider>
114
+ </Container>
115
+
116
+ <Title>Alert</Title>
117
+ <Container>
118
+ <Alert sx={{ flex: 1 }}>
119
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
120
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. A diam
121
+ sollicitudin tempor id eu nisl nunc mi. Auctor augue mauris augue
122
+ neque gravida in fermentum.{" "}
123
+ </Alert>
124
+ </Container>
125
+
126
+ <Title>Modal & Popper</Title>
127
+ <Container>
128
+ <Button variant="contained" onClick={handleClickOpen}>
129
+ Open Dialog
130
+ </Button>
131
+ <Dialog
132
+ PaperProps={{
133
+ className: surface,
134
+ }}
135
+ onClose={handleClose}
136
+ open={open}
137
+ >
138
+ <DialogTitle>Title area</DialogTitle>
139
+ <DialogContent>
140
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
141
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. A diam
142
+ sollicitudin tempor id eu nisl nunc mi. Auctor augue mauris augue
143
+ neque gravida in fermentum.
144
+ </DialogContent>
145
+ </Dialog>
146
+ <Tooltip
147
+ title="Tooltip"
148
+ PopperProps={{ className: surface }}
149
+ placement="right"
150
+ >
151
+ <Button variant="contained">Open Tooltip</Button>
152
+ </Tooltip>
153
+ </Container>
154
+ </Box>
155
+ );
156
+ }
157
+ return (
158
+ <Box sx={{ height: "100vh" }}>
159
+ <Button onClick={handleClickOpen}>Open Dialog</Button>
160
+ <Dialog
161
+ sx={{
162
+ overflow: "hidden",
163
+ p: 3,
164
+ }}
165
+ PaperProps={{
166
+ className: surface,
167
+ }}
168
+ onClose={handleClose}
169
+ open={open}
170
+ >
171
+ <DialogTitle>Title area</DialogTitle>
172
+ <DialogContent>
173
+ {" "}
174
+ <Select
175
+ label="Select option"
176
+ value="option1"
177
+ MenuProps={{
178
+ className: surface,
179
+ }}
180
+ >
181
+ <MenuItem value="option1">Option 1</MenuItem>
182
+ <MenuItem value="option2">Option 2</MenuItem>
183
+ <MenuItem value="option3">Option 3</MenuItem>
184
+ </Select>
185
+ </DialogContent>
186
+ </Dialog>
187
+ </Box>
188
+ );
189
+ };
190
+
191
+ export default {
192
+ title: "Foundation/Elevation",
193
+ component: Elevation,
194
+ argTypes: {
195
+ Paper: {
196
+ table: {
197
+ defaultValue: { summary: "Elevation 2" },
198
+ },
199
+ control: {
200
+ type: null,
201
+ },
202
+ },
203
+ Dropdown: {
204
+ table: {
205
+ defaultValue: { summary: "Elevation 1" },
206
+ },
207
+ control: {
208
+ type: null,
209
+ },
210
+ },
211
+ DatePicker: {
212
+ table: {
213
+ defaultValue: { summary: "Elevation 2" },
214
+ },
215
+ control: {
216
+ type: null,
217
+ },
218
+ },
219
+ Alert: {
220
+ table: {
221
+ defaultValue: { summary: "Elevation 2" },
222
+ },
223
+ control: {
224
+ type: null,
225
+ },
226
+ },
227
+ Dialog: {
228
+ table: {
229
+ defaultValue: { summary: "Elevation 2" },
230
+ },
231
+ control: {
232
+ type: null,
233
+ },
234
+ },
235
+ Tooltip: {
236
+ table: {
237
+ defaultValue: { summary: "Elevation 1" },
238
+ },
239
+ control: {
240
+ type: null,
241
+ },
242
+ },
243
+ },
244
+ parameters: {
245
+ docs: {
246
+ description: {
247
+ component: `The design system has Elevation 1 and Elevation 2. And components using elevation include Paper, Dropdown, DatePicker, Alert, Dialog, and Tooltip.\nEach component has a default value and if it is necessary to implement a component without elevation, you can add 'elevation0' to the class name.`,
248
+ },
249
+ },
250
+ },
251
+ } as ComponentMeta<typeof Elevation>;
252
+
253
+ const ElevationBase: ComponentStory<typeof Elevation> = (
254
+ args,
255
+ { globals: { theme } }
256
+ ) => <Elevation {...args} surface={theme} isBase />;
257
+
258
+ const ElevationNesed: ComponentStory<typeof Elevation> = (
259
+ args,
260
+ { globals: { theme } }
261
+ ) => <Elevation {...args} surface={theme} />;
262
+
263
+ export const Base = ElevationBase.bind({});
264
+ export const Nested = ElevationNesed.bind({});
@@ -0,0 +1,12 @@
1
+ import { Box, styled, Typography } from "@mui/material";
2
+
3
+ export const Container = styled(Box)(({ theme }) => ({
4
+ marginBottom: theme.spacing(10),
5
+ display: "flex",
6
+ gap: theme.spacing(8),
7
+ }));
8
+
9
+ export const Title = styled(Typography)(({ theme }) => ({
10
+ ...theme.typography.h4,
11
+ marginBottom: theme.spacing(3),
12
+ }));
@@ -0,0 +1,71 @@
1
+ import { Meta, Canvas, Story } from "@storybook/addon-docs";
2
+
3
+ import { Typography } from "@mui/material";
4
+
5
+ import { variants } from "./const";
6
+
7
+ import TypographyGroup from "./TypographyGroup";
8
+
9
+ <Meta title="Foundation/Typography/All Variants" component={Typography} />
10
+
11
+ export const Template = (args) => <Typography {...args} />;
12
+
13
+ ## Types
14
+
15
+ The typography component comes with variants below:
16
+
17
+ export const AllVariants = () => (
18
+ <>
19
+ <TypographyGroup
20
+ heading="Headline"
21
+ dummy="Headline 123456789"
22
+ variants={variants.headline}
23
+ />
24
+ <TypographyGroup
25
+ heading="Body"
26
+ dummy={
27
+ <>
28
+ AI will be the new standard of care. 123456789
29
+ <br />
30
+ By Lunit. With AI, we aim to make data-driven medicine
31
+ <br />
32
+ the new standard of care.
33
+ </>
34
+ }
35
+ variants={variants.body}
36
+ />
37
+ <TypographyGroup
38
+ heading="etc"
39
+ dummy="NEWS & UPDATE 71456"
40
+ variants={variants.etc}
41
+ />
42
+ </>
43
+ );
44
+
45
+ <Story name="all variants">
46
+ <AllVariants />
47
+ </Story>
48
+
49
+ ## Usage
50
+
51
+ ### Typography component
52
+
53
+ <Canvas>
54
+ <Story id="foundation-typography--typography-component" />
55
+ </Canvas>
56
+
57
+ ### With styled utility
58
+
59
+ In some situations you might not be able to use the Typography component. Hopefully, you might be able to take advantage of the [typography](https://mui.com/material-ui/react-typography/#theme) keys of the theme.
60
+
61
+ <Canvas>
62
+ <Story id="foundation-typography--styled" />
63
+ </Canvas>
64
+
65
+ ### With the sx props
66
+
67
+ You can use all the variants with [the `sx` props](https://mui.com/system/getting-started/the-sx-prop/#typography).
68
+
69
+ <Canvas>
70
+ <Story id="foundation-typography--sx-props" />
71
+ </Canvas>