@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.
Files changed (253) hide show
  1. package/bitbucket-pipelines.yml +2 -0
  2. package/dist/ApplicaAdmin.d.ts.map +1 -1
  3. package/dist/components/@extended/AnimateButton.d.ts +1 -1
  4. package/dist/components/@extended/AnimateButton.d.ts.map +1 -1
  5. package/dist/components/@extended/Avatar.d.ts.map +1 -1
  6. package/dist/components/@extended/Breadcrumbs.d.ts.map +1 -1
  7. package/dist/components/@extended/IconButton.d.ts.map +1 -1
  8. package/dist/components/@extended/LoadingButton.d.ts.map +1 -1
  9. package/dist/components/@extended/Tooltip.d.ts.map +1 -1
  10. package/dist/components/@extended/Transitions.d.ts.map +1 -1
  11. package/dist/components/@extended/progress/CircularWithLabel.d.ts.map +1 -1
  12. package/dist/components/@extended/progress/CircularWithPath.d.ts.map +1 -1
  13. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.d.ts +1 -1
  14. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.d.ts.map +1 -1
  15. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts.map +1 -1
  16. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavItem.d.ts.map +1 -1
  17. package/dist/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.d.ts.map +1 -1
  18. package/dist/components/Layout/Drawer/DrawerHeader/index.d.ts.map +1 -1
  19. package/dist/components/Layout/Drawer/MiniDrawerStyled.d.ts.map +1 -1
  20. package/dist/components/Layout/Drawer/index.d.ts.map +1 -1
  21. package/dist/components/Layout/Footer.d.ts.map +1 -1
  22. package/dist/components/Layout/Header/AppBarStyled.d.ts.map +1 -1
  23. package/dist/components/Layout/Header/HeaderContent/Notification.d.ts.map +1 -1
  24. package/dist/components/Layout/Header/HeaderContent/NotificationItem.d.ts.map +1 -1
  25. package/dist/components/Layout/Header/HeaderContent/Profile.d.ts.map +1 -1
  26. package/dist/components/Layout/Header/HeaderContent/index.d.ts.map +1 -1
  27. package/dist/components/Layout/Header/index.d.ts.map +1 -1
  28. package/dist/components/Layout/index.d.ts.map +1 -1
  29. package/dist/components/MenuPopover/styles.d.ts.map +1 -1
  30. package/dist/components/Notification.d.ts.map +1 -1
  31. package/dist/components/ScrollX.d.ts.map +1 -1
  32. package/dist/components/ra-buttons/EditInDialogButton.d.ts.map +1 -1
  33. package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
  34. package/dist/components/ra-fields/DateAgoField.d.ts.map +1 -1
  35. package/dist/components/ra-fields/ReadonlyField.d.ts.map +1 -1
  36. package/dist/components/ra-forms/CardForm.d.ts.map +1 -1
  37. package/dist/components/ra-forms/LongForm/useFormRootPath.d.ts.map +1 -1
  38. package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
  39. package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
  40. package/dist/components/ra-lists/Empty.d.ts.map +1 -1
  41. package/dist/components/ra-lists/NotificationList/NotificationList.d.ts.map +1 -1
  42. package/dist/components/ra-lists/NotificationList/button/MarkAsReadedButton.d.ts.map +1 -1
  43. package/dist/components/ra-lists/NotificationList/field/NotificationField.d.ts.map +1 -1
  44. package/dist/contexts/MenuConfigContext.d.ts.map +1 -1
  45. package/dist/contexts/MenuPropTypes.d.ts.map +1 -1
  46. package/dist/dev/useCliErrorCatcher.d.ts +1 -1
  47. package/dist/hooks/useMenu.d.ts.map +1 -1
  48. package/dist/i18n/useI18nCatcher.d.ts +1 -1
  49. package/dist/i18n/useI18nLanguages.d.ts +1 -1
  50. package/dist/i18n/useI18nLanguages.d.ts.map +1 -1
  51. package/dist/i18n/useI18nProvider.d.ts.map +1 -1
  52. package/dist/react-admin.cjs.js +2 -1
  53. package/dist/react-admin.cjs.js.map +1 -0
  54. package/dist/react-admin.es.js +300 -784
  55. package/dist/react-admin.es.js.map +1 -0
  56. package/dist/react-admin.umd.js +2 -1
  57. package/dist/react-admin.umd.js.map +1 -0
  58. package/dist/themes/overrides/OutlinedInput.d.ts.map +1 -1
  59. package/dist/themes/palette.d.ts.map +1 -1
  60. package/dist/themes/theme/theme1.d.ts.map +1 -1
  61. package/dist/themes/theme/theme2.d.ts.map +1 -1
  62. package/dist/themes/theme/theme3.d.ts.map +1 -1
  63. package/dist/themes/theme/theme4.d.ts.map +1 -1
  64. package/dist/themes/theme/theme5.d.ts.map +1 -1
  65. package/dist/themes/theme/theme6.d.ts.map +1 -1
  66. package/dist/themes/theme/theme7.d.ts.map +1 -1
  67. package/dist/themes/theme/theme8.d.ts.map +1 -1
  68. package/dist/utils/index.d.ts +2 -2
  69. package/dist/utils/index.d.ts.map +1 -1
  70. package/dist/utils/lang.d.ts +1 -1
  71. package/dist/utils/lang.d.ts.map +1 -1
  72. package/dist/utils/time.d.ts +2 -1
  73. package/dist/utils/time.d.ts.map +1 -1
  74. package/package.json +2 -2
  75. package/src/Admin.jsx +8 -8
  76. package/src/AdminContext.jsx +9 -9
  77. package/src/ApplicaAdmin.jsx +30 -35
  78. package/src/components/@extended/AnimateButton.jsx +25 -33
  79. package/src/components/@extended/Avatar.jsx +35 -42
  80. package/src/components/@extended/Breadcrumbs.jsx +62 -96
  81. package/src/components/@extended/Dot.jsx +14 -14
  82. package/src/components/@extended/IconButton.jsx +55 -65
  83. package/src/components/@extended/LoadingButton.jsx +84 -86
  84. package/src/components/@extended/Tooltip.jsx +24 -27
  85. package/src/components/@extended/Transitions.jsx +98 -107
  86. package/src/components/@extended/index.jsx +10 -10
  87. package/src/components/@extended/progress/CircularWithLabel.jsx +7 -9
  88. package/src/components/@extended/progress/CircularWithPath.jsx +9 -18
  89. package/src/components/@extended/progress/LinearWithIcon.jsx +5 -5
  90. package/src/components/@extended/progress/LinearWithLabel.jsx +5 -5
  91. package/src/components/@extended/progress/index.jsx +5 -5
  92. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.jsx +112 -131
  93. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.jsx +67 -88
  94. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavItem.jsx +63 -79
  95. package/src/components/Layout/Drawer/DrawerContent/Navigation/index.jsx +28 -28
  96. package/src/components/Layout/Drawer/DrawerContent/index.jsx +7 -7
  97. package/src/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.jsx +13 -15
  98. package/src/components/Layout/Drawer/DrawerHeader/index.jsx +17 -22
  99. package/src/components/Layout/Drawer/HorizontalBar.jsx +17 -17
  100. package/src/components/Layout/Drawer/MiniDrawerStyled.jsx +27 -29
  101. package/src/components/Layout/Drawer/index.jsx +21 -24
  102. package/src/components/Layout/Footer.jsx +7 -12
  103. package/src/components/Layout/Header/AppBarStyled.jsx +26 -28
  104. package/src/components/Layout/Header/HeaderContent/MobileSection.jsx +27 -27
  105. package/src/components/Layout/Header/HeaderContent/Notification.jsx +34 -55
  106. package/src/components/Layout/Header/HeaderContent/NotificationItem.jsx +24 -36
  107. package/src/components/Layout/Header/HeaderContent/Profile.jsx +48 -73
  108. package/src/components/Layout/Header/HeaderContent/index.jsx +16 -18
  109. package/src/components/Layout/Header/index.jsx +25 -43
  110. package/src/components/Layout/index.jsx +36 -52
  111. package/src/components/Loadable.jsx +4 -4
  112. package/src/components/Loader.jsx +7 -7
  113. package/src/components/Logo.jsx +14 -14
  114. package/src/components/MainIcon.jsx +6 -6
  115. package/src/components/MenuPopover/MenuPopover.jsx +15 -15
  116. package/src/components/MenuPopover/getPosition.jsx +40 -40
  117. package/src/components/MenuPopover/index.jsx +3 -3
  118. package/src/components/MenuPopover/styles.jsx +20 -20
  119. package/src/components/Notification.jsx +7 -7
  120. package/src/components/ScrollTop.jsx +13 -13
  121. package/src/components/ScrollX.jsx +4 -4
  122. package/src/components/SmallIcon.jsx +6 -6
  123. package/src/components/ra-buttons/EditInDialogButton.jsx +39 -45
  124. package/src/components/ra-buttons/ImpersonateUserButton.jsx +20 -20
  125. package/src/components/ra-buttons/index.jsx +4 -4
  126. package/src/components/ra-fields/ActionsField.jsx +12 -12
  127. package/src/components/ra-fields/CoverField.jsx +20 -26
  128. package/src/components/ra-fields/DateAgoField.jsx +17 -20
  129. package/src/components/ra-fields/DateField.jsx +14 -14
  130. package/src/components/ra-fields/EmailField.jsx +14 -14
  131. package/src/components/ra-fields/FileField.jsx +23 -23
  132. package/src/components/ra-fields/FunctionField.jsx +5 -5
  133. package/src/components/ra-fields/ImageField.jsx +11 -11
  134. package/src/components/ra-fields/ReadonlyField.jsx +40 -42
  135. package/src/components/ra-fields/ReferenceManyField.jsx +21 -21
  136. package/src/components/ra-fields/SizeField.jsx +15 -15
  137. package/src/components/ra-fields/TextField.jsx +14 -14
  138. package/src/components/ra-fields/index.jsx +15 -15
  139. package/src/components/ra-forms/CardForm.jsx +34 -40
  140. package/src/components/ra-forms/LongForm/useFormRootPath.ts +8 -13
  141. package/src/components/ra-forms/TabbedForm.jsx +10 -10
  142. package/src/components/ra-forms/Toolbar.jsx +15 -15
  143. package/src/components/ra-forms/index.jsx +9 -9
  144. package/src/components/ra-inputs/AutocompleteArrayInput.jsx +7 -7
  145. package/src/components/ra-inputs/AutocompleteInput.jsx +9 -9
  146. package/src/components/ra-inputs/BooleanInput.jsx +19 -19
  147. package/src/components/ra-inputs/DateInput.jsx +13 -13
  148. package/src/components/ra-inputs/FileInput.jsx +33 -33
  149. package/src/components/ra-inputs/ImageInput.jsx +19 -19
  150. package/src/components/ra-inputs/NumberInput.jsx +13 -13
  151. package/src/components/ra-inputs/RecordInput.jsx +39 -39
  152. package/src/components/ra-inputs/ReferenceArrayInput.jsx +10 -10
  153. package/src/components/ra-inputs/ReferenceInput.jsx +10 -10
  154. package/src/components/ra-inputs/ReferenceManyInput.jsx +13 -24
  155. package/src/components/ra-inputs/SearchInput.jsx +6 -6
  156. package/src/components/ra-inputs/SelectArrayInput.jsx +19 -19
  157. package/src/components/ra-inputs/TimeInput.jsx +21 -21
  158. package/src/components/ra-lists/Empty.jsx +32 -37
  159. package/src/components/ra-lists/List.jsx +9 -9
  160. package/src/components/ra-lists/NotificationList/NotificationList.jsx +14 -16
  161. package/src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx +21 -25
  162. package/src/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.jsx +19 -19
  163. package/src/components/ra-lists/NotificationList/button/index.jsx +2 -2
  164. package/src/components/ra-lists/NotificationList/field/NotificationField.jsx +20 -31
  165. package/src/components/ra-lists/NotificationList/field/index.jsx +1 -1
  166. package/src/components/ra-lists/NotificationList/index.jsx +2 -2
  167. package/src/components/ra-lists/index.jsx +5 -5
  168. package/src/components/third-party/SimpleBar.jsx +10 -10
  169. package/src/components/third-party/index.jsx +2 -2
  170. package/src/contexts/MenuConfigContext.jsx +35 -35
  171. package/src/contexts/MenuPropTypes.jsx +7 -7
  172. package/src/contexts/index.jsx +5 -5
  173. package/src/dev/index.jsx +2 -2
  174. package/src/dev/useCliErrorCatcher.jsx +32 -32
  175. package/src/hooks/index.jsx +8 -16
  176. package/src/hooks/useAppConfig.jsx +4 -4
  177. package/src/hooks/useBreadcrumbs.jsx +37 -37
  178. package/src/hooks/useLocalStorage.jsx +16 -16
  179. package/src/hooks/useMenu.jsx +83 -88
  180. package/src/hooks/useMenuConfig.jsx +4 -4
  181. package/src/hooks/useResourceTitle.jsx +13 -13
  182. package/src/hooks/useThemeConfig.jsx +4 -4
  183. package/src/i18n/createI18nProvider.jsx +7 -7
  184. package/src/i18n/index.jsx +4 -4
  185. package/src/i18n/useI18nCatcher.jsx +26 -26
  186. package/src/i18n/useI18nLanguages.jsx +12 -16
  187. package/src/i18n/useI18nProvider.jsx +3 -4
  188. package/src/themes/getColors.jsx +8 -8
  189. package/src/themes/getShadow.jsx +17 -17
  190. package/src/themes/index.jsx +29 -29
  191. package/src/themes/overrides/Accordion.jsx +9 -9
  192. package/src/themes/overrides/AccordionDetails.jsx +5 -5
  193. package/src/themes/overrides/AccordionSummary.jsx +11 -11
  194. package/src/themes/overrides/Alert.jsx +21 -21
  195. package/src/themes/overrides/AlertTitle.jsx +5 -5
  196. package/src/themes/overrides/Autocomplete.jsx +9 -9
  197. package/src/themes/overrides/Badge.jsx +12 -12
  198. package/src/themes/overrides/Button.jsx +62 -62
  199. package/src/themes/overrides/ButtonBase.jsx +4 -4
  200. package/src/themes/overrides/ButtonGroup.jsx +4 -4
  201. package/src/themes/overrides/CardContent.jsx +6 -6
  202. package/src/themes/overrides/Checkbox.jsx +31 -31
  203. package/src/themes/overrides/Chip.jsx +22 -22
  204. package/src/themes/overrides/Dialog.jsx +7 -7
  205. package/src/themes/overrides/DialogContentText.jsx +5 -5
  206. package/src/themes/overrides/DialogTitle.jsx +5 -5
  207. package/src/themes/overrides/Fab.jsx +21 -21
  208. package/src/themes/overrides/IconButton.jsx +8 -8
  209. package/src/themes/overrides/InputBase.jsx +3 -3
  210. package/src/themes/overrides/InputLabel.jsx +8 -8
  211. package/src/themes/overrides/LinearProgress.jsx +6 -6
  212. package/src/themes/overrides/Link.jsx +4 -4
  213. package/src/themes/overrides/ListItemButton.jsx +7 -7
  214. package/src/themes/overrides/ListItemIcon.jsx +5 -5
  215. package/src/themes/overrides/LoadingButton.jsx +6 -6
  216. package/src/themes/overrides/OutlinedInput.jsx +20 -21
  217. package/src/themes/overrides/Pagination.jsx +4 -4
  218. package/src/themes/overrides/PaginationItem.jsx +55 -55
  219. package/src/themes/overrides/Popover.jsx +5 -5
  220. package/src/themes/overrides/Radio.jsx +30 -30
  221. package/src/themes/overrides/Slider.jsx +20 -20
  222. package/src/themes/overrides/Switch.jsx +26 -26
  223. package/src/themes/overrides/Tab.jsx +7 -7
  224. package/src/themes/overrides/TableBody.jsx +11 -11
  225. package/src/themes/overrides/TableCell.jsx +12 -12
  226. package/src/themes/overrides/TableFooter.jsx +5 -5
  227. package/src/themes/overrides/TableHead.jsx +5 -5
  228. package/src/themes/overrides/TablePagination.jsx +6 -6
  229. package/src/themes/overrides/TableRow.jsx +10 -10
  230. package/src/themes/overrides/Tabs.jsx +5 -5
  231. package/src/themes/overrides/ToggleButton.jsx +7 -7
  232. package/src/themes/overrides/Tooltip.jsx +5 -5
  233. package/src/themes/overrides/TreeItem.jsx +7 -7
  234. package/src/themes/overrides/Typography.jsx +5 -5
  235. package/src/themes/overrides/index.jsx +47 -47
  236. package/src/themes/palette.jsx +22 -34
  237. package/src/themes/shadows.jsx +4 -4
  238. package/src/themes/theme/default.jsx +17 -17
  239. package/src/themes/theme/index.jsx +23 -23
  240. package/src/themes/theme/theme1.jsx +24 -46
  241. package/src/themes/theme/theme2.jsx +24 -46
  242. package/src/themes/theme/theme3.jsx +24 -46
  243. package/src/themes/theme/theme4.jsx +24 -46
  244. package/src/themes/theme/theme5.jsx +24 -46
  245. package/src/themes/theme/theme6.jsx +24 -46
  246. package/src/themes/theme/theme7.jsx +24 -46
  247. package/src/themes/theme/theme8.jsx +24 -46
  248. package/src/themes/typography.jsx +16 -16
  249. package/src/utils/{lang.js → lang.ts} +4 -4
  250. package/src/utils/time.ts +14 -0
  251. package/vite.config.js +11 -10
  252. package/src/utils/time.js +0 -13
  253. /package/src/utils/{index.js → index.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  // ==============================|| PRESET THEME - Theme4 Blue ||============================== //
2
2
 
3
3
  const Theme5 = (colors, mode) => {
4
- const { grey } = colors
4
+ const { grey } = colors;
5
5
  const greyColors = {
6
6
  0: grey[0],
7
7
  50: grey[1],
@@ -19,44 +19,22 @@ const Theme5 = (colors, mode) => {
19
19
  A200: grey[12],
20
20
  A400: grey[13],
21
21
  A700: grey[14],
22
- A800: grey[16],
23
- }
24
- const contrastText = '#fff'
22
+ A800: grey[16]
23
+ };
24
+ const contrastText = '#fff';
25
25
 
26
- let primaryColors = [
27
- '#fff4e6',
28
- '#ffdfb8',
29
- '#ffc98f',
30
- '#ffb066',
31
- '#ff943d',
32
- '#f27013',
33
- '#cc5206',
34
- '#a63a00',
35
- '#802800',
36
- '#591900',
37
- ]
38
- let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21']
39
- let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900']
40
- let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694']
41
- let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A']
26
+ let primaryColors = ['#fff4e6', '#ffdfb8', '#ffc98f', '#ffb066', '#ff943d', '#f27013', '#cc5206', '#a63a00', '#802800', '#591900'];
27
+ let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21'];
28
+ let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900'];
29
+ let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694'];
30
+ let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A'];
42
31
 
43
32
  if (mode === 'dark') {
44
- primaryColors = [
45
- '#32221a',
46
- '#4a2b18',
47
- '#5e371b',
48
- '#7d4319',
49
- '#a85317',
50
- '#d26415',
51
- '#e9883a',
52
- '#f4a962',
53
- '#f8c48c',
54
- '#fbdbb5',
55
- ]
56
- errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf']
57
- warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577']
58
- infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb']
59
- successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b']
33
+ primaryColors = ['#32221a', '#4a2b18', '#5e371b', '#7d4319', '#a85317', '#d26415', '#e9883a', '#f4a962', '#f8c48c', '#fbdbb5'];
34
+ errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf'];
35
+ warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577'];
36
+ infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb'];
37
+ successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b'];
60
38
  }
61
39
 
62
40
  return {
@@ -71,7 +49,7 @@ const Theme5 = (colors, mode) => {
71
49
  700: primaryColors[7],
72
50
  darker: primaryColors[8],
73
51
  900: primaryColors[9],
74
- contrastText,
52
+ contrastText
75
53
  },
76
54
  secondary: {
77
55
  lighter: greyColors[100],
@@ -87,7 +65,7 @@ const Theme5 = (colors, mode) => {
87
65
  A100: greyColors[0],
88
66
  A200: greyColors.A400,
89
67
  A300: greyColors.A700,
90
- contrastText: greyColors[0],
68
+ contrastText: greyColors[0]
91
69
  },
92
70
  error: {
93
71
  lighter: errorColors[0],
@@ -95,7 +73,7 @@ const Theme5 = (colors, mode) => {
95
73
  main: errorColors[2],
96
74
  dark: errorColors[3],
97
75
  darker: errorColors[4],
98
- contrastText,
76
+ contrastText
99
77
  },
100
78
  warning: {
101
79
  lighter: warningColors[0],
@@ -103,7 +81,7 @@ const Theme5 = (colors, mode) => {
103
81
  main: warningColors[2],
104
82
  dark: warningColors[3],
105
83
  darker: warningColors[4],
106
- contrastText: greyColors[100],
84
+ contrastText: greyColors[100]
107
85
  },
108
86
  info: {
109
87
  lighter: infoColors[0],
@@ -111,7 +89,7 @@ const Theme5 = (colors, mode) => {
111
89
  main: infoColors[2],
112
90
  dark: infoColors[3],
113
91
  darker: infoColors[4],
114
- contrastText,
92
+ contrastText
115
93
  },
116
94
  success: {
117
95
  lighter: successColors[0],
@@ -119,10 +97,10 @@ const Theme5 = (colors, mode) => {
119
97
  main: successColors[2],
120
98
  dark: successColors[3],
121
99
  darker: successColors[4],
122
- contrastText,
100
+ contrastText
123
101
  },
124
- grey: greyColors,
125
- }
126
- }
102
+ grey: greyColors
103
+ };
104
+ };
127
105
 
128
- export default Theme5
106
+ export default Theme5;
@@ -1,7 +1,7 @@
1
1
  // ==============================|| PRESET THEME - Theme4 Blue ||============================== //
2
2
 
3
3
  const Theme6 = (colors, mode) => {
4
- const { grey } = colors
4
+ const { grey } = colors;
5
5
  const greyColors = {
6
6
  0: grey[0],
7
7
  50: grey[1],
@@ -19,44 +19,22 @@ const Theme6 = (colors, mode) => {
19
19
  A200: grey[12],
20
20
  A400: grey[13],
21
21
  A700: grey[14],
22
- A800: grey[16],
23
- }
24
- const contrastText = '#fff'
22
+ A800: grey[16]
23
+ };
24
+ const contrastText = '#fff';
25
25
 
26
- let primaryColors = [
27
- '#e1f0ef',
28
- '#c8e3e2',
29
- '#9ad6d6',
30
- '#71c6c9',
31
- '#4bb5bd',
32
- '#2aa1af',
33
- '#1a7b8a',
34
- '#0e5563',
35
- '#06323d',
36
- '#021217',
37
- ]
38
- let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21']
39
- let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900']
40
- let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694']
41
- let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A']
26
+ let primaryColors = ['#e1f0ef', '#c8e3e2', '#9ad6d6', '#71c6c9', '#4bb5bd', '#2aa1af', '#1a7b8a', '#0e5563', '#06323d', '#021217'];
27
+ let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21'];
28
+ let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900'];
29
+ let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694'];
30
+ let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A'];
42
31
 
43
32
  if (mode === 'dark') {
44
- primaryColors = [
45
- '#1c2628',
46
- '#1d3539',
47
- '#22454a',
48
- '#23595f',
49
- '#26737c',
50
- '#288d99',
51
- '#47a6ad',
52
- '#6dbec0',
53
- '#96d0d0',
54
- '#c5dfde',
55
- ]
56
- errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf']
57
- warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577']
58
- infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb']
59
- successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b']
33
+ primaryColors = ['#1c2628', '#1d3539', '#22454a', '#23595f', '#26737c', '#288d99', '#47a6ad', '#6dbec0', '#96d0d0', '#c5dfde'];
34
+ errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf'];
35
+ warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577'];
36
+ infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb'];
37
+ successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b'];
60
38
  }
61
39
 
62
40
  return {
@@ -71,7 +49,7 @@ const Theme6 = (colors, mode) => {
71
49
  700: primaryColors[7],
72
50
  darker: primaryColors[8],
73
51
  900: primaryColors[9],
74
- contrastText,
52
+ contrastText
75
53
  },
76
54
  secondary: {
77
55
  lighter: greyColors[100],
@@ -87,7 +65,7 @@ const Theme6 = (colors, mode) => {
87
65
  A100: greyColors[0],
88
66
  A200: greyColors.A400,
89
67
  A300: greyColors.A700,
90
- contrastText: greyColors[0],
68
+ contrastText: greyColors[0]
91
69
  },
92
70
  error: {
93
71
  lighter: errorColors[0],
@@ -95,7 +73,7 @@ const Theme6 = (colors, mode) => {
95
73
  main: errorColors[2],
96
74
  dark: errorColors[3],
97
75
  darker: errorColors[4],
98
- contrastText,
76
+ contrastText
99
77
  },
100
78
  warning: {
101
79
  lighter: warningColors[0],
@@ -103,7 +81,7 @@ const Theme6 = (colors, mode) => {
103
81
  main: warningColors[2],
104
82
  dark: warningColors[3],
105
83
  darker: warningColors[4],
106
- contrastText: greyColors[100],
84
+ contrastText: greyColors[100]
107
85
  },
108
86
  info: {
109
87
  lighter: infoColors[0],
@@ -111,7 +89,7 @@ const Theme6 = (colors, mode) => {
111
89
  main: infoColors[2],
112
90
  dark: infoColors[3],
113
91
  darker: infoColors[4],
114
- contrastText,
92
+ contrastText
115
93
  },
116
94
  success: {
117
95
  lighter: successColors[0],
@@ -119,10 +97,10 @@ const Theme6 = (colors, mode) => {
119
97
  main: successColors[2],
120
98
  dark: successColors[3],
121
99
  darker: successColors[4],
122
- contrastText,
100
+ contrastText
123
101
  },
124
- grey: greyColors,
125
- }
126
- }
102
+ grey: greyColors
103
+ };
104
+ };
127
105
 
128
- export default Theme6
106
+ export default Theme6;
@@ -1,7 +1,7 @@
1
1
  // ==============================|| PRESET THEME - Theme7 Green ||============================== //
2
2
 
3
3
  const Theme7 = (colors, mode) => {
4
- const { grey } = colors
4
+ const { grey } = colors;
5
5
  const greyColors = {
6
6
  0: grey[0],
7
7
  50: grey[1],
@@ -19,44 +19,22 @@ const Theme7 = (colors, mode) => {
19
19
  A200: grey[12],
20
20
  A400: grey[13],
21
21
  A700: grey[14],
22
- A800: grey[16],
23
- }
24
- const contrastText = '#fff'
22
+ A800: grey[16]
23
+ };
24
+ const contrastText = '#fff';
25
25
 
26
- let primaryColors = [
27
- '#d1e8d99c',
28
- '#8cdba9',
29
- '#63cf8e',
30
- '#3ec277',
31
- '#1db564',
32
- '#00a854',
33
- '#008245',
34
- '#005c34',
35
- '#003620',
36
- '#000f0a',
37
- ]
38
- let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21']
39
- let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900']
40
- let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694']
41
- let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A']
26
+ let primaryColors = ['#d1e8d99c', '#8cdba9', '#63cf8e', '#3ec277', '#1db564', '#00a854', '#008245', '#005c34', '#003620', '#000f0a'];
27
+ let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21'];
28
+ let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900'];
29
+ let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694'];
30
+ let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A'];
42
31
 
43
32
  if (mode === 'dark') {
44
- primaryColors = [
45
- '#1a2721',
46
- '#173728',
47
- '#15472e',
48
- '#115c36',
49
- '#0b7841',
50
- '#05934c',
51
- '#1da65d',
52
- '#3cba73',
53
- '#61ca8b',
54
- '#8ad7a6',
55
- ]
56
- errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf']
57
- warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577']
58
- infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb']
59
- successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b']
33
+ primaryColors = ['#1a2721', '#173728', '#15472e', '#115c36', '#0b7841', '#05934c', '#1da65d', '#3cba73', '#61ca8b', '#8ad7a6'];
34
+ errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf'];
35
+ warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577'];
36
+ infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb'];
37
+ successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b'];
60
38
  }
61
39
 
62
40
  return {
@@ -71,7 +49,7 @@ const Theme7 = (colors, mode) => {
71
49
  700: primaryColors[7],
72
50
  darker: primaryColors[8],
73
51
  900: primaryColors[9],
74
- contrastText,
52
+ contrastText
75
53
  },
76
54
  secondary: {
77
55
  lighter: greyColors[100],
@@ -87,7 +65,7 @@ const Theme7 = (colors, mode) => {
87
65
  A100: greyColors[0],
88
66
  A200: greyColors.A400,
89
67
  A300: greyColors.A700,
90
- contrastText: greyColors[0],
68
+ contrastText: greyColors[0]
91
69
  },
92
70
  error: {
93
71
  lighter: errorColors[0],
@@ -95,7 +73,7 @@ const Theme7 = (colors, mode) => {
95
73
  main: errorColors[2],
96
74
  dark: errorColors[3],
97
75
  darker: errorColors[4],
98
- contrastText,
76
+ contrastText
99
77
  },
100
78
  warning: {
101
79
  lighter: warningColors[0],
@@ -103,7 +81,7 @@ const Theme7 = (colors, mode) => {
103
81
  main: warningColors[2],
104
82
  dark: warningColors[3],
105
83
  darker: warningColors[4],
106
- contrastText: greyColors[100],
84
+ contrastText: greyColors[100]
107
85
  },
108
86
  info: {
109
87
  lighter: infoColors[0],
@@ -111,7 +89,7 @@ const Theme7 = (colors, mode) => {
111
89
  main: infoColors[2],
112
90
  dark: infoColors[3],
113
91
  darker: infoColors[4],
114
- contrastText,
92
+ contrastText
115
93
  },
116
94
  success: {
117
95
  lighter: successColors[0],
@@ -119,10 +97,10 @@ const Theme7 = (colors, mode) => {
119
97
  main: successColors[2],
120
98
  dark: successColors[3],
121
99
  darker: successColors[4],
122
- contrastText,
100
+ contrastText
123
101
  },
124
- grey: greyColors,
125
- }
126
- }
102
+ grey: greyColors
103
+ };
104
+ };
127
105
 
128
- export default Theme7
106
+ export default Theme7;
@@ -1,7 +1,7 @@
1
1
  // ==============================|| PRESET THEME - Theme8 ||============================== //
2
2
 
3
3
  const Theme8 = (colors, mode) => {
4
- const { grey } = colors
4
+ const { grey } = colors;
5
5
  const greyColors = {
6
6
  0: grey[0],
7
7
  50: grey[1],
@@ -19,44 +19,22 @@ const Theme8 = (colors, mode) => {
19
19
  A200: grey[12],
20
20
  A400: grey[13],
21
21
  A700: grey[14],
22
- A800: grey[16],
23
- }
24
- const contrastText = '#fff'
22
+ A800: grey[16]
23
+ };
24
+ const contrastText = '#fff';
25
25
 
26
- let primaryColors = [
27
- '#c1d6d066',
28
- '#81c9b9',
29
- '#5bbda9',
30
- '#38b09c',
31
- '#1aa391',
32
- '#009688',
33
- '#007069',
34
- '#004a47',
35
- '#002424',
36
- '#000000',
37
- ]
38
- let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21']
39
- let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900']
40
- let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694']
41
- let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A']
26
+ let primaryColors = ['#c1d6d066', '#81c9b9', '#5bbda9', '#38b09c', '#1aa391', '#009688', '#007069', '#004a47', '#002424', '#000000'];
27
+ let errorColors = ['#FDE8E7', '#F25E52', '#F04134', '#EE3B2F', '#E92A21'];
28
+ let warningColors = ['#FFF7E0', '#FFC926', '#FFBF00', '#FFB900', '#FFA900'];
29
+ let infoColors = ['#E0F4F5', '#26B0BA', '#00A2AE', '#009AA7', '#008694'];
30
+ let successColors = ['#E0F5EA', '#26B56E', '#00A854', '#00A04D', '#008D3A'];
42
31
 
43
32
  if (mode === 'dark') {
44
- primaryColors = [
45
- '#1a2524',
46
- '#173331',
47
- '#15423e',
48
- '#11544e',
49
- '#0b6c63',
50
- '#058478',
51
- '#1a9686',
52
- '#37a996',
53
- '#59b8a5',
54
- '#7fc6b6',
55
- ]
56
- errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf']
57
- warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577']
58
- infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb']
59
- successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b']
33
+ primaryColors = ['#1a2524', '#173331', '#15423e', '#11544e', '#0b6c63', '#058478', '#1a9686', '#37a996', '#59b8a5', '#7fc6b6'];
34
+ errorColors = ['#321d1d', '#7d2e28', '#d13c31', '#e66859', '#f8baaf'];
35
+ warningColors = ['#342c1a', '#836611', '#dda705', '#e9bf28', '#f8e577'];
36
+ infoColors = ['#1a2628', '#11595f', '#058e98', '#1ea6aa', '#64cfcb'];
37
+ successColors = ['#1a2721', '#115c36', '#05934c', '#1da65d', '#61ca8b'];
60
38
  }
61
39
 
62
40
  return {
@@ -71,7 +49,7 @@ const Theme8 = (colors, mode) => {
71
49
  700: primaryColors[7],
72
50
  darker: primaryColors[8],
73
51
  900: primaryColors[9],
74
- contrastText,
52
+ contrastText
75
53
  },
76
54
  secondary: {
77
55
  lighter: greyColors[100],
@@ -87,7 +65,7 @@ const Theme8 = (colors, mode) => {
87
65
  A100: greyColors[0],
88
66
  A200: greyColors.A400,
89
67
  A300: greyColors.A700,
90
- contrastText: greyColors[0],
68
+ contrastText: greyColors[0]
91
69
  },
92
70
  error: {
93
71
  lighter: errorColors[0],
@@ -95,7 +73,7 @@ const Theme8 = (colors, mode) => {
95
73
  main: errorColors[2],
96
74
  dark: errorColors[3],
97
75
  darker: errorColors[4],
98
- contrastText,
76
+ contrastText
99
77
  },
100
78
  warning: {
101
79
  lighter: warningColors[0],
@@ -103,7 +81,7 @@ const Theme8 = (colors, mode) => {
103
81
  main: warningColors[2],
104
82
  dark: warningColors[3],
105
83
  darker: warningColors[4],
106
- contrastText: greyColors[100],
84
+ contrastText: greyColors[100]
107
85
  },
108
86
  info: {
109
87
  lighter: infoColors[0],
@@ -111,7 +89,7 @@ const Theme8 = (colors, mode) => {
111
89
  main: infoColors[2],
112
90
  dark: infoColors[3],
113
91
  darker: infoColors[4],
114
- contrastText,
92
+ contrastText
115
93
  },
116
94
  success: {
117
95
  lighter: successColors[0],
@@ -119,10 +97,10 @@ const Theme8 = (colors, mode) => {
119
97
  main: successColors[2],
120
98
  dark: successColors[3],
121
99
  darker: successColors[4],
122
- contrastText,
100
+ contrastText
123
101
  },
124
- grey: greyColors,
125
- }
126
- }
102
+ grey: greyColors
103
+ };
104
+ };
127
105
 
128
- export default Theme8
106
+ export default Theme8;
@@ -10,62 +10,62 @@ const Typography = (fontFamily) => ({
10
10
  h1: {
11
11
  fontWeight: 600,
12
12
  fontSize: '2.375rem',
13
- lineHeight: 1.21,
13
+ lineHeight: 1.21
14
14
  },
15
15
  h2: {
16
16
  fontWeight: 600,
17
17
  fontSize: '1.875rem',
18
- lineHeight: 1.27,
18
+ lineHeight: 1.27
19
19
  },
20
20
  h3: {
21
21
  fontWeight: 600,
22
22
  fontSize: '1.5rem',
23
- lineHeight: 1.33,
23
+ lineHeight: 1.33
24
24
  },
25
25
  h4: {
26
26
  fontWeight: 600,
27
27
  fontSize: '1.25rem',
28
- lineHeight: 1.4,
28
+ lineHeight: 1.4
29
29
  },
30
30
  h5: {
31
31
  fontWeight: 600,
32
32
  fontSize: '1rem',
33
- lineHeight: 1.5,
33
+ lineHeight: 1.5
34
34
  },
35
35
  h6: {
36
36
  fontWeight: 400,
37
37
  fontSize: '0.875rem',
38
- lineHeight: 1.57,
38
+ lineHeight: 1.57
39
39
  },
40
40
  caption: {
41
41
  fontWeight: 400,
42
42
  fontSize: '0.75rem',
43
- lineHeight: 1.66,
43
+ lineHeight: 1.66
44
44
  },
45
45
  body1: {
46
46
  fontSize: '0.875rem',
47
- lineHeight: 1.57,
47
+ lineHeight: 1.57
48
48
  },
49
49
  body2: {
50
50
  fontSize: '0.75rem',
51
- lineHeight: 1.66,
51
+ lineHeight: 1.66
52
52
  },
53
53
  subtitle1: {
54
54
  fontSize: '0.875rem',
55
55
  fontWeight: 600,
56
- lineHeight: 1.57,
56
+ lineHeight: 1.57
57
57
  },
58
58
  subtitle2: {
59
59
  fontSize: '0.75rem',
60
60
  fontWeight: 500,
61
- lineHeight: 1.66,
61
+ lineHeight: 1.66
62
62
  },
63
63
  overline: {
64
- lineHeight: 1.66,
64
+ lineHeight: 1.66
65
65
  },
66
66
  button: {
67
- textTransform: 'capitalize',
68
- },
69
- })
67
+ textTransform: 'capitalize'
68
+ }
69
+ });
70
70
 
71
- export default Typography
71
+ export default Typography;
@@ -1,10 +1,10 @@
1
- export function uuid() {
2
- var d = new Date().getTime();
1
+ export function uuid(): string {
2
+ let d = new Date().getTime();
3
3
  if (window.performance && typeof window.performance.now === 'function') {
4
4
  d += performance.now(); //use high-precision timer if available
5
5
  }
6
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
7
- var r = (d + Math.random() * 16) % 16 | 0;
6
+ const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
7
+ const r = (d + Math.random() * 16) % 16 | 0;
8
8
  d = Math.floor(d / 16);
9
9
  return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);
10
10
  });
@@ -0,0 +1,14 @@
1
+ import dayjs from 'dayjs';
2
+
3
+ const parseTime = (time: string) => {
4
+ const args = time.split(':');
5
+ if (args.length === 1) {
6
+ args.push('00');
7
+ }
8
+ const hour = parseInt(args[0]);
9
+ const minute = parseInt(args[1]);
10
+ const d = dayjs().hour(hour).minute(minute);
11
+ return d;
12
+ };
13
+
14
+ export { parseTime };
package/vite.config.js CHANGED
@@ -1,12 +1,12 @@
1
- import * as packageJson from './package.json'
1
+ import * as packageJson from './package.json';
2
2
 
3
- import EsLint from 'vite-plugin-linter'
4
- import { defineConfig } from 'vite'
5
- import dts from 'vite-plugin-dts'
6
- import react from '@vitejs/plugin-react'
7
- import { resolve } from 'node:path'
3
+ import EsLint from 'vite-plugin-linter';
4
+ import { defineConfig } from 'vite';
5
+ import dts from 'vite-plugin-dts';
6
+ import react from '@vitejs/plugin-react';
7
+ import { resolve } from 'node:path';
8
8
 
9
- const { EsLinter, linterPlugin } = EsLint
9
+ const { EsLinter, linterPlugin } = EsLint;
10
10
  export default defineConfig((configEnv) => ({
11
11
  plugins: [
12
12
  dts({
@@ -22,6 +22,7 @@ export default defineConfig((configEnv) => ({
22
22
  include: ['react', 'react-dom', 'react-admin']
23
23
  },
24
24
  build: {
25
+ sourcemap: true,
25
26
  lib: {
26
27
  entry: resolve('src', 'index.jsx'),
27
28
  name: 'react-admin',
@@ -31,9 +32,9 @@ export default defineConfig((configEnv) => ({
31
32
  rollupOptions: {
32
33
  onwarn(warning, warn) {
33
34
  if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message.includes(`'use client'`)) {
34
- return
35
+ return;
35
36
  }
36
- warn(warning)
37
+ warn(warning);
37
38
  },
38
39
  external: Object.keys(packageJson.peerDependencies || {}).concat([
39
40
  '@ant-design/icons',
@@ -71,4 +72,4 @@ export default defineConfig((configEnv) => ({
71
72
  }
72
73
  }
73
74
  }
74
- }))
75
+ }));
package/src/utils/time.js DELETED
@@ -1,13 +0,0 @@
1
- import dayjs from 'dayjs';
2
-
3
- const parseTime = (time) => {
4
- const args = time.split(':');
5
- if (args.length === 1) {
6
- args.push('00');
7
- }
8
-
9
- const d = dayjs().hour(args[0]).minute(args[1]);
10
- return d;
11
- };
12
-
13
- export { parseTime };
File without changes