@m4l/graphics 0.1.17 → 0.1.19

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 (183) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.cjs +118 -0
  3. package/.gitignore +24 -0
  4. package/.gitlab-ci.yml +15 -0
  5. package/.prettierignore +3 -0
  6. package/.prettierrc.json +26 -0
  7. package/.vscode/settings.json +50 -0
  8. package/{contexts/FormatterContext/index.0a135b60.js → dist/contexts/FormatterContext/index.92336f4c.js} +23 -23
  9. package/{contexts → dist/contexts}/FormatterContext/types.d.ts +1 -1
  10. package/{contexts/LocalesContext/index.3fcfbe02.js → dist/contexts/LocalesContext/index.5b555637.js} +22 -22
  11. package/dist/contexts/index.2f4a4040.js +4 -0
  12. package/{hooks/index.54438d3f.js → dist/hooks/index.c13bc37e.js} +2 -2
  13. package/{hooks/useFormatter/index.6463a320.js → dist/hooks/useFormatter/index.57ac8cca.js} +1 -1
  14. package/{hooks/useLocales/index.8154a401.js → dist/hooks/useLocales/index.f676279e.js} +1 -1
  15. package/{index.d.ts → dist/index.d.ts} +1 -0
  16. package/dist/index.js +55 -0
  17. package/dist/package.json +34 -0
  18. package/dist/theme/breakpoints.d.ts +10 -0
  19. package/{theme/defaultThemeOptions.9b9e7503.js → dist/theme/defaultThemeOptions.b2cdbe59.js} +11 -9
  20. package/{theme/typography.f5eadf47.js → dist/theme/typography.63fff3ec.js} +1 -1
  21. package/dist/utils/anchorEl.d.ts +13 -0
  22. package/dist/utils/index.7ab4fc54.js +159 -0
  23. package/dist/vendor.3b4b3674.js +27 -0
  24. package/package.json +49 -7
  25. package/src/components/ProgressBarStyle/index.tsx +39 -0
  26. package/src/components/index.ts +3 -0
  27. package/src/contexts/FormatterContext/index.tsx +131 -0
  28. package/src/contexts/FormatterContext/types.ts +73 -0
  29. package/src/contexts/HostThemeContext/index.tsx +85 -0
  30. package/src/contexts/HostThemeContext/types.ts +16 -0
  31. package/src/contexts/LocalesContext/helper.ts +67 -0
  32. package/src/contexts/LocalesContext/index.tsx +152 -0
  33. package/src/contexts/LocalesContext/types.ts +37 -0
  34. package/src/contexts/index.ts +15 -0
  35. package/src/hooks/index.ts +8 -0
  36. package/src/hooks/useFirstRender/index.ts +17 -0
  37. package/src/hooks/useFormatter/index.ts +10 -0
  38. package/src/hooks/useHostTheme/index.ts +10 -0
  39. package/src/hooks/useIsMountedRef/index.ts +16 -0
  40. package/src/hooks/useLocales/index.ts +10 -0
  41. package/src/hooks/useOffSetTop.ts +26 -0
  42. package/src/hooks/useResponsive/index.ts +44 -0
  43. package/src/index.ts +25 -0
  44. package/src/theme/breakpoints.ts +13 -0
  45. package/src/theme/defaultThemeOptions.ts +42 -0
  46. package/src/theme/overrides/Accordion.ts +85 -0
  47. package/src/theme/overrides/Alert.tsx +74 -0
  48. package/src/theme/overrides/Autocomplete.ts +31 -0
  49. package/src/theme/overrides/Avatar.ts +29 -0
  50. package/src/theme/overrides/Backdrop.ts +26 -0
  51. package/src/theme/overrides/Badge.ts +17 -0
  52. package/src/theme/overrides/Breadcrumbs.ts +16 -0
  53. package/src/theme/overrides/Button.ts +62 -0
  54. package/src/theme/overrides/ButtonGroup.ts +51 -0
  55. package/src/theme/overrides/Card.ts +36 -0
  56. package/src/theme/overrides/Checkbox.tsx +54 -0
  57. package/src/theme/overrides/Chip.tsx +49 -0
  58. package/src/theme/overrides/ControlLabel.ts +29 -0
  59. package/src/theme/overrides/CssBaseline.ts +46 -0
  60. package/src/theme/overrides/CustomIcons.tsx +122 -0
  61. package/src/theme/overrides/DataGrid.ts +101 -0
  62. package/src/theme/overrides/Dialog.ts +60 -0
  63. package/src/theme/overrides/Drawer.ts +30 -0
  64. package/src/theme/overrides/Fab.ts +40 -0
  65. package/src/theme/overrides/IconButton.ts +35 -0
  66. package/src/theme/overrides/Input.ts +94 -0
  67. package/src/theme/overrides/InputLabel.ts +17 -0
  68. package/src/theme/overrides/Link.ts +20 -0
  69. package/src/theme/overrides/List.ts +37 -0
  70. package/src/theme/overrides/LoadingButton.ts +28 -0
  71. package/src/theme/overrides/Menu.ts +20 -0
  72. package/src/theme/overrides/Pagination.ts +38 -0
  73. package/src/theme/overrides/Paper.ts +27 -0
  74. package/src/theme/overrides/Popover.ts +16 -0
  75. package/src/theme/overrides/Progress.ts +27 -0
  76. package/src/theme/overrides/Radio.ts +21 -0
  77. package/src/theme/overrides/Rating.tsx +30 -0
  78. package/src/theme/overrides/Select.tsx +14 -0
  79. package/src/theme/overrides/Skeleton.ts +19 -0
  80. package/src/theme/overrides/Slider.ts +31 -0
  81. package/src/theme/overrides/Stepper.ts +15 -0
  82. package/src/theme/overrides/SvgIcon.ts +21 -0
  83. package/src/theme/overrides/Switch.ts +35 -0
  84. package/src/theme/overrides/Table.ts +95 -0
  85. package/src/theme/overrides/Tabs.ts +61 -0
  86. package/src/theme/overrides/Timeline.ts +23 -0
  87. package/src/theme/overrides/ToggleButton.ts +54 -0
  88. package/src/theme/overrides/Tooltip.ts +20 -0
  89. package/src/theme/overrides/TreeView.tsx +25 -0
  90. package/src/theme/overrides/Typography.ts +18 -0
  91. package/src/theme/overrides/index.ts +102 -0
  92. package/src/theme/palette.ts +216 -0
  93. package/src/theme/shadows.ts +110 -0
  94. package/src/theme/stretch.ts +10 -0
  95. package/src/theme/typography.ts +91 -0
  96. package/src/types/index.ts +9 -0
  97. package/src/utils/anchorEl.ts +146 -0
  98. package/src/utils/getColorPresets.ts +91 -0
  99. package/src/utils/getFontValue.ts +73 -0
  100. package/src/utils/strings.ts +1 -0
  101. package/src/vite-env.d.ts +1 -0
  102. package/tsconfig.json +29 -0
  103. package/tsconfig.node.json +8 -0
  104. package/vite.config.ts +234 -0
  105. package/contexts/index.78a814ce.js +0 -4
  106. package/index.js +0 -53
  107. package/utils/index.d8b24456.js +0 -107
  108. /package/{components → dist/components}/ProgressBarStyle/index.d.ts +0 -0
  109. /package/{components → dist/components}/ProgressBarStyle/index.fb6fd9ed.js +0 -0
  110. /package/{components → dist/components}/index.80514d59.js +0 -0
  111. /package/{components → dist/components}/index.d.ts +0 -0
  112. /package/{contexts → dist/contexts}/FormatterContext/index.d.ts +0 -0
  113. /package/{contexts → dist/contexts}/HostThemeContext/index.a6a62c70.js +0 -0
  114. /package/{contexts → dist/contexts}/HostThemeContext/index.d.ts +0 -0
  115. /package/{contexts → dist/contexts}/HostThemeContext/types.d.ts +0 -0
  116. /package/{contexts → dist/contexts}/LocalesContext/helper.d.ts +0 -0
  117. /package/{contexts → dist/contexts}/LocalesContext/index.d.ts +0 -0
  118. /package/{contexts → dist/contexts}/LocalesContext/types.d.ts +0 -0
  119. /package/{contexts → dist/contexts}/index.d.ts +0 -0
  120. /package/{hooks → dist/hooks}/index.d.ts +0 -0
  121. /package/{hooks → dist/hooks}/useFirstRender/index.1e9b02fb.js +0 -0
  122. /package/{hooks → dist/hooks}/useFirstRender/index.d.ts +0 -0
  123. /package/{hooks → dist/hooks}/useFormatter/index.d.ts +0 -0
  124. /package/{hooks → dist/hooks}/useHostTheme/index.1c8e4ad7.js +0 -0
  125. /package/{hooks → dist/hooks}/useHostTheme/index.d.ts +0 -0
  126. /package/{hooks → dist/hooks}/useIsMountedRef/index.d.ts +0 -0
  127. /package/{hooks → dist/hooks}/useLocales/index.d.ts +0 -0
  128. /package/{hooks → dist/hooks}/useOffSetTop.d.ts +0 -0
  129. /package/{hooks → dist/hooks}/useResponsive/index.d.ts +0 -0
  130. /package/{hooks → dist/hooks}/useResponsive/index.fc5e1b4f.js +0 -0
  131. /package/{theme → dist/theme}/defaultThemeOptions.d.ts +0 -0
  132. /package/{theme → dist/theme}/overrides/Accordion.d.ts +0 -0
  133. /package/{theme → dist/theme}/overrides/Autocomplete.d.ts +0 -0
  134. /package/{theme → dist/theme}/overrides/Avatar.d.ts +0 -0
  135. /package/{theme → dist/theme}/overrides/Backdrop.d.ts +0 -0
  136. /package/{theme → dist/theme}/overrides/Badge.d.ts +0 -0
  137. /package/{theme → dist/theme}/overrides/Breadcrumbs.d.ts +0 -0
  138. /package/{theme → dist/theme}/overrides/Button.d.ts +0 -0
  139. /package/{theme → dist/theme}/overrides/ButtonGroup.d.ts +0 -0
  140. /package/{theme → dist/theme}/overrides/Card.d.ts +0 -0
  141. /package/{theme → dist/theme}/overrides/Checkbox.d.ts +0 -0
  142. /package/{theme → dist/theme}/overrides/ControlLabel.d.ts +0 -0
  143. /package/{theme → dist/theme}/overrides/CssBaseline.d.ts +0 -0
  144. /package/{theme → dist/theme}/overrides/DataGrid.d.ts +0 -0
  145. /package/{theme → dist/theme}/overrides/Dialog.d.ts +0 -0
  146. /package/{theme → dist/theme}/overrides/Drawer.d.ts +0 -0
  147. /package/{theme → dist/theme}/overrides/Fab.d.ts +0 -0
  148. /package/{theme → dist/theme}/overrides/IconButton.d.ts +0 -0
  149. /package/{theme → dist/theme}/overrides/Input.d.ts +0 -0
  150. /package/{theme → dist/theme}/overrides/InputLabel.d.ts +0 -0
  151. /package/{theme → dist/theme}/overrides/Link.d.ts +0 -0
  152. /package/{theme → dist/theme}/overrides/List.d.ts +0 -0
  153. /package/{theme → dist/theme}/overrides/LoadingButton.d.ts +0 -0
  154. /package/{theme → dist/theme}/overrides/Menu.d.ts +0 -0
  155. /package/{theme → dist/theme}/overrides/Pagination.d.ts +0 -0
  156. /package/{theme → dist/theme}/overrides/Paper.d.ts +0 -0
  157. /package/{theme → dist/theme}/overrides/Popover.d.ts +0 -0
  158. /package/{theme → dist/theme}/overrides/Progress.d.ts +0 -0
  159. /package/{theme → dist/theme}/overrides/Radio.d.ts +0 -0
  160. /package/{theme → dist/theme}/overrides/Skeleton.d.ts +0 -0
  161. /package/{theme → dist/theme}/overrides/Slider.d.ts +0 -0
  162. /package/{theme → dist/theme}/overrides/Stepper.d.ts +0 -0
  163. /package/{theme → dist/theme}/overrides/SvgIcon.d.ts +0 -0
  164. /package/{theme → dist/theme}/overrides/Switch.d.ts +0 -0
  165. /package/{theme → dist/theme}/overrides/Table.d.ts +0 -0
  166. /package/{theme → dist/theme}/overrides/Tabs.d.ts +0 -0
  167. /package/{theme → dist/theme}/overrides/Timeline.d.ts +0 -0
  168. /package/{theme → dist/theme}/overrides/ToggleButton.d.ts +0 -0
  169. /package/{theme → dist/theme}/overrides/Tooltip.d.ts +0 -0
  170. /package/{theme → dist/theme}/overrides/Typography.d.ts +0 -0
  171. /package/{theme → dist/theme}/overrides/index.d.ts +0 -0
  172. /package/{theme → dist/theme}/overrides.7958c0ab.js +0 -0
  173. /package/{theme → dist/theme}/palette.2baf72f5.js +0 -0
  174. /package/{theme → dist/theme}/palette.d.ts +0 -0
  175. /package/{theme → dist/theme}/shadows.bf8dc290.js +0 -0
  176. /package/{theme → dist/theme}/shadows.d.ts +0 -0
  177. /package/{theme → dist/theme}/stretch.d.ts +0 -0
  178. /package/{theme → dist/theme}/typography.d.ts +0 -0
  179. /package/{types → dist/types}/index.d.ts +0 -0
  180. /package/{utils → dist/utils}/getColorPresets.d.ts +0 -0
  181. /package/{utils → dist/utils}/getFontValue.d.ts +0 -0
  182. /package/{utils → dist/utils}/strings.d.ts +0 -0
  183. /package/{vite-env.d.ts → dist/vite-env.d.ts} +0 -0
@@ -0,0 +1,26 @@
1
+ import { alpha, Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function Backdrop(theme: Theme) {
6
+ const varLow = alpha(theme.palette.grey[900], 0.48);
7
+ const varHigh = alpha(theme.palette.grey[900], 1);
8
+
9
+ return {
10
+ MuiBackdrop: {
11
+ styleOverrides: {
12
+ root: {
13
+ background: [
14
+ `rgb(22,28,36)`,
15
+ `-moz-linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`,
16
+ `-webkit-linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`,
17
+ `linear-gradient(75deg, ${varLow} 0%, ${varHigh} 100%)`,
18
+ ],
19
+ '&.MuiBackdrop-invisible': {
20
+ background: 'transparent',
21
+ },
22
+ },
23
+ },
24
+ },
25
+ };
26
+ }
@@ -0,0 +1,17 @@
1
+ // ----------------------------------------------------------------------
2
+ import { Theme } from '@mui/material/styles';
3
+
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ export default function Badge(_theme: Theme) {
6
+ return {
7
+ MuiBadge: {
8
+ styleOverrides: {
9
+ dot: {
10
+ width: 10,
11
+ height: 10,
12
+ borderRadius: '50%',
13
+ },
14
+ },
15
+ },
16
+ };
17
+ }
@@ -0,0 +1,16 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function Breadcrumbs(theme: Theme) {
6
+ return {
7
+ MuiBreadcrumbs: {
8
+ styleOverrides: {
9
+ separator: {
10
+ marginLeft: theme.spacing(2),
11
+ marginRight: theme.spacing(2),
12
+ },
13
+ },
14
+ },
15
+ };
16
+ }
@@ -0,0 +1,62 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function Button(theme: Theme) {
6
+ return {
7
+ MuiButton: {
8
+ styleOverrides: {
9
+ root: {
10
+ textTransform: 'capitalize',
11
+ '&:hover': {
12
+ boxShadow: 'none',
13
+ },
14
+ },
15
+ sizeLarge: {
16
+ height: 48,
17
+ },
18
+
19
+ // contained
20
+ containedInherit: {
21
+ color: theme.palette.grey[800],
22
+ boxShadow: theme.customShadows.z1,
23
+ '&:hover': {
24
+ backgroundColor: theme.palette.grey[400],
25
+ },
26
+ },
27
+ containedPrimary: {
28
+ boxShadow: theme.customShadows.z24,
29
+ // color: theme.palette.primary.contrastText,
30
+ },
31
+ containedSecondary: {
32
+ boxShadow: theme.customShadows.secondary,
33
+ },
34
+ containedInfo: {
35
+ boxShadow: theme.customShadows.info,
36
+ },
37
+ containedSuccess: {
38
+ boxShadow: theme.customShadows.success,
39
+ },
40
+ containedWarning: {
41
+ boxShadow: theme.customShadows.warning,
42
+ },
43
+ containedError: {
44
+ boxShadow: theme.customShadows.error,
45
+ },
46
+ // outlined
47
+
48
+ outlinedInherit: {
49
+ border: `1px solid ${theme.palette.grey[500_32]}`,
50
+ '&:hover': {
51
+ backgroundColor: theme.palette.action.hover,
52
+ },
53
+ },
54
+ textInherit: {
55
+ '&:hover': {
56
+ backgroundColor: theme.palette.action.hover,
57
+ },
58
+ },
59
+ },
60
+ },
61
+ };
62
+ }
@@ -0,0 +1,51 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function ButtonGroup(theme: Theme) {
6
+ const styleContained = (
7
+ color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error',
8
+ ) => ({
9
+ props: { variant: 'contained', color },
10
+ style: { boxShadow: theme.customShadows[color] },
11
+ });
12
+
13
+ return {
14
+ MuiButtonGroup: {
15
+ variants: [
16
+ {
17
+ props: { variant: 'contained', color: 'inherit' },
18
+ style: { boxShadow: theme.customShadows.z8 },
19
+ },
20
+ styleContained('primary'),
21
+ styleContained('secondary'),
22
+ styleContained('info'),
23
+ styleContained('success'),
24
+ styleContained('warning'),
25
+ styleContained('error'),
26
+
27
+ {
28
+ props: { disabled: true },
29
+ style: {
30
+ boxShadow: 'none',
31
+ '& .MuiButtonGroup-grouped.Mui-disabled': {
32
+ color: theme.palette.action.disabled,
33
+ borderColor: `${theme.palette.action.disabledBackground} !important`,
34
+ '&.MuiButton-contained': {
35
+ backgroundColor: theme.palette.action.disabledBackground,
36
+ },
37
+ },
38
+ },
39
+ },
40
+ ],
41
+
42
+ styleOverrides: {
43
+ root: {
44
+ '&:hover': {
45
+ boxShadow: 'none',
46
+ },
47
+ },
48
+ },
49
+ },
50
+ };
51
+ }
@@ -0,0 +1,36 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function Card(theme: Theme) {
6
+ return {
7
+ MuiCard: {
8
+ styleOverrides: {
9
+ root: {
10
+ position: 'relative',
11
+ boxShadow: theme.customShadows.card,
12
+ borderRadius: Number(theme.shape.borderRadius) * 2,
13
+ zIndex: 0, // Fix Safari overflow: hidden with border radius
14
+ },
15
+ },
16
+ },
17
+ MuiCardHeader: {
18
+ defaultProps: {
19
+ titleTypographyProps: { variant: 'h6' },
20
+ subheaderTypographyProps: { variant: 'body2', marginTop: theme.spacing(0.5) },
21
+ },
22
+ styleOverrides: {
23
+ root: {
24
+ padding: theme.spacing(3, 3, 0),
25
+ },
26
+ },
27
+ },
28
+ MuiCardContent: {
29
+ styleOverrides: {
30
+ root: {
31
+ padding: theme.spacing(3),
32
+ },
33
+ },
34
+ },
35
+ };
36
+ }
@@ -0,0 +1,54 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ //
3
+
4
+ // ----------------------------------------------------------------------
5
+
6
+ export default function Checkbox(theme: Theme) {
7
+ return {
8
+ MuiCheckbox: {
9
+ // defaultProps: {
10
+ // icon: <CheckboxIcon />,
11
+ // checkedIcon: <CheckboxCheckedIcon />,
12
+ // indeterminateIcon: <CheckboxIndeterminateIcon />,
13
+ // },
14
+
15
+ styleOverrides: {
16
+ root: {
17
+ padding: theme.spacing(1),
18
+
19
+ oleee: 'sss',
20
+ // '& .MuiCheckbox-root': {
21
+ // color: theme.palette.divider,
22
+ // },
23
+ color: theme.palette.action.active,
24
+ '& .Mui-checked': {
25
+ color: theme.palette.primary.main,
26
+ },
27
+ '&.Mui-checked.Mui-disabled, &.Mui-disabled': {
28
+ color: theme.palette.action.disabled,
29
+ },
30
+
31
+ // '& .MuiSvgIcon-root': {
32
+ // color: theme.palette.text.secondary,
33
+ // },
34
+
35
+ // '& .MuiSvgIcon-fontSizeMedium': {
36
+ // width: 24,
37
+ // height: 24,
38
+ // },
39
+ // '& .MuiSvgIcon-fontSizeSmall': {
40
+ // width: 18,
41
+ // height: 18,
42
+ // },
43
+
44
+ // svg: {
45
+ // fontSize: 24,
46
+ // '&[font-size=small]': {
47
+ // fontSize: 18,
48
+ // },
49
+ // },
50
+ },
51
+ },
52
+ },
53
+ };
54
+ }
@@ -0,0 +1,49 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ //
3
+ import { CloseIcon } from './CustomIcons';
4
+
5
+ // ----------------------------------------------------------------------
6
+
7
+ export default function Chip(theme: Theme) {
8
+ return {
9
+ MuiChip: {
10
+ defaultProps: {
11
+ deleteIcon: <CloseIcon />,
12
+ },
13
+
14
+ styleOverrides: {
15
+ colorDefault: {
16
+ '& .MuiChip-avatarMedium, .MuiChip-avatarSmall': {
17
+ color: theme.palette.text.secondary,
18
+ },
19
+ },
20
+ outlined: {
21
+ borderColor: theme.palette.grey[500_32],
22
+ '&.MuiChip-colorPrimary': {
23
+ borderColor: theme.palette.primary.main,
24
+ },
25
+ '&.MuiChip-colorSecondary': {
26
+ borderColor: theme.palette.secondary.main,
27
+ },
28
+ },
29
+ //
30
+ avatarColorInfo: {
31
+ color: theme.palette.info.contrastText,
32
+ backgroundColor: theme.palette.info.dark,
33
+ },
34
+ avatarColorSuccess: {
35
+ color: theme.palette.success.contrastText,
36
+ backgroundColor: theme.palette.success.dark,
37
+ },
38
+ avatarColorWarning: {
39
+ color: theme.palette.warning.contrastText,
40
+ backgroundColor: theme.palette.warning.dark,
41
+ },
42
+ avatarColorError: {
43
+ color: theme.palette.error.contrastText,
44
+ backgroundColor: theme.palette.error.dark,
45
+ },
46
+ },
47
+ },
48
+ };
49
+ }
@@ -0,0 +1,29 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function ControlLabel(theme: Theme) {
6
+ return {
7
+ MuiFormControlLabel: {
8
+ styleOverrides: {
9
+ label: {
10
+ ...theme.typography.body1,
11
+ },
12
+ },
13
+ },
14
+ MuiFormHelperText: {
15
+ styleOverrides: {
16
+ root: {
17
+ marginTop: theme.spacing(1),
18
+ },
19
+ },
20
+ },
21
+ MuiFormLabel: {
22
+ styleOverrides: {
23
+ root: {
24
+ color: theme.palette.text.disabled,
25
+ },
26
+ },
27
+ },
28
+ };
29
+ }
@@ -0,0 +1,46 @@
1
+ // ----------------------------------------------------------------------
2
+ import { Theme } from '@mui/material/styles';
3
+
4
+ export default function CssBaseline(_theme: Theme) {
5
+ return {
6
+ MuiCssBaseline: {
7
+ styleOverrides: {
8
+ '*': {
9
+ margin: 0,
10
+ padding: 0,
11
+ boxSizing: 'border-box',
12
+ },
13
+ html: {
14
+ width: '100%',
15
+ height: '100%',
16
+ WebkitOverflowScrolling: 'touch',
17
+ },
18
+ body: {
19
+ width: '100%',
20
+ height: '100%',
21
+ },
22
+ '#root': {
23
+ width: '100%',
24
+ height: '100%',
25
+ },
26
+ input: {
27
+ '&[type=number]': {
28
+ MozAppearance: 'textfield',
29
+ '&::-webkit-outer-spin-button': {
30
+ margin: 0,
31
+ WebkitAppearance: 'none',
32
+ },
33
+ '&::-webkit-inner-spin-button': {
34
+ margin: 0,
35
+ WebkitAppearance: 'none',
36
+ },
37
+ },
38
+ },
39
+ img: {
40
+ display: 'block',
41
+ maxWidth: '100%',
42
+ },
43
+ },
44
+ },
45
+ };
46
+ }
@@ -0,0 +1,122 @@
1
+ // @mui
2
+ import { SvgIcon, SvgIconProps } from '@mui/material';
3
+
4
+ // ----------------------------------------------------------------------
5
+
6
+ // CloseIcon
7
+ export function CloseIcon(props: SvgIconProps) {
8
+ return (
9
+ <SvgIcon {...props}>
10
+ <path d="M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L12,10.59 L13.29,9.29 C13.6821222,8.89787783 14.3178778,8.89787783 14.71,9.29 C15.1021222,9.68212217 15.1021222,10.3178778 14.71,10.71 L13.41,12 L14.71,13.29 Z" />
11
+ </SvgIcon>
12
+ );
13
+ }
14
+
15
+ // StarIcon
16
+ export function StarIcon(props: SvgIconProps) {
17
+ return (
18
+ <SvgIcon {...props}>
19
+ <path d="M17.56,21 C17.4000767,21.0006435 17.2423316,20.9629218 17.1,20.89 L12,18.22 L6.9,20.89 C6.56213339,21.067663 6.15259539,21.0374771 5.8444287,20.8121966 C5.53626201,20.5869161 5.38323252,20.2058459 5.45,19.83 L6.45,14.2 L2.33,10.2 C2.06805623,9.93860108 1.9718844,9.55391377 2.08,9.2 C2.19824414,8.83742187 2.51242293,8.57366684 2.89,8.52 L8.59,7.69 L11.1,2.56 C11.2670864,2.21500967 11.6166774,1.99588989 12,1.99588989 C12.3833226,1.99588989 12.7329136,2.21500967 12.9,2.56 L15.44,7.68 L21.14,8.51 C21.5175771,8.56366684 21.8317559,8.82742187 21.95,9.19 C22.0581156,9.54391377 21.9619438,9.92860108 21.7,10.19 L17.58,14.19 L18.58,19.82 C18.652893,20.2027971 18.4967826,20.5930731 18.18,20.82 C17.9989179,20.9468967 17.7808835,21.010197 17.56,21 L17.56,21 Z" />
20
+ </SvgIcon>
21
+ );
22
+ }
23
+
24
+ // Using for Alert
25
+ export function InfoIcon(props: SvgIconProps) {
26
+ return (
27
+ <SvgIcon {...props}>
28
+ <path d="M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M13,16 C13,16.5522847 12.5522847,17 12,17 C11.4477153,17 11,16.5522847 11,16 L11,11 C11,10.4477153 11.4477153,10 12,10 C12.5522847,10 13,10.4477153 13,11 L13,16 Z M12,9 C11.4477153,9 11,8.55228475 11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 C13,8.55228475 12.5522847,9 12,9 Z" />
29
+ </SvgIcon>
30
+ );
31
+ }
32
+
33
+ export function WarningIcon(props: SvgIconProps) {
34
+ return (
35
+ <SvgIcon {...props}>
36
+ <path d="M22.56,16.3 L14.89,3.58 C14.2597186,2.59400001 13.1702353,1.99737652 12,1.99737652 C10.8297647,1.99737652 9.74028139,2.59400001 9.11,3.58 L1.44,16.3 C0.888546003,17.2192471 0.869485343,18.3628867 1.39,19.3 C1.99197363,20.3551378 3.11522982,21.0046397 4.33,21 L19.67,21 C20.8765042,21.0128744 21.9978314,20.3797441 22.61,19.34 C23.146086,18.3926382 23.1269508,17.2292197 22.56,16.3 L22.56,16.3 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,9 C11,8.44771525 11.4477153,8 12,8 C12.5522847,8 13,8.44771525 13,9 L13,13 Z" />
37
+ </SvgIcon>
38
+ );
39
+ }
40
+
41
+ export function SuccessIcon(props: SvgIconProps) {
42
+ return (
43
+ <SvgIcon {...props}>
44
+ <path d="M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M16.3,9.61 L11.73,15.61 C11.5412074,15.855247 11.2494966,15.9992561 10.94,16.0000145 C10.6322197,16.001658 10.3408221,15.861492 10.15,15.62 L7.71,12.51 C7.49028166,12.2277602 7.43782669,11.8497415 7.57239438,11.5183399 C7.70696206,11.1869384 8.00810836,10.9525017 8.36239438,10.9033399 C8.7166804,10.8541782 9.07028166,10.9977602 9.29,11.28 L10.92,13.36 L14.7,8.36 C14.917932,8.07418751 15.2717886,7.92635122 15.6282755,7.97217964 C15.9847624,8.01800806 16.2897207,8.25053875 16.4282755,8.58217966 C16.5668304,8.91382056 16.517932,9.29418753 16.3,9.58 L16.3,9.61 Z" />
45
+ </SvgIcon>
46
+ );
47
+ }
48
+
49
+ export function ErrorIcon(props: SvgIconProps) {
50
+ return (
51
+ <SvgIcon {...props}>
52
+ <path d="M12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 C17.5228475,22 22,17.5228475 22,12 C22,9.3478351 20.9464316,6.80429597 19.0710678,4.92893219 C17.195704,3.0535684 14.6521649,2 12,2 Z M12,17 C11.4477153,17 11,16.5522847 11,16 C11,15.4477153 11.4477153,15 12,15 C12.5522847,15 13,15.4477153 13,16 C13,16.5522847 12.5522847,17 12,17 Z M13,13 C13,13.5522847 12.5522847,14 12,14 C11.4477153,14 11,13.5522847 11,13 L11,8 C11,7.44771525 11.4477153,7 12,7 C12.5522847,7 13,7.44771525 13,8 L13,13 Z" />
53
+ </SvgIcon>
54
+ );
55
+ }
56
+
57
+ // Using for Checkbox
58
+ export function CheckboxIcon(props: SvgIconProps) {
59
+ return (
60
+ <SvgIcon {...props}>
61
+ <path d="M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm0 2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2z" />
62
+ </SvgIcon>
63
+ );
64
+ }
65
+
66
+ export function CheckboxCheckedIcon(props: SvgIconProps) {
67
+ return (
68
+ <SvgIcon {...props}>
69
+ <path d="M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.372 4.972a1.006 1.006 0 00-.928.388l-3.78 5-1.63-2.08a1.001 1.001 0 00-1.58 1.23l2.44 3.11a1 1 0 001.58-.01l4.57-6v-.03a1.006 1.006 0 00-.672-1.608z" />
70
+ </SvgIcon>
71
+ );
72
+ }
73
+
74
+ export function CheckboxIndeterminateIcon(props: SvgIconProps) {
75
+ return (
76
+ <SvgIcon {...props}>
77
+ <path d="M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z" />
78
+ </SvgIcon>
79
+ );
80
+ }
81
+
82
+ // Using for Select Input
83
+ export function InputSelectIcon(props: SvgIconProps) {
84
+ return (
85
+ <SvgIcon
86
+ {...props}
87
+ sx={{
88
+ right: 12,
89
+ fontSize: 16,
90
+ position: 'absolute',
91
+ pointerEvents: 'none',
92
+ }}
93
+ >
94
+ <path d="M12,16 C11.7663478,16.0004565 11.5399121,15.9190812 11.36,15.77 L5.36,10.77 C4.93474074,10.4165378 4.87653776,9.78525926 5.23,9.36 C5.58346224,8.93474074 6.21474074,8.87653776 6.64,9.23 L12,13.71 L17.36,9.39 C17.5665934,9.2222295 17.8315409,9.14373108 18.0961825,9.17188444 C18.3608241,9.2000378 18.6033268,9.33252029 18.77,9.54 C18.9551341,9.74785947 19.0452548,10.0234772 19.0186853,10.3005589 C18.9921158,10.5776405 18.8512608,10.8311099 18.63,11 L12.63,15.83 C12.444916,15.955516 12.2231011,16.0153708 12,16 Z" />
95
+ </SvgIcon>
96
+ );
97
+ }
98
+
99
+ // Using for TreeView
100
+ export function TreeViewCollapseIcon(props: SvgIconProps) {
101
+ return (
102
+ <SvgIcon {...props}>
103
+ <path d="M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M12,8 C12.5522847,8 13,8.44771525 13,9 L13,9 L13,11 L15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L13,13 L13,15 C13,15.5522847 12.5522847,16 12,16 C11.4477153,16 11,15.5522847 11,15 L11,15 L11,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 L11,11 L11,9 C11,8.44771525 11.4477153,8 12,8 Z" />
104
+ </SvgIcon>
105
+ );
106
+ }
107
+
108
+ export function TreeViewExpandIcon(props: SvgIconProps) {
109
+ return (
110
+ <SvgIcon {...props}>
111
+ <path d="M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M15,11 C15.5522847,11 16,11.4477153 16,12 C16,12.5522847 15.5522847,13 15,13 L15,13 L9,13 C8.44771525,13 8,12.5522847 8,12 C8,11.4477153 8.44771525,11 9,11 L9,11 Z" />
112
+ </SvgIcon>
113
+ );
114
+ }
115
+
116
+ export function TreeViewEndIcon(props: SvgIconProps) {
117
+ return (
118
+ <SvgIcon {...props}>
119
+ <path d="M18,3 C19.6568542,3 21,4.34314575 21,6 L21,6 L21,18 C21,19.6568542 19.6568542,21 18,21 L18,21 L6,21 C4.34314575,21 3,19.6568542 3,18 L3,18 L3,6 C3,4.34314575 4.34314575,3 6,3 L6,3 Z M18,5 L6,5 C5.44771525,5 5,5.44771525 5,6 L5,6 L5,18 C5,18.5522847 5.44771525,19 6,19 L6,19 L18,19 C18.5522847,19 19,18.5522847 19,18 L19,18 L19,6 C19,5.44771525 18.5522847,5 18,5 L18,5 Z M14,8.99420168 C14.2666375,8.99420168 14.5222334,9.10068735 14.71,9.29 C14.8993127,9.4777666 15.0057983,9.73336246 15.0057983,10 C15.0057983,10.2666375 14.8993127,10.5222334 14.71,10.71 L14.71,10.71 L13.41,12 L14.71,13.29 C14.8993127,13.4777666 15.0057983,13.7333625 15.0057983,14 C15.0057983,14.2666375 14.8993127,14.5222334 14.71,14.71 C14.5222334,14.8993127 14.2666375,15.0057983 14,15.0057983 C13.7333625,15.0057983 13.4777666,14.8993127 13.29,14.71 L13.29,14.71 L12,13.41 L10.71,14.71 C10.5222334,14.8993127 10.2666375,15.0057983 10,15.0057983 C9.73336246,15.0057983 9.4777666,14.8993127 9.29,14.71 C9.10068735,14.5222334 8.99420168,14.2666375 8.99420168,14 C8.99420168,13.7333625 9.10068735,13.4777666 9.29,13.29 L9.29,13.29 L10.59,12 L9.29,10.71 C8.89787783,10.3178778 8.89787783,9.68212217 9.29,9.29 C9.68212217,8.89787783 10.3178778,8.89787783 10.71,9.29 L10.71,9.29 L12,10.59 L13.29,9.29 C13.4777666,9.10068735 13.7333625,8.99420168 14,8.99420168 Z" />
120
+ </SvgIcon>
121
+ );
122
+ }
@@ -0,0 +1,101 @@
1
+ import { Theme } from '@mui/material/styles';
2
+
3
+ // ----------------------------------------------------------------------
4
+
5
+ export default function DataGrid(theme: Theme) {
6
+ return {
7
+ MuiDataGrid: {
8
+ styleOverrides: {
9
+ root: {
10
+ borderRadius: 0,
11
+ border: `1px solid transparent`,
12
+ '& .MuiTablePagination-root': {
13
+ borderTop: 0,
14
+ },
15
+ '& .MuiDataGrid-toolbarContainer': {
16
+ padding: theme.spacing(2),
17
+ backgroundColor: theme.palette.background.neutral,
18
+ '& .MuiButton-root': {
19
+ marginRight: theme.spacing(1.5),
20
+ color: theme.palette.text.primary,
21
+ '&:hover': {
22
+ backgroundColor: theme.palette.action.hover,
23
+ },
24
+ },
25
+ },
26
+ '& .MuiDataGrid-cell, .MuiDataGrid-columnsContainer': {
27
+ borderBottom: `1px solid ${theme.palette.divider}`,
28
+ },
29
+ '& .MuiDataGrid-columnSeparator': {
30
+ color: theme.palette.divider,
31
+ },
32
+ '& .MuiDataGrid-columnHeader[data-field="__check__"]': {
33
+ padding: 0,
34
+ },
35
+ },
36
+ },
37
+ },
38
+ MuiGridMenu: {
39
+ styleOverrides: {
40
+ root: {
41
+ '& .MuiDataGrid-gridMenuList': {
42
+ boxShadow: theme.customShadows.z20,
43
+ borderRadius: theme.shape.borderRadius,
44
+ },
45
+ '& .MuiMenuItem-root': {
46
+ ...theme.typography.body2,
47
+ },
48
+ },
49
+ },
50
+ },
51
+ MuiGridFilterForm: {
52
+ styleOverrides: {
53
+ root: {
54
+ padding: theme.spacing(1.5, 0),
55
+ '& .MuiFormControl-root': {
56
+ margin: theme.spacing(0, 0.5),
57
+ },
58
+ '& .MuiInput-root': {
59
+ marginTop: theme.spacing(3),
60
+ '&::before, &::after': {
61
+ display: 'none',
62
+ },
63
+ '& .MuiNativeSelect-select, .MuiInput-input': {
64
+ ...theme.typography.body2,
65
+ padding: theme.spacing(0.75, 1),
66
+ borderRadius: theme.shape.borderRadius,
67
+ backgroundColor: theme.palette.background.neutral,
68
+ },
69
+ '& .MuiSvgIcon-root': {
70
+ right: 4,
71
+ },
72
+ },
73
+ },
74
+ },
75
+ },
76
+ MuiGridPanelFooter: {
77
+ styleOverrides: {
78
+ root: {
79
+ padding: theme.spacing(2),
80
+ justifyContent: 'flex-end',
81
+ '& .MuiButton-root': {
82
+ '&:first-of-type': {
83
+ marginRight: theme.spacing(1.5),
84
+ color: theme.palette.text.primary,
85
+ '&:hover': {
86
+ backgroundColor: theme.palette.action.hover,
87
+ },
88
+ },
89
+ '&:last-of-type': {
90
+ color: theme.palette.common.white,
91
+ backgroundColor: theme.palette.primary.main,
92
+ '&:hover': {
93
+ backgroundColor: theme.palette.primary.dark,
94
+ },
95
+ },
96
+ },
97
+ },
98
+ },
99
+ },
100
+ };
101
+ }