@mui/material 7.0.0-alpha.1 → 7.0.0-alpha.2

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 (105) hide show
  1. package/Accordion/Accordion.d.ts +12 -6
  2. package/Backdrop/Backdrop.d.ts +12 -6
  3. package/Button/Button.js +3 -3
  4. package/CHANGELOG.md +31 -0
  5. package/Dialog/Dialog.d.ts +2 -2
  6. package/IconButton/IconButton.js +3 -3
  7. package/InputBase/inputBaseClasses.d.ts +15 -6
  8. package/InputLabel/InputLabel.d.ts +2 -2
  9. package/InputLabel/InputLabel.js +3 -3
  10. package/Popover/Popover.d.ts +1 -1
  11. package/Snackbar/Snackbar.d.ts +2 -2
  12. package/SpeedDial/SpeedDial.d.ts +8 -6
  13. package/StepContent/StepContent.d.ts +2 -2
  14. package/Tooltip/Tooltip.d.ts +19 -3
  15. package/esm/Accordion/Accordion.d.ts +12 -6
  16. package/esm/Backdrop/Backdrop.d.ts +12 -6
  17. package/esm/Button/Button.js +3 -3
  18. package/esm/Dialog/Dialog.d.ts +2 -2
  19. package/esm/IconButton/IconButton.js +3 -3
  20. package/esm/InputBase/inputBaseClasses.d.ts +15 -6
  21. package/esm/InputLabel/InputLabel.d.ts +2 -2
  22. package/esm/InputLabel/InputLabel.js +3 -3
  23. package/esm/Popover/Popover.d.ts +1 -1
  24. package/esm/Snackbar/Snackbar.d.ts +2 -2
  25. package/esm/SpeedDial/SpeedDial.d.ts +8 -6
  26. package/esm/StepContent/StepContent.d.ts +2 -2
  27. package/esm/Tooltip/Tooltip.d.ts +19 -3
  28. package/esm/index.d.ts +0 -2
  29. package/esm/index.js +1 -3
  30. package/esm/useAutocomplete/useAutocomplete.js +0 -1
  31. package/esm/utils/mergeSlotProps.d.ts +1 -1
  32. package/esm/version/index.js +2 -2
  33. package/index.d.ts +0 -2
  34. package/index.js +1 -20
  35. package/modern/Accordion/Accordion.d.ts +12 -6
  36. package/modern/Backdrop/Backdrop.d.ts +12 -6
  37. package/modern/Button/Button.js +3 -3
  38. package/modern/Dialog/Dialog.d.ts +2 -2
  39. package/modern/IconButton/IconButton.js +3 -3
  40. package/modern/InputBase/inputBaseClasses.d.ts +15 -6
  41. package/modern/InputLabel/InputLabel.d.ts +2 -2
  42. package/modern/InputLabel/InputLabel.js +3 -3
  43. package/modern/Popover/Popover.d.ts +1 -1
  44. package/modern/Snackbar/Snackbar.d.ts +2 -2
  45. package/modern/SpeedDial/SpeedDial.d.ts +8 -6
  46. package/modern/StepContent/StepContent.d.ts +2 -2
  47. package/modern/Tooltip/Tooltip.d.ts +19 -3
  48. package/modern/index.d.ts +0 -2
  49. package/modern/index.js +1 -3
  50. package/modern/useAutocomplete/useAutocomplete.js +0 -1
  51. package/modern/utils/mergeSlotProps.d.ts +1 -1
  52. package/modern/version/index.js +2 -2
  53. package/package.json +9 -7
  54. package/tsconfig.build.tsbuildinfo +1 -1
  55. package/useAutocomplete/useAutocomplete.js +0 -1
  56. package/utils/mergeSlotProps.d.ts +1 -1
  57. package/version/index.js +2 -2
  58. package/Hidden/Hidden.d.ts +0 -96
  59. package/Hidden/Hidden.js +0 -145
  60. package/Hidden/HiddenCss.d.ts +0 -17
  61. package/Hidden/HiddenCss.js +0 -189
  62. package/Hidden/HiddenJs.d.ts +0 -18
  63. package/Hidden/HiddenJs.js +0 -127
  64. package/Hidden/hiddenCssClasses.d.ts +0 -3
  65. package/Hidden/hiddenCssClasses.js +0 -15
  66. package/Hidden/index.d.ts +0 -2
  67. package/Hidden/index.js +0 -13
  68. package/Hidden/withWidth.d.ts +0 -17
  69. package/Hidden/withWidth.js +0 -118
  70. package/PigmentHidden/PigmentHidden.d.ts +0 -100
  71. package/PigmentHidden/PigmentHidden.js +0 -287
  72. package/PigmentHidden/index.d.ts +0 -2
  73. package/PigmentHidden/index.js +0 -25
  74. package/esm/Hidden/Hidden.d.ts +0 -96
  75. package/esm/Hidden/Hidden.js +0 -140
  76. package/esm/Hidden/HiddenCss.d.ts +0 -17
  77. package/esm/Hidden/HiddenCss.js +0 -182
  78. package/esm/Hidden/HiddenJs.d.ts +0 -18
  79. package/esm/Hidden/HiddenJs.js +0 -121
  80. package/esm/Hidden/hiddenCssClasses.d.ts +0 -3
  81. package/esm/Hidden/hiddenCssClasses.js +0 -7
  82. package/esm/Hidden/index.d.ts +0 -2
  83. package/esm/Hidden/index.js +0 -1
  84. package/esm/Hidden/withWidth.d.ts +0 -17
  85. package/esm/Hidden/withWidth.js +0 -109
  86. package/esm/PigmentHidden/PigmentHidden.d.ts +0 -100
  87. package/esm/PigmentHidden/PigmentHidden.js +0 -279
  88. package/esm/PigmentHidden/index.d.ts +0 -2
  89. package/esm/PigmentHidden/index.js +0 -2
  90. package/modern/Hidden/Hidden.d.ts +0 -96
  91. package/modern/Hidden/Hidden.js +0 -140
  92. package/modern/Hidden/HiddenCss.d.ts +0 -17
  93. package/modern/Hidden/HiddenCss.js +0 -182
  94. package/modern/Hidden/HiddenJs.d.ts +0 -18
  95. package/modern/Hidden/HiddenJs.js +0 -121
  96. package/modern/Hidden/hiddenCssClasses.d.ts +0 -3
  97. package/modern/Hidden/hiddenCssClasses.js +0 -7
  98. package/modern/Hidden/index.d.ts +0 -2
  99. package/modern/Hidden/index.js +0 -1
  100. package/modern/Hidden/withWidth.d.ts +0 -17
  101. package/modern/Hidden/withWidth.js +0 -109
  102. package/modern/PigmentHidden/PigmentHidden.d.ts +0 -100
  103. package/modern/PigmentHidden/PigmentHidden.js +0 -279
  104. package/modern/PigmentHidden/index.d.ts +0 -2
  105. package/modern/PigmentHidden/index.js +0 -2
@@ -1,118 +0,0 @@
1
- "use strict";
2
- 'use client';
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.isWidthUp = exports.isWidthDown = exports.default = void 0;
10
- var React = _interopRequireWildcard(require("react"));
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _getDisplayName = _interopRequireDefault(require("@mui/utils/getDisplayName"));
13
- var _useThemeProps = require("@mui/system/useThemeProps");
14
- var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
15
- var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEffect"));
16
- var _useMediaQuery = _interopRequireDefault(require("../useMediaQuery"));
17
- var _jsxRuntime = require("react/jsx-runtime");
18
- const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];
19
-
20
- // By default, returns true if screen width is the same or greater than the given breakpoint.
21
- const isWidthUp = (breakpoint, width, inclusive = true) => {
22
- if (inclusive) {
23
- return breakpointKeys.indexOf(breakpoint) <= breakpointKeys.indexOf(width);
24
- }
25
- return breakpointKeys.indexOf(breakpoint) < breakpointKeys.indexOf(width);
26
- };
27
-
28
- // By default, returns true if screen width is less than the given breakpoint.
29
- exports.isWidthUp = isWidthUp;
30
- const isWidthDown = (breakpoint, width, inclusive = false) => {
31
- if (inclusive) {
32
- return breakpointKeys.indexOf(width) <= breakpointKeys.indexOf(breakpoint);
33
- }
34
- return breakpointKeys.indexOf(width) < breakpointKeys.indexOf(breakpoint);
35
- };
36
- exports.isWidthDown = isWidthDown;
37
- const withWidth = (options = {}) => Component => {
38
- const {
39
- withTheme: withThemeOption = false,
40
- noSSR = false,
41
- initialWidth: initialWidthOption
42
- } = options;
43
- function WithWidth(props) {
44
- const contextTheme = (0, _useTheme.default)();
45
- const theme = props.theme || contextTheme;
46
- const {
47
- initialWidth,
48
- width,
49
- ...other
50
- } = (0, _useThemeProps.getThemeProps)({
51
- theme,
52
- name: 'MuiWithWidth',
53
- props
54
- });
55
- const [mountedState, setMountedState] = React.useState(false);
56
- (0, _useEnhancedEffect.default)(() => {
57
- setMountedState(true);
58
- }, []);
59
-
60
- /**
61
- * innerWidth |xs sm md lg xl
62
- * |-------|-------|-------|-------|------>
63
- * width | xs | sm | md | lg | xl
64
- */
65
- const keys = theme.breakpoints.keys.slice().reverse();
66
- const widthComputed = keys.reduce((output, key) => {
67
- // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
68
- // eslint-disable-next-line react-hooks/rules-of-hooks
69
- const matches = (0, _useMediaQuery.default)(theme.breakpoints.up(key));
70
- return !output && matches ? key : output;
71
- }, null);
72
- const more = {
73
- width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption,
74
- ...(withThemeOption ? {
75
- theme
76
- } : {}),
77
- ...other
78
- };
79
-
80
- // When rendering the component on the server,
81
- // we have no idea about the client browser screen width.
82
- // In order to prevent blinks and help the reconciliation of the React tree
83
- // we are not rendering the child component.
84
- //
85
- // An alternative is to use the `initialWidth` property.
86
- if (more.width === undefined) {
87
- return null;
88
- }
89
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
90
- ...more
91
- });
92
- }
93
- process.env.NODE_ENV !== "production" ? WithWidth.propTypes = {
94
- /**
95
- * As `window.innerWidth` is unavailable on the server,
96
- * we default to rendering an empty component during the first mount.
97
- * You might want to use a heuristic to approximate
98
- * the screen width of the client browser screen width.
99
- *
100
- * For instance, you could be using the user-agent or the client-hints.
101
- * https://caniuse.com/#search=client%20hint
102
- */
103
- initialWidth: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
104
- /**
105
- * @ignore
106
- */
107
- theme: _propTypes.default.object,
108
- /**
109
- * Bypass the width calculation logic.
110
- */
111
- width: _propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])
112
- } : void 0;
113
- if (process.env.NODE_ENV !== 'production') {
114
- WithWidth.displayName = `WithWidth(${(0, _getDisplayName.default)(Component)})`;
115
- }
116
- return WithWidth;
117
- };
118
- var _default = exports.default = withWidth;
@@ -1,100 +0,0 @@
1
- import * as React from 'react';
2
- import { Breakpoint } from '@mui/system';
3
- export interface HiddenProps {
4
- /**
5
- * The content of the component.
6
- */
7
- children?: React.ReactNode;
8
- /**
9
- * Specify which implementation to use. 'js' is the default, 'css' works better for
10
- * server-side rendering.
11
- * @default 'js'
12
- */
13
- implementation?: 'js' | 'css';
14
- /**
15
- * You can use this prop when choosing the `js` implementation with server-side rendering.
16
- *
17
- * As `window.innerWidth` is unavailable on the server,
18
- * we default to rendering an empty component during the first mount.
19
- * You might want to use a heuristic to approximate
20
- * the screen width of the client browser screen width.
21
- *
22
- * For instance, you could be using the user-agent or the client-hints.
23
- * https://caniuse.com/#search=client%20hint
24
- */
25
- initialWidth?: Breakpoint;
26
- /**
27
- * If `true`, component is hidden on screens below (but not including) this size.
28
- * @default false
29
- */
30
- lgDown?: boolean;
31
- /**
32
- * If `true`, component is hidden on screens this size and above.
33
- * @default false
34
- */
35
- lgUp?: boolean;
36
- /**
37
- * If `true`, component is hidden on screens below (but not including) this size.
38
- * @default false
39
- */
40
- mdDown?: boolean;
41
- /**
42
- * If `true`, component is hidden on screens this size and above.
43
- * @default false
44
- */
45
- mdUp?: boolean;
46
- /**
47
- * Hide the given breakpoint(s).
48
- */
49
- only?: Breakpoint | Breakpoint[];
50
- /**
51
- * If `true`, component is hidden on screens below (but not including) this size.
52
- * @default false
53
- */
54
- smDown?: boolean;
55
- /**
56
- * If `true`, component is hidden on screens this size and above.
57
- * @default false
58
- */
59
- smUp?: boolean;
60
- /**
61
- * If `true`, component is hidden on screens below (but not including) this size.
62
- * @default false
63
- */
64
- xlDown?: boolean;
65
- /**
66
- * If `true`, component is hidden on screens this size and above.
67
- * @default false
68
- */
69
- xlUp?: boolean;
70
- /**
71
- * If `true`, component is hidden on screens below (but not including) this size.
72
- * @default false
73
- */
74
- xsDown?: boolean;
75
- /**
76
- * If `true`, component is hidden on screens this size and above.
77
- * @default false
78
- */
79
- xsUp?: boolean;
80
- }
81
- /**
82
- *
83
- * Demos:
84
- *
85
- * - [Hidden](https://next.mui.com/material-ui/react-hidden/)
86
- *
87
- * API:
88
- *
89
- * - [PigmentHidden API](https://next.mui.com/material-ui/api/pigment-hidden/)
90
- */
91
- declare function PigmentHidden({
92
- implementation,
93
- ...props
94
- }: HiddenProps & {
95
- className?: string;
96
- }): React.JSX.Element;
97
- declare namespace PigmentHidden {
98
- var propTypes: any;
99
- }
100
- export default PigmentHidden;
@@ -1,287 +0,0 @@
1
- "use strict";
2
- 'use client';
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
- Object.defineProperty(exports, "__esModule", {
7
- value: true
8
- });
9
- exports.default = void 0;
10
- var React = _interopRequireWildcard(require("react"));
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _clsx = _interopRequireDefault(require("clsx"));
13
- var _Hidden = _interopRequireDefault(require("@mui/material-pigment-css/Hidden"));
14
- var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
15
- var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
- var _HiddenJs = _interopRequireDefault(require("../Hidden/HiddenJs"));
17
- var _hiddenCssClasses = require("../Hidden/hiddenCssClasses");
18
- var _zeroStyled = require("../zero-styled");
19
- var _jsxRuntime = require("react/jsx-runtime");
20
- // @ts-ignore
21
-
22
- const useUtilityClasses = ownerState => {
23
- const {
24
- classes,
25
- breakpoints
26
- } = ownerState;
27
- const slots = {
28
- root: ['root', ...breakpoints.map(({
29
- breakpoint,
30
- dir
31
- }) => {
32
- return dir === 'only' ? `${dir}${(0, _capitalize.default)(breakpoint)}` : `${breakpoint}${(0, _capitalize.default)(dir)}`;
33
- })]
34
- };
35
- return (0, _composeClasses.default)(slots, _hiddenCssClasses.getHiddenCssUtilityClass, classes);
36
- };
37
- function HiddenCss(props) {
38
- const theme = (0, _zeroStyled.useTheme)();
39
- const {
40
- children,
41
- className,
42
- only,
43
- ...other
44
- } = props;
45
- if (process.env.NODE_ENV !== 'production') {
46
- const unknownProps = Object.keys(other).filter(propName => {
47
- const isUndeclaredBreakpoint = !theme.breakpoints.keys.some(breakpoint => {
48
- return `${breakpoint}Up` === propName || `${breakpoint}Down` === propName;
49
- });
50
- return !['classes', 'theme', 'isRtl', 'sx'].includes(propName) && isUndeclaredBreakpoint;
51
- });
52
- if (unknownProps.length > 0) {
53
- console.error(`MUI: Unsupported props received by \`<Hidden implementation="css" />\`: ${unknownProps.join(', ')}. Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?`);
54
- }
55
- }
56
- const breakpoints = [];
57
- for (let i = 0; i < theme.breakpoints.keys.length; i += 1) {
58
- const breakpoint = theme.breakpoints.keys[i];
59
- const breakpointUp = other[`${breakpoint}Up`];
60
- const breakpointDown = other[`${breakpoint}Down`];
61
- if (breakpointUp) {
62
- breakpoints.push({
63
- breakpoint,
64
- dir: 'up'
65
- });
66
- }
67
- if (breakpointDown) {
68
- breakpoints.push({
69
- breakpoint,
70
- dir: 'down'
71
- });
72
- }
73
- }
74
- if (only) {
75
- const onlyBreakpoints = Array.isArray(only) ? only : [only];
76
- onlyBreakpoints.forEach(breakpoint => {
77
- breakpoints.push({
78
- breakpoint,
79
- dir: 'only'
80
- });
81
- });
82
- }
83
- const ownerState = {
84
- ...props,
85
- classes: {},
86
- breakpoints
87
- };
88
- const classes = useUtilityClasses(ownerState);
89
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Hidden.default, {
90
- className: (0, _clsx.default)(classes.root, className),
91
- ...props
92
- });
93
- }
94
- process.env.NODE_ENV !== "production" ? HiddenCss.propTypes /* remove-proptypes */ = {
95
- // ┌────────────────────────────── Warning ──────────────────────────────┐
96
- // │ These PropTypes are generated from the TypeScript type definitions. │
97
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
98
- // └─────────────────────────────────────────────────────────────────────┘
99
- /**
100
- * The content of the component.
101
- */
102
- children: _propTypes.default.node,
103
- className: _propTypes.default.string,
104
- /**
105
- * Specify which implementation to use. 'js' is the default, 'css' works better for
106
- * server-side rendering.
107
- * @default 'js'
108
- */
109
- implementation: _propTypes.default.oneOf(['css', 'js']),
110
- /**
111
- * You can use this prop when choosing the `js` implementation with server-side rendering.
112
- *
113
- * As `window.innerWidth` is unavailable on the server,
114
- * we default to rendering an empty component during the first mount.
115
- * You might want to use a heuristic to approximate
116
- * the screen width of the client browser screen width.
117
- *
118
- * For instance, you could be using the user-agent or the client-hints.
119
- * https://caniuse.com/#search=client%20hint
120
- */
121
- initialWidth: _propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']),
122
- /**
123
- * If `true`, component is hidden on screens below (but not including) this size.
124
- * @default false
125
- */
126
- lgDown: _propTypes.default.bool,
127
- /**
128
- * If `true`, component is hidden on screens this size and above.
129
- * @default false
130
- */
131
- lgUp: _propTypes.default.bool,
132
- /**
133
- * If `true`, component is hidden on screens below (but not including) this size.
134
- * @default false
135
- */
136
- mdDown: _propTypes.default.bool,
137
- /**
138
- * If `true`, component is hidden on screens this size and above.
139
- * @default false
140
- */
141
- mdUp: _propTypes.default.bool,
142
- /**
143
- * Hide the given breakpoint(s).
144
- */
145
- only: _propTypes.default.oneOfType([_propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']).isRequired)]),
146
- /**
147
- * If `true`, component is hidden on screens below (but not including) this size.
148
- * @default false
149
- */
150
- smDown: _propTypes.default.bool,
151
- /**
152
- * If `true`, component is hidden on screens this size and above.
153
- * @default false
154
- */
155
- smUp: _propTypes.default.bool,
156
- /**
157
- * If `true`, component is hidden on screens below (but not including) this size.
158
- * @default false
159
- */
160
- xlDown: _propTypes.default.bool,
161
- /**
162
- * If `true`, component is hidden on screens this size and above.
163
- * @default false
164
- */
165
- xlUp: _propTypes.default.bool,
166
- /**
167
- * If `true`, component is hidden on screens below (but not including) this size.
168
- * @default false
169
- */
170
- xsDown: _propTypes.default.bool,
171
- /**
172
- * If `true`, component is hidden on screens this size and above.
173
- * @default false
174
- */
175
- xsUp: _propTypes.default.bool
176
- } : void 0;
177
-
178
- /**
179
- *
180
- * Demos:
181
- *
182
- * - [Hidden](https://next.mui.com/material-ui/react-hidden/)
183
- *
184
- * API:
185
- *
186
- * - [PigmentHidden API](https://next.mui.com/material-ui/api/pigment-hidden/)
187
- */
188
- function PigmentHidden({
189
- implementation = 'js',
190
- ...props
191
- }) {
192
- if (implementation === 'js') {
193
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_HiddenJs.default, {
194
- ...props
195
- });
196
- }
197
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(HiddenCss, {
198
- ...props
199
- });
200
- }
201
- process.env.NODE_ENV !== "production" ? PigmentHidden.propTypes /* remove-proptypes */ = {
202
- // ┌────────────────────────────── Warning ──────────────────────────────┐
203
- // │ These PropTypes are generated from the TypeScript type definitions. │
204
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
205
- // └─────────────────────────────────────────────────────────────────────┘
206
- /**
207
- * The content of the component.
208
- */
209
- children: _propTypes.default.node,
210
- /**
211
- * @ignore
212
- */
213
- className: _propTypes.default.string,
214
- /**
215
- * Specify which implementation to use. 'js' is the default, 'css' works better for
216
- * server-side rendering.
217
- * @default 'js'
218
- */
219
- implementation: _propTypes.default.oneOf(['css', 'js']),
220
- /**
221
- * You can use this prop when choosing the `js` implementation with server-side rendering.
222
- *
223
- * As `window.innerWidth` is unavailable on the server,
224
- * we default to rendering an empty component during the first mount.
225
- * You might want to use a heuristic to approximate
226
- * the screen width of the client browser screen width.
227
- *
228
- * For instance, you could be using the user-agent or the client-hints.
229
- * https://caniuse.com/#search=client%20hint
230
- */
231
- initialWidth: _propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']),
232
- /**
233
- * If `true`, component is hidden on screens below (but not including) this size.
234
- * @default false
235
- */
236
- lgDown: _propTypes.default.bool,
237
- /**
238
- * If `true`, component is hidden on screens this size and above.
239
- * @default false
240
- */
241
- lgUp: _propTypes.default.bool,
242
- /**
243
- * If `true`, component is hidden on screens below (but not including) this size.
244
- * @default false
245
- */
246
- mdDown: _propTypes.default.bool,
247
- /**
248
- * If `true`, component is hidden on screens this size and above.
249
- * @default false
250
- */
251
- mdUp: _propTypes.default.bool,
252
- /**
253
- * Hide the given breakpoint(s).
254
- */
255
- only: _propTypes.default.oneOfType([_propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']), _propTypes.default.arrayOf(_propTypes.default.oneOf(['lg', 'md', 'sm', 'xl', 'xs']).isRequired)]),
256
- /**
257
- * If `true`, component is hidden on screens below (but not including) this size.
258
- * @default false
259
- */
260
- smDown: _propTypes.default.bool,
261
- /**
262
- * If `true`, component is hidden on screens this size and above.
263
- * @default false
264
- */
265
- smUp: _propTypes.default.bool,
266
- /**
267
- * If `true`, component is hidden on screens below (but not including) this size.
268
- * @default false
269
- */
270
- xlDown: _propTypes.default.bool,
271
- /**
272
- * If `true`, component is hidden on screens this size and above.
273
- * @default false
274
- */
275
- xlUp: _propTypes.default.bool,
276
- /**
277
- * If `true`, component is hidden on screens below (but not including) this size.
278
- * @default false
279
- */
280
- xsDown: _propTypes.default.bool,
281
- /**
282
- * If `true`, component is hidden on screens this size and above.
283
- * @default false
284
- */
285
- xsUp: _propTypes.default.bool
286
- } : void 0;
287
- var _default = exports.default = PigmentHidden;
@@ -1,2 +0,0 @@
1
- export { default } from "./PigmentHidden.js";
2
- export * from "./PigmentHidden.js";
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {};
8
- Object.defineProperty(exports, "default", {
9
- enumerable: true,
10
- get: function () {
11
- return _PigmentHidden.default;
12
- }
13
- });
14
- var _PigmentHidden = _interopRequireWildcard(require("./PigmentHidden"));
15
- Object.keys(_PigmentHidden).forEach(function (key) {
16
- if (key === "default" || key === "__esModule") return;
17
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
- if (key in exports && exports[key] === _PigmentHidden[key]) return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _PigmentHidden[key];
23
- }
24
- });
25
- });
@@ -1,96 +0,0 @@
1
- import * as React from 'react';
2
- import { Breakpoint } from '@mui/system';
3
- export interface HiddenProps {
4
- /**
5
- * The content of the component.
6
- */
7
- children?: React.ReactNode;
8
- /**
9
- * Specify which implementation to use. 'js' is the default, 'css' works better for
10
- * server-side rendering.
11
- * @default 'js'
12
- */
13
- implementation?: 'js' | 'css';
14
- /**
15
- * You can use this prop when choosing the `js` implementation with server-side rendering.
16
- *
17
- * As `window.innerWidth` is unavailable on the server,
18
- * we default to rendering an empty component during the first mount.
19
- * You might want to use a heuristic to approximate
20
- * the screen width of the client browser screen width.
21
- *
22
- * For instance, you could be using the user-agent or the client-hints.
23
- * https://caniuse.com/#search=client%20hint
24
- */
25
- initialWidth?: Breakpoint;
26
- /**
27
- * If `true`, component is hidden on screens below (but not including) this size.
28
- * @default false
29
- */
30
- lgDown?: boolean;
31
- /**
32
- * If `true`, component is hidden on screens this size and above.
33
- * @default false
34
- */
35
- lgUp?: boolean;
36
- /**
37
- * If `true`, component is hidden on screens below (but not including) this size.
38
- * @default false
39
- */
40
- mdDown?: boolean;
41
- /**
42
- * If `true`, component is hidden on screens this size and above.
43
- * @default false
44
- */
45
- mdUp?: boolean;
46
- /**
47
- * Hide the given breakpoint(s).
48
- */
49
- only?: Breakpoint | Breakpoint[];
50
- /**
51
- * If `true`, component is hidden on screens below (but not including) this size.
52
- * @default false
53
- */
54
- smDown?: boolean;
55
- /**
56
- * If `true`, component is hidden on screens this size and above.
57
- * @default false
58
- */
59
- smUp?: boolean;
60
- /**
61
- * If `true`, component is hidden on screens below (but not including) this size.
62
- * @default false
63
- */
64
- xlDown?: boolean;
65
- /**
66
- * If `true`, component is hidden on screens this size and above.
67
- * @default false
68
- */
69
- xlUp?: boolean;
70
- /**
71
- * If `true`, component is hidden on screens below (but not including) this size.
72
- * @default false
73
- */
74
- xsDown?: boolean;
75
- /**
76
- * If `true`, component is hidden on screens this size and above.
77
- * @default false
78
- */
79
- xsUp?: boolean;
80
- }
81
-
82
- /**
83
- * Responsively hides children based on the selected implementation.
84
- *
85
- * Demos:
86
- *
87
- * - [Hidden](https://next.mui.com/material-ui/react-hidden/)
88
- *
89
- * API:
90
- *
91
- * - [Hidden API](https://next.mui.com/material-ui/api/hidden/)
92
- *
93
- * @deprecated The Hidden component was deprecated in Material UI v5. To learn more, see [the Hidden section](https://mui.com/material-ui/migration/v5-component-changes/#hidden) of the migration docs.
94
- */
95
- declare const Hidden: React.JSXElementConstructor<HiddenProps>;
96
- export default Hidden;