@applica-software-guru/react-admin 1.5.278 → 1.5.280

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.
@@ -0,0 +1,3 @@
1
+ declare function Card(): any;
2
+ export { Card };
3
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/Card.ts"],"names":[],"mappings":"AAAA,iBAAS,IAAI,IAAI,GAAG,CAUnB;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/index.ts"],"names":[],"mappings":"AA+CA,iBAAS,mBAAmB,CAAC,KAAK,EAAE,GAAG,OAgDtC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/index.ts"],"names":[],"mappings":"AAgDA,iBAAS,mBAAmB,CAAC,KAAK,EAAE,GAAG,OAiDtC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -2,6 +2,7 @@ import { ThemeProps } from '../themes/types';
2
2
  declare function CustomShadows(theme: ThemeProps): {
3
3
  button: string;
4
4
  text: string;
5
+ z0: string;
5
6
  z1: string;
6
7
  primary: string;
7
8
  secondary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/themes/shadows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,iBAAS,aAAa,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;EAwBvC;AACD,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/themes/shadows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,iBAAS,aAAa,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;;EAyBvC;AACD,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/package.json CHANGED
@@ -95,7 +95,7 @@
95
95
  },
96
96
  "scripts": {
97
97
  "build": "tsc --outDir dist && vite build",
98
- "eslint": "eslint .",
98
+ "eslint": "eslint ./src",
99
99
  "format": "prettier --write .",
100
100
  "prepare": "husky",
101
101
  "preview": "vite preview",
@@ -106,5 +106,5 @@
106
106
  "type": "module",
107
107
  "types": "dist/index.d.ts",
108
108
  "typings": "dist/index.d.ts",
109
- "version": "1.5.278"
109
+ "version": "1.5.280"
110
110
  }
@@ -112,9 +112,9 @@ const MainCard = forwardRef(
112
112
  borderRadius: 1,
113
113
  borderColor: theme.palette.mode === 'dark' ? theme.palette.divider : theme.palette.grey.A800,
114
114
  boxShadow:
115
- boxShadow && (!border || theme.palette.mode === 'dark') ? shadow || theme.customShadows.z1 : 'inherit',
115
+ boxShadow && (!border || theme.palette.mode === 'dark') ? shadow || theme.customShadows.z0 : 'inherit',
116
116
  ':hover': {
117
- boxShadow: boxShadow ? shadow || theme.customShadows.z1 : 'inherit'
117
+ boxShadow: boxShadow ? shadow || theme.customShadows.z0 : 'inherit'
118
118
  },
119
119
  backgroundColor:
120
120
  color === 'default'
@@ -0,0 +1,18 @@
1
+ import { MainCard } from './MainCard';
2
+
3
+ import { ReactNode } from 'react';
4
+
5
+ interface ShadowBoxProps {
6
+ shadow: string;
7
+ children: ReactNode;
8
+ }
9
+
10
+ function ShadowBox({ shadow, children, ...props }: ShadowBoxProps) {
11
+ return (
12
+ <MainCard content={false} border={false} shadow={shadow} boxShadow {...props}>
13
+ {children}
14
+ </MainCard>
15
+ );
16
+ }
17
+
18
+ export { ShadowBox };
@@ -12,6 +12,7 @@ export * from './Notification';
12
12
  export * from './Onboarding';
13
13
  export * from './ScrollTop';
14
14
  export * from './ScrollX';
15
+ export * from './ShadowBox';
15
16
  export * from './SmallIcon';
16
17
  export * from './ra-buttons';
17
18
  export * from './ra-custom';
@@ -28,6 +28,7 @@ function LabeledInput({
28
28
  // @ts-ignore
29
29
  width: props?.fullWidth ? '100%' : 'auto',
30
30
  '& .MuiFormHelperText-root': {
31
+ pb: 0,
31
32
  // @see: https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/input/SelectArrayInput.tsx#L340
32
33
  // the 'invalid' prop is not used inside the react-admin component. This is necessary if we want to support
33
34
  // remove error message colorization when the field is in error state.
@@ -47,7 +47,7 @@ function ThemeCustomizationProvider({ themeOverrides, children }: ThemeCustomiza
47
47
  palette: theme.palette,
48
48
  customShadows: themeCustomShadows,
49
49
  typography: themeTypography,
50
- shadows: theme.shadows.map(() => 'none'),
50
+ // shadows: theme.shadows.map(() => 'none'),
51
51
  components: {
52
52
  MuiIconButton: {
53
53
  styleOverrides: {
@@ -0,0 +1,13 @@
1
+ function Card(): any {
2
+ return {
3
+ MuiCard: {
4
+ styleOverrides: {
5
+ root: {
6
+ boxShadow: 'none'
7
+ }
8
+ }
9
+ }
10
+ };
11
+ }
12
+
13
+ export { Card };
@@ -8,6 +8,7 @@ import { Badge } from './Badge';
8
8
  import { Button } from './Button';
9
9
  import { ButtonBase } from './ButtonBase';
10
10
  import { ButtonGroup } from './ButtonGroup';
11
+ import { Card } from './Card';
11
12
  import { CardContent } from './CardContent';
12
13
  import { Checkbox } from './Checkbox';
13
14
  import { Chip } from './Chip';
@@ -57,6 +58,7 @@ function ComponentsOverrides(theme: any) {
57
58
  Button(theme),
58
59
  ButtonBase(),
59
60
  ButtonGroup(),
61
+ Card(),
60
62
  CardContent(),
61
63
  Checkbox(theme),
62
64
  Chip(theme),
@@ -6,6 +6,7 @@ function CustomShadows(theme: ThemeProps) {
6
6
  // z1: `0px 2px 8px rgba(0, 0, 0, 0.15)`,
7
7
  button: theme.palette.mode === 'dark' ? `0 2px 0 rgb(0 0 0 / 5%)` : `0 2px #0000000b`,
8
8
  text: `0 -1px 0 rgb(0 0 0 / 12%)`,
9
+ z0: `none`,
9
10
  z1:
10
11
  theme.palette.mode === 'dark'
11
12
  ? `0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)`
package/vite.config.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /*global __dirname */
2
2
  import * as packageJson from './package.json';
3
- import react from '@vitejs/plugin-react';
3
+ import { default as react } from '@vitejs/plugin-react';
4
4
  import { resolve } from 'node:path';
5
5
  import process from 'process';
6
6
  import { defineConfig } from 'vite';
7
- import viteCompression from 'vite-plugin-compression';
8
- import dts from 'vite-plugin-dts';
7
+ import { default as viteCompression } from 'vite-plugin-compression';
8
+ import { default as dts } from 'vite-plugin-dts';
9
9
  import { EsLinter, linterPlugin } from 'vite-plugin-linter';
10
10
 
11
11
  export default defineConfig((configEnv) => {