@applica-software-guru/react-admin 1.0.32 → 1.0.34

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 (350) hide show
  1. package/.eslintrc.json +43 -0
  2. package/.husky/pre-commit +4 -0
  3. package/.nvmrc +1 -0
  4. package/.prettierrc +8 -0
  5. package/bitbucket-pipelines.yml +30 -0
  6. package/dist/Admin.d.ts +1 -1
  7. package/dist/ApplicaAdmin.d.ts +3 -3
  8. package/dist/ApplicaAdmin.d.ts.map +1 -1
  9. package/dist/components/@extended/AnimateButton.d.ts +5 -5
  10. package/dist/components/@extended/Avatar.d.ts +3 -3
  11. package/dist/components/@extended/Breadcrumbs.d.ts +5 -5
  12. package/dist/components/@extended/Dot.d.ts +1 -1
  13. package/dist/components/@extended/Tooltip.d.ts +1 -1
  14. package/dist/components/ActionsMenu.d.ts +1 -1
  15. package/dist/components/ActionsMenu.d.ts.map +1 -1
  16. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts +1 -1
  17. package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts.map +1 -1
  18. package/dist/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.d.ts +5 -5
  19. package/dist/components/Layout/Header/AppBarStyled.d.ts +13 -13
  20. package/dist/components/Layout/Header/HeaderContent/NotificationItem.d.ts +3 -3
  21. package/dist/components/Logo.d.ts +2 -2
  22. package/dist/components/MenuPopover/MenuPopover.d.ts +1 -1
  23. package/dist/components/Notification.d.ts +5 -1
  24. package/dist/components/Notification.d.ts.map +1 -1
  25. package/dist/components/ra-buttons/CreateInDialogButton.d.ts +16 -1
  26. package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
  27. package/dist/components/ra-buttons/ImpersonateUserButton.d.ts +1 -1
  28. package/dist/components/ra-fields/ActionsField.d.ts +1 -1
  29. package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
  30. package/dist/components/ra-fields/AttachmentField.d.ts +19 -1
  31. package/dist/components/ra-fields/AttachmentField.d.ts.map +1 -1
  32. package/dist/components/ra-fields/BaseAttachmentField.d.ts +2 -2
  33. package/dist/components/ra-fields/CoverField.d.ts +19 -1
  34. package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
  35. package/dist/components/ra-fields/EmailField.d.ts +12 -1
  36. package/dist/components/ra-fields/FileField.d.ts +19 -1
  37. package/dist/components/ra-fields/FileField.d.ts.map +1 -1
  38. package/dist/components/ra-fields/ImageField.d.ts +15 -1
  39. package/dist/components/ra-fields/ImageField.d.ts.map +1 -1
  40. package/dist/components/ra-fields/ReadonlyField.d.ts +1 -1
  41. package/dist/components/ra-fields/ReferenceManyField.d.ts +32 -2
  42. package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
  43. package/dist/components/ra-forms/Edit.d.ts +24 -1
  44. package/dist/components/ra-forms/Edit.d.ts.map +1 -1
  45. package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts +1 -1
  46. package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts.map +1 -1
  47. package/dist/components/ra-forms/LongForm/LongFormTab.d.ts +4 -4
  48. package/dist/components/ra-forms/LongForm/LongFormTab.d.ts.map +1 -1
  49. package/dist/components/ra-forms/LongForm/LongFormTabs.d.ts +2 -2
  50. package/dist/components/ra-forms/SimpleForm.d.ts +13 -1
  51. package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
  52. package/dist/components/ra-forms/TabbedForm.d.ts +9 -1
  53. package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
  54. package/dist/components/ra-forms/Toolbar.d.ts +5 -1
  55. package/dist/components/ra-inputs/AttachmentInput.d.ts +20 -1
  56. package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
  57. package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts +1 -2
  58. package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts.map +1 -1
  59. package/dist/components/ra-inputs/AutocompleteInput.d.ts +1 -2
  60. package/dist/components/ra-inputs/AutocompleteInput.d.ts.map +1 -1
  61. package/dist/components/ra-inputs/BooleanInput.d.ts +19 -2
  62. package/dist/components/ra-inputs/BooleanInput.d.ts.map +1 -1
  63. package/dist/components/ra-inputs/DateInput.d.ts +11 -1
  64. package/dist/components/ra-inputs/FileInput.d.ts +21 -1
  65. package/dist/components/ra-inputs/FileInput.d.ts.map +1 -1
  66. package/dist/components/ra-inputs/LabeledInput.d.ts +2 -2
  67. package/dist/components/ra-inputs/NumberInput.d.ts +19 -2
  68. package/dist/components/ra-inputs/RecordInput.d.ts +1 -1
  69. package/dist/components/ra-inputs/ReferenceArrayInput.d.ts +25 -2
  70. package/dist/components/ra-inputs/ReferenceArrayInput.d.ts.map +1 -1
  71. package/dist/components/ra-inputs/ReferenceInput.d.ts +26 -2
  72. package/dist/components/ra-inputs/ReferenceInput.d.ts.map +1 -1
  73. package/dist/components/ra-inputs/ReferenceManyInput.d.ts +34 -2
  74. package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
  75. package/dist/components/ra-inputs/SelectArrayInput.d.ts +18 -1
  76. package/dist/components/ra-inputs/SelectInput.d.ts +21 -1
  77. package/dist/components/ra-inputs/SmartTextInput.d.ts +17 -1
  78. package/dist/components/ra-inputs/SmartTextInput.d.ts.map +1 -1
  79. package/dist/components/ra-inputs/TextInput.d.ts +16 -2
  80. package/dist/components/ra-inputs/TimeInput.d.ts +11 -1
  81. package/dist/components/ra-lists/Datagrid.d.ts +616 -2
  82. package/dist/components/ra-lists/List.d.ts +28 -2
  83. package/dist/contexts/AppConfigContext.d.ts +1 -1
  84. package/dist/contexts/MenuConfigContext.d.ts +4 -4
  85. package/dist/dev/useCliErrorCatcher.d.ts +5 -5
  86. package/dist/hooks/useAppConfig.d.ts +1 -1
  87. package/dist/hooks/useBreadcrumbs.d.ts +2 -2
  88. package/dist/hooks/useMenu.d.ts +2 -2
  89. package/dist/hooks/useMenu.d.ts.map +1 -1
  90. package/dist/hooks/useMenuConfig.d.ts +2 -2
  91. package/dist/i18n/createI18nProvider.d.ts +1 -1
  92. package/dist/i18n/useI18nCatcher.d.ts +4 -4
  93. package/dist/i18n/useI18nLanguages.d.ts +4 -4
  94. package/dist/i18n/useI18nProvider.d.ts +2 -2
  95. package/dist/index.d.ts +1 -1
  96. package/dist/react-admin.cjs.js +25 -25
  97. package/dist/react-admin.es.js +304 -315
  98. package/dist/react-admin.umd.js +25 -25
  99. package/dist/themes/overrides/PaginationItem.d.ts +72 -72
  100. package/jsconfig.json +31 -0
  101. package/jsconfig.node.json +10 -0
  102. package/package.json +6 -5
  103. package/playground/config-overrides.js +31 -0
  104. package/playground/jsconfig.json +9 -0
  105. package/playground/package-lock.json +17764 -0
  106. package/playground/package.json +69 -0
  107. package/playground/public/favicon-dark.png +0 -0
  108. package/playground/public/favicon-light.png +0 -0
  109. package/playground/public/index.html +46 -0
  110. package/playground/src/App.js +49 -0
  111. package/playground/src/build.json +1 -0
  112. package/playground/src/components/index.js +5 -0
  113. package/playground/src/components/pages/CustomPage.jsx +7 -0
  114. package/playground/src/components/pages/index.jsx +2 -0
  115. package/playground/src/components/ra-buttons/index.js +1 -0
  116. package/playground/src/components/ra-fields/UserPictureField.js +20 -0
  117. package/playground/src/components/ra-fields/index.js +2 -0
  118. package/playground/src/components/ra-forms/DeviceForm.js +36 -0
  119. package/playground/src/components/ra-forms/I18nMessageForm.js +24 -0
  120. package/playground/src/components/ra-forms/UserForm.js +51 -0
  121. package/playground/src/components/ra-forms/index.js +5 -0
  122. package/playground/src/components/ra-inputs/LangSelectInput.js +4 -0
  123. package/playground/src/components/ra-inputs/YesOrNoSelectInput.js +14 -0
  124. package/playground/src/components/ra-inputs/index.js +3 -0
  125. package/playground/src/components/ra-lists/DeviceList.js +33 -0
  126. package/playground/src/components/ra-lists/I18nMessageList.js +20 -0
  127. package/playground/src/components/ra-lists/UserList.js +96 -0
  128. package/playground/src/components/ra-lists/index.js +4 -0
  129. package/playground/src/config.js +19 -0
  130. package/playground/src/contexts/index.js +1 -0
  131. package/playground/src/hooks/index.js +1 -0
  132. package/playground/src/index.js +10 -0
  133. package/playground/src/menu.js +72 -0
  134. package/playground/src/react-app-env.d.js +1 -0
  135. package/playground/src/reportWebVitals.js +13 -0
  136. package/playground/src/resource/device.js +23 -0
  137. package/playground/src/resource/i18n-message.js +29 -0
  138. package/playground/src/resource/index.js +4 -0
  139. package/playground/src/resource/notification.js +18 -0
  140. package/playground/src/resource/user.js +28 -0
  141. package/playground/src/theme.js +3 -0
  142. package/src/Admin.jsx +67 -0
  143. package/src/AdminContext.jsx +26 -0
  144. package/src/ApplicaAdmin.jsx +210 -0
  145. package/src/assets/README.md +7 -0
  146. package/src/assets/logo-icon.png +0 -0
  147. package/src/assets/logo-main.png +0 -0
  148. package/src/components/@extended/AnimateButton.jsx +96 -0
  149. package/src/components/@extended/Avatar.jsx +125 -0
  150. package/src/components/@extended/Breadcrumbs.jsx +324 -0
  151. package/src/components/@extended/Dot.jsx +35 -0
  152. package/src/components/@extended/IconButton.jsx +166 -0
  153. package/src/components/@extended/LoadingButton.jsx +228 -0
  154. package/src/components/@extended/Tooltip.jsx +67 -0
  155. package/src/components/@extended/Transitions.jsx +125 -0
  156. package/src/components/@extended/index.jsx +11 -0
  157. package/src/components/@extended/progress/CircularWithLabel.jsx +34 -0
  158. package/src/components/@extended/progress/CircularWithPath.jsx +74 -0
  159. package/src/components/@extended/progress/LinearWithIcon.jsx +22 -0
  160. package/src/components/@extended/progress/LinearWithLabel.jsx +23 -0
  161. package/src/components/@extended/progress/index.jsx +6 -0
  162. package/src/components/ActionsMenu.jsx +77 -0
  163. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.jsx +440 -0
  164. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.jsx +359 -0
  165. package/src/components/Layout/Drawer/DrawerContent/Navigation/NavItem.jsx +259 -0
  166. package/src/components/Layout/Drawer/DrawerContent/Navigation/index.jsx +73 -0
  167. package/src/components/Layout/Drawer/DrawerContent/index.jsx +19 -0
  168. package/src/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.jsx +20 -0
  169. package/src/components/Layout/Drawer/DrawerHeader/index.jsx +44 -0
  170. package/src/components/Layout/Drawer/HorizontalBar.jsx +55 -0
  171. package/src/components/Layout/Drawer/MiniDrawerStyled.jsx +47 -0
  172. package/src/components/Layout/Drawer/index.jsx +63 -0
  173. package/src/components/Layout/Footer.jsx +23 -0
  174. package/src/components/Layout/Header/AppBarStyled.jsx +34 -0
  175. package/src/components/Layout/Header/HeaderContent/MobileSection.jsx +91 -0
  176. package/src/components/Layout/Header/HeaderContent/Notification.jsx +179 -0
  177. package/src/components/Layout/Header/HeaderContent/NotificationItem.jsx +109 -0
  178. package/src/components/Layout/Header/HeaderContent/Profile.jsx +181 -0
  179. package/src/components/Layout/Header/HeaderContent/index.jsx +38 -0
  180. package/src/components/Layout/Header/index.jsx +99 -0
  181. package/src/components/Layout/index.jsx +119 -0
  182. package/src/components/Loadable.jsx +11 -0
  183. package/src/components/Loader.jsx +21 -0
  184. package/src/components/Logo.jsx +29 -0
  185. package/src/components/MainCard.jsx +111 -0
  186. package/src/components/MainIcon.jsx +20 -0
  187. package/src/components/MenuPopover/MenuPopover.jsx +61 -0
  188. package/src/components/MenuPopover/getPosition.jsx +98 -0
  189. package/src/components/MenuPopover/index.jsx +3 -0
  190. package/src/components/MenuPopover/styles.jsx +87 -0
  191. package/src/components/Notification.jsx +13 -0
  192. package/src/components/ScrollTop.jsx +24 -0
  193. package/src/components/ScrollX.jsx +10 -0
  194. package/src/components/SmallIcon.jsx +14 -0
  195. package/src/components/index.jsx +36 -0
  196. package/src/components/ra-buttons/CreateInDialogButton.jsx +203 -0
  197. package/src/components/ra-buttons/EditInDialogButton.jsx +108 -0
  198. package/src/components/ra-buttons/ImpersonateUserButton.jsx +41 -0
  199. package/src/components/ra-buttons/index.jsx +4 -0
  200. package/src/components/ra-fields/ActionsField.jsx +33 -0
  201. package/src/components/ra-fields/AttachmentField.jsx +82 -0
  202. package/src/components/ra-fields/BaseAttachmentField.jsx +72 -0
  203. package/src/components/ra-fields/CoverField.jsx +83 -0
  204. package/src/components/ra-fields/DateAgoField.jsx +35 -0
  205. package/src/components/ra-fields/DateField.jsx +27 -0
  206. package/src/components/ra-fields/EmailField.jsx +27 -0
  207. package/src/components/ra-fields/FileField.jsx +40 -0
  208. package/src/components/ra-fields/FunctionField.jsx +9 -0
  209. package/src/components/ra-fields/ImageField.jsx +20 -0
  210. package/src/components/ra-fields/ReadonlyField.jsx +107 -0
  211. package/src/components/ra-fields/ReferenceManyField.jsx +63 -0
  212. package/src/components/ra-fields/SizeField.jsx +32 -0
  213. package/src/components/ra-fields/TextField.jsx +27 -0
  214. package/src/components/ra-fields/index.jsx +28 -0
  215. package/src/components/ra-forms/CardForm.jsx +113 -0
  216. package/src/components/ra-forms/Edit.jsx +13 -0
  217. package/src/components/ra-forms/FormHeader.jsx +42 -0
  218. package/src/components/ra-forms/LongForm/DispositionProps.jsx +10 -0
  219. package/src/components/ra-forms/LongForm/LongForm.jsx +38 -0
  220. package/src/components/ra-forms/LongForm/LongFormHeader.jsx +24 -0
  221. package/src/components/ra-forms/LongForm/LongFormTab.jsx +121 -0
  222. package/src/components/ra-forms/LongForm/LongFormTabs.jsx +63 -0
  223. package/src/components/ra-forms/LongForm/LongFormView.jsx +129 -0
  224. package/src/components/ra-forms/LongForm/index.jsx +2 -0
  225. package/src/components/ra-forms/LongForm/useFormRootPath.jsx +22 -0
  226. package/src/components/ra-forms/SimpleForm.jsx +69 -0
  227. package/src/components/ra-forms/TabbedForm.jsx +19 -0
  228. package/src/components/ra-forms/Toolbar.jsx +36 -0
  229. package/src/components/ra-forms/index.jsx +8 -0
  230. package/src/components/ra-inputs/ArrayInput.jsx +29 -0
  231. package/src/components/ra-inputs/AttachmentInput.jsx +57 -0
  232. package/src/components/ra-inputs/AutocompleteArrayInput.jsx +25 -0
  233. package/src/components/ra-inputs/AutocompleteInput.jsx +24 -0
  234. package/src/components/ra-inputs/BooleanInput.jsx +54 -0
  235. package/src/components/ra-inputs/DateInput.jsx +30 -0
  236. package/src/components/ra-inputs/FileInput.jsx +98 -0
  237. package/src/components/ra-inputs/ImageInput.jsx +44 -0
  238. package/src/components/ra-inputs/LabeledInput.jsx +80 -0
  239. package/src/components/ra-inputs/NumberInput.jsx +28 -0
  240. package/src/components/ra-inputs/RecordInput.jsx +102 -0
  241. package/src/components/ra-inputs/ReferenceArrayInput.jsx +23 -0
  242. package/src/components/ra-inputs/ReferenceInput.jsx +23 -0
  243. package/src/components/ra-inputs/ReferenceManyInput.jsx +44 -0
  244. package/src/components/ra-inputs/SearchInput.jsx +14 -0
  245. package/src/components/ra-inputs/SelectArrayInput.jsx +45 -0
  246. package/src/components/ra-inputs/SelectInput.jsx +24 -0
  247. package/src/components/ra-inputs/SmartTextInput.jsx +52 -0
  248. package/src/components/ra-inputs/TextInput.jsx +20 -0
  249. package/src/components/ra-inputs/TimeInput.jsx +46 -0
  250. package/src/components/ra-inputs/index.jsx +42 -0
  251. package/src/components/ra-lists/Datagrid.jsx +42 -0
  252. package/src/components/ra-lists/Empty.jsx +94 -0
  253. package/src/components/ra-lists/List.jsx +81 -0
  254. package/src/components/ra-lists/NotificationList/NotificationList.jsx +41 -0
  255. package/src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx +57 -0
  256. package/src/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.jsx +56 -0
  257. package/src/components/ra-lists/NotificationList/button/index.jsx +2 -0
  258. package/src/components/ra-lists/NotificationList/field/NotificationField.jsx +80 -0
  259. package/src/components/ra-lists/NotificationList/field/index.jsx +1 -0
  260. package/src/components/ra-lists/NotificationList/index.jsx +2 -0
  261. package/src/components/ra-lists/index.jsx +5 -0
  262. package/src/components/third-party/SimpleBar.jsx +61 -0
  263. package/src/components/third-party/index.jsx +3 -0
  264. package/src/contexts/AppConfigContext.jsx +54 -0
  265. package/src/contexts/MenuConfigContext.jsx +93 -0
  266. package/src/contexts/MenuPropTypes.jsx +19 -0
  267. package/src/contexts/ThemeConfigContext.jsx +138 -0
  268. package/src/contexts/index.jsx +5 -0
  269. package/src/dev/index.jsx +2 -0
  270. package/src/dev/useCliErrorCatcher.jsx +86 -0
  271. package/src/hooks/index.jsx +16 -0
  272. package/src/hooks/useAppConfig.jsx +6 -0
  273. package/src/hooks/useBreadcrumbs.jsx +68 -0
  274. package/src/hooks/useLocalStorage.jsx +31 -0
  275. package/src/hooks/useMenu.jsx +223 -0
  276. package/src/hooks/useMenuConfig.jsx +6 -0
  277. package/src/hooks/useResourceTitle.jsx +25 -0
  278. package/src/hooks/useThemeConfig.jsx +6 -0
  279. package/src/i18n/createI18nProvider.jsx +15 -0
  280. package/src/i18n/index.jsx +4 -0
  281. package/src/i18n/useI18nCatcher.jsx +71 -0
  282. package/src/i18n/useI18nLanguages.jsx +22 -0
  283. package/src/i18n/useI18nProvider.jsx +5 -0
  284. package/src/index.jsx +67 -0
  285. package/src/themes/getColors.jsx +18 -0
  286. package/src/themes/getShadow.jsx +37 -0
  287. package/src/themes/index.jsx +70 -0
  288. package/src/themes/overrides/Accordion.jsx +27 -0
  289. package/src/themes/overrides/AccordionDetails.jsx +14 -0
  290. package/src/themes/overrides/AccordionSummary.jsx +33 -0
  291. package/src/themes/overrides/Alert.jsx +72 -0
  292. package/src/themes/overrides/AlertTitle.jsx +15 -0
  293. package/src/themes/overrides/Autocomplete.jsx +23 -0
  294. package/src/themes/overrides/Badge.jsx +36 -0
  295. package/src/themes/overrides/Button.jsx +229 -0
  296. package/src/themes/overrides/ButtonBase.jsx +12 -0
  297. package/src/themes/overrides/ButtonGroup.jsx +11 -0
  298. package/src/themes/overrides/CardContent.jsx +16 -0
  299. package/src/themes/overrides/Checkbox.jsx +125 -0
  300. package/src/themes/overrides/Chip.jsx +75 -0
  301. package/src/themes/overrides/Dialog.jsx +18 -0
  302. package/src/themes/overrides/DialogContentText.jsx +14 -0
  303. package/src/themes/overrides/DialogTitle.jsx +14 -0
  304. package/src/themes/overrides/Fab.jsx +77 -0
  305. package/src/themes/overrides/IconButton.jsx +28 -0
  306. package/src/themes/overrides/InputBase.jsx +13 -0
  307. package/src/themes/overrides/InputLabel.jsx +25 -0
  308. package/src/themes/overrides/LinearProgress.jsx +17 -0
  309. package/src/themes/overrides/Link.jsx +11 -0
  310. package/src/themes/overrides/ListItemButton.jsx +18 -0
  311. package/src/themes/overrides/ListItemIcon.jsx +14 -0
  312. package/src/themes/overrides/LoadingButton.jsx +17 -0
  313. package/src/themes/overrides/OutlinedInput.jsx +54 -0
  314. package/src/themes/overrides/Pagination.jsx +11 -0
  315. package/src/themes/overrides/PaginationItem.jsx +211 -0
  316. package/src/themes/overrides/Popover.jsx +13 -0
  317. package/src/themes/overrides/Radio.jsx +121 -0
  318. package/src/themes/overrides/Slider.jsx +66 -0
  319. package/src/themes/overrides/Switch.jsx +88 -0
  320. package/src/themes/overrides/Tab.jsx +24 -0
  321. package/src/themes/overrides/TableBody.jsx +27 -0
  322. package/src/themes/overrides/TableCell.jsx +44 -0
  323. package/src/themes/overrides/TableFooter.jsx +15 -0
  324. package/src/themes/overrides/TableHead.jsx +15 -0
  325. package/src/themes/overrides/TablePagination.jsx +16 -0
  326. package/src/themes/overrides/TableRow.jsx +25 -0
  327. package/src/themes/overrides/Tabs.jsx +13 -0
  328. package/src/themes/overrides/ToggleButton.jsx +20 -0
  329. package/src/themes/overrides/Tooltip.jsx +13 -0
  330. package/src/themes/overrides/TreeItem.jsx +18 -0
  331. package/src/themes/overrides/Typography.jsx +13 -0
  332. package/src/themes/overrides/index.jsx +98 -0
  333. package/src/themes/palette.jsx +78 -0
  334. package/src/themes/shadows.jsx +27 -0
  335. package/src/themes/theme/default.jsx +98 -0
  336. package/src/themes/theme/index.jsx +44 -0
  337. package/src/themes/theme/theme1.jsx +128 -0
  338. package/src/themes/theme/theme2.jsx +128 -0
  339. package/src/themes/theme/theme3.jsx +128 -0
  340. package/src/themes/theme/theme4.jsx +128 -0
  341. package/src/themes/theme/theme5.jsx +128 -0
  342. package/src/themes/theme/theme6.jsx +128 -0
  343. package/src/themes/theme/theme7.jsx +128 -0
  344. package/src/themes/theme/theme8.jsx +128 -0
  345. package/src/themes/typography.jsx +71 -0
  346. package/src/utils/index.js +2 -0
  347. package/src/utils/lang.js +12 -0
  348. package/src/utils/time.js +13 -0
  349. package/tsconfig.json +28 -0
  350. package/vite.config.js +74 -0
@@ -0,0 +1,72 @@
1
+ import { alpha } from '@mui/material/styles'
2
+ import getColors from '../getColors'
3
+
4
+ // ==============================|| ALERT - COLORS ||============================== //
5
+
6
+ function getColorStyle({ color, theme }) {
7
+ const colors = getColors(theme, color)
8
+ const { lighter, light, main } = colors
9
+
10
+ return {
11
+ borderColor: alpha(light, 0.5),
12
+ backgroundColor: lighter,
13
+ '& .MuiAlert-icon': {
14
+ color: main,
15
+ },
16
+ }
17
+ }
18
+
19
+ // ==============================|| OVERRIDES - ALERT ||============================== //
20
+
21
+ export default function Alert(theme) {
22
+ const primaryDashed = getColorStyle({ color: 'primary', theme })
23
+
24
+ return {
25
+ MuiAlert: {
26
+ styleOverrides: {
27
+ root: {
28
+ color: theme.palette.text.primary,
29
+ fontSize: '0.875rem',
30
+ },
31
+ icon: {
32
+ fontSize: '1rem',
33
+ },
34
+ message: {
35
+ padding: 0,
36
+ marginTop: 3,
37
+ },
38
+ filled: {
39
+ color: theme.palette.grey[0],
40
+ },
41
+ border: {
42
+ padding: '10px 16px',
43
+ border: '1px solid',
44
+ ...primaryDashed,
45
+ '&.MuiAlert-borderPrimary': getColorStyle({ color: 'primary', theme }),
46
+ '&.MuiAlert-borderSecondary': getColorStyle({ color: 'secondary', theme }),
47
+ '&.MuiAlert-borderError': getColorStyle({ color: 'error', theme }),
48
+ '&.MuiAlert-borderSuccess': getColorStyle({ color: 'success', theme }),
49
+ '&.MuiAlert-borderInfo': getColorStyle({ color: 'info', theme }),
50
+ '&.MuiAlert-borderWarning': getColorStyle({ color: 'warning', theme }),
51
+ },
52
+ action: {
53
+ '& .MuiButton-root': {
54
+ padding: 2,
55
+ height: 'auto',
56
+ fontSize: '0.75rem',
57
+ marginTop: -2,
58
+ },
59
+ '& .MuiIconButton-root': {
60
+ width: 'auto',
61
+ height: 'auto',
62
+ padding: 2,
63
+ marginRight: 6,
64
+ '& .MuiSvgIcon-root': {
65
+ fontSize: '1rem',
66
+ },
67
+ },
68
+ },
69
+ },
70
+ },
71
+ }
72
+ }
@@ -0,0 +1,15 @@
1
+ // ==============================|| OVERRIDES - ALERT TITLE ||============================== //
2
+
3
+ export default function AlertTitle() {
4
+ return {
5
+ MuiAlertTitle: {
6
+ styleOverrides: {
7
+ root: {
8
+ marginBottom: 4,
9
+ marginTop: 0,
10
+ fontWeight: 400,
11
+ },
12
+ },
13
+ },
14
+ }
15
+ }
@@ -0,0 +1,23 @@
1
+ // ==============================|| OVERRIDES - AUTOCOMPLETE ||============================== //
2
+
3
+ export default function Autocomplete() {
4
+ return {
5
+ MuiAutocomplete: {
6
+ styleOverrides: {
7
+ root: {
8
+ '& .MuiOutlinedInput-root': {
9
+ padding: '3px 9px',
10
+ },
11
+ },
12
+ popupIndicator: {
13
+ width: 'auto',
14
+ height: 'auto',
15
+ },
16
+ clearIndicator: {
17
+ width: 'auto',
18
+ height: 'auto',
19
+ },
20
+ },
21
+ },
22
+ }
23
+ }
@@ -0,0 +1,36 @@
1
+ import getColors from '../getColors'
2
+
3
+ function getColorStyle({ color, theme }) {
4
+ const colors = getColors(theme, color)
5
+ const { lighter, main } = colors
6
+
7
+ return {
8
+ color: main,
9
+ backgroundColor: lighter,
10
+ }
11
+ }
12
+
13
+ export default function Badge(theme) {
14
+ const defaultLightBadge = getColorStyle({ color: 'primary', theme })
15
+
16
+ return {
17
+ MuiBadge: {
18
+ styleOverrides: {
19
+ standard: {
20
+ minWidth: theme.spacing(2),
21
+ height: theme.spacing(2),
22
+ padding: theme.spacing(0.5),
23
+ },
24
+ light: {
25
+ ...defaultLightBadge,
26
+ '&.MuiBadge-colorPrimary': getColorStyle({ color: 'primary', theme }),
27
+ '&.MuiBadge-colorSecondary': getColorStyle({ color: 'secondary', theme }),
28
+ '&.MuiBadge-colorError': getColorStyle({ color: 'error', theme }),
29
+ '&.MuiBadge-colorInfo': getColorStyle({ color: 'info', theme }),
30
+ '&.MuiBadge-colorSuccess': getColorStyle({ color: 'success', theme }),
31
+ '&.MuiBadge-colorWarning': getColorStyle({ color: 'warning', theme }),
32
+ },
33
+ },
34
+ },
35
+ }
36
+ }
@@ -0,0 +1,229 @@
1
+ import { alpha } from '@mui/material/styles'
2
+ import getColors from '../getColors'
3
+ import getShadow from '../getShadow'
4
+
5
+ function getColorStyle({ variant, color, theme }) {
6
+ const colors = getColors(theme, color)
7
+ const { lighter, main, dark, contrastText } = colors
8
+
9
+ const buttonShadow = `${color}Button`
10
+ const shadows = getShadow(theme, buttonShadow)
11
+
12
+ const commonShadow = {
13
+ '&::after': {
14
+ boxShadow: `0 0 5px 5px ${alpha(main, 0.9)}`,
15
+ },
16
+ '&:active::after': {
17
+ boxShadow: `0 0 0 0 ${alpha(main, 0.9)}`,
18
+ },
19
+ '&:focus-visible': {
20
+ outline: `2px solid ${dark}`,
21
+ outlineOffset: 2,
22
+ },
23
+ }
24
+
25
+ switch (variant) {
26
+ case 'contained':
27
+ return {
28
+ '&:hover': {
29
+ backgroundColor: dark,
30
+ },
31
+ ...commonShadow,
32
+ }
33
+ case 'shadow':
34
+ return {
35
+ color: contrastText,
36
+ backgroundColor: main,
37
+ boxShadow: shadows,
38
+ '&:hover': {
39
+ boxShadow: 'none',
40
+ backgroundColor: dark,
41
+ },
42
+ ...commonShadow,
43
+ }
44
+ case 'outlined':
45
+ return {
46
+ borderColor: main,
47
+ '&:hover': {
48
+ color: dark,
49
+ backgroundColor: 'transparent',
50
+ borderColor: dark,
51
+ },
52
+ ...commonShadow,
53
+ }
54
+ case 'dashed':
55
+ return {
56
+ color: main,
57
+ borderColor: main,
58
+ backgroundColor: lighter,
59
+ '&:hover': {
60
+ color: dark,
61
+ borderColor: dark,
62
+ },
63
+ ...commonShadow,
64
+ }
65
+ case 'text':
66
+ default:
67
+ return {
68
+ '&:hover': {
69
+ color: dark,
70
+ backgroundColor: lighter,
71
+ },
72
+ ...commonShadow,
73
+ }
74
+ }
75
+ }
76
+
77
+ // ==============================|| OVERRIDES - BUTTON ||============================== //
78
+
79
+ export default function Button(theme) {
80
+ const primaryDashed = getColorStyle({ variant: 'dashed', color: 'primary', theme })
81
+ const primaryShadow = getColorStyle({ variant: 'shadow', color: 'primary', theme })
82
+
83
+ const disabledStyle = {
84
+ '&.Mui-disabled': {
85
+ backgroundColor: theme.palette.grey[200],
86
+ },
87
+ }
88
+ const iconStyle = {
89
+ '&>*:nth-of-type(1)': {
90
+ fontSize: 'inherit',
91
+ },
92
+ }
93
+
94
+ return {
95
+ MuiButton: {
96
+ defaultProps: {
97
+ disableElevation: true,
98
+ },
99
+ styleOverrides: {
100
+ root: {
101
+ fontWeight: 400,
102
+ '&::after': {
103
+ content: '""',
104
+ display: 'block',
105
+ position: 'absolute',
106
+ left: 0,
107
+ top: 0,
108
+ width: '100%',
109
+ height: '100%',
110
+ borderRadius: 4,
111
+ opacity: 0,
112
+ transition: 'all 0.5s',
113
+ },
114
+
115
+ '&:active::after': {
116
+ position: 'absolute',
117
+ borderRadius: 4,
118
+ left: 0,
119
+ top: 0,
120
+ opacity: 1,
121
+ transition: '0s',
122
+ },
123
+ },
124
+ contained: {
125
+ ...disabledStyle,
126
+ },
127
+ outlined: {
128
+ ...disabledStyle,
129
+ },
130
+ text: {
131
+ boxShadow: 'none',
132
+ '&:hover': {
133
+ boxShadow: 'none',
134
+ },
135
+ },
136
+ endIcon: {
137
+ ...iconStyle,
138
+ },
139
+ startIcon: {
140
+ ...iconStyle,
141
+ },
142
+ dashed: {
143
+ border: '1px dashed',
144
+ ...primaryDashed,
145
+ '&.MuiButton-dashedPrimary': getColorStyle({
146
+ variant: 'dashed',
147
+ color: 'primary',
148
+ theme,
149
+ }),
150
+ '&.MuiButton-dashedSecondary': getColorStyle({
151
+ variant: 'dashed',
152
+ color: 'secondary',
153
+ theme,
154
+ }),
155
+ '&.MuiButton-dashedError': getColorStyle({ variant: 'dashed', color: 'error', theme }),
156
+ '&.MuiButton-dashedSuccess': getColorStyle({
157
+ variant: 'dashed',
158
+ color: 'success',
159
+ theme,
160
+ }),
161
+ '&.MuiButton-dashedInfo': getColorStyle({ variant: 'dashed', color: 'info', theme }),
162
+ '&.MuiButton-dashedWarning': getColorStyle({
163
+ variant: 'dashed',
164
+ color: 'warning',
165
+ theme,
166
+ }),
167
+ '&.Mui-disabled': {
168
+ color: `${theme.palette.grey[300]} !important`,
169
+ borderColor: `${theme.palette.grey[400]} !important`,
170
+ backgroundColor: `${theme.palette.grey[200]} !important`,
171
+ },
172
+ },
173
+ shadow: {
174
+ ...primaryShadow,
175
+ '&.MuiButton-shadowPrimary': getColorStyle({
176
+ variant: 'shadow',
177
+ color: 'primary',
178
+ theme,
179
+ }),
180
+ '&.MuiButton-shadowSecondary': getColorStyle({
181
+ variant: 'shadow',
182
+ color: 'secondary',
183
+ theme,
184
+ }),
185
+ '&.MuiButton-shadowError': getColorStyle({ variant: 'shadow', color: 'error', theme }),
186
+ '&.MuiButton-shadowSuccess': getColorStyle({
187
+ variant: 'shadow',
188
+ color: 'success',
189
+ theme,
190
+ }),
191
+ '&.MuiButton-shadowInfo': getColorStyle({ variant: 'shadow', color: 'info', theme }),
192
+ '&.MuiButton-shadowWarning': getColorStyle({
193
+ variant: 'shadow',
194
+ color: 'warning',
195
+ theme,
196
+ }),
197
+ '&.Mui-disabled': {
198
+ color: `${theme.palette.grey[300]} !important`,
199
+ borderColor: `${theme.palette.grey[400]} !important`,
200
+ backgroundColor: `${theme.palette.grey[200]} !important`,
201
+ },
202
+ },
203
+ containedPrimary: getColorStyle({ variant: 'contained', color: 'primary', theme }),
204
+ containedSecondary: getColorStyle({ variant: 'contained', color: 'secondary', theme }),
205
+ containedError: getColorStyle({ variant: 'contained', color: 'error', theme }),
206
+ containedSuccess: getColorStyle({ variant: 'contained', color: 'success', theme }),
207
+ containedInfo: getColorStyle({ variant: 'contained', color: 'info', theme }),
208
+ containedWarning: getColorStyle({ variant: 'contained', color: 'warning', theme }),
209
+ outlinedPrimary: getColorStyle({ variant: 'outlined', color: 'primary', theme }),
210
+ outlinedSecondary: getColorStyle({ variant: 'outlined', color: 'secondary', theme }),
211
+ outlinedError: getColorStyle({ variant: 'outlined', color: 'error', theme }),
212
+ outlinedSuccess: getColorStyle({ variant: 'outlined', color: 'success', theme }),
213
+ outlinedInfo: getColorStyle({ variant: 'outlined', color: 'info', theme }),
214
+ outlinedWarning: getColorStyle({ variant: 'outlined', color: 'warning', theme }),
215
+ textPrimary: getColorStyle({ variant: 'text', color: 'primary', theme }),
216
+ textSecondary: getColorStyle({ variant: 'text', color: 'secondary', theme }),
217
+ textError: getColorStyle({ variant: 'text', color: 'error', theme }),
218
+ textSuccess: getColorStyle({ variant: 'text', color: 'success', theme }),
219
+ textInfo: getColorStyle({ variant: 'text', color: 'info', theme }),
220
+ textWarning: getColorStyle({ variant: 'text', color: 'warning', theme }),
221
+ sizeExtraSmall: {
222
+ minWidth: 56,
223
+ fontSize: '0.625rem',
224
+ padding: '2px 8px',
225
+ },
226
+ },
227
+ },
228
+ }
229
+ }
@@ -0,0 +1,12 @@
1
+ // ==============================|| OVERRIDES - BUTTON ||============================== //
2
+
3
+ export default function ButtonBase() {
4
+ return {
5
+ MuiButtonBase: {
6
+ defaultProps: {
7
+ disableRipple: true,
8
+ size: 'medium',
9
+ },
10
+ },
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ // ==============================|| OVERRIDES - BUTTON GROUP ||============================== //
2
+
3
+ export default function ButtonGroup() {
4
+ return {
5
+ MuiButtonGroup: {
6
+ defaultProps: {
7
+ disableRipple: true,
8
+ },
9
+ },
10
+ }
11
+ }
@@ -0,0 +1,16 @@
1
+ // ==============================|| OVERRIDES - CARD CONTENT ||============================== //
2
+
3
+ export default function CardContent() {
4
+ return {
5
+ MuiCardContent: {
6
+ styleOverrides: {
7
+ root: {
8
+ padding: 20,
9
+ '&:last-child': {
10
+ paddingBottom: 20,
11
+ },
12
+ },
13
+ },
14
+ },
15
+ }
16
+ }
@@ -0,0 +1,125 @@
1
+ import { CheckSquareFilled, MinusSquareFilled } from '@ant-design/icons'
2
+
3
+ import { Box } from '@mui/material'
4
+ import getColors from '../getColors'
5
+
6
+ function getColorStyle({ color, theme }) {
7
+ const colors = getColors(theme, color)
8
+ const { lighter, main, dark } = colors
9
+
10
+ return {
11
+ '&:hover': {
12
+ backgroundColor: lighter,
13
+ '& .icon': {
14
+ borderColor: main,
15
+ },
16
+ },
17
+ '&.Mui-focusVisible': {
18
+ outline: `2px solid ${dark}`,
19
+ outlineOffset: -4,
20
+ },
21
+ }
22
+ }
23
+
24
+ function getSizeStyle(size) {
25
+ switch (size) {
26
+ case 'small':
27
+ return { size: 16, fontSize: 1, position: 1 }
28
+ case 'large':
29
+ return { size: 24, fontSize: 1.6, position: 2 }
30
+ case 'medium':
31
+ default:
32
+ return { size: 20, fontSize: 1.35, position: 2 }
33
+ }
34
+ }
35
+
36
+ function checkboxStyle(size) {
37
+ const sizes = getSizeStyle(size)
38
+
39
+ return {
40
+ '& .icon': {
41
+ width: sizes.size,
42
+ height: sizes.size,
43
+ '& .filled': {
44
+ fontSize: `${sizes.fontSize}rem`,
45
+ top: -sizes.position,
46
+ left: -sizes.position,
47
+ },
48
+ },
49
+ }
50
+ }
51
+
52
+ export default function Checkbox(theme) {
53
+ const { palette } = theme
54
+
55
+ return {
56
+ MuiCheckbox: {
57
+ defaultProps: {
58
+ className: 'size-small',
59
+ icon: (
60
+ <Box
61
+ className="icon"
62
+ sx={{
63
+ width: 16,
64
+ height: 16,
65
+ border: '1px solid',
66
+ borderColor: 'inherit',
67
+ borderRadius: 0.25,
68
+ }}
69
+ />
70
+ ),
71
+ checkedIcon: (
72
+ <Box
73
+ className="icon"
74
+ sx={{
75
+ width: 16,
76
+ height: 16,
77
+ border: '1px solid',
78
+ borderColor: 'inherit',
79
+ borderRadius: 0.25,
80
+ position: 'relative',
81
+ }}
82
+ >
83
+ <CheckSquareFilled className="filled" style={{ position: 'absolute' }} />
84
+ </Box>
85
+ ),
86
+ indeterminateIcon: (
87
+ <Box
88
+ className="icon"
89
+ sx={{
90
+ width: 16,
91
+ height: 16,
92
+ border: '1px solid',
93
+ borderColor: 'inherit',
94
+ borderRadius: 0.25,
95
+ position: 'relative',
96
+ }}
97
+ >
98
+ <MinusSquareFilled className="filled" style={{ position: 'absolute' }} />
99
+ </Box>
100
+ ),
101
+ },
102
+ styleOverrides: {
103
+ root: {
104
+ borderRadius: 0,
105
+ color: palette.secondary[300],
106
+ '&.size-small': {
107
+ ...checkboxStyle('small'),
108
+ },
109
+ '&.size-medium': {
110
+ ...checkboxStyle('medium'),
111
+ },
112
+ '&.size-large': {
113
+ ...checkboxStyle('large'),
114
+ },
115
+ },
116
+ colorPrimary: getColorStyle({ color: 'primary', theme }),
117
+ colorSecondary: getColorStyle({ color: 'secondary', theme }),
118
+ colorSuccess: getColorStyle({ color: 'success', theme }),
119
+ colorWarning: getColorStyle({ color: 'warning', theme }),
120
+ colorInfo: getColorStyle({ color: 'info', theme }),
121
+ colorError: getColorStyle({ color: 'error', theme }),
122
+ },
123
+ },
124
+ }
125
+ }
@@ -0,0 +1,75 @@
1
+ import getColors from '../getColors'
2
+
3
+ function getColor({ color, theme }) {
4
+ const colors = getColors(theme, color)
5
+ const { dark } = colors
6
+
7
+ return {
8
+ '&.Mui-focusVisible': {
9
+ outline: `2px solid ${dark}`,
10
+ outlineOffset: 2,
11
+ },
12
+ }
13
+ }
14
+
15
+ function getColorStyle({ color, theme }) {
16
+ const colors = getColors(theme, color)
17
+ const { light, lighter, main } = colors
18
+
19
+ return {
20
+ color: main,
21
+ backgroundColor: lighter,
22
+ borderColor: light,
23
+ '& .MuiChip-deleteIcon': {
24
+ color: main,
25
+ '&:hover': {
26
+ color: light,
27
+ },
28
+ },
29
+ }
30
+ }
31
+
32
+ export default function Chip(theme) {
33
+ const defaultLightChip = getColorStyle({ color: 'secondary', theme })
34
+ return {
35
+ MuiChip: {
36
+ styleOverrides: {
37
+ root: {
38
+ borderRadius: 4,
39
+ '&:active': {
40
+ boxShadow: 'none',
41
+ },
42
+ '&.MuiChip-colorPrimary': getColor({ color: 'primary', theme }),
43
+ '&.MuiChip-colorSecondary': getColor({ color: 'secondary', theme }),
44
+ '&.MuiChip-colorError': getColor({ color: 'error', theme }),
45
+ '&.MuiChip-colorInfo': getColor({ color: 'info', theme }),
46
+ '&.MuiChip-colorSuccess': getColor({ color: 'success', theme }),
47
+ '&.MuiChip-colorWarning': getColor({ color: 'warning', theme }),
48
+ },
49
+ sizeLarge: {
50
+ fontSize: '1rem',
51
+ height: 40,
52
+ },
53
+ light: {
54
+ ...defaultLightChip,
55
+ '&.MuiChip-lightPrimary': getColorStyle({ color: 'primary', theme }),
56
+ '&.MuiChip-lightSecondary': getColorStyle({ color: 'secondary', theme }),
57
+ '&.MuiChip-lightError': getColorStyle({ color: 'error', theme }),
58
+ '&.MuiChip-lightInfo': getColorStyle({ color: 'info', theme }),
59
+ '&.MuiChip-lightSuccess': getColorStyle({ color: 'success', theme }),
60
+ '&.MuiChip-lightWarning': getColorStyle({ color: 'warning', theme }),
61
+ },
62
+ combined: {
63
+ border: '1px solid',
64
+ ...defaultLightChip,
65
+ '&.MuiChip-combinedPrimary': getColorStyle({ color: 'primary', theme }),
66
+ '&.MuiChip-combinedSecondary': getColorStyle({ color: 'secondary', theme }),
67
+ '&.MuiChip-combinedError': getColorStyle({ color: 'error', theme }),
68
+ '&.MuiChip-combinedInfo': getColorStyle({ color: 'info', theme }),
69
+ '&.MuiChip-combinedSuccess': getColorStyle({ color: 'success', theme }),
70
+ '&.MuiChip-combinedWarning': getColorStyle({ color: 'warning', theme }),
71
+ },
72
+ },
73
+ },
74
+ }
75
+ }
@@ -0,0 +1,18 @@
1
+ // material-ui
2
+ import { alpha } from '@mui/material/styles'
3
+
4
+ // ==============================|| OVERRIDES - DIALOG ||============================== //
5
+
6
+ export default function Dialog() {
7
+ return {
8
+ MuiDialog: {
9
+ styleOverrides: {
10
+ root: {
11
+ '& .MuiBackdrop-root': {
12
+ backgroundColor: alpha('#000', 0.7),
13
+ },
14
+ },
15
+ },
16
+ },
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ // ==============================|| OVERRIDES - DIALOG CONTENT TEXT ||============================== //
2
+
3
+ export default function DialogContentText(theme) {
4
+ return {
5
+ MuiDialogContentText: {
6
+ styleOverrides: {
7
+ root: {
8
+ fontSize: '0.875rem',
9
+ color: theme.palette.text.primary,
10
+ },
11
+ },
12
+ },
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ // ==============================|| OVERRIDES - DIALOG TITLE ||============================== //
2
+
3
+ export default function DialogTitle() {
4
+ return {
5
+ MuiDialogTitle: {
6
+ styleOverrides: {
7
+ root: {
8
+ fontSize: '1rem',
9
+ fontWeight: 500,
10
+ },
11
+ },
12
+ },
13
+ }
14
+ }