@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutlinedInput.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/OutlinedInput.jsx"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"OutlinedInput.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/OutlinedInput.jsx"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/themes/palette.jsx"],"names":[],"mappings":";AAWA,
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/themes/palette.jsx"],"names":[],"mappings":";AAWA,4FAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme1.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme1.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme1.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme1.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme2.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme2.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme2.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme2.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme3.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme3.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme3.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme3.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme4.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme4.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme4.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme4.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme5.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme5.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme5.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme5.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme6.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme6.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme6.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme6.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme7.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme7.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme7.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme7.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme8.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme8.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"theme8.d.ts","sourceRoot":"","sources":["../../../../src/themes/theme/theme8.jsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './time';
|
|
2
|
+
export * from './lang';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
package/dist/utils/lang.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function uuid(): string;
|
|
1
|
+
export declare function uuid(): string;
|
|
2
2
|
//# sourceMappingURL=lang.d.ts.map
|
package/dist/utils/lang.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../../src/utils/lang.
|
|
1
|
+
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["../../../src/utils/lang.ts"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,IAAI,MAAM,CAW7B"}
|
package/dist/utils/time.d.ts
CHANGED
package/dist/utils/time.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/utils/time.
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/utils/time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,SAAS,SAAU,MAAM,gBAS9B,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applica-software-guru/react-admin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"preview": "vite preview",
|
|
22
22
|
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
|
|
23
23
|
"lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx}'",
|
|
24
|
-
"format": "prettier --write src//**/*.js --config ./.prettierrc",
|
|
24
|
+
"format": "prettier --write 'src//**/*.{js,jsx,ts,tsx}' --config ./.prettierrc",
|
|
25
25
|
"test": "vitest",
|
|
26
26
|
"clear": "rm -rf node_modules && rm -rf playground/node_modules && rm package-lock.json && rm playground/package-lock.json",
|
|
27
27
|
"setup": "npm install && cd playground && npm i && husky install",
|
package/src/Admin.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AdminUI, localStorageStore } from 'react-admin'
|
|
1
|
+
import { AdminUI, localStorageStore } from 'react-admin';
|
|
2
2
|
|
|
3
|
-
import AdminContext from './AdminContext'
|
|
3
|
+
import AdminContext from './AdminContext';
|
|
4
4
|
|
|
5
5
|
const Admin = (props) => {
|
|
6
6
|
const {
|
|
@@ -24,7 +24,7 @@ const Admin = (props) => {
|
|
|
24
24
|
ready,
|
|
25
25
|
theme,
|
|
26
26
|
title = 'React Admin'
|
|
27
|
-
} = props
|
|
27
|
+
} = props;
|
|
28
28
|
return (
|
|
29
29
|
<AdminContext
|
|
30
30
|
authProvider={authProvider}
|
|
@@ -52,16 +52,16 @@ const Admin = (props) => {
|
|
|
52
52
|
{children}
|
|
53
53
|
</AdminUI>
|
|
54
54
|
</AdminContext>
|
|
55
|
-
)
|
|
56
|
-
}
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
57
|
|
|
58
58
|
Admin.defaultProps = {
|
|
59
59
|
store: localStorageStore(),
|
|
60
60
|
title: 'Applica Admin'
|
|
61
|
-
}
|
|
61
|
+
};
|
|
62
62
|
|
|
63
63
|
Admin.propTypes = {
|
|
64
64
|
...AdminUI.propTypes
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
66
|
|
|
67
|
-
export default Admin
|
|
67
|
+
export default Admin;
|
package/src/AdminContext.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CoreAdminContext } from 'react-admin'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import { ScrollTop } from './components'
|
|
4
|
-
import { ThemeCustomization } from './themes'
|
|
1
|
+
import { CoreAdminContext } from 'react-admin';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { ScrollTop } from './components';
|
|
4
|
+
import { ThemeCustomization } from './themes';
|
|
5
5
|
|
|
6
6
|
const AdminContext = ({ children, theme, ...props }) => (
|
|
7
7
|
<CoreAdminContext {...props}>
|
|
@@ -9,16 +9,16 @@ const AdminContext = ({ children, theme, ...props }) => (
|
|
|
9
9
|
<ScrollTop>{children}</ScrollTop>
|
|
10
10
|
</ThemeCustomization>
|
|
11
11
|
</CoreAdminContext>
|
|
12
|
-
)
|
|
12
|
+
);
|
|
13
13
|
|
|
14
|
-
AdminContext.displayName = 'ApplicaAdminContext'
|
|
14
|
+
AdminContext.displayName = 'ApplicaAdminContext';
|
|
15
15
|
AdminContext.defaultProps = {
|
|
16
16
|
...CoreAdminContext.defaultProps
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
AdminContext.propTypes = {
|
|
19
19
|
...CoreAdminContext.propTypes,
|
|
20
20
|
children: PropTypes.node.isRequired,
|
|
21
21
|
theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
|
|
24
|
-
export default AdminContext
|
|
24
|
+
export default AdminContext;
|
package/src/ApplicaAdmin.jsx
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ThemeConfigProvider
|
|
6
|
-
} from './contexts'
|
|
7
|
-
import { CatchResult, useCliErrorCatcher } from './dev'
|
|
8
|
-
import { Layout, MainIcon, Notification, SmallIcon } from './components'
|
|
9
|
-
import { createI18nProvider, useI18nCatcher, useI18nLanguages } from './i18n'
|
|
1
|
+
import { AppConfigProvider, MenuConfigProvider, MenuPropTypes, ThemeConfigProvider } from './contexts';
|
|
2
|
+
import { CatchResult, useCliErrorCatcher } from './dev';
|
|
3
|
+
import { Layout, MainIcon, Notification, SmallIcon } from './components';
|
|
4
|
+
import { createI18nProvider, useI18nCatcher, useI18nLanguages } from './i18n';
|
|
10
5
|
|
|
11
|
-
import Admin from './Admin'
|
|
12
|
-
import PropTypes from 'prop-types'
|
|
13
|
-
import { QueryClient } from 'react-query'
|
|
14
|
-
import { useMemo } from 'react'
|
|
6
|
+
import Admin from './Admin';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { QueryClient } from 'react-query';
|
|
9
|
+
import { useMemo } from 'react';
|
|
15
10
|
|
|
16
11
|
const languageResponseMapper = (response) =>
|
|
17
12
|
response.reduce(
|
|
@@ -23,13 +18,13 @@ const languageResponseMapper = (response) =>
|
|
|
23
18
|
}
|
|
24
19
|
}),
|
|
25
20
|
{}
|
|
26
|
-
)
|
|
21
|
+
);
|
|
27
22
|
|
|
28
23
|
const i18nBodyRequestMapper = (locale, message) => ({
|
|
29
24
|
lang: locale,
|
|
30
25
|
code: message,
|
|
31
26
|
text: message
|
|
32
|
-
})
|
|
27
|
+
});
|
|
33
28
|
|
|
34
29
|
const queryClient = new QueryClient({
|
|
35
30
|
defaultOptions: {
|
|
@@ -37,7 +32,7 @@ const queryClient = new QueryClient({
|
|
|
37
32
|
refetchOnWindowFocus: false
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
})
|
|
35
|
+
});
|
|
41
36
|
|
|
42
37
|
const ApplicaAdmin = ({
|
|
43
38
|
theme,
|
|
@@ -59,7 +54,7 @@ const ApplicaAdmin = ({
|
|
|
59
54
|
apiUrl,
|
|
60
55
|
endpoint: '/i18n/messages',
|
|
61
56
|
mapper: languageResponseMapper
|
|
62
|
-
})
|
|
57
|
+
});
|
|
63
58
|
|
|
64
59
|
useI18nCatcher({
|
|
65
60
|
bodyBuilder: i18nBodyRequestMapper,
|
|
@@ -67,34 +62,34 @@ const ApplicaAdmin = ({
|
|
|
67
62
|
endpoint: '/i18n/message',
|
|
68
63
|
loading: languages?.loading,
|
|
69
64
|
enabled: development
|
|
70
|
-
})
|
|
65
|
+
});
|
|
71
66
|
useCliErrorCatcher({
|
|
72
67
|
apiUrl,
|
|
73
68
|
endpoint: '/cli/error',
|
|
74
69
|
catcherFn: (error) => {
|
|
75
|
-
var errorMessage = error?.toString()
|
|
70
|
+
var errorMessage = error?.toString();
|
|
76
71
|
var knownErrors = [
|
|
77
72
|
// @see https://github.com/marmelab/react-admin/pull/8884
|
|
78
73
|
'Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.',
|
|
79
74
|
'Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.',
|
|
80
75
|
'Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.',
|
|
81
76
|
'validateDOMNesting(...): <form> cannot appear as a descendant of <form>.'
|
|
82
|
-
]
|
|
83
|
-
const isKnowBug = knownErrors.some((knownError) => errorMessage?.includes(knownError))
|
|
77
|
+
];
|
|
78
|
+
const isKnowBug = knownErrors.some((knownError) => errorMessage?.includes(knownError));
|
|
84
79
|
const result = new CatchResult({
|
|
85
80
|
catch: isKnowBug,
|
|
86
81
|
display: !isKnowBug,
|
|
87
82
|
log: !isKnowBug,
|
|
88
83
|
error
|
|
89
|
-
})
|
|
90
|
-
return result
|
|
84
|
+
});
|
|
85
|
+
return result;
|
|
91
86
|
}
|
|
92
|
-
})
|
|
87
|
+
});
|
|
93
88
|
|
|
94
89
|
const layout = useMemo(
|
|
95
90
|
() => (props) => {
|
|
96
|
-
const _logoMain = name ? <MainIcon title={name} /> : logoMain
|
|
97
|
-
const _logoIcon = name ? <SmallIcon title={name} /> : logoIcon
|
|
91
|
+
const _logoMain = name ? <MainIcon title={name} /> : logoMain;
|
|
92
|
+
const _logoIcon = name ? <SmallIcon title={name} /> : logoIcon;
|
|
98
93
|
return (
|
|
99
94
|
<Layout
|
|
100
95
|
{...props}
|
|
@@ -105,20 +100,20 @@ const ApplicaAdmin = ({
|
|
|
105
100
|
notification={notification}
|
|
106
101
|
disableNotification={disableNotification}
|
|
107
102
|
/>
|
|
108
|
-
)
|
|
103
|
+
);
|
|
109
104
|
},
|
|
110
105
|
[logoMain, logoIcon, name, version, notification, disableNotification]
|
|
111
|
-
)
|
|
106
|
+
);
|
|
112
107
|
|
|
113
108
|
if (languages?.loading) {
|
|
114
|
-
return null
|
|
109
|
+
return null;
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
const i18nProivder = createI18nProvider({
|
|
118
113
|
languages,
|
|
119
114
|
defaultLocale,
|
|
120
115
|
allowMissing: development
|
|
121
|
-
})
|
|
116
|
+
});
|
|
122
117
|
return (
|
|
123
118
|
<AppConfigProvider>
|
|
124
119
|
<MenuConfigProvider menu={menu}>
|
|
@@ -136,8 +131,8 @@ const ApplicaAdmin = ({
|
|
|
136
131
|
</ThemeConfigProvider>
|
|
137
132
|
</MenuConfigProvider>
|
|
138
133
|
</AppConfigProvider>
|
|
139
|
-
)
|
|
140
|
-
}
|
|
134
|
+
);
|
|
135
|
+
};
|
|
141
136
|
|
|
142
137
|
ApplicaAdmin.defaultProps = {
|
|
143
138
|
...Admin.defaultProps,
|
|
@@ -147,7 +142,7 @@ ApplicaAdmin.defaultProps = {
|
|
|
147
142
|
version: '0.0.0',
|
|
148
143
|
notification: 'entities/notification',
|
|
149
144
|
disableNotification: false
|
|
150
|
-
}
|
|
145
|
+
};
|
|
151
146
|
|
|
152
147
|
ApplicaAdmin.propTypes = {
|
|
153
148
|
...Admin.propTypes,
|
|
@@ -205,6 +200,6 @@ ApplicaAdmin.propTypes = {
|
|
|
205
200
|
* Indica se le notifiche devono essere disabilitate.
|
|
206
201
|
*/
|
|
207
202
|
disableNotification: PropTypes.bool
|
|
208
|
-
}
|
|
203
|
+
};
|
|
209
204
|
|
|
210
|
-
export default ApplicaAdmin
|
|
205
|
+
export default ApplicaAdmin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import PropTypes from 'prop-types'
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
2
|
|
|
3
3
|
// third-party
|
|
4
|
-
import { motion, useCycle } from 'framer-motion'
|
|
4
|
+
import { motion, useCycle } from 'framer-motion';
|
|
5
5
|
|
|
6
6
|
// ==============================|| ANIMATION BUTTON ||============================== //
|
|
7
7
|
|
|
@@ -12,27 +12,27 @@ export default function AnimateButton({
|
|
|
12
12
|
offset = 10,
|
|
13
13
|
scale = {
|
|
14
14
|
hover: 1.05,
|
|
15
|
-
tap: 0.95
|
|
16
|
-
}
|
|
15
|
+
tap: 0.95
|
|
16
|
+
}
|
|
17
17
|
}) {
|
|
18
|
-
let offset1
|
|
19
|
-
let offset2
|
|
18
|
+
let offset1;
|
|
19
|
+
let offset2;
|
|
20
20
|
switch (direction) {
|
|
21
21
|
case 'up':
|
|
22
22
|
case 'left':
|
|
23
|
-
offset1 = offset
|
|
24
|
-
offset2 = 0
|
|
25
|
-
break
|
|
23
|
+
offset1 = offset;
|
|
24
|
+
offset2 = 0;
|
|
25
|
+
break;
|
|
26
26
|
case 'right':
|
|
27
27
|
case 'down':
|
|
28
28
|
default:
|
|
29
|
-
offset1 = 0
|
|
30
|
-
offset2 = offset
|
|
31
|
-
break
|
|
29
|
+
offset1 = 0;
|
|
30
|
+
offset2 = offset;
|
|
31
|
+
break;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
const [x, cycleX] = useCycle(offset1, offset2)
|
|
35
|
-
const [y, cycleY] = useCycle(offset1, offset2)
|
|
34
|
+
const [x, cycleX] = useCycle(offset1, offset2);
|
|
35
|
+
const [y, cycleY] = useCycle(offset1, offset2);
|
|
36
36
|
|
|
37
37
|
switch (type) {
|
|
38
38
|
case 'rotate':
|
|
@@ -43,47 +43,39 @@ export default function AnimateButton({
|
|
|
43
43
|
repeat: Infinity,
|
|
44
44
|
repeatType: 'loop',
|
|
45
45
|
duration: 2,
|
|
46
|
-
repeatDelay: 0
|
|
46
|
+
repeatDelay: 0
|
|
47
47
|
}}
|
|
48
48
|
>
|
|
49
49
|
{children}
|
|
50
50
|
</motion.div>
|
|
51
|
-
)
|
|
51
|
+
);
|
|
52
52
|
case 'slide':
|
|
53
53
|
if (direction === 'up' || direction === 'down') {
|
|
54
54
|
return (
|
|
55
|
-
<motion.div
|
|
56
|
-
animate={{ y: y !== undefined ? y : '' }}
|
|
57
|
-
onHoverEnd={() => cycleY()}
|
|
58
|
-
onHoverStart={() => cycleY()}
|
|
59
|
-
>
|
|
55
|
+
<motion.div animate={{ y: y !== undefined ? y : '' }} onHoverEnd={() => cycleY()} onHoverStart={() => cycleY()}>
|
|
60
56
|
{children}
|
|
61
57
|
</motion.div>
|
|
62
|
-
)
|
|
58
|
+
);
|
|
63
59
|
}
|
|
64
60
|
return (
|
|
65
|
-
<motion.div
|
|
66
|
-
animate={{ x: x !== undefined ? x : '' }}
|
|
67
|
-
onHoverEnd={() => cycleX()}
|
|
68
|
-
onHoverStart={() => cycleX()}
|
|
69
|
-
>
|
|
61
|
+
<motion.div animate={{ x: x !== undefined ? x : '' }} onHoverEnd={() => cycleX()} onHoverStart={() => cycleX()}>
|
|
70
62
|
{children}
|
|
71
63
|
</motion.div>
|
|
72
|
-
)
|
|
64
|
+
);
|
|
73
65
|
|
|
74
66
|
case 'scale':
|
|
75
67
|
default:
|
|
76
68
|
if (typeof scale === 'number') {
|
|
77
69
|
scale = {
|
|
78
70
|
hover: scale,
|
|
79
|
-
tap: scale
|
|
80
|
-
}
|
|
71
|
+
tap: scale
|
|
72
|
+
};
|
|
81
73
|
}
|
|
82
74
|
return (
|
|
83
75
|
<motion.div whileHover={{ scale: scale?.hover }} whileTap={{ scale: scale?.tap }}>
|
|
84
76
|
{children}
|
|
85
77
|
</motion.div>
|
|
86
|
-
)
|
|
78
|
+
);
|
|
87
79
|
}
|
|
88
80
|
}
|
|
89
81
|
|
|
@@ -92,5 +84,5 @@ AnimateButton.propTypes = {
|
|
|
92
84
|
offset: PropTypes.number,
|
|
93
85
|
type: PropTypes.oneOf(['slide', 'scale', 'rotate']),
|
|
94
86
|
direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),
|
|
95
|
-
scale: PropTypes.oneOfType([PropTypes.number, PropTypes.object])
|
|
96
|
-
}
|
|
87
|
+
scale: PropTypes.oneOfType([PropTypes.number, PropTypes.object])
|
|
88
|
+
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
// material-ui
|
|
2
|
-
import { styled, useTheme } from '@mui/material/styles'
|
|
2
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
3
3
|
|
|
4
|
-
import MuiAvatar from '@mui/material/Avatar'
|
|
5
|
-
import PropTypes from 'prop-types'
|
|
4
|
+
import MuiAvatar from '@mui/material/Avatar';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
6
|
// project import
|
|
7
|
-
import getColors from '../../themes/getColors'
|
|
7
|
+
import getColors from '../../themes/getColors';
|
|
8
8
|
|
|
9
9
|
// ==============================|| AVATAR - COLOR STYLE ||============================== //
|
|
10
10
|
|
|
11
11
|
function getColorStyle({ theme, color, type }) {
|
|
12
|
-
const colors = getColors(theme, color)
|
|
13
|
-
const { lighter, light, main, contrastText } = colors
|
|
12
|
+
const colors = getColors(theme, color);
|
|
13
|
+
const { lighter, light, main, contrastText } = colors;
|
|
14
14
|
|
|
15
15
|
switch (type) {
|
|
16
16
|
case 'filled':
|
|
17
17
|
return {
|
|
18
18
|
color: contrastText,
|
|
19
|
-
backgroundColor: main
|
|
20
|
-
}
|
|
19
|
+
backgroundColor: main
|
|
20
|
+
};
|
|
21
21
|
case 'outlined':
|
|
22
22
|
return {
|
|
23
23
|
color: main,
|
|
24
24
|
border: '1px solid',
|
|
25
25
|
borderColor: main,
|
|
26
|
-
backgroundColor: 'transparent'
|
|
27
|
-
}
|
|
26
|
+
backgroundColor: 'transparent'
|
|
27
|
+
};
|
|
28
28
|
case 'combined':
|
|
29
29
|
return {
|
|
30
30
|
color: main,
|
|
31
31
|
border: '1px solid',
|
|
32
32
|
borderColor: light,
|
|
33
|
-
backgroundColor: lighter
|
|
34
|
-
}
|
|
33
|
+
backgroundColor: lighter
|
|
34
|
+
};
|
|
35
35
|
default:
|
|
36
36
|
return {
|
|
37
37
|
color: main,
|
|
38
|
-
backgroundColor: lighter
|
|
39
|
-
}
|
|
38
|
+
backgroundColor: lighter
|
|
39
|
+
};
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -49,71 +49,64 @@ function getSizeStyle(size) {
|
|
|
49
49
|
border: '2px solid',
|
|
50
50
|
fontSize: '0.675rem',
|
|
51
51
|
width: 20,
|
|
52
|
-
height: 20
|
|
53
|
-
}
|
|
52
|
+
height: 20
|
|
53
|
+
};
|
|
54
54
|
case 'xs':
|
|
55
55
|
return {
|
|
56
56
|
fontSize: '0.75rem',
|
|
57
57
|
width: 24,
|
|
58
|
-
height: 24
|
|
59
|
-
}
|
|
58
|
+
height: 24
|
|
59
|
+
};
|
|
60
60
|
case 'sm':
|
|
61
61
|
return {
|
|
62
62
|
fontSize: '0.875rem',
|
|
63
63
|
width: 32,
|
|
64
|
-
height: 32
|
|
65
|
-
}
|
|
64
|
+
height: 32
|
|
65
|
+
};
|
|
66
66
|
case 'lg':
|
|
67
67
|
return {
|
|
68
68
|
fontSize: '1.2rem',
|
|
69
69
|
width: 52,
|
|
70
|
-
height: 52
|
|
71
|
-
}
|
|
70
|
+
height: 52
|
|
71
|
+
};
|
|
72
72
|
case 'xl':
|
|
73
73
|
return {
|
|
74
74
|
fontSize: '1.5rem',
|
|
75
75
|
width: 64,
|
|
76
|
-
height: 64
|
|
77
|
-
}
|
|
76
|
+
height: 64
|
|
77
|
+
};
|
|
78
78
|
case 'md':
|
|
79
79
|
default:
|
|
80
80
|
return {
|
|
81
81
|
fontSize: '1rem',
|
|
82
82
|
width: 40,
|
|
83
|
-
height: 40
|
|
84
|
-
}
|
|
83
|
+
height: 40
|
|
84
|
+
};
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// ==============================|| STYLED - AVATAR ||============================== //
|
|
89
89
|
|
|
90
90
|
const AvatarStyle = styled(MuiAvatar, {
|
|
91
|
-
shouldForwardProp: (prop) => prop !== 'color' && prop !== 'type' && prop !== 'size'
|
|
91
|
+
shouldForwardProp: (prop) => prop !== 'color' && prop !== 'type' && prop !== 'size'
|
|
92
92
|
})(({ theme, variant, color, type, size }) => ({
|
|
93
93
|
...getSizeStyle(size),
|
|
94
94
|
...getColorStyle({ variant, theme, color, type }),
|
|
95
95
|
...(size === 'badge' && {
|
|
96
|
-
borderColor: theme.palette.background.default
|
|
97
|
-
})
|
|
98
|
-
}))
|
|
96
|
+
borderColor: theme.palette.background.default
|
|
97
|
+
})
|
|
98
|
+
}));
|
|
99
99
|
|
|
100
100
|
// ==============================|| EXTENDED - AVATAR ||============================== //
|
|
101
101
|
|
|
102
|
-
export default function Avatar({
|
|
103
|
-
|
|
104
|
-
children,
|
|
105
|
-
color = 'primary',
|
|
106
|
-
type,
|
|
107
|
-
size = 'md',
|
|
108
|
-
...others
|
|
109
|
-
}) {
|
|
110
|
-
const theme = useTheme()
|
|
102
|
+
export default function Avatar({ variant = 'circular', children, color = 'primary', type, size = 'md', ...others }) {
|
|
103
|
+
const theme = useTheme();
|
|
111
104
|
|
|
112
105
|
return (
|
|
113
106
|
<AvatarStyle variant={variant} theme={theme} color={color} type={type} size={size} {...others}>
|
|
114
107
|
{children}
|
|
115
108
|
</AvatarStyle>
|
|
116
|
-
)
|
|
109
|
+
);
|
|
117
110
|
}
|
|
118
111
|
|
|
119
112
|
Avatar.propTypes = {
|
|
@@ -121,5 +114,5 @@ Avatar.propTypes = {
|
|
|
121
114
|
color: PropTypes.string,
|
|
122
115
|
type: PropTypes.string,
|
|
123
116
|
size: PropTypes.string,
|
|
124
|
-
variant: PropTypes.string
|
|
125
|
-
}
|
|
117
|
+
variant: PropTypes.string
|
|
118
|
+
};
|