@redsift/table 12.0.0-muiv7 → 12.1.0-muiv5

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.
@@ -1,24 +1,30 @@
1
- import { _ as _objectSpread2, a as _objectWithoutProperties, b as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { _ as _objectSpread2, a as _objectWithoutProperties, b as _extends$1 } from './_rollupPluginBabelHelpers.js';
2
2
  import * as React from 'react';
3
3
  import React__default, { useCallback, useEffect, useMemo, forwardRef, useRef, useState } from 'react';
4
4
  import classNames from 'classnames';
5
- import { Icon, useTheme as useTheme$1, RedsiftColorBlueN, RedsiftColorNeutralXDarkGrey, RedsiftColorNeutralWhite, ThemeProvider } from '@redsift/design-system';
5
+ import { Icon, useTheme as useTheme$1, ThemeProvider, RedsiftColorBlueN, RedsiftColorNeutralXDarkGrey, RedsiftColorNeutralWhite } from '@redsift/design-system';
6
6
  import { getGridNumericOperators as getGridNumericOperators$1, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, getGridStringOperators as getGridStringOperators$1, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators, GridLogicOperator, useGridApiRef, DataGridPro, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector } from '@mui/x-data-grid-pro';
7
7
  import { L as LicenseInfo, u as useControlledDatagridState, T as ThemeProvider$1, S as StyledDataGrid } from './useControlledDatagridState.js';
8
8
  import { mdiSync } from '@redsift/icons';
9
- import { d as defaultSxConfig, i as isPlainObject, s as styled, a as styleFunctionSx, c as clsx, g as generateUtilityClasses, b as createTheme, T as THEME_ID, C as ClassNameGenerator, P as PropTypes, e as generateUtilityClass, f as styled$1, u as useDefaultProps, h as composeClasses, r as rootShouldForwardProp, j as refType } from './Portal.js';
9
+ import { _ as _objectWithoutPropertiesLoose, a as _extends, d as defaultSxConfig, i as isPlainObject, s as styled, b as styleFunctionSx, u as useTheme, c as clsx, e as createTheme, T as THEME_ID, C as ClassNameGenerator, P as PropTypes, g as generateUtilityClasses, f as generateUtilityClass, h as styled$1, j as useThemeProps, k as capitalize, l as composeClasses, r as rootShouldForwardProp, m as refType } from './Portal.js';
10
10
  import { j as jsxRuntimeExports } from './jsx-runtime.js';
11
- import { u as useTheme, m as memoTheme, c as createSimplePaletteValueFilter, a as useFormControl, f as formControlState, b as capitalize, i as isAdornedStart, d as isFilled, F as FormControlContext, e as useId, g as useSlot, h as Select, I as Input, j as FilledInput, O as OutlinedInput, o as onServerSideSelectionStatusChange, S as ServerSideControlledPagination, C as ControlledPagination } from './ControlledPagination.js';
11
+ import { u as useFormControl, f as formControlState, i as isAdornedStart, a as isFilled, F as FormControlContext, b as useId, c as Select, I as Input, d as FilledInput, O as OutlinedInput, o as onServerSideSelectionStatusChange, S as ServerSideControlledPagination, C as ControlledPagination } from './ControlledPagination.js';
12
12
  import { T as Toolbar } from './Toolbar2.js';
13
13
  import { B as BaseButton, a as BaseCheckbox, c as BasePopper, b as BaseIcon } from './BasePopper.js';
14
14
  import { T as ToolbarWrapper } from './ToolbarWrapper2.js';
15
15
 
16
+ function isMuiElement(element, muiNames) {
17
+ return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;
18
+ }
19
+
20
+ const _excluded$7 = ["sx"];
16
21
  const splitProps = props => {
22
+ var _props$theme$unstable, _props$theme;
17
23
  const result = {
18
24
  systemProps: {},
19
25
  otherProps: {}
20
26
  };
21
- const config = props?.theme?.unstable_sxConfig ?? defaultSxConfig;
27
+ const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig;
22
28
  Object.keys(props).forEach(prop => {
23
29
  if (config[prop]) {
24
30
  result.systemProps[prop] = props[prop];
@@ -30,9 +36,9 @@ const splitProps = props => {
30
36
  };
31
37
  function extendSxProp(props) {
32
38
  const {
33
- sx: inSx,
34
- ...other
35
- } = props;
39
+ sx: inSx
40
+ } = props,
41
+ other = _objectWithoutPropertiesLoose(props, _excluded$7);
36
42
  const {
37
43
  systemProps,
38
44
  otherProps
@@ -46,23 +52,17 @@ function extendSxProp(props) {
46
52
  if (!isPlainObject(result)) {
47
53
  return systemProps;
48
54
  }
49
- return {
50
- ...systemProps,
51
- ...result
52
- };
55
+ return _extends({}, systemProps, result);
53
56
  };
54
57
  } else {
55
- finalSx = {
56
- ...systemProps,
57
- ...inSx
58
- };
58
+ finalSx = _extends({}, systemProps, inSx);
59
59
  }
60
- return {
61
- ...otherProps,
60
+ return _extends({}, otherProps, {
62
61
  sx: finalSx
63
- };
62
+ });
64
63
  }
65
64
 
65
+ const _excluded$6 = ["className", "component"];
66
66
  function createBox(options = {}) {
67
67
  const {
68
68
  themeId,
@@ -75,45 +75,34 @@ function createBox(options = {}) {
75
75
  })(styleFunctionSx);
76
76
  const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
77
77
  const theme = useTheme(defaultTheme);
78
- const {
79
- className,
80
- component = 'div',
81
- ...other
82
- } = extendSxProp(inProps);
83
- return /*#__PURE__*/jsxRuntimeExports.jsx(BoxRoot, {
78
+ const _extendSxProp = extendSxProp(inProps),
79
+ {
80
+ className,
81
+ component = 'div'
82
+ } = _extendSxProp,
83
+ other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$6);
84
+ return /*#__PURE__*/jsxRuntimeExports.jsx(BoxRoot, _extends({
84
85
  as: component,
85
86
  ref: ref,
86
87
  className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
87
- theme: themeId ? theme[themeId] || theme : theme,
88
- ...other
89
- });
88
+ theme: themeId ? theme[themeId] || theme : theme
89
+ }, other));
90
90
  });
91
91
  return Box;
92
92
  }
93
93
 
94
- function isMuiElement(element, muiNames) {
95
- return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(
96
- // For server components `muiName` is avaialble in element.type._payload.value.muiName
97
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
98
- // eslint-disable-next-line no-underscore-dangle
99
- element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;
100
- }
101
-
102
- const boxClasses = generateUtilityClasses('MuiBox', ['root']);
103
- var boxClasses$1 = boxClasses;
104
-
105
94
  const defaultTheme = createTheme();
106
95
  const Box = createBox({
107
96
  themeId: THEME_ID,
108
97
  defaultTheme,
109
- defaultClassName: boxClasses$1.root,
98
+ defaultClassName: 'MuiBox-root',
110
99
  generateClassName: ClassNameGenerator.generate
111
100
  });
112
101
  process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
113
- // ┌────────────────────────────── Warning ──────────────────────────────┐
114
- // These PropTypes are generated from the TypeScript type definitions.
115
- // To update them, edit the d.ts file and run `pnpm proptypes`.
116
- // └─────────────────────────────────────────────────────────────────────┘
102
+ // ----------------------------- Warning --------------------------------
103
+ // | These PropTypes are generated from the TypeScript type definitions |
104
+ // | To update them edit the d.ts file and run "yarn proptypes" |
105
+ // ----------------------------------------------------------------------
117
106
  /**
118
107
  * @ignore
119
108
  */
@@ -136,6 +125,7 @@ function getFormLabelUtilityClasses(slot) {
136
125
  const formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);
137
126
  var formLabelClasses$1 = formLabelClasses;
138
127
 
128
+ const _excluded$5 = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"];
139
129
  const useUtilityClasses$4 = ownerState => {
140
130
  const {
141
131
  classes,
@@ -155,77 +145,59 @@ const useUtilityClasses$4 = ownerState => {
155
145
  const FormLabelRoot = styled$1('label', {
156
146
  name: 'MuiFormLabel',
157
147
  slot: 'Root',
158
- overridesResolver: (props, styles) => {
159
- const {
160
- ownerState
161
- } = props;
162
- return [styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled];
163
- }
164
- })(memoTheme(({
165
- theme
166
- }) => ({
167
- color: (theme.vars || theme).palette.text.secondary,
168
- ...theme.typography.body1,
148
+ overridesResolver: ({
149
+ ownerState
150
+ }, styles) => {
151
+ return _extends({}, styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled);
152
+ }
153
+ })(({
154
+ theme,
155
+ ownerState
156
+ }) => _extends({
157
+ color: (theme.vars || theme).palette.text.secondary
158
+ }, theme.typography.body1, {
169
159
  lineHeight: '1.4375em',
170
160
  padding: 0,
171
161
  position: 'relative',
172
- variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
173
- props: {
174
- color
175
- },
176
- style: {
177
- [`&.${formLabelClasses$1.focused}`]: {
178
- color: (theme.vars || theme).palette[color].main
179
- }
180
- }
181
- })), {
182
- props: {},
183
- style: {
184
- [`&.${formLabelClasses$1.disabled}`]: {
185
- color: (theme.vars || theme).palette.text.disabled
186
- },
187
- [`&.${formLabelClasses$1.error}`]: {
188
- color: (theme.vars || theme).palette.error.main
189
- }
190
- }
191
- }]
192
- })));
162
+ [`&.${formLabelClasses$1.focused}`]: {
163
+ color: (theme.vars || theme).palette[ownerState.color].main
164
+ },
165
+ [`&.${formLabelClasses$1.disabled}`]: {
166
+ color: (theme.vars || theme).palette.text.disabled
167
+ },
168
+ [`&.${formLabelClasses$1.error}`]: {
169
+ color: (theme.vars || theme).palette.error.main
170
+ }
171
+ }));
193
172
  const AsteriskComponent = styled$1('span', {
194
173
  name: 'MuiFormLabel',
195
174
  slot: 'Asterisk',
196
175
  overridesResolver: (props, styles) => styles.asterisk
197
- })(memoTheme(({
176
+ })(({
198
177
  theme
199
178
  }) => ({
200
179
  [`&.${formLabelClasses$1.error}`]: {
201
180
  color: (theme.vars || theme).palette.error.main
202
181
  }
203
- })));
182
+ }));
204
183
  const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {
205
- const props = useDefaultProps({
184
+ const props = useThemeProps({
206
185
  props: inProps,
207
186
  name: 'MuiFormLabel'
208
187
  });
209
188
  const {
210
- children,
211
- className,
212
- color,
213
- component = 'label',
214
- disabled,
215
- error,
216
- filled,
217
- focused,
218
- required,
219
- ...other
220
- } = props;
189
+ children,
190
+ className,
191
+ component = 'label'
192
+ } = props,
193
+ other = _objectWithoutPropertiesLoose(props, _excluded$5);
221
194
  const muiFormControl = useFormControl();
222
195
  const fcs = formControlState({
223
196
  props,
224
197
  muiFormControl,
225
198
  states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']
226
199
  });
227
- const ownerState = {
228
- ...props,
200
+ const ownerState = _extends({}, props, {
229
201
  color: fcs.color || 'primary',
230
202
  component,
231
203
  disabled: fcs.disabled,
@@ -233,27 +205,27 @@ const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref)
233
205
  filled: fcs.filled,
234
206
  focused: fcs.focused,
235
207
  required: fcs.required
236
- };
208
+ });
237
209
  const classes = useUtilityClasses$4(ownerState);
238
- return /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabelRoot, {
210
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabelRoot, _extends({
239
211
  as: component,
240
212
  ownerState: ownerState,
241
213
  className: clsx(classes.root, className),
242
- ref: ref,
243
- ...other,
214
+ ref: ref
215
+ }, other, {
244
216
  children: [children, fcs.required && /*#__PURE__*/jsxRuntimeExports.jsxs(AsteriskComponent, {
245
217
  ownerState: ownerState,
246
218
  "aria-hidden": true,
247
219
  className: classes.asterisk,
248
220
  children: ["\u2009", '*']
249
221
  })]
250
- });
222
+ }));
251
223
  });
252
224
  process.env.NODE_ENV !== "production" ? FormLabel.propTypes /* remove-proptypes */ = {
253
- // ┌────────────────────────────── Warning ──────────────────────────────┐
254
- // These PropTypes are generated from the TypeScript type definitions.
255
- // To update them, edit the d.ts file and run `pnpm proptypes`.
256
- // └─────────────────────────────────────────────────────────────────────┘
225
+ // ----------------------------- Warning --------------------------------
226
+ // | These PropTypes are generated from the TypeScript type definitions |
227
+ // | To update them edit the d.ts file and run "yarn proptypes" |
228
+ // ----------------------------------------------------------------------
257
229
  /**
258
230
  * The content of the component.
259
231
  */
@@ -269,7 +241,7 @@ process.env.NODE_ENV !== "production" ? FormLabel.propTypes /* remove-proptypes
269
241
  /**
270
242
  * The color of the component.
271
243
  * It supports both default and custom theme colors, which can be added as shown in the
272
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
244
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
273
245
  */
274
246
  color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
275
247
  /**
@@ -309,6 +281,7 @@ function getInputLabelUtilityClasses(slot) {
309
281
  }
310
282
  generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);
311
283
 
284
+ const _excluded$4 = ["disableAnimation", "margin", "shrink", "variant", "className"];
312
285
  const useUtilityClasses$3 = ownerState => {
313
286
  const {
314
287
  classes,
@@ -320,15 +293,11 @@ const useUtilityClasses$3 = ownerState => {
320
293
  required
321
294
  } = ownerState;
322
295
  const slots = {
323
- root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],
296
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size === 'small' && 'sizeSmall', variant],
324
297
  asterisk: [required && 'asterisk']
325
298
  };
326
299
  const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
327
- return {
328
- ...classes,
329
- // forward the focused, disabled, etc. classes to the FormLabel
330
- ...composedClasses
331
- };
300
+ return _extends({}, classes, composedClasses);
332
301
  };
333
302
  const InputLabelRoot = styled$1(FormLabel$1, {
334
303
  shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
@@ -340,144 +309,81 @@ const InputLabelRoot = styled$1(FormLabel$1, {
340
309
  } = props;
341
310
  return [{
342
311
  [`& .${formLabelClasses$1.asterisk}`]: styles.asterisk
343
- }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];
312
+ }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, styles[ownerState.variant]];
344
313
  }
345
- })(memoTheme(({
346
- theme
347
- }) => ({
314
+ })(({
315
+ theme,
316
+ ownerState
317
+ }) => _extends({
348
318
  display: 'block',
349
319
  transformOrigin: 'top left',
350
320
  whiteSpace: 'nowrap',
351
321
  overflow: 'hidden',
352
322
  textOverflow: 'ellipsis',
353
- maxWidth: '100%',
354
- variants: [{
355
- props: ({
356
- ownerState
357
- }) => ownerState.formControl,
358
- style: {
359
- position: 'absolute',
360
- left: 0,
361
- top: 0,
362
- // slight alteration to spec spacing to match visual spec result
363
- transform: 'translate(0, 20px) scale(1)'
364
- }
365
- }, {
366
- props: {
367
- size: 'small'
368
- },
369
- style: {
370
- // Compensation for the `Input.inputSizeSmall` style.
371
- transform: 'translate(0, 17px) scale(1)'
372
- }
373
- }, {
374
- props: ({
375
- ownerState
376
- }) => ownerState.shrink,
377
- style: {
378
- transform: 'translate(0, -1.5px) scale(0.75)',
379
- transformOrigin: 'top left',
380
- maxWidth: '133%'
381
- }
382
- }, {
383
- props: ({
384
- ownerState
385
- }) => !ownerState.disableAnimation,
386
- style: {
387
- transition: theme.transitions.create(['color', 'transform', 'max-width'], {
388
- duration: theme.transitions.duration.shorter,
389
- easing: theme.transitions.easing.easeOut
390
- })
391
- }
392
- }, {
393
- props: {
394
- variant: 'filled'
395
- },
396
- style: {
397
- // Chrome's autofill feature gives the input field a yellow background.
398
- // Since the input field is behind the label in the HTML tree,
399
- // the input field is drawn last and hides the label with an opaque background color.
400
- // zIndex: 1 will raise the label above opaque background-colors of input.
401
- zIndex: 1,
402
- pointerEvents: 'none',
403
- transform: 'translate(12px, 16px) scale(1)',
404
- maxWidth: 'calc(100% - 24px)'
405
- }
406
- }, {
407
- props: {
408
- variant: 'filled',
409
- size: 'small'
410
- },
411
- style: {
412
- transform: 'translate(12px, 13px) scale(1)'
413
- }
414
- }, {
415
- props: ({
416
- variant,
417
- ownerState
418
- }) => variant === 'filled' && ownerState.shrink,
419
- style: {
420
- userSelect: 'none',
421
- pointerEvents: 'auto',
422
- transform: 'translate(12px, 7px) scale(0.75)',
423
- maxWidth: 'calc(133% - 24px)'
424
- }
425
- }, {
426
- props: ({
427
- variant,
428
- ownerState,
429
- size
430
- }) => variant === 'filled' && ownerState.shrink && size === 'small',
431
- style: {
432
- transform: 'translate(12px, 4px) scale(0.75)'
433
- }
434
- }, {
435
- props: {
436
- variant: 'outlined'
437
- },
438
- style: {
439
- // see comment above on filled.zIndex
440
- zIndex: 1,
441
- pointerEvents: 'none',
442
- transform: 'translate(14px, 16px) scale(1)',
443
- maxWidth: 'calc(100% - 24px)'
444
- }
445
- }, {
446
- props: {
447
- variant: 'outlined',
448
- size: 'small'
449
- },
450
- style: {
451
- transform: 'translate(14px, 9px) scale(1)'
452
- }
453
- }, {
454
- props: ({
455
- variant,
456
- ownerState
457
- }) => variant === 'outlined' && ownerState.shrink,
458
- style: {
459
- userSelect: 'none',
460
- pointerEvents: 'auto',
461
- // Theoretically, we should have (8+5)*2/0.75 = 34px
462
- // but it feels a better when it bleeds a bit on the left, so 32px.
463
- maxWidth: 'calc(133% - 32px)',
464
- transform: 'translate(14px, -9px) scale(0.75)'
465
- }
466
- }]
323
+ maxWidth: '100%'
324
+ }, ownerState.formControl && {
325
+ position: 'absolute',
326
+ left: 0,
327
+ top: 0,
328
+ // slight alteration to spec spacing to match visual spec result
329
+ transform: 'translate(0, 20px) scale(1)'
330
+ }, ownerState.size === 'small' && {
331
+ // Compensation for the `Input.inputSizeSmall` style.
332
+ transform: 'translate(0, 17px) scale(1)'
333
+ }, ownerState.shrink && {
334
+ transform: 'translate(0, -1.5px) scale(0.75)',
335
+ transformOrigin: 'top left',
336
+ maxWidth: '133%'
337
+ }, !ownerState.disableAnimation && {
338
+ transition: theme.transitions.create(['color', 'transform', 'max-width'], {
339
+ duration: theme.transitions.duration.shorter,
340
+ easing: theme.transitions.easing.easeOut
341
+ })
342
+ }, ownerState.variant === 'filled' && _extends({
343
+ // Chrome's autofill feature gives the input field a yellow background.
344
+ // Since the input field is behind the label in the HTML tree,
345
+ // the input field is drawn last and hides the label with an opaque background color.
346
+ // zIndex: 1 will raise the label above opaque background-colors of input.
347
+ zIndex: 1,
348
+ pointerEvents: 'none',
349
+ transform: 'translate(12px, 16px) scale(1)',
350
+ maxWidth: 'calc(100% - 24px)'
351
+ }, ownerState.size === 'small' && {
352
+ transform: 'translate(12px, 13px) scale(1)'
353
+ }, ownerState.shrink && _extends({
354
+ userSelect: 'none',
355
+ pointerEvents: 'auto',
356
+ transform: 'translate(12px, 7px) scale(0.75)',
357
+ maxWidth: 'calc(133% - 24px)'
358
+ }, ownerState.size === 'small' && {
359
+ transform: 'translate(12px, 4px) scale(0.75)'
360
+ })), ownerState.variant === 'outlined' && _extends({
361
+ // see comment above on filled.zIndex
362
+ zIndex: 1,
363
+ pointerEvents: 'none',
364
+ transform: 'translate(14px, 16px) scale(1)',
365
+ maxWidth: 'calc(100% - 24px)'
366
+ }, ownerState.size === 'small' && {
367
+ transform: 'translate(14px, 9px) scale(1)'
368
+ }, ownerState.shrink && {
369
+ userSelect: 'none',
370
+ pointerEvents: 'auto',
371
+ // Theoretically, we should have (8+5)*2/0.75 = 34px
372
+ // but it feels a better when it bleeds a bit on the left, so 32px.
373
+ maxWidth: 'calc(133% - 32px)',
374
+ transform: 'translate(14px, -9px) scale(0.75)'
467
375
  })));
468
376
  const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
469
- const props = useDefaultProps({
377
+ const props = useThemeProps({
470
378
  name: 'MuiInputLabel',
471
379
  props: inProps
472
380
  });
473
381
  const {
474
- disableAnimation = false,
475
- margin,
476
- shrink: shrinkProp,
477
- variant,
478
- className,
479
- ...other
480
- } = props;
382
+ disableAnimation = false,
383
+ shrink: shrinkProp,
384
+ className
385
+ } = props,
386
+ other = _objectWithoutPropertiesLoose(props, _excluded$4);
481
387
  const muiFormControl = useFormControl();
482
388
  let shrink = shrinkProp;
483
389
  if (typeof shrink === 'undefined' && muiFormControl) {
@@ -486,33 +392,31 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
486
392
  const fcs = formControlState({
487
393
  props,
488
394
  muiFormControl,
489
- states: ['size', 'variant', 'required', 'focused']
395
+ states: ['size', 'variant', 'required']
490
396
  });
491
- const ownerState = {
492
- ...props,
397
+ const ownerState = _extends({}, props, {
493
398
  disableAnimation,
494
399
  formControl: muiFormControl,
495
400
  shrink,
496
401
  size: fcs.size,
497
402
  variant: fcs.variant,
498
- required: fcs.required,
499
- focused: fcs.focused
500
- };
403
+ required: fcs.required
404
+ });
501
405
  const classes = useUtilityClasses$3(ownerState);
502
- return /*#__PURE__*/jsxRuntimeExports.jsx(InputLabelRoot, {
406
+ return /*#__PURE__*/jsxRuntimeExports.jsx(InputLabelRoot, _extends({
503
407
  "data-shrink": shrink,
504
- ref: ref,
505
- className: clsx(classes.root, className),
506
- ...other,
507
408
  ownerState: ownerState,
409
+ ref: ref,
410
+ className: clsx(classes.root, className)
411
+ }, other, {
508
412
  classes: classes
509
- });
413
+ }));
510
414
  });
511
415
  process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes */ = {
512
- // ┌────────────────────────────── Warning ──────────────────────────────┐
513
- // These PropTypes are generated from the TypeScript type definitions.
514
- // To update them, edit the d.ts file and run `pnpm proptypes`.
515
- // └─────────────────────────────────────────────────────────────────────┘
416
+ // ----------------------------- Warning --------------------------------
417
+ // | These PropTypes are generated from the TypeScript type definitions |
418
+ // | To update them edit the d.ts file and run "yarn proptypes" |
419
+ // ----------------------------------------------------------------------
516
420
  /**
517
421
  * The content of the component.
518
422
  */
@@ -528,7 +432,7 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes
528
432
  /**
529
433
  * The color of the component.
530
434
  * It supports both default and custom theme colors, which can be added as shown in the
531
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
435
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
532
436
  */
533
437
  color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
534
438
  /**
@@ -582,6 +486,7 @@ function getFormControlUtilityClasses(slot) {
582
486
  }
583
487
  generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);
584
488
 
489
+ const _excluded$3 = ["children", "className", "color", "component", "disabled", "error", "focused", "fullWidth", "hiddenLabel", "margin", "required", "size", "variant"];
585
490
  const useUtilityClasses$2 = ownerState => {
586
491
  const {
587
492
  classes,
@@ -596,13 +501,14 @@ const useUtilityClasses$2 = ownerState => {
596
501
  const FormControlRoot = styled$1('div', {
597
502
  name: 'MuiFormControl',
598
503
  slot: 'Root',
599
- overridesResolver: (props, styles) => {
600
- const {
601
- ownerState
602
- } = props;
603
- return [styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth];
504
+ overridesResolver: ({
505
+ ownerState
506
+ }, styles) => {
507
+ return _extends({}, styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth);
604
508
  }
605
- })({
509
+ })(({
510
+ ownerState
511
+ }) => _extends({
606
512
  display: 'inline-flex',
607
513
  flexDirection: 'column',
608
514
  position: 'relative',
@@ -611,33 +517,16 @@ const FormControlRoot = styled$1('div', {
611
517
  padding: 0,
612
518
  margin: 0,
613
519
  border: 0,
614
- verticalAlign: 'top',
615
- // Fix alignment issue on Safari.
616
- variants: [{
617
- props: {
618
- margin: 'normal'
619
- },
620
- style: {
621
- marginTop: 16,
622
- marginBottom: 8
623
- }
624
- }, {
625
- props: {
626
- margin: 'dense'
627
- },
628
- style: {
629
- marginTop: 8,
630
- marginBottom: 4
631
- }
632
- }, {
633
- props: {
634
- fullWidth: true
635
- },
636
- style: {
637
- width: '100%'
638
- }
639
- }]
640
- });
520
+ verticalAlign: 'top'
521
+ }, ownerState.margin === 'normal' && {
522
+ marginTop: 16,
523
+ marginBottom: 8
524
+ }, ownerState.margin === 'dense' && {
525
+ marginTop: 8,
526
+ marginBottom: 4
527
+ }, ownerState.fullWidth && {
528
+ width: '100%'
529
+ }));
641
530
 
642
531
  /**
643
532
  * Provides context such as filled/focused/error/required for form inputs.
@@ -664,28 +553,27 @@ const FormControlRoot = styled$1('div', {
664
553
  * For instance, only one input can be focused at the same time, the state shouldn't be shared.
665
554
  */
666
555
  const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {
667
- const props = useDefaultProps({
556
+ const props = useThemeProps({
668
557
  props: inProps,
669
558
  name: 'MuiFormControl'
670
559
  });
671
560
  const {
672
- children,
673
- className,
674
- color = 'primary',
675
- component = 'div',
676
- disabled = false,
677
- error = false,
678
- focused: visuallyFocused,
679
- fullWidth = false,
680
- hiddenLabel = false,
681
- margin = 'none',
682
- required = false,
683
- size = 'medium',
684
- variant = 'outlined',
685
- ...other
686
- } = props;
687
- const ownerState = {
688
- ...props,
561
+ children,
562
+ className,
563
+ color = 'primary',
564
+ component = 'div',
565
+ disabled = false,
566
+ error = false,
567
+ focused: visuallyFocused,
568
+ fullWidth = false,
569
+ hiddenLabel = false,
570
+ margin = 'none',
571
+ required = false,
572
+ size = 'medium',
573
+ variant = 'outlined'
574
+ } = props,
575
+ other = _objectWithoutPropertiesLoose(props, _excluded$3);
576
+ const ownerState = _extends({}, props, {
689
577
  color,
690
578
  component,
691
579
  disabled,
@@ -696,7 +584,7 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
696
584
  required,
697
585
  size,
698
586
  variant
699
- };
587
+ });
700
588
  const classes = useUtilityClasses$2(ownerState);
701
589
  const [adornedStart, setAdornedStart] = React.useState(() => {
702
590
  // We need to iterate through the children and find the Input in order
@@ -737,8 +625,9 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
737
625
  }
738
626
  const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;
739
627
  let registerEffect;
740
- const registeredInput = React.useRef(false);
741
628
  if (process.env.NODE_ENV !== 'production') {
629
+ // eslint-disable-next-line react-hooks/rules-of-hooks
630
+ const registeredInput = React.useRef(false);
742
631
  registerEffect = () => {
743
632
  if (registeredInput.current) {
744
633
  console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\n'));
@@ -749,12 +638,6 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
749
638
  };
750
639
  };
751
640
  }
752
- const onFilled = React.useCallback(() => {
753
- setFilled(true);
754
- }, []);
755
- const onEmpty = React.useCallback(() => {
756
- setFilled(false);
757
- }, []);
758
641
  const childContext = React.useMemo(() => {
759
642
  return {
760
643
  adornedStart,
@@ -770,33 +653,37 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
770
653
  onBlur: () => {
771
654
  setFocused(false);
772
655
  },
656
+ onEmpty: () => {
657
+ setFilled(false);
658
+ },
659
+ onFilled: () => {
660
+ setFilled(true);
661
+ },
773
662
  onFocus: () => {
774
663
  setFocused(true);
775
664
  },
776
- onEmpty,
777
- onFilled,
778
665
  registerEffect,
779
666
  required,
780
667
  variant
781
668
  };
782
- }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, onEmpty, onFilled, required, size, variant]);
669
+ }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
783
670
  return /*#__PURE__*/jsxRuntimeExports.jsx(FormControlContext.Provider, {
784
671
  value: childContext,
785
- children: /*#__PURE__*/jsxRuntimeExports.jsx(FormControlRoot, {
672
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(FormControlRoot, _extends({
786
673
  as: component,
787
674
  ownerState: ownerState,
788
675
  className: clsx(classes.root, className),
789
- ref: ref,
790
- ...other,
676
+ ref: ref
677
+ }, other, {
791
678
  children: children
792
- })
679
+ }))
793
680
  });
794
681
  });
795
682
  process.env.NODE_ENV !== "production" ? FormControl.propTypes /* remove-proptypes */ = {
796
- // ┌────────────────────────────── Warning ──────────────────────────────┐
797
- // These PropTypes are generated from the TypeScript type definitions.
798
- // To update them, edit the d.ts file and run `pnpm proptypes`.
799
- // └─────────────────────────────────────────────────────────────────────┘
683
+ // ----------------------------- Warning --------------------------------
684
+ // | These PropTypes are generated from the TypeScript type definitions |
685
+ // | To update them edit the d.ts file and run "yarn proptypes" |
686
+ // ----------------------------------------------------------------------
800
687
  /**
801
688
  * The content of the component.
802
689
  */
@@ -812,7 +699,7 @@ process.env.NODE_ENV !== "production" ? FormControl.propTypes /* remove-proptype
812
699
  /**
813
700
  * The color of the component.
814
701
  * It supports both default and custom theme colors, which can be added as shown in the
815
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
702
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
816
703
  * @default 'primary'
817
704
  */
818
705
  color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
@@ -881,6 +768,7 @@ const formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root
881
768
  var formHelperTextClasses$1 = formHelperTextClasses;
882
769
 
883
770
  var _span;
771
+ const _excluded$2 = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
884
772
  const useUtilityClasses$1 = ownerState => {
885
773
  const {
886
774
  classes,
@@ -906,11 +794,12 @@ const FormHelperTextRoot = styled$1('p', {
906
794
  } = props;
907
795
  return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];
908
796
  }
909
- })(memoTheme(({
910
- theme
911
- }) => ({
912
- color: (theme.vars || theme).palette.text.secondary,
913
- ...theme.typography.caption,
797
+ })(({
798
+ theme,
799
+ ownerState
800
+ }) => _extends({
801
+ color: (theme.vars || theme).palette.text.secondary
802
+ }, theme.typography.caption, {
914
803
  textAlign: 'left',
915
804
  marginTop: 3,
916
805
  marginRight: 0,
@@ -921,50 +810,31 @@ const FormHelperTextRoot = styled$1('p', {
921
810
  },
922
811
  [`&.${formHelperTextClasses$1.error}`]: {
923
812
  color: (theme.vars || theme).palette.error.main
924
- },
925
- variants: [{
926
- props: {
927
- size: 'small'
928
- },
929
- style: {
930
- marginTop: 4
931
- }
932
- }, {
933
- props: ({
934
- ownerState
935
- }) => ownerState.contained,
936
- style: {
937
- marginLeft: 14,
938
- marginRight: 14
939
- }
940
- }]
941
- })));
813
+ }
814
+ }, ownerState.size === 'small' && {
815
+ marginTop: 4
816
+ }, ownerState.contained && {
817
+ marginLeft: 14,
818
+ marginRight: 14
819
+ }));
942
820
  const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {
943
- const props = useDefaultProps({
821
+ const props = useThemeProps({
944
822
  props: inProps,
945
823
  name: 'MuiFormHelperText'
946
824
  });
947
825
  const {
948
- children,
949
- className,
950
- component = 'p',
951
- disabled,
952
- error,
953
- filled,
954
- focused,
955
- margin,
956
- required,
957
- variant,
958
- ...other
959
- } = props;
826
+ children,
827
+ className,
828
+ component = 'p'
829
+ } = props,
830
+ other = _objectWithoutPropertiesLoose(props, _excluded$2);
960
831
  const muiFormControl = useFormControl();
961
832
  const fcs = formControlState({
962
833
  props,
963
834
  muiFormControl,
964
835
  states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']
965
836
  });
966
- const ownerState = {
967
- ...props,
837
+ const ownerState = _extends({}, props, {
968
838
  component,
969
839
  contained: fcs.variant === 'filled' || fcs.variant === 'outlined',
970
840
  variant: fcs.variant,
@@ -974,30 +844,26 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
974
844
  filled: fcs.filled,
975
845
  focused: fcs.focused,
976
846
  required: fcs.required
977
- };
978
-
979
- // This issue explains why this is required: https://github.com/mui/material-ui/issues/42184
980
- delete ownerState.ownerState;
847
+ });
981
848
  const classes = useUtilityClasses$1(ownerState);
982
- return /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperTextRoot, {
849
+ return /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperTextRoot, _extends({
983
850
  as: component,
984
- className: clsx(classes.root, className),
985
- ref: ref,
986
- ...other,
987
851
  ownerState: ownerState,
852
+ className: clsx(classes.root, className),
853
+ ref: ref
854
+ }, other, {
988
855
  children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue
989
856
  _span || (_span = /*#__PURE__*/jsxRuntimeExports.jsx("span", {
990
857
  className: "notranslate",
991
- "aria-hidden": true,
992
858
  children: "\u200B"
993
859
  })) : children
994
- });
860
+ }));
995
861
  });
996
862
  process.env.NODE_ENV !== "production" ? FormHelperText.propTypes /* remove-proptypes */ = {
997
- // ┌────────────────────────────── Warning ──────────────────────────────┐
998
- // These PropTypes are generated from the TypeScript type definitions.
999
- // To update them, edit the d.ts file and run `pnpm proptypes`.
1000
- // └─────────────────────────────────────────────────────────────────────┘
863
+ // ----------------------------- Warning --------------------------------
864
+ // | These PropTypes are generated from the TypeScript type definitions |
865
+ // | To update them edit the d.ts file and run "yarn proptypes" |
866
+ // ----------------------------------------------------------------------
1001
867
  /**
1002
868
  * The content of the component.
1003
869
  *
@@ -1058,6 +924,7 @@ function getTextFieldUtilityClass(slot) {
1058
924
  }
1059
925
  generateUtilityClasses('MuiTextField', ['root']);
1060
926
 
927
+ const _excluded$1 = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"];
1061
928
  const variantComponent = {
1062
929
  standard: Input,
1063
930
  filled: FilledInput,
@@ -1111,49 +978,47 @@ const TextFieldRoot = styled$1(FormControl$1, {
1111
978
  * - using the underlying components directly as shown in the demos
1112
979
  */
1113
980
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
1114
- const props = useDefaultProps({
981
+ const props = useThemeProps({
1115
982
  props: inProps,
1116
983
  name: 'MuiTextField'
1117
984
  });
1118
985
  const {
1119
- autoComplete,
1120
- autoFocus = false,
1121
- children,
1122
- className,
1123
- color = 'primary',
1124
- defaultValue,
1125
- disabled = false,
1126
- error = false,
1127
- FormHelperTextProps: FormHelperTextPropsProp,
1128
- fullWidth = false,
1129
- helperText,
1130
- id: idOverride,
1131
- InputLabelProps: InputLabelPropsProp,
1132
- inputProps: inputPropsProp,
1133
- InputProps: InputPropsProp,
1134
- inputRef,
1135
- label,
1136
- maxRows,
1137
- minRows,
1138
- multiline = false,
1139
- name,
1140
- onBlur,
1141
- onChange,
1142
- onFocus,
1143
- placeholder,
1144
- required = false,
1145
- rows,
1146
- select = false,
1147
- SelectProps: SelectPropsProp,
1148
- slots = {},
1149
- slotProps = {},
1150
- type,
1151
- value,
1152
- variant = 'outlined',
1153
- ...other
1154
- } = props;
1155
- const ownerState = {
1156
- ...props,
986
+ autoComplete,
987
+ autoFocus = false,
988
+ children,
989
+ className,
990
+ color = 'primary',
991
+ defaultValue,
992
+ disabled = false,
993
+ error = false,
994
+ FormHelperTextProps,
995
+ fullWidth = false,
996
+ helperText,
997
+ id: idOverride,
998
+ InputLabelProps,
999
+ inputProps,
1000
+ InputProps,
1001
+ inputRef,
1002
+ label,
1003
+ maxRows,
1004
+ minRows,
1005
+ multiline = false,
1006
+ name,
1007
+ onBlur,
1008
+ onChange,
1009
+ onClick,
1010
+ onFocus,
1011
+ placeholder,
1012
+ required = false,
1013
+ rows,
1014
+ select = false,
1015
+ SelectProps,
1016
+ type,
1017
+ value,
1018
+ variant = 'outlined'
1019
+ } = props,
1020
+ other = _objectWithoutPropertiesLoose(props, _excluded$1);
1021
+ const ownerState = _extends({}, props, {
1157
1022
  autoFocus,
1158
1023
  color,
1159
1024
  disabled,
@@ -1163,89 +1028,32 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
1163
1028
  required,
1164
1029
  select,
1165
1030
  variant
1166
- };
1031
+ });
1167
1032
  const classes = useUtilityClasses(ownerState);
1168
1033
  if (process.env.NODE_ENV !== 'production') {
1169
1034
  if (select && !children) {
1170
1035
  console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
1171
1036
  }
1172
1037
  }
1173
- const id = useId(idOverride);
1174
- const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
1175
- const inputLabelId = label && id ? `${id}-label` : undefined;
1176
- const InputComponent = variantComponent[variant];
1177
- const externalForwardedProps = {
1178
- slots,
1179
- slotProps: {
1180
- input: InputPropsProp,
1181
- inputLabel: InputLabelPropsProp,
1182
- htmlInput: inputPropsProp,
1183
- formHelperText: FormHelperTextPropsProp,
1184
- select: SelectPropsProp,
1185
- ...slotProps
1186
- }
1187
- };
1188
- const inputAdditionalProps = {};
1189
- const inputLabelSlotProps = externalForwardedProps.slotProps.inputLabel;
1038
+ const InputMore = {};
1190
1039
  if (variant === 'outlined') {
1191
- if (inputLabelSlotProps && typeof inputLabelSlotProps.shrink !== 'undefined') {
1192
- inputAdditionalProps.notched = inputLabelSlotProps.shrink;
1040
+ if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') {
1041
+ InputMore.notched = InputLabelProps.shrink;
1193
1042
  }
1194
- inputAdditionalProps.label = label;
1043
+ InputMore.label = label;
1195
1044
  }
1196
1045
  if (select) {
1197
1046
  // unset defaults from textbox inputs
1198
- if (!SelectPropsProp || !SelectPropsProp.native) {
1199
- inputAdditionalProps.id = undefined;
1200
- }
1201
- inputAdditionalProps['aria-describedby'] = undefined;
1202
- }
1203
- const [RootSlot, rootProps] = useSlot('root', {
1204
- elementType: TextFieldRoot,
1205
- shouldForwardComponentProp: true,
1206
- externalForwardedProps: {
1207
- ...externalForwardedProps,
1208
- ...other
1209
- },
1210
- ownerState,
1211
- className: clsx(classes.root, className),
1212
- ref,
1213
- additionalProps: {
1214
- disabled,
1215
- error,
1216
- fullWidth,
1217
- required,
1218
- color,
1219
- variant
1047
+ if (!SelectProps || !SelectProps.native) {
1048
+ InputMore.id = undefined;
1220
1049
  }
1221
- });
1222
- const [InputSlot, inputProps] = useSlot('input', {
1223
- elementType: InputComponent,
1224
- externalForwardedProps,
1225
- additionalProps: inputAdditionalProps,
1226
- ownerState
1227
- });
1228
- const [InputLabelSlot, inputLabelProps] = useSlot('inputLabel', {
1229
- elementType: InputLabel$1,
1230
- externalForwardedProps,
1231
- ownerState
1232
- });
1233
- const [HtmlInputSlot, htmlInputProps] = useSlot('htmlInput', {
1234
- elementType: 'input',
1235
- externalForwardedProps,
1236
- ownerState
1237
- });
1238
- const [FormHelperTextSlot, formHelperTextProps] = useSlot('formHelperText', {
1239
- elementType: FormHelperText$1,
1240
- externalForwardedProps,
1241
- ownerState
1242
- });
1243
- const [SelectSlot, selectProps] = useSlot('select', {
1244
- elementType: Select,
1245
- externalForwardedProps,
1246
- ownerState
1247
- });
1248
- const InputElement = /*#__PURE__*/jsxRuntimeExports.jsx(InputSlot, {
1050
+ InputMore['aria-describedby'] = undefined;
1051
+ }
1052
+ const id = useId(idOverride);
1053
+ const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
1054
+ const inputLabelId = label && id ? `${id}-label` : undefined;
1055
+ const InputComponent = variantComponent[variant];
1056
+ const InputElement = /*#__PURE__*/jsxRuntimeExports.jsx(InputComponent, _extends({
1249
1057
  "aria-describedby": helperTextId,
1250
1058
  autoComplete: autoComplete,
1251
1059
  autoFocus: autoFocus,
@@ -1263,40 +1071,46 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
1263
1071
  onBlur: onBlur,
1264
1072
  onChange: onChange,
1265
1073
  onFocus: onFocus,
1074
+ onClick: onClick,
1266
1075
  placeholder: placeholder,
1267
- inputProps: htmlInputProps,
1268
- slots: {
1269
- input: slots.htmlInput ? HtmlInputSlot : undefined
1270
- },
1271
- ...inputProps
1272
- });
1273
- return /*#__PURE__*/jsxRuntimeExports.jsxs(RootSlot, {
1274
- ...rootProps,
1275
- children: [label != null && label !== '' && /*#__PURE__*/jsxRuntimeExports.jsx(InputLabelSlot, {
1076
+ inputProps: inputProps
1077
+ }, InputMore, InputProps));
1078
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(TextFieldRoot, _extends({
1079
+ className: clsx(classes.root, className),
1080
+ disabled: disabled,
1081
+ error: error,
1082
+ fullWidth: fullWidth,
1083
+ ref: ref,
1084
+ required: required,
1085
+ color: color,
1086
+ variant: variant,
1087
+ ownerState: ownerState
1088
+ }, other, {
1089
+ children: [label != null && label !== '' && /*#__PURE__*/jsxRuntimeExports.jsx(InputLabel$1, _extends({
1276
1090
  htmlFor: id,
1277
- id: inputLabelId,
1278
- ...inputLabelProps,
1091
+ id: inputLabelId
1092
+ }, InputLabelProps, {
1279
1093
  children: label
1280
- }), select ? /*#__PURE__*/jsxRuntimeExports.jsx(SelectSlot, {
1094
+ })), select ? /*#__PURE__*/jsxRuntimeExports.jsx(Select, _extends({
1281
1095
  "aria-describedby": helperTextId,
1282
1096
  id: id,
1283
1097
  labelId: inputLabelId,
1284
1098
  value: value,
1285
- input: InputElement,
1286
- ...selectProps,
1099
+ input: InputElement
1100
+ }, SelectProps, {
1287
1101
  children: children
1288
- }) : InputElement, helperText && /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperTextSlot, {
1289
- id: helperTextId,
1290
- ...formHelperTextProps,
1102
+ })) : InputElement, helperText && /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperText$1, _extends({
1103
+ id: helperTextId
1104
+ }, FormHelperTextProps, {
1291
1105
  children: helperText
1292
- })]
1293
- });
1106
+ }))]
1107
+ }));
1294
1108
  });
1295
1109
  process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes */ = {
1296
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1297
- // These PropTypes are generated from the TypeScript type definitions.
1298
- // To update them, edit the d.ts file and run `pnpm proptypes`.
1299
- // └─────────────────────────────────────────────────────────────────────┘
1110
+ // ----------------------------- Warning --------------------------------
1111
+ // | These PropTypes are generated from the TypeScript type definitions |
1112
+ // | To update them edit the d.ts file and run "yarn proptypes" |
1113
+ // ----------------------------------------------------------------------
1300
1114
  /**
1301
1115
  * This prop helps users to fill forms faster, especially on mobile devices.
1302
1116
  * The name can be confusing, as it's more like an autofill.
@@ -1323,7 +1137,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
1323
1137
  /**
1324
1138
  * The color of the component.
1325
1139
  * It supports both default and custom theme colors, which can be added as shown in the
1326
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1140
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
1327
1141
  * @default 'primary'
1328
1142
  */
1329
1143
  color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
@@ -1342,8 +1156,7 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
1342
1156
  */
1343
1157
  error: PropTypes.bool,
1344
1158
  /**
1345
- * Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
1346
- * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1159
+ * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
1347
1160
  */
1348
1161
  FormHelperTextProps: PropTypes.object,
1349
1162
  /**
@@ -1361,22 +1174,19 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
1361
1174
  */
1362
1175
  id: PropTypes.string,
1363
1176
  /**
1364
- * Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
1177
+ * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
1365
1178
  * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
1366
- * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1367
1179
  */
1368
1180
  InputLabelProps: PropTypes.object,
1369
1181
  /**
1370
1182
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1371
- * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1372
1183
  */
1373
1184
  inputProps: PropTypes.object,
1374
1185
  /**
1375
1186
  * Props applied to the Input element.
1376
- * It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
1377
- * [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
1187
+ * It will be a [`FilledInput`](/material-ui/api/filled-input/),
1188
+ * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
1378
1189
  * component depending on the `variant` prop value.
1379
- * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1380
1190
  */
1381
1191
  InputProps: PropTypes.object,
1382
1192
  /**
@@ -1420,6 +1230,10 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
1420
1230
  * You can pull out the new value by accessing `event.target.value` (string).
1421
1231
  */
1422
1232
  onChange: PropTypes.func,
1233
+ /**
1234
+ * @ignore
1235
+ */
1236
+ onClick: PropTypes.func,
1423
1237
  /**
1424
1238
  * @ignore
1425
1239
  */
@@ -1438,44 +1252,19 @@ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes
1438
1252
  */
1439
1253
  rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
1440
1254
  /**
1441
- * Render a [`Select`](https://mui.com/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
1255
+ * Render a [`Select`](/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
1442
1256
  * If this option is set you must pass the options of the select as children.
1443
1257
  * @default false
1444
1258
  */
1445
1259
  select: PropTypes.bool,
1446
1260
  /**
1447
- * Props applied to the [`Select`](https://mui.com/material-ui/api/select/) element.
1448
- * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
1261
+ * Props applied to the [`Select`](/material-ui/api/select/) element.
1449
1262
  */
1450
1263
  SelectProps: PropTypes.object,
1451
1264
  /**
1452
1265
  * The size of the component.
1453
- * @default 'medium'
1454
1266
  */
1455
1267
  size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
1456
- /**
1457
- * The props used for each slot inside.
1458
- * @default {}
1459
- */
1460
- slotProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({
1461
- formHelperText: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1462
- htmlInput: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1463
- input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1464
- inputLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
1465
- select: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
1466
- }),
1467
- /**
1468
- * The components used for each slot inside.
1469
- * @default {}
1470
- */
1471
- slots: PropTypes.shape({
1472
- formHelperText: PropTypes.elementType,
1473
- htmlInput: PropTypes.elementType,
1474
- input: PropTypes.elementType,
1475
- inputLabel: PropTypes.elementType,
1476
- root: PropTypes.elementType,
1477
- select: PropTypes.elementType
1478
- }),
1479
1268
  /**
1480
1269
  * The system prop that allows defining system overrides as well as additional CSS styles.
1481
1270
  */
@@ -1588,8 +1377,8 @@ const isBetweenOperator = {
1588
1377
  if (typeof filterItem.value[0] !== 'number' || typeof filterItem.value[1] !== 'number') {
1589
1378
  return null;
1590
1379
  }
1591
- return value => {
1592
- return value !== null && value !== undefined && filterItem.value[0] <= value && value <= filterItem.value[1];
1380
+ return params => {
1381
+ return params.value !== null && params.value !== undefined && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
1593
1382
  };
1594
1383
  },
1595
1384
  InputComponent: InputNumberInterval
@@ -1605,11 +1394,11 @@ const doesNotContain = {
1605
1394
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1606
1395
  return null;
1607
1396
  }
1608
- return value => {
1397
+ return params => {
1609
1398
  if (filterItem.value.length === 0) {
1610
1399
  return true;
1611
1400
  }
1612
- if (String(value).indexOf(filterItem.value) !== -1) {
1401
+ if (String(params.value).indexOf(filterItem.value) !== -1) {
1613
1402
  return false;
1614
1403
  }
1615
1404
  return true;
@@ -1626,11 +1415,11 @@ const doesNotEqual = {
1626
1415
  if (!filterItem.field || !filterItem.value || !filterItem.value) {
1627
1416
  return null;
1628
1417
  }
1629
- return value => {
1418
+ return params => {
1630
1419
  if (filterItem.value.length === 0) {
1631
1420
  return true;
1632
1421
  }
1633
- if (String(value) === filterItem.value) {
1422
+ if (String(params.value) === filterItem.value) {
1634
1423
  return false;
1635
1424
  }
1636
1425
  return true;
@@ -1647,9 +1436,9 @@ const doesNotHaveOperator = {
1647
1436
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1648
1437
  return null;
1649
1438
  }
1650
- return value => {
1651
- const cellValues = Array.isArray(value) ? value : [value];
1652
- return !cellValues.map(val => String(val)).includes(filterItem.value);
1439
+ return params => {
1440
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
1441
+ return !cellValues.map(value => String(value)).includes(filterItem.value);
1653
1442
  };
1654
1443
  },
1655
1444
  InputComponent: GridFilterInputValue
@@ -1666,9 +1455,9 @@ const hasOperator = {
1666
1455
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1667
1456
  return null;
1668
1457
  }
1669
- return value => {
1670
- const cellValues = Array.isArray(value) ? value : [value];
1671
- return cellValues.map(val => String(val)).includes(filterItem.value);
1458
+ return params => {
1459
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
1460
+ return cellValues.map(value => String(value)).includes(filterItem.value);
1672
1461
  };
1673
1462
  },
1674
1463
  InputComponent: GridFilterInputValue
@@ -1685,8 +1474,8 @@ const hasOnlyOperator = {
1685
1474
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1686
1475
  return null;
1687
1476
  }
1688
- return value => {
1689
- const cellValues = Array.isArray(value) ? value : [value];
1477
+ return params => {
1478
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
1690
1479
  return cellValues.length === 1 && String(cellValues[0]) === filterItem.value;
1691
1480
  };
1692
1481
  },
@@ -1704,11 +1493,11 @@ const isOperator = {
1704
1493
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1705
1494
  return null;
1706
1495
  }
1707
- return value => {
1708
- if (Array.isArray(value)) {
1496
+ return params => {
1497
+ if (Array.isArray(params.value)) {
1709
1498
  return false;
1710
1499
  }
1711
- return String(value) === filterItem.value;
1500
+ return String(params.value) === filterItem.value;
1712
1501
  };
1713
1502
  },
1714
1503
  InputComponent: GridFilterInputValue
@@ -1725,11 +1514,11 @@ const isNotOperator = {
1725
1514
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1726
1515
  return null;
1727
1516
  }
1728
- return value => {
1729
- if (Array.isArray(value)) {
1517
+ return params => {
1518
+ if (Array.isArray(params.value)) {
1730
1519
  return true;
1731
1520
  }
1732
- return String(value) !== filterItem.value;
1521
+ return String(params.value) !== filterItem.value;
1733
1522
  };
1734
1523
  },
1735
1524
  InputComponent: GridFilterInputValue
@@ -1746,11 +1535,11 @@ const containsAnyOfOperator = {
1746
1535
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1747
1536
  return null;
1748
1537
  }
1749
- return value => {
1538
+ return params => {
1750
1539
  if (filterItem.value.length === 0) {
1751
1540
  return true;
1752
1541
  }
1753
- const paramValues = Array.isArray(value) ? value : [value];
1542
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1754
1543
  let match = false;
1755
1544
  filterItem.value.forEach(filteredValue => {
1756
1545
  paramValues.forEach(paramValue => {
@@ -1771,11 +1560,11 @@ const containsAnyOfCIOperator = {
1771
1560
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1772
1561
  return null;
1773
1562
  }
1774
- return value => {
1563
+ return params => {
1775
1564
  if (filterItem.value.length === 0) {
1776
1565
  return true;
1777
1566
  }
1778
- const paramValues = Array.isArray(value) ? value : [value];
1567
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1779
1568
  const paramValuesLower = paramValues.map(item => String(item).toLowerCase());
1780
1569
  let match = false;
1781
1570
  filterItem.value.forEach(filteredValue => {
@@ -1798,11 +1587,11 @@ const doesNotHaveAnyOf = {
1798
1587
  if (!filterItem.field || !filterItem.value || !Array.isArray(filterItem.value) || filterItem.value.length === 0) {
1799
1588
  return null;
1800
1589
  }
1801
- return value => {
1802
- const cellValues = Array.isArray(value) ? value : [value];
1590
+ return params => {
1591
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
1803
1592
 
1804
1593
  // Return true only if none of the filter values are in the cell values
1805
- return filterItem.value.every(filterVal => !cellValues.map(val => String(val)).includes(filterVal));
1594
+ return filterItem.value.every(filterVal => !cellValues.map(value => String(value)).includes(filterVal));
1806
1595
  };
1807
1596
  },
1808
1597
  InputComponent: GridFilterInputMultipleValue
@@ -1819,11 +1608,11 @@ const endsWithAnyOfOperator = {
1819
1608
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1820
1609
  return null;
1821
1610
  }
1822
- return value => {
1611
+ return params => {
1823
1612
  if (filterItem.value.length === 0) {
1824
1613
  return true;
1825
1614
  }
1826
- const paramValues = Array.isArray(value) ? value : [value];
1615
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1827
1616
  let match = false;
1828
1617
  filterItem.value.forEach(filteredValue => {
1829
1618
  paramValues.forEach(paramValue => {
@@ -1846,11 +1635,11 @@ const isAnyOfOperator = {
1846
1635
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1847
1636
  return null;
1848
1637
  }
1849
- return value => {
1638
+ return params => {
1850
1639
  if (filterItem.value.length === 0) {
1851
1640
  return true;
1852
1641
  }
1853
- const paramValues = Array.isArray(value) ? value : [value];
1642
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1854
1643
  for (const paramValue of paramValues) {
1855
1644
  if (filterItem.value.includes(String(paramValue))) {
1856
1645
  return true;
@@ -1874,11 +1663,11 @@ const isAnyOfIOperator = {
1874
1663
  return null;
1875
1664
  }
1876
1665
  const lowerCaseFilterValues = filterItem.value.map(v => String(v).toLowerCase());
1877
- return value => {
1666
+ return params => {
1878
1667
  if (filterItem.value.length === 0) {
1879
1668
  return true;
1880
1669
  }
1881
- const paramValues = Array.isArray(value) ? value : [value];
1670
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1882
1671
  for (const paramValue of paramValues) {
1883
1672
  if (lowerCaseFilterValues.includes(String(paramValue).toLowerCase())) {
1884
1673
  return true;
@@ -1901,13 +1690,13 @@ const hasAnyOfOperator = {
1901
1690
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1902
1691
  return null;
1903
1692
  }
1904
- return value => {
1693
+ return params => {
1905
1694
  if (filterItem.value.length === 0) {
1906
1695
  return true;
1907
1696
  }
1908
- const cellValues = Array.isArray(value) ? value : [value];
1697
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
1909
1698
  const filterItemValues = Array.isArray(filterItem.value) ? filterItem.value : [filterItem.value];
1910
- return filterItemValues.some(v => cellValues.map(val => String(val)).includes(v));
1699
+ return filterItemValues.some(v => cellValues.map(value => String(value)).includes(v));
1911
1700
  };
1912
1701
  },
1913
1702
  InputComponent: GridFilterInputMultipleValue
@@ -1924,11 +1713,11 @@ const isNotAnyOfOperator = {
1924
1713
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1925
1714
  return null;
1926
1715
  }
1927
- return value => {
1716
+ return params => {
1928
1717
  if (filterItem.value.length === 0) {
1929
1718
  return true;
1930
1719
  }
1931
- const paramValues = Array.isArray(value) ? value : [value];
1720
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1932
1721
  for (const paramValue of paramValues) {
1933
1722
  if (filterItem.value.includes(String(paramValue))) {
1934
1723
  return false;
@@ -1951,11 +1740,11 @@ const startsWithAnyOfOperator = {
1951
1740
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
1952
1741
  return null;
1953
1742
  }
1954
- return value => {
1743
+ return params => {
1955
1744
  if (filterItem.value.length === 0) {
1956
1745
  return true;
1957
1746
  }
1958
- const paramValues = Array.isArray(value) ? value : [value];
1747
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
1959
1748
  let match = false;
1960
1749
  filterItem.value.forEach(filteredValue => {
1961
1750
  paramValues.forEach(paramValue => {
@@ -2173,11 +1962,16 @@ const isValueValid = (value, field, columns, operator) => {
2173
1962
  }
2174
1963
  const type = (_column$type = column['type']) !== null && _column$type !== void 0 ? _column$type : 'string';
2175
1964
 
2176
- // Only date fail with 500s, other set themselves as undefined
2177
- if (type !== 'date') {
1965
+ // Only date and rating fail with 500s, other set themselves as undefined
1966
+ if (type !== 'date' && type !== 'rating') {
2178
1967
  return true;
2179
1968
  }
2180
1969
 
1970
+ // just checking that rating is a number.
1971
+ if (type === 'rating') {
1972
+ return !isNaN(Number(value));
1973
+ }
1974
+
2181
1975
  // format: YYYY-MM-DD
2182
1976
  // just verifying that the 3 values are numbers to avoid 500s,
2183
1977
  // If the value is invalid the form will appear as undefined
@@ -3103,9 +2897,6 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3103
2897
  pageSize: paginationModel.pageSize
3104
2898
  });
3105
2899
 
3106
- // Version counter to force re-renders when selectionStatus ref changes
3107
- const [, forceSelectionUpdate] = useState(0);
3108
-
3109
2900
  // The checkboxSelectionVisibleOnly should only be applied to client-side pagination,
3110
2901
  // for server-side pagination it produces inconsistent behavior when selecting all rows in pages 2 and beyond
3111
2902
  const checkboxSelectionVisibleOnly = Boolean(pagination) && Boolean(paginationMode != 'server');
@@ -3114,7 +2905,7 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3114
2905
  // every time we navigate between pages, resize our page or select something
3115
2906
  useEffect(() => {
3116
2907
  if (paginationMode == 'server') {
3117
- onServerSideSelectionStatusChange(Array.isArray(rowSelectionModel) ? rowSelectionModel : [rowSelectionModel], apiRef, selectionStatus, forceSelectionUpdate, isRowSelectable, paginationModel.page, paginationModel.pageSize);
2908
+ onServerSideSelectionStatusChange(Array.isArray(rowSelectionModel) ? rowSelectionModel : [rowSelectionModel], apiRef, selectionStatus, isRowSelectable, paginationModel.page, paginationModel.pageSize);
3118
2909
  }
3119
2910
  }, [rowSelectionModel, paginationModel.page, paginationModel.pageSize]);
3120
2911
  if (!Array.isArray(rows)) {
@@ -3142,7 +2933,7 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3142
2933
  ref: datagridRef,
3143
2934
  className: classNames(StatefulDataGrid.className, className),
3144
2935
  $height: height
3145
- }, /*#__PURE__*/React__default.createElement(DataGridPro, _extends({}, forwardedProps, {
2936
+ }, /*#__PURE__*/React__default.createElement(DataGridPro, _extends$1({}, forwardedProps, {
3146
2937
  apiRef: apiRef,
3147
2938
  columns: columns,
3148
2939
  columnVisibilityModel: columnVisibilityModel,
@@ -3171,59 +2962,43 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3171
2962
  baseCheckbox: BaseCheckbox,
3172
2963
  // baseTextField,
3173
2964
  basePopper: BasePopper,
3174
- columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2965
+ columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3175
2966
  displayName: "ColumnFilteredIcon"
3176
2967
  })),
3177
- columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2968
+ columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3178
2969
  displayName: "ColumnSelectorIcon"
3179
2970
  })),
3180
- columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2971
+ columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3181
2972
  displayName: "ColumnSortedAscendingIcon"
3182
2973
  })),
3183
- columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2974
+ columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3184
2975
  displayName: "ColumnSortedDescendingIcon"
3185
2976
  })),
3186
- densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2977
+ densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3187
2978
  displayName: "DensityCompactIcon"
3188
2979
  })),
3189
- densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2980
+ densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3190
2981
  displayName: "DensityStandardIcon"
3191
2982
  })),
3192
- densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2983
+ densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3193
2984
  displayName: "DensityComfortableIcon"
3194
2985
  })),
3195
- detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2986
+ detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3196
2987
  displayName: "DetailPanelCollapseIcon"
3197
2988
  })),
3198
- detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2989
+ detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3199
2990
  displayName: "DetailPanelExpandIcon"
3200
2991
  })),
3201
- exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2992
+ exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3202
2993
  displayName: "ExportIcon"
3203
2994
  })),
3204
- openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({
2995
+ openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({
3205
2996
  displayName: "OpenFilterButtonIcon"
3206
2997
  }, props))
3207
2998
  }, slots), {}, {
3208
- toolbar: props => /*#__PURE__*/React__default.createElement(ToolbarWrapper, _extends({}, props, {
3209
- hideToolbar: hideToolbar,
3210
- RenderedToolbar: RenderedToolbar,
3211
- filterModel: filterModel,
3212
- onFilterModelChange: onFilterModelChange,
3213
- pagination: pagination,
3214
- paginationPlacement: paginationPlacement,
3215
- selectionStatus: selectionStatus,
3216
- apiRef: apiRef,
3217
- isRowSelectable: isRowSelectable,
3218
- paginationModel: paginationModel,
3219
- onPaginationModelChange: onPaginationModelChange,
3220
- pageSizeOptions: pageSizeOptions,
3221
- paginationProps: paginationProps,
3222
- paginationMode: paginationMode,
3223
- rowCount: rowCount
3224
- })),
2999
+ toolbar: ToolbarWrapper,
3225
3000
  pagination: props => {
3226
- return pagination ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, _extends({}, props, {
3001
+ return pagination ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, _extends$1({}, props, {
3227
3002
  displaySelection: false,
3228
3003
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
3229
3004
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
@@ -3232,8 +3007,9 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3232
3007
  onPaginationModelChange: onPaginationModelChange,
3233
3008
  pageSizeOptions: pageSizeOptions,
3234
3009
  paginationProps: paginationProps,
3010
+ paginationMode: paginationMode,
3235
3011
  rowCount: rowCount
3236
- })) : /*#__PURE__*/React__default.createElement(ControlledPagination, _extends({}, props, {
3012
+ })) : /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$1({}, props, {
3237
3013
  displaySelection: false,
3238
3014
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
3239
3015
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
@@ -3243,11 +3019,30 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3243
3019
  paginationModel: paginationModel,
3244
3020
  onPaginationModelChange: onPaginationModelChange,
3245
3021
  pageSizeOptions: pageSizeOptions,
3246
- paginationProps: paginationProps
3022
+ paginationProps: paginationProps,
3023
+ paginationMode: paginationMode
3247
3024
  })) : null;
3248
3025
  }
3249
3026
  }),
3250
- slotProps: _objectSpread2({}, slotProps),
3027
+ slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
3028
+ toolbar: _objectSpread2({
3029
+ hideToolbar,
3030
+ RenderedToolbar,
3031
+ filterModel,
3032
+ onFilterModelChange,
3033
+ pagination,
3034
+ paginationPlacement,
3035
+ selectionStatus,
3036
+ apiRef,
3037
+ isRowSelectable,
3038
+ paginationModel,
3039
+ onPaginationModelChange,
3040
+ pageSizeOptions,
3041
+ paginationProps,
3042
+ paginationMode,
3043
+ rowCount
3044
+ }, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
3045
+ }),
3251
3046
  rowSelectionModel: rowSelectionModel,
3252
3047
  onRowSelectionModelChange: (newSelectionModel, details) => {
3253
3048
  if (pagination && paginationMode != 'server') {
@@ -3306,7 +3101,6 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
3306
3101
  numberOfSelectedRows
3307
3102
  };
3308
3103
  }
3309
- forceSelectionUpdate(v => v + 1);
3310
3104
  }
3311
3105
  onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
3312
3106
  },