@mui/material 5.14.20 → 5.15.1

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 (106) hide show
  1. package/AccordionActions/AccordionActions.js +1 -1
  2. package/Autocomplete/Autocomplete.js +4 -5
  3. package/ButtonBase/ButtonBase.js +1 -2
  4. package/ButtonGroup/index.d.ts +2 -0
  5. package/ButtonGroup/index.js +3 -1
  6. package/CHANGELOG.md +102 -2
  7. package/CardActions/CardActions.js +1 -1
  8. package/CircularProgress/CircularProgress.js +0 -1
  9. package/FilledInput/FilledInput.js +0 -2
  10. package/Input/Input.js +0 -2
  11. package/InputBase/InputBase.js +0 -2
  12. package/InputLabel/InputLabel.js +1 -5
  13. package/Link/Link.js +0 -1
  14. package/NativeSelect/NativeSelectInput.js +0 -2
  15. package/Select/SelectInput.js +1 -3
  16. package/TablePagination/TablePagination.d.ts +8 -0
  17. package/TablePagination/TablePagination.js +27 -6
  18. package/TablePagination/TablePaginationActions.d.ts +49 -0
  19. package/TablePagination/TablePaginationActions.js +54 -19
  20. package/Tabs/Tabs.js +0 -1
  21. package/colors/amber.d.ts +0 -1
  22. package/colors/blue.d.ts +0 -1
  23. package/colors/blueGrey.d.ts +0 -1
  24. package/colors/brown.d.ts +0 -1
  25. package/colors/common.d.ts +0 -1
  26. package/colors/cyan.d.ts +0 -1
  27. package/colors/deepOrange.d.ts +0 -1
  28. package/colors/deepPurple.d.ts +0 -1
  29. package/colors/green.d.ts +0 -1
  30. package/colors/grey.d.ts +0 -1
  31. package/colors/indigo.d.ts +0 -1
  32. package/colors/lightBlue.d.ts +0 -1
  33. package/colors/lightGreen.d.ts +0 -1
  34. package/colors/lime.d.ts +0 -1
  35. package/colors/orange.d.ts +0 -1
  36. package/colors/pink.d.ts +0 -1
  37. package/colors/purple.d.ts +0 -1
  38. package/colors/red.d.ts +0 -1
  39. package/colors/teal.d.ts +0 -1
  40. package/colors/yellow.d.ts +0 -1
  41. package/index.js +1 -1
  42. package/legacy/AccordionActions/AccordionActions.js +1 -1
  43. package/legacy/Autocomplete/Autocomplete.js +4 -5
  44. package/legacy/ButtonBase/ButtonBase.js +1 -1
  45. package/legacy/ButtonGroup/index.js +3 -1
  46. package/legacy/CardActions/CardActions.js +1 -1
  47. package/legacy/CircularProgress/CircularProgress.js +0 -1
  48. package/legacy/InputLabel/InputLabel.js +1 -5
  49. package/legacy/NativeSelect/NativeSelectInput.js +0 -2
  50. package/legacy/Select/SelectInput.js +1 -3
  51. package/legacy/TablePagination/TablePagination.js +29 -6
  52. package/legacy/TablePagination/TablePaginationActions.js +56 -19
  53. package/legacy/Tabs/Tabs.js +0 -1
  54. package/legacy/index.js +1 -1
  55. package/legacy/locale/index.js +0 -11
  56. package/legacy/styles/experimental_extendTheme.js +12 -6
  57. package/legacy/useTouchRipple/useTouchRipple.js +1 -1
  58. package/locale/index.js +0 -11
  59. package/modern/AccordionActions/AccordionActions.js +1 -1
  60. package/modern/Autocomplete/Autocomplete.js +4 -5
  61. package/modern/ButtonBase/ButtonBase.js +1 -2
  62. package/modern/ButtonGroup/index.js +3 -1
  63. package/modern/CardActions/CardActions.js +1 -1
  64. package/modern/CircularProgress/CircularProgress.js +0 -1
  65. package/modern/FilledInput/FilledInput.js +0 -2
  66. package/modern/Input/Input.js +0 -2
  67. package/modern/InputBase/InputBase.js +0 -2
  68. package/modern/InputLabel/InputLabel.js +1 -5
  69. package/modern/Link/Link.js +0 -1
  70. package/modern/NativeSelect/NativeSelectInput.js +0 -2
  71. package/modern/Select/SelectInput.js +1 -3
  72. package/modern/TablePagination/TablePagination.js +27 -6
  73. package/modern/TablePagination/TablePaginationActions.js +53 -18
  74. package/modern/Tabs/Tabs.js +0 -1
  75. package/modern/index.js +1 -1
  76. package/modern/locale/index.js +0 -11
  77. package/modern/styles/experimental_extendTheme.js +12 -6
  78. package/modern/useTouchRipple/useTouchRipple.js +1 -1
  79. package/node/AccordionActions/AccordionActions.js +1 -1
  80. package/node/Autocomplete/Autocomplete.js +4 -5
  81. package/node/ButtonBase/ButtonBase.js +1 -2
  82. package/node/ButtonGroup/index.js +17 -1
  83. package/node/CardActions/CardActions.js +1 -1
  84. package/node/CircularProgress/CircularProgress.js +0 -1
  85. package/node/FilledInput/FilledInput.js +0 -2
  86. package/node/Input/Input.js +0 -2
  87. package/node/InputBase/InputBase.js +0 -2
  88. package/node/InputLabel/InputLabel.js +1 -5
  89. package/node/Link/Link.js +0 -1
  90. package/node/NativeSelect/NativeSelectInput.js +0 -2
  91. package/node/Select/SelectInput.js +1 -3
  92. package/node/TablePagination/TablePagination.js +27 -6
  93. package/node/TablePagination/TablePaginationActions.js +54 -19
  94. package/node/Tabs/Tabs.js +0 -1
  95. package/node/index.js +1 -1
  96. package/node/locale/index.js +0 -11
  97. package/node/styles/experimental_extendTheme.js +11 -5
  98. package/node/styles/index.js +1 -0
  99. package/node/useTouchRipple/useTouchRipple.js +1 -1
  100. package/package.json +8 -8
  101. package/styles/components.d.ts +115 -115
  102. package/styles/experimental_extendTheme.js +12 -6
  103. package/styles/variants.d.ts +1 -2
  104. package/umd/material-ui.development.js +111 -73
  105. package/umd/material-ui.production.min.js +20 -20
  106. package/useTouchRipple/useTouchRipple.js +1 -1
@@ -38,7 +38,7 @@ const AccordionActionsRoot = styled('div', {
38
38
  padding: 8,
39
39
  justifyContent: 'flex-end'
40
40
  }, !ownerState.disableSpacing && {
41
- '& > :not(:first-of-type)': {
41
+ '& > :not(style) ~ :not(style)': {
42
42
  marginLeft: 8
43
43
  }
44
44
  }));
@@ -216,7 +216,6 @@ const AutocompleteEndAdornment = styled('div', {
216
216
  right: 0,
217
217
  top: 'calc(50% - 14px)' // Center vertically
218
218
  });
219
-
220
219
  const AutocompleteClearIndicator = styled(IconButton, {
221
220
  name: 'MuiAutocomplete',
222
221
  slot: 'ClearIndicator',
@@ -661,7 +660,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
661
660
  // | To update them edit the d.ts file and run "yarn proptypes" |
662
661
  // ----------------------------------------------------------------------
663
662
  /**
664
- * If `true`, the portion of the selected suggestion that has not been typed by the user,
663
+ * If `true`, the portion of the selected suggestion that the user hasn't typed,
665
664
  * known as the completion string, appears inline after the input cursor in the textbox.
666
665
  * The inline completion string is visually highlighted and has a selected state.
667
666
  * @default false
@@ -677,7 +676,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
677
676
  * when the Autocomplete loses focus unless the user chooses
678
677
  * a different option or changes the character string in the input.
679
678
  *
680
- * When using `freeSolo` mode, the typed value will be the input value
679
+ * When using the `freeSolo` mode, the typed value will be the input value
681
680
  * if the Autocomplete loses focus without highlighting an option.
682
681
  * @default false
683
682
  */
@@ -712,8 +711,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
712
711
  /**
713
712
  * If `true`, the input's text is cleared on blur if no value is selected.
714
713
  *
715
- * Set to `true` if you want to help the user enter a new value.
716
- * Set to `false` if you want to help the user resume their search.
714
+ * Set it to `true` if you want to help the user enter a new value.
715
+ * Set it to `false` if you want to help the user resume their search.
717
716
  * @default !props.freeSolo
718
717
  */
719
718
  clearOnBlur: PropTypes.bool,
@@ -67,7 +67,6 @@ export const ButtonBaseRoot = styled('button', {
67
67
  '&::-moz-focus-inner': {
68
68
  borderStyle: 'none' // Remove Firefox dotted outline.
69
69
  },
70
-
71
70
  [`&.${buttonBaseClasses.disabled}`]: {
72
71
  pointerEvents: 'none',
73
72
  // Disable link interactions
@@ -234,7 +233,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
234
233
  });
235
234
  const handleKeyUp = useEventCallback(event => {
236
235
  // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed
237
- // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0
236
+ // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0
238
237
  if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
239
238
  keydownRef.current = false;
240
239
  rippleRef.current.stop(event, () => {
@@ -2,3 +2,5 @@ export { default } from './ButtonGroup';
2
2
  export * from './ButtonGroup';
3
3
  export { default as buttonGroupClasses } from './buttonGroupClasses';
4
4
  export * from './buttonGroupClasses';
5
+ export { default as ButtonGroupContext } from './ButtonGroupContext';
6
+ export { default as ButtonGroupButtonContext } from './ButtonGroupButtonContext';
@@ -2,4 +2,6 @@
2
2
 
3
3
  export { default } from './ButtonGroup';
4
4
  export { default as buttonGroupClasses } from './buttonGroupClasses';
5
- export * from './buttonGroupClasses';
5
+ export * from './buttonGroupClasses';
6
+ export { default as ButtonGroupContext } from './ButtonGroupContext';
7
+ export { default as ButtonGroupButtonContext } from './ButtonGroupButtonContext';
package/CHANGELOG.md CHANGED
@@ -1,5 +1,105 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.15.1
4
+
5
+ <!-- generated comparing v5.15.0..master -->
6
+
7
+ _Dec 19, 2023_
8
+
9
+ A big thanks to the 15 contributors who made this release possible.
10
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
11
+
12
+ ### `@mui/material@5.15.1`
13
+
14
+ - &#8203;<!-- 13 -->[CardActions][DialogActions] Apply margin for all children except for 1st child (#40168) @sai6855
15
+ - &#8203;<!-- 03 -->[TablePagination] Add ability to change icons in TablePaginationActions using `slots` and `slotProps` (#33797) @pratikkarad
16
+ - &#8203;<!-- 13 -->[CssVarsProvider] Fix HSL breaking button styles (#39869) @gitstart
17
+
18
+ ### `@mui/joy@5.0.0-beta.19`
19
+
20
+ - &#8203;<!-- 05 -->[FormControl] Fix issue with the conditional setting of `htmlFor` and `id` attributes not functioning properly for form labels (#40180) @ReaZzy
21
+ - &#8203;<!-- 04 -->[typescript] Address TypeScript issue with custom zIndex not functioning (#40133) @qiweiii
22
+
23
+ ### `@mui/styled-engine-sc@6.0.0-alpha.9`
24
+
25
+ - &#8203;<!-- 02 -->[typescript] Fix `theme` being of type any (#40200) @mnajdova
26
+
27
+ ### Docs
28
+
29
+ - &#8203;<!-- 09 -->[joy-ui] Fix typo in the CSS baseline page (#40222) @possibilities
30
+ - &#8203;<!-- 08 -->[joy-ui] Document missing Autocomplete props (#39979) @ZeeshanTamboli
31
+ - &#8203;<!-- 10 -->[joy-ui] Fix typo about Typography levels (#40230) @zanivan
32
+ - &#8203;<!-- 07 -->[material-ui] Update the related projects page to list `mui-tiptap` for rich text (#40216) @sjdemartini
33
+ - &#8203;<!-- 06 -->[material-ui] Fix typo in the Next.js integration page (#40209) @s8990
34
+
35
+ ### Core
36
+
37
+ - &#8203;<!-- 14 -->[blog] Fix access to Notion without an account @oliviertassinari
38
+ - &#8203;<!-- 12 -->[core] Update workflows and issue templates to reflect the updated label (#40197) @MBilalShafi
39
+ - &#8203;<!-- 11 -->[docs] Replace Twitter with X (#40193) @mbrookes
40
+ - &#8203;<!-- 10 -->[docs-infra] Uplift the Algolia search modal design (#40186) @danilo-leal
41
+ - &#8203;<!-- 01 -->[website] Update product descriptions and social preview images (#32181) @danilo-leal
42
+
43
+ All contributors of this release in alphabetical order: @danilo-leal, @gitstart, @MBilalShafi, @mbrookes, @mnajdova, @oliviertassinari, @possibilities, @pratikkarad, @qiweiii, @ReaZzy, @s8990, @sai6855, @sjdemartini, @zanivan, @ZeeshanTamboli
44
+
45
+ ## 5.15.0
46
+
47
+ <!-- generated comparing v5.14.20..master -->
48
+
49
+ _Dec 11, 2023_
50
+
51
+ A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
52
+
53
+ - 🚀 Added [a new package for a better Material UI integration with Next.js](https://mui.com/material-ui/guides/nextjs) (#39947) @siriwatknp
54
+
55
+ ### `@mui/material@5.15.0`
56
+
57
+ - &#8203;<!-- 12 -->Revert "[Select][material-ui] Add name to hidden input element" (#40174) @mj12albert
58
+ - &#8203;<!-- 02 -->[material-ui] Refactor ComponentsVariants type into a generic (#39623) @blakenetz
59
+
60
+ ### `@mui/material-nextjs@5.15.0`
61
+
62
+ - &#8203;<!-- 01 -->[material-ui] Add new Next.js integration package (#39947) @siriwatknp
63
+
64
+ ### `@mui/material-next@6.0.0-alpha.113`
65
+
66
+ - &#8203;<!-- 11 -->[Badge][material-next] Apply new OwnerState type to Badge (#40119) @lhilgert9
67
+ - &#8203;<!-- 06 -->[material-next][ButtonGroup] Change `ButtonGroup` files to ts (#39794) @lhilgert9
68
+
69
+ ### `@mui/icons-material@5.15.0`
70
+
71
+ - &#8203;<!-- 05 -->[icons] Add X logo (#38811) @abreel
72
+
73
+ ### `@mui/base@5.0.0-beta.27`
74
+
75
+ - &#8203;<!-- 10 -->[base-ui] useControllableReducer warns when controlled props become uncontrolled (and vice versa) (#39096) @mj12albert
76
+
77
+ ### `@mui/joy@5.0.0-beta.18`
78
+
79
+ - &#8203;<!-- 04 -->[joy-ui][Radio][Input] Fix inheritance of disabled prop (#39934) @sai6855
80
+
81
+ ### `@mui/lab@5.0.0-alpha.156`
82
+
83
+ - &#8203;<!-- 03 -->[lab][LoadingButton] LoadingButton now inherits props from ButtonGroup (#39679) @lhilgert9
84
+
85
+ ### Docs
86
+
87
+ - &#8203;<!-- 09 -->[docs] Fix reference to non-existent checkmark in supported-components.md (#40056) @mbrookes
88
+ - &#8203;<!-- 09 -->[docs][base-ui] Add copy button & primary color picker to the component gallery page (#39884) @mnajdova
89
+ - &#8203;<!-- 08 -->[docs-infra] Update CodeSandbox links (#39992) @anle9650
90
+ - &#8203;<!-- 04 -->[material-ui][docs] Fix wrong root element for emotion styles in shadow DOM (#35326) @EloB
91
+ - &#8203;<!-- 03 -->[material-ui][docs] Move the responsive font charts from recharts to MUI X (#40097) @alexfauquette
92
+ - &#8203;<!-- 02 -->[joy-ui][templates] Remove outdated code (#40095) @zanivan
93
+ - &#8203;<!-- 05 -->[material-ui][docs][Popper] Update Positioned Popper demo styles (#40170) @sai6855
94
+
95
+ ### Core
96
+
97
+ - &#8203;<!-- 08 -->[blog] Add a Phuket retreat blog post (#40055) @mikailaread
98
+ - &#8203;<!-- 07 -->[blog] Adjust the latest MUI X blog post (#40046) @danilo-leal
99
+ - &#8203;<!-- 05 -->[core] Migrate from tslint to eslint (#40020) @ZeeshanTamboli
100
+
101
+ All contributors of this release in alphabetical order: @abreel, @alexfauquette, @anle9650, @blakenetz, @danilo-leal, @EloB, @lhilgert9, @mbrookes, @mikailaread, @mj12albert, @mnajdova, @sai6855, @siriwatknp, @zanivan, @ZeeshanTamboli
102
+
3
103
  ## 5.14.20
4
104
 
5
105
  <!-- generated comparing v5.14.19..master -->
@@ -11056,7 +11156,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
11056
11156
  <Typography variant="poster">poster</Typography>;
11057
11157
  ```
11058
11158
 
11059
- [A full demo](https://codesandbox.io/s/fontsizetheme-material-demo-forked-l9u05?file=/demo.tsx:725-773)
11159
+ [A full demo](https://codesandbox.io/p/sandbox/fontsizetheme-material-demo-forked-l9u05?file=/demo.tsx:725-773)
11060
11160
 
11061
11161
  - 📚 Add a shortcut to open the Algolia search (#23959) @hmaddisb.
11062
11162
  - And many more 🐛 bug fixes and 📚 improvements.
@@ -12250,7 +12350,7 @@ Here are some highlights ✨:
12250
12350
 
12251
12351
  You can find a [new version](https://mui.com/components/slider-styled/) of the slider in the lab powered by [emotion](https://emotion.sh/).
12252
12352
 
12253
- In the event that you are already using styled-components in your application, you can swap emotion for styled-components 💅. Check [this CodeSandbox](https://codesandbox.io/s/sliderstyled-with-styled-components-forked-olc27?file=/package.json) for a demo. It relies on aliases to prevent any bundle size overhead.
12353
+ In the event that you are already using styled-components in your application, you can swap emotion for styled-components 💅. Check [this CodeSandbox](https://codesandbox.io/p/sandbox/sliderstyled-with-styled-components-forked-olc27?file=/package.json) for a demo. It relies on aliases to prevent any bundle size overhead.
12254
12354
 
12255
12355
  The new styling solution saves 2kB gzipped in the bundle compared to JSS, and about 14 kB gzipped if you were already using emotion or styled-components.
12256
12356
 
@@ -37,7 +37,7 @@ const CardActionsRoot = styled('div', {
37
37
  alignItems: 'center',
38
38
  padding: 8
39
39
  }, !ownerState.disableSpacing && {
40
- '& > :not(:first-of-type)': {
40
+ '& > :not(style) ~ :not(style)': {
41
41
  marginLeft: 8
42
42
  }
43
43
  }));
@@ -89,7 +89,6 @@ const CircularProgressSVG = styled('svg', {
89
89
  })({
90
90
  display: 'block' // Keeps the progress centered
91
91
  });
92
-
93
92
  const CircularProgressCircle = styled('circle', {
94
93
  name: 'MuiCircularProgress',
95
94
  slot: 'Circle',
@@ -83,7 +83,6 @@ const FilledInputRoot = styled(InputBaseRoot, {
83
83
  }),
84
84
  pointerEvents: 'none' // Transparent to the hover style.
85
85
  },
86
-
87
86
  [`&.${filledInputClasses.focused}:after`]: {
88
87
  // translateX(0) is a workaround for Safari transform scale bug
89
88
  // See https://github.com/mui/material-ui/issues/31766
@@ -107,7 +106,6 @@ const FilledInputRoot = styled(InputBaseRoot, {
107
106
  }),
108
107
  pointerEvents: 'none' // Transparent to the hover style.
109
108
  },
110
-
111
109
  [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {
112
110
  borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
113
111
  },
package/Input/Input.js CHANGED
@@ -66,7 +66,6 @@ const InputRoot = styled(InputBaseRoot, {
66
66
  }),
67
67
  pointerEvents: 'none' // Transparent to the hover style.
68
68
  },
69
-
70
69
  [`&.${inputClasses.focused}:after`]: {
71
70
  // translateX(0) is a workaround for Safari transform scale bug
72
71
  // See https://github.com/mui/material-ui/issues/31766
@@ -90,7 +89,6 @@ const InputRoot = styled(InputBaseRoot, {
90
89
  }),
91
90
  pointerEvents: 'none' // Transparent to the hover style.
92
91
  },
93
-
94
92
  [`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]: {
95
93
  borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
96
94
  // Reset on touch devices, it doesn't add specificity
@@ -167,13 +167,11 @@ export const InputBaseComponent = styled('input', {
167
167
  // IE11
168
168
  '&:focus::-ms-input-placeholder': placeholderVisible // Edge
169
169
  },
170
-
171
170
  [`&.${inputBaseClasses.disabled}`]: {
172
171
  opacity: 1,
173
172
  // Reset iOS opacity
174
173
  WebkitTextFillColor: (theme.vars || theme).palette.text.disabled // Fix opacity Safari bug
175
174
  },
176
-
177
175
  '&:-webkit-autofill': {
178
176
  animationDuration: '5000s',
179
177
  animationName: 'mui-auto-fill'
@@ -105,11 +105,7 @@ const InputLabelRoot = styled(FormLabel, {
105
105
  // but it feels a better when it bleeds a bit on the left, so 32px.
106
106
  maxWidth: 'calc(133% - 32px)',
107
107
  transform: 'translate(14px, -9px) scale(0.75)'
108
- }), ownerState.variant === 'standard' && {
109
- '&:not(label) + div': {
110
- marginTop: 16
111
- }
112
- }));
108
+ })));
113
109
  const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
114
110
  const props = useThemeProps({
115
111
  name: 'MuiInputLabel',
package/Link/Link.js CHANGED
@@ -83,7 +83,6 @@ const LinkRoot = styled(Typography, {
83
83
  '&::-moz-focus-inner': {
84
84
  borderStyle: 'none' // Remove Firefox dotted outline.
85
85
  },
86
-
87
86
  [`&.${linkClasses.focusVisible}`]: {
88
87
  outline: 'auto'
89
88
  }
@@ -49,7 +49,6 @@ export const nativeSelectSelectStyles = ({
49
49
  }, {
50
50
  borderRadius: 0 // Reset Chrome style
51
51
  }),
52
-
53
52
  // Remove IE11 arrow
54
53
  '&::-ms-expand': {
55
54
  display: 'none'
@@ -77,7 +76,6 @@ export const nativeSelectSelectStyles = ({
77
76
  '&:focus': {
78
77
  borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style
79
78
  },
80
-
81
79
  '&&&': {
82
80
  paddingRight: 32
83
81
  }
@@ -386,7 +386,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
386
386
  'data-value': child.props.value // Instead, we provide it as a data attribute.
387
387
  });
388
388
  });
389
-
390
389
  if (process.env.NODE_ENV !== 'production') {
391
390
  // eslint-disable-next-line react-hooks/rules-of-hooks
392
391
  React.useEffect(() => {
@@ -435,7 +434,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
435
434
  const classes = useUtilityClasses(ownerState);
436
435
  const paperProps = _extends({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
437
436
  const listboxId = useId();
438
- const hiddenInputId = useId();
439
437
  return /*#__PURE__*/_jsxs(React.Fragment, {
440
438
  children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
441
439
  ref: handleDisplayRef,
@@ -466,7 +464,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
466
464
  })), /*#__PURE__*/_jsx(SelectNativeInput, _extends({
467
465
  "aria-invalid": error,
468
466
  value: Array.isArray(value) ? value.join(',') : value,
469
- name: name != null ? name : hiddenInputId,
467
+ name: name,
470
468
  ref: inputRef,
471
469
  "aria-hidden": true,
472
470
  onChange: handleChange,
@@ -142,6 +142,14 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
142
142
  actions?: TablePaginationActionsProps['slotProps'];
143
143
  select?: Partial<SelectProps>;
144
144
  };
145
+ /**
146
+ * The components used for each slot inside the TablePagination.
147
+ * Either a string to use a HTML element or a component.
148
+ * @default {}
149
+ */
150
+ slots?: {
151
+ actions?: TablePaginationActionsProps['slots'];
152
+ };
145
153
  /**
146
154
  * The system prop that allows defining system overrides as well as additional CSS styles.
147
155
  */
@@ -3,7 +3,7 @@
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  var _InputBase;
6
- const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps"];
6
+ const _excluded = ["ActionsComponent", "backIconButtonProps", "className", "colSpan", "component", "count", "disabled", "getItemAriaLabel", "labelDisplayedRows", "labelRowsPerPage", "nextIconButtonProps", "onPageChange", "onRowsPerPageChange", "page", "rowsPerPage", "rowsPerPageOptions", "SelectProps", "showFirstButton", "showLastButton", "slotProps", "slots"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
@@ -96,7 +96,6 @@ const TablePaginationSelect = styled(Select, {
96
96
  textAlignLast: 'right' // Align <select> on Chrome.
97
97
  }
98
98
  });
99
-
100
99
  const TablePaginationMenuItem = styled(MenuItem, {
101
100
  name: 'MuiTablePagination',
102
101
  slot: 'MenuItem',
@@ -169,7 +168,8 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
169
168
  SelectProps = {},
170
169
  showFirstButton = false,
171
170
  showLastButton = false,
172
- slotProps
171
+ slotProps = {},
172
+ slots = {}
173
173
  } = props,
174
174
  other = _objectWithoutPropertiesLoose(props, _excluded);
175
175
  const ownerState = props;
@@ -180,7 +180,6 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
180
180
  if (component === TableCell || component === 'td') {
181
181
  colSpan = colSpanProp || 1000; // col-span over everything
182
182
  }
183
-
184
183
  const selectId = useId(selectProps.id);
185
184
  const labelId = useId(selectProps.labelId);
186
185
  const getLabelDisplayedRowsTo = () => {
@@ -247,7 +246,8 @@ const TablePagination = /*#__PURE__*/React.forwardRef(function TablePagination(i
247
246
  rowsPerPage: rowsPerPage,
248
247
  showFirstButton: showFirstButton,
249
248
  showLastButton: showLastButton,
250
- slotProps: slotProps == null ? void 0 : slotProps.actions,
249
+ slotProps: slotProps.actions,
250
+ slots: slots.actions,
251
251
  getItemAriaLabel: getItemAriaLabel,
252
252
  disabled: disabled
253
253
  })]
@@ -409,12 +409,33 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
409
409
  slotProps: PropTypes.shape({
410
410
  actions: PropTypes.shape({
411
411
  firstButton: PropTypes.object,
412
+ firstButtonIcon: PropTypes.object,
412
413
  lastButton: PropTypes.object,
414
+ lastButtonIcon: PropTypes.object,
413
415
  nextButton: PropTypes.object,
414
- previousButton: PropTypes.object
416
+ nextButtonIcon: PropTypes.object,
417
+ previousButton: PropTypes.object,
418
+ previousButtonIcon: PropTypes.object
415
419
  }),
416
420
  select: PropTypes.object
417
421
  }),
422
+ /**
423
+ * The components used for each slot inside the TablePagination.
424
+ * Either a string to use a HTML element or a component.
425
+ * @default {}
426
+ */
427
+ slots: PropTypes.shape({
428
+ actions: PropTypes.shape({
429
+ firstButton: PropTypes.elementType,
430
+ firstButtonIcon: PropTypes.elementType,
431
+ lastButton: PropTypes.elementType,
432
+ lastButtonIcon: PropTypes.elementType,
433
+ nextButton: PropTypes.elementType,
434
+ nextButtonIcon: PropTypes.elementType,
435
+ previousButton: PropTypes.elementType,
436
+ previousButtonIcon: PropTypes.elementType
437
+ })
438
+ }),
418
439
  /**
419
440
  * The system prop that allows defining system overrides as well as additional CSS styles.
420
441
  */
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconButtonProps } from '../IconButton/IconButton';
3
+ import { SvgIconProps } from '../SvgIcon';
3
4
 
4
5
  export interface TablePaginationActionsProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  /**
@@ -41,7 +42,55 @@ export interface TablePaginationActionsProps extends React.HTMLAttributes<HTMLDi
41
42
  lastButton?: Partial<IconButtonProps>;
42
43
  nextButton?: Partial<IconButtonProps>;
43
44
  previousButton?: Partial<IconButtonProps>;
45
+ firstButtonIcon?: Partial<SvgIconProps>;
46
+ lastButtonIcon?: Partial<SvgIconProps>;
47
+ nextButtonIcon?: Partial<SvgIconProps>;
48
+ previousButtonIcon?: Partial<SvgIconProps>;
44
49
  };
50
+ slots?: TablePaginationActionsSlots;
51
+ }
52
+
53
+ export interface TablePaginationActionsSlots {
54
+ /**
55
+ * The component that renders the first button.
56
+ * @default IconButton
57
+ */
58
+ firstButton?: React.ElementType;
59
+ /**
60
+ * The component that renders the last button.
61
+ * @default IconButton
62
+ */
63
+ lastButton?: React.ElementType;
64
+ /**
65
+ * The component that renders the next button.
66
+ * @default IconButton
67
+ */
68
+ nextButton?: React.ElementType;
69
+ /**
70
+ * The component that renders the previous button.
71
+ * @default IconButton
72
+ */
73
+ previousButton?: React.ElementType;
74
+ /**
75
+ * The component that renders the first button icon.
76
+ * @default FirstPageIcon
77
+ */
78
+ firstButtonIcon?: React.ElementType;
79
+ /**
80
+ * The component that renders the last button icon.
81
+ * @default LastPageIcon
82
+ */
83
+ lastButtonIcon?: React.ElementType;
84
+ /**
85
+ * The component that renders the next button icon.
86
+ * @default KeyboardArrowRight
87
+ */
88
+ nextButtonIcon?: React.ElementType;
89
+ /**
90
+ * The component that renders the previous button icon.
91
+ * @default KeyboardArrowLeft
92
+ */
93
+ previousButtonIcon?: React.ElementType;
45
94
  }
46
95
 
47
96
  declare const TablePaginationActions: React.JSXElementConstructor<TablePaginationActionsProps>;
@@ -2,16 +2,15 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- var _LastPageIcon, _FirstPageIcon, _KeyboardArrowRight, _KeyboardArrowLeft, _KeyboardArrowLeft2, _KeyboardArrowRight2, _FirstPageIcon2, _LastPageIcon2;
6
- const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slotProps"];
5
+ const _excluded = ["backIconButtonProps", "count", "disabled", "getItemAriaLabel", "nextIconButtonProps", "onPageChange", "page", "rowsPerPage", "showFirstButton", "showLastButton", "slots", "slotProps"];
7
6
  import * as React from 'react';
8
7
  import PropTypes from 'prop-types';
9
8
  import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
10
9
  import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
11
10
  import useTheme from '../styles/useTheme';
12
11
  import IconButton from '../IconButton';
13
- import LastPageIcon from '../internal/svg-icons/LastPage';
14
- import FirstPageIcon from '../internal/svg-icons/FirstPage';
12
+ import LastPageIconDefault from '../internal/svg-icons/LastPage';
13
+ import FirstPageIconDefault from '../internal/svg-icons/FirstPage';
15
14
 
16
15
  /**
17
16
  * @ignore - internal component.
@@ -19,7 +18,7 @@ import FirstPageIcon from '../internal/svg-icons/FirstPage';
19
18
  import { jsx as _jsx } from "react/jsx-runtime";
20
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
20
  const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePaginationActions(props, ref) {
22
- var _slotProps$firstButto, _slotProps$previousBu, _slotProps$nextButton, _slotProps$lastButton;
21
+ var _slots$firstButton, _slots$lastButton, _slots$nextButton, _slots$previousButton, _slots$firstButtonIco, _slots$lastButtonIcon, _slots$nextButtonIcon, _slots$previousButton2;
23
22
  const {
24
23
  backIconButtonProps,
25
24
  count,
@@ -31,7 +30,8 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
31
30
  rowsPerPage,
32
31
  showFirstButton,
33
32
  showLastButton,
34
- slotProps
33
+ slots = {},
34
+ slotProps = {}
35
35
  } = props,
36
36
  other = _objectWithoutPropertiesLoose(props, _excluded);
37
37
  const theme = useTheme();
@@ -47,39 +47,55 @@ const TablePaginationActions = /*#__PURE__*/React.forwardRef(function TablePagin
47
47
  const handleLastPageButtonClick = event => {
48
48
  onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
49
49
  };
50
+ const FirstButton = (_slots$firstButton = slots.firstButton) != null ? _slots$firstButton : IconButton;
51
+ const LastButton = (_slots$lastButton = slots.lastButton) != null ? _slots$lastButton : IconButton;
52
+ const NextButton = (_slots$nextButton = slots.nextButton) != null ? _slots$nextButton : IconButton;
53
+ const PreviousButton = (_slots$previousButton = slots.previousButton) != null ? _slots$previousButton : IconButton;
54
+ const FirstButtonIcon = (_slots$firstButtonIco = slots.firstButtonIcon) != null ? _slots$firstButtonIco : FirstPageIconDefault;
55
+ const LastButtonIcon = (_slots$lastButtonIcon = slots.lastButtonIcon) != null ? _slots$lastButtonIcon : LastPageIconDefault;
56
+ const NextButtonIcon = (_slots$nextButtonIcon = slots.nextButtonIcon) != null ? _slots$nextButtonIcon : KeyboardArrowRight;
57
+ const PreviousButtonIcon = (_slots$previousButton2 = slots.previousButtonIcon) != null ? _slots$previousButton2 : KeyboardArrowLeft;
58
+ const FirstButtonSlot = theme.direction === 'rtl' ? LastButton : FirstButton;
59
+ const PreviousButtonSlot = theme.direction === 'rtl' ? NextButton : PreviousButton;
60
+ const NextButtonSlot = theme.direction === 'rtl' ? PreviousButton : NextButton;
61
+ const LastButtonSlot = theme.direction === 'rtl' ? FirstButton : LastButton;
62
+ const firstButtonSlotProps = theme.direction === 'rtl' ? slotProps.lastButton : slotProps.firstButton;
63
+ const previousButtonSlotProps = theme.direction === 'rtl' ? slotProps.nextButton : slotProps.previousButton;
64
+ const nextButtonSlotProps = theme.direction === 'rtl' ? slotProps.previousButton : slotProps.nextButton;
65
+ const lastButtonSlotProps = theme.direction === 'rtl' ? slotProps.firstButton : slotProps.lastButton;
50
66
  return /*#__PURE__*/_jsxs("div", _extends({
51
67
  ref: ref
52
68
  }, other, {
53
- children: [showFirstButton && /*#__PURE__*/_jsx(IconButton, _extends({
69
+ children: [showFirstButton && /*#__PURE__*/_jsx(FirstButtonSlot, _extends({
54
70
  onClick: handleFirstPageButtonClick,
55
71
  disabled: disabled || page === 0,
56
72
  "aria-label": getItemAriaLabel('first', page),
57
73
  title: getItemAriaLabel('first', page)
58
- }, (_slotProps$firstButto = slotProps == null ? void 0 : slotProps.firstButton) != null ? _slotProps$firstButto : {}, {
59
- children: theme.direction === 'rtl' ? _LastPageIcon || (_LastPageIcon = /*#__PURE__*/_jsx(LastPageIcon, {})) : _FirstPageIcon || (_FirstPageIcon = /*#__PURE__*/_jsx(FirstPageIcon, {}))
60
- })), /*#__PURE__*/_jsx(IconButton, _extends({
74
+ }, firstButtonSlotProps, {
75
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon)) : /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon))
76
+ })), /*#__PURE__*/_jsx(PreviousButtonSlot, _extends({
61
77
  onClick: handleBackButtonClick,
62
78
  disabled: disabled || page === 0,
63
79
  color: "inherit",
64
80
  "aria-label": getItemAriaLabel('previous', page),
65
81
  title: getItemAriaLabel('previous', page)
66
- }, (_slotProps$previousBu = slotProps == null ? void 0 : slotProps.previousButton) != null ? _slotProps$previousBu : backIconButtonProps, {
67
- children: theme.direction === 'rtl' ? _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {})) : _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {}))
68
- })), /*#__PURE__*/_jsx(IconButton, _extends({
82
+ }, previousButtonSlotProps != null ? previousButtonSlotProps : backIconButtonProps, {
83
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon)) : /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon))
84
+ })), /*#__PURE__*/_jsx(NextButtonSlot, _extends({
69
85
  onClick: handleNextButtonClick,
70
86
  disabled: disabled || (count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false),
71
87
  color: "inherit",
72
88
  "aria-label": getItemAriaLabel('next', page),
73
89
  title: getItemAriaLabel('next', page)
74
- }, (_slotProps$nextButton = slotProps == null ? void 0 : slotProps.nextButton) != null ? _slotProps$nextButton : nextIconButtonProps, {
75
- children: theme.direction === 'rtl' ? _KeyboardArrowLeft2 || (_KeyboardArrowLeft2 = /*#__PURE__*/_jsx(KeyboardArrowLeft, {})) : _KeyboardArrowRight2 || (_KeyboardArrowRight2 = /*#__PURE__*/_jsx(KeyboardArrowRight, {}))
76
- })), showLastButton && /*#__PURE__*/_jsx(IconButton, _extends({
90
+ }, nextButtonSlotProps != null ? nextButtonSlotProps : nextIconButtonProps, {
91
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(PreviousButtonIcon, _extends({}, slotProps.previousButtonIcon)) : /*#__PURE__*/_jsx(NextButtonIcon, _extends({}, slotProps.nextButtonIcon))
92
+ })), showLastButton && /*#__PURE__*/_jsx(LastButtonSlot, _extends({
77
93
  onClick: handleLastPageButtonClick,
78
94
  disabled: disabled || page >= Math.ceil(count / rowsPerPage) - 1,
79
95
  "aria-label": getItemAriaLabel('last', page),
80
96
  title: getItemAriaLabel('last', page)
81
- }, (_slotProps$lastButton = slotProps == null ? void 0 : slotProps.lastButton) != null ? _slotProps$lastButton : {}, {
82
- children: theme.direction === 'rtl' ? _FirstPageIcon2 || (_FirstPageIcon2 = /*#__PURE__*/_jsx(FirstPageIcon, {})) : _LastPageIcon2 || (_LastPageIcon2 = /*#__PURE__*/_jsx(LastPageIcon, {}))
97
+ }, lastButtonSlotProps, {
98
+ children: theme.direction === 'rtl' ? /*#__PURE__*/_jsx(FirstButtonIcon, _extends({}, slotProps.firstButtonIcon)) : /*#__PURE__*/_jsx(LastButtonIcon, _extends({}, slotProps.lastButtonIcon))
83
99
  }))]
84
100
  }));
85
101
  });
@@ -140,9 +156,28 @@ process.env.NODE_ENV !== "production" ? TablePaginationActions.propTypes = {
140
156
  */
141
157
  slotProps: PropTypes.shape({
142
158
  firstButton: PropTypes.object,
159
+ firstButtonIcon: PropTypes.object,
143
160
  lastButton: PropTypes.object,
161
+ lastButtonIcon: PropTypes.object,
144
162
  nextButton: PropTypes.object,
145
- previousButton: PropTypes.object
163
+ nextButtonIcon: PropTypes.object,
164
+ previousButton: PropTypes.object,
165
+ previousButtonIcon: PropTypes.object
166
+ }),
167
+ /**
168
+ * The components used for each slot inside the TablePaginationActions.
169
+ * Either a string to use a HTML element or a component.
170
+ * @default {}
171
+ */
172
+ slots: PropTypes.shape({
173
+ firstButton: PropTypes.elementType,
174
+ firstButtonIcon: PropTypes.elementType,
175
+ lastButton: PropTypes.elementType,
176
+ lastButtonIcon: PropTypes.elementType,
177
+ nextButton: PropTypes.elementType,
178
+ nextButtonIcon: PropTypes.elementType,
179
+ previousButton: PropTypes.elementType,
180
+ previousButtonIcon: PropTypes.elementType
146
181
  })
147
182
  } : void 0;
148
183
  export default TablePaginationActions;
package/Tabs/Tabs.js CHANGED
@@ -200,7 +200,6 @@ const TabsScrollbarSize = styled(ScrollbarSize)({
200
200
  display: 'none' // Safari + Chrome
201
201
  }
202
202
  });
203
-
204
203
  const defaultIndicatorStyle = {};
205
204
  let warnedOnceTabPresent = false;
206
205
  const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
package/colors/amber.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /* tslint:disable max-line-length */
2
1
  /**
3
2
  * ![amber 50](https://mui.com/static/colors-preview/amber-50-24x24.png) ![amber 100](https://mui.com/static/colors-preview/amber-100-24x24.png) ![amber 200](https://mui.com/static/colors-preview/amber-200-24x24.png) ![amber 300](https://mui.com/static/colors-preview/amber-300-24x24.png) ![amber 400](https://mui.com/static/colors-preview/amber-400-24x24.png) ![amber 500](https://mui.com/static/colors-preview/amber-500-24x24.png) ![amber 600](https://mui.com/static/colors-preview/amber-600-24x24.png) ![amber 700](https://mui.com/static/colors-preview/amber-700-24x24.png) ![amber 800](https://mui.com/static/colors-preview/amber-800-24x24.png) ![amber 900](https://mui.com/static/colors-preview/amber-900-24x24.png) ![amber A100](https://mui.com/static/colors-preview/amber-A100-24x24.png) ![amber A200](https://mui.com/static/colors-preview/amber-A200-24x24.png) ![amber A400](https://mui.com/static/colors-preview/amber-A400-24x24.png) ![amber A700](https://mui.com/static/colors-preview/amber-A700-24x24.png)
4
3
  */