@mui/material 7.3.4 → 7.3.6

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 (202) hide show
  1. package/Accordion/Accordion.d.ts +56 -55
  2. package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  3. package/Alert/alertClasses.d.ts +24 -24
  4. package/AppBar/AppBar.d.ts +13 -2
  5. package/AppBar/AppBar.js +12 -1
  6. package/Breadcrumbs/BreadcrumbCollapsed.js +0 -2
  7. package/Button/Button.d.ts +1 -0
  8. package/Button/buttonClasses.d.ts +33 -33
  9. package/ButtonBase/ButtonBase.js +8 -1
  10. package/ButtonBase/TouchRipple.js +1 -1
  11. package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  12. package/CHANGELOG.md +142 -0
  13. package/Chip/Chip.js +1 -1
  14. package/Chip/chipClasses.d.ts +26 -26
  15. package/CircularProgress/circularProgressClasses.d.ts +2 -2
  16. package/Collapse/Collapse.d.ts +31 -1
  17. package/Collapse/Collapse.js +73 -30
  18. package/CssBaseline/CssBaseline.d.ts +1 -1
  19. package/CssBaseline/CssBaseline.js +1 -1
  20. package/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
  21. package/Dialog/dialogClasses.d.ts +2 -2
  22. package/Divider/dividerClasses.d.ts +1 -1
  23. package/Drawer/drawerClasses.d.ts +8 -8
  24. package/FormControl/FormControl.d.ts +1 -0
  25. package/FormHelperText/FormHelperText.d.ts +1 -0
  26. package/FormLabel/FormLabel.d.ts +1 -0
  27. package/GlobalStyles/GlobalStyles.js +0 -2
  28. package/IconButton/IconButton.d.ts +1 -0
  29. package/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
  30. package/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
  31. package/InitColorSchemeScript/InitColorSchemeScript.js +0 -2
  32. package/Input/inputClasses.d.ts +4 -4
  33. package/InputBase/inputBaseClasses.d.ts +5 -5
  34. package/InputLabel/InputLabel.d.ts +1 -0
  35. package/LinearProgress/linearProgressClasses.d.ts +9 -9
  36. package/ListItem/ListItem.d.ts +5 -0
  37. package/ListItem/ListItem.js +19 -4
  38. package/MenuList/MenuList.js +2 -1
  39. package/OutlinedInput/NotchedOutline.js +0 -2
  40. package/OutlinedInput/OutlinedInput.d.ts +1 -0
  41. package/OutlinedInput/outlinedInputClasses.d.ts +4 -4
  42. package/PaginationItem/paginationItemClasses.d.ts +4 -4
  43. package/Radio/RadioButtonIcon.js +0 -2
  44. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
  45. package/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
  46. package/Select/SelectInput.d.ts +2 -0
  47. package/Select/SelectInput.js +6 -0
  48. package/Select/selectClasses.d.ts +3 -3
  49. package/Slider/Slider.d.ts +1 -1
  50. package/Slider/sliderClasses.d.ts +7 -7
  51. package/Slider/useSlider.types.d.ts +1 -1
  52. package/Snackbar/Snackbar.js +1 -3
  53. package/StepConnector/stepConnectorClasses.d.ts +2 -2
  54. package/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
  55. package/Tabs/Tabs.js +3 -2
  56. package/TextField/TextField.d.ts +10 -5
  57. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  58. package/Unstable_TrapFocus/FocusTrap.js +13 -8
  59. package/Zoom/Zoom.d.ts +1 -1
  60. package/Zoom/Zoom.js +1 -1
  61. package/esm/Accordion/Accordion.d.ts +56 -55
  62. package/esm/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  63. package/esm/Alert/alertClasses.d.ts +24 -24
  64. package/esm/AppBar/AppBar.d.ts +13 -2
  65. package/esm/AppBar/AppBar.js +12 -1
  66. package/esm/Breadcrumbs/BreadcrumbCollapsed.js +0 -1
  67. package/esm/Button/Button.d.ts +1 -0
  68. package/esm/Button/buttonClasses.d.ts +33 -33
  69. package/esm/ButtonBase/ButtonBase.js +8 -1
  70. package/esm/ButtonBase/TouchRipple.js +1 -1
  71. package/esm/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  72. package/esm/Chip/Chip.js +1 -1
  73. package/esm/Chip/chipClasses.d.ts +26 -26
  74. package/esm/CircularProgress/circularProgressClasses.d.ts +2 -2
  75. package/esm/Collapse/Collapse.d.ts +31 -1
  76. package/esm/Collapse/Collapse.js +73 -30
  77. package/esm/CssBaseline/CssBaseline.d.ts +1 -1
  78. package/esm/CssBaseline/CssBaseline.js +1 -1
  79. package/esm/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
  80. package/esm/Dialog/dialogClasses.d.ts +2 -2
  81. package/esm/Divider/dividerClasses.d.ts +1 -1
  82. package/esm/Drawer/drawerClasses.d.ts +8 -8
  83. package/esm/FormControl/FormControl.d.ts +1 -0
  84. package/esm/FormHelperText/FormHelperText.d.ts +1 -0
  85. package/esm/FormLabel/FormLabel.d.ts +1 -0
  86. package/esm/GlobalStyles/GlobalStyles.js +0 -1
  87. package/esm/IconButton/IconButton.d.ts +1 -0
  88. package/esm/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
  89. package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
  90. package/esm/InitColorSchemeScript/InitColorSchemeScript.js +0 -1
  91. package/esm/Input/inputClasses.d.ts +4 -4
  92. package/esm/InputBase/inputBaseClasses.d.ts +5 -5
  93. package/esm/InputLabel/InputLabel.d.ts +1 -0
  94. package/esm/LinearProgress/linearProgressClasses.d.ts +9 -9
  95. package/esm/ListItem/ListItem.d.ts +5 -0
  96. package/esm/ListItem/ListItem.js +19 -4
  97. package/esm/MenuList/MenuList.js +2 -1
  98. package/esm/OutlinedInput/NotchedOutline.js +0 -1
  99. package/esm/OutlinedInput/OutlinedInput.d.ts +1 -0
  100. package/esm/OutlinedInput/outlinedInputClasses.d.ts +4 -4
  101. package/esm/PaginationItem/paginationItemClasses.d.ts +4 -4
  102. package/esm/Radio/RadioButtonIcon.js +0 -1
  103. package/esm/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
  104. package/esm/ScopedCssBaseline/ScopedCssBaseline.js +1 -1
  105. package/esm/Select/SelectInput.d.ts +2 -0
  106. package/esm/Select/SelectInput.js +6 -0
  107. package/esm/Select/selectClasses.d.ts +3 -3
  108. package/esm/Slider/Slider.d.ts +1 -1
  109. package/esm/Slider/sliderClasses.d.ts +7 -7
  110. package/esm/Slider/useSlider.types.d.ts +1 -1
  111. package/esm/Snackbar/Snackbar.js +1 -3
  112. package/esm/StepConnector/stepConnectorClasses.d.ts +2 -2
  113. package/esm/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
  114. package/esm/Tabs/Tabs.js +3 -2
  115. package/esm/TextField/TextField.d.ts +10 -5
  116. package/esm/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  117. package/esm/Unstable_TrapFocus/FocusTrap.js +13 -8
  118. package/esm/Zoom/Zoom.d.ts +1 -1
  119. package/esm/Zoom/Zoom.js +1 -1
  120. package/esm/index.js +1 -1
  121. package/esm/internal/svg-icons/Add.js +0 -1
  122. package/esm/internal/svg-icons/ArrowDownward.js +0 -1
  123. package/esm/internal/svg-icons/ArrowDropDown.js +0 -1
  124. package/esm/internal/svg-icons/Cancel.js +0 -1
  125. package/esm/internal/svg-icons/CheckBox.js +0 -1
  126. package/esm/internal/svg-icons/CheckBoxOutlineBlank.js +0 -1
  127. package/esm/internal/svg-icons/CheckCircle.js +0 -1
  128. package/esm/internal/svg-icons/Close.js +0 -1
  129. package/esm/internal/svg-icons/ErrorOutline.js +0 -1
  130. package/esm/internal/svg-icons/FirstPage.js +0 -1
  131. package/esm/internal/svg-icons/IndeterminateCheckBox.js +0 -1
  132. package/esm/internal/svg-icons/InfoOutlined.js +0 -1
  133. package/esm/internal/svg-icons/KeyboardArrowLeft.js +0 -1
  134. package/esm/internal/svg-icons/KeyboardArrowRight.js +0 -1
  135. package/esm/internal/svg-icons/LastPage.js +0 -1
  136. package/esm/internal/svg-icons/MoreHoriz.js +0 -1
  137. package/esm/internal/svg-icons/NavigateBefore.js +0 -1
  138. package/esm/internal/svg-icons/NavigateNext.js +0 -1
  139. package/esm/internal/svg-icons/Person.js +0 -1
  140. package/esm/internal/svg-icons/RadioButtonChecked.js +0 -1
  141. package/esm/internal/svg-icons/RadioButtonUnchecked.js +0 -1
  142. package/esm/internal/svg-icons/ReportProblemOutlined.js +0 -1
  143. package/esm/internal/svg-icons/Star.js +0 -1
  144. package/esm/internal/svg-icons/StarBorder.js +0 -1
  145. package/esm/internal/svg-icons/SuccessOutlined.js +0 -1
  146. package/esm/internal/svg-icons/Warning.js +0 -1
  147. package/esm/locale/caES.js +45 -42
  148. package/esm/styles/ThemeProvider.d.ts +1 -1
  149. package/esm/styles/ThemeProviderWithVars.d.ts +2 -3
  150. package/esm/styles/ThemeProviderWithVars.js +0 -1
  151. package/esm/styles/createThemeFoundation.d.ts +5 -3
  152. package/esm/styles/createThemeNoVars.d.ts +6 -3
  153. package/esm/styles/createThemeWithVars.d.ts +4 -4
  154. package/esm/styles/index.d.ts +1 -1
  155. package/esm/useAutocomplete/useAutocomplete.js +15 -2
  156. package/esm/utils/getActiveElement.d.ts +2 -0
  157. package/esm/utils/getActiveElement.js +2 -0
  158. package/esm/version/index.js +2 -2
  159. package/esm/zero-styled/index.d.ts +1 -2
  160. package/esm/zero-styled/index.js +0 -1
  161. package/index.js +1 -1
  162. package/internal/svg-icons/Add.js +0 -2
  163. package/internal/svg-icons/ArrowDownward.js +0 -2
  164. package/internal/svg-icons/ArrowDropDown.js +0 -2
  165. package/internal/svg-icons/Cancel.js +0 -2
  166. package/internal/svg-icons/CheckBox.js +0 -2
  167. package/internal/svg-icons/CheckBoxOutlineBlank.js +0 -2
  168. package/internal/svg-icons/CheckCircle.js +0 -2
  169. package/internal/svg-icons/Close.js +0 -2
  170. package/internal/svg-icons/ErrorOutline.js +0 -2
  171. package/internal/svg-icons/FirstPage.js +0 -2
  172. package/internal/svg-icons/IndeterminateCheckBox.js +0 -2
  173. package/internal/svg-icons/InfoOutlined.js +0 -2
  174. package/internal/svg-icons/KeyboardArrowLeft.js +0 -2
  175. package/internal/svg-icons/KeyboardArrowRight.js +0 -2
  176. package/internal/svg-icons/LastPage.js +0 -2
  177. package/internal/svg-icons/MoreHoriz.js +0 -2
  178. package/internal/svg-icons/NavigateBefore.js +0 -2
  179. package/internal/svg-icons/NavigateNext.js +0 -2
  180. package/internal/svg-icons/Person.js +0 -2
  181. package/internal/svg-icons/RadioButtonChecked.js +0 -2
  182. package/internal/svg-icons/RadioButtonUnchecked.js +0 -2
  183. package/internal/svg-icons/ReportProblemOutlined.js +0 -2
  184. package/internal/svg-icons/Star.js +0 -2
  185. package/internal/svg-icons/StarBorder.js +0 -2
  186. package/internal/svg-icons/SuccessOutlined.js +0 -2
  187. package/internal/svg-icons/Warning.js +0 -2
  188. package/locale/caES.js +45 -42
  189. package/package.json +7 -7
  190. package/styles/ThemeProvider.d.ts +1 -1
  191. package/styles/ThemeProviderWithVars.d.ts +2 -3
  192. package/styles/ThemeProviderWithVars.js +0 -2
  193. package/styles/createThemeFoundation.d.ts +5 -3
  194. package/styles/createThemeNoVars.d.ts +6 -3
  195. package/styles/createThemeWithVars.d.ts +4 -4
  196. package/styles/index.d.ts +1 -1
  197. package/useAutocomplete/useAutocomplete.js +15 -2
  198. package/utils/getActiveElement.d.ts +2 -0
  199. package/utils/getActiveElement.js +9 -0
  200. package/version/index.js +2 -2
  201. package/zero-styled/index.d.ts +1 -2
  202. package/zero-styled/index.js +0 -2
@@ -8,6 +8,7 @@ import ownerDocument from '@mui/utils/ownerDocument';
8
8
  import getReactElementRef from '@mui/utils/getReactElementRef';
9
9
  import exactProp from '@mui/utils/exactProp';
10
10
  import elementAcceptingRef from '@mui/utils/elementAcceptingRef';
11
+ import getActiveElement from "../utils/getActiveElement.js";
11
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
13
  // Inspired by https://github.com/focus-trap/tabbable
13
14
  const candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])'].join(',');
@@ -111,7 +112,8 @@ function FocusTrap(props) {
111
112
  return;
112
113
  }
113
114
  const doc = ownerDocument(rootRef.current);
114
- if (!rootRef.current.contains(doc.activeElement)) {
115
+ const activeElement = getActiveElement(doc);
116
+ if (!rootRef.current.contains(activeElement)) {
115
117
  if (!rootRef.current.hasAttribute('tabIndex')) {
116
118
  if (process.env.NODE_ENV !== 'production') {
117
119
  console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to "-1".'].join('\n'));
@@ -146,6 +148,7 @@ function FocusTrap(props) {
146
148
  return;
147
149
  }
148
150
  const doc = ownerDocument(rootRef.current);
151
+ const activeElement = getActiveElement(doc);
149
152
  const loopFocus = nativeEvent => {
150
153
  lastKeydown.current = nativeEvent;
151
154
  if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {
@@ -153,8 +156,8 @@ function FocusTrap(props) {
153
156
  }
154
157
 
155
158
  // Make sure the next tab starts from the right place.
156
- // doc.activeElement refers to the origin.
157
- if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {
159
+ // activeElement refers to the origin.
160
+ if (activeElement === rootRef.current && nativeEvent.shiftKey) {
158
161
  // We need to ignore the next contain as
159
162
  // it will try to move the focus back to the rootRef element.
160
163
  ignoreNextEnforceFocus.current = true;
@@ -171,23 +174,24 @@ function FocusTrap(props) {
171
174
  if (rootElement === null) {
172
175
  return;
173
176
  }
177
+ const activeEl = getActiveElement(doc);
174
178
  if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
175
179
  ignoreNextEnforceFocus.current = false;
176
180
  return;
177
181
  }
178
182
 
179
183
  // The focus is already inside
180
- if (rootElement.contains(doc.activeElement)) {
184
+ if (rootElement.contains(activeEl)) {
181
185
  return;
182
186
  }
183
187
 
184
188
  // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)
185
- if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
189
+ if (disableEnforceFocus && activeEl !== sentinelStart.current && activeEl !== sentinelEnd.current) {
186
190
  return;
187
191
  }
188
192
 
189
193
  // if the focus event is not coming from inside the children's react tree, reset the refs
190
- if (doc.activeElement !== reactFocusEventTarget.current) {
194
+ if (activeEl !== reactFocusEventTarget.current) {
191
195
  reactFocusEventTarget.current = null;
192
196
  } else if (reactFocusEventTarget.current !== null) {
193
197
  return;
@@ -196,7 +200,7 @@ function FocusTrap(props) {
196
200
  return;
197
201
  }
198
202
  let tabbable = [];
199
- if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
203
+ if (activeEl === sentinelStart.current || activeEl === sentinelEnd.current) {
200
204
  tabbable = getTabbable(rootRef.current);
201
205
  }
202
206
 
@@ -228,7 +232,8 @@ function FocusTrap(props) {
228
232
  // The whatwg spec defines how the browser should behave but does not explicitly mention any events:
229
233
  // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.
230
234
  const interval = setInterval(() => {
231
- if (doc.activeElement && doc.activeElement.tagName === 'BODY') {
235
+ const activeEl = getActiveElement(doc);
236
+ if (activeEl && activeEl.tagName === 'BODY') {
232
237
  contain();
233
238
  }
234
239
  }, 50);
@@ -34,7 +34,7 @@ export interface ZoomProps extends TransitionProps {
34
34
 
35
35
  /**
36
36
  * The Zoom transition can be used for the floating variant of the
37
- * [Button](https://mui.com/material-ui/react-button/#floating-action-buttons) component.
37
+ * [Button](https://mui.com/material-ui/react-floating-action-button/#animation) component.
38
38
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
39
39
  *
40
40
  * Demos:
package/esm/Zoom/Zoom.js CHANGED
@@ -20,7 +20,7 @@ const styles = {
20
20
 
21
21
  /**
22
22
  * The Zoom transition can be used for the floating variant of the
23
- * [Button](/material-ui/react-button/#floating-action-buttons) component.
23
+ * [Button](/material-ui/react-floating-action-button/#animation) component.
24
24
  * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
25
25
  */
26
26
  const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v7.3.4
2
+ * @mui/material v7.3.6
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import { createSvgIcon } from "../../utils/index.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import createSvgIcon from "../../utils/createSvgIcon.js";
5
4
 
6
5
  /**
@@ -1,28 +1,31 @@
1
1
  export const caES = {
2
2
  components: {
3
- // MuiBreadcrumbs: {
4
- // defaultProps: {
5
- // expandText: 'Show path',
6
- // },
7
- // },
3
+ MuiBreadcrumbs: {
4
+ defaultProps: {
5
+ expandText: 'Mostra el camí'
6
+ }
7
+ },
8
8
  MuiTablePagination: {
9
9
  defaultProps: {
10
- // getItemAriaLabel: (type) => {
11
- // if (type === 'first') {
12
- // return 'Go to first page';
13
- // }
14
- // if (type === 'last') {
15
- // return 'Go to last page';
16
- // }
17
- // if (type === 'next') {
18
- // return 'Go to next page';
19
- // }
20
- // // if (type === 'previous') {
21
- // return 'Go to previous page';
22
- // },
23
- labelRowsPerPage: 'Files per pàgina:'
24
- // labelDisplayedRows: ({ from, to, count }) =>
25
- // `${from}–${to} de ${count !== -1 ? count : `more than ${to}`}`,
10
+ getItemAriaLabel: type => {
11
+ if (type === 'first') {
12
+ return 'Ves a la primera pàgina';
13
+ }
14
+ if (type === 'last') {
15
+ return "Ves a l'última pàgina";
16
+ }
17
+ if (type === 'next') {
18
+ return 'Ves a la pàgina següent';
19
+ }
20
+ // if (type === 'previous') {
21
+ return 'Ves a la pàgina anterior';
22
+ },
23
+ labelRowsPerPage: 'Files per pàgina:',
24
+ labelDisplayedRows: ({
25
+ from,
26
+ to,
27
+ count
28
+ }) => `${from}–${to} de ${count !== -1 ? count : `més de ${to}`}`
26
29
  }
27
30
  },
28
31
  MuiRating: {
@@ -44,27 +47,27 @@ export const caES = {
44
47
  defaultProps: {
45
48
  closeText: 'Tancat'
46
49
  }
50
+ },
51
+ MuiPagination: {
52
+ defaultProps: {
53
+ 'aria-label': 'Navegació entre pàgines',
54
+ getItemAriaLabel: (type, page, selected) => {
55
+ if (type === 'page') {
56
+ return `${selected ? '' : 'Ves a la '}pàgina ${page}`;
57
+ }
58
+ if (type === 'first') {
59
+ return 'Ves a la primera pàgina';
60
+ }
61
+ if (type === 'last') {
62
+ return "Ves a l'última pàgina";
63
+ }
64
+ if (type === 'next') {
65
+ return 'Ves a la pàgina següent';
66
+ }
67
+ // if (type === 'previous') {
68
+ return 'Ves a la pàgina anterior';
69
+ }
70
+ }
47
71
  }
48
- // MuiPagination: {
49
- // defaultProps: {
50
- // 'aria-label': 'Pagination navigation',
51
- // getItemAriaLabel: (type, page, selected) => {
52
- // if (type === 'page') {
53
- // return `${selected ? '' : 'Go to '}page ${page}`;
54
- // }
55
- // if (type === 'first') {
56
- // return 'Go to first page';
57
- // }
58
- // if (type === 'last') {
59
- // return 'Go to last page';
60
- // }
61
- // if (type === 'next') {
62
- // return 'Go to next page';
63
- // }
64
- // // if (type === 'previous') {
65
- // return 'Go to previous page';
66
- // },
67
- // },
68
- // },
69
72
  }
70
73
  };
@@ -72,5 +72,5 @@ export interface ThemeProviderProps<Theme = DefaultTheme> extends ThemeProviderC
72
72
  export default function ThemeProvider<Theme = DefaultTheme>({
73
73
  theme,
74
74
  ...props
75
- }: ThemeProviderProps<Theme>): React.JSX.Element;
75
+ }: ThemeProviderProps<Theme>): import("react/jsx-runtime").JSX.Element;
76
76
  export {};
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
2
1
  import { SupportedColorScheme } from "./createThemeWithVars.js";
3
2
  declare const useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, deprecatedGetInitColorSchemeScript: typeof import("@mui/system/InitColorSchemeScript").default;
4
- declare function Experimental_CssVarsProvider(props: any): React.JSX.Element;
3
+ declare function Experimental_CssVarsProvider(props: any): import("react/jsx-runtime").JSX.Element;
5
4
  declare const getInitColorSchemeScript: typeof deprecatedGetInitColorSchemeScript;
6
5
  /**
7
6
  * TODO: remove this export in v7
@@ -26,7 +25,7 @@ declare const getInitColorSchemeScript: typeof deprecatedGetInitColorSchemeScrip
26
25
  *
27
26
  * To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.
28
27
  */
29
- export declare const CssVarsProvider: (props: React.PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
28
+ export declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
30
29
  theme?: {
31
30
  cssVariables?: false;
32
31
  cssVarPrefix?: string;
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import styleFunctionSx from '@mui/system/styleFunctionSx';
5
4
  import { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';
6
5
  import createTheme from "./createTheme.js";
@@ -1,5 +1,5 @@
1
1
  import { OverridableStringUnion } from '@mui/types';
2
- import { SxConfig, SxProps, CSSObject, ApplyStyles, Theme as SystemTheme } from '@mui/system';
2
+ import { SxConfig, SxProps, CSSObject, ApplyStyles, Theme as SystemTheme, Shape as SystemShape, ShapeOptions as SystemShapeOptions } from '@mui/system';
3
3
  import { ExtractTypographyTokens } from '@mui/system/cssVars';
4
4
  import { Palette, PaletteOptions } from "./createPalette.js";
5
5
  import { Shadows } from "./shadows.js";
@@ -152,6 +152,8 @@ export interface PaletteTableCell {
152
152
  export interface PaletteTooltip {
153
153
  bg: string;
154
154
  }
155
+ export interface Shape extends SystemShape {}
156
+ export interface ShapeOptions extends SystemShapeOptions {}
155
157
  export interface ColorSystemOptions {
156
158
  palette?: PaletteOptions & {
157
159
  background?: Partial<PaletteBackgroundChannel>;
@@ -224,7 +226,7 @@ export interface ThemeVars {
224
226
  opacity: Opacity;
225
227
  overlays: Overlays;
226
228
  shadows: Shadows;
227
- shape: SystemTheme['shape'];
229
+ shape: Shape;
228
230
  spacing: string;
229
231
  zIndex: ZIndex;
230
232
  }
@@ -256,7 +258,7 @@ export interface CssVarsTheme extends ColorSystem {
256
258
  generateSpacing: () => SystemTheme['spacing'];
257
259
  spacing: SystemTheme['spacing'];
258
260
  breakpoints: SystemTheme['breakpoints'];
259
- shape: SystemTheme['shape'];
261
+ shape: Shape;
260
262
  typography: TypographyVariants;
261
263
  transitions: Transitions;
262
264
  shadows: Shadows;
@@ -1,4 +1,4 @@
1
- import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme, SxProps, CSSObject, SxConfig } from '@mui/system';
1
+ import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme, SxProps, CSSObject, SxConfig, ApplyStyles } from '@mui/system';
2
2
  import { Mixins, MixinsOptions } from "./createMixins.js";
3
3
  import { Palette, PaletteOptions } from "./createPalette.js";
4
4
  import { TypographyVariants, TypographyVariantsOptions } from "./createTypography.js";
@@ -6,7 +6,7 @@ import { Shadows } from "./shadows.js";
6
6
  import { Transitions, TransitionsOptions } from "./createTransitions.js";
7
7
  import { ZIndex, ZIndexOptions } from "./zIndex.js";
8
8
  import { Components } from "./components.js";
9
- import { CssVarsTheme, CssVarsPalette, ColorSystemOptions } from "./createThemeFoundation.js";
9
+ import { CssVarsTheme, CssVarsPalette, ColorSystemOptions, Shape, ShapeOptions, SupportedColorScheme } from "./createThemeFoundation.js";
10
10
 
11
11
  /**
12
12
  * To disable custom properties, use module augmentation
@@ -27,6 +27,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
27
27
  components?: Components<Omit<Theme, 'components'>>;
28
28
  palette?: PaletteOptions;
29
29
  shadows?: Shadows;
30
+ shape?: ShapeOptions;
30
31
  transitions?: TransitionsOptions;
31
32
  typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
32
33
  zIndex?: ZIndexOptions;
@@ -40,17 +41,19 @@ export interface BaseTheme extends SystemTheme {
40
41
  enabled: true;
41
42
  } ? CssVarsPalette : {});
42
43
  shadows: Shadows;
44
+ shape: Shape;
43
45
  transitions: Transitions;
44
46
  typography: TypographyVariants;
45
47
  zIndex: ZIndex;
46
48
  unstable_strictMode?: boolean;
49
+ applyStyles: ApplyStyles<SupportedColorScheme>;
47
50
  }
48
51
 
49
52
  // shut off automatic exporting for the `BaseTheme` above
50
53
  export {};
51
54
  type CssVarsProperties = CssThemeVariables extends {
52
55
  enabled: true;
53
- } ? Pick<CssVarsTheme, 'applyStyles' | 'colorSchemes' | 'colorSchemeSelector' | 'rootSelector' | 'cssVarPrefix' | 'defaultColorScheme' | 'getCssVar' | 'getColorSchemeSelector' | 'generateThemeVars' | 'generateStyleSheets' | 'generateSpacing' | 'shouldSkipGeneratingVar' | 'vars'> : Partial<Pick<CssVarsTheme, 'vars'>>;
56
+ } ? Pick<CssVarsTheme, 'colorSchemes' | 'colorSchemeSelector' | 'rootSelector' | 'cssVarPrefix' | 'defaultColorScheme' | 'getCssVar' | 'getColorSchemeSelector' | 'generateThemeVars' | 'generateStyleSheets' | 'generateSpacing' | 'shouldSkipGeneratingVar' | 'vars'> : Partial<Pick<CssVarsTheme, 'vars'>>;
54
57
 
55
58
  /**
56
59
  * Our [TypeScript guide on theme customization](https://mui.com/material-ui/guides/typescript/#customization-of-theme) explains in detail how you would add custom properties.
@@ -1,15 +1,15 @@
1
1
  import { ThemeOptions, Theme } from "./createThemeNoVars.js";
2
2
  import { Components } from "./components.js";
3
- import { DefaultColorScheme, ColorSchemeOverrides, ExtendedColorScheme, SupportedColorScheme, Opacity, Overlays, PaletteBackgroundChannel, PaletteCommonChannel, PaletteColorChannel, PaletteActionChannel, PaletteTextChannel, PaletteAlert, PaletteAppBar, PaletteAvatar, PaletteButton, PaletteChip, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTooltip, ColorSystemOptions, CssVarsPalette, ColorSystem, ThemeVars, ThemeCssVarOverrides, ThemeCssVar, CssVarsTheme } from "./createThemeFoundation.js";
3
+ import { DefaultColorScheme, ColorSchemeOverrides, ExtendedColorScheme, SupportedColorScheme, Opacity, Overlays, PaletteBackgroundChannel, PaletteCommonChannel, PaletteColorChannel, PaletteActionChannel, PaletteTextChannel, PaletteAlert, PaletteAppBar, PaletteAvatar, PaletteButton, PaletteChip, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTooltip, ColorSystemOptions, CssVarsPalette, ColorSystem, ThemeVars, ThemeCssVarOverrides, ThemeCssVar, CssVarsTheme, Shape, ShapeOptions } from "./createThemeFoundation.js";
4
4
 
5
5
  // Re-export all types from foundation to maintain backward compatibility
6
- export type { DefaultColorScheme, ColorSchemeOverrides, ExtendedColorScheme, SupportedColorScheme, Opacity, Overlays, PaletteBackgroundChannel, PaletteCommonChannel, PaletteColorChannel, PaletteActionChannel, PaletteTextChannel, PaletteAlert, PaletteAppBar, PaletteAvatar, PaletteButton, PaletteChip, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTooltip, ColorSystemOptions, CssVarsPalette, ColorSystem, ThemeVars, ThemeCssVarOverrides, ThemeCssVar, CssVarsTheme };
6
+ export type { DefaultColorScheme, ColorSchemeOverrides, ExtendedColorScheme, SupportedColorScheme, Opacity, Overlays, PaletteBackgroundChannel, PaletteCommonChannel, PaletteColorChannel, PaletteActionChannel, PaletteTextChannel, PaletteAlert, PaletteAppBar, PaletteAvatar, PaletteButton, PaletteChip, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTooltip, ColorSystemOptions, CssVarsPalette, ColorSystem, ThemeVars, ThemeCssVarOverrides, ThemeCssVar, CssVarsTheme, Shape, ShapeOptions };
7
7
  export interface CssVarsThemeOptions extends Omit<ThemeOptions, 'palette' | 'components'> {
8
8
  /**
9
9
  * The strategy to generate CSS variables
10
10
  *
11
11
  * @example 'media'
12
- * Generate CSS variables using [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
12
+ * Generate CSS variables using [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme)
13
13
  *
14
14
  * @example '.mode-%s'
15
15
  * Generate CSS variables within a class .mode-light, .mode-dark
@@ -25,7 +25,7 @@ export interface CssVarsThemeOptions extends Omit<ThemeOptions, 'palette' | 'com
25
25
  cssVarPrefix?: string;
26
26
  /**
27
27
  * If `true`, the CSS color-scheme will not be set.
28
- * https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
28
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/color-scheme
29
29
  * @default false
30
30
  */
31
31
  disableCssColorScheme?: boolean;
@@ -59,7 +59,7 @@ export { default as withTheme } from "./withTheme.js";
59
59
  export * from "./ThemeProviderWithVars.js";
60
60
  export type { StorageManager } from '@mui/system/cssVars';
61
61
  export { default as extendTheme } from "./createThemeWithVars.js";
62
- export type { ColorSchemeOverrides, SupportedColorScheme, ColorSystem, CssVarsPalette, Opacity, Overlays, PaletteAlert, PaletteActionChannel, PaletteAppBar, PaletteAvatar, PaletteChip, PaletteColorChannel, PaletteCommonChannel, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTextChannel, PaletteTooltip, CssVarsThemeOptions, CssVarsTheme, ThemeVars, ThemeCssVar, ThemeCssVarOverrides, ColorSystemOptions } from "./createThemeWithVars.js";
62
+ export type { ColorSchemeOverrides, SupportedColorScheme, ColorSystem, CssVarsPalette, Opacity, Overlays, PaletteAlert, PaletteActionChannel, PaletteAppBar, PaletteAvatar, PaletteChip, PaletteColorChannel, PaletteCommonChannel, PaletteFilledInput, PaletteLinearProgress, PaletteSkeleton, PaletteSlider, PaletteSnackbarContent, PaletteSpeedDialAction, PaletteStepConnector, PaletteStepContent, PaletteSwitch, PaletteTableCell, PaletteTextChannel, PaletteTooltip, CssVarsThemeOptions, CssVarsTheme, ThemeVars, ThemeCssVar, ThemeCssVarOverrides, ColorSystemOptions, Shape, ShapeOptions } from "./createThemeWithVars.js";
63
63
  export { default as getOverlayAlpha } from "./getOverlayAlpha.js";
64
64
  export { default as shouldSkipGeneratingVar } from "./shouldSkipGeneratingVar.js";
65
65
 
@@ -465,7 +465,7 @@ function useAutocomplete(props) {
465
465
  filteredOptions.length,
466
466
  // Don't sync the highlighted index with the value when multiple
467
467
  // eslint-disable-next-line react-hooks/exhaustive-deps
468
- multiple ? false : value, filterSelectedOptions, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple]);
468
+ multiple ? false : value, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple]);
469
469
  const handleListboxRef = useEventCallback(node => {
470
470
  setRef(listboxRef, node);
471
471
  if (!node) {
@@ -693,7 +693,8 @@ function useAutocomplete(props) {
693
693
  handleOpen(event);
694
694
  break;
695
695
  case 'ArrowLeft':
696
- if (!multiple && renderValue) {
696
+ if (!multiple && renderValue && value != null) {
697
+ setFocusedItem(0);
697
698
  focusItem(0);
698
699
  } else {
699
700
  handleFocusItem(event, 'previous');
@@ -701,6 +702,7 @@ function useAutocomplete(props) {
701
702
  break;
702
703
  case 'ArrowRight':
703
704
  if (!multiple && renderValue) {
705
+ setFocusedItem(-1);
704
706
  focusItem(-1);
705
707
  } else {
706
708
  handleFocusItem(event, 'next');
@@ -757,6 +759,7 @@ function useAutocomplete(props) {
757
759
  }
758
760
  if (!multiple && renderValue && !readOnly) {
759
761
  setValueState(null);
762
+ setFocusedItem(-1);
760
763
  focusItem(-1);
761
764
  }
762
765
  break;
@@ -772,6 +775,7 @@ function useAutocomplete(props) {
772
775
  }
773
776
  if (!multiple && renderValue && !readOnly) {
774
777
  setValueState(null);
778
+ setFocusedItem(-1);
775
779
  focusItem(-1);
776
780
  }
777
781
  break;
@@ -781,6 +785,15 @@ function useAutocomplete(props) {
781
785
  };
782
786
  const handleFocus = event => {
783
787
  setFocused(true);
788
+
789
+ // When focusing the input, ensure any previously focused item (chip)
790
+ // is cleared so the input receives the visible caret and the
791
+ // input-focused styling is applied.
792
+ if (focusedItem !== -1) {
793
+ setFocusedItem(-1);
794
+ // Ensure DOM focus lands on the input
795
+ focusItem(-1);
796
+ }
784
797
  if (openOnFocus && !ignoreFocus.current) {
785
798
  handleOpen(event);
786
799
  }
@@ -0,0 +1,2 @@
1
+ import getActiveElement from '@mui/utils/getActiveElement';
2
+ export default getActiveElement;