@applica-software-guru/react-admin 1.0.41 → 1.0.43
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.
- package/bitbucket-pipelines.yml +2 -0
- package/dist/ApplicaAdmin.d.ts.map +1 -1
- package/dist/components/@extended/AnimateButton.d.ts +1 -1
- package/dist/components/@extended/AnimateButton.d.ts.map +1 -1
- package/dist/components/@extended/Avatar.d.ts.map +1 -1
- package/dist/components/@extended/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/@extended/IconButton.d.ts.map +1 -1
- package/dist/components/@extended/LoadingButton.d.ts.map +1 -1
- package/dist/components/@extended/Tooltip.d.ts.map +1 -1
- package/dist/components/@extended/Transitions.d.ts.map +1 -1
- package/dist/components/@extended/progress/CircularWithLabel.d.ts.map +1 -1
- package/dist/components/@extended/progress/CircularWithPath.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.d.ts +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavItem.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerHeader/index.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/MiniDrawerStyled.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/index.d.ts.map +1 -1
- package/dist/components/Layout/Footer.d.ts.map +1 -1
- package/dist/components/Layout/Header/AppBarStyled.d.ts.map +1 -1
- package/dist/components/Layout/Header/HeaderContent/Notification.d.ts.map +1 -1
- package/dist/components/Layout/Header/HeaderContent/NotificationItem.d.ts.map +1 -1
- package/dist/components/Layout/Header/HeaderContent/Profile.d.ts.map +1 -1
- package/dist/components/Layout/Header/HeaderContent/index.d.ts.map +1 -1
- package/dist/components/Layout/Header/index.d.ts.map +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/MenuPopover/styles.d.ts.map +1 -1
- package/dist/components/Notification.d.ts.map +1 -1
- package/dist/components/ScrollX.d.ts.map +1 -1
- package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
- package/dist/components/ra-fields/DateAgoField.d.ts.map +1 -1
- package/dist/components/ra-fields/ReadonlyField.d.ts.map +1 -1
- package/dist/components/ra-forms/CardForm.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/useFormRootPath.d.ts.map +1 -1
- package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
- package/dist/components/ra-lists/Empty.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/NotificationList.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts.map +1 -1
- package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts.map +1 -1
- package/dist/contexts/MenuConfigContext.d.ts.map +1 -1
- package/dist/contexts/MenuPropTypes.d.ts.map +1 -1
- package/dist/dev/useCliErrorCatcher.d.ts +1 -1
- package/dist/hooks/useMenu.d.ts.map +1 -1
- package/dist/i18n/useI18nCatcher.d.ts +1 -1
- package/dist/i18n/useI18nLanguages.d.ts +1 -1
- package/dist/i18n/useI18nLanguages.d.ts.map +1 -1
- package/dist/i18n/useI18nProvider.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +2 -1
- package/dist/react-admin.cjs.js.map +1 -0
- package/dist/react-admin.es.js +300 -784
- package/dist/react-admin.es.js.map +1 -0
- package/dist/react-admin.umd.js +2 -1
- package/dist/react-admin.umd.js.map +1 -0
- package/dist/themes/overrides/OutlinedInput.d.ts.map +1 -1
- package/dist/themes/palette.d.ts.map +1 -1
- package/dist/themes/theme/theme1.d.ts.map +1 -1
- package/dist/themes/theme/theme2.d.ts.map +1 -1
- package/dist/themes/theme/theme3.d.ts.map +1 -1
- package/dist/themes/theme/theme4.d.ts.map +1 -1
- package/dist/themes/theme/theme5.d.ts.map +1 -1
- package/dist/themes/theme/theme6.d.ts.map +1 -1
- package/dist/themes/theme/theme7.d.ts.map +1 -1
- package/dist/themes/theme/theme8.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/lang.d.ts +1 -1
- package/dist/utils/lang.d.ts.map +1 -1
- package/dist/utils/time.d.ts +2 -1
- package/dist/utils/time.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Admin.jsx +8 -8
- package/src/AdminContext.jsx +9 -9
- package/src/ApplicaAdmin.jsx +30 -35
- package/src/components/@extended/AnimateButton.jsx +25 -33
- package/src/components/@extended/Avatar.jsx +35 -42
- package/src/components/@extended/Breadcrumbs.jsx +62 -96
- package/src/components/@extended/Dot.jsx +14 -14
- package/src/components/@extended/IconButton.jsx +55 -65
- package/src/components/@extended/LoadingButton.jsx +84 -86
- package/src/components/@extended/Tooltip.jsx +24 -27
- package/src/components/@extended/Transitions.jsx +98 -107
- package/src/components/@extended/index.jsx +10 -10
- package/src/components/@extended/progress/CircularWithLabel.jsx +7 -9
- package/src/components/@extended/progress/CircularWithPath.jsx +9 -18
- package/src/components/@extended/progress/LinearWithIcon.jsx +5 -5
- package/src/components/@extended/progress/LinearWithLabel.jsx +5 -5
- package/src/components/@extended/progress/index.jsx +5 -5
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.jsx +112 -131
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.jsx +67 -88
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavItem.jsx +63 -79
- package/src/components/Layout/Drawer/DrawerContent/Navigation/index.jsx +28 -28
- package/src/components/Layout/Drawer/DrawerContent/index.jsx +7 -7
- package/src/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.jsx +13 -15
- package/src/components/Layout/Drawer/DrawerHeader/index.jsx +17 -22
- package/src/components/Layout/Drawer/HorizontalBar.jsx +17 -17
- package/src/components/Layout/Drawer/MiniDrawerStyled.jsx +27 -29
- package/src/components/Layout/Drawer/index.jsx +21 -24
- package/src/components/Layout/Footer.jsx +7 -12
- package/src/components/Layout/Header/AppBarStyled.jsx +26 -28
- package/src/components/Layout/Header/HeaderContent/MobileSection.jsx +27 -27
- package/src/components/Layout/Header/HeaderContent/Notification.jsx +34 -55
- package/src/components/Layout/Header/HeaderContent/NotificationItem.jsx +24 -36
- package/src/components/Layout/Header/HeaderContent/Profile.jsx +48 -73
- package/src/components/Layout/Header/HeaderContent/index.jsx +16 -18
- package/src/components/Layout/Header/index.jsx +25 -43
- package/src/components/Layout/index.jsx +36 -52
- package/src/components/Loadable.jsx +4 -4
- package/src/components/Loader.jsx +7 -7
- package/src/components/Logo.jsx +14 -14
- package/src/components/MainIcon.jsx +6 -6
- package/src/components/MenuPopover/MenuPopover.jsx +15 -15
- package/src/components/MenuPopover/getPosition.jsx +40 -40
- package/src/components/MenuPopover/index.jsx +3 -3
- package/src/components/MenuPopover/styles.jsx +20 -20
- package/src/components/Notification.jsx +7 -7
- package/src/components/ScrollTop.jsx +13 -13
- package/src/components/ScrollX.jsx +4 -4
- package/src/components/SmallIcon.jsx +6 -6
- package/src/components/ra-buttons/EditInDialogButton.jsx +39 -45
- package/src/components/ra-buttons/ImpersonateUserButton.jsx +20 -20
- package/src/components/ra-buttons/index.jsx +4 -4
- package/src/components/ra-fields/ActionsField.jsx +12 -12
- package/src/components/ra-fields/CoverField.jsx +20 -26
- package/src/components/ra-fields/DateAgoField.jsx +17 -20
- package/src/components/ra-fields/DateField.jsx +14 -14
- package/src/components/ra-fields/EmailField.jsx +14 -14
- package/src/components/ra-fields/FileField.jsx +23 -23
- package/src/components/ra-fields/FunctionField.jsx +5 -5
- package/src/components/ra-fields/ImageField.jsx +11 -11
- package/src/components/ra-fields/ReadonlyField.jsx +40 -42
- package/src/components/ra-fields/ReferenceManyField.jsx +21 -21
- package/src/components/ra-fields/SizeField.jsx +15 -15
- package/src/components/ra-fields/TextField.jsx +14 -14
- package/src/components/ra-fields/index.jsx +15 -15
- package/src/components/ra-forms/CardForm.jsx +34 -40
- package/src/components/ra-forms/LongForm/useFormRootPath.ts +8 -13
- package/src/components/ra-forms/TabbedForm.jsx +10 -10
- package/src/components/ra-forms/Toolbar.jsx +15 -15
- package/src/components/ra-forms/index.jsx +9 -9
- package/src/components/ra-inputs/AutocompleteArrayInput.jsx +7 -7
- package/src/components/ra-inputs/AutocompleteInput.jsx +9 -9
- package/src/components/ra-inputs/BooleanInput.jsx +19 -19
- package/src/components/ra-inputs/DateInput.jsx +13 -13
- package/src/components/ra-inputs/FileInput.jsx +33 -33
- package/src/components/ra-inputs/ImageInput.jsx +19 -19
- package/src/components/ra-inputs/NumberInput.jsx +13 -13
- package/src/components/ra-inputs/RecordInput.jsx +39 -39
- package/src/components/ra-inputs/ReferenceArrayInput.jsx +10 -10
- package/src/components/ra-inputs/ReferenceInput.jsx +10 -10
- package/src/components/ra-inputs/ReferenceManyInput.jsx +13 -24
- package/src/components/ra-inputs/SearchInput.jsx +6 -6
- package/src/components/ra-inputs/SelectArrayInput.jsx +19 -19
- package/src/components/ra-inputs/TimeInput.jsx +21 -21
- package/src/components/ra-lists/Empty.jsx +32 -37
- package/src/components/ra-lists/List.jsx +9 -9
- package/src/components/ra-lists/NotificationList/NotificationList.jsx +14 -16
- package/src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx +21 -25
- package/src/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.jsx +19 -19
- package/src/components/ra-lists/NotificationList/button/index.jsx +2 -2
- package/src/components/ra-lists/NotificationList/field/NotificationField.jsx +20 -31
- package/src/components/ra-lists/NotificationList/field/index.jsx +1 -1
- package/src/components/ra-lists/NotificationList/index.jsx +2 -2
- package/src/components/ra-lists/index.jsx +5 -5
- package/src/components/third-party/SimpleBar.jsx +10 -10
- package/src/components/third-party/index.jsx +2 -2
- package/src/contexts/MenuConfigContext.jsx +35 -35
- package/src/contexts/MenuPropTypes.jsx +7 -7
- package/src/contexts/index.jsx +5 -5
- package/src/dev/index.jsx +2 -2
- package/src/dev/useCliErrorCatcher.jsx +32 -32
- package/src/hooks/index.jsx +8 -16
- package/src/hooks/useAppConfig.jsx +4 -4
- package/src/hooks/useBreadcrumbs.jsx +37 -37
- package/src/hooks/useLocalStorage.jsx +16 -16
- package/src/hooks/useMenu.jsx +83 -88
- package/src/hooks/useMenuConfig.jsx +4 -4
- package/src/hooks/useResourceTitle.jsx +13 -13
- package/src/hooks/useThemeConfig.jsx +4 -4
- package/src/i18n/createI18nProvider.jsx +7 -7
- package/src/i18n/index.jsx +4 -4
- package/src/i18n/useI18nCatcher.jsx +26 -26
- package/src/i18n/useI18nLanguages.jsx +12 -16
- package/src/i18n/useI18nProvider.jsx +3 -4
- package/src/themes/getColors.jsx +8 -8
- package/src/themes/getShadow.jsx +17 -17
- package/src/themes/index.jsx +29 -29
- package/src/themes/overrides/Accordion.jsx +9 -9
- package/src/themes/overrides/AccordionDetails.jsx +5 -5
- package/src/themes/overrides/AccordionSummary.jsx +11 -11
- package/src/themes/overrides/Alert.jsx +21 -21
- package/src/themes/overrides/AlertTitle.jsx +5 -5
- package/src/themes/overrides/Autocomplete.jsx +9 -9
- package/src/themes/overrides/Badge.jsx +12 -12
- package/src/themes/overrides/Button.jsx +62 -62
- package/src/themes/overrides/ButtonBase.jsx +4 -4
- package/src/themes/overrides/ButtonGroup.jsx +4 -4
- package/src/themes/overrides/CardContent.jsx +6 -6
- package/src/themes/overrides/Checkbox.jsx +31 -31
- package/src/themes/overrides/Chip.jsx +22 -22
- package/src/themes/overrides/Dialog.jsx +7 -7
- package/src/themes/overrides/DialogContentText.jsx +5 -5
- package/src/themes/overrides/DialogTitle.jsx +5 -5
- package/src/themes/overrides/Fab.jsx +21 -21
- package/src/themes/overrides/IconButton.jsx +8 -8
- package/src/themes/overrides/InputBase.jsx +3 -3
- package/src/themes/overrides/InputLabel.jsx +8 -8
- package/src/themes/overrides/LinearProgress.jsx +6 -6
- package/src/themes/overrides/Link.jsx +4 -4
- package/src/themes/overrides/ListItemButton.jsx +7 -7
- package/src/themes/overrides/ListItemIcon.jsx +5 -5
- package/src/themes/overrides/LoadingButton.jsx +6 -6
- package/src/themes/overrides/OutlinedInput.jsx +20 -21
- package/src/themes/overrides/Pagination.jsx +4 -4
- package/src/themes/overrides/PaginationItem.jsx +55 -55
- package/src/themes/overrides/Popover.jsx +5 -5
- package/src/themes/overrides/Radio.jsx +30 -30
- package/src/themes/overrides/Slider.jsx +20 -20
- package/src/themes/overrides/Switch.jsx +26 -26
- package/src/themes/overrides/Tab.jsx +7 -7
- package/src/themes/overrides/TableBody.jsx +11 -11
- package/src/themes/overrides/TableCell.jsx +12 -12
- package/src/themes/overrides/TableFooter.jsx +5 -5
- package/src/themes/overrides/TableHead.jsx +5 -5
- package/src/themes/overrides/TablePagination.jsx +6 -6
- package/src/themes/overrides/TableRow.jsx +10 -10
- package/src/themes/overrides/Tabs.jsx +5 -5
- package/src/themes/overrides/ToggleButton.jsx +7 -7
- package/src/themes/overrides/Tooltip.jsx +5 -5
- package/src/themes/overrides/TreeItem.jsx +7 -7
- package/src/themes/overrides/Typography.jsx +5 -5
- package/src/themes/overrides/index.jsx +47 -47
- package/src/themes/palette.jsx +22 -34
- package/src/themes/shadows.jsx +4 -4
- package/src/themes/theme/default.jsx +17 -17
- package/src/themes/theme/index.jsx +23 -23
- package/src/themes/theme/theme1.jsx +24 -46
- package/src/themes/theme/theme2.jsx +24 -46
- package/src/themes/theme/theme3.jsx +24 -46
- package/src/themes/theme/theme4.jsx +24 -46
- package/src/themes/theme/theme5.jsx +24 -46
- package/src/themes/theme/theme6.jsx +24 -46
- package/src/themes/theme/theme7.jsx +24 -46
- package/src/themes/theme/theme8.jsx +24 -46
- package/src/themes/typography.jsx +16 -16
- package/src/utils/{lang.js → lang.ts} +4 -4
- package/src/utils/time.ts +14 -0
- package/vite.config.js +11 -10
- package/src/utils/time.js +0 -13
- /package/src/utils/{index.js → index.ts} +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { alpha } from '@mui/material/styles'
|
|
2
|
-
import getColors from '../getColors'
|
|
3
|
-
import getShadow from '../getShadow'
|
|
1
|
+
import { alpha } from '@mui/material/styles';
|
|
2
|
+
import getColors from '../getColors';
|
|
3
|
+
import getShadow from '../getShadow';
|
|
4
4
|
|
|
5
5
|
function getColorStyle({ variant, color, theme }) {
|
|
6
|
-
const colors = getColors(theme, color)
|
|
7
|
-
const { lighter, main, dark, contrastText } = colors
|
|
6
|
+
const colors = getColors(theme, color);
|
|
7
|
+
const { lighter, main, dark, contrastText } = colors;
|
|
8
8
|
|
|
9
|
-
const buttonShadow = `${color}Button
|
|
10
|
-
const shadows = getShadow(theme, buttonShadow)
|
|
9
|
+
const buttonShadow = `${color}Button`;
|
|
10
|
+
const shadows = getShadow(theme, buttonShadow);
|
|
11
11
|
|
|
12
12
|
const commonShadow = {
|
|
13
13
|
'&::after': {
|
|
14
|
-
boxShadow: `0 0 5px 5px ${alpha(main, 0.9)}
|
|
14
|
+
boxShadow: `0 0 5px 5px ${alpha(main, 0.9)}`
|
|
15
15
|
},
|
|
16
16
|
'&:active::after': {
|
|
17
|
-
boxShadow: `0 0 0 0 ${alpha(main, 0.9)}
|
|
17
|
+
boxShadow: `0 0 0 0 ${alpha(main, 0.9)}`
|
|
18
18
|
},
|
|
19
19
|
'&:focus-visible': {
|
|
20
20
|
outline: `2px solid ${dark}`,
|
|
21
|
-
outlineOffset: 2
|
|
22
|
-
}
|
|
23
|
-
}
|
|
21
|
+
outlineOffset: 2
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
24
|
|
|
25
25
|
switch (variant) {
|
|
26
26
|
case 'contained':
|
|
27
27
|
return {
|
|
28
28
|
'&:hover': {
|
|
29
|
-
backgroundColor: dark
|
|
29
|
+
backgroundColor: dark
|
|
30
30
|
},
|
|
31
|
-
...commonShadow
|
|
32
|
-
}
|
|
31
|
+
...commonShadow
|
|
32
|
+
};
|
|
33
33
|
case 'shadow':
|
|
34
34
|
return {
|
|
35
35
|
color: contrastText,
|
|
@@ -37,20 +37,20 @@ function getColorStyle({ variant, color, theme }) {
|
|
|
37
37
|
boxShadow: shadows,
|
|
38
38
|
'&:hover': {
|
|
39
39
|
boxShadow: 'none',
|
|
40
|
-
backgroundColor: dark
|
|
40
|
+
backgroundColor: dark
|
|
41
41
|
},
|
|
42
|
-
...commonShadow
|
|
43
|
-
}
|
|
42
|
+
...commonShadow
|
|
43
|
+
};
|
|
44
44
|
case 'outlined':
|
|
45
45
|
return {
|
|
46
46
|
borderColor: main,
|
|
47
47
|
'&:hover': {
|
|
48
48
|
color: dark,
|
|
49
49
|
backgroundColor: 'transparent',
|
|
50
|
-
borderColor: dark
|
|
50
|
+
borderColor: dark
|
|
51
51
|
},
|
|
52
|
-
...commonShadow
|
|
53
|
-
}
|
|
52
|
+
...commonShadow
|
|
53
|
+
};
|
|
54
54
|
case 'dashed':
|
|
55
55
|
return {
|
|
56
56
|
color: main,
|
|
@@ -58,43 +58,43 @@ function getColorStyle({ variant, color, theme }) {
|
|
|
58
58
|
backgroundColor: lighter,
|
|
59
59
|
'&:hover': {
|
|
60
60
|
color: dark,
|
|
61
|
-
borderColor: dark
|
|
61
|
+
borderColor: dark
|
|
62
62
|
},
|
|
63
|
-
...commonShadow
|
|
64
|
-
}
|
|
63
|
+
...commonShadow
|
|
64
|
+
};
|
|
65
65
|
case 'text':
|
|
66
66
|
default:
|
|
67
67
|
return {
|
|
68
68
|
'&:hover': {
|
|
69
69
|
color: dark,
|
|
70
|
-
backgroundColor: lighter
|
|
70
|
+
backgroundColor: lighter
|
|
71
71
|
},
|
|
72
|
-
...commonShadow
|
|
73
|
-
}
|
|
72
|
+
...commonShadow
|
|
73
|
+
};
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// ==============================|| OVERRIDES - BUTTON ||============================== //
|
|
78
78
|
|
|
79
79
|
export default function Button(theme) {
|
|
80
|
-
const primaryDashed = getColorStyle({ variant: 'dashed', color: 'primary', theme })
|
|
81
|
-
const primaryShadow = getColorStyle({ variant: 'shadow', color: 'primary', theme })
|
|
80
|
+
const primaryDashed = getColorStyle({ variant: 'dashed', color: 'primary', theme });
|
|
81
|
+
const primaryShadow = getColorStyle({ variant: 'shadow', color: 'primary', theme });
|
|
82
82
|
|
|
83
83
|
const disabledStyle = {
|
|
84
84
|
'&.Mui-disabled': {
|
|
85
|
-
backgroundColor: theme.palette.grey[200]
|
|
86
|
-
}
|
|
87
|
-
}
|
|
85
|
+
backgroundColor: theme.palette.grey[200]
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
88
|
const iconStyle = {
|
|
89
89
|
'&>*:nth-of-type(1)': {
|
|
90
|
-
fontSize: 'inherit'
|
|
91
|
-
}
|
|
92
|
-
}
|
|
90
|
+
fontSize: 'inherit'
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
93
|
|
|
94
94
|
return {
|
|
95
95
|
MuiButton: {
|
|
96
96
|
defaultProps: {
|
|
97
|
-
disableElevation: true
|
|
97
|
+
disableElevation: true
|
|
98
98
|
},
|
|
99
99
|
styleOverrides: {
|
|
100
100
|
root: {
|
|
@@ -109,7 +109,7 @@ export default function Button(theme) {
|
|
|
109
109
|
height: '100%',
|
|
110
110
|
borderRadius: 4,
|
|
111
111
|
opacity: 0,
|
|
112
|
-
transition: 'all 0.5s'
|
|
112
|
+
transition: 'all 0.5s'
|
|
113
113
|
},
|
|
114
114
|
|
|
115
115
|
'&:active::after': {
|
|
@@ -118,26 +118,26 @@ export default function Button(theme) {
|
|
|
118
118
|
left: 0,
|
|
119
119
|
top: 0,
|
|
120
120
|
opacity: 1,
|
|
121
|
-
transition: '0s'
|
|
122
|
-
}
|
|
121
|
+
transition: '0s'
|
|
122
|
+
}
|
|
123
123
|
},
|
|
124
124
|
contained: {
|
|
125
|
-
...disabledStyle
|
|
125
|
+
...disabledStyle
|
|
126
126
|
},
|
|
127
127
|
outlined: {
|
|
128
|
-
...disabledStyle
|
|
128
|
+
...disabledStyle
|
|
129
129
|
},
|
|
130
130
|
text: {
|
|
131
131
|
boxShadow: 'none',
|
|
132
132
|
'&:hover': {
|
|
133
|
-
boxShadow: 'none'
|
|
134
|
-
}
|
|
133
|
+
boxShadow: 'none'
|
|
134
|
+
}
|
|
135
135
|
},
|
|
136
136
|
endIcon: {
|
|
137
|
-
...iconStyle
|
|
137
|
+
...iconStyle
|
|
138
138
|
},
|
|
139
139
|
startIcon: {
|
|
140
|
-
...iconStyle
|
|
140
|
+
...iconStyle
|
|
141
141
|
},
|
|
142
142
|
dashed: {
|
|
143
143
|
border: '1px dashed',
|
|
@@ -145,60 +145,60 @@ export default function Button(theme) {
|
|
|
145
145
|
'&.MuiButton-dashedPrimary': getColorStyle({
|
|
146
146
|
variant: 'dashed',
|
|
147
147
|
color: 'primary',
|
|
148
|
-
theme
|
|
148
|
+
theme
|
|
149
149
|
}),
|
|
150
150
|
'&.MuiButton-dashedSecondary': getColorStyle({
|
|
151
151
|
variant: 'dashed',
|
|
152
152
|
color: 'secondary',
|
|
153
|
-
theme
|
|
153
|
+
theme
|
|
154
154
|
}),
|
|
155
155
|
'&.MuiButton-dashedError': getColorStyle({ variant: 'dashed', color: 'error', theme }),
|
|
156
156
|
'&.MuiButton-dashedSuccess': getColorStyle({
|
|
157
157
|
variant: 'dashed',
|
|
158
158
|
color: 'success',
|
|
159
|
-
theme
|
|
159
|
+
theme
|
|
160
160
|
}),
|
|
161
161
|
'&.MuiButton-dashedInfo': getColorStyle({ variant: 'dashed', color: 'info', theme }),
|
|
162
162
|
'&.MuiButton-dashedWarning': getColorStyle({
|
|
163
163
|
variant: 'dashed',
|
|
164
164
|
color: 'warning',
|
|
165
|
-
theme
|
|
165
|
+
theme
|
|
166
166
|
}),
|
|
167
167
|
'&.Mui-disabled': {
|
|
168
168
|
color: `${theme.palette.grey[300]} !important`,
|
|
169
169
|
borderColor: `${theme.palette.grey[400]} !important`,
|
|
170
|
-
backgroundColor: `${theme.palette.grey[200]} !important
|
|
171
|
-
}
|
|
170
|
+
backgroundColor: `${theme.palette.grey[200]} !important`
|
|
171
|
+
}
|
|
172
172
|
},
|
|
173
173
|
shadow: {
|
|
174
174
|
...primaryShadow,
|
|
175
175
|
'&.MuiButton-shadowPrimary': getColorStyle({
|
|
176
176
|
variant: 'shadow',
|
|
177
177
|
color: 'primary',
|
|
178
|
-
theme
|
|
178
|
+
theme
|
|
179
179
|
}),
|
|
180
180
|
'&.MuiButton-shadowSecondary': getColorStyle({
|
|
181
181
|
variant: 'shadow',
|
|
182
182
|
color: 'secondary',
|
|
183
|
-
theme
|
|
183
|
+
theme
|
|
184
184
|
}),
|
|
185
185
|
'&.MuiButton-shadowError': getColorStyle({ variant: 'shadow', color: 'error', theme }),
|
|
186
186
|
'&.MuiButton-shadowSuccess': getColorStyle({
|
|
187
187
|
variant: 'shadow',
|
|
188
188
|
color: 'success',
|
|
189
|
-
theme
|
|
189
|
+
theme
|
|
190
190
|
}),
|
|
191
191
|
'&.MuiButton-shadowInfo': getColorStyle({ variant: 'shadow', color: 'info', theme }),
|
|
192
192
|
'&.MuiButton-shadowWarning': getColorStyle({
|
|
193
193
|
variant: 'shadow',
|
|
194
194
|
color: 'warning',
|
|
195
|
-
theme
|
|
195
|
+
theme
|
|
196
196
|
}),
|
|
197
197
|
'&.Mui-disabled': {
|
|
198
198
|
color: `${theme.palette.grey[300]} !important`,
|
|
199
199
|
borderColor: `${theme.palette.grey[400]} !important`,
|
|
200
|
-
backgroundColor: `${theme.palette.grey[200]} !important
|
|
201
|
-
}
|
|
200
|
+
backgroundColor: `${theme.palette.grey[200]} !important`
|
|
201
|
+
}
|
|
202
202
|
},
|
|
203
203
|
containedPrimary: getColorStyle({ variant: 'contained', color: 'primary', theme }),
|
|
204
204
|
containedSecondary: getColorStyle({ variant: 'contained', color: 'secondary', theme }),
|
|
@@ -221,9 +221,9 @@ export default function Button(theme) {
|
|
|
221
221
|
sizeExtraSmall: {
|
|
222
222
|
minWidth: 56,
|
|
223
223
|
fontSize: '0.625rem',
|
|
224
|
-
padding: '2px 8px'
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
224
|
+
padding: '2px 8px'
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
229
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { CheckSquareFilled, MinusSquareFilled } from '@ant-design/icons'
|
|
1
|
+
import { CheckSquareFilled, MinusSquareFilled } from '@ant-design/icons';
|
|
2
2
|
|
|
3
|
-
import { Box } from '@mui/material'
|
|
4
|
-
import getColors from '../getColors'
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
|
+
import getColors from '../getColors';
|
|
5
5
|
|
|
6
6
|
function getColorStyle({ color, theme }) {
|
|
7
|
-
const colors = getColors(theme, color)
|
|
8
|
-
const { lighter, main, dark } = colors
|
|
7
|
+
const colors = getColors(theme, color);
|
|
8
|
+
const { lighter, main, dark } = colors;
|
|
9
9
|
|
|
10
10
|
return {
|
|
11
11
|
'&:hover': {
|
|
12
12
|
backgroundColor: lighter,
|
|
13
13
|
'& .icon': {
|
|
14
|
-
borderColor: main
|
|
15
|
-
}
|
|
14
|
+
borderColor: main
|
|
15
|
+
}
|
|
16
16
|
},
|
|
17
17
|
'&.Mui-focusVisible': {
|
|
18
18
|
outline: `2px solid ${dark}`,
|
|
19
|
-
outlineOffset: -4
|
|
20
|
-
}
|
|
21
|
-
}
|
|
19
|
+
outlineOffset: -4
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function getSizeStyle(size) {
|
|
25
25
|
switch (size) {
|
|
26
26
|
case 'small':
|
|
27
|
-
return { size: 16, fontSize: 1, position: 1 }
|
|
27
|
+
return { size: 16, fontSize: 1, position: 1 };
|
|
28
28
|
case 'large':
|
|
29
|
-
return { size: 24, fontSize: 1.6, position: 2 }
|
|
29
|
+
return { size: 24, fontSize: 1.6, position: 2 };
|
|
30
30
|
case 'medium':
|
|
31
31
|
default:
|
|
32
|
-
return { size: 20, fontSize: 1.35, position: 2 }
|
|
32
|
+
return { size: 20, fontSize: 1.35, position: 2 };
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function checkboxStyle(size) {
|
|
37
|
-
const sizes = getSizeStyle(size)
|
|
37
|
+
const sizes = getSizeStyle(size);
|
|
38
38
|
|
|
39
39
|
return {
|
|
40
40
|
'& .icon': {
|
|
@@ -43,14 +43,14 @@ function checkboxStyle(size) {
|
|
|
43
43
|
'& .filled': {
|
|
44
44
|
fontSize: `${sizes.fontSize}rem`,
|
|
45
45
|
top: -sizes.position,
|
|
46
|
-
left: -sizes.position
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
46
|
+
left: -sizes.position
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export default function Checkbox(theme) {
|
|
53
|
-
const { palette } = theme
|
|
53
|
+
const { palette } = theme;
|
|
54
54
|
|
|
55
55
|
return {
|
|
56
56
|
MuiCheckbox: {
|
|
@@ -64,7 +64,7 @@ export default function Checkbox(theme) {
|
|
|
64
64
|
height: 16,
|
|
65
65
|
border: '1px solid',
|
|
66
66
|
borderColor: 'inherit',
|
|
67
|
-
borderRadius: 0.25
|
|
67
|
+
borderRadius: 0.25
|
|
68
68
|
}}
|
|
69
69
|
/>
|
|
70
70
|
),
|
|
@@ -77,7 +77,7 @@ export default function Checkbox(theme) {
|
|
|
77
77
|
border: '1px solid',
|
|
78
78
|
borderColor: 'inherit',
|
|
79
79
|
borderRadius: 0.25,
|
|
80
|
-
position: 'relative'
|
|
80
|
+
position: 'relative'
|
|
81
81
|
}}
|
|
82
82
|
>
|
|
83
83
|
<CheckSquareFilled className="filled" style={{ position: 'absolute' }} />
|
|
@@ -92,34 +92,34 @@ export default function Checkbox(theme) {
|
|
|
92
92
|
border: '1px solid',
|
|
93
93
|
borderColor: 'inherit',
|
|
94
94
|
borderRadius: 0.25,
|
|
95
|
-
position: 'relative'
|
|
95
|
+
position: 'relative'
|
|
96
96
|
}}
|
|
97
97
|
>
|
|
98
98
|
<MinusSquareFilled className="filled" style={{ position: 'absolute' }} />
|
|
99
99
|
</Box>
|
|
100
|
-
)
|
|
100
|
+
)
|
|
101
101
|
},
|
|
102
102
|
styleOverrides: {
|
|
103
103
|
root: {
|
|
104
104
|
borderRadius: 0,
|
|
105
105
|
color: palette.secondary[300],
|
|
106
106
|
'&.size-small': {
|
|
107
|
-
...checkboxStyle('small')
|
|
107
|
+
...checkboxStyle('small')
|
|
108
108
|
},
|
|
109
109
|
'&.size-medium': {
|
|
110
|
-
...checkboxStyle('medium')
|
|
110
|
+
...checkboxStyle('medium')
|
|
111
111
|
},
|
|
112
112
|
'&.size-large': {
|
|
113
|
-
...checkboxStyle('large')
|
|
114
|
-
}
|
|
113
|
+
...checkboxStyle('large')
|
|
114
|
+
}
|
|
115
115
|
},
|
|
116
116
|
colorPrimary: getColorStyle({ color: 'primary', theme }),
|
|
117
117
|
colorSecondary: getColorStyle({ color: 'secondary', theme }),
|
|
118
118
|
colorSuccess: getColorStyle({ color: 'success', theme }),
|
|
119
119
|
colorWarning: getColorStyle({ color: 'warning', theme }),
|
|
120
120
|
colorInfo: getColorStyle({ color: 'info', theme }),
|
|
121
|
-
colorError: getColorStyle({ color: 'error', theme })
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
121
|
+
colorError: getColorStyle({ color: 'error', theme })
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
125
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import getColors from '../getColors'
|
|
1
|
+
import getColors from '../getColors';
|
|
2
2
|
|
|
3
3
|
function getColor({ color, theme }) {
|
|
4
|
-
const colors = getColors(theme, color)
|
|
5
|
-
const { dark } = colors
|
|
4
|
+
const colors = getColors(theme, color);
|
|
5
|
+
const { dark } = colors;
|
|
6
6
|
|
|
7
7
|
return {
|
|
8
8
|
'&.Mui-focusVisible': {
|
|
9
9
|
outline: `2px solid ${dark}`,
|
|
10
|
-
outlineOffset: 2
|
|
11
|
-
}
|
|
12
|
-
}
|
|
10
|
+
outlineOffset: 2
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function getColorStyle({ color, theme }) {
|
|
16
|
-
const colors = getColors(theme, color)
|
|
17
|
-
const { light, lighter, main } = colors
|
|
16
|
+
const colors = getColors(theme, color);
|
|
17
|
+
const { light, lighter, main } = colors;
|
|
18
18
|
|
|
19
19
|
return {
|
|
20
20
|
color: main,
|
|
@@ -23,32 +23,32 @@ function getColorStyle({ color, theme }) {
|
|
|
23
23
|
'& .MuiChip-deleteIcon': {
|
|
24
24
|
color: main,
|
|
25
25
|
'&:hover': {
|
|
26
|
-
color: light
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
26
|
+
color: light
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export default function Chip(theme) {
|
|
33
|
-
const defaultLightChip = getColorStyle({ color: 'secondary', theme })
|
|
33
|
+
const defaultLightChip = getColorStyle({ color: 'secondary', theme });
|
|
34
34
|
return {
|
|
35
35
|
MuiChip: {
|
|
36
36
|
styleOverrides: {
|
|
37
37
|
root: {
|
|
38
38
|
borderRadius: 4,
|
|
39
39
|
'&:active': {
|
|
40
|
-
boxShadow: 'none'
|
|
40
|
+
boxShadow: 'none'
|
|
41
41
|
},
|
|
42
42
|
'&.MuiChip-colorPrimary': getColor({ color: 'primary', theme }),
|
|
43
43
|
'&.MuiChip-colorSecondary': getColor({ color: 'secondary', theme }),
|
|
44
44
|
'&.MuiChip-colorError': getColor({ color: 'error', theme }),
|
|
45
45
|
'&.MuiChip-colorInfo': getColor({ color: 'info', theme }),
|
|
46
46
|
'&.MuiChip-colorSuccess': getColor({ color: 'success', theme }),
|
|
47
|
-
'&.MuiChip-colorWarning': getColor({ color: 'warning', theme })
|
|
47
|
+
'&.MuiChip-colorWarning': getColor({ color: 'warning', theme })
|
|
48
48
|
},
|
|
49
49
|
sizeLarge: {
|
|
50
50
|
fontSize: '1rem',
|
|
51
|
-
height: 40
|
|
51
|
+
height: 40
|
|
52
52
|
},
|
|
53
53
|
light: {
|
|
54
54
|
...defaultLightChip,
|
|
@@ -57,7 +57,7 @@ export default function Chip(theme) {
|
|
|
57
57
|
'&.MuiChip-lightError': getColorStyle({ color: 'error', theme }),
|
|
58
58
|
'&.MuiChip-lightInfo': getColorStyle({ color: 'info', theme }),
|
|
59
59
|
'&.MuiChip-lightSuccess': getColorStyle({ color: 'success', theme }),
|
|
60
|
-
'&.MuiChip-lightWarning': getColorStyle({ color: 'warning', theme })
|
|
60
|
+
'&.MuiChip-lightWarning': getColorStyle({ color: 'warning', theme })
|
|
61
61
|
},
|
|
62
62
|
combined: {
|
|
63
63
|
border: '1px solid',
|
|
@@ -67,9 +67,9 @@ export default function Chip(theme) {
|
|
|
67
67
|
'&.MuiChip-combinedError': getColorStyle({ color: 'error', theme }),
|
|
68
68
|
'&.MuiChip-combinedInfo': getColorStyle({ color: 'info', theme }),
|
|
69
69
|
'&.MuiChip-combinedSuccess': getColorStyle({ color: 'success', theme }),
|
|
70
|
-
'&.MuiChip-combinedWarning': getColorStyle({ color: 'warning', theme })
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
70
|
+
'&.MuiChip-combinedWarning': getColorStyle({ color: 'warning', theme })
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
75
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// material-ui
|
|
2
|
-
import { alpha } from '@mui/material/styles'
|
|
2
|
+
import { alpha } from '@mui/material/styles';
|
|
3
3
|
|
|
4
4
|
// ==============================|| OVERRIDES - DIALOG ||============================== //
|
|
5
5
|
|
|
@@ -9,10 +9,10 @@ export default function Dialog() {
|
|
|
9
9
|
styleOverrides: {
|
|
10
10
|
root: {
|
|
11
11
|
'& .MuiBackdrop-root': {
|
|
12
|
-
backgroundColor: alpha('#000', 0.7)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
12
|
+
backgroundColor: alpha('#000', 0.7)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
18
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { alpha } from '@mui/material/styles'
|
|
2
|
-
import getColors from '../getColors'
|
|
3
|
-
import getShadow from '../getShadow'
|
|
1
|
+
import { alpha } from '@mui/material/styles';
|
|
2
|
+
import getColors from '../getColors';
|
|
3
|
+
import getShadow from '../getShadow';
|
|
4
4
|
|
|
5
5
|
function getColorStyle({ color, theme }) {
|
|
6
|
-
const colors = getColors(theme, color)
|
|
7
|
-
const { main, dark, contrastText } = colors
|
|
6
|
+
const colors = getColors(theme, color);
|
|
7
|
+
const { main, dark, contrastText } = colors;
|
|
8
8
|
|
|
9
|
-
const buttonShadow = `${color}Button
|
|
10
|
-
const shadows = getShadow(theme, buttonShadow)
|
|
9
|
+
const buttonShadow = `${color}Button`;
|
|
10
|
+
const shadows = getShadow(theme, buttonShadow);
|
|
11
11
|
|
|
12
12
|
return {
|
|
13
13
|
color: contrastText,
|
|
@@ -15,21 +15,21 @@ function getColorStyle({ color, theme }) {
|
|
|
15
15
|
boxShadow: shadows,
|
|
16
16
|
'&:hover': {
|
|
17
17
|
boxShadow: 'none',
|
|
18
|
-
backgroundColor: dark
|
|
18
|
+
backgroundColor: dark
|
|
19
19
|
},
|
|
20
20
|
'&:focus-visible': {
|
|
21
21
|
outline: `2px solid ${dark}`,
|
|
22
|
-
outlineOffset: 2
|
|
22
|
+
outlineOffset: 2
|
|
23
23
|
},
|
|
24
24
|
'&::after': {
|
|
25
25
|
borderRadius: '50px',
|
|
26
|
-
boxShadow: `0 0 5px 5px ${alpha(main, 0.9)}
|
|
26
|
+
boxShadow: `0 0 5px 5px ${alpha(main, 0.9)}`
|
|
27
27
|
},
|
|
28
28
|
'&:active::after': {
|
|
29
29
|
borderRadius: '50px',
|
|
30
|
-
boxShadow: `0 0 0 0 ${alpha(main, 0.9)}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
30
|
+
boxShadow: `0 0 0 0 ${alpha(main, 0.9)}`
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// ==============================|| OVERRIDES - FAB BUTTON ||============================== //
|
|
@@ -41,7 +41,7 @@ export default function Button(theme) {
|
|
|
41
41
|
root: {
|
|
42
42
|
fontWeight: 400,
|
|
43
43
|
'&.Mui-disabled': {
|
|
44
|
-
backgroundColor: theme.palette.grey[200]
|
|
44
|
+
backgroundColor: theme.palette.grey[200]
|
|
45
45
|
},
|
|
46
46
|
'&.MuiFab-primary': getColorStyle({ color: 'primary', theme }),
|
|
47
47
|
'&.MuiFab-secondary': getColorStyle({ color: 'secondary', theme }),
|
|
@@ -59,7 +59,7 @@ export default function Button(theme) {
|
|
|
59
59
|
height: '100%',
|
|
60
60
|
borderRadius: 4,
|
|
61
61
|
opacity: 0,
|
|
62
|
-
transition: 'all 0.5s'
|
|
62
|
+
transition: 'all 0.5s'
|
|
63
63
|
},
|
|
64
64
|
|
|
65
65
|
'&:active::after': {
|
|
@@ -68,10 +68,10 @@ export default function Button(theme) {
|
|
|
68
68
|
left: 0,
|
|
69
69
|
top: 0,
|
|
70
70
|
opacity: 1,
|
|
71
|
-
transition: '0s'
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
71
|
+
transition: '0s'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
77
|
}
|