@lunit/oui 1.0.1 → 1.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/README.md +3 -0
  2. package/dist/components/EllipsisTypography/EllipsisTypography.js +62 -0
  3. package/dist/components/EllipsisTypography/EllipsisTypography.styled.js +16 -0
  4. package/dist/components/EllipsisTypography/EllipsisTypography.types.js +2 -0
  5. package/dist/components/EllipsisTypography/index.js +3 -0
  6. package/dist/components/MuiCssBaseline.js +16 -0
  7. package/dist/components/ResizeObserver/ResizeObserverContext.js +56 -0
  8. package/dist/components/ResizeObserver/index.js +3 -0
  9. package/dist/components/index.js +1 -0
  10. package/dist/index.js +1 -0
  11. package/dist/types/components/EllipsisTypography/EllipsisTypography.d.ts +3 -0
  12. package/dist/types/components/EllipsisTypography/EllipsisTypography.styled.d.ts +6 -0
  13. package/dist/types/components/EllipsisTypography/EllipsisTypography.types.d.ts +9 -0
  14. package/dist/types/components/EllipsisTypography/index.d.ts +4 -0
  15. package/dist/types/components/ResizeObserver/ResizeObserverContext.d.ts +9 -0
  16. package/dist/types/components/ResizeObserver/index.d.ts +2 -0
  17. package/dist/types/components/index.d.ts +1 -0
  18. package/dist/types/index.d.ts +1 -0
  19. package/package.json +14 -7
  20. package/.git-ftp-include +0 -1
  21. package/src/assets/ic-bell-noti-outlined-20px.tsx +0 -21
  22. package/src/assets/ic-close-large-outlined-20px.tsx +0 -17
  23. package/src/assets/ic-close-small-outlined-20px.tsx +0 -17
  24. package/src/assets/ic-download-pdf-outlined-20px.tsx +0 -18
  25. package/src/assets/ic-ellipse-outlined-20px.tsx +0 -17
  26. package/src/assets/ic-filter-noti-outlined-20px.tsx +0 -21
  27. package/src/assets/ic-hide-large-outlined-20px.tsx +0 -13
  28. package/src/assets/ic-hide-small-outlined-20px.tsx +0 -17
  29. package/src/assets/ic-information-large-outlined-20px.tsx +0 -17
  30. package/src/assets/ic-information-small-outlined-20px.tsx +0 -17
  31. package/src/assets/ic-manufacturer-outlined-20px.tsx +0 -19
  32. package/src/assets/ic-rectangle-outlined-20px.tsx +0 -17
  33. package/src/assets/ic-refresh-left-outlined-20px.tsx +0 -17
  34. package/src/assets/ic-refresh-right-outlined-20px.tsx +0 -13
  35. package/src/assets/ic-show-large-outlined-20px.tsx +0 -17
  36. package/src/assets/ic-show-small-outlined-20px.tsx +0 -17
  37. package/src/assets/ic_bell_noti=outlined_20px.svg +0 -5
  38. package/src/assets/ic_close_large=outlined_20px.svg +0 -4
  39. package/src/assets/ic_close_small=outlined_20px.svg +0 -4
  40. package/src/assets/ic_download_pdf=outlined_20px.svg +0 -7
  41. package/src/assets/ic_ellipse=outlined_20px.svg +0 -4
  42. package/src/assets/ic_filter_noti=outlined_20px.svg +0 -5
  43. package/src/assets/ic_hide_large=outlined_20px.svg +0 -4
  44. package/src/assets/ic_hide_small=outlined_20px.svg +0 -4
  45. package/src/assets/ic_information_large=outlined_20px.svg +0 -4
  46. package/src/assets/ic_information_small=outlined_20px.svg +0 -4
  47. package/src/assets/ic_manufacturer=outlined_20px.svg +0 -3
  48. package/src/assets/ic_rectangle=outlined_20px.svg +0 -4
  49. package/src/assets/ic_refresh_left=outlined_20px.svg +0 -4
  50. package/src/assets/ic_refresh_right=outlined_20px.svg +0 -4
  51. package/src/assets/ic_show_large=outlined_20px.svg +0 -4
  52. package/src/assets/ic_show_small=outlined_20px.svg +0 -4
  53. package/src/assets/index.ts +0 -16
  54. package/src/components/Alert/Alert.styled.ts +0 -44
  55. package/src/components/Alert/Alert.tsx +0 -39
  56. package/src/components/Alert/Alert.types.ts +0 -5
  57. package/src/components/Alert/Alert.utils.tsx +0 -43
  58. package/src/components/Alert/index.ts +0 -5
  59. package/src/components/BaseTextField/BaseTextField.styled.ts +0 -110
  60. package/src/components/BaseTextField/BaseTextField.types.ts +0 -25
  61. package/src/components/BaseTextField/BaseTextField.utils.ts +0 -10
  62. package/src/components/Button/BaseButton.tsx +0 -19
  63. package/src/components/Button/Button.tsx +0 -117
  64. package/src/components/Button/Button.types.ts +0 -36
  65. package/src/components/Button/Button.utils.ts +0 -13
  66. package/src/components/Button/index.ts +0 -6
  67. package/src/components/Button/styleds/BaseButton.styled.ts +0 -57
  68. package/src/components/Button/styleds/ContainedButton.styled.ts +0 -123
  69. package/src/components/Button/styleds/GhostButton.styled.ts +0 -139
  70. package/src/components/Button/styleds/IconButton.styled.ts +0 -25
  71. package/src/components/Button/styleds/OutlinedButton.styled.ts +0 -144
  72. package/src/components/Card/Card.styled.tsx +0 -18
  73. package/src/components/Card/Card.tsx +0 -18
  74. package/src/components/Card/Card.types.ts +0 -10
  75. package/src/components/Card/index.ts +0 -5
  76. package/src/components/Checkbox/Checkbox.styled.tsx +0 -27
  77. package/src/components/Checkbox/Checkbox.tsx +0 -64
  78. package/src/components/Checkbox/Checkbox.types.ts +0 -16
  79. package/src/components/Checkbox/Checkbox.utils.tsx +0 -42
  80. package/src/components/Checkbox/index.ts +0 -5
  81. package/src/components/Chip/Chip.styled.ts +0 -120
  82. package/src/components/Chip/Chip.tsx +0 -33
  83. package/src/components/Chip/Chip.types.ts +0 -18
  84. package/src/components/Chip/Chip.utils.tsx +0 -50
  85. package/src/components/Chip/index.ts +0 -4
  86. package/src/components/DataTable/DataTable.styled.ts +0 -66
  87. package/src/components/DataTable/DataTable.tsx +0 -29
  88. package/src/components/DataTable/index.ts +0 -1
  89. package/src/components/DatePicker/DatePicker.styled.ts +0 -19
  90. package/src/components/DatePicker/DatePicker.tsx +0 -194
  91. package/src/components/DatePicker/DatePicker.types.ts +0 -8
  92. package/src/components/DatePicker/index.ts +0 -4
  93. package/src/components/Dialog/Dialog.styled.ts +0 -87
  94. package/src/components/Dialog/Dialog.tsx +0 -111
  95. package/src/components/Dialog/Dialog.types.ts +0 -19
  96. package/src/components/Dialog/index.ts +0 -5
  97. package/src/components/Divider/Divider.styled.ts +0 -24
  98. package/src/components/Divider/Divider.tsx +0 -13
  99. package/src/components/Divider/Divider.types.ts +0 -7
  100. package/src/components/Divider/index.ts +0 -5
  101. package/src/components/Dropdown/Dropdown.styled.tsx +0 -127
  102. package/src/components/Dropdown/Dropdown.tsx +0 -116
  103. package/src/components/Dropdown/Dropdown.types.ts +0 -31
  104. package/src/components/Dropdown/Dropdown.utils.ts +0 -13
  105. package/src/components/Dropdown/DropdownItem.styled.tsx +0 -66
  106. package/src/components/Dropdown/DropdownItem.tsx +0 -45
  107. package/src/components/Dropdown/DropdownItem.types.ts +0 -14
  108. package/src/components/Dropdown/DropdownItem.utils.ts +0 -14
  109. package/src/components/Dropdown/DropdownSubtitle.styled.ts +0 -13
  110. package/src/components/Dropdown/DropdownSubtitle.tsx +0 -9
  111. package/src/components/Dropdown/DropdownSubtitle.types.ts +0 -6
  112. package/src/components/Dropdown/IconDropdown.styled.tsx +0 -82
  113. package/src/components/Dropdown/IconDropdown.tsx +0 -56
  114. package/src/components/Dropdown/IconDropdown.types.ts +0 -22
  115. package/src/components/Dropdown/index.ts +0 -22
  116. package/src/components/FileDnDZone/FileDnDZone.styled.ts +0 -43
  117. package/src/components/FileDnDZone/FileDnDZone.tsx +0 -81
  118. package/src/components/FileDnDZone/FileDnDZone.types.ts +0 -14
  119. package/src/components/FileDnDZone/FileDnDZone.utils.ts +0 -3
  120. package/src/components/FileDnDZone/index.ts +0 -5
  121. package/src/components/List/List.styled.ts +0 -31
  122. package/src/components/List/List.tsx +0 -71
  123. package/src/components/List/List.types.ts +0 -24
  124. package/src/components/List/List.utils.ts +0 -14
  125. package/src/components/List/ListItem.styled.tsx +0 -61
  126. package/src/components/List/ListItem.tsx +0 -66
  127. package/src/components/List/ListItem.types.ts +0 -40
  128. package/src/components/List/ListItemCaption.styled.tsx +0 -7
  129. package/src/components/List/ListItemCaption.tsx +0 -18
  130. package/src/components/List/ListItemCaption.types.ts +0 -2
  131. package/src/components/List/index.ts +0 -8
  132. package/src/components/LoadingIndicator/LoadingIndicator.styled.tsx +0 -40
  133. package/src/components/LoadingIndicator/LoadingIndicator.tsx +0 -44
  134. package/src/components/LoadingIndicator/LoadingIndicator.types.ts +0 -7
  135. package/src/components/LoadingIndicator/assets/DnaLoadingAnimation.json +0 -769
  136. package/src/components/LoadingIndicator/assets/DotLoadingAnimation.json +0 -426
  137. package/src/components/LoadingIndicator/index.ts +0 -5
  138. package/src/components/Menu/Menu.styled.tsx +0 -42
  139. package/src/components/Menu/Menu.tsx +0 -28
  140. package/src/components/Menu/Menu.types.ts +0 -18
  141. package/src/components/Menu/MenuItem.styled.ts +0 -62
  142. package/src/components/Menu/MenuItem.tsx +0 -45
  143. package/src/components/Menu/MenuItem.types.ts +0 -14
  144. package/src/components/Menu/index.ts +0 -5
  145. package/src/components/MuiCssBaseline.ts +0 -78
  146. package/src/components/MuiInputBase.ts +0 -25
  147. package/src/components/MuiOutlinedInput.ts +0 -57
  148. package/src/components/MuiTextField.ts +0 -17
  149. package/src/components/Pagination/Pagination.styled.tsx +0 -71
  150. package/src/components/Pagination/Pagination.tsx +0 -182
  151. package/src/components/Pagination/Pagination.types.ts +0 -39
  152. package/src/components/Pagination/index.ts +0 -2
  153. package/src/components/ProductLabel/ProductLabel.styled.ts +0 -61
  154. package/src/components/ProductLabel/ProductLabel.tsx +0 -57
  155. package/src/components/ProductLabel/ProductLabel.types.ts +0 -10
  156. package/src/components/ProductLabel/index.ts +0 -5
  157. package/src/components/Progress/CircularProgress.styled.ts +0 -10
  158. package/src/components/Progress/CircularProgress.tsx +0 -15
  159. package/src/components/Progress/CircularProgress.types.ts +0 -6
  160. package/src/components/Progress/LinearProgress.styled.ts +0 -15
  161. package/src/components/Progress/LinearProgress.tsx +0 -16
  162. package/src/components/Progress/LinearProgress.types.ts +0 -7
  163. package/src/components/Progress/index.ts +0 -4
  164. package/src/components/Radio/Radio.styled.ts +0 -35
  165. package/src/components/Radio/Radio.tsx +0 -60
  166. package/src/components/Radio/Radio.types.ts +0 -15
  167. package/src/components/Radio/RadioGroup.styled.ts +0 -6
  168. package/src/components/Radio/RadioGroup.tsx +0 -23
  169. package/src/components/Radio/RadioGroup.types.ts +0 -10
  170. package/src/components/Radio/index.ts +0 -7
  171. package/src/components/Stepper/Stepper.styled.ts +0 -38
  172. package/src/components/Stepper/Stepper.tsx +0 -24
  173. package/src/components/Stepper/Stepper.types.ts +0 -13
  174. package/src/components/Stepper/index.ts +0 -5
  175. package/src/components/TabbedPanel/TabbedPanel.styled.ts +0 -129
  176. package/src/components/TabbedPanel/TabbedPanel.tsx +0 -70
  177. package/src/components/TabbedPanel/TabbedPanel.types.ts +0 -36
  178. package/src/components/TabbedPanel/TabbedPanel.utils.ts +0 -21
  179. package/src/components/TabbedPanel/index.ts +0 -5
  180. package/src/components/TextField/TextArea.styled.tsx +0 -36
  181. package/src/components/TextField/TextArea.tsx +0 -35
  182. package/src/components/TextField/TextArea.types.ts +0 -28
  183. package/src/components/TextField/TextInput.styled.tsx +0 -115
  184. package/src/components/TextField/TextInput.tsx +0 -27
  185. package/src/components/TextField/TextInput.types.ts +0 -46
  186. package/src/components/TextField/TextInput.utils.ts +0 -7
  187. package/src/components/TextField/components/Buttons.tsx +0 -26
  188. package/src/components/TextField/components/NormalTextInput.tsx +0 -95
  189. package/src/components/TextField/components/PasswordInput.tsx +0 -92
  190. package/src/components/TextField/index.ts +0 -7
  191. package/src/components/Tooltip/Tooltip.styled.tsx +0 -36
  192. package/src/components/Tooltip/Tooltip.tsx +0 -58
  193. package/src/components/Tooltip/Tooltip.types.ts +0 -24
  194. package/src/components/Tooltip/Tooltip.utils.ts +0 -46
  195. package/src/components/Tooltip/index.ts +0 -5
  196. package/src/components/UploadManager/UploadManager.styled.ts +0 -49
  197. package/src/components/UploadManager/UploadManager.tsx +0 -271
  198. package/src/components/UploadManager/UploadManager.types.ts +0 -16
  199. package/src/components/UploadManager/index.ts +0 -5
  200. package/src/components/index.ts +0 -23
  201. package/src/foundations/index.ts +0 -4
  202. package/src/foundations/palette.ts +0 -418
  203. package/src/foundations/spacing.ts +0 -5
  204. package/src/foundations/styles.ts +0 -9
  205. package/src/foundations/typography.ts +0 -492
  206. package/src/icons/BellNoti/index.tsx +0 -28
  207. package/src/icons/CloseLarge/index.tsx +0 -28
  208. package/src/icons/CloseSmall/index.tsx +0 -28
  209. package/src/icons/DownloadPdf/index.tsx +0 -28
  210. package/src/icons/Ellipse/index.tsx +0 -28
  211. package/src/icons/FilterNoti/index.tsx +0 -28
  212. package/src/icons/HideLarge/index.tsx +0 -28
  213. package/src/icons/HideSmall/index.tsx +0 -28
  214. package/src/icons/InformationLarge/index.tsx +0 -28
  215. package/src/icons/InformationSmall/index.tsx +0 -28
  216. package/src/icons/Manufacturer/index.tsx +0 -28
  217. package/src/icons/Rectangle/index.tsx +0 -28
  218. package/src/icons/RefreshLeft/index.tsx +0 -28
  219. package/src/icons/RefreshRight/index.tsx +0 -28
  220. package/src/icons/ShowLarge/index.tsx +0 -28
  221. package/src/icons/ShowSmall/index.tsx +0 -28
  222. package/src/icons/index.ts +0 -180
  223. package/src/index.ts +0 -4
  224. package/src/react-app-env.d.ts +0 -71
  225. package/src/reportWebVitals.ts +0 -15
  226. package/src/setupTests.ts +0 -5
  227. package/src/systems/drawer.ts +0 -27
  228. package/src/systems/index.ts +0 -7
  229. package/src/theme.ts +0 -22
@@ -1,78 +0,0 @@
1
- import { ComponentsOverrides, Theme } from '@mui/material';
2
- import {
3
- SMALL_SCROLLBAR_WIDTH,
4
- SCROLLBAR_WIDTH,
5
- DRAWER_WIDTH_OPEN,
6
- DRAWER_WIDTH_CLOSE,
7
- } from '../systems';
8
- import { palette, typography } from '../foundations';
9
-
10
- const html = {
11
- fontSize: '14px',
12
- boxSizing: 'border-box',
13
- fontFamily: `Pretendard, sans-serif`,
14
- fontFeatureSettings: `'tnum', 'ss01', 'ss02', 'ss08'`,
15
- };
16
-
17
- const styleOverrides: ComponentsOverrides<Theme>['MuiCssBaseline'] = {
18
- html,
19
-
20
- '*::-webkit-scrollbar-track': {
21
- backgroundColor: 'transparent',
22
- },
23
- '*::-webkit-scrollbar-corner': {
24
- backgroundColor: 'transparent',
25
- },
26
- '*::-webkit-scrollbar': {
27
- // + 4 for padding
28
- width: SCROLLBAR_WIDTH + 4,
29
- height: SCROLLBAR_WIDTH + 4,
30
- },
31
- '.small-scrollbar::-webkit-scrollbar, .small-scrollbar *::-webkit-scrollbar': {
32
- // + 4 for padding
33
- width: SMALL_SCROLLBAR_WIDTH + 4,
34
- height: SMALL_SCROLLBAR_WIDTH + 4,
35
- },
36
-
37
- '*::-webkit-scrollbar-thumb': {
38
- backgroundColor: palette.neutralGrey?.[65],
39
- borderRadius: 6,
40
- border: '2px transparent solid',
41
- backgroundClip: 'padding-box',
42
- },
43
- '*::-webkit-scrollbar-thumb:hover': {
44
- backgroundColor: palette.neutralGrey?.[60],
45
- },
46
- '*::-webkit-scrollbar-thumb:active': {
47
- backgroundColor: palette.neutralGrey?.[40],
48
- },
49
- '.Mui-disabled::-webkit-scrollbar-thumb:hover, .Mui-disabled *::-webkit-scrollbar-thumb:hover': {
50
- backgroundColor: palette.neutralGrey?.[65],
51
- },
52
- '.Mui-disabled::-webkit-scrollbar-thumb:active, .Mui-disabled *::-webkit-scrollbar-thumb:active':
53
- {
54
- backgroundColor: palette.neutralGrey?.[65],
55
- },
56
-
57
- 'svg.MuiCircularProgress-svg *': {
58
- fill: 'none',
59
- },
60
- 'svg *.stroke-inherit': {
61
- fill: 'none',
62
- stroke: 'currentColor',
63
- },
64
- '.snackbarVariantError': {
65
- background: 'rgba(238, 81, 64, 0.18)',
66
- border: '1px solid #EE5140',
67
- ...typography.body5,
68
- },
69
- '#page-root.drawer-open ~ .SnackbarContainer-left': {
70
- left: `${DRAWER_WIDTH_OPEN + 20}px !important`,
71
- },
72
- '#page-root.drawer-close ~ .SnackbarContainer-left': {
73
- left: `${DRAWER_WIDTH_CLOSE + 20}px !important`,
74
- },
75
- };
76
- export default {
77
- styleOverrides,
78
- };
@@ -1,25 +0,0 @@
1
- import type { ComponentsOverrides } from '@mui/material/styles';
2
-
3
- const styleOverrides: ComponentsOverrides['MuiInputBase'] = {
4
- root: {
5
- '&': {
6
- padding: 0,
7
- },
8
- },
9
- input: {
10
- height: '36px',
11
- },
12
- inputAdornedStart: {
13
- 'html &': {
14
- paddingLeft: 0,
15
- },
16
- },
17
- inputAdornedEnd: {
18
- 'html &': {
19
- paddingRight: 0,
20
- },
21
- },
22
- };
23
- export default {
24
- styleOverrides,
25
- };
@@ -1,57 +0,0 @@
1
- import { ComponentsOverrides } from '@mui/material/styles';
2
- import { palette, typography } from '../foundations';
3
-
4
- const styleOverrides: ComponentsOverrides['MuiOutlinedInput'] = {
5
- root: {
6
- borderRadius: 8,
7
- backgroundColor: palette.neutralGrey[75],
8
- color: palette.neutralGrey[45],
9
- '&.MuiInputBase-adornedStart': {
10
- paddingLeft: '16px',
11
- },
12
- '&.MuiInputBase-adornedEnd': {
13
- paddingRight: '16px',
14
- },
15
- '&.Mui-disabled': {
16
- backgroundColor: 'transparent',
17
- borderWidth: '1px',
18
- borderColor: palette.neutralGrey[45],
19
- },
20
- },
21
- notchedOutline: {
22
- border: '1px solid transparent',
23
- borderRadius: 8,
24
- padding: 0,
25
- 'html .MuiOutlinedInput-root:hover &': {
26
- borderColor: palette.neutralGrey[45],
27
- },
28
- 'html .MuiOutlinedInput-root.Mui-focused &': {
29
- borderWidth: '1px',
30
- borderColor: palette.lunitTeal[10],
31
- },
32
- 'html .MuiOutlinedInput-root.Mui-disabled &': {
33
- border: 'none',
34
- },
35
- },
36
- input: {
37
- ...typography.body5,
38
- color: palette.neutralGrey[5],
39
- padding: '8px 16px',
40
- boxSizing: 'border-box',
41
- '&::placeholder': {
42
- color: palette.neutralGrey[45],
43
- },
44
- '&:-webkit-autofill': {
45
- boxShadow: `0 0 0 100px ${palette.neutralGrey[75]}`,
46
- WebkitTextFillColor: palette.neutralGrey[5],
47
- },
48
- '&.Mui-disabled': {
49
- backgroundColor: 'inherit',
50
- borderRadius: '8px',
51
- WebkitTextFillColor: palette.neutralGrey[45],
52
- },
53
- },
54
- };
55
- export default {
56
- styleOverrides,
57
- };
@@ -1,17 +0,0 @@
1
- import type { ComponentsOverrides, ComponentsProps } from '@mui/material/styles';
2
-
3
- const styleOverrides: ComponentsOverrides['MuiTextField'] = {
4
- root: {
5
- width: '100%',
6
- input: {
7
- textOverflow: 'ellipsis',
8
- },
9
- },
10
- };
11
- const defaultProps: ComponentsProps['MuiTextField'] = {
12
- variant: 'standard',
13
- };
14
- export default {
15
- styleOverrides,
16
- defaultProps,
17
- };
@@ -1,71 +0,0 @@
1
- import { Button, styled, Box } from '@mui/material';
2
- import { subScrollbarWidth } from '../../foundations';
3
-
4
- export const DEFAULT_PAGE_SIZE = 100;
5
- export const PAGE_SIZE_LIST = [25, 50, 75, 100];
6
-
7
- export const PaginationBox = styled(Box)(({ theme }) => ({
8
- ...theme.typography.body5,
9
- display: 'flex',
10
- justifyContent: 'space-between',
11
- alignItems: 'center',
12
- borderTop: `1px solid ${theme.palette.neutralGrey[90]}`,
13
- height: '48px',
14
- padding: '14px 0',
15
- color: theme.palette.neutralGrey[40],
16
- }));
17
-
18
- export const PaperProps = { style: { maxHeight: 378, width: 136 } };
19
-
20
- export const SidePageBox = styled('div')({
21
- display: 'flex',
22
- alignItems: 'center',
23
- height: '20px',
24
- });
25
-
26
- export const SelectButton = styled(Button)(({ theme }) => ({
27
- justifyContent: 'flex-end',
28
- border: '1px solid transparent',
29
- minWidth: 'auto',
30
- width: '58px',
31
- height: '28px',
32
- marginLeft: theme.spacing(3),
33
- padding: '4px 4px 4px 8px',
34
- color: theme.palette.neutralGrey[15],
35
- '.MuiButton-endIcon': { margin: 0 },
36
- '&:hover': {
37
- background: 'transparent',
38
- borderColor: theme.palette.neutralGrey[40],
39
- },
40
- '&:focus-visible': {
41
- background: 'transparent',
42
- borderColor: theme.palette.scope1,
43
- },
44
- }));
45
-
46
- export const ArrowButton = styled(Button)(({ theme }) => ({
47
- border: '1px solid transparent',
48
- minWidth: 'auto',
49
- height: '28px',
50
- padding: theme.spacing(0.5),
51
- color: theme.palette.neutralGrey[40],
52
- '&:hover': {
53
- background: theme.palette.neutralGrey[70],
54
- },
55
- '&:disabled': {
56
- color: theme.palette.neutralGrey[40],
57
- opacity: 0.4,
58
- },
59
- '.MuiButton-endIcon': {
60
- margin: 0,
61
- },
62
- }));
63
-
64
- export const PaginationContainer = styled('div')(({ theme }) => ({
65
- padding: `0 ${subScrollbarWidth(theme.spacing(5))} 0 ${theme.spacing(5)}`,
66
- }));
67
-
68
- export const divider = {
69
- borderWidth: '0',
70
- margin: '0 12px',
71
- } as const;
@@ -1,182 +0,0 @@
1
- import React from 'react';
2
- import { useState, MouseEvent, useEffect, useMemo } from 'react';
3
- import { ArrowDown } from '../../icons';
4
- import { Divider } from '../Divider';
5
- import { MenuItem, Menu } from '../Menu';
6
-
7
- import { PaginationProps } from './Pagination.types';
8
- import {
9
- PaperProps,
10
- PaginationBox,
11
- SidePageBox,
12
- SelectButton,
13
- ArrowButton,
14
- PAGE_SIZE_LIST,
15
- divider,
16
- } from './Pagination.styled';
17
-
18
- function Pagination({
19
- count: itemCount,
20
- page: selectedPage = 1,
21
- perPage: selectedPerPage,
22
- totalPage,
23
- onPageChange,
24
- onPerPageChange,
25
- }: PaginationProps) {
26
- const [perPageAnchorEl, setPerPageAnchorEl] = useState<null | HTMLElement>(null);
27
- const [pageAnchorEl, setPageAnchorEl] = useState<null | HTMLElement>(null);
28
-
29
- const perPageOpen = Boolean(perPageAnchorEl);
30
- const pageOpen = Boolean(pageAnchorEl);
31
-
32
- const pages = useMemo(
33
- () => Array.from({ length: totalPage }, (_, index) => index + 1),
34
- [totalPage],
35
- );
36
-
37
- const startItemNumber = selectedPerPage * (selectedPage - 1) + 1;
38
- const endItemNumber = Math.min(startItemNumber + selectedPerPage - 1, itemCount);
39
-
40
- const handlePerPageClick = (event: MouseEvent<HTMLButtonElement>) => {
41
- setPerPageAnchorEl(event.currentTarget);
42
- };
43
-
44
- const handlePerPageClose = () => {
45
- setPerPageAnchorEl(null);
46
- };
47
-
48
- const handlePageClick = (event: MouseEvent<HTMLButtonElement>) => {
49
- setPageAnchorEl(event.currentTarget);
50
- };
51
-
52
- const handlePageClose = () => {
53
- setPageAnchorEl(null);
54
- };
55
-
56
- useEffect(() => {
57
- if (selectedPage > totalPage) {
58
- onPageChange?.(null, totalPage);
59
- }
60
- }, [totalPage, selectedPage, onPageChange]);
61
-
62
- return (
63
- <PaginationBox>
64
- <SidePageBox>
65
- Items per page
66
- <SelectButton
67
- endIcon={
68
- <ArrowDown
69
- style={{
70
- transform: perPageOpen ? 'rotate(180deg)' : 'rotate(0deg)',
71
- }}
72
- />
73
- }
74
- onClick={handlePerPageClick}
75
- >
76
- {selectedPerPage}
77
- </SelectButton>
78
- <Menu
79
- showCheck
80
- anchorEl={perPageAnchorEl}
81
- anchorOrigin={{
82
- vertical: 'top',
83
- horizontal: 'right',
84
- }}
85
- transformOrigin={{
86
- vertical: 'bottom',
87
- horizontal: 'right',
88
- }}
89
- PaperProps={PaperProps}
90
- onClose={handlePerPageClose}
91
- open={perPageOpen}
92
- >
93
- {PAGE_SIZE_LIST.map((perPage) => (
94
- <MenuItem
95
- key={perPage}
96
- selected={perPage === selectedPerPage}
97
- onClick={(event) => {
98
- event.preventDefault();
99
- onPerPageChange?.(event, perPage);
100
- handlePerPageClose();
101
- }}
102
- label={perPage}
103
- />
104
- ))}
105
- </Menu>
106
- <Divider
107
- orientation="vertical"
108
- sx={divider}
109
- />
110
- {startItemNumber}-{endItemNumber} of &nbsp;{itemCount} items
111
- </SidePageBox>
112
- <SidePageBox>
113
- This page
114
- <SelectButton
115
- id="selected-page"
116
- endIcon={
117
- <ArrowDown
118
- style={{
119
- transform: pageOpen ? 'rotate(180deg)' : 'rotate(0deg)',
120
- }}
121
- />
122
- }
123
- onClick={handlePageClick}
124
- >
125
- {selectedPage}
126
- </SelectButton>
127
- <Menu
128
- showCheck
129
- anchorEl={pageAnchorEl}
130
- anchorOrigin={{
131
- vertical: 'top',
132
- horizontal: 'right',
133
- }}
134
- transformOrigin={{
135
- vertical: 'bottom',
136
- horizontal: 'right',
137
- }}
138
- PaperProps={PaperProps}
139
- onClose={handlePageClose}
140
- open={pageOpen}
141
- >
142
- {pages.map((page) => (
143
- <MenuItem
144
- key={page}
145
- selected={page === selectedPage}
146
- onClick={(event) => {
147
- event.preventDefault();
148
- onPageChange?.(event, page);
149
- handlePageClose();
150
- }}
151
- label={page}
152
- />
153
- ))}
154
- </Menu>
155
- <Divider
156
- orientation="vertical"
157
- sx={divider}
158
- />
159
- <ArrowButton
160
- id="prev-button"
161
- disabled={selectedPage === 1}
162
- onClick={(event) => {
163
- event.preventDefault();
164
- onPageChange?.(event, selectedPage - 1);
165
- }}
166
- endIcon={<ArrowDown style={{ transform: 'rotate(90deg)' }} />}
167
- />
168
- <ArrowButton
169
- id="next-button"
170
- disabled={selectedPage === totalPage}
171
- onClick={(event) => {
172
- event.preventDefault();
173
- onPageChange?.(event, selectedPage + 1);
174
- }}
175
- endIcon={<ArrowDown style={{ transform: 'rotate(-90deg)' }} />}
176
- />
177
- </SidePageBox>
178
- </PaginationBox>
179
- );
180
- }
181
-
182
- export default Pagination;
@@ -1,39 +0,0 @@
1
- export interface PaginationProps {
2
- count: number;
3
- page?: number;
4
- perPage: number;
5
- totalPage: number;
6
- onPageChange?: (
7
- event: React.MouseEvent<HTMLLIElement> | React.MouseEvent<HTMLButtonElement> | null,
8
- page: number,
9
- ) => void;
10
- onPerPageChange?: (event: React.MouseEvent<HTMLLIElement> | null, perPage: number) => void;
11
- }
12
-
13
- interface SortObject {
14
- empty: boolean;
15
- unsorted: boolean;
16
- sorted: boolean;
17
- }
18
-
19
- interface Pageable {
20
- offset: number;
21
- sort: SortObject;
22
- paged: boolean;
23
- unpaged: boolean;
24
- pageNumber: number;
25
- pageSize: number;
26
- }
27
-
28
- export interface PaginationViewInfo {
29
- totalElements: number;
30
- totalPages: number;
31
- size: number;
32
- number: number;
33
- sort: SortObject;
34
- pageable: Pageable;
35
- numberOfElements: number;
36
- first: boolean;
37
- last: boolean;
38
- empty: boolean;
39
- }
@@ -1,2 +0,0 @@
1
- export { default as Pagination } from './Pagination';
2
- export type { PaginationProps } from './Pagination.types';
@@ -1,61 +0,0 @@
1
- import { styled, Typography, Box, Dialog, DialogContent } from '@mui/material';
2
- import { Button } from '../Button';
3
-
4
- export const ProductName = styled(Typography)(({ theme }) => ({
5
- ...theme.typography.body_b1,
6
- marginBottom: '12px',
7
- }));
8
-
9
- export const LabelRow = styled(Box)({
10
- display: 'flex',
11
- flexDirection: 'row',
12
- marginBottom: 12,
13
- alignItems: 'flex-start',
14
- });
15
-
16
- export const LabelColumn = styled(Box)({ flex: 0 });
17
-
18
- export const LabelValue = styled(Box)({
19
- flex: 1,
20
- marginLeft: 16,
21
- });
22
-
23
- export const FramedText = styled(Typography)({
24
- border: '1px solid #000',
25
- padding: 2,
26
- fontSize: 12,
27
- lineHeight: '16px',
28
- fontWeight: 700,
29
- wordBreak: 'normal',
30
- });
31
-
32
- export const LabelSubBox = styled(Box)({
33
- marginLeft: '11.5px',
34
- marginBottom: '4px',
35
- });
36
-
37
- export const LabelContainer = styled(Dialog)({
38
- '& .MuiPaper-root': {
39
- width: 540,
40
- backgroundColor: '#fff',
41
- border: '2px solid #000',
42
- borderRadius: '8px',
43
- padding: 0,
44
- },
45
- });
46
-
47
- export const LabelContent = styled(DialogContent)(({ theme }) => ({
48
- padding: '30px',
49
- color: theme.palette.neutralGrey[90],
50
- }));
51
-
52
- export const LabelCloseButton = styled(Button)({
53
- position: 'absolute',
54
- right: '30px',
55
- top: '30px',
56
- padding: 0,
57
- color: '#4E4E50',
58
- '&:hover': {
59
- backgroundColor: 'transparent',
60
- },
61
- });
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Box, Typography } from '@mui/material';
4
-
5
- import { LabelContainer, LabelContent, LabelCloseButton } from './ProductLabel.styled';
6
- import { ProductLabelProps } from './ProductLabel.types';
7
- import { Divider } from '../Divider';
8
- import { Close } from '../../icons';
9
- import { LunitScope } from '@lunit/design-system-logo';
10
-
11
- function ProductLabel({ open, onClose, children, footerStart, footerEnd }: ProductLabelProps) {
12
- const handleClose = () => {
13
- if (onClose) {
14
- onClose();
15
- }
16
- };
17
-
18
- return (
19
- <LabelContainer
20
- open={open}
21
- maxWidth={false}
22
- onClose={handleClose}
23
- aria-labelledby="label-dialog-title"
24
- >
25
- <LabelCloseButton
26
- variant="ghost"
27
- icon={<Close />}
28
- onClick={handleClose}
29
- />
30
- <LabelContent>
31
- <div>
32
- <LunitScope style={{ width: '170px' }} />
33
- </div>
34
- <Typography variant="body5">
35
- Software Algorithm Device To Assist Users In Digital Pathology
36
- </Typography>
37
- <Divider
38
- orientation="horizontal"
39
- sx={{ margin: '15px 0' }}
40
- />
41
- {children}
42
- <Divider
43
- orientation="horizontal"
44
- sx={{ margin: '8px 0' }}
45
- />
46
- {(footerStart || footerEnd) && (
47
- <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
48
- {footerStart ? footerStart : <div />}
49
- {footerEnd}
50
- </Box>
51
- )}
52
- </LabelContent>
53
- </LabelContainer>
54
- );
55
- }
56
-
57
- export default ProductLabel;
@@ -1,10 +0,0 @@
1
- import type { SxProps } from '@mui/system';
2
-
3
- export interface ProductLabelProps {
4
- onClose: () => void;
5
- open: boolean;
6
- children: React.ReactNode;
7
- footerStart?: string | React.ReactNode;
8
- footerEnd?: string | React.ReactNode;
9
- sx?: SxProps;
10
- }
@@ -1,5 +0,0 @@
1
- import ProductLabel from './ProductLabel';
2
- import type { ProductLabelProps } from './ProductLabel.types';
3
-
4
- export { ProductLabel };
5
- export type { ProductLabelProps };
@@ -1,10 +0,0 @@
1
- import { CircularProgress as MuiCircularProgress, styled } from '@mui/material';
2
- import type { CircularProgressProps } from './CircularProgress.types';
3
-
4
- const BaseCircularProgress = styled(MuiCircularProgress, {
5
- shouldForwardProp: (prop) => prop !== 'circleColor',
6
- })<CircularProgressProps>(({ theme, circleColor }) => ({
7
- color: circleColor || theme.palette.lunitTeal[40],
8
- }));
9
-
10
- export default BaseCircularProgress;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import BaseCircularProgress from './CircularProgress.styled';
3
- import type { CircularProgressProps } from './CircularProgress.types';
4
-
5
- function CircularProgress({ progress, size = 36, ...otherProps }: CircularProgressProps) {
6
- return (
7
- <BaseCircularProgress
8
- size={size}
9
- value={progress}
10
- {...otherProps}
11
- />
12
- );
13
- }
14
-
15
- export default CircularProgress;
@@ -1,6 +0,0 @@
1
- import type { CircularProgressProps as MuiCircularProgressProps } from '@mui/material';
2
-
3
- export interface CircularProgressProps extends MuiCircularProgressProps {
4
- circleColor?: string;
5
- progress?: number;
6
- }
@@ -1,15 +0,0 @@
1
- import { LinearProgress as MuiLinearProgress, linearProgressClasses, styled } from '@mui/material';
2
- import type { LinearProgressProps } from './LinearProgress.types';
3
-
4
- const BaseLinearProgress = styled(MuiLinearProgress, {
5
- shouldForwardProp: (prop) => prop !== 'barColor',
6
- })<LinearProgressProps>(({ theme, height, barColor }) => ({
7
- width: '100%',
8
- height,
9
- backgroundColor: 'transparent',
10
- [`& .${linearProgressClasses.barColorPrimary}`]: {
11
- backgroundColor: barColor || theme.palette.lunitTeal[40],
12
- },
13
- }));
14
-
15
- export default BaseLinearProgress;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import BaseLinearProgress from './LinearProgress.styled';
3
- import type { LinearProgressProps } from './LinearProgress.types';
4
-
5
- function LinearProgress({ barColor, progress, height = 4, ...otherProps }: LinearProgressProps) {
6
- return (
7
- <BaseLinearProgress
8
- value={progress}
9
- height={height}
10
- barColor={barColor}
11
- {...otherProps}
12
- />
13
- );
14
- }
15
-
16
- export default LinearProgress;
@@ -1,7 +0,0 @@
1
- import type { LinearProgressProps as MuiLinearProgressProps } from '@mui/material';
2
-
3
- export interface LinearProgressProps extends Omit<MuiLinearProgressProps, 'color'> {
4
- barColor?: string;
5
- progress?: number;
6
- height?: number;
7
- }