@jsonforms/material-renderers 3.3.0-alpha.1 → 3.3.0-beta.0

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 (29) hide show
  1. package/lib/jsonforms-react-material.cjs.js +144 -83
  2. package/lib/jsonforms-react-material.cjs.js.map +1 -1
  3. package/lib/jsonforms-react-material.esm.js +149 -85
  4. package/lib/jsonforms-react-material.esm.js.map +1 -1
  5. package/lib/layouts/ExpandPanelRenderer.d.ts +5 -1
  6. package/package.json +5 -5
  7. package/src/additional/ListWithDetailMasterItem.tsx +13 -6
  8. package/src/additional/MaterialLabelRenderer.tsx +5 -6
  9. package/src/additional/MaterialListWithDetailRenderer.tsx +10 -4
  10. package/src/complex/MaterialAllOfRenderer.tsx +14 -12
  11. package/src/complex/MaterialAnyOfRenderer.tsx +7 -3
  12. package/src/complex/MaterialArrayControlRenderer.tsx +6 -3
  13. package/src/complex/MaterialEnumArrayRenderer.tsx +56 -55
  14. package/src/complex/MaterialObjectRenderer.tsx +14 -12
  15. package/src/complex/MaterialOneOfRenderer.tsx +7 -3
  16. package/src/complex/MaterialTableControl.tsx +34 -33
  17. package/src/controls/MaterialBooleanControl.tsx +7 -8
  18. package/src/controls/MaterialBooleanToggleControl.tsx +7 -8
  19. package/src/controls/MaterialInputControl.tsx +32 -30
  20. package/src/controls/MaterialNativeControl.tsx +23 -21
  21. package/src/controls/MaterialRadioGroup.tsx +39 -38
  22. package/src/controls/MaterialSliderControl.tsx +44 -43
  23. package/src/layouts/ExpandPanelRenderer.tsx +48 -11
  24. package/src/layouts/MaterialArrayLayoutRenderer.tsx +6 -4
  25. package/src/layouts/MaterialCategorizationLayout.tsx +7 -3
  26. package/src/layouts/MaterialCategorizationStepperLayout.tsx +8 -3
  27. package/src/layouts/MaterialGroupLayout.tsx +17 -14
  28. package/src/mui-controls/MuiAutocomplete.tsx +6 -3
  29. package/src/util/layout.tsx +16 -18
@@ -1,4 +1,5 @@
1
1
  import React, { ComponentType, Dispatch, ReducerAction } from 'react';
2
+ import { JsonFormsStateContext } from '@jsonforms/react';
2
3
  import { ControlElement, JsonFormsRendererRegistryEntry, JsonSchema, JsonFormsCellRendererRegistryEntry, JsonFormsUISchemaRegistryEntry, ArrayTranslations } from '@jsonforms/core';
3
4
  interface OwnPropsOfExpandPanel {
4
5
  enabled: boolean;
@@ -48,7 +49,10 @@ export declare const ctxDispatchToExpandPanelProps: (dispatch: Dispatch<ReducerA
48
49
  * @param ownProps any own props
49
50
  * @returns {StatePropsOfControl} state props for a control
50
51
  */
51
- export declare const withContextToExpandPanelProps: (Component: ComponentType<ExpandPanelProps>) => ComponentType<OwnPropsOfExpandPanel>;
52
+ export declare const withContextToExpandPanelProps: (Component: ComponentType<ExpandPanelProps>) => ComponentType<{
53
+ ctx: JsonFormsStateContext;
54
+ props: OwnPropsOfExpandPanel;
55
+ }>;
52
56
  export declare const withJsonFormsExpandPanelProps: (Component: ComponentType<ExpandPanelProps>) => ComponentType<OwnPropsOfExpandPanel>;
53
57
  declare const _default: React.ComponentType<OwnPropsOfExpandPanel>;
54
58
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonforms/material-renderers",
3
- "version": "3.3.0-alpha.1",
3
+ "version": "3.3.0-beta.0",
4
4
  "description": "Material Renderer Set for JSON Forms",
5
5
  "repository": "https://github.com/eclipsesource/jsonforms",
6
6
  "bugs": "https://github.com/eclipsesource/jsonforms/issues",
@@ -73,8 +73,8 @@
73
73
  "peerDependencies": {
74
74
  "@emotion/react": "^11.4.1",
75
75
  "@emotion/styled": "^11.3.0",
76
- "@jsonforms/core": "3.3.0-alpha.1",
77
- "@jsonforms/react": "3.3.0-alpha.1",
76
+ "@jsonforms/core": "3.3.0-beta.0",
77
+ "@jsonforms/react": "3.3.0-beta.0",
78
78
  "@mui/icons-material": "^5.11.16",
79
79
  "@mui/material": "^5.13.0",
80
80
  "@mui/x-date-pickers": "^6.0.0",
@@ -126,8 +126,8 @@
126
126
  "webpack": "^5.78.0",
127
127
  "webpack-cli": "^5.1.4",
128
128
  "webpack-dev-server": "^4.15.1",
129
- "@jsonforms/core": "3.3.0-alpha.1",
130
- "@jsonforms/react": "3.3.0-alpha.1"
129
+ "@jsonforms/core": "3.3.0-beta.0",
130
+ "@jsonforms/react": "3.3.0-beta.0"
131
131
  },
132
132
  "scripts": {
133
133
  "build": "rollup -c rollup.config.js",
@@ -31,6 +31,7 @@ import {
31
31
  ListItemAvatar,
32
32
  ListItemSecondaryAction,
33
33
  ListItemText,
34
+ Tooltip,
34
35
  } from '@mui/material';
35
36
  import { Delete as DeleteIcon } from '@mui/icons-material';
36
37
  import React from 'react';
@@ -53,13 +54,19 @@ export const ListWithDetailMasterItem = ({
53
54
  <ListItemText primary={childLabel} />
54
55
  {enabled && (
55
56
  <ListItemSecondaryAction>
56
- <IconButton
57
- aria-label={translations.removeAriaLabel}
58
- onClick={removeItem(path, index)}
59
- size='large'
57
+ <Tooltip
58
+ id='tooltip-remove'
59
+ title={translations.removeTooltip}
60
+ placement='bottom'
60
61
  >
61
- <DeleteIcon />
62
- </IconButton>
62
+ <IconButton
63
+ aria-label={translations.removeAriaLabel}
64
+ onClick={removeItem(path, index)}
65
+ size='large'
66
+ >
67
+ <DeleteIcon />
68
+ </IconButton>
69
+ </Tooltip>
63
70
  </ListItemSecondaryAction>
64
71
  )}
65
72
  </ListItem>
@@ -25,7 +25,7 @@
25
25
  import React from 'react';
26
26
  import { LabelProps, RankedTester, rankWith, uiTypeIs } from '@jsonforms/core';
27
27
  import { withJsonFormsLabelProps } from '@jsonforms/react';
28
- import { Hidden, Typography } from '@mui/material';
28
+ import { Typography } from '@mui/material';
29
29
 
30
30
  /**
31
31
  * Default tester for a label.
@@ -40,11 +40,10 @@ export const materialLabelRendererTester: RankedTester = rankWith(
40
40
  * Default renderer for a label.
41
41
  */
42
42
  export const MaterialLabelRenderer = ({ text, visible }: LabelProps) => {
43
- return (
44
- <Hidden xsUp={!visible}>
45
- <Typography variant='h6'>{text}</Typography>
46
- </Hidden>
47
- );
43
+ if (!visible) {
44
+ return null;
45
+ }
46
+ return <Typography variant='h6'>{text}</Typography>;
48
47
  };
49
48
 
50
49
  export default withJsonFormsLabelProps(MaterialLabelRenderer);
@@ -38,7 +38,7 @@ import {
38
38
  JsonFormsDispatch,
39
39
  withJsonFormsArrayLayoutProps,
40
40
  } from '@jsonforms/react';
41
- import { Grid, Hidden, List, Typography } from '@mui/material';
41
+ import { Grid, List, Typography } from '@mui/material';
42
42
  import map from 'lodash/map';
43
43
  import range from 'lodash/range';
44
44
  import React, { useCallback, useMemo, useState } from 'react';
@@ -105,8 +105,12 @@ export const MaterialListWithDetailRenderer = ({
105
105
  setSelectedIndex(undefined);
106
106
  }, [schema]);
107
107
 
108
+ if (!visible) {
109
+ return null;
110
+ }
111
+
108
112
  return (
109
- <Hidden xsUp={!visible}>
113
+ <>
110
114
  <ArrayLayoutToolbar
111
115
  translations={translations}
112
116
  label={computeLabel(
@@ -135,11 +139,13 @@ export const MaterialListWithDetailRenderer = ({
135
139
  removeItem={handleRemoveItem}
136
140
  selected={selectedIndex === index}
137
141
  key={index}
142
+ uischema={foundUISchema}
143
+ childLabelProp={appliedUiSchemaOptions.elementLabelProp}
138
144
  translations={translations}
139
145
  />
140
146
  ))
141
147
  ) : (
142
- <p>No data</p>
148
+ <p>{translations.noDataMessage}</p>
143
149
  )}
144
150
  </List>
145
151
  </Grid>
@@ -158,7 +164,7 @@ export const MaterialListWithDetailRenderer = ({
158
164
  )}
159
165
  </Grid>
160
166
  </Grid>
161
- </Hidden>
167
+ </>
162
168
  );
163
169
  };
164
170
 
@@ -23,7 +23,6 @@
23
23
  THE SOFTWARE.
24
24
  */
25
25
  import React from 'react';
26
- import { Hidden } from '@mui/material';
27
26
 
28
27
  import {
29
28
  createCombinatorRenderInfos,
@@ -51,17 +50,20 @@ export const MaterialAllOfRenderer = ({
51
50
  uischema.scope,
52
51
  path
53
52
  );
53
+
54
+ if (!visible) {
55
+ return null;
56
+ }
57
+
54
58
  if (delegateUISchema) {
55
59
  return (
56
- <Hidden xsUp={!visible}>
57
- <JsonFormsDispatch
58
- schema={schema}
59
- uischema={delegateUISchema}
60
- path={path}
61
- renderers={renderers}
62
- cells={cells}
63
- />
64
- </Hidden>
60
+ <JsonFormsDispatch
61
+ schema={schema}
62
+ uischema={delegateUISchema}
63
+ path={path}
64
+ renderers={renderers}
65
+ cells={cells}
66
+ />
65
67
  );
66
68
  }
67
69
  const allOfRenderInfos = createCombinatorRenderInfos(
@@ -74,7 +76,7 @@ export const MaterialAllOfRenderer = ({
74
76
  );
75
77
 
76
78
  return (
77
- <Hidden xsUp={!visible}>
79
+ <>
78
80
  {allOfRenderInfos.map((allOfRenderInfo, allOfIndex) => (
79
81
  <JsonFormsDispatch
80
82
  key={allOfIndex}
@@ -85,7 +87,7 @@ export const MaterialAllOfRenderer = ({
85
87
  cells={cells}
86
88
  />
87
89
  ))}
88
- </Hidden>
90
+ </>
89
91
  );
90
92
  };
91
93
 
@@ -34,7 +34,7 @@ import {
34
34
  rankWith,
35
35
  } from '@jsonforms/core';
36
36
  import { JsonFormsDispatch, withJsonFormsAnyOfProps } from '@jsonforms/react';
37
- import { Hidden, Tab, Tabs } from '@mui/material';
37
+ import { Tab, Tabs } from '@mui/material';
38
38
  import CombinatorProperties from './CombinatorProperties';
39
39
  import isEmpty from 'lodash/isEmpty';
40
40
  import { TabSwitchConfirmDialog } from './TabSwitchConfirmDialog';
@@ -104,8 +104,12 @@ export const MaterialAnyOfRenderer = ({
104
104
  uischemas
105
105
  );
106
106
 
107
+ if (!visible) {
108
+ return null;
109
+ }
110
+
107
111
  return (
108
- <Hidden xsUp={!visible}>
112
+ <>
109
113
  <CombinatorProperties
110
114
  schema={schema}
111
115
  combinatorKeyword={anyOf}
@@ -137,7 +141,7 @@ export const MaterialAnyOfRenderer = ({
137
141
  open={confirmDialogOpen}
138
142
  handleClose={handleClose}
139
143
  />
140
- </Hidden>
144
+ </>
141
145
  );
142
146
  };
143
147
 
@@ -33,7 +33,6 @@ import {
33
33
  } from '@jsonforms/core';
34
34
  import { withJsonFormsArrayLayoutProps } from '@jsonforms/react';
35
35
  import { MaterialTableControl } from './MaterialTableControl';
36
- import { Hidden } from '@mui/material';
37
36
  import { DeleteDialog } from './DeleteDialog';
38
37
 
39
38
  export const MaterialArrayControlRenderer = (props: ArrayLayoutProps) => {
@@ -58,8 +57,12 @@ export const MaterialArrayControlRenderer = (props: ArrayLayoutProps) => {
58
57
  }, [setOpen, path, rowData]);
59
58
  const deleteClose = useCallback(() => setOpen(false), [setOpen]);
60
59
 
60
+ if (!visible) {
61
+ return null;
62
+ }
63
+
61
64
  return (
62
- <Hidden xsUp={!visible}>
65
+ <>
63
66
  <MaterialTableControl {...props} openDeleteDialog={openDeleteDialog} />
64
67
  <DeleteDialog
65
68
  open={open}
@@ -71,7 +74,7 @@ export const MaterialArrayControlRenderer = (props: ArrayLayoutProps) => {
71
74
  title={props.translations.deleteDialogTitle}
72
75
  message={props.translations.deleteDialogMessage}
73
76
  />
74
- </Hidden>
77
+ </>
75
78
  );
76
79
  };
77
80
 
@@ -24,7 +24,6 @@ import {
24
24
  FormGroup,
25
25
  FormHelperText,
26
26
  FormLabel,
27
- Hidden,
28
27
  } from '@mui/material';
29
28
  import isEmpty from 'lodash/isEmpty';
30
29
  import React from 'react';
@@ -58,62 +57,64 @@ export const MaterialEnumArrayRenderer = ({
58
57
  appliedUiSchemaOptions.showUnfocusedDescription
59
58
  );
60
59
 
60
+ if (!visible) {
61
+ return null;
62
+ }
63
+
61
64
  return (
62
- <Hidden xsUp={!visible}>
63
- <FormControl
64
- component='fieldset'
65
- fullWidth={!appliedUiSchemaOptions.trim}
66
- onFocus={onFocus}
67
- onBlur={onBlur}
65
+ <FormControl
66
+ component='fieldset'
67
+ fullWidth={!appliedUiSchemaOptions.trim}
68
+ onFocus={onFocus}
69
+ onBlur={onBlur}
70
+ >
71
+ <FormLabel
72
+ error={!isValid}
73
+ component='legend'
74
+ required={showAsRequired(
75
+ required,
76
+ appliedUiSchemaOptions.hideRequiredAsterisk
77
+ )}
68
78
  >
69
- <FormLabel
70
- error={!isValid}
71
- component='legend'
72
- required={showAsRequired(
73
- required,
74
- appliedUiSchemaOptions.hideRequiredAsterisk
75
- )}
76
- >
77
- {label}
78
- </FormLabel>
79
- <FormGroup row>
80
- {options.map((option: any, index: number) => {
81
- const optionPath = Paths.compose(path, `${index}`);
82
- const checkboxValue = data?.includes(option.value)
83
- ? option.value
84
- : undefined;
85
- return (
86
- <FormControlLabel
87
- id={id + '-label-' + option.value}
88
- key={option.value}
89
- control={
90
- <MuiCheckbox
91
- id={id + '-' + option.value}
92
- key={'checkbox-' + option.value}
93
- isValid={isEmpty(errors)}
94
- path={optionPath}
95
- handleChange={(_childPath, newValue) =>
96
- newValue
97
- ? addItem(path, option.value)
98
- : removeItem(path, option.value)
99
- }
100
- data={checkboxValue}
101
- errors={errors}
102
- schema={schema}
103
- visible={visible}
104
- {...otherProps}
105
- />
106
- }
107
- label={option.label}
108
- />
109
- );
110
- })}
111
- </FormGroup>
112
- <FormHelperText error={!isValid}>
113
- {!isValid ? errors : showDescription ? description : null}
114
- </FormHelperText>
115
- </FormControl>
116
- </Hidden>
79
+ {label}
80
+ </FormLabel>
81
+ <FormGroup row>
82
+ {options.map((option: any, index: number) => {
83
+ const optionPath = Paths.compose(path, `${index}`);
84
+ const checkboxValue = data?.includes(option.value)
85
+ ? option.value
86
+ : undefined;
87
+ return (
88
+ <FormControlLabel
89
+ id={id + '-label-' + option.value}
90
+ key={option.value}
91
+ control={
92
+ <MuiCheckbox
93
+ id={id + '-' + option.value}
94
+ key={'checkbox-' + option.value}
95
+ isValid={isEmpty(errors)}
96
+ path={optionPath}
97
+ handleChange={(_childPath, newValue) =>
98
+ newValue
99
+ ? addItem(path, option.value)
100
+ : removeItem(path, option.value)
101
+ }
102
+ data={checkboxValue}
103
+ errors={errors}
104
+ schema={schema}
105
+ visible={visible}
106
+ {...otherProps}
107
+ />
108
+ }
109
+ label={option.label}
110
+ />
111
+ );
112
+ })}
113
+ </FormGroup>
114
+ <FormHelperText error={!isValid}>
115
+ {!isValid ? errors : showDescription ? description : null}
116
+ </FormHelperText>
117
+ </FormControl>
117
118
  );
118
119
  };
119
120
 
@@ -32,7 +32,6 @@ import {
32
32
  StatePropsOfControlWithDetail,
33
33
  } from '@jsonforms/core';
34
34
  import { JsonFormsDispatch, withJsonFormsDetailProps } from '@jsonforms/react';
35
- import { Hidden } from '@mui/material';
36
35
  import React, { useMemo } from 'react';
37
36
 
38
37
  export const MaterialObjectRenderer = ({
@@ -66,18 +65,21 @@ export const MaterialObjectRenderer = ({
66
65
  ),
67
66
  [uischemas, schema, uischema.scope, path, label, uischema, rootSchema]
68
67
  );
68
+
69
+ if (!visible) {
70
+ return null;
71
+ }
72
+
69
73
  return (
70
- <Hidden xsUp={!visible}>
71
- <JsonFormsDispatch
72
- visible={visible}
73
- enabled={enabled}
74
- schema={schema}
75
- uischema={detailUiSchema}
76
- path={path}
77
- renderers={renderers}
78
- cells={cells}
79
- />
80
- </Hidden>
74
+ <JsonFormsDispatch
75
+ visible={visible}
76
+ enabled={enabled}
77
+ schema={schema}
78
+ uischema={detailUiSchema}
79
+ path={path}
80
+ renderers={renderers}
81
+ cells={cells}
82
+ />
81
83
  );
82
84
  };
83
85
 
@@ -37,7 +37,7 @@ import {
37
37
  RankedTester,
38
38
  rankWith,
39
39
  } from '@jsonforms/core';
40
- import { Hidden, Tab, Tabs } from '@mui/material';
40
+ import { Tab, Tabs } from '@mui/material';
41
41
  import { JsonFormsDispatch, withJsonFormsOneOfProps } from '@jsonforms/react';
42
42
  import CombinatorProperties from './CombinatorProperties';
43
43
 
@@ -103,8 +103,12 @@ export const MaterialOneOfRenderer = ({
103
103
  [setConfirmDialogOpen, setSelectedIndex, data]
104
104
  );
105
105
 
106
+ if (!visible) {
107
+ return null;
108
+ }
109
+
106
110
  return (
107
- <Hidden xsUp={!visible}>
111
+ <>
108
112
  <CombinatorProperties
109
113
  schema={schema}
110
114
  combinatorKeyword={'oneOf'}
@@ -136,7 +140,7 @@ export const MaterialOneOfRenderer = ({
136
140
  open={confirmDialogOpen}
137
141
  handleClose={handleClose}
138
142
  />
139
- </Hidden>
143
+ </>
140
144
  );
141
145
  };
142
146
 
@@ -35,7 +35,6 @@ import React, { Fragment, useMemo } from 'react';
35
35
  import {
36
36
  FormHelperText,
37
37
  Grid,
38
- Hidden,
39
38
  IconButton,
40
39
  Table,
41
40
  TableBody,
@@ -473,39 +472,41 @@ export class MaterialTableControl extends React.Component<
473
472
  ? generateCells(TableHeaderCell, schema, path, enabled, cells)
474
473
  : undefined;
475
474
 
475
+ if (!visible) {
476
+ return null;
477
+ }
478
+
476
479
  return (
477
- <Hidden xsUp={!visible}>
478
- <Table>
479
- <TableHead>
480
- <TableToolbar
481
- errors={errors}
482
- label={label}
483
- description={description}
484
- addItem={this.addItem}
485
- numColumns={isObjectSchema ? headerCells.length : 1}
486
- path={path}
487
- uischema={controlElement}
488
- schema={schema}
489
- rootSchema={rootSchema}
490
- enabled={enabled}
491
- translations={translations}
492
- />
493
- {isObjectSchema && (
494
- <TableRow>
495
- {headerCells}
496
- {enabled ? <TableCell /> : null}
497
- </TableRow>
498
- )}
499
- </TableHead>
500
- <TableBody>
501
- <TableRows
502
- openDeleteDialog={openDeleteDialog}
503
- translations={translations}
504
- {...this.props}
505
- />
506
- </TableBody>
507
- </Table>
508
- </Hidden>
480
+ <Table>
481
+ <TableHead>
482
+ <TableToolbar
483
+ errors={errors}
484
+ label={label}
485
+ description={description}
486
+ addItem={this.addItem}
487
+ numColumns={isObjectSchema ? headerCells.length : 1}
488
+ path={path}
489
+ uischema={controlElement}
490
+ schema={schema}
491
+ rootSchema={rootSchema}
492
+ enabled={enabled}
493
+ translations={translations}
494
+ />
495
+ {isObjectSchema && (
496
+ <TableRow>
497
+ {headerCells}
498
+ {enabled ? <TableCell /> : null}
499
+ </TableRow>
500
+ )}
501
+ </TableHead>
502
+ <TableBody>
503
+ <TableRows
504
+ openDeleteDialog={openDeleteDialog}
505
+ translations={translations}
506
+ {...this.props}
507
+ />
508
+ </TableBody>
509
+ </Table>
509
510
  );
510
511
  }
511
512
  }
@@ -33,12 +33,7 @@ import {
33
33
  isDescriptionHidden,
34
34
  } from '@jsonforms/core';
35
35
  import { withJsonFormsControlProps } from '@jsonforms/react';
36
- import {
37
- FormControlLabel,
38
- FormHelperText,
39
- Tooltip,
40
- Hidden,
41
- } from '@mui/material';
36
+ import { FormControlLabel, FormHelperText, Tooltip } from '@mui/material';
42
37
  import { MuiCheckbox } from '../mui-controls/MuiCheckbox';
43
38
 
44
39
  export const MaterialBooleanControl = ({
@@ -104,8 +99,12 @@ export const MaterialBooleanControl = ({
104
99
  }
105
100
  const ariaDescribedBy = descriptionIds.join(' ');
106
101
 
102
+ if (!visible) {
103
+ return null;
104
+ }
105
+
107
106
  return (
108
- <Hidden xsUp={!visible}>
107
+ <>
109
108
  <Tooltip id={tooltipId} title={showTooltip ? description : ''}>
110
109
  <FormControlLabel
111
110
  label={label}
@@ -137,7 +136,7 @@ export const MaterialBooleanControl = ({
137
136
  <FormHelperText id={helpId2} error={!isValid}>
138
137
  {secondFormHelperText}
139
138
  </FormHelperText>
140
- </Hidden>
139
+ </>
141
140
  );
142
141
  };
143
142
 
@@ -35,12 +35,7 @@ import {
35
35
  isDescriptionHidden,
36
36
  } from '@jsonforms/core';
37
37
  import { withJsonFormsControlProps } from '@jsonforms/react';
38
- import {
39
- FormControlLabel,
40
- FormHelperText,
41
- Tooltip,
42
- Hidden,
43
- } from '@mui/material';
38
+ import { FormControlLabel, FormHelperText, Tooltip } from '@mui/material';
44
39
  import { MuiToggle } from '../mui-controls/MuiToggle';
45
40
 
46
41
  export const MaterialBooleanToggleControl = ({
@@ -106,8 +101,12 @@ export const MaterialBooleanToggleControl = ({
106
101
  }
107
102
  const ariaDescribedBy = descriptionIds.join(' ');
108
103
 
104
+ if (!visible) {
105
+ return null;
106
+ }
107
+
109
108
  return (
110
- <Hidden xsUp={!visible}>
109
+ <>
111
110
  <Tooltip id={tooltipId} title={showTooltip ? description : ''}>
112
111
  <FormControlLabel
113
112
  label={label}
@@ -139,7 +138,7 @@ export const MaterialBooleanToggleControl = ({
139
138
  <FormHelperText id={helpId2} error={!isValid}>
140
139
  {secondFormHelperText}
141
140
  </FormHelperText>
142
- </Hidden>
141
+ </>
143
142
  );
144
143
  };
145
144