@mui/lab 5.0.0-alpha.59 → 5.0.0-alpha.63
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/CHANGELOG.md +227 -0
- package/ClockPicker/ClockPicker.d.ts +1 -1
- package/ClockPicker/ClockPicker.js +1 -1
- package/LoadingButton/LoadingButton.d.ts +2 -0
- package/LoadingButton/LoadingButton.js +19 -9
- package/index.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +1 -1
- package/legacy/LoadingButton/LoadingButton.js +19 -10
- package/legacy/index.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +1 -1
- package/modern/LoadingButton/LoadingButton.js +20 -9
- package/modern/index.js +1 -1
- package/node/ClockPicker/ClockPicker.js +1 -1
- package/node/LoadingButton/LoadingButton.js +17 -6
- package/node/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,232 @@
|
|
|
1
1
|
### [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.2.7
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.2.6..master -->
|
|
6
|
+
|
|
7
|
+
_Jan 3, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 📓 Improvements on the Vietnamese (vi-VN) and Finnish (fi-FI) locales (#30426, #30442) @hckhanh @Certificate
|
|
12
|
+
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
13
|
+
|
|
14
|
+
### `@mui/material@5.2.7`
|
|
15
|
+
|
|
16
|
+
- ​<!-- 14 -->[Autocomplete] Fix calling onChange for duplicate values (#30374) @alisasanib
|
|
17
|
+
- ​<!-- 13 -->[Avatar] Fix TypeScript error on imgProps (#30255) @ahmad-reza619
|
|
18
|
+
- ​<!-- 12 -->[Badge] Fix `classes` prop TypeScript type (#30427) @ZeeshanTamboli
|
|
19
|
+
- ​<!-- 03 -->[SvgIcon] Allow viewBox to inherit from Component through inheritViewBox prop (#29954) @alex-dikusar
|
|
20
|
+
- ​<!-- 04 -->[SvgIcon] Correct API docs and code style (#30470) @michaldudak
|
|
21
|
+
|
|
22
|
+
### Docs
|
|
23
|
+
|
|
24
|
+
- ​<!-- 11 -->[blog] 2021 (#30425) @oliviertassinari
|
|
25
|
+
- ​<!-- 15 -->[docs] Fix typo on the Grid docs page (#30446) @abhi45
|
|
26
|
+
- ​<!-- 07 -->[docs] Fix `useMediaQuery` SSR example to v5 theme API (#30454) @ValentinH
|
|
27
|
+
- ​<!-- 11 -->[docs] Improve the migration guide and add examples for transforming to `tss-react` (#30388) @mnajdova
|
|
28
|
+
- ​<!-- 09 -->[docs] Make the reference to the select clearer (#30460) @boazrymland
|
|
29
|
+
- ​<!-- 08 -->[docs] Sync translations with Crowdin (#30385) @l10nbot
|
|
30
|
+
- ​<!-- 06 -->[example] Avoid double rendering in the Remix example (#30366) @mnajdova
|
|
31
|
+
- ​<!-- 05 -->[i18n] improve viVN locale (#30426) @hckhanh
|
|
32
|
+
- ​<!-- 04 -->[l10n] Improve fiFI locale (#30442) @Certificate
|
|
33
|
+
- ​<!-- 02 -->[website] Add new batch of open roles (#30282) @oliviertassinari
|
|
34
|
+
- ​<!-- 01 -->[website] Refactor page context with next router (#30020) @siriwatknp
|
|
35
|
+
|
|
36
|
+
### Core
|
|
37
|
+
|
|
38
|
+
- ​<!-- 13 -->[core] Automatically close issues that are incomplete and inactive (#30459) @oliviertassinari
|
|
39
|
+
- ​<!-- 10 -->[core] Remove contrib tweet (#30455) @oliviertassinari
|
|
40
|
+
|
|
41
|
+
All contributors of this release in alphabetical order: @abhi45, @ahmad-reza619, @alex-dikusar, @alisasanib, @boazrymland, @Certificate, @hckhanh, @l10nbot, @michaldudak, @mnajdova, @oliviertassinari, @siriwatknp, @ValentinH, @ZeeshanTamboli
|
|
42
|
+
|
|
43
|
+
## 5.2.6
|
|
44
|
+
|
|
45
|
+
<!-- generated comparing v5.2.5..master -->
|
|
46
|
+
|
|
47
|
+
_Dec 27, 2021_
|
|
48
|
+
|
|
49
|
+
A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
50
|
+
|
|
51
|
+
- 📓 The Norwegian Bokmål (nb-NO) locale was added (#27520) @wogsland
|
|
52
|
+
- 🛠 Introduced a new `useBadge` hook in the `@mui/base` package (#30246) @mnajdova
|
|
53
|
+
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
54
|
+
|
|
55
|
+
### `@mui/material@5.2.6`
|
|
56
|
+
|
|
57
|
+
- ​<!-- 24 -->[ButtonGroup] Fix typo in ButtonGroupContext's interface (#30376) @kealjones-wk
|
|
58
|
+
- ​<!-- 03 -->[l10n] Add Norwegian Bokmål (nb-NO) locale (#27520) @wogsland
|
|
59
|
+
|
|
60
|
+
### `@mui/base@5.0.0-alpha.62`
|
|
61
|
+
|
|
62
|
+
- ​<!-- 26 -->[BadgeUnstyled] Add useBadge hook (#30246) @mnajdova
|
|
63
|
+
|
|
64
|
+
### `@mui/joy@5.0.0-alpha.8`
|
|
65
|
+
|
|
66
|
+
- ​<!-- 04 -->[Joy] Button API (#29962) @siriwatknp
|
|
67
|
+
|
|
68
|
+
### Docs
|
|
69
|
+
|
|
70
|
+
- ​<!-- 27 -->[docs] Fix color coercion (#30319) @Janpot
|
|
71
|
+
- ​<!-- 25 -->[blog] Fix file import conflict resolution (#30391) @oliviertassinari
|
|
72
|
+
- ​<!-- 21 -->[docs] Fix crash on Safari because of unsupported lookahead feature (#30345) @cherniavskii
|
|
73
|
+
- ​<!-- 20 -->[docs] Update to new website domain (#30396) @ryota-murakami
|
|
74
|
+
- ​<!-- 19 -->[docs] Fix text from material-ui to @mui to reflect v5 name changes (#30393) @pupudu
|
|
75
|
+
- ​<!-- 18 -->[docs] Fix a11y in Menu demos (#30378) @ZeeshanTamboli
|
|
76
|
+
- ​<!-- 17 -->[docs] Document how to unmount transition child (#30382) @oliviertassinari
|
|
77
|
+
- ​<!-- 16 -->[docs] The current standard for quotes is QUOTATION MARK @oliviertassinari
|
|
78
|
+
- ​<!-- 15 -->[docs] Fix 404 links (#30380) @oliviertassinari
|
|
79
|
+
- ​<!-- 14 -->[docs] Fix Breadcrumb description (#30307) @jamesmelzer
|
|
80
|
+
- ​<!-- 13 -->[docs] Modify injection order for Gatsby and SSR examples (#30358) @ShuPink
|
|
81
|
+
- ​<!-- 12 -->[docs] Improve the translation experience (#30373) @oliviertassinari
|
|
82
|
+
- ​<!-- 11 -->[docs] Sync translations with Crowdin (#30176) @l10nbot
|
|
83
|
+
- ​<!-- 10 -->[docs] Fix link to /size-snapshot (#30363) @oliviertassinari
|
|
84
|
+
- ​<!-- 09 -->[docs] Fix incorrect aria label in SpeedDial demo (#30354) @chwallen
|
|
85
|
+
- ​<!-- 08 -->[docs] Fix incorrect number of breakpoint helpers (#30353) @chwallen
|
|
86
|
+
- ​<!-- 07 -->[docs] Update outdated links (#30260) @oliviertassinari
|
|
87
|
+
- ​<!-- 06 -->[docs] Support redirects from old urls to /material/\* (#30286) @siriwatknp
|
|
88
|
+
- ​<!-- 05 -->[examples] Fix CSS modules integration (#30381) @oliviertassinari
|
|
89
|
+
- ​<!-- 02 -->[website] Fix SEO issues (#30372) @oliviertassinari
|
|
90
|
+
- ​<!-- 01 -->[website] Sync sponsors (#30259) @oliviertassinari
|
|
91
|
+
|
|
92
|
+
### Core
|
|
93
|
+
|
|
94
|
+
- ​<!-- 28 -->[core] Rename Material-UI to MUI (#30338) @ZeeshanTamboli
|
|
95
|
+
- ​<!-- 23 -->[core] Fix warning in dev mode (#30368) @oliviertassinari
|
|
96
|
+
- ​<!-- 22 -->[core] Update `buildApi` script to support new structure (#30245) @siriwatknp
|
|
97
|
+
|
|
98
|
+
All contributors of this release in alphabetical order: @cherniavskii, @chwallen, @jamesmelzer, @Janpot, @kealjones-wk, @l10nbot, @mnajdova, @oliviertassinari, @pupudu, @ryota-murakami, @ShuPink, @siriwatknp, @wogsland, @ZeeshanTamboli
|
|
99
|
+
|
|
100
|
+
## 5.2.5
|
|
101
|
+
|
|
102
|
+
<!-- generated comparing v5.2.4..master -->
|
|
103
|
+
|
|
104
|
+
_Dec 20, 2021_
|
|
105
|
+
|
|
106
|
+
A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
|
|
107
|
+
|
|
108
|
+
- 🛠 This release mostly improves what's behind the scenes: infrastructure and tests
|
|
109
|
+
- 📓 Danish (da-DK) locale was added (#29485) @mikk5829
|
|
110
|
+
- 🖌 Polished the design of Base components (#30149) and the docs in general (#29994) @danilo-leal
|
|
111
|
+
- 📚 Many additions and improvements to the documentation were made
|
|
112
|
+
|
|
113
|
+
### `@mui/material@5.2.5`
|
|
114
|
+
|
|
115
|
+
- [l10n] Add Danish (da-DK) locale (#29485) @mikk5829
|
|
116
|
+
- [LoadingButton] Label progressbar by the LoadingButton (#30002) @eps1lon
|
|
117
|
+
- [Tabs] Remove unnecessary `Partial<>` type around TabIndicatorProps type (#30254) @ZeeshanTamboli
|
|
118
|
+
|
|
119
|
+
### `@mui/system@5.2.5`
|
|
120
|
+
|
|
121
|
+
- [system] Use `useEnhancedEffect` to prevent flicker (#30216) @hbjORbj
|
|
122
|
+
|
|
123
|
+
### `@mui/lab@5.0.0-alpha.61`
|
|
124
|
+
|
|
125
|
+
- [pickers] Fix the wrong MuiClockPicker's ArrowSwitcher slot name (#30226) @rejetto
|
|
126
|
+
|
|
127
|
+
### Docs
|
|
128
|
+
|
|
129
|
+
- [docs] Run JS compiler on markdown output (#29732) @Janpot
|
|
130
|
+
- [Badge] Add tests for `anchorOrigin` prop (#30147) @daniel-sachs
|
|
131
|
+
- [docs] Add cssmodule injection order comments to Nextjs example (#30213) @ShuPink
|
|
132
|
+
- [docs] Remove extra word in Select component code example comments (#30281) @KThompso
|
|
133
|
+
- [docs] Improve the description of the Accordion (#30253) @jamesmelzer
|
|
134
|
+
- [docs] Heading capitalization convention @oliviertassinari
|
|
135
|
+
- [docs] Rename remaining 'unstyled' references to 'base' (#30206) @michaldudak
|
|
136
|
+
- [docs] Add to migration doc about ref type specificity (#30114) @hbjORbj
|
|
137
|
+
- [docs] Add script to clone pages (#30107) @siriwatknp
|
|
138
|
+
- [docs] Correct colors in breakpoints documentation (#30219) @michaldudak
|
|
139
|
+
- [docs] Sync icon search UI state with the url (#30075) @Janpot
|
|
140
|
+
- [docs] Base components demos design polish (#30149) @danilo-leal
|
|
141
|
+
- [docs] General documentation polish (#29994) @danilo-leal
|
|
142
|
+
- [examples] Fix typo in the remix example's README (#30289) @lemol
|
|
143
|
+
- [website] Remove expired gold sponsor (#30222) @oliviertassinari
|
|
144
|
+
- [website] Remove broken showcase links (#30217) @mnajdova
|
|
145
|
+
|
|
146
|
+
### Core
|
|
147
|
+
|
|
148
|
+
- [test] Reduce bundle size comparison memory consumption (#30195) @Janpot
|
|
149
|
+
- [core] make snapshot comparison more resilient (#30183) @Janpot
|
|
150
|
+
- [core] update formatted ts demo to support new structure (#30248) @siriwatknp
|
|
151
|
+
- [core] cache dependencies in github actions (#30211) @siriwatknp
|
|
152
|
+
- [core] fix root package version (#30204) @siriwatknp
|
|
153
|
+
- [core] Fail the build when the dangerjs script errors (#30186) @Janpot
|
|
154
|
+
- [test] Add E2E website tests (#30128) @siriwatknp
|
|
155
|
+
|
|
156
|
+
All contributors of this release in alphabetical order: @daniel-sachs, @danilo-leal, @eps1lon, @hbjORbj, @jamesmelzer, @Janpot, @KThompso, @lemol, @michaldudak, @mikk5829, @mnajdova, @oliviertassinari, @rejetto, @ShuPink, @siriwatknp, @ZeeshanTamboli
|
|
157
|
+
|
|
158
|
+
## 5.2.4
|
|
159
|
+
|
|
160
|
+
<!-- generated comparing v5.2.3..master -->
|
|
161
|
+
|
|
162
|
+
_Dec 14, 2021_
|
|
163
|
+
|
|
164
|
+
A big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
|
|
165
|
+
|
|
166
|
+
- ✨ Add `not` operator to `theme.breakpoints` (#29311) @Philipp000
|
|
167
|
+
|
|
168
|
+
```js
|
|
169
|
+
const styles = (theme) => ({
|
|
170
|
+
root: {
|
|
171
|
+
backgroundColor: 'blue',
|
|
172
|
+
// Match [xs, md) and [md + 1, ∞)
|
|
173
|
+
// [xs, md) and [lg, ∞)
|
|
174
|
+
// [0px, 900px) and [1200px, ∞)
|
|
175
|
+
[theme.breakpoints.not('md')]: {
|
|
176
|
+
backgroundColor: 'red',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- And many more 🐛 bug fixes and 📚 improvements.
|
|
183
|
+
|
|
184
|
+
### `@mui/material@5.2.4`
|
|
185
|
+
|
|
186
|
+
- ​<!-- 14 -->[esm] Correct a styles imports (#29976) @Janpot
|
|
187
|
+
- ​<!-- 12 -->[GlobalStyles] Fix `theme` type (#30072) @mnajdova
|
|
188
|
+
- ​<!-- 11 -->[Grid] Fix grid items to respond to the container's responsive columns (#29715) @kkorach
|
|
189
|
+
- ​<!-- 04 -->[TextField] Fix missing space before asterisk in `OutlinedInput`'s label (#29630) @alisasanib
|
|
190
|
+
- ​<!-- 03 -->[Transition] Allow any valid HTML attribute to be passed (#29888) @Janpot
|
|
191
|
+
- ​<!-- 02 -->[types] Fix discrepancy between core and system `ThemeOptions` (#30095) @fmeum
|
|
192
|
+
- ​<!-- 09 -->[InputBase] Add prop for disabling global styles (#29213) @bryan-hunter
|
|
193
|
+
- ​<!-- 08 -->[Select] Improve multiple logic (#30135) @ladygo93
|
|
194
|
+
|
|
195
|
+
### `@mui/system@5.2.4`
|
|
196
|
+
|
|
197
|
+
- ​<!-- 06 -->[system] Don't transition when re-appearing (#30108) @eps1lon
|
|
198
|
+
- ​<!-- 05 -->[system] Add `not` operator to `breakpoints` (#29311) @Philipp000
|
|
199
|
+
|
|
200
|
+
### `@mui/base@5.0.0-alpha.60`
|
|
201
|
+
|
|
202
|
+
- ​<!-- 25 -->[BadgeUnstyled] Make it conformant with other base components (#30141) @mnajdova
|
|
203
|
+
|
|
204
|
+
### `@mui/icons-material@5.2.4`
|
|
205
|
+
|
|
206
|
+
- ​<!-- 10 -->[icons] Correct location of icon download folder (#29839) @yaboi
|
|
207
|
+
|
|
208
|
+
### Docs
|
|
209
|
+
|
|
210
|
+
- ​<!-- 22 -->[docs] Explain the use of Select's label in FormControl (#30189) @michaldudak
|
|
211
|
+
- ​<!-- 21 -->[docs] Don't run nprogress on shallow routing (#30087) @Janpot
|
|
212
|
+
- ​<!-- 20 -->[docs] Add Data Driven Forms to related projects (#30078) @rvsia
|
|
213
|
+
- ​<!-- 19 -->[docs] Sync translations with Crowdin (#30067) @l10nbot
|
|
214
|
+
- ​<!-- 18 -->[docs] Fix link on "Custom variables" section in the Theming page #30100 @danilo-leal
|
|
215
|
+
- ​<!-- 17 -->[docs] Fix justifyContent option in the Grid interactive demo (#30117) @danilo-leal
|
|
216
|
+
- ​<!-- 16 -->[docs] Add tip to help access the docs of a previous version when finding answers in StackOverflow (#30101) @danilo-leal
|
|
217
|
+
- ​<!-- 15 -->[docs] Fix import example inside Unstyled Backdrop section (#30098) @TheodosiouTh
|
|
218
|
+
- ​<!-- 01 -->[website] Column pinning and Tree data are out (#30136) @oliviertassinari
|
|
219
|
+
- ​<!-- 07 -->[survey] Remove survey promotion items (#30122) @danilo-leal
|
|
220
|
+
|
|
221
|
+
### Core
|
|
222
|
+
|
|
223
|
+
- ​<!-- 23 -->[core] Fix link to Open Collective @oliviertassinari
|
|
224
|
+
- ​<!-- 26 -->[core] Update snapshots and s3 fallback (#30134) @Janpot
|
|
225
|
+
- ​<!-- 24 -->[ci] Update CI bucket (#30080) @Janpot
|
|
226
|
+
- ​<!-- 13 -->[fix] size:snapshot for mui-material-next and mui-joy components (#30106) @Janpot
|
|
227
|
+
|
|
228
|
+
All contributors of this release in alphabetical order: @alisasanib, @bryan-hunter, @danilo-leal, @eps1lon, @fmeum, @Janpot, @kkorach, @l10nbot, @ladygo93, @michaldudak, @mnajdova, @oliviertassinari, @Philipp000, @rvsia, @TheodosiouTh, @yaboi
|
|
229
|
+
|
|
3
230
|
## 5.2.3
|
|
4
231
|
|
|
5
232
|
<!-- generated comparing v5.2.2..master -->
|
|
@@ -4,7 +4,7 @@ import { TimeValidationProps } from '../internal/pickers/time-utils';
|
|
|
4
4
|
import { PickerOnChangeFn } from '../internal/pickers/hooks/useViews';
|
|
5
5
|
import { ClockView } from './shared';
|
|
6
6
|
export interface ClockPickerClasses {
|
|
7
|
-
/** Styles applied to the
|
|
7
|
+
/** Styles applied to the arrowSwitcher element. */
|
|
8
8
|
arrowSwitcher: string;
|
|
9
9
|
}
|
|
10
10
|
export declare type ClockPickerClassKey = keyof ClockPickerClasses;
|
|
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
|
|
|
30
30
|
|
|
31
31
|
const ClockPickerArrowSwitcher = styled(PickersArrowSwitcher, {
|
|
32
32
|
name: 'MuiClockPicker',
|
|
33
|
-
slot: '
|
|
33
|
+
slot: 'ArrowSwitcher',
|
|
34
34
|
overridesResolver: (props, styles) => styles.arrowSwitcher
|
|
35
35
|
})({
|
|
36
36
|
position: 'absolute',
|
|
@@ -36,6 +36,8 @@ export type LoadingButtonTypeMap<
|
|
|
36
36
|
loading?: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Element placed before the children if the button is in loading state.
|
|
39
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
40
|
+
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
39
41
|
* @default <CircularProgress color="inherit" size={16} />
|
|
40
42
|
*/
|
|
41
43
|
loadingIndicator?: React.ReactNode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
3
|
+
const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { chainPropTypes } from '@mui/utils';
|
|
7
|
-
import { capitalize } from '@mui/material/utils';
|
|
7
|
+
import { capitalize, unstable_useId as useId } from '@mui/material/utils';
|
|
8
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import Button from '@mui/material/Button';
|
|
@@ -112,12 +112,6 @@ const LoadingButtonLoadingIndicator = styled('div', {
|
|
|
112
112
|
position: 'relative',
|
|
113
113
|
right: -10
|
|
114
114
|
}));
|
|
115
|
-
|
|
116
|
-
const LoadingIndicator = /*#__PURE__*/_jsx(CircularProgress, {
|
|
117
|
-
color: "inherit",
|
|
118
|
-
size: 16
|
|
119
|
-
});
|
|
120
|
-
|
|
121
115
|
const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
122
116
|
const props = useThemeProps({
|
|
123
117
|
props: inProps,
|
|
@@ -127,13 +121,21 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
127
121
|
const {
|
|
128
122
|
children,
|
|
129
123
|
disabled = false,
|
|
124
|
+
id: idProp,
|
|
130
125
|
loading = false,
|
|
131
|
-
loadingIndicator
|
|
126
|
+
loadingIndicator: loadingIndicatorProp,
|
|
132
127
|
loadingPosition = 'center',
|
|
133
128
|
variant = 'text'
|
|
134
129
|
} = props,
|
|
135
130
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
136
131
|
|
|
132
|
+
const id = useId(idProp);
|
|
133
|
+
const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, {
|
|
134
|
+
"aria-labelledby": id,
|
|
135
|
+
color: "inherit",
|
|
136
|
+
size: 16
|
|
137
|
+
});
|
|
138
|
+
|
|
137
139
|
const ownerState = _extends({}, props, {
|
|
138
140
|
disabled,
|
|
139
141
|
loading,
|
|
@@ -145,6 +147,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
145
147
|
const classes = useUtilityClasses(ownerState);
|
|
146
148
|
return /*#__PURE__*/_jsx(LoadingButtonRoot, _extends({
|
|
147
149
|
disabled: disabled || loading,
|
|
150
|
+
id: id,
|
|
148
151
|
ref: ref
|
|
149
152
|
}, other, {
|
|
150
153
|
variant: variant,
|
|
@@ -189,6 +192,11 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
189
192
|
*/
|
|
190
193
|
disabled: PropTypes.bool,
|
|
191
194
|
|
|
195
|
+
/**
|
|
196
|
+
* @ignore
|
|
197
|
+
*/
|
|
198
|
+
id: PropTypes.string,
|
|
199
|
+
|
|
192
200
|
/**
|
|
193
201
|
* If `true`, the loading indicator is shown.
|
|
194
202
|
* @default false
|
|
@@ -197,6 +205,8 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
197
205
|
|
|
198
206
|
/**
|
|
199
207
|
* Element placed before the children if the button is in loading state.
|
|
208
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
209
|
+
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
200
210
|
* @default <CircularProgress color="inherit" size={16} />
|
|
201
211
|
*/
|
|
202
212
|
loadingIndicator: PropTypes.node,
|
package/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
28
28
|
|
|
29
29
|
var ClockPickerArrowSwitcher = styled(PickersArrowSwitcher, {
|
|
30
30
|
name: 'MuiClockPicker',
|
|
31
|
-
slot: '
|
|
31
|
+
slot: 'ArrowSwitcher',
|
|
32
32
|
overridesResolver: function overridesResolver(props, styles) {
|
|
33
33
|
return styles.arrowSwitcher;
|
|
34
34
|
}
|
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { chainPropTypes } from '@mui/utils';
|
|
7
|
-
import { capitalize } from '@mui/material/utils';
|
|
7
|
+
import { capitalize, unstable_useId as useId } from '@mui/material/utils';
|
|
8
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import Button from '@mui/material/Button';
|
|
@@ -103,12 +103,6 @@ var LoadingButtonLoadingIndicator = styled('div', {
|
|
|
103
103
|
right: -10
|
|
104
104
|
});
|
|
105
105
|
});
|
|
106
|
-
|
|
107
|
-
var LoadingIndicator = /*#__PURE__*/_jsx(CircularProgress, {
|
|
108
|
-
color: "inherit",
|
|
109
|
-
size: 16
|
|
110
|
-
});
|
|
111
|
-
|
|
112
106
|
var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
113
107
|
var props = useThemeProps({
|
|
114
108
|
props: inProps,
|
|
@@ -118,15 +112,22 @@ var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps
|
|
|
118
112
|
var children = props.children,
|
|
119
113
|
_props$disabled = props.disabled,
|
|
120
114
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
115
|
+
idProp = props.id,
|
|
121
116
|
_props$loading = props.loading,
|
|
122
117
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
123
|
-
|
|
124
|
-
loadingIndicator = _props$loadingIndicat === void 0 ? LoadingIndicator : _props$loadingIndicat,
|
|
118
|
+
loadingIndicatorProp = props.loadingIndicator,
|
|
125
119
|
_props$loadingPositio = props.loadingPosition,
|
|
126
120
|
loadingPosition = _props$loadingPositio === void 0 ? 'center' : _props$loadingPositio,
|
|
127
121
|
_props$variant = props.variant,
|
|
128
122
|
variant = _props$variant === void 0 ? 'text' : _props$variant,
|
|
129
|
-
other = _objectWithoutProperties(props, ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"]);
|
|
123
|
+
other = _objectWithoutProperties(props, ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"]);
|
|
124
|
+
|
|
125
|
+
var id = useId(idProp);
|
|
126
|
+
var loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, {
|
|
127
|
+
"aria-labelledby": id,
|
|
128
|
+
color: "inherit",
|
|
129
|
+
size: 16
|
|
130
|
+
});
|
|
130
131
|
|
|
131
132
|
var ownerState = _extends({}, props, {
|
|
132
133
|
disabled: disabled,
|
|
@@ -139,6 +140,7 @@ var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps
|
|
|
139
140
|
var classes = useUtilityClasses(ownerState);
|
|
140
141
|
return /*#__PURE__*/_jsx(LoadingButtonRoot, _extends({
|
|
141
142
|
disabled: disabled || loading,
|
|
143
|
+
id: id,
|
|
142
144
|
ref: ref
|
|
143
145
|
}, other, {
|
|
144
146
|
variant: variant,
|
|
@@ -183,6 +185,11 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
183
185
|
*/
|
|
184
186
|
disabled: PropTypes.bool,
|
|
185
187
|
|
|
188
|
+
/**
|
|
189
|
+
* @ignore
|
|
190
|
+
*/
|
|
191
|
+
id: PropTypes.string,
|
|
192
|
+
|
|
186
193
|
/**
|
|
187
194
|
* If `true`, the loading indicator is shown.
|
|
188
195
|
* @default false
|
|
@@ -191,6 +198,8 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
191
198
|
|
|
192
199
|
/**
|
|
193
200
|
* Element placed before the children if the button is in loading state.
|
|
201
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
202
|
+
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
194
203
|
* @default <CircularProgress color="inherit" size={16} />
|
|
195
204
|
*/
|
|
196
205
|
loadingIndicator: PropTypes.node,
|
package/legacy/index.js
CHANGED
|
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
|
|
|
30
30
|
|
|
31
31
|
const ClockPickerArrowSwitcher = styled(PickersArrowSwitcher, {
|
|
32
32
|
name: 'MuiClockPicker',
|
|
33
|
-
slot: '
|
|
33
|
+
slot: 'ArrowSwitcher',
|
|
34
34
|
overridesResolver: (props, styles) => styles.arrowSwitcher
|
|
35
35
|
})({
|
|
36
36
|
position: 'absolute',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
3
|
+
const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { chainPropTypes } from '@mui/utils';
|
|
7
|
-
import { capitalize } from '@mui/material/utils';
|
|
7
|
+
import { capitalize, unstable_useId as useId } from '@mui/material/utils';
|
|
8
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
10
10
|
import Button from '@mui/material/Button';
|
|
@@ -112,12 +112,6 @@ const LoadingButtonLoadingIndicator = styled('div', {
|
|
|
112
112
|
position: 'relative',
|
|
113
113
|
right: -10
|
|
114
114
|
}));
|
|
115
|
-
|
|
116
|
-
const LoadingIndicator = /*#__PURE__*/_jsx(CircularProgress, {
|
|
117
|
-
color: "inherit",
|
|
118
|
-
size: 16
|
|
119
|
-
});
|
|
120
|
-
|
|
121
115
|
const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
122
116
|
const props = useThemeProps({
|
|
123
117
|
props: inProps,
|
|
@@ -127,13 +121,22 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
127
121
|
const {
|
|
128
122
|
children,
|
|
129
123
|
disabled = false,
|
|
124
|
+
id: idProp,
|
|
130
125
|
loading = false,
|
|
131
|
-
loadingIndicator
|
|
126
|
+
loadingIndicator: loadingIndicatorProp,
|
|
132
127
|
loadingPosition = 'center',
|
|
133
128
|
variant = 'text'
|
|
134
129
|
} = props,
|
|
135
130
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
136
131
|
|
|
132
|
+
const id = useId(idProp);
|
|
133
|
+
|
|
134
|
+
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
|
|
135
|
+
"aria-labelledby": id,
|
|
136
|
+
color: "inherit",
|
|
137
|
+
size: 16
|
|
138
|
+
});
|
|
139
|
+
|
|
137
140
|
const ownerState = _extends({}, props, {
|
|
138
141
|
disabled,
|
|
139
142
|
loading,
|
|
@@ -145,6 +148,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
145
148
|
const classes = useUtilityClasses(ownerState);
|
|
146
149
|
return /*#__PURE__*/_jsx(LoadingButtonRoot, _extends({
|
|
147
150
|
disabled: disabled || loading,
|
|
151
|
+
id: id,
|
|
148
152
|
ref: ref
|
|
149
153
|
}, other, {
|
|
150
154
|
variant: variant,
|
|
@@ -189,6 +193,11 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
189
193
|
*/
|
|
190
194
|
disabled: PropTypes.bool,
|
|
191
195
|
|
|
196
|
+
/**
|
|
197
|
+
* @ignore
|
|
198
|
+
*/
|
|
199
|
+
id: PropTypes.string,
|
|
200
|
+
|
|
192
201
|
/**
|
|
193
202
|
* If `true`, the loading indicator is shown.
|
|
194
203
|
* @default false
|
|
@@ -197,6 +206,8 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
197
206
|
|
|
198
207
|
/**
|
|
199
208
|
* Element placed before the children if the button is in loading state.
|
|
209
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
210
|
+
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
200
211
|
* @default <CircularProgress color="inherit" size={16} />
|
|
201
212
|
*/
|
|
202
213
|
loadingIndicator: PropTypes.node,
|
package/modern/index.js
CHANGED
|
@@ -59,7 +59,7 @@ const useUtilityClasses = ownerState => {
|
|
|
59
59
|
|
|
60
60
|
const ClockPickerArrowSwitcher = (0, _styles.styled)(_PickersArrowSwitcher.default, {
|
|
61
61
|
name: 'MuiClockPicker',
|
|
62
|
-
slot: '
|
|
62
|
+
slot: 'ArrowSwitcher',
|
|
63
63
|
overridesResolver: (props, styles) => styles.arrowSwitcher
|
|
64
64
|
})({
|
|
65
65
|
position: 'absolute',
|
|
@@ -31,7 +31,7 @@ var _loadingButtonClasses = _interopRequireWildcard(require("./loadingButtonClas
|
|
|
31
31
|
|
|
32
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
33
|
|
|
34
|
-
const _excluded = ["children", "disabled", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
34
|
+
const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
@@ -136,10 +136,6 @@ const LoadingButtonLoadingIndicator = (0, _styles.styled)('div', {
|
|
|
136
136
|
position: 'relative',
|
|
137
137
|
right: -10
|
|
138
138
|
}));
|
|
139
|
-
const LoadingIndicator = /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
|
|
140
|
-
color: "inherit",
|
|
141
|
-
size: 16
|
|
142
|
-
});
|
|
143
139
|
const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
144
140
|
const props = (0, _styles.useThemeProps)({
|
|
145
141
|
props: inProps,
|
|
@@ -148,12 +144,19 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
148
144
|
const {
|
|
149
145
|
children,
|
|
150
146
|
disabled = false,
|
|
147
|
+
id: idProp,
|
|
151
148
|
loading = false,
|
|
152
|
-
loadingIndicator
|
|
149
|
+
loadingIndicator: loadingIndicatorProp,
|
|
153
150
|
loadingPosition = 'center',
|
|
154
151
|
variant = 'text'
|
|
155
152
|
} = props,
|
|
156
153
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
154
|
+
const id = (0, _utils2.unstable_useId)(idProp);
|
|
155
|
+
const loadingIndicator = loadingIndicatorProp != null ? loadingIndicatorProp : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
|
|
156
|
+
"aria-labelledby": id,
|
|
157
|
+
color: "inherit",
|
|
158
|
+
size: 16
|
|
159
|
+
});
|
|
157
160
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
158
161
|
disabled,
|
|
159
162
|
loading,
|
|
@@ -164,6 +167,7 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
164
167
|
const classes = useUtilityClasses(ownerState);
|
|
165
168
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LoadingButtonRoot, (0, _extends2.default)({
|
|
166
169
|
disabled: disabled || loading,
|
|
170
|
+
id: id,
|
|
167
171
|
ref: ref
|
|
168
172
|
}, other, {
|
|
169
173
|
variant: variant,
|
|
@@ -208,6 +212,11 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
208
212
|
*/
|
|
209
213
|
disabled: _propTypes.default.bool,
|
|
210
214
|
|
|
215
|
+
/**
|
|
216
|
+
* @ignore
|
|
217
|
+
*/
|
|
218
|
+
id: _propTypes.default.string,
|
|
219
|
+
|
|
211
220
|
/**
|
|
212
221
|
* If `true`, the loading indicator is shown.
|
|
213
222
|
* @default false
|
|
@@ -216,6 +225,8 @@ process.env.NODE_ENV !== "production" ? LoadingButton.propTypes
|
|
|
216
225
|
|
|
217
226
|
/**
|
|
218
227
|
* Element placed before the children if the button is in loading state.
|
|
228
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
229
|
+
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
219
230
|
* @default <CircularProgress color="inherit" size={16} />
|
|
220
231
|
*/
|
|
221
232
|
loadingIndicator: _propTypes.default.node,
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/lab",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.63",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Laboratory for new MUI modules.",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@date-io/dayjs": "^2.11.0",
|
|
61
61
|
"@date-io/luxon": "^2.11.1",
|
|
62
62
|
"@date-io/moment": "^2.11.0",
|
|
63
|
-
"@mui/base": "5.0.0-alpha.
|
|
64
|
-
"@mui/system": "^5.2.
|
|
63
|
+
"@mui/base": "5.0.0-alpha.63",
|
|
64
|
+
"@mui/system": "^5.2.6",
|
|
65
65
|
"@mui/utils": "^5.2.3",
|
|
66
66
|
"clsx": "^1.1.1",
|
|
67
67
|
"prop-types": "^15.7.2",
|