@mui/material 5.15.14 β 5.15.16
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/Autocomplete/Autocomplete.js +1 -1
- package/CHANGELOG.md +94 -2
- package/Dialog/Dialog.js +10 -1
- package/RadioGroup/RadioGroup.d.ts +0 -2
- package/RadioGroup/RadioGroup.js +23 -2
- package/RadioGroup/index.d.ts +3 -0
- package/RadioGroup/index.js +3 -1
- package/RadioGroup/radioGroupClasses.d.ts +6 -0
- package/RadioGroup/radioGroupClasses.js +7 -0
- package/Select/Select.d.ts +9 -6
- package/index.js +1 -1
- package/legacy/Autocomplete/Autocomplete.js +1 -1
- package/legacy/Dialog/Dialog.js +10 -1
- package/legacy/RadioGroup/RadioGroup.js +21 -2
- package/legacy/RadioGroup/index.js +3 -1
- package/legacy/RadioGroup/radioGroupClasses.js +7 -0
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +1 -1
- package/locale/index.js +1 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/Dialog/Dialog.js +10 -1
- package/modern/RadioGroup/RadioGroup.js +23 -2
- package/modern/RadioGroup/index.js +3 -1
- package/modern/RadioGroup/radioGroupClasses.js +7 -0
- package/modern/index.js +1 -1
- package/modern/locale/index.js +1 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/Dialog/Dialog.js +10 -1
- package/node/RadioGroup/RadioGroup.js +23 -2
- package/node/RadioGroup/index.js +25 -1
- package/node/RadioGroup/radioGroupClasses.js +15 -0
- package/node/index.js +1 -1
- package/node/locale/index.js +1 -1
- package/package.json +4 -4
- package/styles/components.d.ts +5 -0
- package/styles/overrides.d.ts +2 -0
- package/umd/material-ui.development.js +205 -167
- package/umd/material-ui.production.min.js +2 -2
|
@@ -601,7 +601,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
601
601
|
}))
|
|
602
602
|
}));
|
|
603
603
|
let autocompletePopper = null;
|
|
604
|
-
if (
|
|
604
|
+
if (groupedOptions.length > 0) {
|
|
605
605
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
606
606
|
as: ListboxComponent,
|
|
607
607
|
className: classes.listbox,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v5.15.16
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.15.15..master -->
|
|
6
|
+
|
|
7
|
+
_May 1, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 8 contributors who made this release possible. Here are some highlights β¨:
|
|
10
|
+
This release was mostly about π bug fixes and π documentation improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.15.16`
|
|
13
|
+
|
|
14
|
+
- [material-ui][Dialog] Prevent onClick on the root element from being overwritten (@ryanburr) (#41914) @github-actions[bot]
|
|
15
|
+
- [material-ui][Select] Fix `muiName` property TypeScript error (@EyaOuenniche) (#41786) @github-actions[bot]
|
|
16
|
+
- β>[material-ui][l10n] Fix typo in is-IS locale (@magnimarels) (#41815) @github-actions[bot]
|
|
17
|
+
|
|
18
|
+
### Docs
|
|
19
|
+
|
|
20
|
+
- Fix small SEO issues @oliviertassinari
|
|
21
|
+
- Fix 301 Toolpad links @oliviertassinari
|
|
22
|
+
- Fix 301 Toolpad links @oliviertassinari
|
|
23
|
+
- Fix 301 image redirections @oliviertassinari
|
|
24
|
+
- Fix small SEO issues @oliviertassinari
|
|
25
|
+
- Fix 301 redirection @oliviertassinari
|
|
26
|
+
- Fix format git diff regression (#41882) @oliviertassinari
|
|
27
|
+
- Fix 301 links @oliviertassinari
|
|
28
|
+
- [material-ui] Fix import statement in migration guide (@sai6855) (#41864) @github-actions[bot]
|
|
29
|
+
- [material-ui] Update Figma plugin name (@danilo-leal) (#42057) @github-actions[bot]
|
|
30
|
+
- [material-ui] Fix minor spelling error in the "About the lab" page (@ryanhartwig) (#42075) @github-actions[bot]
|
|
31
|
+
- [material-ui] Add missing backticks to HTML tag in the installation page (@Miguelrom) (#42009) @github-actions[bot]
|
|
32
|
+
- [material-ui] Add Connect-related content (@danilo-leal) (#41924) @DiegoAndai
|
|
33
|
+
- [material-ui] Fix Material 3 message typo (@aarongarciah) (#41822) @github-actions[bot]
|
|
34
|
+
- [material-ui] Remove Data Grid v7 beta callout (@cherniavskii) (#41842) @github-actions[bot]
|
|
35
|
+
- [material-ui][templates] Fix input props attributes in Landing Page template (@5-tom) (#42034) @github-actions[bot]
|
|
36
|
+
- [system] Update typo on the sx prop page (@bricker) (#42078) @github-actions[bot]
|
|
37
|
+
|
|
38
|
+
### Core
|
|
39
|
+
|
|
40
|
+
- [blog] Add post to introduce the Connect plugin (@danilo-leal) (#41929) @DiegoAndai
|
|
41
|
+
- [core] Automate cherry-pick of PRs from `next` -> `master` (#41742) @aarongarciah
|
|
42
|
+
- [docs-infra] Improve Twitter OG:image (#41860) @oliviertassinari
|
|
43
|
+
- [docs-infra] Use edge function for card generation (#41188) @alexfauquette
|
|
44
|
+
- [docs-infra] Fix drawer performances (#41807) (#41820) @alexfauquette
|
|
45
|
+
- [docs-infra] Fix analytics about inline ads (#41474) @alexfauquette
|
|
46
|
+
- [website] Sync career roles (@oliviertassinari) (#42059) @github-actions[bot]
|
|
47
|
+
- [website] Add content about the Sync plugin in the MaterialΒ UI page (@danilo-leal) (#42074) @github-actions[bot]
|
|
48
|
+
- [website] Add Nadja on the about page (#42054) @mnajdova
|
|
49
|
+
- [website] Close the `Design Engineer - X` role (#42014) @DanailH
|
|
50
|
+
- [website] Remove customer support agent role from website (@rluzists1) (#41996) @github-actions[bot]
|
|
51
|
+
- [website] Add Jose to About Us (#41759) @JCQuintas
|
|
52
|
+
|
|
53
|
+
All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @DanailH, @DiegoAndai, @github-actions[bot], @JCQuintas, @mnajdova, @oliviertassinari
|
|
54
|
+
|
|
55
|
+
## v5.15.15
|
|
56
|
+
|
|
57
|
+
<!-- generated comparing v5.15.14..master -->
|
|
58
|
+
|
|
59
|
+
_Apr 4, 2024_
|
|
60
|
+
|
|
61
|
+
A big thanks to the 7 contributors who made this release possible. Here are some highlights β¨:
|
|
62
|
+
This release was mostly about π bug fixes and π documentation improvements.
|
|
63
|
+
|
|
64
|
+
### `@mui/material@5.15.15`
|
|
65
|
+
|
|
66
|
+
- [Autocomplete] Display options provided to the `options` prop even if loading is true (#41677) @ZeeshanTamboli
|
|
67
|
+
- [RadioGroup] Apply classnames (#41681) @ZeeshanTamboli
|
|
68
|
+
|
|
69
|
+
### `@mui/system@5.15.15`
|
|
70
|
+
|
|
71
|
+
- Fix typo to avoid infinite recursion in function call (#41678) @ZeeshanTamboli
|
|
72
|
+
|
|
73
|
+
### Docs
|
|
74
|
+
|
|
75
|
+
- [material-ui][Slider] Remove `valueLabelFormat` from restricted values demo so that the tooltip thumb label displays the same as the value text (#41679) @ZeeshanTamboli
|
|
76
|
+
- [material-ui] Remove deleted page from the sidenav (#41594) @danilo-leal
|
|
77
|
+
- [material-ui] Fix typo in CSS theme variables customization (#41680) @ZeeshanTamboli
|
|
78
|
+
- Continue migration of BaseΒ UI to sperate repository @oliviertassinari
|
|
79
|
+
- Add notification for MUIΒ X v7 blog post (#41587) (#41605) @cherniavskii
|
|
80
|
+
- Update the versions dropdown to show v6 (#41557) @mnajdova
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- [blog] Link to Romain's blog post in MUIΒ X v7 announcement post (#41641) @cherniavskii
|
|
85
|
+
- [blog] Blog post with MUIΒ X v7.0.0 annoucement (#41563) (#41604) @cherniavskii
|
|
86
|
+
- [blog] Add post about remote (#41565) @danilo-leal
|
|
87
|
+
- [core] Continue rename of Toolpad @oliviertassinari
|
|
88
|
+
- [docs-infra] Add Toolpad product/category IDs to types (#41551) @bharatkashyap
|
|
89
|
+
- [website] Add AarΓ³n to About Us (#41747) @aarongarciah
|
|
90
|
+
- [website] Add stray design adjustments throughout the site (#41642) @mnajdova
|
|
91
|
+
- [website] Update pricing table (#41606) @cherniavskii
|
|
92
|
+
|
|
93
|
+
All contributors of this release in alphabetical order: @aarongarciah, @bharatkashyap, @cherniavskii, @danilo-leal, @mnajdova, @oliviertassinari, @ZeeshanTamboli
|
|
94
|
+
|
|
3
95
|
## v5.15.14
|
|
4
96
|
|
|
5
97
|
<!-- generated comparing v5.15.13..master -->
|
|
@@ -7922,7 +8014,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
7922
8014
|
|
|
7923
8015
|
<a href="https://mui.com/components/tables/#unstyled-table"><img width="800" alt="unstyled table" src="https://user-images.githubusercontent.com/4512430/144862194-584356ef-7d9d-462c-a631-186a7e716193.png"></a>
|
|
7924
8016
|
|
|
7925
|
-
You can follow our progress with unstyled components at https://github.com/mui/
|
|
8017
|
+
You can follow our progress with unstyled components at https://github.com/mui/base-ui/issues/10.
|
|
7926
8018
|
|
|
7927
8019
|
- π We have added an example of how to use MUI with [Remix](https://remix.run/) (#29952) @mnajdova
|
|
7928
8020
|
|
|
@@ -9392,7 +9484,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
|
|
|
9392
9484
|
|
|
9393
9485
|
<a href="https://mui.com/components/switches/#unstyled"><img width="832" alt="switch" src="https://user-images.githubusercontent.com/3165635/125192249-236f8a80-e247-11eb-9df9-17d476379a32.png"></a>
|
|
9394
9486
|
|
|
9395
|
-
You can follow our progress at https://github.com/mui/
|
|
9487
|
+
You can follow our progress at https://github.com/mui/base-ui/issues/10.
|
|
9396
9488
|
|
|
9397
9489
|
- π We have updated the default `info` `success` `warning` color to be more accessible (#26817) @siriwatknp.
|
|
9398
9490
|
You can find the new [default values](https://mui.com/material-ui/customization/palette/#default-values) in the documentation.
|
package/Dialog/Dialog.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
5
|
+
const _excluded = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -171,6 +171,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
171
171
|
fullWidth = false,
|
|
172
172
|
maxWidth = 'sm',
|
|
173
173
|
onBackdropClick,
|
|
174
|
+
onClick,
|
|
174
175
|
onClose,
|
|
175
176
|
open,
|
|
176
177
|
PaperComponent = Paper,
|
|
@@ -196,6 +197,10 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
196
197
|
backdropClick.current = event.target === event.currentTarget;
|
|
197
198
|
};
|
|
198
199
|
const handleBackdropClick = event => {
|
|
200
|
+
if (onClick) {
|
|
201
|
+
onClick(event);
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
// Ignore the events not coming from the "backdrop".
|
|
200
205
|
if (!backdropClick.current) {
|
|
201
206
|
return;
|
|
@@ -334,6 +339,10 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
334
339
|
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
335
340
|
*/
|
|
336
341
|
onBackdropClick: PropTypes.func,
|
|
342
|
+
/**
|
|
343
|
+
* @ignore
|
|
344
|
+
*/
|
|
345
|
+
onClick: PropTypes.func,
|
|
337
346
|
/**
|
|
338
347
|
* Callback fired when the component requests to be closed.
|
|
339
348
|
*
|
package/RadioGroup/RadioGroup.js
CHANGED
|
@@ -2,21 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["actions", "children", "defaultValue", "name", "onChange", "value"];
|
|
5
|
+
const _excluded = ["actions", "children", "className", "defaultValue", "name", "onChange", "value"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
10
|
import FormGroup from '../FormGroup';
|
|
11
|
+
import { getRadioGroupUtilityClass } from './radioGroupClasses';
|
|
9
12
|
import useForkRef from '../utils/useForkRef';
|
|
10
13
|
import useControlled from '../utils/useControlled';
|
|
11
14
|
import RadioGroupContext from './RadioGroupContext';
|
|
12
15
|
import useId from '../utils/useId';
|
|
13
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const useUtilityClasses = props => {
|
|
18
|
+
const {
|
|
19
|
+
classes,
|
|
20
|
+
row,
|
|
21
|
+
error
|
|
22
|
+
} = props;
|
|
23
|
+
const slots = {
|
|
24
|
+
root: ['root', row && 'row', error && 'error']
|
|
25
|
+
};
|
|
26
|
+
return composeClasses(slots, getRadioGroupUtilityClass, classes);
|
|
27
|
+
};
|
|
14
28
|
const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
15
29
|
const {
|
|
16
30
|
// private
|
|
17
31
|
// eslint-disable-next-line react/prop-types
|
|
18
32
|
actions,
|
|
19
33
|
children,
|
|
34
|
+
className,
|
|
20
35
|
defaultValue,
|
|
21
36
|
name: nameProp,
|
|
22
37
|
onChange,
|
|
@@ -24,6 +39,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
24
39
|
} = props,
|
|
25
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
41
|
const rootRef = React.useRef(null);
|
|
42
|
+
const classes = useUtilityClasses(props);
|
|
27
43
|
const [value, setValueState] = useControlled({
|
|
28
44
|
controlled: valueProp,
|
|
29
45
|
default: defaultValue,
|
|
@@ -56,7 +72,8 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
56
72
|
value: contextValue,
|
|
57
73
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
58
74
|
role: "radiogroup",
|
|
59
|
-
ref: handleRef
|
|
75
|
+
ref: handleRef,
|
|
76
|
+
className: clsx(classes.root, className)
|
|
60
77
|
}, other, {
|
|
61
78
|
children: children
|
|
62
79
|
}))
|
|
@@ -71,6 +88,10 @@ process.env.NODE_ENV !== "production" ? RadioGroup.propTypes /* remove-proptypes
|
|
|
71
88
|
* The content of the component.
|
|
72
89
|
*/
|
|
73
90
|
children: PropTypes.node,
|
|
91
|
+
/**
|
|
92
|
+
* @ignore
|
|
93
|
+
*/
|
|
94
|
+
className: PropTypes.string,
|
|
74
95
|
/**
|
|
75
96
|
* The default value. Use when the component is not controlled.
|
|
76
97
|
*/
|
package/RadioGroup/index.d.ts
CHANGED
package/RadioGroup/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
export { default } from './RadioGroup';
|
|
4
|
-
export { default as useRadioGroup } from './useRadioGroup';
|
|
4
|
+
export { default as useRadioGroup } from './useRadioGroup';
|
|
5
|
+
export { default as radioGroupClasses } from './radioGroupClasses';
|
|
6
|
+
export * from './radioGroupClasses';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormGroupClasses } from '../FormGroup';
|
|
2
|
+
export type RadioGroupClassKey = keyof FormGroupClasses;
|
|
3
|
+
export type RadioGroupClasses = FormGroupClasses;
|
|
4
|
+
export declare function getRadioGroupUtilityClass(slot: string): string;
|
|
5
|
+
declare const radioGroupClasses: RadioGroupClasses;
|
|
6
|
+
export default radioGroupClasses;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
export function getRadioGroupUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiRadioGroup', slot);
|
|
5
|
+
}
|
|
6
|
+
const radioGroupClasses = generateUtilityClasses('MuiRadioGroup', ['root', 'row', 'error']);
|
|
7
|
+
export default radioGroupClasses;
|
package/Select/Select.d.ts
CHANGED
|
@@ -151,7 +151,8 @@ export interface BaseSelectProps<Value = unknown>
|
|
|
151
151
|
variant?: SelectVariants;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export interface FilledSelectProps
|
|
154
|
+
export interface FilledSelectProps
|
|
155
|
+
extends Omit<FilledInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
|
|
155
156
|
/**
|
|
156
157
|
* The variant to use.
|
|
157
158
|
* @default 'outlined'
|
|
@@ -159,7 +160,8 @@ export interface FilledSelectProps extends Omit<FilledInputProps, 'value' | 'onC
|
|
|
159
160
|
variant: 'filled';
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
export interface StandardSelectProps
|
|
163
|
+
export interface StandardSelectProps
|
|
164
|
+
extends Omit<InputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
|
|
163
165
|
/**
|
|
164
166
|
* The variant to use.
|
|
165
167
|
* @default 'outlined'
|
|
@@ -167,7 +169,8 @@ export interface StandardSelectProps extends Omit<InputProps, 'value' | 'onChang
|
|
|
167
169
|
variant: 'standard';
|
|
168
170
|
}
|
|
169
171
|
|
|
170
|
-
export interface OutlinedSelectProps
|
|
172
|
+
export interface OutlinedSelectProps
|
|
173
|
+
extends Omit<OutlinedInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
|
|
171
174
|
/**
|
|
172
175
|
* The variant to use.
|
|
173
176
|
* @default 'outlined'
|
|
@@ -193,8 +196,8 @@ export type SelectProps<Value = unknown> =
|
|
|
193
196
|
* - [Select API](https://mui.com/material-ui/api/select/)
|
|
194
197
|
* - inherits [OutlinedInput API](https://mui.com/material-ui/api/outlined-input/)
|
|
195
198
|
*/
|
|
196
|
-
|
|
197
|
-
props: SelectProps<Value>,
|
|
198
|
-
): JSX.Element & {
|
|
199
|
+
declare const Select: (<Value = unknown>(props: SelectProps<Value>) => JSX.Element) & {
|
|
199
200
|
muiName: string;
|
|
200
201
|
};
|
|
202
|
+
|
|
203
|
+
export default Select;
|
package/index.js
CHANGED
|
@@ -608,7 +608,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
|
|
|
608
608
|
}));
|
|
609
609
|
};
|
|
610
610
|
var autocompletePopper = null;
|
|
611
|
-
if (
|
|
611
|
+
if (groupedOptions.length > 0) {
|
|
612
612
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
613
613
|
as: ListboxComponent,
|
|
614
614
|
className: classes.listbox,
|
package/legacy/Dialog/Dialog.js
CHANGED
|
@@ -167,6 +167,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
167
167
|
_props$maxWidth = props.maxWidth,
|
|
168
168
|
maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,
|
|
169
169
|
onBackdropClick = props.onBackdropClick,
|
|
170
|
+
onClick = props.onClick,
|
|
170
171
|
onClose = props.onClose,
|
|
171
172
|
open = props.open,
|
|
172
173
|
_props$PaperComponent = props.PaperComponent,
|
|
@@ -180,7 +181,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
180
181
|
_props$transitionDura = props.transitionDuration,
|
|
181
182
|
transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,
|
|
182
183
|
TransitionProps = props.TransitionProps,
|
|
183
|
-
other = _objectWithoutProperties(props, ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"]);
|
|
184
|
+
other = _objectWithoutProperties(props, ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"]);
|
|
184
185
|
var ownerState = _extends({}, props, {
|
|
185
186
|
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
186
187
|
fullScreen: fullScreen,
|
|
@@ -196,6 +197,10 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
196
197
|
backdropClick.current = event.target === event.currentTarget;
|
|
197
198
|
};
|
|
198
199
|
var handleBackdropClick = function handleBackdropClick(event) {
|
|
200
|
+
if (onClick) {
|
|
201
|
+
onClick(event);
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
// Ignore the events not coming from the "backdrop".
|
|
200
205
|
if (!backdropClick.current) {
|
|
201
206
|
return;
|
|
@@ -334,6 +339,10 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
334
339
|
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
335
340
|
*/
|
|
336
341
|
onBackdropClick: PropTypes.func,
|
|
342
|
+
/**
|
|
343
|
+
* @ignore
|
|
344
|
+
*/
|
|
345
|
+
onClick: PropTypes.func,
|
|
337
346
|
/**
|
|
338
347
|
* Callback fired when the component requests to be closed.
|
|
339
348
|
*
|
|
@@ -5,21 +5,35 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
10
|
import FormGroup from '../FormGroup';
|
|
11
|
+
import { getRadioGroupUtilityClass } from './radioGroupClasses';
|
|
9
12
|
import useForkRef from '../utils/useForkRef';
|
|
10
13
|
import useControlled from '../utils/useControlled';
|
|
11
14
|
import RadioGroupContext from './RadioGroupContext';
|
|
12
15
|
import useId from '../utils/useId';
|
|
13
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
var useUtilityClasses = function useUtilityClasses(props) {
|
|
18
|
+
var classes = props.classes,
|
|
19
|
+
row = props.row,
|
|
20
|
+
error = props.error;
|
|
21
|
+
var slots = {
|
|
22
|
+
root: ['root', row && 'row', error && 'error']
|
|
23
|
+
};
|
|
24
|
+
return composeClasses(slots, getRadioGroupUtilityClass, classes);
|
|
25
|
+
};
|
|
14
26
|
var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
15
27
|
var actions = props.actions,
|
|
16
28
|
children = props.children,
|
|
29
|
+
className = props.className,
|
|
17
30
|
defaultValue = props.defaultValue,
|
|
18
31
|
nameProp = props.name,
|
|
19
32
|
_onChange = props.onChange,
|
|
20
33
|
valueProp = props.value,
|
|
21
|
-
other = _objectWithoutProperties(props, ["actions", "children", "defaultValue", "name", "onChange", "value"]);
|
|
34
|
+
other = _objectWithoutProperties(props, ["actions", "children", "className", "defaultValue", "name", "onChange", "value"]);
|
|
22
35
|
var rootRef = React.useRef(null);
|
|
36
|
+
var classes = useUtilityClasses(props);
|
|
23
37
|
var _useControlled = useControlled({
|
|
24
38
|
controlled: valueProp,
|
|
25
39
|
default: defaultValue,
|
|
@@ -59,7 +73,8 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
|
59
73
|
value: contextValue,
|
|
60
74
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
61
75
|
role: "radiogroup",
|
|
62
|
-
ref: handleRef
|
|
76
|
+
ref: handleRef,
|
|
77
|
+
className: clsx(classes.root, className)
|
|
63
78
|
}, other, {
|
|
64
79
|
children: children
|
|
65
80
|
}))
|
|
@@ -74,6 +89,10 @@ process.env.NODE_ENV !== "production" ? RadioGroup.propTypes /* remove-proptypes
|
|
|
74
89
|
* The content of the component.
|
|
75
90
|
*/
|
|
76
91
|
children: PropTypes.node,
|
|
92
|
+
/**
|
|
93
|
+
* @ignore
|
|
94
|
+
*/
|
|
95
|
+
className: PropTypes.string,
|
|
77
96
|
/**
|
|
78
97
|
* The default value. Use when the component is not controlled.
|
|
79
98
|
*/
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
export { default } from './RadioGroup';
|
|
4
|
-
export { default as useRadioGroup } from './useRadioGroup';
|
|
4
|
+
export { default as useRadioGroup } from './useRadioGroup';
|
|
5
|
+
export { default as radioGroupClasses } from './radioGroupClasses';
|
|
6
|
+
export * from './radioGroupClasses';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
export function getRadioGroupUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiRadioGroup', slot);
|
|
5
|
+
}
|
|
6
|
+
var radioGroupClasses = generateUtilityClasses('MuiRadioGroup', ['root', 'row', 'error']);
|
|
7
|
+
export default radioGroupClasses;
|
package/legacy/index.js
CHANGED
package/legacy/locale/index.js
CHANGED
|
@@ -1922,7 +1922,7 @@ export var isIS = {
|
|
|
1922
1922
|
var from = _ref19.from,
|
|
1923
1923
|
to = _ref19.to,
|
|
1924
1924
|
count = _ref19.count;
|
|
1925
|
-
return "".concat(from, "\u2013").concat(to, " af ").concat(count !== -1 ? count : "fleiri
|
|
1925
|
+
return "".concat(from, "\u2013").concat(to, " af ").concat(count !== -1 ? count : "fleiri en ".concat(to));
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
},
|
package/locale/index.js
CHANGED
|
@@ -597,7 +597,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
597
597
|
}))
|
|
598
598
|
}));
|
|
599
599
|
let autocompletePopper = null;
|
|
600
|
-
if (
|
|
600
|
+
if (groupedOptions.length > 0) {
|
|
601
601
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/_jsx(AutocompleteListbox, _extends({
|
|
602
602
|
as: ListboxComponent,
|
|
603
603
|
className: classes.listbox,
|
package/modern/Dialog/Dialog.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
-
const _excluded = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
5
|
+
const _excluded = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -171,6 +171,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
171
171
|
fullWidth = false,
|
|
172
172
|
maxWidth = 'sm',
|
|
173
173
|
onBackdropClick,
|
|
174
|
+
onClick,
|
|
174
175
|
onClose,
|
|
175
176
|
open,
|
|
176
177
|
PaperComponent = Paper,
|
|
@@ -196,6 +197,10 @@ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
196
197
|
backdropClick.current = event.target === event.currentTarget;
|
|
197
198
|
};
|
|
198
199
|
const handleBackdropClick = event => {
|
|
200
|
+
if (onClick) {
|
|
201
|
+
onClick(event);
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
// Ignore the events not coming from the "backdrop".
|
|
200
205
|
if (!backdropClick.current) {
|
|
201
206
|
return;
|
|
@@ -334,6 +339,10 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes /* remove-proptypes */
|
|
|
334
339
|
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
335
340
|
*/
|
|
336
341
|
onBackdropClick: PropTypes.func,
|
|
342
|
+
/**
|
|
343
|
+
* @ignore
|
|
344
|
+
*/
|
|
345
|
+
onClick: PropTypes.func,
|
|
337
346
|
/**
|
|
338
347
|
* Callback fired when the component requests to be closed.
|
|
339
348
|
*
|
|
@@ -2,21 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["actions", "children", "defaultValue", "name", "onChange", "value"];
|
|
5
|
+
const _excluded = ["actions", "children", "className", "defaultValue", "name", "onChange", "value"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
10
|
import FormGroup from '../FormGroup';
|
|
11
|
+
import { getRadioGroupUtilityClass } from './radioGroupClasses';
|
|
9
12
|
import useForkRef from '../utils/useForkRef';
|
|
10
13
|
import useControlled from '../utils/useControlled';
|
|
11
14
|
import RadioGroupContext from './RadioGroupContext';
|
|
12
15
|
import useId from '../utils/useId';
|
|
13
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
const useUtilityClasses = props => {
|
|
18
|
+
const {
|
|
19
|
+
classes,
|
|
20
|
+
row,
|
|
21
|
+
error
|
|
22
|
+
} = props;
|
|
23
|
+
const slots = {
|
|
24
|
+
root: ['root', row && 'row', error && 'error']
|
|
25
|
+
};
|
|
26
|
+
return composeClasses(slots, getRadioGroupUtilityClass, classes);
|
|
27
|
+
};
|
|
14
28
|
const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
|
|
15
29
|
const {
|
|
16
30
|
// private
|
|
17
31
|
// eslint-disable-next-line react/prop-types
|
|
18
32
|
actions,
|
|
19
33
|
children,
|
|
34
|
+
className,
|
|
20
35
|
defaultValue,
|
|
21
36
|
name: nameProp,
|
|
22
37
|
onChange,
|
|
@@ -24,6 +39,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
24
39
|
} = props,
|
|
25
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
41
|
const rootRef = React.useRef(null);
|
|
42
|
+
const classes = useUtilityClasses(props);
|
|
27
43
|
const [value, setValueState] = useControlled({
|
|
28
44
|
controlled: valueProp,
|
|
29
45
|
default: defaultValue,
|
|
@@ -56,7 +72,8 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
56
72
|
value: contextValue,
|
|
57
73
|
children: /*#__PURE__*/_jsx(FormGroup, _extends({
|
|
58
74
|
role: "radiogroup",
|
|
59
|
-
ref: handleRef
|
|
75
|
+
ref: handleRef,
|
|
76
|
+
className: clsx(classes.root, className)
|
|
60
77
|
}, other, {
|
|
61
78
|
children: children
|
|
62
79
|
}))
|
|
@@ -71,6 +88,10 @@ process.env.NODE_ENV !== "production" ? RadioGroup.propTypes /* remove-proptypes
|
|
|
71
88
|
* The content of the component.
|
|
72
89
|
*/
|
|
73
90
|
children: PropTypes.node,
|
|
91
|
+
/**
|
|
92
|
+
* @ignore
|
|
93
|
+
*/
|
|
94
|
+
className: PropTypes.string,
|
|
74
95
|
/**
|
|
75
96
|
* The default value. Use when the component is not controlled.
|
|
76
97
|
*/
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
export { default } from './RadioGroup';
|
|
4
|
-
export { default as useRadioGroup } from './useRadioGroup';
|
|
4
|
+
export { default as useRadioGroup } from './useRadioGroup';
|
|
5
|
+
export { default as radioGroupClasses } from './radioGroupClasses';
|
|
6
|
+
export * from './radioGroupClasses';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
+
export function getRadioGroupUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiRadioGroup', slot);
|
|
5
|
+
}
|
|
6
|
+
const radioGroupClasses = generateUtilityClasses('MuiRadioGroup', ['root', 'row', 'error']);
|
|
7
|
+
export default radioGroupClasses;
|
package/modern/index.js
CHANGED
package/modern/locale/index.js
CHANGED
|
@@ -613,7 +613,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
613
613
|
}))
|
|
614
614
|
}));
|
|
615
615
|
let autocompletePopper = null;
|
|
616
|
-
if (
|
|
616
|
+
if (groupedOptions.length > 0) {
|
|
617
617
|
autocompletePopper = renderAutocompletePopperChildren( /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteListbox, (0, _extends2.default)({
|
|
618
618
|
as: ListboxComponent,
|
|
619
619
|
className: classes.listbox,
|