@applica-software-guru/react-admin 1.5.283 → 1.5.285
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/dist/components/ra-forms/WizardForm/Content.d.ts.map +1 -1
- package/dist/components/ra-forms/WizardForm/Form.d.ts.map +1 -1
- package/dist/components/ra-inputs/RadioButtonGroupInput.d.ts +6 -0
- package/dist/components/ra-inputs/RadioButtonGroupInput.d.ts.map +1 -0
- package/dist/components/ra-inputs/index.d.ts +1 -0
- package/dist/components/ra-inputs/index.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +36 -36
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +3909 -3888
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +39 -39
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-forms/WizardForm/Content.tsx +14 -2
- package/src/components/ra-forms/WizardForm/Form.tsx +1 -7
- package/src/components/ra-inputs/RadioButtonGroupInput.tsx +22 -0
- package/src/components/ra-inputs/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Children, ReactElement, ReactNode, isValidElement, useMemo } from 'react';
|
|
2
|
-
import { Box, Button, Divider, Grid } from '@mui/material';
|
|
2
|
+
import { Box, Button, Divider, Grid, useTheme } from '@mui/material';
|
|
3
3
|
import { MainCard } from '@/components/MainCard';
|
|
4
4
|
import { Toolbar } from './Toolbar';
|
|
5
5
|
import { useTranslate } from 'react-admin';
|
|
@@ -23,6 +23,7 @@ interface ContentProps {
|
|
|
23
23
|
function Content({ title, subheader, secondary, toolbar, progress, isSmall, modal, sx, setCurrentStep }: ContentProps) {
|
|
24
24
|
const { currentStep, steps } = useWizardFormContext();
|
|
25
25
|
const translate = useTranslate();
|
|
26
|
+
const theme = useTheme();
|
|
26
27
|
const isHorizontal = isSmall || modal;
|
|
27
28
|
|
|
28
29
|
const cancelButton = useMemo(() => {
|
|
@@ -72,7 +73,18 @@ function Content({ title, subheader, secondary, toolbar, progress, isSmall, moda
|
|
|
72
73
|
divider
|
|
73
74
|
>
|
|
74
75
|
<Box>{steps[currentStep]}</Box>
|
|
75
|
-
|
|
76
|
+
<Box
|
|
77
|
+
sx={{
|
|
78
|
+
'& .MuiToolbar-root': {
|
|
79
|
+
paddingLeft: 0,
|
|
80
|
+
paddingRight: 0,
|
|
81
|
+
paddingBottom: 0,
|
|
82
|
+
paddingTop: theme.spacing(2)
|
|
83
|
+
}
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
{toolbar && !cancelButton ? toolbar : <Toolbar cancelButton={cancelButton} />}
|
|
87
|
+
</Box>
|
|
76
88
|
</MainCard>
|
|
77
89
|
</Grid>
|
|
78
90
|
</Grid>
|
|
@@ -21,13 +21,7 @@ const StyledForm = styled(RaForm, {
|
|
|
21
21
|
? {
|
|
22
22
|
paddingBottom: `${theme.spacing(2.5)}`
|
|
23
23
|
}
|
|
24
|
-
: {}
|
|
25
|
-
'& .MuiToolbar-root': {
|
|
26
|
-
paddingLeft: '0 !important',
|
|
27
|
-
paddingRight: '0 !important',
|
|
28
|
-
paddingBottom: '0 !important',
|
|
29
|
-
paddingTop: `${theme.spacing(2)} !important`
|
|
30
|
-
}
|
|
24
|
+
: {}
|
|
31
25
|
}));
|
|
32
26
|
|
|
33
27
|
/**
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LabeledInput } from '@/components/ra-inputs/LabeledInput';
|
|
2
|
+
import { RadioButtonGroupInput as RaRadioButtonGroupInput, RadioButtonGroupInputProps } from 'react-admin';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
const StyledRadioButtonGroupInput = styled(RaRadioButtonGroupInput, { slot: 'root' })(() => ({
|
|
6
|
+
marginTop: '0 !important',
|
|
7
|
+
'& .MuiFormControlLabel-root': {
|
|
8
|
+
marginLeft: -8 // Mantis overrides
|
|
9
|
+
}
|
|
10
|
+
}));
|
|
11
|
+
function RadioButtonGroupInput(props: RadioButtonGroupInputProps): JSX.Element {
|
|
12
|
+
return (
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
<LabeledInput {...props}>
|
|
15
|
+
{/* @ts-ignore */}
|
|
16
|
+
<StyledRadioButtonGroupInput />
|
|
17
|
+
</LabeledInput>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { RadioButtonGroupInput };
|
|
22
|
+
export type { RadioButtonGroupInputProps };
|
|
@@ -11,6 +11,7 @@ export * from './LabeledArrayInput';
|
|
|
11
11
|
export * from './LabeledInput';
|
|
12
12
|
export * from './LocalizedTextInput';
|
|
13
13
|
export * from './NumberInput';
|
|
14
|
+
export * from './RadioButtonGroupInput';
|
|
14
15
|
export * from './RecordInput';
|
|
15
16
|
export * from './ReferenceArrayInput';
|
|
16
17
|
export * from './ReferenceInput';
|