@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,42 +0,0 @@
1
- import React from 'react';
2
- import { Box } from '@mui/material';
3
- import { iconStyle } from './Checkbox.styled';
4
-
5
- export const UncheckedIcon = () => {
6
- return (
7
- <Box
8
- component="span"
9
- className="checkbox-icon"
10
- sx={{
11
- ...iconStyle,
12
- background: `url("data:image/svg+xml,%0A%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V14C1.5 15.3807 2.61929 16.5 4 16.5H14C15.3807 16.5 16.5 15.3807 16.5 14V4C16.5 2.61929 15.3807 1.5 14 1.5ZM4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4Z' fill='%2399999B'/%3E%3C/svg%3E%0A")`,
13
- }}
14
- />
15
- );
16
- };
17
-
18
- export const CheckedIcon = () => {
19
- return (
20
- <Box
21
- component="span"
22
- className="checkbox-icon"
23
- sx={{
24
- ...iconStyle,
25
- background: `url("data:image/svg+xml,%0A%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0C1.79086 0 0 1.79086 0 4V14C0 16.2091 1.79086 18 4 18H14C16.2091 18 18 16.2091 18 14V4C18 1.79086 16.2091 0 14 0H4ZM14.2516 7.14413C14.6074 6.72168 14.5533 6.09083 14.1309 5.73508C13.7084 5.37933 13.0776 5.43341 12.7218 5.85586L8.31824 11.0851L5.14993 8.37556C4.7302 8.01661 4.09895 8.06588 3.74 8.48561C3.38105 8.90533 3.43032 9.53658 3.85005 9.89553L7.78416 13.26C7.98672 13.4332 8.25006 13.5184 8.51571 13.4967C8.78135 13.4749 9.02732 13.348 9.19901 13.1441L14.2516 7.14413Z' fill='%2300C9EA'/%3E%3C/svg%3E%0A")`,
26
- }}
27
- />
28
- );
29
- };
30
-
31
- export const IndeterminateIcon = () => {
32
- return (
33
- <Box
34
- component="span"
35
- className="checkbox-icon"
36
- sx={{
37
- ...iconStyle,
38
- background: `url("data:image/svg+xml,%0A%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='4' fill='%2300C9EA'/%3E%3Cpath d='M3 9C3 8.44772 3.44772 8 4 8H14C14.5523 8 15 8.44772 15 9V9C15 9.55228 14.5523 10 14 10H4C3.44772 10 3 9.55228 3 9V9Z' fill='white'/%3E%3C/svg%3E%0A")`,
39
- }}
40
- />
41
- );
42
- };
@@ -1,5 +0,0 @@
1
- import Checkbox from './Checkbox';
2
- import type { CheckboxProps } from './Checkbox.types';
3
-
4
- export { Checkbox };
5
- export type { CheckboxProps };
@@ -1,120 +0,0 @@
1
- import { Chip as MUIChip } from '@mui/material';
2
- import { styled } from '@mui/material/styles';
3
- import tinycolor from 'tinycolor2';
4
- import theme from '../../theme';
5
- import { ChipProps } from './Chip.types';
6
-
7
- const StyledChip = styled(MUIChip, {
8
- shouldForwardProp: (prop) => prop !== 'disableRipple',
9
- })<ChipProps>(({ className }) => {
10
- return {
11
- height: '24px',
12
-
13
- // Preset Colors
14
- '&.presetDefault.MuiChip-colorDefault': {
15
- backgroundColor: theme.palette.neutralGrey[70],
16
- color: theme.palette.neutralGrey[25],
17
- },
18
-
19
- '&.presetUploaded': {
20
- backgroundColor: theme.palette.analysisStatus.Uploaded,
21
- color: theme.palette.lunitTeal[90],
22
- },
23
-
24
- '&.presetAnalyzing': {
25
- backgroundColor: theme.palette.analysisStatus.Analyzing,
26
- color: theme.palette.purple[80],
27
- },
28
-
29
- '&.presetAnalyzed': {
30
- backgroundColor: theme.palette.analysisStatus.Analyzed,
31
- color: theme.palette.green[50],
32
- },
33
-
34
- '&.presetFailed': {
35
- color: theme.palette.neutralGrey[0],
36
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.FailedEnabled).setAlpha(0.5)}`,
37
- border: `1px solid ${theme.palette.analysisStatus.FailedEnabled}`,
38
-
39
- '&.MuiChip-clickable:hover': {
40
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.FailedHover).setAlpha(0.5)}`,
41
- border: `1px solid ${theme.palette.analysisStatus.FailedHover}`,
42
- },
43
- '&.MuiChip-clickable:active': {
44
- backgroundColor: theme.palette.analysisStatus.FailedSelected,
45
- border: `1px solid ${theme.palette.analysisStatus.FailedSelected}`,
46
- },
47
- },
48
-
49
- '&.presetReady': {
50
- color: theme.palette.neutralGrey[0],
51
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.Ready).setAlpha(0.5)}`,
52
- border: `1px solid ${theme.palette.analysisStatus.Ready}`,
53
- '&.MuiChip-clickable:hover': {
54
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.ReadyHover).setAlpha(0.5)}`,
55
- border: `1px solid ${theme.palette.analysisStatus.ReadyHover}`,
56
- },
57
- '&.MuiChip-clickable:active': {
58
- backgroundColor: theme.palette.analysisStatus.ReadySelected,
59
- border: `1px solid ${theme.palette.analysisStatus.ReadySelected}`,
60
- },
61
- },
62
-
63
- '&.presetInferred': {
64
- color: theme.palette.neutralGrey[0],
65
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.Inferred).setAlpha(0.5)}`,
66
- border: `1px solid ${theme.palette.analysisStatus.Inferred}`,
67
- '&.MuiChip-clickable:hover': {
68
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.InferredHover).setAlpha(0.5)}`,
69
- border: `1px solid ${theme.palette.analysisStatus.InferredHover}`,
70
- },
71
- '&.MuiChip-clickable:active': {
72
- backgroundColor: theme.palette.analysisStatus.InferredSelected,
73
- border: `1px solid ${theme.palette.analysisStatus.InferredSelected}`,
74
- },
75
- },
76
-
77
- '&.presetInvalid': {
78
- color: theme.palette.neutralGrey[0],
79
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.Invalid).setAlpha(0.5)}`,
80
- border: `1px solid ${tinycolor(theme.palette.analysisStatus.Invalid).setAlpha(0.5)}`,
81
- '&.MuiChip-clickable:hover': {
82
- backgroundColor: `${tinycolor(theme.palette.analysisStatus.InvalidHover).setAlpha(0.5)}`,
83
- border: `1px solid ${theme.palette.neutralGrey[0]}`,
84
- },
85
- '&.MuiChip-clickable:active': {
86
- backgroundColor: theme.palette.analysisStatus.InvalidSelected,
87
- border: `1px solid ${theme.palette.neutralGrey[0]}`,
88
- },
89
- },
90
-
91
- // Label Font
92
- '.MuiChip-label': {
93
- fontStyle: 'normal',
94
- fontWeight: className === 'presetDefault' ? '400' : '500',
95
- fontSize: '14px',
96
- lineHeight: '20px',
97
- },
98
-
99
- // Icons position
100
- '.MuiChip-icon': {
101
- height: '18px',
102
- marginRight: '-7px',
103
- color: 'unset', // used default set by preset
104
- },
105
-
106
- '.MuiChip-deleteIcon': {
107
- height: '18px',
108
- width: '18px',
109
- marginLeft: '-7px',
110
- color: theme.palette.neutralGrey[0],
111
- '&:hover': {
112
- color: theme.palette.neutralGrey[0],
113
- borderRadius: '50%',
114
- backgroundColor: theme.palette.neutralGrey[90],
115
- },
116
- },
117
- };
118
- });
119
-
120
- export default StyledChip;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { CloseSmall } from '../../icons';
3
- import StyledChip from './Chip.styled';
4
- import type { ChipProps } from './Chip.types';
5
- import { presetMap } from './Chip.utils';
6
-
7
- function Chip({ preset, label, icon, onDelete, onClick, ...otherProps }: ChipProps) {
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- const overwrittenProps: any = {
10
- label,
11
- icon,
12
- onDelete,
13
- onClick,
14
- };
15
- // Remove undefined properties
16
- Object.keys(overwrittenProps).forEach((key) =>
17
- overwrittenProps[key] === undefined ? delete overwrittenProps[key] : {},
18
- );
19
-
20
- const newPreset = preset?.includes('failed') ? 'failed' : preset;
21
-
22
- const customProps = {
23
- disableRipple: true,
24
- deleteIcon: <CloseSmall />,
25
- ...presetMap[newPreset || 'default'],
26
- ...overwrittenProps,
27
- ...otherProps,
28
- };
29
-
30
- return <StyledChip {...customProps} />;
31
- }
32
-
33
- export default Chip;
@@ -1,18 +0,0 @@
1
- import type { ChipProps as MuiChipProps } from '@mui/material';
2
-
3
- export type ChipsPreset =
4
- | 'default'
5
- | 'uploaded'
6
- | 'analyzing'
7
- | 'analyzed'
8
- | 'analysis_failed'
9
- | 'qc_failed'
10
- | 'ready'
11
- | 'inferred'
12
- | 'inferencing'
13
- | 'invalid';
14
-
15
- export interface ChipProps extends MuiChipProps {
16
- preset?: ChipsPreset;
17
- label?: string;
18
- }
@@ -1,50 +0,0 @@
1
- import React from 'react';
2
- import { Error16, StartT2 } from '../../icons';
3
-
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
- const presetMap: any = {
6
- default: {
7
- className: 'presetDefault',
8
- label: 'label',
9
- color: 'default',
10
- },
11
- uploaded: {
12
- className: 'presetUploaded',
13
- label: 'Uploaded',
14
- },
15
- analyzing: {
16
- className: 'presetAnalyzing',
17
- label: 'Analyzing',
18
- },
19
- analyzed: {
20
- className: 'presetAnalyzed',
21
- label: 'Analyzed',
22
- },
23
- failed: {
24
- className: 'presetFailed',
25
- label: 'Failed',
26
- icon: <Error16 />,
27
- },
28
- ready: {
29
- className: 'presetReady',
30
- label: 'Ready',
31
- icon: <StartT2 />,
32
- },
33
- inferred: {
34
- className: 'presetInferred',
35
- label: 'Inferred',
36
- icon: <StartT2 />,
37
- },
38
- inferencing: {
39
- className: 'presetAnalyzing',
40
- label: 'Analyzing',
41
- },
42
- invalid: {
43
- className: 'presetInvalid',
44
- label: 'Invalid',
45
- icon: <Error16 />,
46
- },
47
- };
48
-
49
- // eslint-disable-next-line import/prefer-default-export
50
- export { presetMap };
@@ -1,4 +0,0 @@
1
- import Chip from './Chip';
2
- import type { ChipProps, ChipsPreset } from './Chip.types';
3
-
4
- export { Chip, ChipProps, ChipsPreset };
@@ -1,66 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
-
3
- const DataGridContainer = styled('div')(({ theme }) => ({
4
- height: '100%',
5
- width: '100%',
6
- '.MuiDataGrid-root': {
7
- border: 'none',
8
- overflowY: 'hidden',
9
- borderRadius: 0,
10
- '.MuiDataGrid-withBorderColor': {
11
- borderColor: theme.palette.neutralGrey[80],
12
- },
13
- '.MuiDataGrid-withBorder': {
14
- borderRight: `1px solid ${theme.palette.neutralGrey[80]}`,
15
- padding: theme.spacing(0, 2),
16
- height: '40px',
17
- '&:last-child': { borderRight: 'none' },
18
- },
19
- '.MuiDataGrid-row': {
20
- '&:last-child .MuiDataGrid-cell': {
21
- borderBottom: `1px solid ${theme.palette.neutralGrey[80]}`,
22
- },
23
- '.MuiDataGrid-cellCheckbox': {
24
- borderRight: 0,
25
- },
26
- '&:hover': { backgroundColor: theme.palette.others.RowHover },
27
- '&.Mui-selected': {
28
- backgroundColor: theme.palette.others.RowHover,
29
- border: 'transparent',
30
- '&:hover': { backgroundColor: theme.palette.others.RowHover },
31
- },
32
- '& .hover-shown': { opacity: 0 },
33
- '&:hover .hover-shown, & .hover-shown.menu-active': { opacity: 1 },
34
- },
35
- '.MuiDataGrid-cell': {
36
- ...theme.typography.body5,
37
- borderBottom: `1px solid ${theme.palette.neutralGrey[80]}`,
38
- padding: theme.spacing(0, 2),
39
- '&:focus, &:focus-within, &:focus-visible': { outline: 'none' },
40
- },
41
- '.MuiDataGrid-columnSeparator': { position: 'relative' },
42
- '.MuiDataGrid-iconSeparator': { display: 'none' },
43
- '.MuiDataGrid-columnHeader': {
44
- '&:focus': { outline: 'none' },
45
- },
46
- '.MuiDataGrid-columnHeaderTitleContainer': {
47
- padding: 0,
48
- '&:focus': { outline: 'none' },
49
- },
50
- },
51
- '.MuiDataGrid-columnHeaders': {
52
- borderTop: `1px solid ${theme.palette.neutralGrey[80]}`,
53
- borderBottom: `1px solid ${theme.palette.neutralGrey[80]}`,
54
- borderRadius: 0,
55
- '&:focus': { outline: 'none' },
56
- '.MuiDataGrid-columnHeaderCheckbox': {
57
- borderRight: 0,
58
- },
59
- },
60
- '.MuiDataGrid-columnHeaderTitle': {
61
- ...theme.typography.body_b1,
62
- color: theme.palette.neutralGrey[40],
63
- },
64
- }));
65
-
66
- export default DataGridContainer;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { DataGrid } from '@mui/x-data-grid';
3
- import { DataGridProps } from '@mui/x-data-grid';
4
- import DataGridContainer from './DataTable.styled';
5
- import { Checkbox } from '../Checkbox';
6
-
7
- function DataTable({ rows, columns, ...otherProps }: DataGridProps) {
8
- return (
9
- <DataGridContainer>
10
- <DataGrid
11
- rows={rows}
12
- columns={columns}
13
- columnHeaderHeight={40}
14
- rowHeight={40}
15
- showColumnVerticalBorder
16
- showCellVerticalBorder
17
- disableColumnMenu
18
- hideFooter
19
- slots={{
20
- noRowsOverlay: () => <div />,
21
- baseCheckbox: Checkbox,
22
- }}
23
- {...otherProps}
24
- />
25
- </DataGridContainer>
26
- );
27
- }
28
-
29
- export default DataTable;
@@ -1 +0,0 @@
1
- export { default as DataTable } from './DataTable';
@@ -1,19 +0,0 @@
1
- import { DesktopDatePicker } from '@mui/x-date-pickers/DesktopDatePicker';
2
- import { styled } from '@mui/material/styles';
3
-
4
- const StyledDatePicker = styled(DesktopDatePicker)(({ theme }) => ({
5
- '.MuiInputBase-root': {
6
- height: '36px',
7
- backgroundColor: theme.palette.neutralGrey[75],
8
-
9
- '&:hover fieldset': {
10
- borderColor: theme.palette.neutralGrey[45],
11
- },
12
- '&.Mui-focused fieldset': {
13
- borderColor: theme.palette.lunitTeal[10],
14
- borderWidth: '1px',
15
- },
16
- },
17
- }));
18
-
19
- export { StyledDatePicker };
@@ -1,194 +0,0 @@
1
- import React from 'react';
2
- import { useState, useMemo, useEffect } from 'react';
3
- import { CloseSmall, ArrowLeft, ArrowRight } from '../../icons';
4
-
5
- import { StyledDatePicker } from './DatePicker.styled';
6
- import type { DatePickerProps } from './DatePicker.types';
7
- import { Button } from '../Button';
8
-
9
- import theme from '../../theme';
10
-
11
- function DatePicker({ alignment, placeholder, onChange, value, ...props }: DatePickerProps) {
12
- const [open, setOpen] = useState<boolean>(false);
13
- const [selectedDate, setSelectedDate] = useState<Date | null>(null);
14
-
15
- const { slots, slotProps, ...otherProps } = props;
16
-
17
- const handleFieldClick = () => {
18
- setOpen(true);
19
- };
20
-
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- const handleChange = (date: Date | null, context: any) => {
23
- setSelectedDate(date);
24
- if (onChange) onChange(date, context);
25
- setOpen(false);
26
- };
27
-
28
- const handleFieldClearClick = (e: React.MouseEvent<HTMLElement>) => {
29
- e.stopPropagation();
30
- handleChange(null, null);
31
- };
32
-
33
- const popperPlacement = useMemo(() => {
34
- switch (alignment) {
35
- case 'left':
36
- return 'bottom-start';
37
- case 'right':
38
- return 'bottom-end';
39
- default:
40
- return 'bottom';
41
- }
42
- }, [alignment]);
43
-
44
- useEffect(() => {
45
- if (value === null && selectedDate !== null) {
46
- setSelectedDate(null);
47
- }
48
- if (value !== null && selectedDate === null) {
49
- setSelectedDate(value!);
50
- }
51
- }, [value, selectedDate, setSelectedDate]);
52
-
53
- const canUseToday = useMemo(() => {
54
- const today = new Date();
55
- if (props.minDate && today < props.minDate) return false;
56
- if (props.maxDate && today > props.maxDate) return false;
57
- return true;
58
- }, [props.minDate, props.maxDate]);
59
-
60
- return (
61
- <StyledDatePicker
62
- open={open}
63
- value={selectedDate}
64
- onChange={handleChange}
65
- // onOpen={() => setOpen(true)}
66
- onClose={() => setOpen(false)}
67
- views={['year', 'month', 'day']}
68
- slots={{
69
- inputAdornment: () => {
70
- if (selectedDate) {
71
- return (
72
- <Button
73
- variant="ghost"
74
- color="secondary"
75
- size="small"
76
- icon={<CloseSmall />}
77
- sx={{
78
- color: theme.palette.neutralGrey[0],
79
- borderColor: 'transparent !important',
80
- }}
81
- onClick={handleFieldClearClick}
82
- />
83
- );
84
- }
85
- return null;
86
- },
87
- leftArrowIcon: ArrowLeft,
88
- rightArrowIcon: ArrowRight,
89
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
90
- ...(slots as any),
91
- }}
92
- slotProps={{
93
- switchViewButton: {
94
- sx: {
95
- display: 'none',
96
- },
97
- },
98
- textField: {
99
- variant: 'outlined',
100
- onClick: handleFieldClick,
101
- InputProps: {
102
- placeholder: placeholder || 'mm/dd/yyyy',
103
- sx: {
104
- borderRadius: '8px',
105
- // According to designer, the width of the date picker should be enforced at 320px
106
- // when the placement is bottom. that is why we have !important here.
107
- width: popperPlacement === 'bottom' ? '320px !important' : 'auto',
108
- borderColor: 'red',
109
- ...theme.typography.body5,
110
-
111
- '& input': {
112
- textTransform: 'lowercase',
113
- },
114
- '& ::placeholder': {
115
- textTransform: 'none',
116
- },
117
- },
118
- onMouseDown: (e: React.MouseEvent<HTMLInputElement>) => {
119
- const element = e.target as HTMLElement;
120
- if (element.tagName === 'INPUT') {
121
- e.preventDefault();
122
- }
123
- },
124
- },
125
- },
126
- popper: {
127
- placement: popperPlacement,
128
- modifiers: [
129
- {
130
- name: 'offset',
131
- enabled: true,
132
- options: {
133
- offset: [0, 8],
134
- },
135
- },
136
- ],
137
- sx: {
138
- '& .MuiPickersDay-today': {
139
- border: `1px solid ${theme.palette.neutralGrey[0]} !important`,
140
- borderRadius: '50%',
141
- },
142
-
143
- '& .MuiPickersDay-root:hover': {
144
- border: `1px solid ${theme.palette.neutralGrey[0]}`,
145
- borderRadius: '50%',
146
- },
147
-
148
- '& .MuiPickersDay-root.Mui-selected': {
149
- backgroundColor: `${theme.palette.lunitTeal[40]} !important`,
150
- color: `${theme.palette.neutralGrey[97]} !important`,
151
- },
152
- },
153
- },
154
- desktopPaper: {
155
- sx: {
156
- background: theme.palette.neutralGrey[70],
157
- },
158
- },
159
- previousIconButton: {
160
- sx: {
161
- color: theme.palette.neutralGrey[0],
162
- },
163
- },
164
- nextIconButton: {
165
- sx: {
166
- color: theme.palette.neutralGrey[0],
167
- },
168
- },
169
- actionBar: {
170
- actions: ['today'],
171
- sx: {
172
- '& button': {
173
- color: `${theme.palette.lunitTeal[40]} !important`,
174
- textTransform: 'capitalize',
175
- pointerEvents: canUseToday ? 'auto' : 'none',
176
- opacity: canUseToday ? 1 : 0.4,
177
- },
178
- },
179
- },
180
- day: {
181
- sx: {
182
- backgroundColor: 'transparent !important',
183
- },
184
- },
185
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
186
- ...(slotProps as any),
187
- }}
188
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
189
- {...(otherProps as any)}
190
- />
191
- );
192
- }
193
-
194
- export default DatePicker;
@@ -1,8 +0,0 @@
1
- import type { DatePickerProps as MuiDatePickerProps } from '@mui/x-date-pickers/DatePicker';
2
-
3
- export type DatePickerAlignment = 'left' | 'center' | 'right';
4
-
5
- export interface DatePickerProps extends MuiDatePickerProps<Date> {
6
- alignment?: DatePickerAlignment;
7
- placeholder?: string;
8
- }
@@ -1,4 +0,0 @@
1
- import DatePicker from './DatePicker';
2
- import type { DatePickerProps } from './DatePicker.types';
3
-
4
- export { DatePicker, DatePickerProps };