sevago-library 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -28310,8 +28310,11 @@ function getContainerQuery(theme, shorthand) {
28310
28310
  const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/);
28311
28311
  if (!matches) {
28312
28312
  if (process.env.NODE_ENV !== "production") {
28313
- throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
28314
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : formatMuiErrorMessage(18, `(${shorthand})`));
28313
+ throw (
28314
+ /* minify-error */
28315
+ new Error(`MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
28316
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`)
28317
+ );
28315
28318
  }
28316
28319
  return null;
28317
28320
  }
@@ -28883,7 +28886,7 @@ function serializeStyles(args, registered, mergedProps) {
28883
28886
  };
28884
28887
  }
28885
28888
  /**
28886
- * @mui/styled-engine v7.3.3
28889
+ * @mui/styled-engine v7.3.10
28887
28890
  *
28888
28891
  * @license MIT
28889
28892
  * This source code is licensed under the MIT license found in the
@@ -30435,7 +30438,7 @@ function createThemeNoVars(options = {}, ...args) {
30435
30438
  if (options.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
30436
30439
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
30437
30440
  options.generateThemeVars === void 0) {
30438
- throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : formatMuiErrorMessage(20));
30441
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : formatMuiErrorMessage(20));
30439
30442
  }
30440
30443
  const palette = createPalette({
30441
30444
  ...paletteInput,
@@ -30783,10 +30786,10 @@ function createThemeWithVars(options = {}, ...args) {
30783
30786
  }
30784
30787
  assignNode(palette, ["Alert", "AppBar", "Avatar", "Button", "Chip", "FilledInput", "LinearProgress", "Skeleton", "Slider", "SnackbarContent", "SpeedDialAction", "StepConnector", "StepContent", "Switch", "TableCell", "Tooltip"]);
30785
30788
  if (palette.mode === "light") {
30786
- setColor(palette.Alert, "errorColor", colorMix(private_safeDarken, palette.error.light, 0.6));
30787
- setColor(palette.Alert, "infoColor", colorMix(private_safeDarken, palette.info.light, 0.6));
30788
- setColor(palette.Alert, "successColor", colorMix(private_safeDarken, palette.success.light, 0.6));
30789
- setColor(palette.Alert, "warningColor", colorMix(private_safeDarken, palette.warning.light, 0.6));
30789
+ setColor(palette.Alert, "errorColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-error-light") : palette.error.light, 0.6));
30790
+ setColor(palette.Alert, "infoColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-info-light") : palette.info.light, 0.6));
30791
+ setColor(palette.Alert, "successColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-success-light") : palette.success.light, 0.6));
30792
+ setColor(palette.Alert, "warningColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-warning-light") : palette.warning.light, 0.6));
30790
30793
  setColor(palette.Alert, "errorFilledBg", setCssVarColor("palette-error-main"));
30791
30794
  setColor(palette.Alert, "infoFilledBg", setCssVarColor("palette-info-main"));
30792
30795
  setColor(palette.Alert, "successFilledBg", setCssVarColor("palette-success-main"));
@@ -30795,10 +30798,10 @@ function createThemeWithVars(options = {}, ...args) {
30795
30798
  setColor(palette.Alert, "infoFilledColor", silent(() => palette.getContrastText(palette.info.main)));
30796
30799
  setColor(palette.Alert, "successFilledColor", silent(() => palette.getContrastText(palette.success.main)));
30797
30800
  setColor(palette.Alert, "warningFilledColor", silent(() => palette.getContrastText(palette.warning.main)));
30798
- setColor(palette.Alert, "errorStandardBg", colorMix(private_safeLighten, palette.error.light, 0.9));
30799
- setColor(palette.Alert, "infoStandardBg", colorMix(private_safeLighten, palette.info.light, 0.9));
30800
- setColor(palette.Alert, "successStandardBg", colorMix(private_safeLighten, palette.success.light, 0.9));
30801
- setColor(palette.Alert, "warningStandardBg", colorMix(private_safeLighten, palette.warning.light, 0.9));
30801
+ setColor(palette.Alert, "errorStandardBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-error-light") : palette.error.light, 0.9));
30802
+ setColor(palette.Alert, "infoStandardBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-info-light") : palette.info.light, 0.9));
30803
+ setColor(palette.Alert, "successStandardBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-success-light") : palette.success.light, 0.9));
30804
+ setColor(palette.Alert, "warningStandardBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-warning-light") : palette.warning.light, 0.9));
30802
30805
  setColor(palette.Alert, "errorIconColor", setCssVarColor("palette-error-main"));
30803
30806
  setColor(palette.Alert, "infoIconColor", setCssVarColor("palette-info-main"));
30804
30807
  setColor(palette.Alert, "successIconColor", setCssVarColor("palette-success-main"));
@@ -30813,20 +30816,20 @@ function createThemeWithVars(options = {}, ...args) {
30813
30816
  setColor(palette.FilledInput, "bg", "rgba(0, 0, 0, 0.06)");
30814
30817
  setColor(palette.FilledInput, "hoverBg", "rgba(0, 0, 0, 0.09)");
30815
30818
  setColor(palette.FilledInput, "disabledBg", "rgba(0, 0, 0, 0.12)");
30816
- setColor(palette.LinearProgress, "primaryBg", colorMix(private_safeLighten, palette.primary.main, 0.62));
30817
- setColor(palette.LinearProgress, "secondaryBg", colorMix(private_safeLighten, palette.secondary.main, 0.62));
30818
- setColor(palette.LinearProgress, "errorBg", colorMix(private_safeLighten, palette.error.main, 0.62));
30819
- setColor(palette.LinearProgress, "infoBg", colorMix(private_safeLighten, palette.info.main, 0.62));
30820
- setColor(palette.LinearProgress, "successBg", colorMix(private_safeLighten, palette.success.main, 0.62));
30821
- setColor(palette.LinearProgress, "warningBg", colorMix(private_safeLighten, palette.warning.main, 0.62));
30822
- setColor(palette.Skeleton, "bg", colorSpace ? colorMix(private_safeAlpha, palette.text.primary, 0.11) : `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.11)`);
30823
- setColor(palette.Slider, "primaryTrack", colorMix(private_safeLighten, palette.primary.main, 0.62));
30824
- setColor(palette.Slider, "secondaryTrack", colorMix(private_safeLighten, palette.secondary.main, 0.62));
30825
- setColor(palette.Slider, "errorTrack", colorMix(private_safeLighten, palette.error.main, 0.62));
30826
- setColor(palette.Slider, "infoTrack", colorMix(private_safeLighten, palette.info.main, 0.62));
30827
- setColor(palette.Slider, "successTrack", colorMix(private_safeLighten, palette.success.main, 0.62));
30828
- setColor(palette.Slider, "warningTrack", colorMix(private_safeLighten, palette.warning.main, 0.62));
30829
- const snackbarContentBackground = colorSpace ? colorMix(private_safeDarken, palette.background.default, 0.6825) : private_safeEmphasize(palette.background.default, 0.8);
30819
+ setColor(palette.LinearProgress, "primaryBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.62));
30820
+ setColor(palette.LinearProgress, "secondaryBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.62));
30821
+ setColor(palette.LinearProgress, "errorBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.62));
30822
+ setColor(palette.LinearProgress, "infoBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.62));
30823
+ setColor(palette.LinearProgress, "successBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.62));
30824
+ setColor(palette.LinearProgress, "warningBg", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-warning-light") : palette.warning.main, 0.62));
30825
+ setColor(palette.Skeleton, "bg", colorSpace ? colorMix(private_safeAlpha, nativeColor ? getCssVar("palette-text-primary") : palette.text.primary, 0.11) : `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.11)`);
30826
+ setColor(palette.Slider, "primaryTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.62));
30827
+ setColor(palette.Slider, "secondaryTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.62));
30828
+ setColor(palette.Slider, "errorTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.62));
30829
+ setColor(palette.Slider, "infoTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.62));
30830
+ setColor(palette.Slider, "successTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.62));
30831
+ setColor(palette.Slider, "warningTrack", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-warning-main") : palette.warning.main, 0.62));
30832
+ const snackbarContentBackground = colorSpace ? colorMix(private_safeDarken, nativeColor ? getCssVar("palette-background-default") : palette.background.default, 0.6825) : private_safeEmphasize(palette.background.default, 0.8);
30830
30833
  setColor(palette.SnackbarContent, "bg", snackbarContentBackground);
30831
30834
  setColor(palette.SnackbarContent, "color", silent(() => colorSpace ? dark.text.primary : palette.getContrastText(snackbarContentBackground)));
30832
30835
  setColor(palette.SpeedDialAction, "fabHoverBg", private_safeEmphasize(palette.background.paper, 0.15));
@@ -30834,20 +30837,20 @@ function createThemeWithVars(options = {}, ...args) {
30834
30837
  setColor(palette.StepContent, "border", setCssVarColor("palette-grey-400"));
30835
30838
  setColor(palette.Switch, "defaultColor", setCssVarColor("palette-common-white"));
30836
30839
  setColor(palette.Switch, "defaultDisabledColor", setCssVarColor("palette-grey-100"));
30837
- setColor(palette.Switch, "primaryDisabledColor", colorMix(private_safeLighten, palette.primary.main, 0.62));
30838
- setColor(palette.Switch, "secondaryDisabledColor", colorMix(private_safeLighten, palette.secondary.main, 0.62));
30839
- setColor(palette.Switch, "errorDisabledColor", colorMix(private_safeLighten, palette.error.main, 0.62));
30840
- setColor(palette.Switch, "infoDisabledColor", colorMix(private_safeLighten, palette.info.main, 0.62));
30841
- setColor(palette.Switch, "successDisabledColor", colorMix(private_safeLighten, palette.success.main, 0.62));
30842
- setColor(palette.Switch, "warningDisabledColor", colorMix(private_safeLighten, palette.warning.main, 0.62));
30843
- setColor(palette.TableCell, "border", colorMix(private_safeLighten, colorMix(private_safeAlpha, palette.divider, 1), 0.88));
30844
- setColor(palette.Tooltip, "bg", colorMix(private_safeAlpha, palette.grey[700], 0.92));
30840
+ setColor(palette.Switch, "primaryDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.62));
30841
+ setColor(palette.Switch, "secondaryDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.62));
30842
+ setColor(palette.Switch, "errorDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.62));
30843
+ setColor(palette.Switch, "infoDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.62));
30844
+ setColor(palette.Switch, "successDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.62));
30845
+ setColor(palette.Switch, "warningDisabledColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-warning-main") : palette.warning.main, 0.62));
30846
+ setColor(palette.TableCell, "border", colorMix(private_safeLighten, private_safeAlpha(nativeColor ? getCssVar("palette-divider") : palette.divider, 1), 0.88));
30847
+ setColor(palette.Tooltip, "bg", colorMix(private_safeAlpha, nativeColor ? getCssVar("palette-grey-700") : palette.grey[700], 0.92));
30845
30848
  }
30846
30849
  if (palette.mode === "dark") {
30847
- setColor(palette.Alert, "errorColor", colorMix(private_safeLighten, palette.error.light, 0.6));
30848
- setColor(palette.Alert, "infoColor", colorMix(private_safeLighten, palette.info.light, 0.6));
30849
- setColor(palette.Alert, "successColor", colorMix(private_safeLighten, palette.success.light, 0.6));
30850
- setColor(palette.Alert, "warningColor", colorMix(private_safeLighten, palette.warning.light, 0.6));
30850
+ setColor(palette.Alert, "errorColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-error-light") : palette.error.light, 0.6));
30851
+ setColor(palette.Alert, "infoColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-info-light") : palette.info.light, 0.6));
30852
+ setColor(palette.Alert, "successColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-success-light") : palette.success.light, 0.6));
30853
+ setColor(palette.Alert, "warningColor", colorMix(private_safeLighten, nativeColor ? getCssVar("palette-warning-light") : palette.warning.light, 0.6));
30851
30854
  setColor(palette.Alert, "errorFilledBg", setCssVarColor("palette-error-dark"));
30852
30855
  setColor(palette.Alert, "infoFilledBg", setCssVarColor("palette-info-dark"));
30853
30856
  setColor(palette.Alert, "successFilledBg", setCssVarColor("palette-success-dark"));
@@ -30856,10 +30859,10 @@ function createThemeWithVars(options = {}, ...args) {
30856
30859
  setColor(palette.Alert, "infoFilledColor", silent(() => palette.getContrastText(palette.info.dark)));
30857
30860
  setColor(palette.Alert, "successFilledColor", silent(() => palette.getContrastText(palette.success.dark)));
30858
30861
  setColor(palette.Alert, "warningFilledColor", silent(() => palette.getContrastText(palette.warning.dark)));
30859
- setColor(palette.Alert, "errorStandardBg", colorMix(private_safeDarken, palette.error.light, 0.9));
30860
- setColor(palette.Alert, "infoStandardBg", colorMix(private_safeDarken, palette.info.light, 0.9));
30861
- setColor(palette.Alert, "successStandardBg", colorMix(private_safeDarken, palette.success.light, 0.9));
30862
- setColor(palette.Alert, "warningStandardBg", colorMix(private_safeDarken, palette.warning.light, 0.9));
30862
+ setColor(palette.Alert, "errorStandardBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-error-light") : palette.error.light, 0.9));
30863
+ setColor(palette.Alert, "infoStandardBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-info-light") : palette.info.light, 0.9));
30864
+ setColor(palette.Alert, "successStandardBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-success-light") : palette.success.light, 0.9));
30865
+ setColor(palette.Alert, "warningStandardBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-warning-light") : palette.warning.light, 0.9));
30863
30866
  setColor(palette.Alert, "errorIconColor", setCssVarColor("palette-error-main"));
30864
30867
  setColor(palette.Alert, "infoIconColor", setCssVarColor("palette-info-main"));
30865
30868
  setColor(palette.Alert, "successIconColor", setCssVarColor("palette-success-main"));
@@ -30876,20 +30879,20 @@ function createThemeWithVars(options = {}, ...args) {
30876
30879
  setColor(palette.FilledInput, "bg", "rgba(255, 255, 255, 0.09)");
30877
30880
  setColor(palette.FilledInput, "hoverBg", "rgba(255, 255, 255, 0.13)");
30878
30881
  setColor(palette.FilledInput, "disabledBg", "rgba(255, 255, 255, 0.12)");
30879
- setColor(palette.LinearProgress, "primaryBg", colorMix(private_safeDarken, palette.primary.main, 0.5));
30880
- setColor(palette.LinearProgress, "secondaryBg", colorMix(private_safeDarken, palette.secondary.main, 0.5));
30881
- setColor(palette.LinearProgress, "errorBg", colorMix(private_safeDarken, palette.error.main, 0.5));
30882
- setColor(palette.LinearProgress, "infoBg", colorMix(private_safeDarken, palette.info.main, 0.5));
30883
- setColor(palette.LinearProgress, "successBg", colorMix(private_safeDarken, palette.success.main, 0.5));
30884
- setColor(palette.LinearProgress, "warningBg", colorMix(private_safeDarken, palette.warning.main, 0.5));
30885
- setColor(palette.Skeleton, "bg", colorSpace ? colorMix(private_safeAlpha, palette.text.primary, 0.13) : `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.13)`);
30886
- setColor(palette.Slider, "primaryTrack", colorMix(private_safeDarken, palette.primary.main, 0.5));
30887
- setColor(palette.Slider, "secondaryTrack", colorMix(private_safeDarken, palette.secondary.main, 0.5));
30888
- setColor(palette.Slider, "errorTrack", colorMix(private_safeDarken, palette.error.main, 0.5));
30889
- setColor(palette.Slider, "infoTrack", colorMix(private_safeDarken, palette.info.main, 0.5));
30890
- setColor(palette.Slider, "successTrack", colorMix(private_safeDarken, palette.success.main, 0.5));
30891
- setColor(palette.Slider, "warningTrack", colorMix(private_safeDarken, palette.warning.main, 0.5));
30892
- const snackbarContentBackground = colorSpace ? colorMix(private_safeLighten, palette.background.default, 0.985) : private_safeEmphasize(palette.background.default, 0.98);
30882
+ setColor(palette.LinearProgress, "primaryBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.5));
30883
+ setColor(palette.LinearProgress, "secondaryBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.5));
30884
+ setColor(palette.LinearProgress, "errorBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.5));
30885
+ setColor(palette.LinearProgress, "infoBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.5));
30886
+ setColor(palette.LinearProgress, "successBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.5));
30887
+ setColor(palette.LinearProgress, "warningBg", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-warning-main") : palette.warning.main, 0.5));
30888
+ setColor(palette.Skeleton, "bg", colorSpace ? colorMix(private_safeAlpha, nativeColor ? getCssVar("palette-text-primary") : palette.text.primary, 0.13) : `rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.13)`);
30889
+ setColor(palette.Slider, "primaryTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.5));
30890
+ setColor(palette.Slider, "secondaryTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.5));
30891
+ setColor(palette.Slider, "errorTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.5));
30892
+ setColor(palette.Slider, "infoTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.5));
30893
+ setColor(palette.Slider, "successTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.5));
30894
+ setColor(palette.Slider, "warningTrack", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-warning-light") : palette.warning.main, 0.5));
30895
+ const snackbarContentBackground = colorSpace ? colorMix(private_safeLighten, nativeColor ? getCssVar("palette-background-default") : palette.background.default, 0.985) : private_safeEmphasize(palette.background.default, 0.98);
30893
30896
  setColor(palette.SnackbarContent, "bg", snackbarContentBackground);
30894
30897
  setColor(palette.SnackbarContent, "color", silent(() => colorSpace ? light.text.primary : palette.getContrastText(snackbarContentBackground)));
30895
30898
  setColor(palette.SpeedDialAction, "fabHoverBg", private_safeEmphasize(palette.background.paper, 0.15));
@@ -30897,23 +30900,25 @@ function createThemeWithVars(options = {}, ...args) {
30897
30900
  setColor(palette.StepContent, "border", setCssVarColor("palette-grey-600"));
30898
30901
  setColor(palette.Switch, "defaultColor", setCssVarColor("palette-grey-300"));
30899
30902
  setColor(palette.Switch, "defaultDisabledColor", setCssVarColor("palette-grey-600"));
30900
- setColor(palette.Switch, "primaryDisabledColor", colorMix(private_safeDarken, palette.primary.main, 0.55));
30901
- setColor(palette.Switch, "secondaryDisabledColor", colorMix(private_safeDarken, palette.secondary.main, 0.55));
30902
- setColor(palette.Switch, "errorDisabledColor", colorMix(private_safeDarken, palette.error.main, 0.55));
30903
- setColor(palette.Switch, "infoDisabledColor", colorMix(private_safeDarken, palette.info.main, 0.55));
30904
- setColor(palette.Switch, "successDisabledColor", colorMix(private_safeDarken, palette.success.main, 0.55));
30905
- setColor(palette.Switch, "warningDisabledColor", colorMix(private_safeDarken, palette.warning.main, 0.55));
30906
- setColor(palette.TableCell, "border", colorMix(private_safeDarken, colorMix(private_safeAlpha, palette.divider, 1), 0.68));
30907
- setColor(palette.Tooltip, "bg", colorMix(private_safeAlpha, palette.grey[700], 0.92));
30908
- }
30909
- setColorChannel(palette.background, "default");
30910
- setColorChannel(palette.background, "paper");
30911
- setColorChannel(palette.common, "background");
30912
- setColorChannel(palette.common, "onBackground");
30913
- setColorChannel(palette, "divider");
30903
+ setColor(palette.Switch, "primaryDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-primary-main") : palette.primary.main, 0.55));
30904
+ setColor(palette.Switch, "secondaryDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-secondary-main") : palette.secondary.main, 0.55));
30905
+ setColor(palette.Switch, "errorDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-error-main") : palette.error.main, 0.55));
30906
+ setColor(palette.Switch, "infoDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-info-main") : palette.info.main, 0.55));
30907
+ setColor(palette.Switch, "successDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-success-main") : palette.success.main, 0.55));
30908
+ setColor(palette.Switch, "warningDisabledColor", colorMix(private_safeDarken, nativeColor ? getCssVar("palette-warning-light") : palette.warning.main, 0.55));
30909
+ setColor(palette.TableCell, "border", colorMix(private_safeDarken, private_safeAlpha(nativeColor ? getCssVar("palette-divider") : palette.divider, 1), 0.68));
30910
+ setColor(palette.Tooltip, "bg", colorMix(private_safeAlpha, nativeColor ? getCssVar("palette-grey-700") : palette.grey[700], 0.92));
30911
+ }
30912
+ if (!nativeColor) {
30913
+ setColorChannel(palette.background, "default");
30914
+ setColorChannel(palette.background, "paper");
30915
+ setColorChannel(palette.common, "background");
30916
+ setColorChannel(palette.common, "onBackground");
30917
+ setColorChannel(palette, "divider");
30918
+ }
30914
30919
  Object.keys(palette).forEach((color2) => {
30915
30920
  const colors = palette[color2];
30916
- if (color2 !== "tonalOffset" && colors && typeof colors === "object") {
30921
+ if (color2 !== "tonalOffset" && !nativeColor && colors && typeof colors === "object") {
30917
30922
  if (colors.main) {
30918
30923
  setColor(palette[color2], "mainChannel", private_safeColorChannel(toRgb(colors.main)));
30919
30924
  }
@@ -34175,15 +34180,8 @@ const transferDateSectionValue = (adapter, section, dateToTransferFrom, dateToTr
34175
34180
  return adapter.setDate(dateToTransferTo, adapter.getDate(dateToTransferFrom));
34176
34181
  }
34177
34182
  case "meridiem": {
34178
- const isAM = adapter.getHours(dateToTransferFrom) < 12;
34179
- const mergedDateHours = adapter.getHours(dateToTransferTo);
34180
- if (isAM && mergedDateHours >= 12) {
34181
- return adapter.addHours(dateToTransferTo, -12);
34182
- }
34183
- if (!isAM && mergedDateHours < 12) {
34184
- return adapter.addHours(dateToTransferTo, 12);
34185
- }
34186
- return dateToTransferTo;
34183
+ const meridiem = adapter.getHours(dateToTransferFrom) < 12 ? "am" : "pm";
34184
+ return convertToMeridiem(dateToTransferTo, meridiem, true, adapter);
34187
34185
  }
34188
34186
  case "hours": {
34189
34187
  return adapter.setHours(dateToTransferTo, adapter.getHours(dateToTransferFrom));
@@ -36914,6 +36912,26 @@ TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
36914
36912
  } : {};
36915
36913
  TransitionGroup.defaultProps = defaultProps;
36916
36914
  const reflow = (node) => node.scrollTop;
36915
+ function normalizedTransitionCallback(nodeRef, callback) {
36916
+ return (maybeIsAppearing) => {
36917
+ if (callback) {
36918
+ const node = nodeRef.current;
36919
+ if (maybeIsAppearing === void 0) {
36920
+ callback(node);
36921
+ } else {
36922
+ callback(node, maybeIsAppearing);
36923
+ }
36924
+ }
36925
+ };
36926
+ }
36927
+ function getTransitionChildStyle(state, inProp, baseStyles, hiddenStyles2, styleProp, childStyle) {
36928
+ const base = state === "exited" && !inProp ? hiddenStyles2 : baseStyles[state] || baseStyles.exited;
36929
+ return styleProp || childStyle ? {
36930
+ ...base,
36931
+ ...styleProp,
36932
+ ...childStyle
36933
+ } : base;
36934
+ }
36917
36935
  function getTransitionProps(props, options) {
36918
36936
  const {
36919
36937
  timeout: timeout2,
@@ -36937,9 +36955,21 @@ const styles$3 = {
36937
36955
  entered: {
36938
36956
  opacity: 1,
36939
36957
  transform: "none"
36958
+ },
36959
+ exiting: {
36960
+ opacity: 0,
36961
+ transform: getScale(0.75)
36962
+ },
36963
+ exited: {
36964
+ opacity: 0,
36965
+ transform: getScale(0.75)
36940
36966
  }
36941
36967
  };
36942
- const isWebKit154 = typeof navigator !== "undefined" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
36968
+ const hiddenStyles$1 = {
36969
+ opacity: 0,
36970
+ transform: getScale(0.75),
36971
+ visibility: "hidden"
36972
+ };
36943
36973
  const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, ref) {
36944
36974
  const {
36945
36975
  addEndListener,
@@ -36955,8 +36985,6 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
36955
36985
  onExiting,
36956
36986
  style: style2,
36957
36987
  timeout: timeout2 = "auto",
36958
- // eslint-disable-next-line react/prop-types
36959
- TransitionComponent = Transition,
36960
36988
  ...other
36961
36989
  } = props;
36962
36990
  const timer = useTimeout();
@@ -36964,18 +36992,8 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
36964
36992
  const theme = useTheme();
36965
36993
  const nodeRef = React__namespace.useRef(null);
36966
36994
  const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
36967
- const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
36968
- if (callback) {
36969
- const node = nodeRef.current;
36970
- if (maybeIsAppearing === void 0) {
36971
- callback(node);
36972
- } else {
36973
- callback(node, maybeIsAppearing);
36974
- }
36975
- }
36976
- };
36977
- const handleEntering = normalizedTransitionCallback(onEntering);
36978
- const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
36995
+ const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);
36996
+ const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {
36979
36997
  reflow(node);
36980
36998
  const {
36981
36999
  duration: transitionDuration,
@@ -36999,7 +37017,7 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
36999
37017
  duration: duration2,
37000
37018
  delay
37001
37019
  }), theme.transitions.create("transform", {
37002
- duration: isWebKit154 ? duration2 : duration2 * 0.666,
37020
+ duration: duration2 * 0.666,
37003
37021
  delay,
37004
37022
  easing: transitionTimingFunction
37005
37023
  })].join(",");
@@ -37007,9 +37025,9 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
37007
37025
  onEnter(node, isAppearing);
37008
37026
  }
37009
37027
  });
37010
- const handleEntered = normalizedTransitionCallback(onEntered);
37011
- const handleExiting = normalizedTransitionCallback(onExiting);
37012
- const handleExit = normalizedTransitionCallback((node) => {
37028
+ const handleEntered = normalizedTransitionCallback(nodeRef, onEntered);
37029
+ const handleExiting = normalizedTransitionCallback(nodeRef, onExiting);
37030
+ const handleExit = normalizedTransitionCallback(nodeRef, (node) => {
37013
37031
  const {
37014
37032
  duration: transitionDuration,
37015
37033
  delay,
@@ -37032,8 +37050,8 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
37032
37050
  duration: duration2,
37033
37051
  delay
37034
37052
  }), theme.transitions.create("transform", {
37035
- duration: isWebKit154 ? duration2 : duration2 * 0.666,
37036
- delay: isWebKit154 ? delay : delay || duration2 * 0.333,
37053
+ duration: duration2 * 0.666,
37054
+ delay: delay || duration2 * 0.333,
37037
37055
  easing: transitionTimingFunction
37038
37056
  })].join(",");
37039
37057
  node.style.opacity = 0;
@@ -37042,7 +37060,12 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
37042
37060
  onExit(node);
37043
37061
  }
37044
37062
  });
37045
- const handleExited = normalizedTransitionCallback(onExited);
37063
+ const handleExited = normalizedTransitionCallback(nodeRef, (node) => {
37064
+ node.style.transition = "";
37065
+ if (onExited) {
37066
+ onExited(node);
37067
+ }
37068
+ });
37046
37069
  const handleAddEndListener = (next) => {
37047
37070
  if (timeout2 === "auto") {
37048
37071
  timer.start(autoTimeout.current || 0, next);
@@ -37051,7 +37074,7 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
37051
37074
  addEndListener(nodeRef.current, next);
37052
37075
  }
37053
37076
  };
37054
- return /* @__PURE__ */ jsxRuntime.jsx(TransitionComponent, {
37077
+ return /* @__PURE__ */ jsxRuntime.jsx(Transition, {
37055
37078
  appear,
37056
37079
  in: inProp,
37057
37080
  nodeRef,
@@ -37068,15 +37091,9 @@ const Grow = /* @__PURE__ */ React__namespace.forwardRef(function Grow2(props, r
37068
37091
  ownerState,
37069
37092
  ...restChildProps
37070
37093
  }) => {
37094
+ const childStyle = getTransitionChildStyle(state, inProp, styles$3, hiddenStyles$1, style2, children.props.style);
37071
37095
  return /* @__PURE__ */ React__namespace.cloneElement(children, {
37072
- style: {
37073
- opacity: 0,
37074
- transform: getScale(0.75),
37075
- visibility: state === "exited" && !inProp ? "hidden" : void 0,
37076
- ...styles$3[state],
37077
- ...style2,
37078
- ...children.props.style
37079
- },
37096
+ style: childStyle,
37080
37097
  ref: handleRef,
37081
37098
  ...restChildProps
37082
37099
  });
@@ -37166,8 +37183,18 @@ const styles$2 = {
37166
37183
  },
37167
37184
  entered: {
37168
37185
  opacity: 1
37186
+ },
37187
+ exiting: {
37188
+ opacity: 0
37189
+ },
37190
+ exited: {
37191
+ opacity: 0
37169
37192
  }
37170
37193
  };
37194
+ const hiddenStyles = {
37195
+ opacity: 0,
37196
+ visibility: "hidden"
37197
+ };
37171
37198
  const Fade = /* @__PURE__ */ React__namespace.forwardRef(function Fade2(props, ref) {
37172
37199
  const theme = useTheme();
37173
37200
  const defaultTimeout = {
@@ -37188,24 +37215,12 @@ const Fade = /* @__PURE__ */ React__namespace.forwardRef(function Fade2(props, r
37188
37215
  onExiting,
37189
37216
  style: style2,
37190
37217
  timeout: timeout2 = defaultTimeout,
37191
- // eslint-disable-next-line react/prop-types
37192
- TransitionComponent = Transition,
37193
37218
  ...other
37194
37219
  } = props;
37195
37220
  const nodeRef = React__namespace.useRef(null);
37196
37221
  const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref);
37197
- const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
37198
- if (callback) {
37199
- const node = nodeRef.current;
37200
- if (maybeIsAppearing === void 0) {
37201
- callback(node);
37202
- } else {
37203
- callback(node, maybeIsAppearing);
37204
- }
37205
- }
37206
- };
37207
- const handleEntering = normalizedTransitionCallback(onEntering);
37208
- const handleEnter = normalizedTransitionCallback((node, isAppearing) => {
37222
+ const handleEntering = normalizedTransitionCallback(nodeRef, onEntering);
37223
+ const handleEnter = normalizedTransitionCallback(nodeRef, (node, isAppearing) => {
37209
37224
  reflow(node);
37210
37225
  const transitionProps = getTransitionProps({
37211
37226
  style: style2,
@@ -37214,15 +37229,14 @@ const Fade = /* @__PURE__ */ React__namespace.forwardRef(function Fade2(props, r
37214
37229
  }, {
37215
37230
  mode: "enter"
37216
37231
  });
37217
- node.style.webkitTransition = theme.transitions.create("opacity", transitionProps);
37218
37232
  node.style.transition = theme.transitions.create("opacity", transitionProps);
37219
37233
  if (onEnter) {
37220
37234
  onEnter(node, isAppearing);
37221
37235
  }
37222
37236
  });
37223
- const handleEntered = normalizedTransitionCallback(onEntered);
37224
- const handleExiting = normalizedTransitionCallback(onExiting);
37225
- const handleExit = normalizedTransitionCallback((node) => {
37237
+ const handleEntered = normalizedTransitionCallback(nodeRef, onEntered);
37238
+ const handleExiting = normalizedTransitionCallback(nodeRef, onExiting);
37239
+ const handleExit = normalizedTransitionCallback(nodeRef, (node) => {
37226
37240
  const transitionProps = getTransitionProps({
37227
37241
  style: style2,
37228
37242
  timeout: timeout2,
@@ -37230,19 +37244,23 @@ const Fade = /* @__PURE__ */ React__namespace.forwardRef(function Fade2(props, r
37230
37244
  }, {
37231
37245
  mode: "exit"
37232
37246
  });
37233
- node.style.webkitTransition = theme.transitions.create("opacity", transitionProps);
37234
37247
  node.style.transition = theme.transitions.create("opacity", transitionProps);
37235
37248
  if (onExit) {
37236
37249
  onExit(node);
37237
37250
  }
37238
37251
  });
37239
- const handleExited = normalizedTransitionCallback(onExited);
37252
+ const handleExited = normalizedTransitionCallback(nodeRef, (node) => {
37253
+ node.style.transition = "";
37254
+ if (onExited) {
37255
+ onExited(node);
37256
+ }
37257
+ });
37240
37258
  const handleAddEndListener = (next) => {
37241
37259
  if (addEndListener) {
37242
37260
  addEndListener(nodeRef.current, next);
37243
37261
  }
37244
37262
  };
37245
- return /* @__PURE__ */ jsxRuntime.jsx(TransitionComponent, {
37263
+ return /* @__PURE__ */ jsxRuntime.jsx(Transition, {
37246
37264
  appear,
37247
37265
  in: inProp,
37248
37266
  nodeRef,
@@ -37259,14 +37277,9 @@ const Fade = /* @__PURE__ */ React__namespace.forwardRef(function Fade2(props, r
37259
37277
  ownerState,
37260
37278
  ...restChildProps
37261
37279
  }) => {
37280
+ const childStyle = getTransitionChildStyle(state, inProp, styles$2, hiddenStyles, style2, children.props.style);
37262
37281
  return /* @__PURE__ */ React__namespace.cloneElement(children, {
37263
- style: {
37264
- opacity: 0,
37265
- visibility: state === "exited" && !inProp ? "hidden" : void 0,
37266
- ...styles$2[state],
37267
- ...style2,
37268
- ...children.props.style
37269
- },
37282
+ style: childStyle,
37270
37283
  ref: handleRef,
37271
37284
  ...restChildProps
37272
37285
  });
@@ -37624,7 +37637,7 @@ function isShadowRoot(node) {
37624
37637
  var OwnElement = getWindow(node).ShadowRoot;
37625
37638
  return node instanceof OwnElement || node instanceof ShadowRoot;
37626
37639
  }
37627
- function applyStyles(_ref) {
37640
+ function applyStyles$1(_ref) {
37628
37641
  var state = _ref.state;
37629
37642
  Object.keys(state.elements).forEach(function(name) {
37630
37643
  var style2 = state.styles[name] || {};
@@ -37682,11 +37695,11 @@ function effect$2(_ref2) {
37682
37695
  });
37683
37696
  };
37684
37697
  }
37685
- const applyStyles$1 = {
37698
+ const applyStyles = {
37686
37699
  name: "applyStyles",
37687
37700
  enabled: true,
37688
37701
  phase: "write",
37689
- fn: applyStyles,
37702
+ fn: applyStyles$1,
37690
37703
  effect: effect$2,
37691
37704
  requires: ["computeStyles"]
37692
37705
  };
@@ -37756,7 +37769,7 @@ function getLayoutRect(element) {
37756
37769
  height: height2
37757
37770
  };
37758
37771
  }
37759
- function contains(parent, child) {
37772
+ function contains$1(parent, child) {
37760
37773
  var rootNode = child.getRootNode && child.getRootNode();
37761
37774
  if (parent.contains(child)) {
37762
37775
  return true;
@@ -37872,7 +37885,7 @@ var toPaddingObject = function toPaddingObject2(padding2, state) {
37872
37885
  })) : padding2;
37873
37886
  return mergePaddingObject(typeof padding2 !== "number" ? padding2 : expandToHashMap(padding2, basePlacements));
37874
37887
  };
37875
- function arrow(_ref) {
37888
+ function arrow$1(_ref) {
37876
37889
  var _state$modifiersData$;
37877
37890
  var state = _ref.state, name = _ref.name, options = _ref.options;
37878
37891
  var arrowElement = state.elements.arrow;
@@ -37912,16 +37925,16 @@ function effect$1(_ref2) {
37912
37925
  return;
37913
37926
  }
37914
37927
  }
37915
- if (!contains(state.elements.popper, arrowElement)) {
37928
+ if (!contains$1(state.elements.popper, arrowElement)) {
37916
37929
  return;
37917
37930
  }
37918
37931
  state.elements.arrow = arrowElement;
37919
37932
  }
37920
- const arrow$1 = {
37933
+ const arrow = {
37921
37934
  name: "arrow",
37922
37935
  enabled: true,
37923
37936
  phase: "main",
37924
- fn: arrow,
37937
+ fn: arrow$1,
37925
37938
  effect: effect$1,
37926
37939
  requires: ["popperOffsets"],
37927
37940
  requiresIfExists: ["preventOverflow"]
@@ -38010,7 +38023,7 @@ function mapToStyles(_ref2) {
38010
38023
  }
38011
38024
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
38012
38025
  }
38013
- function computeStyles(_ref5) {
38026
+ function computeStyles$1(_ref5) {
38014
38027
  var state = _ref5.state, options = _ref5.options;
38015
38028
  var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
38016
38029
  var commonStyles = {
@@ -38041,11 +38054,11 @@ function computeStyles(_ref5) {
38041
38054
  "data-popper-placement": state.placement
38042
38055
  });
38043
38056
  }
38044
- const computeStyles$1 = {
38057
+ const computeStyles = {
38045
38058
  name: "computeStyles",
38046
38059
  enabled: true,
38047
38060
  phase: "beforeWrite",
38048
- fn: computeStyles,
38061
+ fn: computeStyles$1,
38049
38062
  data: {}
38050
38063
  };
38051
38064
  var passive = {
@@ -38218,7 +38231,7 @@ function getClippingParents(element) {
38218
38231
  return [];
38219
38232
  }
38220
38233
  return clippingParents2.filter(function(clippingParent) {
38221
- return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
38234
+ return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
38222
38235
  });
38223
38236
  }
38224
38237
  function getClippingRect(element, boundary, rootBoundary, strategy) {
@@ -38361,7 +38374,7 @@ function getExpandedFallbackPlacements(placement) {
38361
38374
  var oppositePlacement = getOppositePlacement(placement);
38362
38375
  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
38363
38376
  }
38364
- function flip(_ref) {
38377
+ function flip$1(_ref) {
38365
38378
  var state = _ref.state, options = _ref.options, name = _ref.name;
38366
38379
  if (state.modifiersData[name]._skip) {
38367
38380
  return;
@@ -38447,11 +38460,11 @@ function flip(_ref) {
38447
38460
  state.reset = true;
38448
38461
  }
38449
38462
  }
38450
- const flip$1 = {
38463
+ const flip = {
38451
38464
  name: "flip",
38452
38465
  enabled: true,
38453
38466
  phase: "main",
38454
- fn: flip,
38467
+ fn: flip$1,
38455
38468
  requiresIfExists: ["offset"],
38456
38469
  data: {
38457
38470
  _skip: false
@@ -38476,7 +38489,7 @@ function isAnySideFullyClipped(overflow) {
38476
38489
  return overflow[side] >= 0;
38477
38490
  });
38478
38491
  }
38479
- function hide(_ref) {
38492
+ function hide$1(_ref) {
38480
38493
  var state = _ref.state, name = _ref.name;
38481
38494
  var referenceRect = state.rects.reference;
38482
38495
  var popperRect = state.rects.popper;
@@ -38502,12 +38515,12 @@ function hide(_ref) {
38502
38515
  "data-popper-escaped": hasPopperEscaped
38503
38516
  });
38504
38517
  }
38505
- const hide$1 = {
38518
+ const hide = {
38506
38519
  name: "hide",
38507
38520
  enabled: true,
38508
38521
  phase: "main",
38509
38522
  requiresIfExists: ["preventOverflow"],
38510
- fn: hide
38523
+ fn: hide$1
38511
38524
  };
38512
38525
  function distanceAndSkiddingToXY(placement, rects, offset2) {
38513
38526
  var basePlacement = getBasePlacement(placement);
@@ -38525,7 +38538,7 @@ function distanceAndSkiddingToXY(placement, rects, offset2) {
38525
38538
  y: distance
38526
38539
  };
38527
38540
  }
38528
- function offset(_ref2) {
38541
+ function offset$1(_ref2) {
38529
38542
  var state = _ref2.state, options = _ref2.options, name = _ref2.name;
38530
38543
  var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
38531
38544
  var data = placements.reduce(function(acc, placement) {
@@ -38539,14 +38552,14 @@ function offset(_ref2) {
38539
38552
  }
38540
38553
  state.modifiersData[name] = data;
38541
38554
  }
38542
- const offset$1 = {
38555
+ const offset = {
38543
38556
  name: "offset",
38544
38557
  enabled: true,
38545
38558
  phase: "main",
38546
38559
  requires: ["popperOffsets"],
38547
- fn: offset
38560
+ fn: offset$1
38548
38561
  };
38549
- function popperOffsets(_ref) {
38562
+ function popperOffsets$1(_ref) {
38550
38563
  var state = _ref.state, name = _ref.name;
38551
38564
  state.modifiersData[name] = computeOffsets({
38552
38565
  reference: state.rects.reference,
@@ -38554,17 +38567,17 @@ function popperOffsets(_ref) {
38554
38567
  placement: state.placement
38555
38568
  });
38556
38569
  }
38557
- const popperOffsets$1 = {
38570
+ const popperOffsets = {
38558
38571
  name: "popperOffsets",
38559
38572
  enabled: true,
38560
38573
  phase: "read",
38561
- fn: popperOffsets,
38574
+ fn: popperOffsets$1,
38562
38575
  data: {}
38563
38576
  };
38564
38577
  function getAltAxis(axis) {
38565
38578
  return axis === "x" ? "y" : "x";
38566
38579
  }
38567
- function preventOverflow(_ref) {
38580
+ function preventOverflow$1(_ref) {
38568
38581
  var state = _ref.state, options = _ref.options, name = _ref.name;
38569
38582
  var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding2 = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
38570
38583
  var overflow = detectOverflow(state, {
@@ -38648,11 +38661,11 @@ function preventOverflow(_ref) {
38648
38661
  }
38649
38662
  state.modifiersData[name] = data;
38650
38663
  }
38651
- const preventOverflow$1 = {
38664
+ const preventOverflow = {
38652
38665
  name: "preventOverflow",
38653
38666
  enabled: true,
38654
38667
  phase: "main",
38655
- fn: preventOverflow,
38668
+ fn: preventOverflow$1,
38656
38669
  requiresIfExists: ["offset"]
38657
38670
  };
38658
38671
  function getHTMLElementScroll(element) {
@@ -38910,10 +38923,15 @@ function popperGenerator(generatorOptions) {
38910
38923
  return instance;
38911
38924
  };
38912
38925
  }
38913
- var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
38926
+ var defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];
38914
38927
  var createPopper = /* @__PURE__ */ popperGenerator({
38915
38928
  defaultModifiers
38916
38929
  });
38930
+ function isLayoutSupported() {
38931
+ return !(/jsdom|HappyDOM/.test(window.navigator.userAgent) || // TODO(v9): Remove the test environment check
38932
+ // eslint-disable-next-line mui/consistent-production-guard
38933
+ process.env.NODE_ENV === "test");
38934
+ }
38917
38935
  function setRef(ref, value) {
38918
38936
  if (typeof ref === "function") {
38919
38937
  ref(value);
@@ -39077,7 +39095,7 @@ const PopperTooltip = /* @__PURE__ */ React__namespace.forwardRef(function Poppe
39077
39095
  if (process.env.NODE_ENV !== "production") {
39078
39096
  if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {
39079
39097
  const box = resolvedAnchorElement.getBoundingClientRect();
39080
- if (process.env.NODE_ENV !== "test" && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
39098
+ if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
39081
39099
  console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
39082
39100
  }
39083
39101
  }
@@ -39114,8 +39132,24 @@ const PopperTooltip = /* @__PURE__ */ React__namespace.forwardRef(function Poppe
39114
39132
  modifiers: popperModifiers
39115
39133
  });
39116
39134
  handlePopperRefRef.current(popper2);
39135
+ const popperElement = tooltipRef.current;
39117
39136
  return () => {
39118
- popper2.destroy();
39137
+ if (popperElement) {
39138
+ const {
39139
+ style: style2
39140
+ } = popperElement;
39141
+ const position = style2.position;
39142
+ const top2 = style2.top;
39143
+ const left2 = style2.left;
39144
+ const transform = style2.transform;
39145
+ popper2.destroy();
39146
+ style2.position = position;
39147
+ style2.top = top2;
39148
+ style2.left = left2;
39149
+ style2.transform = transform;
39150
+ } else {
39151
+ popper2.destroy();
39152
+ }
39119
39153
  handlePopperRefRef.current(null);
39120
39154
  };
39121
39155
  }, [resolvedAnchorElement, disablePortal, modifiers, open2, popperOptions, rtlPlacement]);
@@ -39231,8 +39265,10 @@ process.env.NODE_ENV !== "production" ? Popper$1.propTypes = {
39231
39265
  const resolvedAnchorEl = resolveAnchorEl$1(props.anchorEl);
39232
39266
  if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {
39233
39267
  const box = resolvedAnchorEl.getBoundingClientRect();
39234
- if (process.env.NODE_ENV !== "test" && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
39235
- return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
39268
+ if (process.env.NODE_ENV !== "production") {
39269
+ if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
39270
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
39271
+ }
39236
39272
  }
39237
39273
  } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== "function" || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {
39238
39274
  return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join("\n"));
@@ -39520,6 +39556,41 @@ process.env.NODE_ENV !== "production" ? Popper2.propTypes = {
39520
39556
  */
39521
39557
  transition: PropTypes.bool
39522
39558
  } : void 0;
39559
+ function contains(parent, child) {
39560
+ var _a;
39561
+ if (!parent || !child) {
39562
+ return false;
39563
+ }
39564
+ if (parent.contains(child)) {
39565
+ return true;
39566
+ }
39567
+ const rootNode = (_a = child.getRootNode) == null ? void 0 : _a.call(child);
39568
+ if (rootNode && rootNode instanceof ShadowRoot) {
39569
+ let next = child;
39570
+ while (next) {
39571
+ if (parent === next) {
39572
+ return true;
39573
+ }
39574
+ next = next.parentNode ?? next.host ?? null;
39575
+ }
39576
+ }
39577
+ return false;
39578
+ }
39579
+ function activeElement(doc) {
39580
+ var _a;
39581
+ let element = doc.activeElement;
39582
+ while (((_a = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a.activeElement) != null) {
39583
+ element = element.shadowRoot.activeElement;
39584
+ }
39585
+ return element;
39586
+ }
39587
+ const FOCUSABLE_ATTRIBUTE = "data-mui-focusable";
39588
+ function getFocusTarget(rootElement) {
39589
+ if (!rootElement) {
39590
+ return null;
39591
+ }
39592
+ return rootElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? rootElement : rootElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`);
39593
+ }
39523
39594
  const candidatesSelector = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
39524
39595
  function getTabIndex(node) {
39525
39596
  const tabindexAttr = parseInt(node.getAttribute("tabindex") || "", 10);
@@ -39600,19 +39671,22 @@ function FocusTrap(props) {
39600
39671
  activated.current = !disableAutoFocus;
39601
39672
  }, [disableAutoFocus, open2]);
39602
39673
  React__namespace.useEffect(() => {
39674
+ ignoreNextEnforceFocus.current = false;
39603
39675
  if (!open2 || !rootRef.current) {
39604
39676
  return;
39605
39677
  }
39606
39678
  const doc = ownerDocument(rootRef.current);
39607
- if (!rootRef.current.contains(doc.activeElement)) {
39608
- if (!rootRef.current.hasAttribute("tabIndex")) {
39679
+ const activeElement$1 = activeElement(doc);
39680
+ const focusTarget = getFocusTarget(rootRef.current) ?? rootRef.current;
39681
+ if (!contains(rootRef.current, activeElement$1)) {
39682
+ if (!focusTarget.hasAttribute("tabIndex")) {
39609
39683
  if (process.env.NODE_ENV !== "production") {
39610
39684
  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"));
39611
39685
  }
39612
- rootRef.current.setAttribute("tabIndex", "-1");
39686
+ focusTarget.setAttribute("tabIndex", "-1");
39613
39687
  }
39614
39688
  if (activated.current) {
39615
- rootRef.current.focus();
39689
+ focusTarget.focus();
39616
39690
  }
39617
39691
  }
39618
39692
  return () => {
@@ -39635,7 +39709,8 @@ function FocusTrap(props) {
39635
39709
  if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== "Tab") {
39636
39710
  return;
39637
39711
  }
39638
- if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {
39712
+ const activeElement$1 = activeElement(doc);
39713
+ if (activeElement$1 === rootRef.current && nativeEvent.shiftKey) {
39639
39714
  ignoreNextEnforceFocus.current = true;
39640
39715
  if (sentinelEnd.current) {
39641
39716
  sentinelEnd.current.focus();
@@ -39648,17 +39723,18 @@ function FocusTrap(props) {
39648
39723
  if (rootElement === null) {
39649
39724
  return;
39650
39725
  }
39726
+ const activeEl = activeElement(doc);
39651
39727
  if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
39652
39728
  ignoreNextEnforceFocus.current = false;
39653
39729
  return;
39654
39730
  }
39655
- if (rootElement.contains(doc.activeElement)) {
39731
+ if (contains(rootElement, activeEl)) {
39656
39732
  return;
39657
39733
  }
39658
- if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
39734
+ if (disableEnforceFocus && activeEl !== sentinelStart.current && activeEl !== sentinelEnd.current) {
39659
39735
  return;
39660
39736
  }
39661
- if (doc.activeElement !== reactFocusEventTarget.current) {
39737
+ if (activeEl !== reactFocusEventTarget.current) {
39662
39738
  reactFocusEventTarget.current = null;
39663
39739
  } else if (reactFocusEventTarget.current !== null) {
39664
39740
  return;
@@ -39667,7 +39743,7 @@ function FocusTrap(props) {
39667
39743
  return;
39668
39744
  }
39669
39745
  let tabbable = [];
39670
- if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
39746
+ if (activeEl === sentinelStart.current || activeEl === sentinelEnd.current) {
39671
39747
  tabbable = getTabbable(rootRef.current);
39672
39748
  }
39673
39749
  if (tabbable.length > 0) {
@@ -39688,7 +39764,8 @@ function FocusTrap(props) {
39688
39764
  doc.addEventListener("focusin", contain);
39689
39765
  doc.addEventListener("keydown", loopFocus, true);
39690
39766
  const interval = setInterval(() => {
39691
- if (doc.activeElement && doc.activeElement.tagName === "BODY") {
39767
+ const activeEl = activeElement(doc);
39768
+ if (activeEl && activeEl.tagName === "BODY") {
39692
39769
  contain();
39693
39770
  }
39694
39771
  }, 50);
@@ -41264,7 +41341,7 @@ function isClassComponent(elementType) {
41264
41341
  } = elementType;
41265
41342
  return Boolean(prototype.isReactComponent);
41266
41343
  }
41267
- function elementTypeAcceptingRef(props, propName, componentName, location2, propFullName) {
41344
+ function elementTypeAcceptingRef$1(props, propName, componentName, location2, propFullName) {
41268
41345
  const propValue = props[propName];
41269
41346
  const safePropName = propFullName || propName;
41270
41347
  if (propValue == null || // When server-side rendering React doesn't warn either.
@@ -41278,12 +41355,15 @@ function elementTypeAcceptingRef(props, propName, componentName, location2, prop
41278
41355
  if (typeof propValue === "function" && !isClassComponent(propValue)) {
41279
41356
  warningHint = "Did you accidentally provide a plain function component instead?";
41280
41357
  }
41358
+ if (propValue === React__namespace.Fragment) {
41359
+ warningHint = "Did you accidentally provide a React.Fragment instead?";
41360
+ }
41281
41361
  if (warningHint !== void 0) {
41282
- return new Error(`Invalid ${location2} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://mui.com/r/caveat-with-refs-guide`);
41362
+ return new Error(`Invalid ${location2} \`${safePropName}\` supplied to \`${componentName}\`. Expected an element type that can hold a ref. ${warningHint} For more information see https://v7.mui.com/r/caveat-with-refs-guide`);
41283
41363
  }
41284
41364
  return null;
41285
41365
  }
41286
- const elementTypeAcceptingRef$1 = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);
41366
+ const elementTypeAcceptingRef = chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef$1);
41287
41367
  function isFocusVisible(element) {
41288
41368
  try {
41289
41369
  return element.matches(":focus-visible");
@@ -41888,7 +41968,13 @@ const ButtonBase = /* @__PURE__ */ React__namespace.forwardRef(function ButtonBa
41888
41968
  });
41889
41969
  const isNonNativeButton = () => {
41890
41970
  const button = buttonRef.current;
41891
- return component && component !== "button" && !(button.tagName === "A" && button.href);
41971
+ if (!button) {
41972
+ return component && component !== "button";
41973
+ }
41974
+ if (button.tagName === "BUTTON") {
41975
+ return false;
41976
+ }
41977
+ return !(button.tagName === "A" && button.href);
41892
41978
  };
41893
41979
  const handleKeyDown = useEventCallback((event) => {
41894
41980
  if (focusRipple && !event.repeat && focusVisible && event.key === " ") {
@@ -41918,7 +42004,7 @@ const ButtonBase = /* @__PURE__ */ React__namespace.forwardRef(function ButtonBa
41918
42004
  if (onKeyUp) {
41919
42005
  onKeyUp(event);
41920
42006
  }
41921
- if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === " " && !event.defaultPrevented) {
42007
+ if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === " " && !event.defaultPrevented && !disabled) {
41922
42008
  onClick(event);
41923
42009
  }
41924
42010
  });
@@ -41928,7 +42014,8 @@ const ButtonBase = /* @__PURE__ */ React__namespace.forwardRef(function ButtonBa
41928
42014
  }
41929
42015
  const buttonProps = {};
41930
42016
  if (ComponentProp === "button") {
41931
- buttonProps.type = type === void 0 ? "button" : type;
42017
+ const hasFormAttributes = !!other.formAction;
42018
+ buttonProps.type = type === void 0 && !hasFormAttributes ? "button" : type;
41932
42019
  buttonProps.disabled = disabled;
41933
42020
  } else {
41934
42021
  if (!other.href && !other.to) {
@@ -42023,7 +42110,7 @@ process.env.NODE_ENV !== "production" ? ButtonBase.propTypes = {
42023
42110
  * The component used for the root node.
42024
42111
  * Either a string to use a HTML element or a component.
42025
42112
  */
42026
- component: elementTypeAcceptingRef$1,
42113
+ component: elementTypeAcceptingRef,
42027
42114
  /**
42028
42115
  * If `true`, the component is disabled.
42029
42116
  * @default false
@@ -42056,6 +42143,10 @@ process.env.NODE_ENV !== "production" ? ButtonBase.propTypes = {
42056
42143
  * if needed.
42057
42144
  */
42058
42145
  focusVisibleClassName: PropTypes.string,
42146
+ /**
42147
+ * @ignore
42148
+ */
42149
+ formAction: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
42059
42150
  /**
42060
42151
  * @ignore
42061
42152
  */
@@ -42535,6 +42626,17 @@ const ButtonRoot = styled(ButtonBase, {
42535
42626
  color: (theme.vars || theme).palette.action.disabled
42536
42627
  },
42537
42628
  variants: [{
42629
+ props: ({
42630
+ ownerState
42631
+ }) => ownerState.startIcon || ownerState.loading && ownerState.loadingPosition === "start",
42632
+ style: {
42633
+ "&::before": {
42634
+ content: '"\\200b"',
42635
+ width: 0,
42636
+ overflow: "hidden"
42637
+ }
42638
+ }
42639
+ }, {
42538
42640
  props: {
42539
42641
  variant: "contained"
42540
42642
  },
@@ -42983,6 +43085,10 @@ const Button = /* @__PURE__ */ React__namespace.forwardRef(function Button2(inPr
42983
43085
  })
42984
43086
  })
42985
43087
  ) : null;
43088
+ const {
43089
+ root,
43090
+ ...forwardedClasses
43091
+ } = classes;
42986
43092
  return /* @__PURE__ */ jsxRuntime.jsxs(ButtonRoot, {
42987
43093
  ownerState,
42988
43094
  className: clsx(contextProps.className, classes.root, className, positionClassName),
@@ -42994,7 +43100,7 @@ const Button = /* @__PURE__ */ React__namespace.forwardRef(function Button2(inPr
42994
43100
  type,
42995
43101
  id: loading ? loadingId : idProp,
42996
43102
  ...other,
42997
- classes,
43103
+ classes: forwardedClasses,
42998
43104
  children: [startIcon, loadingPosition !== "end" && loader, children, loadingPosition === "end" && loader, endIcon]
42999
43105
  });
43000
43106
  });
@@ -43425,6 +43531,56 @@ process.env.NODE_ENV !== "production" ? List$1.propTypes = {
43425
43531
  */
43426
43532
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
43427
43533
  } : void 0;
43534
+ function useSlot(name, parameters) {
43535
+ const {
43536
+ className,
43537
+ elementType: initialElementType,
43538
+ ownerState,
43539
+ externalForwardedProps,
43540
+ internalForwardedProps,
43541
+ shouldForwardComponentProp = false,
43542
+ ...useSlotPropsParams
43543
+ } = parameters;
43544
+ const {
43545
+ component: rootComponent,
43546
+ slots = {
43547
+ [name]: void 0
43548
+ },
43549
+ slotProps = {
43550
+ [name]: void 0
43551
+ },
43552
+ ...other
43553
+ } = externalForwardedProps;
43554
+ const elementType = slots[name] || initialElementType;
43555
+ const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
43556
+ const {
43557
+ props: {
43558
+ component: slotComponent,
43559
+ ...mergedProps
43560
+ },
43561
+ internalRef
43562
+ } = mergeSlotProps$2({
43563
+ className,
43564
+ ...useSlotPropsParams,
43565
+ externalForwardedProps: name === "root" ? other : void 0,
43566
+ externalSlotProps: resolvedComponentsProps
43567
+ });
43568
+ const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);
43569
+ const LeafComponent = name === "root" ? slotComponent || rootComponent : slotComponent;
43570
+ const props = appendOwnerState(elementType, {
43571
+ ...name === "root" && !rootComponent && !slots[name] && internalForwardedProps,
43572
+ ...name !== "root" && !slots[name] && internalForwardedProps,
43573
+ ...mergedProps,
43574
+ ...LeafComponent && !shouldForwardComponentProp && {
43575
+ as: LeafComponent
43576
+ },
43577
+ ...LeafComponent && shouldForwardComponentProp && {
43578
+ component: LeafComponent
43579
+ },
43580
+ ref
43581
+ }, ownerState);
43582
+ return [elementType, props];
43583
+ }
43428
43584
  function getListItemUtilityClass(slot) {
43429
43585
  return generateUtilityClass("MuiListItem", slot);
43430
43586
  }
@@ -43530,7 +43686,8 @@ const useUtilityClasses$X = (ownerState) => {
43530
43686
  } = ownerState;
43531
43687
  const slots = {
43532
43688
  root: ["root", dense && "dense", !disableGutters && "gutters", !disablePadding && "padding", divider && "divider", alignItems === "flex-start" && "alignItemsFlexStart", hasSecondaryAction && "secondaryAction"],
43533
- container: ["container"]
43689
+ container: ["container"],
43690
+ secondaryAction: ["secondaryAction"]
43534
43691
  };
43535
43692
  return composeClasses(slots, getListItemUtilityClass, classes);
43536
43693
  };
@@ -43686,6 +43843,16 @@ const ListItem = /* @__PURE__ */ React__namespace.forwardRef(function ListItem2(
43686
43843
  };
43687
43844
  const classes = useUtilityClasses$X(ownerState);
43688
43845
  const handleRef = useForkRef(listItemRef, ref);
43846
+ const externalForwardedProps = {
43847
+ slots,
43848
+ slotProps
43849
+ };
43850
+ const [SecondaryActionSlot, secondaryActionSlotProps] = useSlot("secondaryAction", {
43851
+ elementType: ListItemSecondaryAction,
43852
+ externalForwardedProps,
43853
+ ownerState,
43854
+ className: classes.secondaryAction
43855
+ });
43689
43856
  const Root = slots.root || components.Root || ListItemRoot;
43690
43857
  const rootProps = slotProps.root || componentsProps.root || {};
43691
43858
  const componentProps = {
@@ -43738,7 +43905,8 @@ const ListItem = /* @__PURE__ */ React__namespace.forwardRef(function ListItem2(
43738
43905
  }
43739
43906
  },
43740
43907
  ...componentProps,
43741
- children: [children, secondaryAction && /* @__PURE__ */ jsxRuntime.jsx(ListItemSecondaryAction, {
43908
+ children: [children, secondaryAction && /* @__PURE__ */ jsxRuntime.jsx(SecondaryActionSlot, {
43909
+ ...secondaryActionSlotProps,
43742
43910
  children: secondaryAction
43743
43911
  })]
43744
43912
  })
@@ -43810,7 +43978,7 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes = {
43810
43978
  * @default 'li'
43811
43979
  * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
43812
43980
  */
43813
- ContainerComponent: elementTypeAcceptingRef$1,
43981
+ ContainerComponent: elementTypeAcceptingRef,
43814
43982
  /**
43815
43983
  * Props applied to the container component if used.
43816
43984
  * @default {}
@@ -43849,7 +44017,8 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes = {
43849
44017
  * @default {}
43850
44018
  */
43851
44019
  slotProps: PropTypes.shape({
43852
- root: PropTypes.object
44020
+ root: PropTypes.object,
44021
+ secondaryAction: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
43853
44022
  }),
43854
44023
  /**
43855
44024
  * The components used for each slot inside.
@@ -43857,7 +44026,8 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes = {
43857
44026
  * @default {}
43858
44027
  */
43859
44028
  slots: PropTypes.shape({
43860
- root: PropTypes.elementType
44029
+ root: PropTypes.elementType,
44030
+ secondaryAction: PropTypes.elementType
43861
44031
  }),
43862
44032
  /**
43863
44033
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -43871,56 +44041,6 @@ function getChipUtilityClass(slot) {
43871
44041
  return generateUtilityClass("MuiChip", slot);
43872
44042
  }
43873
44043
  const chipClasses = generateUtilityClasses("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorDefault", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]);
43874
- function useSlot(name, parameters) {
43875
- const {
43876
- className,
43877
- elementType: initialElementType,
43878
- ownerState,
43879
- externalForwardedProps,
43880
- internalForwardedProps,
43881
- shouldForwardComponentProp = false,
43882
- ...useSlotPropsParams
43883
- } = parameters;
43884
- const {
43885
- component: rootComponent,
43886
- slots = {
43887
- [name]: void 0
43888
- },
43889
- slotProps = {
43890
- [name]: void 0
43891
- },
43892
- ...other
43893
- } = externalForwardedProps;
43894
- const elementType = slots[name] || initialElementType;
43895
- const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
43896
- const {
43897
- props: {
43898
- component: slotComponent,
43899
- ...mergedProps
43900
- },
43901
- internalRef
43902
- } = mergeSlotProps$2({
43903
- className,
43904
- ...useSlotPropsParams,
43905
- externalForwardedProps: name === "root" ? other : void 0,
43906
- externalSlotProps: resolvedComponentsProps
43907
- });
43908
- const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);
43909
- const LeafComponent = name === "root" ? slotComponent || rootComponent : slotComponent;
43910
- const props = appendOwnerState(elementType, {
43911
- ...name === "root" && !rootComponent && !slots[name] && internalForwardedProps,
43912
- ...name !== "root" && !slots[name] && internalForwardedProps,
43913
- ...mergedProps,
43914
- ...LeafComponent && !shouldForwardComponentProp && {
43915
- as: LeafComponent
43916
- },
43917
- ...LeafComponent && shouldForwardComponentProp && {
43918
- component: LeafComponent
43919
- },
43920
- ref
43921
- }, ownerState);
43922
- return [elementType, props];
43923
- }
43924
44044
  const useUtilityClasses$W = (ownerState) => {
43925
44045
  const {
43926
44046
  classes,
@@ -43976,7 +44096,7 @@ const ChipRoot = styled("div", {
43976
44096
  [`& .${chipClasses.deleteIcon}`]: styles2[`deleteIconColor${capitalize(color2)}`]
43977
44097
  }, {
43978
44098
  [`& .${chipClasses.deleteIcon}`]: styles2[`deleteIcon${capitalize(variant)}Color${capitalize(color2)}`]
43979
- }, styles2.root, styles2[`size${capitalize(size)}`], styles2[`color${capitalize(color2)}`], clickable && styles2.clickable, clickable && color2 !== "default" && styles2[`clickableColor${capitalize(color2)})`], onDelete && styles2.deletable, onDelete && color2 !== "default" && styles2[`deletableColor${capitalize(color2)}`], styles2[variant], styles2[`${variant}${capitalize(color2)}`]];
44099
+ }, styles2.root, styles2[`size${capitalize(size)}`], styles2[`color${capitalize(color2)}`], clickable && styles2.clickable, clickable && color2 !== "default" && styles2[`clickableColor${capitalize(color2)}`], onDelete && styles2.deletable, onDelete && color2 !== "default" && styles2[`deletableColor${capitalize(color2)}`], styles2[variant], styles2[`${variant}${capitalize(color2)}`]];
43980
44100
  }
43981
44101
  })(memoTheme(({
43982
44102
  theme
@@ -44280,9 +44400,7 @@ const Chip = /* @__PURE__ */ React__namespace.forwardRef(function Chip2(inProps,
44280
44400
  const handleRef = useForkRef(chipRef, ref);
44281
44401
  const handleDeleteIconClick = (event) => {
44282
44402
  event.stopPropagation();
44283
- if (onDelete) {
44284
- onDelete(event);
44285
- }
44403
+ onDelete(event);
44286
44404
  };
44287
44405
  const handleKeyDown = (event) => {
44288
44406
  if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {
@@ -44940,8 +45058,8 @@ const useDesktopPicker = (_ref) => {
44940
45058
  });
44941
45059
  const renderPicker = () => /* @__PURE__ */ jsxRuntime.jsxs(PickerProvider, _extends({}, providerProps, {
44942
45060
  children: [/* @__PURE__ */ jsxRuntime.jsx(Field, _extends({}, fieldProps, {
44943
- slots,
44944
- slotProps,
45061
+ slots: _extends({}, slots, fieldProps.slots),
45062
+ slotProps: _extends({}, slotProps, fieldProps.slotProps),
44945
45063
  inputRef
44946
45064
  })), /* @__PURE__ */ jsxRuntime.jsx(PickerPopper, {
44947
45065
  slots,
@@ -45880,9 +45998,9 @@ function useFieldRootProps(parameters) {
45880
45998
  if (focused || disabled || !domGetters.isReady()) {
45881
45999
  return;
45882
46000
  }
45883
- const activeElement = getActiveElement(domGetters.getRoot());
46001
+ const activeElement2 = getActiveElement(domGetters.getRoot());
45884
46002
  setFocused(true);
45885
- const isFocusInsideASection = domGetters.getSectionIndexFromDOMElement(activeElement) != null;
46003
+ const isFocusInsideASection = domGetters.getSectionIndexFromDOMElement(activeElement2) != null;
45886
46004
  if (!isFocusInsideASection) {
45887
46005
  setSelectedSections(sectionOrder.startIndex);
45888
46006
  }
@@ -45892,8 +46010,8 @@ function useFieldRootProps(parameters) {
45892
46010
  if (!domGetters.isReady()) {
45893
46011
  return;
45894
46012
  }
45895
- const activeElement = getActiveElement(domGetters.getRoot());
45896
- const shouldBlur = !domGetters.getRoot().contains(activeElement);
46013
+ const activeElement2 = getActiveElement(domGetters.getRoot());
46014
+ const shouldBlur = !domGetters.getRoot().contains(activeElement2);
45897
46015
  if (shouldBlur) {
45898
46016
  setFocused(false);
45899
46017
  setSelectedSections(null);
@@ -45974,6 +46092,7 @@ function useFieldSectionContentProps(parameters) {
45974
46092
  sectionsValueBoundaries,
45975
46093
  state,
45976
46094
  value,
46095
+ localizedDigits,
45977
46096
  // Methods to update the states
45978
46097
  clearActiveSection,
45979
46098
  setCharacterQuery,
@@ -46083,10 +46202,10 @@ function useFieldSectionContentProps(parameters) {
46083
46202
  onFocus: createFocusHandler(sectionIndex),
46084
46203
  // Aria attributes
46085
46204
  "aria-readonly": readOnly,
46086
- "aria-valuenow": getSectionValueNow(section, adapter),
46205
+ "aria-valuenow": getSectionValueNow(section, adapter, localizedDigits),
46087
46206
  "aria-valuemin": sectionBoundaries.minimum,
46088
46207
  "aria-valuemax": sectionBoundaries.maximum,
46089
- "aria-valuetext": section.value ? getSectionValueText(section, adapter) : translations.empty,
46208
+ "aria-valuetext": section.value ? getSectionValueText(section, adapter, localizedDigits) : translations.empty,
46090
46209
  "aria-label": translations[section.type],
46091
46210
  "aria-disabled": disabled,
46092
46211
  // Other
@@ -46102,16 +46221,16 @@ function useFieldSectionContentProps(parameters) {
46102
46221
  children: section.value || section.placeholder,
46103
46222
  inputMode: section.contentType === "letter" ? "text" : "numeric"
46104
46223
  };
46105
- }, [sectionsValueBoundaries, isContainerEditable, disabled, readOnly, isEditable, translations, adapter, handleInput, handlePaste, handleMouseUp, handleDragOver, createFocusHandler, fieldValueManager, value]);
46224
+ }, [sectionsValueBoundaries, isContainerEditable, disabled, readOnly, isEditable, translations, adapter, localizedDigits, handleInput, handlePaste, handleMouseUp, handleDragOver, createFocusHandler, fieldValueManager, value]);
46106
46225
  }
46107
- function getSectionValueText(section, adapter) {
46226
+ function getSectionValueText(section, adapter, localizedDigits) {
46108
46227
  if (!section.value) {
46109
46228
  return void 0;
46110
46229
  }
46111
46230
  switch (section.type) {
46112
46231
  case "month": {
46113
46232
  if (section.contentType === "digit") {
46114
- const dateWithMonth = adapter.setMonth(adapter.date(), Number(section.value) - 1);
46233
+ const dateWithMonth = adapter.setMonth(adapter.date(), Number(removeLocalizedDigits(section.value, localizedDigits)) - 1);
46115
46234
  return adapter.isValid(dateWithMonth) ? adapter.format(dateWithMonth, "month") : "";
46116
46235
  }
46117
46236
  const parsedDate = adapter.parse(section.value, section.format);
@@ -46119,7 +46238,7 @@ function getSectionValueText(section, adapter) {
46119
46238
  }
46120
46239
  case "day":
46121
46240
  if (section.contentType === "digit") {
46122
- const dateWithDay = adapter.setDate(adapter.startOfYear(adapter.date()), Number(section.value));
46241
+ const dateWithDay = adapter.setDate(adapter.startOfYear(adapter.date()), Number(removeLocalizedDigits(section.value, localizedDigits)));
46123
46242
  return adapter.isValid(dateWithDay) ? adapter.format(dateWithDay, "dayOfMonthFull") : "";
46124
46243
  }
46125
46244
  return section.value;
@@ -46129,16 +46248,17 @@ function getSectionValueText(section, adapter) {
46129
46248
  return void 0;
46130
46249
  }
46131
46250
  }
46132
- function getSectionValueNow(section, adapter) {
46251
+ function getSectionValueNow(section, adapter, localizedDigits) {
46133
46252
  if (!section.value) {
46134
46253
  return void 0;
46135
46254
  }
46255
+ const nonLocalizedValue = removeLocalizedDigits(section.value, localizedDigits);
46136
46256
  switch (section.type) {
46137
46257
  case "weekDay": {
46138
46258
  if (section.contentType === "letter") {
46139
46259
  return void 0;
46140
46260
  }
46141
- return Number(section.value);
46261
+ return Number(nonLocalizedValue);
46142
46262
  }
46143
46263
  case "meridiem": {
46144
46264
  const parsedDate = adapter.parse(`01:00 ${section.value}`, `${adapter.formats.hours12h}:${adapter.formats.minutes} ${section.format}`);
@@ -46148,16 +46268,16 @@ function getSectionValueNow(section, adapter) {
46148
46268
  return void 0;
46149
46269
  }
46150
46270
  case "day":
46151
- return section.contentType === "digit-with-letter" ? parseInt(section.value, 10) : Number(section.value);
46271
+ return section.contentType === "digit-with-letter" ? parseInt(nonLocalizedValue, 10) : Number(nonLocalizedValue);
46152
46272
  case "month": {
46153
46273
  if (section.contentType === "digit") {
46154
- return Number(section.value);
46274
+ return Number(nonLocalizedValue);
46155
46275
  }
46156
46276
  const parsedDate = adapter.parse(section.value, section.format);
46157
46277
  return parsedDate ? adapter.getMonth(parsedDate) + 1 : void 0;
46158
46278
  }
46159
46279
  default:
46160
- return section.contentType !== "letter" ? Number(section.value) : void 0;
46280
+ return section.contentType !== "letter" ? Number(nonLocalizedValue) : void 0;
46161
46281
  }
46162
46282
  }
46163
46283
  const useFieldV7TextField = (parameters) => {
@@ -46383,16 +46503,16 @@ const useFieldV7TextField = (parameters) => {
46383
46503
  };
46384
46504
  function getActiveSectionIndex(sectionListRef) {
46385
46505
  var _a;
46386
- const activeElement = getActiveElement((_a = sectionListRef.current) == null ? void 0 : _a.getRoot());
46387
- if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {
46506
+ const activeElement2 = getActiveElement((_a = sectionListRef.current) == null ? void 0 : _a.getRoot());
46507
+ if (!activeElement2 || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement2)) {
46388
46508
  return null;
46389
46509
  }
46390
- return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);
46510
+ return sectionListRef.current.getSectionIndexFromDOMElement(activeElement2);
46391
46511
  }
46392
46512
  function isFieldFocused$1(sectionListRef) {
46393
46513
  var _a;
46394
- const activeElement = getActiveElement((_a = sectionListRef.current) == null ? void 0 : _a.getRoot());
46395
- return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);
46514
+ const activeElement2 = getActiveElement((_a = sectionListRef.current) == null ? void 0 : _a.getRoot());
46515
+ return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement2);
46396
46516
  }
46397
46517
  const cleanString = (dirtyString) => dirtyString.replace(/[\u2066\u2067\u2068\u2069]/g, "");
46398
46518
  const addPositionPropertiesToSections = (sections, localizedDigits, isRtl) => {
@@ -47099,6 +47219,8 @@ function getInputBaseUtilityClass(slot) {
47099
47219
  }
47100
47220
  const inputBaseClasses = generateUtilityClasses("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
47101
47221
  var _InputGlobalStyles;
47222
+ const MUI_AUTO_FILL = "mui-auto-fill";
47223
+ const MUI_AUTO_FILL_CANCEL = "mui-auto-fill-cancel";
47102
47224
  const rootOverridesResolver = (props, styles2) => {
47103
47225
  const {
47104
47226
  ownerState
@@ -47263,11 +47385,11 @@ const InputBaseInput = styled("input", {
47263
47385
  ownerState
47264
47386
  }) => !ownerState.disableInjectingGlobalStyles,
47265
47387
  style: {
47266
- animationName: "mui-auto-fill-cancel",
47388
+ animationName: MUI_AUTO_FILL_CANCEL,
47267
47389
  animationDuration: "10ms",
47268
47390
  "&:-webkit-autofill": {
47269
47391
  animationDuration: "5000s",
47270
- animationName: "mui-auto-fill"
47392
+ animationName: MUI_AUTO_FILL
47271
47393
  }
47272
47394
  }
47273
47395
  }, {
@@ -47299,14 +47421,16 @@ const InputBaseInput = styled("input", {
47299
47421
  };
47300
47422
  }));
47301
47423
  const InputGlobalStyles = globalCss({
47302
- "@keyframes mui-auto-fill": {
47424
+ // Keep keyframes non-empty for Emotion production builds. Animation properties are ignored
47425
+ // inside keyframes, avoiding the visible display animation triggered by Chrome 117+.
47426
+ [`@keyframes ${MUI_AUTO_FILL}`]: {
47303
47427
  from: {
47304
- display: "block"
47428
+ animationName: MUI_AUTO_FILL
47305
47429
  }
47306
47430
  },
47307
- "@keyframes mui-auto-fill-cancel": {
47431
+ [`@keyframes ${MUI_AUTO_FILL_CANCEL}`]: {
47308
47432
  from: {
47309
- display: "block"
47433
+ animationName: MUI_AUTO_FILL_CANCEL
47310
47434
  }
47311
47435
  }
47312
47436
  });
@@ -47411,6 +47535,27 @@ const InputBase = /* @__PURE__ */ React__namespace.forwardRef(function InputBase
47411
47535
  });
47412
47536
  }
47413
47537
  }, [value, checkDirty, isControlled]);
47538
+ useEnhancedEffect(() => {
47539
+ if (!autoFocus) {
47540
+ return;
47541
+ }
47542
+ const input = inputRef.current;
47543
+ if (!input) {
47544
+ return;
47545
+ }
47546
+ const doc = ownerDocument(input);
47547
+ const activeElement$1 = activeElement(doc);
47548
+ const noElementFocused = activeElement$1 == null || activeElement$1 === doc.body || activeElement$1 === doc.documentElement;
47549
+ if (input === activeElement$1) {
47550
+ if (muiFormControl && muiFormControl.onFocus) {
47551
+ muiFormControl.onFocus();
47552
+ } else {
47553
+ setFocused(true);
47554
+ }
47555
+ } else if (noElementFocused) {
47556
+ input.focus();
47557
+ }
47558
+ }, [autoFocus]);
47414
47559
  const handleFocus = (event) => {
47415
47560
  if (onFocus) {
47416
47561
  onFocus(event);
@@ -47491,7 +47636,7 @@ const InputBase = /* @__PURE__ */ React__namespace.forwardRef(function InputBase
47491
47636
  InputComponent = TextareaAutosize;
47492
47637
  }
47493
47638
  const handleAutoFill = (event) => {
47494
- checkDirty(event.animationName === "mui-auto-fill-cancel" ? inputRef.current : {
47639
+ checkDirty(event.animationName === MUI_AUTO_FILL_CANCEL ? inputRef.current : {
47495
47640
  value: "x"
47496
47641
  });
47497
47642
  };
@@ -47674,7 +47819,7 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes = {
47674
47819
  * Either a string to use a HTML element or a component.
47675
47820
  * @default 'input'
47676
47821
  */
47677
- inputComponent: elementTypeAcceptingRef$1,
47822
+ inputComponent: elementTypeAcceptingRef,
47678
47823
  /**
47679
47824
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
47680
47825
  * @default {}
@@ -47892,7 +48037,7 @@ const InputRoot = styled(InputBaseRoot, {
47892
48037
  borderBottom: `1px solid ${bottomLineColor}`,
47893
48038
  left: 0,
47894
48039
  bottom: 0,
47895
- content: '"\\00a0"',
48040
+ content: '""',
47896
48041
  position: "absolute",
47897
48042
  right: 0,
47898
48043
  transition: theme.transitions.create("border-bottom-color", {
@@ -48261,7 +48406,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
48261
48406
  borderBottom: `1px solid ${theme.vars ? theme.alpha(theme.vars.palette.common.onBackground, theme.vars.opacity.inputUnderline) : bottomLineColor}`,
48262
48407
  left: 0,
48263
48408
  bottom: 0,
48264
- content: '"\\00a0"',
48409
+ content: '""',
48265
48410
  position: "absolute",
48266
48411
  right: 0,
48267
48412
  transition: theme.transitions.create("border-bottom-color", {
@@ -50220,7 +50365,7 @@ const MenuList = /* @__PURE__ */ React__namespace.forwardRef(function MenuList2(
50220
50365
  }
50221
50366
  return;
50222
50367
  }
50223
- const currentFocus = ownerDocument(list).activeElement;
50368
+ const currentFocus = activeElement(ownerDocument(list));
50224
50369
  if (key === "ArrowDown") {
50225
50370
  event.preventDefault();
50226
50371
  moveFocus$1(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem$1);
@@ -50373,7 +50518,7 @@ function ariaHidden(element, hide2) {
50373
50518
  }
50374
50519
  }
50375
50520
  function getPaddingRight(element) {
50376
- return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;
50521
+ return parseFloat(ownerWindow(element).getComputedStyle(element).paddingRight) || 0;
50377
50522
  }
50378
50523
  function isAriaHiddenForbiddenOnElement(element) {
50379
50524
  const forbiddenTagNames = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"];
@@ -50639,7 +50784,6 @@ const Backdrop = /* @__PURE__ */ React__namespace.forwardRef(function Backdrop2(
50639
50784
  children: /* @__PURE__ */ jsxRuntime.jsx(RootSlot, {
50640
50785
  "aria-hidden": true,
50641
50786
  ...rootProps,
50642
- classes,
50643
50787
  ref,
50644
50788
  children
50645
50789
  })
@@ -51385,7 +51529,7 @@ const Popover = /* @__PURE__ */ React__namespace.forwardRef(function Popover2(in
51385
51529
  const anchorRect = anchorElement.getBoundingClientRect();
51386
51530
  if (process.env.NODE_ENV !== "production") {
51387
51531
  const box = anchorElement.getBoundingClientRect();
51388
- if (process.env.NODE_ENV !== "test" && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
51532
+ if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
51389
51533
  console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
51390
51534
  }
51391
51535
  }
@@ -51618,8 +51762,10 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes = {
51618
51762
  const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);
51619
51763
  if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
51620
51764
  const box = resolvedAnchorEl.getBoundingClientRect();
51621
- if (process.env.NODE_ENV !== "test" && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
51622
- return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
51765
+ if (process.env.NODE_ENV !== "production") {
51766
+ if (isLayoutSupported() && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
51767
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join("\n"));
51768
+ }
51623
51769
  }
51624
51770
  } else {
51625
51771
  return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", `It should be an Element or PopoverVirtualElement instance but it's \`${resolvedAnchorEl}\` instead.`].join("\n"));
@@ -51731,7 +51877,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes = {
51731
51877
  * @default {}
51732
51878
  */
51733
51879
  PaperProps: PropTypes.shape({
51734
- component: elementTypeAcceptingRef$1
51880
+ component: elementTypeAcceptingRef
51735
51881
  }),
51736
51882
  /**
51737
51883
  * The props used for each slot inside.
@@ -52350,6 +52496,36 @@ function getSelectUtilityClasses(slot) {
52350
52496
  return generateUtilityClass("MuiSelect", slot);
52351
52497
  }
52352
52498
  const selectClasses = generateUtilityClasses("MuiSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
52499
+ function getOpenInteractionType(event) {
52500
+ if (!event) {
52501
+ return null;
52502
+ }
52503
+ if (event.type === "mousedown" || event.type === "pointerdown" || event.type === "touchstart") {
52504
+ return "pointer";
52505
+ }
52506
+ if (event.type === "keydown" || event.type === "click" && event.detail === 0) {
52507
+ return "keyboard";
52508
+ }
52509
+ return null;
52510
+ }
52511
+ function isEmpty(display) {
52512
+ return display == null || typeof display === "string" && !display.trim();
52513
+ }
52514
+ function areEqualValues(a, b) {
52515
+ if (typeof b === "object" && b !== null) {
52516
+ return a === b;
52517
+ }
52518
+ return String(a) === String(b);
52519
+ }
52520
+ const SelectFocusSourceContext = /* @__PURE__ */ React__namespace.createContext(null);
52521
+ if (process.env.NODE_ENV !== "production") {
52522
+ SelectFocusSourceContext.displayName = "SelectFocusSourceContext";
52523
+ }
52524
+ function useSelectFocusSource() {
52525
+ const context = React__namespace.useContext(SelectFocusSourceContext);
52526
+ return context;
52527
+ }
52528
+ const SelectFocusSourceProvider = SelectFocusSourceContext.Provider;
52353
52529
  var _span$1;
52354
52530
  const SelectSelect = styled(StyledSelectSelect, {
52355
52531
  name: "MuiSelect",
@@ -52409,15 +52585,6 @@ const SelectNativeInput = styled("input", {
52409
52585
  width: "100%",
52410
52586
  boxSizing: "border-box"
52411
52587
  });
52412
- function areEqualValues(a, b) {
52413
- if (typeof b === "object" && b !== null) {
52414
- return a === b;
52415
- }
52416
- return String(a) === String(b);
52417
- }
52418
- function isEmpty(display) {
52419
- return display == null || typeof display === "string" && !display.trim();
52420
- }
52421
52588
  const useUtilityClasses$G = (ownerState) => {
52422
52589
  const {
52423
52590
  classes,
@@ -52458,6 +52625,10 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52458
52625
  onChange,
52459
52626
  onClose,
52460
52627
  onFocus,
52628
+ // eslint-disable-next-line react/prop-types
52629
+ onKeyDown,
52630
+ // eslint-disable-next-line react/prop-types
52631
+ onMouseDown,
52461
52632
  onOpen,
52462
52633
  open: openProp,
52463
52634
  readOnly,
@@ -52488,6 +52659,7 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52488
52659
  current: isOpenControlled
52489
52660
  } = React__namespace.useRef(openProp != null);
52490
52661
  const [menuMinWidthState, setMenuMinWidthState] = React__namespace.useState();
52662
+ const [openInteractionType, setOpenInteractionType] = React__namespace.useState(null);
52491
52663
  const handleRef = useForkRef(ref, inputRefProp);
52492
52664
  const handleDisplayRef = React__namespace.useCallback((node) => {
52493
52665
  displayRef.current = node;
@@ -52503,6 +52675,22 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52503
52675
  node: inputRef.current,
52504
52676
  value
52505
52677
  }), [value]);
52678
+ const open2 = displayNode !== null && openState;
52679
+ React__namespace.useEffect(() => {
52680
+ if (!open2 || !anchorElement || autoWidth) {
52681
+ return void 0;
52682
+ }
52683
+ if (typeof ResizeObserver === "undefined") {
52684
+ return void 0;
52685
+ }
52686
+ const observer = new ResizeObserver(() => {
52687
+ setMenuMinWidthState(anchorElement.clientWidth);
52688
+ });
52689
+ observer.observe(anchorElement);
52690
+ return () => {
52691
+ observer.disconnect();
52692
+ };
52693
+ }, [open2, anchorElement, autoWidth]);
52506
52694
  React__namespace.useEffect(() => {
52507
52695
  if (defaultOpen && openState && displayNode && !isOpenControlled) {
52508
52696
  setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
@@ -52532,20 +52720,25 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52532
52720
  }
52533
52721
  return void 0;
52534
52722
  }, [labelId]);
52535
- const update = (open3, event) => {
52536
- if (open3) {
52723
+ const update = (openParam, event) => {
52724
+ if (openParam) {
52725
+ setOpenInteractionType(getOpenInteractionType(event));
52537
52726
  if (onOpen) {
52538
52727
  onOpen(event);
52539
52728
  }
52540
- } else if (onClose) {
52541
- onClose(event);
52729
+ } else {
52730
+ setOpenInteractionType(null);
52731
+ if (onClose) {
52732
+ onClose(event);
52733
+ }
52542
52734
  }
52543
52735
  if (!isOpenControlled) {
52544
52736
  setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
52545
- setOpenState(open3);
52737
+ setOpenState(openParam);
52546
52738
  }
52547
52739
  };
52548
52740
  const handleMouseDown = (event) => {
52741
+ onMouseDown == null ? void 0 : onMouseDown(event);
52549
52742
  if (event.button !== 0) {
52550
52743
  return;
52551
52744
  }
@@ -52619,9 +52812,9 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52619
52812
  event.preventDefault();
52620
52813
  update(true, event);
52621
52814
  }
52815
+ onKeyDown == null ? void 0 : onKeyDown(event);
52622
52816
  }
52623
52817
  };
52624
- const open2 = displayNode !== null && openState;
52625
52818
  const handleBlur = (event) => {
52626
52819
  if (!open2 && onBlur) {
52627
52820
  Object.defineProperty(event, "target", {
@@ -52797,39 +52990,42 @@ const SelectInput = /* @__PURE__ */ React__namespace.forwardRef(function SelectI
52797
52990
  as: IconComponent,
52798
52991
  className: classes.icon,
52799
52992
  ownerState
52800
- }), /* @__PURE__ */ jsxRuntime.jsx(Menu, {
52801
- id: `menu-${name || ""}`,
52802
- anchorEl: anchorElement,
52803
- open: open2,
52804
- onClose: handleClose,
52805
- anchorOrigin: {
52806
- vertical: "bottom",
52807
- horizontal: "center"
52808
- },
52809
- transformOrigin: {
52810
- vertical: "top",
52811
- horizontal: "center"
52812
- },
52813
- ...MenuProps,
52814
- slotProps: {
52815
- ...MenuProps.slotProps,
52816
- list: {
52817
- "aria-labelledby": labelId,
52818
- role: "listbox",
52819
- "aria-multiselectable": multiple ? "true" : void 0,
52820
- disableListWrap: true,
52821
- id: listboxId,
52822
- ...listProps
52993
+ }), /* @__PURE__ */ jsxRuntime.jsx(SelectFocusSourceProvider, {
52994
+ value: openInteractionType,
52995
+ children: /* @__PURE__ */ jsxRuntime.jsx(Menu, {
52996
+ id: `menu-${name || ""}`,
52997
+ anchorEl: anchorElement,
52998
+ open: open2,
52999
+ onClose: handleClose,
53000
+ anchorOrigin: {
53001
+ vertical: "bottom",
53002
+ horizontal: "center"
52823
53003
  },
52824
- paper: {
52825
- ...paperProps,
52826
- style: {
52827
- minWidth: menuMinWidth,
52828
- ...paperProps != null ? paperProps.style : null
53004
+ transformOrigin: {
53005
+ vertical: "top",
53006
+ horizontal: "center"
53007
+ },
53008
+ ...MenuProps,
53009
+ slotProps: {
53010
+ ...MenuProps.slotProps,
53011
+ list: {
53012
+ "aria-labelledby": labelId,
53013
+ role: "listbox",
53014
+ "aria-multiselectable": multiple ? "true" : void 0,
53015
+ disableListWrap: true,
53016
+ id: listboxId,
53017
+ ...listProps
53018
+ },
53019
+ paper: {
53020
+ ...paperProps,
53021
+ style: {
53022
+ minWidth: menuMinWidth,
53023
+ ...paperProps != null ? paperProps.style : null
53024
+ }
52829
53025
  }
52830
- }
52831
- },
52832
- children: items
53026
+ },
53027
+ children: items
53028
+ })
52833
53029
  })]
52834
53030
  });
52835
53031
  });
@@ -54472,6 +54668,10 @@ const PickersInputBaseRoot = styled("div", {
54472
54668
  boxSizing: "border-box",
54473
54669
  // Prevent padding issue with fullWidth.
54474
54670
  letterSpacing: `${round(0.15 / 16)}em`,
54671
+ [`&.${pickersInputBaseClasses.disabled}`]: {
54672
+ color: (theme.vars || theme).palette.action.disabled,
54673
+ cursor: "default"
54674
+ },
54475
54675
  variants: [{
54476
54676
  props: {
54477
54677
  isInputInFullWidth: true
@@ -54945,13 +55145,17 @@ const OutlineRoot = styled("fieldset", {
54945
55145
  borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor2
54946
55146
  };
54947
55147
  });
54948
- const OutlineLabel = styled("span")(({
55148
+ const OutlineLabel = styled("span", {
55149
+ slot: "internal",
55150
+ shouldForwardProp: void 0
55151
+ })(({
54949
55152
  theme
54950
55153
  }) => ({
54951
55154
  fontFamily: theme.typography.fontFamily,
54952
55155
  fontSize: "inherit"
54953
55156
  }));
54954
55157
  const OutlineLegend = styled("legend", {
55158
+ slot: "internal",
54955
55159
  shouldForwardProp: (prop) => shouldForwardProp(prop) && prop !== "notched"
54956
55160
  })(({
54957
55161
  theme
@@ -55067,17 +55271,14 @@ const PickersOutlinedInputRoot = styled(PickersInputBaseRoot, {
55067
55271
  borderStyle: "solid",
55068
55272
  borderWidth: 2
55069
55273
  },
55274
+ [`&.${pickersOutlinedInputClasses.error} .${pickersOutlinedInputClasses.notchedOutline}`]: {
55275
+ borderColor: (theme.vars || theme).palette.error.main
55276
+ },
55070
55277
  [`&.${pickersOutlinedInputClasses.disabled}`]: {
55071
55278
  [`& .${pickersOutlinedInputClasses.notchedOutline}`]: {
55072
55279
  borderColor: (theme.vars || theme).palette.action.disabled
55073
- },
55074
- "*": {
55075
- color: (theme.vars || theme).palette.action.disabled
55076
55280
  }
55077
55281
  },
55078
- [`&.${pickersOutlinedInputClasses.error} .${pickersOutlinedInputClasses.notchedOutline}`]: {
55079
- borderColor: (theme.vars || theme).palette.error.main
55080
- },
55081
55282
  variants: Object.keys((theme.vars ?? theme).palette).filter((key) => {
55082
55283
  var _a;
55083
55284
  return ((_a = (theme.vars ?? theme).palette[key]) == null ? void 0 : _a.main) ?? false;
@@ -55134,14 +55335,17 @@ const PickersOutlinedInput = /* @__PURE__ */ React__namespace.forwardRef(functio
55134
55335
  root: PickersOutlinedInputRoot,
55135
55336
  input: PickersOutlinedInputSectionsContainer
55136
55337
  },
55137
- renderSuffix: (state) => /* @__PURE__ */ jsxRuntime.jsx(Outline, {
55138
- shrink: Boolean(notched || state.adornedStart || state.focused || state.filled),
55139
- notched: Boolean(notched || state.adornedStart || state.focused || state.filled),
55140
- className: classes.notchedOutline,
55141
- label: label != null && label !== "" && (muiFormControl == null ? void 0 : muiFormControl.required) ? /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, {
55142
- children: [label, " ", "*"]
55143
- }) : label
55144
- })
55338
+ renderSuffix: (state) => {
55339
+ const isNotched = typeof notched !== "undefined" ? notched : Boolean(state.adornedStart || state.focused || state.filled);
55340
+ return /* @__PURE__ */ jsxRuntime.jsx(Outline, {
55341
+ shrink: isNotched,
55342
+ notched: isNotched,
55343
+ className: classes.notchedOutline,
55344
+ label: label != null && label !== "" && (muiFormControl == null ? void 0 : muiFormControl.required) ? /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, {
55345
+ children: [label, " ", "*"]
55346
+ }) : label
55347
+ });
55348
+ }
55145
55349
  }, other, {
55146
55350
  label,
55147
55351
  classes,
@@ -56707,7 +56911,11 @@ const useCalendarState = (params) => {
56707
56911
  const [calendarState, dispatch] = React__namespace.useReducer(reducerFn, {
56708
56912
  isMonthSwitchingAnimating: false,
56709
56913
  focusedDay: referenceDate,
56710
- currentMonth: adapter.startOfMonth(referenceDate),
56914
+ // Keep the time from the reference date when computing the current month anchor.
56915
+ // Using startOfMonth would reset the time to 00:00 which breaks expectations
56916
+ // that month selections preserve the referenceDate time when no value is provided.
56917
+ // See tests: "should use `referenceDate` when no value defined".
56918
+ currentMonth: adapter.setDate(referenceDate, 1),
56711
56919
  slideDirection: "left"
56712
56920
  });
56713
56921
  const isDateDisabled = useIsDateDisabled({
@@ -56888,6 +57096,8 @@ const useUtilityClasses$u = (classes, ownerState) => {
56888
57096
  const styleArg = ({
56889
57097
  theme
56890
57098
  }) => _extends({}, theme.typography.caption, {
57099
+ display: "flex",
57100
+ lineHeight: 1,
56891
57101
  width: DAY_SIZE,
56892
57102
  height: DAY_SIZE,
56893
57103
  borderRadius: "50%",
@@ -56956,7 +57166,7 @@ const overridesResolver$1 = (props, styles2) => {
56956
57166
  const {
56957
57167
  ownerState
56958
57168
  } = props;
56959
- return [styles2.root, !ownerState.disableMargin && styles2.dayWithMargin, !ownerState.disableHighlightToday && ownerState.isDayCurrent && styles2.today, !ownerState.isDayOutsideMonth && ownerState.showDaysOutsideCurrentMonth && styles2.dayOutsideMonth, ownerState.isDayOutsideMonth && !ownerState.showDaysOutsideCurrentMonth && styles2.hiddenDaySpacingFiller];
57169
+ return [styles2.root, !ownerState.disableMargin && styles2.dayWithMargin, !ownerState.disableHighlightToday && ownerState.isDayCurrent && styles2.today, ownerState.isDayOutsideMonth && ownerState.showDaysOutsideCurrentMonth && styles2.dayOutsideMonth, ownerState.isDayOutsideMonth && !ownerState.showDaysOutsideCurrentMonth && styles2.hiddenDaySpacingFiller];
56960
57170
  };
56961
57171
  const PickersDayRoot = styled(ButtonBase, {
56962
57172
  name: "MuiPickersDay",
@@ -57650,6 +57860,11 @@ function DayCalendar(inProps) {
57650
57860
  focusDay(adapter.addMonths(day, -1));
57651
57861
  event.preventDefault();
57652
57862
  break;
57863
+ case "Enter":
57864
+ case " ":
57865
+ handleDaySelect(day);
57866
+ event.preventDefault();
57867
+ break;
57653
57868
  }
57654
57869
  });
57655
57870
  const handleFocus = useEventCallback((event, day) => focusDay(day));
@@ -57985,12 +58200,13 @@ const MonthCalendar = /* @__PURE__ */ React__namespace.forwardRef(function Month
57985
58200
  }
57986
58201
  return shouldDisableMonth(monthToValidate);
57987
58202
  }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableMonth, adapter]);
57988
- const handleMonthSelection = useEventCallback((event, month) => {
58203
+ const handleMonthSelection = useEventCallback((_event, month) => {
57989
58204
  if (readOnly) {
57990
58205
  return;
57991
58206
  }
57992
58207
  const currentValue = value && currentMonth && !adapter.isSameYear(value, currentMonth) ? adapter.setYear(value, adapter.getYear(currentMonth)) : value;
57993
- const newDate = adapter.setMonth(currentValue ?? referenceDate, month);
58208
+ const baseDateForMonth = currentValue ?? currentMonth ?? referenceDate;
58209
+ const newDate = adapter.setMonth(baseDateForMonth, month);
57994
58210
  handleValueChange(newDate);
57995
58211
  });
57996
58212
  const focusMonth = useEventCallback((month) => {
@@ -58025,6 +58241,11 @@ const MonthCalendar = /* @__PURE__ */ React__namespace.forwardRef(function Month
58025
58241
  focusMonth((monthsInYear + month + (isRtl ? -1 : 1)) % monthsInYear);
58026
58242
  event.preventDefault();
58027
58243
  break;
58244
+ case "Enter":
58245
+ case " ":
58246
+ handleMonthSelection(event, month);
58247
+ event.preventDefault();
58248
+ break;
58028
58249
  }
58029
58250
  });
58030
58251
  const handleMonthFocus = useEventCallback((event, month) => {
@@ -58437,7 +58658,7 @@ const YearCalendar = /* @__PURE__ */ React__namespace.forwardRef(function YearCa
58437
58658
  const yearToValidate = adapter.startOfYear(dateToValidate);
58438
58659
  return shouldDisableYear(yearToValidate);
58439
58660
  }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableYear, adapter]);
58440
- const handleYearSelection = useEventCallback((event, year) => {
58661
+ const handleYearSelection = useEventCallback((_event, year) => {
58441
58662
  if (readOnly) {
58442
58663
  return;
58443
58664
  }
@@ -58474,6 +58695,11 @@ const YearCalendar = /* @__PURE__ */ React__namespace.forwardRef(function YearCa
58474
58695
  focusYear(year + horizontalDirection);
58475
58696
  event.preventDefault();
58476
58697
  break;
58698
+ case "Enter":
58699
+ case " ":
58700
+ handleYearSelection(event, year);
58701
+ event.preventDefault();
58702
+ break;
58477
58703
  }
58478
58704
  });
58479
58705
  const handleYearFocus = useEventCallback((event, year) => {
@@ -59090,7 +59316,10 @@ process.env.NODE_ENV !== "production" ? PickersCalendarHeader.propTypes = {
59090
59316
  view: PropTypes.oneOf(["day", "month", "year"]).isRequired,
59091
59317
  views: PropTypes.arrayOf(PropTypes.oneOf(["day", "month", "year"]).isRequired).isRequired
59092
59318
  } : void 0;
59093
- const PickerViewRoot = styled("div")({
59319
+ const PickerViewRoot = styled("div", {
59320
+ slot: "internal",
59321
+ shouldForwardProp: void 0
59322
+ })({
59094
59323
  overflow: "hidden",
59095
59324
  width: DIALOG_WIDTH,
59096
59325
  maxHeight: VIEW_HEIGHT,
@@ -59890,7 +60119,7 @@ DesktopDatePicker.propTypes = {
59890
60119
  * @param {TValue} value The value that was just accepted.
59891
60120
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
59892
60121
  * - `validationError`: validation result of the current value
59893
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
60122
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
59894
60123
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
59895
60124
  */
59896
60125
  onAccept: PropTypes.func,
@@ -60188,15 +60417,14 @@ process.env.NODE_ENV !== "production" ? DialogContent.propTypes = {
60188
60417
  function getDialogUtilityClass(slot) {
60189
60418
  return generateUtilityClass("MuiDialog", slot);
60190
60419
  }
60191
- const dialogClasses = generateUtilityClasses("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]);
60420
+ const dialogClasses = generateUtilityClasses("MuiDialog", ["root", "backdrop", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]);
60192
60421
  const DialogContext = /* @__PURE__ */ React__namespace.createContext({});
60193
60422
  if (process.env.NODE_ENV !== "production") {
60194
60423
  DialogContext.displayName = "DialogContext";
60195
60424
  }
60196
60425
  const DialogBackdrop = styled(Backdrop, {
60197
60426
  name: "MuiDialog",
60198
- slot: "Backdrop",
60199
- overrides: (props, styles2) => styles2.backdrop
60427
+ slot: "Backdrop"
60200
60428
  })({
60201
60429
  // Improve scrollable dialog support.
60202
60430
  zIndex: -1
@@ -60211,6 +60439,7 @@ const useUtilityClasses$j = (ownerState) => {
60211
60439
  } = ownerState;
60212
60440
  const slots = {
60213
60441
  root: ["root"],
60442
+ backdrop: ["backdrop"],
60214
60443
  container: ["container", `scroll${capitalize(scroll)}`],
60215
60444
  paper: ["paper", `paperScroll${capitalize(scroll)}`, `paperWidth${capitalize(String(maxWidth2))}`, fullWidth && "paperFullWidth", fullScreen && "paperFullScreen"]
60216
60445
  };
@@ -60388,6 +60617,7 @@ const Dialog = /* @__PURE__ */ React__namespace.forwardRef(function Dialog2(inPr
60388
60617
  open: open2,
60389
60618
  PaperComponent = Paper,
60390
60619
  PaperProps = {},
60620
+ role = "dialog",
60391
60621
  scroll = "paper",
60392
60622
  slots = {},
60393
60623
  slotProps = {},
@@ -60453,14 +60683,24 @@ const Dialog = /* @__PURE__ */ React__namespace.forwardRef(function Dialog2(inPr
60453
60683
  elementType: DialogBackdrop,
60454
60684
  shouldForwardComponentProp: true,
60455
60685
  externalForwardedProps,
60456
- ownerState
60686
+ ownerState,
60687
+ className: classes.backdrop
60457
60688
  });
60458
60689
  const [PaperSlot, paperSlotProps] = useSlot("paper", {
60459
60690
  elementType: DialogPaper,
60460
60691
  shouldForwardComponentProp: true,
60461
60692
  externalForwardedProps,
60462
60693
  ownerState,
60463
- className: clsx(classes.paper, PaperProps.className)
60694
+ className: classes.paper,
60695
+ additionalProps: {
60696
+ elevation: 24,
60697
+ role,
60698
+ "aria-describedby": ariaDescribedby,
60699
+ "aria-labelledby": ariaLabelledby,
60700
+ "aria-modal": ariaModal,
60701
+ tabIndex: -1,
60702
+ [FOCUSABLE_ATTRIBUTE]: ""
60703
+ }
60464
60704
  });
60465
60705
  const [ContainerSlot, containerSlotProps] = useSlot("container", {
60466
60706
  elementType: DialogContainer,
@@ -60504,11 +60744,6 @@ const Dialog = /* @__PURE__ */ React__namespace.forwardRef(function Dialog2(inPr
60504
60744
  ...containerSlotProps,
60505
60745
  children: /* @__PURE__ */ jsxRuntime.jsx(PaperSlot, {
60506
60746
  as: PaperComponent,
60507
- elevation: 24,
60508
- role: "dialog",
60509
- "aria-describedby": ariaDescribedby,
60510
- "aria-labelledby": ariaLabelledby,
60511
- "aria-modal": ariaModal,
60512
60747
  ...paperSlotProps,
60513
60748
  children: /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, {
60514
60749
  value: dialogContextValue,
@@ -60616,6 +60851,13 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes = {
60616
60851
  * @deprecated Use `slotProps.paper` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
60617
60852
  */
60618
60853
  PaperProps: PropTypes.object,
60854
+ /**
60855
+ * The ARIA role for the dialog element.
60856
+ * The main dialog role is `dialog`, but `alertdialog` can be used if the content of the dialog requires immediate attention.
60857
+ * See https://www.w3.org/TR/wai-aria-1.2/#dialog and https://www.w3.org/TR/wai-aria-1.2/#alertdialog for more details.
60858
+ * @default 'dialog'
60859
+ */
60860
+ role: PropTypes.oneOf(["alertdialog", "dialog"]),
60619
60861
  /**
60620
60862
  * Determine the container for scrolling the dialog.
60621
60863
  * @default 'paper'
@@ -60674,7 +60916,9 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes = {
60674
60916
  */
60675
60917
  TransitionProps: PropTypes.object
60676
60918
  } : void 0;
60677
- const PickersModalDialogRoot = styled(Dialog)({
60919
+ const PickersModalDialogRoot = styled(Dialog, {
60920
+ slot: "internal"
60921
+ })({
60678
60922
  [`& .${dialogClasses.container}`]: {
60679
60923
  outline: 0
60680
60924
  },
@@ -60683,7 +60927,9 @@ const PickersModalDialogRoot = styled(Dialog)({
60683
60927
  minWidth: DIALOG_WIDTH
60684
60928
  }
60685
60929
  });
60686
- const PickersModalDialogContent = styled(DialogContent)({
60930
+ const PickersModalDialogContent = styled(DialogContent, {
60931
+ slot: "internal"
60932
+ })({
60687
60933
  "&:first-of-type": {
60688
60934
  padding: 0
60689
60935
  }
@@ -60778,8 +61024,8 @@ const useMobilePicker = (_ref) => {
60778
61024
  });
60779
61025
  const renderPicker = () => /* @__PURE__ */ jsxRuntime.jsxs(PickerProvider, _extends({}, providerProps, {
60780
61026
  children: [/* @__PURE__ */ jsxRuntime.jsx(Field, _extends({}, fieldProps, {
60781
- slots,
60782
- slotProps,
61027
+ slots: _extends({}, slots, fieldProps.slots),
61028
+ slotProps: _extends({}, slotProps, fieldProps.slotProps),
60783
61029
  inputRef
60784
61030
  })), /* @__PURE__ */ jsxRuntime.jsx(PickersModalDialog, {
60785
61031
  slots,
@@ -60960,7 +61206,7 @@ MobileDatePicker.propTypes = {
60960
61206
  * @param {TValue} value The value that was just accepted.
60961
61207
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
60962
61208
  * - `validationError`: validation result of the current value
60963
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
61209
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
60964
61210
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
60965
61211
  */
60966
61212
  onAccept: PropTypes.func,
@@ -61308,7 +61554,7 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
61308
61554
  * @param {TValue} value The value that was just accepted.
61309
61555
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
61310
61556
  * - `validationError`: validation result of the current value
61311
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
61557
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
61312
61558
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
61313
61559
  */
61314
61560
  onAccept: PropTypes.func,
@@ -63299,7 +63545,7 @@ const Tabs = /* @__PURE__ */ React__namespace.forwardRef(function Tabs2(inProps,
63299
63545
  slots,
63300
63546
  slotProps: {
63301
63547
  indicator: TabIndicatorProps,
63302
- scrollButton: TabScrollButtonProps,
63548
+ scrollButtons: TabScrollButtonProps,
63303
63549
  ...slotProps
63304
63550
  }
63305
63551
  };
@@ -63331,7 +63577,7 @@ const Tabs = /* @__PURE__ */ React__namespace.forwardRef(function Tabs2(inProps,
63331
63577
  }
63332
63578
  tabMeta = tab ? tab.getBoundingClientRect() : null;
63333
63579
  if (process.env.NODE_ENV !== "production") {
63334
- if (process.env.NODE_ENV !== "test" && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0 && // if the whole Tabs component is hidden, don't warn
63580
+ if (isLayoutSupported() && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0 && // if the whole Tabs component is hidden, don't warn
63335
63581
  tabsMeta.clientWidth !== 0) {
63336
63582
  tabsMeta = null;
63337
63583
  console.error(["MUI: The `value` provided to the Tabs component is invalid.", `The Tab with this \`value\` ("${value}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join("\n"));
@@ -63626,8 +63872,8 @@ const Tabs = /* @__PURE__ */ React__namespace.forwardRef(function Tabs2(inProps,
63626
63872
  return;
63627
63873
  }
63628
63874
  const list = tabListRef.current;
63629
- const currentFocus = ownerDocument(list).activeElement;
63630
- const role = currentFocus.getAttribute("role");
63875
+ const currentFocus = activeElement(ownerDocument(list));
63876
+ const role = currentFocus == null ? void 0 : currentFocus.getAttribute("role");
63631
63877
  if (role !== "tab") {
63632
63878
  return;
63633
63879
  }
@@ -65699,6 +65945,19 @@ function getMenuItemUtilityClass(slot) {
65699
65945
  return generateUtilityClass("MuiMenuItem", slot);
65700
65946
  }
65701
65947
  const menuItemClasses = generateUtilityClasses("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]);
65948
+ function focusWithVisible(element, focusSource) {
65949
+ if (focusSource == null) {
65950
+ element.focus();
65951
+ return;
65952
+ }
65953
+ try {
65954
+ element.focus({
65955
+ focusVisible: focusSource === "keyboard"
65956
+ });
65957
+ } catch (error) {
65958
+ element.focus();
65959
+ }
65960
+ }
65702
65961
  const overridesResolver = (props, styles2) => {
65703
65962
  const {
65704
65963
  ownerState
@@ -65844,6 +66103,7 @@ const MenuItem = /* @__PURE__ */ React__namespace.forwardRef(function MenuItem2(
65844
66103
  className,
65845
66104
  ...other
65846
66105
  } = props;
66106
+ const focusSource = useSelectFocusSource();
65847
66107
  const context = React__namespace.useContext(ListContext);
65848
66108
  const childContext = React__namespace.useMemo(() => ({
65849
66109
  dense: dense || context.dense || false,
@@ -65853,7 +66113,7 @@ const MenuItem = /* @__PURE__ */ React__namespace.forwardRef(function MenuItem2(
65853
66113
  useEnhancedEffect(() => {
65854
66114
  if (autoFocus) {
65855
66115
  if (menuItemRef.current) {
65856
- menuItemRef.current.focus();
66116
+ focusWithVisible(menuItemRef.current, focusSource);
65857
66117
  } else if (process.env.NODE_ENV !== "production") {
65858
66118
  console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered.");
65859
66119
  }
@@ -65867,6 +66127,10 @@ const MenuItem = /* @__PURE__ */ React__namespace.forwardRef(function MenuItem2(
65867
66127
  };
65868
66128
  const classes = useUtilityClasses$6(props);
65869
66129
  const handleRef = useForkRef(menuItemRef, ref);
66130
+ const {
66131
+ root,
66132
+ ...forwardedClasses
66133
+ } = classes;
65870
66134
  let tabIndex;
65871
66135
  if (!props.disabled) {
65872
66136
  tabIndex = tabIndexProp !== void 0 ? tabIndexProp : -1;
@@ -65882,7 +66146,7 @@ const MenuItem = /* @__PURE__ */ React__namespace.forwardRef(function MenuItem2(
65882
66146
  className: clsx(classes.root, className),
65883
66147
  ...other,
65884
66148
  ownerState,
65885
- classes
66149
+ classes: forwardedClasses
65886
66150
  })
65887
66151
  });
65888
66152
  });
@@ -66618,9 +66882,10 @@ const getHourSectionOptions = ({
66618
66882
  const isFocused = (hour) => {
66619
66883
  return isSelected(hour, adapter.getHours(valueOrReferenceDate));
66620
66884
  };
66885
+ const labelReferenceDate = adapter.setDate(adapter.setMonth(adapter.startOfDay(now), 0), 15);
66621
66886
  const endHour = ampm ? 11 : 23;
66622
66887
  for (let hour = 0; hour <= endHour; hour += timeStep) {
66623
- let label = adapter.format(adapter.setHours(now, hour), ampm ? "hours12h" : "hours24h");
66888
+ let label = adapter.format(adapter.setHours(labelReferenceDate, hour), ampm ? "hours12h" : "hours24h");
66624
66889
  const ariaLabel = resolveAriaLabel(parseInt(label, 10).toString());
66625
66890
  label = adapter.formatNumber(label);
66626
66891
  result.push({
@@ -67666,7 +67931,7 @@ DesktopDateTimePicker.propTypes = {
67666
67931
  * @param {TValue} value The value that was just accepted.
67667
67932
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
67668
67933
  * - `validationError`: validation result of the current value
67669
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
67934
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
67670
67935
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
67671
67936
  */
67672
67937
  onAccept: PropTypes.func,
@@ -68138,7 +68403,7 @@ MobileDateTimePicker.propTypes = {
68138
68403
  * @param {TValue} value The value that was just accepted.
68139
68404
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
68140
68405
  * - `validationError`: validation result of the current value
68141
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
68406
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
68142
68407
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
68143
68408
  */
68144
68409
  onAccept: PropTypes.func,
@@ -68556,7 +68821,7 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
68556
68821
  * @param {TValue} value The value that was just accepted.
68557
68822
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
68558
68823
  * - `validationError`: validation result of the current value
68559
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
68824
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
68560
68825
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
68561
68826
  */
68562
68827
  onAccept: PropTypes.func,
@@ -68898,6 +69163,12 @@ const TextFieldDateElement = ({
68898
69163
  )
68899
69164
  ] });
68900
69165
  };
69166
+ function useForcedRerendering() {
69167
+ const [, setState] = React__namespace.useState({});
69168
+ return React__namespace.useCallback(() => {
69169
+ setState({});
69170
+ }, []);
69171
+ }
68901
69172
  function usePreviousProps(value) {
68902
69173
  const ref = React__namespace.useRef({});
68903
69174
  React__namespace.useEffect(() => {
@@ -68950,10 +69221,8 @@ function createFilterOptions(config2 = {}) {
68950
69221
  }
68951
69222
  const defaultFilterOptions = createFilterOptions();
68952
69223
  const pageSize = 5;
68953
- const defaultIsActiveElementInListbox = (listboxRef) => {
68954
- var _a;
68955
- return listboxRef.current !== null && ((_a = listboxRef.current.parentElement) == null ? void 0 : _a.contains(document.activeElement));
68956
- };
69224
+ const defaultIsActiveElementInListbox = (listboxRef) => listboxRef.current !== null && contains(listboxRef.current.parentElement, document.activeElement);
69225
+ const defaultIsOptionEqualToValue = (option, value) => option === value;
68957
69226
  const MULTIPLE_DEFAULT_VALUE = [];
68958
69227
  function getInputValue(value, multiple, getOptionLabel, renderValue) {
68959
69228
  if (multiple || value == null || renderValue) {
@@ -68992,7 +69261,7 @@ function useAutocomplete(props) {
68992
69261
  id: idProp,
68993
69262
  includeInputInList = false,
68994
69263
  inputValue: inputValueProp,
68995
- isOptionEqualToValue = (option, value2) => option === value2,
69264
+ isOptionEqualToValue = defaultIsOptionEqualToValue,
68996
69265
  multiple = false,
68997
69266
  onChange,
68998
69267
  onClose,
@@ -69024,10 +69293,14 @@ function useAutocomplete(props) {
69024
69293
  const firstFocus = React__namespace.useRef(true);
69025
69294
  const inputRef = React__namespace.useRef(null);
69026
69295
  const listboxRef = React__namespace.useRef(null);
69296
+ const windowLostFocus = React__namespace.useRef(false);
69027
69297
  const [anchorEl, setAnchorEl] = React__namespace.useState(null);
69028
69298
  const [focusedItem, setFocusedItem] = React__namespace.useState(-1);
69029
69299
  const defaultHighlighted = autoHighlight ? 0 : -1;
69030
69300
  const highlightedIndexRef = React__namespace.useRef(defaultHighlighted);
69301
+ const highlightReasonRef = React__namespace.useRef(null);
69302
+ const touchScrolledRef = React__namespace.useRef(false);
69303
+ const isTouchRef = React__namespace.useRef(false);
69031
69304
  const initialInputValue = React__namespace.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
69032
69305
  const [value, setValueState] = useControlled({
69033
69306
  controlled: valueProp,
@@ -69042,8 +69315,8 @@ function useAutocomplete(props) {
69042
69315
  });
69043
69316
  const [focused, setFocused] = React__namespace.useState(false);
69044
69317
  const resetInputValue = React__namespace.useCallback((event, newValue, reason) => {
69045
- const isOptionSelected = multiple ? value.length < newValue.length : newValue !== null;
69046
- if (!isOptionSelected && !clearOnBlur) {
69318
+ const isOptionSelected2 = multiple ? value.length < newValue.length : newValue !== null;
69319
+ if (!isOptionSelected2 && !clearOnBlur) {
69047
69320
  return;
69048
69321
  }
69049
69322
  const newInputValue = getInputValue(newValue, multiple, getOptionLabel, renderValue);
@@ -69064,9 +69337,30 @@ function useAutocomplete(props) {
69064
69337
  const [inputPristine, setInputPristine] = React__namespace.useState(true);
69065
69338
  const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);
69066
69339
  const popupOpen = open2 && !readOnly;
69340
+ const selectedValues = React__namespace.useMemo(() => {
69341
+ if (multiple) {
69342
+ return value;
69343
+ }
69344
+ if (value != null) {
69345
+ return [value];
69346
+ }
69347
+ return [];
69348
+ }, [multiple, value]);
69349
+ const selectedValuesSet = React__namespace.useMemo(() => {
69350
+ if (isOptionEqualToValue !== defaultIsOptionEqualToValue || selectedValues.length === 0) {
69351
+ return null;
69352
+ }
69353
+ return new Set(selectedValues);
69354
+ }, [isOptionEqualToValue, selectedValues]);
69355
+ const isOptionSelected = React__namespace.useCallback((option) => {
69356
+ if (selectedValuesSet) {
69357
+ return selectedValuesSet.has(option);
69358
+ }
69359
+ return selectedValues.some((value2) => value2 != null && isOptionEqualToValue(option, value2));
69360
+ }, [isOptionEqualToValue, selectedValues, selectedValuesSet]);
69067
69361
  const filteredOptions = popupOpen ? filterOptions(
69068
69362
  options.filter((option) => {
69069
- if (filterSelectedOptions && (multiple ? value : [value]).some((value2) => value2 !== null && isOptionEqualToValue(option, value2))) {
69363
+ if (filterSelectedOptions && isOptionSelected(option)) {
69070
69364
  return false;
69071
69365
  }
69072
69366
  return true;
@@ -69129,20 +69423,16 @@ function useAutocomplete(props) {
69129
69423
  }
69130
69424
  }
69131
69425
  }
69132
- const setHighlightedIndex = useEventCallback(({
69133
- event,
69426
+ const syncHighlightedIndexToDOM = useEventCallback(({
69134
69427
  index,
69135
- reason
69428
+ reason,
69429
+ preserveScroll = false
69136
69430
  }) => {
69137
- highlightedIndexRef.current = index;
69138
69431
  if (index === -1) {
69139
69432
  inputRef.current.removeAttribute("aria-activedescendant");
69140
69433
  } else {
69141
69434
  inputRef.current.setAttribute("aria-activedescendant", `${id}-option-${index}`);
69142
69435
  }
69143
- if (onHighlightChange && ["mouse", "keyboard", "touch"].includes(reason)) {
69144
- onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
69145
- }
69146
69436
  if (!listboxRef.current) {
69147
69437
  return;
69148
69438
  }
@@ -69159,7 +69449,9 @@ function useAutocomplete(props) {
69159
69449
  return;
69160
69450
  }
69161
69451
  if (index === -1) {
69162
- listboxNode.scrollTop = 0;
69452
+ if (!preserveScroll) {
69453
+ listboxNode.scrollTop = 0;
69454
+ }
69163
69455
  return;
69164
69456
  }
69165
69457
  const option = listboxRef.current.querySelector(`[data-option-index="${index}"]`);
@@ -69181,15 +69473,46 @@ function useAutocomplete(props) {
69181
69473
  }
69182
69474
  }
69183
69475
  });
69476
+ const setHighlightedIndex = useEventCallback(({
69477
+ event,
69478
+ index,
69479
+ reason,
69480
+ preserveScroll = false
69481
+ }) => {
69482
+ highlightedIndexRef.current = index;
69483
+ highlightReasonRef.current = reason ?? null;
69484
+ if (onHighlightChange && ["mouse", "keyboard", "touch"].includes(reason)) {
69485
+ onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
69486
+ }
69487
+ syncHighlightedIndexToDOM({
69488
+ index,
69489
+ reason,
69490
+ preserveScroll
69491
+ });
69492
+ });
69493
+ const setHighlightedIndexFromSync = useEventCallback(({
69494
+ index
69495
+ }) => {
69496
+ highlightedIndexRef.current = index;
69497
+ syncHighlightedIndexToDOM({
69498
+ index,
69499
+ reason: highlightReasonRef.current
69500
+ });
69501
+ });
69184
69502
  const changeHighlightedIndex = useEventCallback(({
69185
69503
  event,
69186
69504
  diff,
69187
69505
  direction = "next",
69188
- reason
69506
+ reason,
69507
+ preserveScroll
69189
69508
  }) => {
69190
69509
  if (!popupOpen) {
69191
69510
  return;
69192
69511
  }
69512
+ if (reason === "keyboard") {
69513
+ touchScrolledRef.current = false;
69514
+ isTouchRef.current = false;
69515
+ }
69193
69516
  const getNextIndex = () => {
69194
69517
  const maxIndex = filteredOptions.length - 1;
69195
69518
  if (diff === "reset") {
@@ -69226,7 +69549,8 @@ function useAutocomplete(props) {
69226
69549
  setHighlightedIndex({
69227
69550
  index: nextIndex,
69228
69551
  reason,
69229
- event
69552
+ event,
69553
+ preserveScroll
69230
69554
  });
69231
69555
  if (autoComplete && diff !== "reset") {
69232
69556
  if (nextIndex === -1) {
@@ -69267,18 +69591,23 @@ function useAutocomplete(props) {
69267
69591
  return -1;
69268
69592
  };
69269
69593
  const syncHighlightedIndex = React__namespace.useCallback(() => {
69594
+ var _a, _b;
69270
69595
  if (!popupOpen) {
69271
69596
  return;
69272
69597
  }
69273
69598
  const previousHighlightedOptionIndex = getPreviousHighlightedOptionIndex();
69274
69599
  if (previousHighlightedOptionIndex !== -1) {
69275
- highlightedIndexRef.current = previousHighlightedOptionIndex;
69600
+ setHighlightedIndexFromSync({
69601
+ index: previousHighlightedOptionIndex
69602
+ });
69276
69603
  return;
69277
69604
  }
69278
69605
  const valueItem = multiple ? value[0] : value;
69279
69606
  if (filteredOptions.length === 0 || valueItem == null) {
69607
+ const isAppendOnly = filteredOptionsChanged && previousProps.inputValue === inputValue && ((_a = previousProps.filteredOptions) == null ? void 0 : _a.length) > 0 && filteredOptions.length > previousProps.filteredOptions.length && previousProps.filteredOptions.every((option, index) => getOptionLabel(option) === getOptionLabel(filteredOptions[index]));
69280
69608
  changeHighlightedIndex({
69281
- diff: "reset"
69609
+ diff: "reset",
69610
+ preserveScroll: isAppendOnly
69282
69611
  });
69283
69612
  return;
69284
69613
  }
@@ -69287,7 +69616,10 @@ function useAutocomplete(props) {
69287
69616
  }
69288
69617
  if (valueItem != null) {
69289
69618
  const currentOption = filteredOptions[highlightedIndexRef.current];
69290
- if (multiple && currentOption && value.findIndex((val) => isOptionEqualToValue(currentOption, val)) !== -1) {
69619
+ if (multiple && currentOption && value.findIndex((val) => isOptionEqualToValue(currentOption, val)) !== -1 && ((_b = previousProps.filteredOptions) == null ? void 0 : _b.length) > 0) {
69620
+ setHighlightedIndexFromSync({
69621
+ index: highlightedIndexRef.current
69622
+ });
69291
69623
  return;
69292
69624
  }
69293
69625
  const itemIndex = filteredOptions.findIndex((optionItem) => isOptionEqualToValue(optionItem, valueItem));
@@ -69317,9 +69649,9 @@ function useAutocomplete(props) {
69317
69649
  // Don't sync the highlighted index with the value when multiple
69318
69650
  // eslint-disable-next-line react-hooks/exhaustive-deps
69319
69651
  multiple ? false : value,
69320
- filterSelectedOptions,
69321
69652
  changeHighlightedIndex,
69322
69653
  setHighlightedIndex,
69654
+ setHighlightedIndexFromSync,
69323
69655
  popupOpen,
69324
69656
  inputValue,
69325
69657
  multiple
@@ -69343,16 +69675,29 @@ function useAutocomplete(props) {
69343
69675
  }, [componentName]);
69344
69676
  }
69345
69677
  React__namespace.useEffect(() => {
69346
- if (filteredOptionsChanged || popupOpen) {
69678
+ if (filteredOptionsChanged || popupOpen && !disableCloseOnSelect) {
69347
69679
  syncHighlightedIndex();
69348
69680
  }
69349
- }, [syncHighlightedIndex, filteredOptionsChanged, popupOpen]);
69681
+ }, [syncHighlightedIndex, filteredOptionsChanged, popupOpen, disableCloseOnSelect]);
69682
+ React__namespace.useEffect(() => {
69683
+ if (typeof window === "undefined") {
69684
+ return void 0;
69685
+ }
69686
+ const handleWindowBlur = () => {
69687
+ windowLostFocus.current = true;
69688
+ };
69689
+ window.addEventListener("blur", handleWindowBlur);
69690
+ return () => {
69691
+ window.removeEventListener("blur", handleWindowBlur);
69692
+ };
69693
+ }, []);
69350
69694
  const handleOpen = (event) => {
69351
69695
  if (open2) {
69352
69696
  return;
69353
69697
  }
69354
69698
  setOpenState(true);
69355
69699
  setInputPristine(true);
69700
+ isTouchRef.current = false;
69356
69701
  if (onOpen) {
69357
69702
  onOpen(event);
69358
69703
  }
@@ -69362,6 +69707,8 @@ function useAutocomplete(props) {
69362
69707
  return;
69363
69708
  }
69364
69709
  setOpenState(false);
69710
+ touchScrolledRef.current = false;
69711
+ highlightReasonRef.current = null;
69365
69712
  if (onClose) {
69366
69713
  onClose(event, reason);
69367
69714
  }
@@ -69379,7 +69726,6 @@ function useAutocomplete(props) {
69379
69726
  }
69380
69727
  setValueState(newValue);
69381
69728
  };
69382
- const isTouch = React__namespace.useRef(false);
69383
69729
  const selectNewValue = (event, option, reasonProp = "selectOption", origin = "options") => {
69384
69730
  let reason = reasonProp;
69385
69731
  let newValue = option;
@@ -69406,7 +69752,7 @@ function useAutocomplete(props) {
69406
69752
  if (!disableCloseOnSelect && (!event || !event.ctrlKey && !event.metaKey)) {
69407
69753
  handleClose(event, reason);
69408
69754
  }
69409
- if (blurOnSelect === true || blurOnSelect === "touch" && isTouch.current || blurOnSelect === "mouse" && !isTouch.current) {
69755
+ if (blurOnSelect === true || blurOnSelect === "touch" && isTouchRef.current || blurOnSelect === "mouse" && !isTouchRef.current) {
69410
69756
  inputRef.current.blur();
69411
69757
  }
69412
69758
  };
@@ -69436,9 +69782,13 @@ function useAutocomplete(props) {
69436
69782
  handleClose(event, "toggleInput");
69437
69783
  }
69438
69784
  let nextItem2 = focusedItem;
69439
- if (focusedItem === -1) {
69440
- if (inputValue === "" && direction === "previous") {
69441
- nextItem2 = value.length - 1;
69785
+ if (focusedItem === -1 && direction === "previous") {
69786
+ nextItem2 = value.length - 1;
69787
+ if (freeSolo && inputValue !== "") {
69788
+ setInputValueState("");
69789
+ if (onInputChange) {
69790
+ onInputChange(event, "", "reset");
69791
+ }
69442
69792
  }
69443
69793
  } else {
69444
69794
  nextItem2 += direction === "next" ? 1 : -1;
@@ -69536,22 +69886,39 @@ function useAutocomplete(props) {
69536
69886
  });
69537
69887
  handleOpen(event);
69538
69888
  break;
69539
- case "ArrowLeft":
69540
- if (!multiple && renderValue) {
69889
+ case "ArrowLeft": {
69890
+ const input = inputRef.current;
69891
+ const caretAtStart = input && input.selectionStart === 0 && input.selectionEnd === 0;
69892
+ if (!caretAtStart) {
69893
+ return;
69894
+ }
69895
+ if (!multiple && renderValue && value != null) {
69896
+ if (freeSolo && inputValue !== "") {
69897
+ setInputValueState("");
69898
+ if (onInputChange) {
69899
+ onInputChange(event, "", "reset");
69900
+ }
69901
+ }
69902
+ setFocusedItem(0);
69541
69903
  focusItem(0);
69542
69904
  } else {
69543
69905
  handleFocusItem(event, "previous");
69544
69906
  }
69545
69907
  break;
69908
+ }
69546
69909
  case "ArrowRight":
69547
69910
  if (!multiple && renderValue) {
69911
+ setFocusedItem(-1);
69548
69912
  focusItem(-1);
69549
69913
  } else {
69550
69914
  handleFocusItem(event, "next");
69551
69915
  }
69552
69916
  break;
69553
- case "Enter":
69554
- if (highlightedIndexRef.current !== -1 && popupOpen) {
69917
+ case "Enter": {
69918
+ const shouldSelectHighlighted = !freeSolo || inputPristine || highlightReasonRef.current !== null;
69919
+ if (highlightedIndexRef.current !== -1 && popupOpen && shouldSelectHighlighted && // After a touch-scroll the highlight is stale (the user scrolled
69920
+ // past it), so skip selection until the next deliberate interaction.
69921
+ !touchScrolledRef.current) {
69555
69922
  const option = filteredOptions[highlightedIndexRef.current];
69556
69923
  const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
69557
69924
  event.preventDefault();
@@ -69567,8 +69934,12 @@ function useAutocomplete(props) {
69567
69934
  event.preventDefault();
69568
69935
  }
69569
69936
  selectNewValue(event, inputValue, "createOption", "freeSolo");
69937
+ } else if (popupOpen && touchScrolledRef.current) {
69938
+ event.preventDefault();
69939
+ handleClose(event, "escape");
69570
69940
  }
69571
69941
  break;
69942
+ }
69572
69943
  case "Escape":
69573
69944
  if (popupOpen) {
69574
69945
  event.preventDefault();
@@ -69589,9 +69960,10 @@ function useAutocomplete(props) {
69589
69960
  option: value[index]
69590
69961
  });
69591
69962
  }
69592
- if (!multiple && renderValue && !readOnly) {
69593
- setValueState(null);
69594
- focusItem(-1);
69963
+ if (!multiple && renderValue && !readOnly && inputValue === "") {
69964
+ handleValue(event, null, "removeOption", {
69965
+ option: value
69966
+ });
69595
69967
  }
69596
69968
  break;
69597
69969
  case "Delete":
@@ -69603,9 +69975,10 @@ function useAutocomplete(props) {
69603
69975
  option: value[index]
69604
69976
  });
69605
69977
  }
69606
- if (!multiple && renderValue && !readOnly) {
69607
- setValueState(null);
69608
- focusItem(-1);
69978
+ if (!multiple && renderValue && !readOnly && inputValue === "") {
69979
+ handleValue(event, null, "removeOption", {
69980
+ option: value
69981
+ });
69609
69982
  }
69610
69983
  break;
69611
69984
  }
@@ -69613,6 +69986,14 @@ function useAutocomplete(props) {
69613
69986
  };
69614
69987
  const handleFocus = (event) => {
69615
69988
  setFocused(true);
69989
+ if (focusedItem !== -1) {
69990
+ setFocusedItem(-1);
69991
+ focusItem(-1);
69992
+ }
69993
+ if (windowLostFocus.current) {
69994
+ windowLostFocus.current = false;
69995
+ return;
69996
+ }
69616
69997
  if (openOnFocus && !ignoreFocus.current) {
69617
69998
  handleOpen(event);
69618
69999
  }
@@ -69625,7 +70006,7 @@ function useAutocomplete(props) {
69625
70006
  setFocused(false);
69626
70007
  firstFocus.current = true;
69627
70008
  ignoreFocus.current = false;
69628
- if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen) {
70009
+ if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen && highlightReasonRef.current !== "mouse" && highlightReasonRef.current !== "touch") {
69629
70010
  selectNewValue(event, filteredOptions[highlightedIndexRef.current], "blur");
69630
70011
  } else if (autoSelect && freeSolo && inputValue !== "") {
69631
70012
  selectNewValue(event, inputValue, "blur", "freeSolo");
@@ -69636,20 +70017,24 @@ function useAutocomplete(props) {
69636
70017
  };
69637
70018
  const handleInputChange = (event) => {
69638
70019
  const newValue = event.target.value;
69639
- if (inputValue !== newValue) {
70020
+ const valueChanged = inputValue !== newValue;
70021
+ if (valueChanged) {
69640
70022
  setInputValueState(newValue);
69641
- setInputPristine(false);
70023
+ touchScrolledRef.current = false;
69642
70024
  if (onInputChange) {
69643
70025
  onInputChange(event, newValue, "input");
69644
70026
  }
69645
70027
  }
69646
70028
  if (newValue === "") {
69647
- if (!disableClearable && !multiple) {
70029
+ if (!disableClearable && !multiple && !renderValue) {
69648
70030
  handleValue(event, null, "clear");
69649
70031
  }
69650
70032
  } else {
69651
70033
  handleOpen(event);
69652
70034
  }
70035
+ if (valueChanged) {
70036
+ setInputPristine(false);
70037
+ }
69653
70038
  };
69654
70039
  const handleOptionMouseMove = (event) => {
69655
70040
  const index = Number(event.currentTarget.getAttribute("data-option-index"));
@@ -69659,20 +70044,26 @@ function useAutocomplete(props) {
69659
70044
  index,
69660
70045
  reason: "mouse"
69661
70046
  });
70047
+ } else {
70048
+ highlightReasonRef.current = "mouse";
70049
+ }
70050
+ if (!isTouchRef.current) {
70051
+ touchScrolledRef.current = false;
69662
70052
  }
69663
70053
  };
69664
70054
  const handleOptionTouchStart = (event) => {
70055
+ touchScrolledRef.current = false;
69665
70056
  setHighlightedIndex({
69666
70057
  event,
69667
70058
  index: Number(event.currentTarget.getAttribute("data-option-index")),
69668
70059
  reason: "touch"
69669
70060
  });
69670
- isTouch.current = true;
70061
+ isTouchRef.current = true;
69671
70062
  };
69672
70063
  const handleOptionClick = (event) => {
69673
70064
  const index = Number(event.currentTarget.getAttribute("data-option-index"));
69674
70065
  selectNewValue(event, filteredOptions[index], "selectOption");
69675
- isTouch.current = false;
70066
+ isTouchRef.current = false;
69676
70067
  };
69677
70068
  const handleItemDelete = (index) => (event) => {
69678
70069
  const newValue = value.slice();
@@ -69694,7 +70085,10 @@ function useAutocomplete(props) {
69694
70085
  }
69695
70086
  };
69696
70087
  const handleMouseDown = (event) => {
69697
- if (!event.currentTarget.contains(event.target)) {
70088
+ if (!contains(event.currentTarget, event.target)) {
70089
+ return;
70090
+ }
70091
+ if (anchorEl && !contains(anchorEl, event.target)) {
69698
70092
  return;
69699
70093
  }
69700
70094
  if (event.target.getAttribute("id") !== id) {
@@ -69702,7 +70096,10 @@ function useAutocomplete(props) {
69702
70096
  }
69703
70097
  };
69704
70098
  const handleClick = (event) => {
69705
- if (!event.currentTarget.contains(event.target)) {
70099
+ if (!contains(event.currentTarget, event.target)) {
70100
+ return;
70101
+ }
70102
+ if (anchorEl && !contains(anchorEl, event.target)) {
69706
70103
  return;
69707
70104
  }
69708
70105
  inputRef.current.focus();
@@ -69821,16 +70218,22 @@ function useAutocomplete(props) {
69821
70218
  role: "listbox",
69822
70219
  id: `${id}-listbox`,
69823
70220
  "aria-labelledby": `${id}-label`,
70221
+ "aria-multiselectable": multiple || void 0,
69824
70222
  ref: handleListboxRef,
69825
70223
  onMouseDown: (event) => {
69826
70224
  event.preventDefault();
70225
+ },
70226
+ onScroll: () => {
70227
+ if (isTouchRef.current) {
70228
+ touchScrolledRef.current = true;
70229
+ }
69827
70230
  }
69828
70231
  }),
69829
70232
  getOptionProps: ({
69830
70233
  index,
69831
70234
  option
69832
70235
  }) => {
69833
- const selected = (multiple ? value : [value]).some((value2) => value2 != null && isOptionEqualToValue(option, value2));
70236
+ const selected = isOptionSelected(option);
69834
70237
  const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
69835
70238
  return {
69836
70239
  key: (getOptionKey == null ? void 0 : getOptionKey(option)) ?? getOptionLabel(option),
@@ -70491,6 +70894,36 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70491
70894
  ...props,
70492
70895
  componentName: "Autocomplete"
70493
70896
  });
70897
+ const forceRenderOnResize = useForcedRerendering();
70898
+ React__namespace.useEffect(() => {
70899
+ if (!popupOpen || !anchorEl || typeof ResizeObserver === "undefined") {
70900
+ return void 0;
70901
+ }
70902
+ let lastWidth = anchorEl.clientWidth;
70903
+ const observer = new ResizeObserver(() => {
70904
+ const newWidth = anchorEl.clientWidth;
70905
+ if (lastWidth !== newWidth) {
70906
+ lastWidth = newWidth;
70907
+ forceRenderOnResize();
70908
+ }
70909
+ });
70910
+ observer.observe(anchorEl);
70911
+ return () => {
70912
+ observer.disconnect();
70913
+ };
70914
+ }, [popupOpen, anchorEl, forceRenderOnResize]);
70915
+ const previousGroupedOptionsRef = React__namespace.useRef([]);
70916
+ const prevPopupOpenRef = React__namespace.useRef(false);
70917
+ const renderedOptions = popupOpen ? groupedOptions : previousGroupedOptionsRef.current;
70918
+ useEnhancedEffect(() => {
70919
+ if (popupOpen && !prevPopupOpenRef.current) {
70920
+ previousGroupedOptionsRef.current = [];
70921
+ }
70922
+ prevPopupOpenRef.current = popupOpen;
70923
+ if (popupOpen && groupedOptions.length > 0) {
70924
+ previousGroupedOptionsRef.current = groupedOptions;
70925
+ }
70926
+ }, [popupOpen, groupedOptions]);
70494
70927
  const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
70495
70928
  const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
70496
70929
  const {
@@ -70529,6 +70962,17 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70529
70962
  ...slotProps
70530
70963
  }
70531
70964
  };
70965
+ const [RootSlot, rootProps] = useSlot("root", {
70966
+ ref,
70967
+ className: [classes.root, className],
70968
+ elementType: AutocompleteRoot,
70969
+ externalForwardedProps: {
70970
+ ...externalForwardedProps,
70971
+ ...other
70972
+ },
70973
+ getSlotProps: getRootProps,
70974
+ ownerState
70975
+ });
70532
70976
  const [ListboxSlot, listboxProps] = useSlot("listbox", {
70533
70977
  elementType: AutocompleteListbox,
70534
70978
  externalForwardedProps,
@@ -70551,13 +70995,43 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70551
70995
  additionalProps: {
70552
70996
  disablePortal,
70553
70997
  style: {
70554
- width: anchorEl ? anchorEl.clientWidth : null
70998
+ width: anchorEl ? anchorEl.clientWidth : null,
70999
+ // Prevent interaction with stale cached options during exit transitions.
71000
+ // The hook's filteredOptions is [] when popupOpen=false, so clicks on stale
71001
+ // rendered options would pass undefined to selectNewValue.
71002
+ pointerEvents: popupOpen ? void 0 : "none"
70555
71003
  },
70556
71004
  role: "presentation",
70557
71005
  anchorEl,
70558
71006
  open: popupOpen
70559
71007
  }
70560
71008
  });
71009
+ const hasPopupContent = renderedOptions.length > 0 || loading || !freeSolo || popperProps.keepMounted === true;
71010
+ const [ClearIndicatorSlot, clearIndicatorProps] = useSlot("clearIndicator", {
71011
+ elementType: AutocompleteClearIndicator,
71012
+ externalForwardedProps,
71013
+ ownerState,
71014
+ className: classes.clearIndicator,
71015
+ shouldForwardComponentProp: true,
71016
+ additionalProps: {
71017
+ ...getClearProps(),
71018
+ "aria-label": clearText,
71019
+ title: clearText
71020
+ }
71021
+ });
71022
+ const [PopupIndicatorSlot, popupIndicatorProps] = useSlot("popupIndicator", {
71023
+ elementType: AutocompletePopupIndicator,
71024
+ externalForwardedProps,
71025
+ ownerState,
71026
+ className: classes.popupIndicator,
71027
+ shouldForwardComponentProp: true,
71028
+ additionalProps: {
71029
+ ...getPopupIndicatorProps(),
71030
+ disabled,
71031
+ "aria-label": popupOpen ? closeText : openText,
71032
+ title: popupOpen ? closeText : openText
71033
+ }
71034
+ });
70561
71035
  let startAdornment;
70562
71036
  const getCustomizedItemProps = (params) => ({
70563
71037
  className: classes.tag,
@@ -70638,18 +71112,13 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70638
71112
  inputValue
70639
71113
  }, ownerState);
70640
71114
  };
70641
- const clearIndicatorSlotProps = externalForwardedProps.slotProps.clearIndicator;
70642
- const popupIndicatorSlotProps = externalForwardedProps.slotProps.popupIndicator;
70643
71115
  return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, {
70644
- children: [/* @__PURE__ */ jsxRuntime.jsx(AutocompleteRoot, {
70645
- ref,
70646
- className: clsx(classes.root, className),
70647
- ownerState,
70648
- ...getRootProps(other),
71116
+ children: [/* @__PURE__ */ jsxRuntime.jsx(RootSlot, {
71117
+ ...rootProps,
70649
71118
  children: renderInput({
70650
71119
  id,
70651
71120
  disabled,
70652
- fullWidth: true,
71121
+ fullWidth: props.fullWidth ?? true,
70653
71122
  size: size === "small" ? "small" : void 0,
70654
71123
  InputLabelProps: getInputLabelProps(),
70655
71124
  InputProps: {
@@ -70665,22 +71134,11 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70665
71134
  endAdornment: /* @__PURE__ */ jsxRuntime.jsxs(AutocompleteEndAdornment, {
70666
71135
  className: classes.endAdornment,
70667
71136
  ownerState,
70668
- children: [hasClearIcon ? /* @__PURE__ */ jsxRuntime.jsx(AutocompleteClearIndicator, {
70669
- ...getClearProps(),
70670
- "aria-label": clearText,
70671
- title: clearText,
70672
- ownerState,
70673
- ...clearIndicatorSlotProps,
70674
- className: clsx(classes.clearIndicator, clearIndicatorSlotProps == null ? void 0 : clearIndicatorSlotProps.className),
71137
+ children: [hasClearIcon ? /* @__PURE__ */ jsxRuntime.jsx(ClearIndicatorSlot, {
71138
+ ...clearIndicatorProps,
70675
71139
  children: clearIcon
70676
- }) : null, hasPopupIcon ? /* @__PURE__ */ jsxRuntime.jsx(AutocompletePopupIndicator, {
70677
- ...getPopupIndicatorProps(),
70678
- disabled,
70679
- "aria-label": popupOpen ? closeText : openText,
70680
- title: popupOpen ? closeText : openText,
70681
- ownerState,
70682
- ...popupIndicatorSlotProps,
70683
- className: clsx(classes.popupIndicator, popupIndicatorSlotProps == null ? void 0 : popupIndicatorSlotProps.className),
71140
+ }) : null, hasPopupIcon ? /* @__PURE__ */ jsxRuntime.jsx(PopupIndicatorSlot, {
71141
+ ...popupIndicatorProps,
70684
71142
  children: popupIcon
70685
71143
  }) : null]
70686
71144
  })
@@ -70693,17 +71151,17 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70693
71151
  ...getInputProps()
70694
71152
  }
70695
71153
  })
70696
- }), anchorEl ? /* @__PURE__ */ jsxRuntime.jsx(AutocompletePopper, {
71154
+ }), anchorEl && hasPopupContent ? /* @__PURE__ */ jsxRuntime.jsx(AutocompletePopper, {
70697
71155
  as: PopperSlot,
70698
71156
  ...popperProps,
70699
71157
  children: /* @__PURE__ */ jsxRuntime.jsxs(AutocompletePaper, {
70700
71158
  as: PaperSlot,
70701
71159
  ...paperProps,
70702
- children: [loading && groupedOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(AutocompleteLoading, {
71160
+ children: [loading && renderedOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(AutocompleteLoading, {
70703
71161
  className: classes.loading,
70704
71162
  ownerState,
70705
71163
  children: loadingText
70706
- }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /* @__PURE__ */ jsxRuntime.jsx(AutocompleteNoOptions, {
71164
+ }) : null, renderedOptions.length === 0 && !freeSolo && !loading ? /* @__PURE__ */ jsxRuntime.jsx(AutocompleteNoOptions, {
70707
71165
  className: classes.noOptions,
70708
71166
  ownerState,
70709
71167
  role: "presentation",
@@ -70711,10 +71169,9 @@ const Autocomplete = /* @__PURE__ */ React__namespace.forwardRef(function Autoco
70711
71169
  event.preventDefault();
70712
71170
  },
70713
71171
  children: noOptionsText
70714
- }) : null, groupedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ListboxSlot, {
70715
- as: ListboxComponentProp,
71172
+ }) : null, renderedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ListboxSlot, {
70716
71173
  ...listboxProps,
70717
- children: groupedOptions.map((option, index) => {
71174
+ children: renderedOptions.map((option, index) => {
70718
71175
  if (groupBy2) {
70719
71176
  return renderGroup({
70720
71177
  key: option.key,
@@ -70747,12 +71204,11 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes = {
70747
71204
  */
70748
71205
  autoHighlight: PropTypes.bool,
70749
71206
  /**
70750
- * If `true`, the selected option becomes the value of the input
70751
- * when the Autocomplete loses focus unless the user chooses
70752
- * a different option or changes the character string in the input.
71207
+ * If `true`, the value is updated when the input loses focus under one of these conditions:
70753
71208
  *
70754
- * When using the `freeSolo` mode, the typed value will be the input value
70755
- * if the Autocomplete loses focus without highlighting an option.
71209
+ * - An option highlighted via keyboard navigation or `autoHighlight` is selected.
71210
+ * Hover and touch highlights are ignored.
71211
+ * - Otherwise, in `freeSolo` mode, the typed text becomes the value.
70756
71212
  * @default false
70757
71213
  */
70758
71214
  autoSelect: PropTypes.bool,
@@ -71163,16 +71619,20 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes = {
71163
71619
  listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
71164
71620
  paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
71165
71621
  popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
71166
- popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
71622
+ popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
71623
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
71167
71624
  }),
71168
71625
  /**
71169
71626
  * The components used for each slot inside.
71170
71627
  * @default {}
71171
71628
  */
71172
71629
  slots: PropTypes.shape({
71630
+ clearIndicator: PropTypes.elementType,
71173
71631
  listbox: PropTypes.elementType,
71174
71632
  paper: PropTypes.elementType,
71175
- popper: PropTypes.elementType
71633
+ popper: PropTypes.elementType,
71634
+ popupIndicator: PropTypes.elementType,
71635
+ root: PropTypes.elementType
71176
71636
  }),
71177
71637
  /**
71178
71638
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -72946,7 +73406,7 @@ DesktopTimePicker.propTypes = {
72946
73406
  * @param {TValue} value The value that was just accepted.
72947
73407
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
72948
73408
  * - `validationError`: validation result of the current value
72949
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
73409
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
72950
73410
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
72951
73411
  */
72952
73412
  onAccept: PropTypes.func,
@@ -73265,7 +73725,7 @@ MobileTimePicker.propTypes = {
73265
73725
  * @param {TValue} value The value that was just accepted.
73266
73726
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
73267
73727
  * - `validationError`: validation result of the current value
73268
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
73728
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
73269
73729
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
73270
73730
  */
73271
73731
  onAccept: PropTypes.func,
@@ -73549,7 +74009,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
73549
74009
  * @param {TValue} value The value that was just accepted.
73550
74010
  * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
73551
74011
  * - `validationError`: validation result of the current value
73552
- * - `source`: source of the acceptance. One of 'field' | 'picker' | 'unknown'
74012
+ * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
73553
74013
  * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
73554
74014
  */
73555
74015
  onAccept: PropTypes.func,
@@ -78026,18 +78486,7 @@ class AdapterDayjs {
78026
78486
  }
78027
78487
  });
78028
78488
  __publicField(this, "createSystemDate", (value) => {
78029
- let date;
78030
- if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
78031
- const timezone2 = dayjs.tz.guess();
78032
- if (timezone2 === "UTC") {
78033
- date = dayjs(value);
78034
- } else {
78035
- date = dayjs.tz(value, timezone2);
78036
- }
78037
- } else {
78038
- date = dayjs(value);
78039
- }
78040
- return this.setLocaleToValue(date);
78489
+ return this.setLocaleToValue(dayjs(value));
78041
78490
  });
78042
78491
  __publicField(this, "createUTCDate", (value) => {
78043
78492
  if (!this.hasUTCPlugin()) {