@lunit/oui 1.0.0-alpha.9 → 1.0.1-alpha.10

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 (270) hide show
  1. package/dist/components/Alert/Alert.js +1 -1
  2. package/dist/components/Alert/Alert.utils.js +1 -1
  3. package/dist/components/Chip/Chip.js +1 -1
  4. package/dist/components/Chip/Chip.utils.js +1 -1
  5. package/dist/components/DatePicker/DatePicker.js +1 -1
  6. package/dist/components/Dialog/Dialog.js +1 -1
  7. package/dist/components/Dropdown/Dropdown.js +1 -1
  8. package/dist/components/Dropdown/DropdownItem.js +1 -1
  9. package/dist/components/Dropdown/IconDropdown.js +1 -1
  10. package/dist/components/List/List.js +1 -1
  11. package/dist/components/List/ListItem.styled.js +1 -1
  12. package/dist/components/Pagination/Pagination.js +65 -0
  13. package/dist/components/Pagination/Pagination.styled.js +64 -0
  14. package/dist/components/Pagination/Pagination.types.js +2 -0
  15. package/dist/components/Pagination/index.js +2 -0
  16. package/dist/components/ProductLabel/ProductLabel.js +1 -1
  17. package/dist/components/TextField/components/Buttons.js +1 -1
  18. package/dist/components/UploadManager/UploadManager.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/foundations/index.js +1 -0
  21. package/dist/foundations/palette.js +4 -0
  22. package/dist/foundations/styles.js +7 -0
  23. package/dist/types/components/Pagination/Pagination.d.ts +3 -0
  24. package/dist/types/components/Pagination/Pagination.styled.d.ts +24 -0
  25. package/dist/types/components/Pagination/Pagination.types.d.ts +35 -0
  26. package/dist/types/components/Pagination/index.d.ts +2 -0
  27. package/dist/types/components/index.d.ts +1 -1
  28. package/dist/types/foundations/index.d.ts +1 -0
  29. package/dist/types/foundations/palette.d.ts +8 -1
  30. package/dist/types/foundations/styles.d.ts +2 -0
  31. package/package.json +7 -11
  32. package/.git-ftp-include +0 -1
  33. package/dist/components/Icons/BellNoti/index.js +0 -14
  34. package/dist/components/Icons/CloseLarge/index.js +0 -14
  35. package/dist/components/Icons/CloseSmall/index.js +0 -14
  36. package/dist/components/Icons/DownloadPdf/index.js +0 -14
  37. package/dist/components/Icons/Ellipse/index.js +0 -14
  38. package/dist/components/Icons/FilterNoti/index.js +0 -14
  39. package/dist/components/Icons/HideLarge/index.js +0 -14
  40. package/dist/components/Icons/HideSmall/index.js +0 -14
  41. package/dist/components/Icons/InformationLarge/index.js +0 -14
  42. package/dist/components/Icons/InformationSmall/index.js +0 -14
  43. package/dist/components/Icons/Manufacturer/index.js +0 -14
  44. package/dist/components/Icons/Rectangle/index.js +0 -14
  45. package/dist/components/Icons/RefreshLeft/index.js +0 -14
  46. package/dist/components/Icons/RefreshRight/index.js +0 -14
  47. package/dist/components/Icons/ShowLarge/index.js +0 -14
  48. package/dist/components/Icons/ShowSmall/index.js +0 -14
  49. package/dist/components/Icons/index.js +0 -180
  50. package/dist/types/components/Icons/BellNoti/index.d.ts +0 -12
  51. package/dist/types/components/Icons/CloseLarge/index.d.ts +0 -12
  52. package/dist/types/components/Icons/CloseSmall/index.d.ts +0 -12
  53. package/dist/types/components/Icons/DownloadPdf/index.d.ts +0 -12
  54. package/dist/types/components/Icons/Ellipse/index.d.ts +0 -12
  55. package/dist/types/components/Icons/FilterNoti/index.d.ts +0 -12
  56. package/dist/types/components/Icons/HideLarge/index.d.ts +0 -12
  57. package/dist/types/components/Icons/HideSmall/index.d.ts +0 -12
  58. package/dist/types/components/Icons/InformationLarge/index.d.ts +0 -12
  59. package/dist/types/components/Icons/InformationSmall/index.d.ts +0 -12
  60. package/dist/types/components/Icons/Manufacturer/index.d.ts +0 -12
  61. package/dist/types/components/Icons/Rectangle/index.d.ts +0 -12
  62. package/dist/types/components/Icons/RefreshLeft/index.d.ts +0 -12
  63. package/dist/types/components/Icons/RefreshRight/index.d.ts +0 -12
  64. package/dist/types/components/Icons/ShowLarge/index.d.ts +0 -12
  65. package/dist/types/components/Icons/ShowSmall/index.d.ts +0 -12
  66. package/dist/types/components/Icons/index.d.ts +0 -179
  67. package/src/assets/ic-bell-noti-outlined-20px.tsx +0 -21
  68. package/src/assets/ic-close-large-outlined-20px.tsx +0 -17
  69. package/src/assets/ic-close-small-outlined-20px.tsx +0 -17
  70. package/src/assets/ic-download-pdf-outlined-20px.tsx +0 -18
  71. package/src/assets/ic-ellipse-outlined-20px.tsx +0 -17
  72. package/src/assets/ic-filter-noti-outlined-20px.tsx +0 -21
  73. package/src/assets/ic-hide-large-outlined-20px.tsx +0 -13
  74. package/src/assets/ic-hide-small-outlined-20px.tsx +0 -17
  75. package/src/assets/ic-information-large-outlined-20px.tsx +0 -17
  76. package/src/assets/ic-information-small-outlined-20px.tsx +0 -17
  77. package/src/assets/ic-manufacturer-outlined-20px.tsx +0 -19
  78. package/src/assets/ic-rectangle-outlined-20px.tsx +0 -17
  79. package/src/assets/ic-refresh-left-outlined-20px.tsx +0 -17
  80. package/src/assets/ic-refresh-right-outlined-20px.tsx +0 -13
  81. package/src/assets/ic-show-large-outlined-20px.tsx +0 -17
  82. package/src/assets/ic-show-small-outlined-20px.tsx +0 -17
  83. package/src/assets/ic_bell_noti=outlined_20px.svg +0 -5
  84. package/src/assets/ic_close_large=outlined_20px.svg +0 -4
  85. package/src/assets/ic_close_small=outlined_20px.svg +0 -4
  86. package/src/assets/ic_download_pdf=outlined_20px.svg +0 -7
  87. package/src/assets/ic_ellipse=outlined_20px.svg +0 -4
  88. package/src/assets/ic_filter_noti=outlined_20px.svg +0 -5
  89. package/src/assets/ic_hide_large=outlined_20px.svg +0 -4
  90. package/src/assets/ic_hide_small=outlined_20px.svg +0 -4
  91. package/src/assets/ic_information_large=outlined_20px.svg +0 -4
  92. package/src/assets/ic_information_small=outlined_20px.svg +0 -4
  93. package/src/assets/ic_manufacturer=outlined_20px.svg +0 -3
  94. package/src/assets/ic_rectangle=outlined_20px.svg +0 -4
  95. package/src/assets/ic_refresh_left=outlined_20px.svg +0 -4
  96. package/src/assets/ic_refresh_right=outlined_20px.svg +0 -4
  97. package/src/assets/ic_show_large=outlined_20px.svg +0 -4
  98. package/src/assets/ic_show_small=outlined_20px.svg +0 -4
  99. package/src/assets/index.ts +0 -16
  100. package/src/components/Alert/Alert.styled.ts +0 -44
  101. package/src/components/Alert/Alert.tsx +0 -39
  102. package/src/components/Alert/Alert.types.ts +0 -5
  103. package/src/components/Alert/Alert.utils.tsx +0 -43
  104. package/src/components/Alert/index.ts +0 -5
  105. package/src/components/BaseTextField/BaseTextField.styled.ts +0 -110
  106. package/src/components/BaseTextField/BaseTextField.types.ts +0 -25
  107. package/src/components/BaseTextField/BaseTextField.utils.ts +0 -10
  108. package/src/components/Button/BaseButton.tsx +0 -19
  109. package/src/components/Button/Button.tsx +0 -117
  110. package/src/components/Button/Button.types.ts +0 -36
  111. package/src/components/Button/Button.utils.ts +0 -13
  112. package/src/components/Button/index.ts +0 -6
  113. package/src/components/Button/styleds/BaseButton.styled.ts +0 -57
  114. package/src/components/Button/styleds/ContainedButton.styled.ts +0 -123
  115. package/src/components/Button/styleds/GhostButton.styled.ts +0 -139
  116. package/src/components/Button/styleds/IconButton.styled.ts +0 -25
  117. package/src/components/Button/styleds/OutlinedButton.styled.ts +0 -144
  118. package/src/components/Card/Card.styled.tsx +0 -18
  119. package/src/components/Card/Card.tsx +0 -18
  120. package/src/components/Card/Card.types.ts +0 -10
  121. package/src/components/Card/index.ts +0 -5
  122. package/src/components/Checkbox/Checkbox.styled.tsx +0 -27
  123. package/src/components/Checkbox/Checkbox.tsx +0 -64
  124. package/src/components/Checkbox/Checkbox.types.ts +0 -16
  125. package/src/components/Checkbox/Checkbox.utils.tsx +0 -42
  126. package/src/components/Checkbox/index.ts +0 -5
  127. package/src/components/Chip/Chip.styled.ts +0 -120
  128. package/src/components/Chip/Chip.tsx +0 -33
  129. package/src/components/Chip/Chip.types.ts +0 -18
  130. package/src/components/Chip/Chip.utils.tsx +0 -50
  131. package/src/components/Chip/index.ts +0 -4
  132. package/src/components/DataTable/DataTable.styled.ts +0 -66
  133. package/src/components/DataTable/DataTable.tsx +0 -29
  134. package/src/components/DataTable/index.ts +0 -1
  135. package/src/components/DatePicker/DatePicker.styled.ts +0 -19
  136. package/src/components/DatePicker/DatePicker.tsx +0 -194
  137. package/src/components/DatePicker/DatePicker.types.ts +0 -8
  138. package/src/components/DatePicker/index.ts +0 -4
  139. package/src/components/Dialog/Dialog.styled.ts +0 -87
  140. package/src/components/Dialog/Dialog.tsx +0 -111
  141. package/src/components/Dialog/Dialog.types.ts +0 -19
  142. package/src/components/Dialog/index.ts +0 -5
  143. package/src/components/Divider/Divider.styled.ts +0 -24
  144. package/src/components/Divider/Divider.tsx +0 -13
  145. package/src/components/Divider/Divider.types.ts +0 -7
  146. package/src/components/Divider/index.ts +0 -5
  147. package/src/components/Dropdown/Dropdown.styled.tsx +0 -127
  148. package/src/components/Dropdown/Dropdown.tsx +0 -116
  149. package/src/components/Dropdown/Dropdown.types.ts +0 -31
  150. package/src/components/Dropdown/Dropdown.utils.ts +0 -13
  151. package/src/components/Dropdown/DropdownItem.styled.tsx +0 -66
  152. package/src/components/Dropdown/DropdownItem.tsx +0 -45
  153. package/src/components/Dropdown/DropdownItem.types.ts +0 -14
  154. package/src/components/Dropdown/DropdownItem.utils.ts +0 -14
  155. package/src/components/Dropdown/DropdownSubtitle.styled.ts +0 -13
  156. package/src/components/Dropdown/DropdownSubtitle.tsx +0 -9
  157. package/src/components/Dropdown/DropdownSubtitle.types.ts +0 -6
  158. package/src/components/Dropdown/IconDropdown.styled.tsx +0 -82
  159. package/src/components/Dropdown/IconDropdown.tsx +0 -56
  160. package/src/components/Dropdown/IconDropdown.types.ts +0 -22
  161. package/src/components/Dropdown/index.ts +0 -22
  162. package/src/components/FileDnDZone/FileDnDZone.styled.ts +0 -43
  163. package/src/components/FileDnDZone/FileDnDZone.tsx +0 -81
  164. package/src/components/FileDnDZone/FileDnDZone.types.ts +0 -14
  165. package/src/components/FileDnDZone/FileDnDZone.utils.ts +0 -3
  166. package/src/components/FileDnDZone/index.ts +0 -5
  167. package/src/components/Icons/BellNoti/index.tsx +0 -22
  168. package/src/components/Icons/CloseLarge/index.tsx +0 -22
  169. package/src/components/Icons/CloseSmall/index.tsx +0 -22
  170. package/src/components/Icons/DownloadPdf/index.tsx +0 -22
  171. package/src/components/Icons/Ellipse/index.tsx +0 -22
  172. package/src/components/Icons/FilterNoti/index.tsx +0 -22
  173. package/src/components/Icons/HideLarge/index.tsx +0 -22
  174. package/src/components/Icons/HideSmall/index.tsx +0 -22
  175. package/src/components/Icons/InformationLarge/index.tsx +0 -22
  176. package/src/components/Icons/InformationSmall/index.tsx +0 -22
  177. package/src/components/Icons/Manufacturer/index.tsx +0 -22
  178. package/src/components/Icons/Rectangle/index.tsx +0 -22
  179. package/src/components/Icons/RefreshLeft/index.tsx +0 -22
  180. package/src/components/Icons/RefreshRight/index.tsx +0 -22
  181. package/src/components/Icons/ShowLarge/index.tsx +0 -22
  182. package/src/components/Icons/ShowSmall/index.tsx +0 -22
  183. package/src/components/Icons/index.ts +0 -180
  184. package/src/components/List/List.styled.ts +0 -31
  185. package/src/components/List/List.tsx +0 -71
  186. package/src/components/List/List.types.ts +0 -24
  187. package/src/components/List/List.utils.ts +0 -14
  188. package/src/components/List/ListItem.styled.tsx +0 -61
  189. package/src/components/List/ListItem.tsx +0 -66
  190. package/src/components/List/ListItem.types.ts +0 -40
  191. package/src/components/List/ListItemCaption.styled.tsx +0 -7
  192. package/src/components/List/ListItemCaption.tsx +0 -18
  193. package/src/components/List/ListItemCaption.types.ts +0 -2
  194. package/src/components/List/index.ts +0 -8
  195. package/src/components/LoadingIndicator/LoadingIndicator.styled.tsx +0 -40
  196. package/src/components/LoadingIndicator/LoadingIndicator.tsx +0 -44
  197. package/src/components/LoadingIndicator/LoadingIndicator.types.ts +0 -7
  198. package/src/components/LoadingIndicator/assets/DnaLoadingAnimation.json +0 -769
  199. package/src/components/LoadingIndicator/assets/DotLoadingAnimation.json +0 -426
  200. package/src/components/LoadingIndicator/index.ts +0 -5
  201. package/src/components/Menu/Menu.styled.tsx +0 -42
  202. package/src/components/Menu/Menu.tsx +0 -28
  203. package/src/components/Menu/Menu.types.ts +0 -18
  204. package/src/components/Menu/MenuItem.styled.ts +0 -62
  205. package/src/components/Menu/MenuItem.tsx +0 -45
  206. package/src/components/Menu/MenuItem.types.ts +0 -14
  207. package/src/components/Menu/index.ts +0 -5
  208. package/src/components/MuiCssBaseline.ts +0 -78
  209. package/src/components/MuiInputBase.ts +0 -25
  210. package/src/components/MuiOutlinedInput.ts +0 -57
  211. package/src/components/MuiTextField.ts +0 -17
  212. package/src/components/ProductLabel/ProductLabel.styled.ts +0 -61
  213. package/src/components/ProductLabel/ProductLabel.tsx +0 -57
  214. package/src/components/ProductLabel/ProductLabel.types.ts +0 -10
  215. package/src/components/ProductLabel/index.ts +0 -5
  216. package/src/components/Progress/CircularProgress.styled.ts +0 -10
  217. package/src/components/Progress/CircularProgress.tsx +0 -15
  218. package/src/components/Progress/CircularProgress.types.ts +0 -6
  219. package/src/components/Progress/LinearProgress.styled.ts +0 -15
  220. package/src/components/Progress/LinearProgress.tsx +0 -16
  221. package/src/components/Progress/LinearProgress.types.ts +0 -7
  222. package/src/components/Progress/index.ts +0 -4
  223. package/src/components/Radio/Radio.styled.ts +0 -35
  224. package/src/components/Radio/Radio.tsx +0 -60
  225. package/src/components/Radio/Radio.types.ts +0 -15
  226. package/src/components/Radio/RadioGroup.styled.ts +0 -6
  227. package/src/components/Radio/RadioGroup.tsx +0 -23
  228. package/src/components/Radio/RadioGroup.types.ts +0 -10
  229. package/src/components/Radio/index.ts +0 -7
  230. package/src/components/Stepper/Stepper.styled.ts +0 -38
  231. package/src/components/Stepper/Stepper.tsx +0 -24
  232. package/src/components/Stepper/Stepper.types.ts +0 -13
  233. package/src/components/Stepper/index.ts +0 -5
  234. package/src/components/TabbedPanel/TabbedPanel.styled.ts +0 -129
  235. package/src/components/TabbedPanel/TabbedPanel.tsx +0 -70
  236. package/src/components/TabbedPanel/TabbedPanel.types.ts +0 -36
  237. package/src/components/TabbedPanel/TabbedPanel.utils.ts +0 -21
  238. package/src/components/TabbedPanel/index.ts +0 -5
  239. package/src/components/TextField/TextArea.styled.tsx +0 -36
  240. package/src/components/TextField/TextArea.tsx +0 -35
  241. package/src/components/TextField/TextArea.types.ts +0 -28
  242. package/src/components/TextField/TextInput.styled.tsx +0 -115
  243. package/src/components/TextField/TextInput.tsx +0 -27
  244. package/src/components/TextField/TextInput.types.ts +0 -46
  245. package/src/components/TextField/TextInput.utils.ts +0 -7
  246. package/src/components/TextField/components/Buttons.tsx +0 -26
  247. package/src/components/TextField/components/NormalTextInput.tsx +0 -95
  248. package/src/components/TextField/components/PasswordInput.tsx +0 -92
  249. package/src/components/TextField/index.ts +0 -7
  250. package/src/components/Tooltip/Tooltip.styled.tsx +0 -36
  251. package/src/components/Tooltip/Tooltip.tsx +0 -58
  252. package/src/components/Tooltip/Tooltip.types.ts +0 -24
  253. package/src/components/Tooltip/Tooltip.utils.ts +0 -46
  254. package/src/components/Tooltip/index.ts +0 -5
  255. package/src/components/UploadManager/UploadManager.styled.ts +0 -49
  256. package/src/components/UploadManager/UploadManager.tsx +0 -271
  257. package/src/components/UploadManager/UploadManager.types.ts +0 -16
  258. package/src/components/UploadManager/index.ts +0 -5
  259. package/src/components/index.ts +0 -23
  260. package/src/foundations/index.ts +0 -3
  261. package/src/foundations/palette.ts +0 -407
  262. package/src/foundations/spacing.ts +0 -5
  263. package/src/foundations/typography.ts +0 -492
  264. package/src/index.ts +0 -4
  265. package/src/react-app-env.d.ts +0 -71
  266. package/src/reportWebVitals.ts +0 -15
  267. package/src/setupTests.ts +0 -5
  268. package/src/systems/drawer.ts +0 -27
  269. package/src/systems/index.ts +0 -7
  270. package/src/theme.ts +0 -22
@@ -1,139 +0,0 @@
1
- import { ButtonBase, styled } from '@mui/material';
2
- import type { Theme } from '@mui/material';
3
- import { baseButtonStyle, baseLargeStyle, baseSmallStyle } from './BaseButton.styled';
4
- import { baseLargeIconStyle, baseMediumIconStyle, baseSmallIconStyle } from './IconButton.styled';
5
- import type { BaseButtonProps } from '../Button.types';
6
-
7
- const ghostPrimaryStyle = (theme: Theme, focusOutline: boolean | undefined) => {
8
- const mainColor = theme.palette.lunitTeal[40];
9
-
10
- return {
11
- ...baseButtonStyle(theme, false),
12
- backgroundColor: 'transparent',
13
- color: mainColor,
14
- '&:hover': {
15
- backgroundColor: theme.palette.neutralGrey[70],
16
- opacity: 0.8,
17
- },
18
- '&:disabled': {
19
- backgroundColor: 'transparent',
20
- color: mainColor,
21
- opacity: 0.4,
22
- },
23
- '&:focus': {
24
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
25
- },
26
- '&:focus-visible': {
27
- outline: 'none',
28
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
29
- },
30
- };
31
- };
32
-
33
- const ghostSecondaryStyle = (theme: Theme, focusOutline: boolean | undefined) => {
34
- const mainColor = theme.palette.neutralGrey[25];
35
- return {
36
- color: mainColor,
37
- '&:hover': {
38
- backgroundColor: theme.palette.neutralGrey[75],
39
- opacity: 0.7,
40
- },
41
- '&:disabled': {
42
- backgroundColor: 'transparent',
43
- color: mainColor,
44
- opacity: 0.4,
45
- },
46
- '&:focus': {
47
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
48
- },
49
- '&:focus-visible': {
50
- outline: 'none',
51
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
52
- },
53
- };
54
- };
55
-
56
- const ghostErrorStyle = (theme: Theme, focusOutline: boolean | undefined) => {
57
- const mainColor = theme.palette.red[5];
58
-
59
- return {
60
- color: mainColor,
61
- '&:hover': {
62
- backgroundColor: theme.palette.neutralGrey[70],
63
- opacity: 0.7,
64
- },
65
- '&:disabled': {
66
- backgroundColor: 'transparent',
67
- color: mainColor,
68
- opacity: 0.4,
69
- },
70
- '&:focus': {
71
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
72
- },
73
- '&:focus-visible': {
74
- outline: 'none',
75
- border: focusOutline ? `1px solid ${mainColor}` : '1px solid transparent',
76
- },
77
- };
78
- };
79
-
80
- const BaseGhostButton = styled(ButtonBase, {
81
- shouldForwardProp: (prop) =>
82
- !['color', 'variant', 'size', 'focusOutline', 'isIconOnly'].includes(prop.toString()),
83
- })<BaseButtonProps>(({ theme, color, size, focusOutline, isIconOnly }) => {
84
- let resultStyle = ghostPrimaryStyle(theme, focusOutline);
85
-
86
- // Apply icon sizing if icon only
87
- if (isIconOnly) {
88
- if (size === 'small') {
89
- resultStyle = {
90
- ...resultStyle,
91
- ...baseSmallIconStyle,
92
- };
93
- } else if (size === 'large') {
94
- resultStyle = {
95
- ...resultStyle,
96
- ...baseLargeIconStyle,
97
- };
98
- } else {
99
- resultStyle = {
100
- ...resultStyle,
101
- ...baseMediumIconStyle,
102
- };
103
- }
104
- } else {
105
- // Apply label or icon-label
106
- if (size === 'small') {
107
- resultStyle = {
108
- ...resultStyle,
109
- ...baseSmallStyle,
110
- };
111
- }
112
-
113
- if (size === 'large') {
114
- resultStyle = {
115
- ...resultStyle,
116
- ...baseLargeStyle,
117
- };
118
- }
119
- }
120
-
121
- // Apply color
122
- if (color === 'error') {
123
- resultStyle = {
124
- ...resultStyle,
125
- ...ghostErrorStyle(theme, focusOutline),
126
- };
127
- }
128
-
129
- if (color === 'secondary') {
130
- resultStyle = {
131
- ...resultStyle,
132
- ...ghostSecondaryStyle(theme, focusOutline),
133
- };
134
- }
135
-
136
- return resultStyle;
137
- });
138
-
139
- export { ghostPrimaryStyle, ghostSecondaryStyle, ghostErrorStyle, BaseGhostButton };
@@ -1,25 +0,0 @@
1
- const baseSmallIconStyle = {
2
- height: '28px',
3
- width: '28px',
4
- minWidth: '28px',
5
- padding: '4px',
6
- };
7
-
8
- const baseLargeIconStyle = {
9
- fontWeight: 600,
10
- fontSize: '16px',
11
- lineHeight: '22px',
12
- // textTransform: 'capitalize', // Causes type error
13
- height: '44px',
14
- width: '44px',
15
- padding: '12px',
16
- };
17
-
18
- const baseMediumIconStyle = {
19
- height: '36px',
20
- width: '36px',
21
- minWidth: '36px',
22
- padding: '8px',
23
- };
24
-
25
- export { baseMediumIconStyle, baseSmallIconStyle, baseLargeIconStyle };
@@ -1,144 +0,0 @@
1
- import { ButtonBase, styled } from '@mui/material';
2
- import type { Theme } from '@mui/material';
3
- import { baseButtonStyle, baseLargeStyle, baseSmallStyle } from './BaseButton.styled';
4
- import { baseLargeIconStyle, baseMediumIconStyle, baseSmallIconStyle } from './IconButton.styled';
5
- import type { BaseButtonProps } from '../Button.types';
6
-
7
- const outlinedPrimaryStyle = (theme: Theme, focusOutline: boolean | undefined) => {
8
- const mainColor = theme.palette.lunitTeal[40];
9
- return {
10
- ...baseButtonStyle(theme, false),
11
- backgroundColor: 'transparent',
12
- color: mainColor,
13
- border: `1px solid ${mainColor}`,
14
- '&:hover': {
15
- backgroundColor: theme.palette.neutralGrey[70],
16
- opacity: 0.8,
17
- },
18
- '&:disabled': {
19
- color: mainColor,
20
- backgroundColor: 'transparent',
21
- opacity: 0.4,
22
- },
23
- '&:focus': {
24
- border: `1px solid ${mainColor}`,
25
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
26
- },
27
- '&:focus-visible': {
28
- border: `1px solid ${mainColor}`,
29
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
30
- },
31
- };
32
- };
33
-
34
- const outlinedSecondaryStyle = (theme: Theme, focusOutline: boolean | undefined) => {
35
- const mainColor = theme.palette.neutralGrey[25];
36
- return {
37
- backgroundColor: 'transparent',
38
- color: mainColor,
39
- border: `1px solid ${mainColor}`,
40
- '&:hover': {
41
- backgroundColor: theme.palette.neutralGrey[70],
42
- opacity: 0.8,
43
- },
44
- '&:disabled': {
45
- backgroundColor: 'transparent',
46
- color: mainColor,
47
- opacity: 0.4,
48
- },
49
- '&:focus': {
50
- border: `1px solid ${mainColor}`,
51
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
52
- },
53
- '&:focus-visible': {
54
- border: `1px solid ${mainColor}`,
55
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
56
- },
57
- };
58
- };
59
- const outlinedErrorStyle = (theme: Theme, focusOutline: boolean | undefined) => {
60
- const mainColor = theme.palette.red[5];
61
- return {
62
- backgroundColor: 'transparent',
63
- color: mainColor,
64
- border: `1px solid ${mainColor}`,
65
- '&:hover': {
66
- backgroundColor: theme.palette.neutralGrey[70],
67
- opacity: 0.8,
68
- },
69
- '&:disabled': {
70
- backgroundColor: 'transparent',
71
- color: mainColor,
72
- opacity: 0.4,
73
- },
74
- '&:focus': {
75
- border: `1px solid ${mainColor}`,
76
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
77
- },
78
- '&:focus-visible': {
79
- border: `1px solid ${mainColor}`,
80
- outline: focusOutline ? `2px solid ${mainColor}` : 'none',
81
- },
82
- };
83
- };
84
-
85
- const BaseOutlinedButton = styled(ButtonBase, {
86
- shouldForwardProp: (prop) =>
87
- !['color', 'variant', 'size', 'focusOutline', 'isIconOnly'].includes(prop.toString()),
88
- })<BaseButtonProps>(({ theme, color, size, focusOutline, isIconOnly }) => {
89
- let resultStyle = outlinedPrimaryStyle(theme, focusOutline);
90
-
91
- // Apply icon sizing if icon only
92
- if (isIconOnly) {
93
- if (size === 'small') {
94
- resultStyle = {
95
- ...resultStyle,
96
- ...baseSmallIconStyle,
97
- };
98
- } else if (size === 'large') {
99
- resultStyle = {
100
- ...resultStyle,
101
- ...baseLargeIconStyle,
102
- };
103
- } else {
104
- resultStyle = {
105
- ...resultStyle,
106
- ...baseMediumIconStyle,
107
- };
108
- }
109
- } else {
110
- // Apply label or icon-label
111
- if (size === 'small') {
112
- resultStyle = {
113
- ...resultStyle,
114
- ...baseSmallStyle,
115
- };
116
- }
117
-
118
- if (size === 'large') {
119
- resultStyle = {
120
- ...resultStyle,
121
- ...baseLargeStyle,
122
- };
123
- }
124
- }
125
-
126
- // Apply color
127
- if (color === 'error') {
128
- resultStyle = {
129
- ...resultStyle,
130
- ...outlinedErrorStyle(theme, focusOutline),
131
- };
132
- }
133
-
134
- if (color === 'secondary') {
135
- resultStyle = {
136
- ...resultStyle,
137
- ...outlinedSecondaryStyle(theme, focusOutline),
138
- };
139
- }
140
-
141
- return resultStyle;
142
- });
143
-
144
- export { outlinedPrimaryStyle, outlinedSecondaryStyle, outlinedErrorStyle, BaseOutlinedButton };
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { Card as MuiCard, styled } from '@mui/material';
3
- import type { CardProps } from './Card.types';
4
-
5
- const BaseCard = styled(({ ...props }: CardProps) => <MuiCard {...props} />)(
6
- ({ theme, size = 'large', selected }) => ({
7
- width: size === 'small' ? '480px' : '520px',
8
- height: size === 'small' ? '156px' : '284px',
9
- cursor: 'pointer',
10
- borderRadius: '8px',
11
- backgroundColor: !selected ? theme.palette.neutralGrey[85] : theme.palette.neutralGrey[75],
12
- '&:hover': {
13
- backgroundColor: theme.palette.neutralGrey[75],
14
- },
15
- }),
16
- );
17
-
18
- export default BaseCard;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import BaseCard from './Card.styled';
3
- import type { CardProps } from './Card.types';
4
-
5
- function Card({ size, selected, onClick, children, ...props }: CardProps) {
6
- return (
7
- <BaseCard
8
- size={size}
9
- selected={selected}
10
- onClick={onClick}
11
- {...props}
12
- >
13
- {children}
14
- </BaseCard>
15
- );
16
- }
17
-
18
- export default Card;
@@ -1,10 +0,0 @@
1
- import type { CardProps as MuiCardProps } from '@mui/material';
2
-
3
- export type CardSize = 'small' | 'large';
4
-
5
- export interface CardProps extends MuiCardProps {
6
- size?: CardSize;
7
- open?: boolean;
8
- selected?: boolean;
9
- onClick?: () => void;
10
- }
@@ -1,5 +0,0 @@
1
- import Card from './Card';
2
- import type { CardProps } from './Card.types';
3
-
4
- export { Card };
5
- export type { CardProps };
@@ -1,27 +0,0 @@
1
- import { styled, Box, Checkbox } from '@mui/material';
2
-
3
- export const Container = styled(Box, {
4
- shouldForwardProp: (prop) => prop !== 'touchRippleRef',
5
- })(({ theme }) => ({
6
- display: 'inline-flex',
7
- gap: theme.spacing(2),
8
- }));
9
-
10
- export const StyledCheckbox = styled(Checkbox)(({ theme }) => ({
11
- width: '22px',
12
- height: '22px',
13
- padding: 0,
14
- '&.Mui-disabled, &.Mui-disabled + .MuiTypography-root': {
15
- opacity: 0.4,
16
- },
17
- '&.Mui-focusVisible > .checkbox-icon': {
18
- borderRadius: '4px',
19
- boxShadow: `0 0 0 1px ${theme.palette.lunitTeal[10]}`,
20
- },
21
- }));
22
-
23
- export const iconStyle = {
24
- display: 'inline-block',
25
- width: '18px',
26
- height: '18px',
27
- };
@@ -1,64 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- import { Typography } from '@mui/material';
3
- import clsx from 'clsx';
4
- import { Container, StyledCheckbox } from './Checkbox.styled';
5
- import type { CheckboxProps } from './Checkbox.types';
6
- import { UncheckedIcon, CheckedIcon, IndeterminateIcon } from './Checkbox.utils';
7
-
8
- const Checkbox = forwardRef<HTMLSpanElement, CheckboxProps>(
9
- (
10
- {
11
- value,
12
- name,
13
- checked,
14
- defaultChecked,
15
- disabled,
16
- required,
17
- indeterminate,
18
- onChange,
19
- onChangeCapture,
20
- label,
21
- inputProps,
22
- inputRef,
23
- ...rootProps
24
- }: CheckboxProps,
25
- ref,
26
- ) => {
27
- return (
28
- <Container
29
- {...rootProps}
30
- className={clsx('checkbox', rootProps.className)}
31
- component={label != null ? 'label' : 'span'}
32
- ref={ref}
33
- >
34
- <StyledCheckbox
35
- disableRipple
36
- icon={<UncheckedIcon />}
37
- checkedIcon={<CheckedIcon />}
38
- indeterminateIcon={<IndeterminateIcon />}
39
- value={value}
40
- name={name}
41
- checked={indeterminate ? true : checked}
42
- defaultChecked={defaultChecked}
43
- disabled={disabled}
44
- required={required}
45
- indeterminate={indeterminate}
46
- onChange={onChange}
47
- onChangeCapture={onChangeCapture}
48
- inputProps={inputProps}
49
- inputRef={inputRef}
50
- />
51
- {label && (
52
- <Typography
53
- variant="body5"
54
- sx={{ display: 'flex', alignItems: 'center' }}
55
- >
56
- {label}
57
- </Typography>
58
- )}
59
- </Container>
60
- );
61
- },
62
- );
63
-
64
- export default Checkbox;
@@ -1,16 +0,0 @@
1
- import type { BoxProps, CheckboxProps as MuiCheckboxProps } from '@mui/material';
2
-
3
- export interface CheckboxProps extends Omit<BoxProps<'span'>, 'onChange' | 'onChangeCapture'> {
4
- value?: MuiCheckboxProps['value'];
5
- name?: MuiCheckboxProps['name'];
6
- checked?: MuiCheckboxProps['checked'];
7
- defaultChecked?: MuiCheckboxProps['defaultChecked'];
8
- disabled?: MuiCheckboxProps['disabled'];
9
- required?: MuiCheckboxProps['required'];
10
- indeterminate?: MuiCheckboxProps['indeterminate'];
11
- onChange?: MuiCheckboxProps['onChange'];
12
- onChangeCapture?: MuiCheckboxProps['onChangeCapture'];
13
- label?: string;
14
- inputProps?: MuiCheckboxProps['inputProps'];
15
- inputRef?: MuiCheckboxProps['inputRef'];
16
- }
@@ -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;