@mui/material 5.14.0 → 5.14.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/CHANGELOG.md +155 -3
- package/Chip/Chip.js +0 -2
- package/CssBaseline/CssBaseline.js +2 -2
- package/FormControlLabel/FormControlLabel.js +11 -6
- package/README.md +1 -1
- package/Slider/SliderValueLabel.d.ts +1 -6
- package/SvgIcon/SvgIcon.js +9 -9
- package/Tabs/Tabs.js +39 -42
- package/index.js +1 -1
- package/legacy/Chip/Chip.js +0 -2
- package/legacy/CssBaseline/CssBaseline.js +2 -2
- package/legacy/FormControlLabel/FormControlLabel.js +11 -6
- package/legacy/SvgIcon/SvgIcon.js +9 -9
- package/legacy/Tabs/Tabs.js +48 -48
- package/legacy/index.js +1 -1
- package/legacy/useTouchRipple/useTouchRipple.js +2 -2
- package/modern/Chip/Chip.js +0 -2
- package/modern/FormControlLabel/FormControlLabel.js +11 -6
- package/modern/Tabs/Tabs.js +39 -42
- package/modern/index.js +1 -1
- package/node/Chip/Chip.js +0 -2
- package/node/CssBaseline/CssBaseline.js +2 -2
- package/node/FormControlLabel/FormControlLabel.js +11 -6
- package/node/SvgIcon/SvgIcon.js +9 -9
- package/node/Tabs/Tabs.js +39 -42
- package/node/index.js +1 -1
- package/node/useTouchRipple/useTouchRipple.js +2 -2
- package/package.json +6 -6
- package/styles/components.d.ts +5 -0
- package/styles/overrides.d.ts +2 -0
- package/umd/material-ui.development.js +132 -132
- package/umd/material-ui.production.min.js +14 -14
- package/useTouchRipple/useTouchRipple.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,157 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.1..master -->
|
|
6
|
+
|
|
7
|
+
_Jul 25, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 23 contributors who made this release possible.
|
|
10
|
+
|
|
11
|
+
### @mui/material@5.14.2
|
|
12
|
+
|
|
13
|
+
- ​<!-- 39 -->Revert "[core] Adds `component` prop to `OverrideProps` type (#35924)" (#38150) @michaldudak
|
|
14
|
+
- ​<!-- 32 -->[Chip][material] Fix base cursor style to be "auto" not "default" (#38076) @DiegoAndai
|
|
15
|
+
- ​<!-- 12 -->[Tabs] Refactor IntersectionObserver logic (#38133) @ZeeshanTamboli
|
|
16
|
+
- ​<!-- 11 -->[Tabs] Fix and improve visibility of tab scroll buttons using the IntersectionObserver API (#36071) @SaidMarar
|
|
17
|
+
|
|
18
|
+
### @mui/joy@5.0.0-alpha.89
|
|
19
|
+
|
|
20
|
+
- ​<!-- 15 -->[Joy] Replace leftover `Joy-` prefix with `Mui-` (#38086) @siriwatknp
|
|
21
|
+
- ​<!-- 14 -->[Skeleton][joy] Fix WebkitMaskImage CSS property (#38077) @Bestwebdesign
|
|
22
|
+
- ​<!-- 13 -->[Link][Joy UI] Fix font inherit (#38124) @oliviertassinari
|
|
23
|
+
|
|
24
|
+
### Docs
|
|
25
|
+
|
|
26
|
+
- ​<!-- 37 -->[docs] Add listbox placement demo for Select (#38130) @sai6855
|
|
27
|
+
- ​<!-- 36 -->[docs][base] Add Tailwind CSS & plain CSS demo on the Tabs page (#37910) @mnajdova
|
|
28
|
+
- ​<!-- 35 -->[docs][base] Add Tailwind CSS & plain CSS demos on the Textarea page (#37943) @zanivan
|
|
29
|
+
- ​<!-- 29 -->[docs] Fix Joy UI menu example (#38140) @harikrishnanp
|
|
30
|
+
- ​<!-- 28 -->[docs] Remove translations section from contributing guide (#38125) @nikohoffren
|
|
31
|
+
- ​<!-- 27 -->[docs] Fix Base UI Button Tailwind CSS padding @oliviertassinari
|
|
32
|
+
- ​<!-- 26 -->[docs] Mention in hompage hero that Core is free (#38075) @mbrookes
|
|
33
|
+
- ​<!-- 25 -->[docs] Fix a typo in notifications.json (#38078) @mbrookes
|
|
34
|
+
- ​<!-- 24 -->[docs] Add Tailwind CSS & plain CSS demo on the table pagination page (#37937) @mnajdova
|
|
35
|
+
- ​<!-- 23 -->[docs] Implement the new API display design (#37405) @alexfauquette
|
|
36
|
+
- ​<!-- 22 -->[docs] Update migration installation code blocks (#38028) @danilo-leal
|
|
37
|
+
- ​<!-- 21 -->[docs][joy] Revise the Joy UI Link page (#37829) @danilo-leal
|
|
38
|
+
- ​<!-- 20 -->[docs][joy] Add playground for Card component (#37820) @Studio384
|
|
39
|
+
- ​<!-- 19 -->[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal
|
|
40
|
+
- ​<!-- 18 -->[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai
|
|
41
|
+
- ​<!-- 17 -->[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla
|
|
42
|
+
- ​<!-- 16 -->[examples] Fix material-next-app-router Font Usage with next/font (#38026) @onderonur
|
|
43
|
+
|
|
44
|
+
### Core
|
|
45
|
+
|
|
46
|
+
- ​<!-- 34 -->[blog] Update Discord invite link in Toolpad beta announcement (#38143) @samuelsycamore
|
|
47
|
+
- ​<!-- 33 -->[blog] Update discord server link (#38131) @prakhargupta1
|
|
48
|
+
- ​<!-- 31 -->[core] Fix rsc-builder removing the first line (#38134) @michaldudak
|
|
49
|
+
- ​<!-- 30 -->[core] Remove the deprecation rule in tslint (#38087) @michaldudak
|
|
50
|
+
- ​<!-- 09 -->[website] Mobile navigation: Toolpad to Beta (#38146) @bharatkashyap
|
|
51
|
+
- ​<!-- 08 -->[website] Fix typo on pricing page @oliviertassinari
|
|
52
|
+
- ​<!-- 07 -->[website] Fix a few regression (#38050) @oliviertassinari
|
|
53
|
+
- ​<!-- 06 -->[website] Update Demo footers on MUI X landing page (#38027) @richbustos
|
|
54
|
+
- ​<!-- 05 -->[website] Fix 301 redirection to base index page @oliviertassinari
|
|
55
|
+
- ​<!-- 04 -->[website] Fix Cell selection feature name (#38029) @oliviertassinari
|
|
56
|
+
- ​<!-- 03 -->[website] Improve button look (#38052) @oliviertassinari
|
|
57
|
+
- ​<!-- 02 -->[website] Link new core page to new Base UI landing page (#38030) @mj12albert
|
|
58
|
+
- ​<!-- 01 -->[website] Polish pricing page (#37975) @oliviertassinari
|
|
59
|
+
- ​<!-- 10 -->[test] Fail the CI when new unexpected files are created (#38039) @oliviertassinari
|
|
60
|
+
- ​<!-- 09 -->[test] Fix linting error by matching main component demo name to filename (#38122) @ZeeshanTamboli
|
|
61
|
+
|
|
62
|
+
All contributors of this release in alphabetical order: @alexfauquette, @Bestwebdesign, @bharatkashyap, @danilo-leal, @DiegoAndai, @harikrishnanp, @IgnacioUtrilla, @mbrookes, @michaldudak, @mj12albert, @mnajdova, @nikohoffren, @oliviertassinari, @onderonur, @prakhargupta1, @richbustos, @sai6855, @SaidMarar, @samuelsycamore, @siriwatknp, @Studio384, @zanivan, @ZeeshanTamboli
|
|
63
|
+
|
|
64
|
+
## 5.14.1
|
|
65
|
+
|
|
66
|
+
<!-- generated comparing v5.14.0..master -->
|
|
67
|
+
|
|
68
|
+
_Jul 19, 2023_
|
|
69
|
+
|
|
70
|
+
A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
|
|
71
|
+
|
|
72
|
+
- 💫 Introducing some new components for Joy UI:
|
|
73
|
+
- [Skeleton](https://mui.com/joy-ui/react-skeleton/) component (#37893) @siriwatknp
|
|
74
|
+
- [ToggleButton](https://mui.com/joy-ui/react-toggle-button-group/) (#37716) @siriwatknp
|
|
75
|
+
- 🎉 Base UI has its own [landing page](https://www.mui.com/base-ui)!
|
|
76
|
+
- 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
77
|
+
|
|
78
|
+
### `@mui/material@5.14.1`
|
|
79
|
+
|
|
80
|
+
- ​<!-- 14 -->[FormControlLabel] Fix misplaced asterisk when `labelPlacement` is provided (#37831) @ZeeshanTamboli
|
|
81
|
+
- ​<!-- 11 -->[Slider][material] Fix type dependency on @types/prop-types (#37853) @Methuselah96
|
|
82
|
+
- ​<!-- 10 -->[Menu] Add MuiMenuList to createTheme components key (#37956) @mj12albert
|
|
83
|
+
- ​<!-- 09 -->[Modal] Remove deprecated `BackdropComponent` and `BackdropProps` from tests (#38018) @sai6855
|
|
84
|
+
|
|
85
|
+
### `@mui/material-next@6.0.0-alpha.93`
|
|
86
|
+
|
|
87
|
+
- ​<!-- 54 -->[Slider][material-next] Add use client directive to useSliderElementsOverlap (#37955) @mj12albert
|
|
88
|
+
- ​<!-- 47 -->[Button][material-next] Fix some event handlers being ignored (#37647) @DiegoAndai
|
|
89
|
+
|
|
90
|
+
### `@mui/base@5.0.0-beta.8`
|
|
91
|
+
|
|
92
|
+
- ​<!-- 53 -->[Autocomplete] Make touch and click behavior on an option consistent (#37972) @divyammadhok
|
|
93
|
+
|
|
94
|
+
### `@mui/joy@5.0.0-alpha.88`
|
|
95
|
+
|
|
96
|
+
- ​<!-- 13 -->[Joy][Select] Fix type error caused by custom variant (#37996) @OmPr366
|
|
97
|
+
- ​<!-- 12 -->[ToggleButton][Joy] Add `ToggleButton` component (#37716) @siriwatknp
|
|
98
|
+
- ​<!-- 07 -->[Skeleton] Add Joy UI `Skeleton` component (#37893) @siriwatknp
|
|
99
|
+
|
|
100
|
+
### `@mui/utils@5.14.1`
|
|
101
|
+
|
|
102
|
+
- ​<!-- 06 -->[utils] Add function overload for `useEventCallback` (#37827) @cherniavskii
|
|
103
|
+
|
|
104
|
+
### Docs
|
|
105
|
+
|
|
106
|
+
- ​<!-- 52 -->[docs][base] Add Tailwind CSS & plain CSS demo on the form control page (#37914) @mnajdova
|
|
107
|
+
- ​<!-- 51 -->[docs][base] Make Base UI Select demos denser (#37836) @zanivan
|
|
108
|
+
- ​<!-- 38 -->[docs] Link Material UI from the landing page (#37971) @oliviertassinari
|
|
109
|
+
- ​<!-- 37 -->[docs] Fix the empty /components page (#38010) @brijeshb42
|
|
110
|
+
- ​<!-- 36 -->[docs] Checkout template follows user's color scheme preference (#37928) @OndrejHj04
|
|
111
|
+
- ​<!-- 35 -->[docs] Disable ad for onboarding pages (#37998) @oliviertassinari
|
|
112
|
+
- ​<!-- 34 -->[docs] Fix broken link to Base UI Next.js App Router (#37973) @oliviertassinari
|
|
113
|
+
- ​<!-- 33 -->[docs] Fix typo in next-js-app-router.md (#37974) @ericbrian
|
|
114
|
+
- ​<!-- 32 -->[docs] Add pnpm commands to Material UI Installation page (#36650) @officialrajdeepsingh
|
|
115
|
+
- ​<!-- 31 -->[docs] Link charts in the roadmap (#37944) @oliviertassinari
|
|
116
|
+
- ​<!-- 30 -->[docs] Improve changelog @oliviertassinari
|
|
117
|
+
- ​<!-- 29 -->[docs] Improve the Select docs (#37279) @michaldudak
|
|
118
|
+
- ​<!-- 16 -->[docs][menu] Add Tailwind CSS & plain CSS demo on the Menu page (#37856) @mnajdova
|
|
119
|
+
- ​<!-- 15 -->[example] Update EmotionCacheProvider to work with GlobalStyles (#37962) @siriwatknp
|
|
120
|
+
|
|
121
|
+
### Core
|
|
122
|
+
|
|
123
|
+
- ​<!-- 50 -->[blog] Add blog post about support for Next.js App Router (#37929) @samuelsycamore
|
|
124
|
+
- ​<!-- 49 -->[blog] Blog MUI X pro statement removed (#38015) @prakhargupta1
|
|
125
|
+
- ​<!-- 48 -->[blog] Add Toolpad beta announcement blog (#37799) @prakhargupta1
|
|
126
|
+
- ​<!-- 46 -->[core] Increase space available for sidenav @oliviertassinari
|
|
127
|
+
- ​<!-- 45 -->[core] Adds `component` prop to `OverrideProps` type (#35924) @sai6855
|
|
128
|
+
- ​<!-- 44 -->[core] Fix rsc build step in CI (#38019) @mj12albert
|
|
129
|
+
- ​<!-- 43 -->[core] Remove nx dependency (#37964) @Janpot
|
|
130
|
+
- ​<!-- 42 -->[core] Lock `@types/node` to v18 (#37965) @ZeeshanTamboli
|
|
131
|
+
- ​<!-- 41 -->[core] Update priority support issue template and prompt (#37824) @DanailH
|
|
132
|
+
- ​<!-- 40 -->[core] Remove warnings in docs:api (#37858) @alexfauquette
|
|
133
|
+
- ​<!-- 39 -->[core] Make rimraf work after a major update (#37930) @michaldudak
|
|
134
|
+
- ​<!-- 28 -->[docs-infra] Change the Diamond Sponsor block positioning on the side nav (#37933) @danilo-leal
|
|
135
|
+
- ​<!-- 27 -->[docs-infra] Support backticks in the codeblocks (#37950) @cherniavskii
|
|
136
|
+
- ​<!-- 26 -->[docs-infra] Improve performance hideToolbar: true (#37969) @oliviertassinari
|
|
137
|
+
- ​<!-- 25 -->[docs-infra] Fix button label on mobile (#37997) @oliviertassinari
|
|
138
|
+
- ​<!-- 24 -->[docs-infra] Square drawer corners (#37970) @oliviertassinari
|
|
139
|
+
- ​<!-- 23 -->[docs-infra] Improve tab contrast in codeblock (#38000) @oliviertassinari
|
|
140
|
+
- ​<!-- 22 -->[docs-infra] Fix API generation for Base UI (#37941) @oliviertassinari
|
|
141
|
+
- ​<!-- 21 -->[docs-infra] Fix layout shift on xGrid (#37954) @oliviertassinari
|
|
142
|
+
- ​<!-- 20 -->[docs-infra] Update installation commands to use the new tabs code component (#37927) @danilo-leal
|
|
143
|
+
- ​<!-- 19 -->[docs-infra] Improve disableToc={true} support (#37931) @oliviertassinari
|
|
144
|
+
- ​<!-- 18 -->[docs-infra] Remove icons and tweak the design of the side nav (#37860) @danilo-leal
|
|
145
|
+
- ​<!-- 17 -->[docs-infra] Fix TypeScrit error in demo export (#37830) @oliviertassinari
|
|
146
|
+
- ​<!-- 08 -->[notifications] Add notification for first Charts release (#37679) @joserodolfofreitas
|
|
147
|
+
- ​<!-- 05 -->[website] Add Base UI marketing page (#36622) @siriwatknp
|
|
148
|
+
- ​<!-- 04 -->[website] Update MUI X landing page (#37966) @cherniavskii
|
|
149
|
+
- ​<!-- 03 -->[website] Fix a11y issues (#37999) @oliviertassinari
|
|
150
|
+
- ​<!-- 02 -->[website] Make the Core page refer to group of products (#37608) @danilo-leal
|
|
151
|
+
- ​<!-- 01 -->[website] Add perpetual option to pricing page (#35504) @joserodolfofreitas
|
|
152
|
+
|
|
153
|
+
All contributors of this release in alphabetical order: @alexfauquette, @brijeshb42, @cherniavskii, @DanailH, @danilo-leal, @DiegoAndai, @divyammadhok, @ericbrian, @Janpot, @joserodolfofreitas, @Methuselah96, @michaldudak, @mj12albert, @mnajdova, @officialrajdeepsingh, @oliviertassinari, @OmPr366, @OndrejHj04, @prakhargupta1, @sai6855, @samuelsycamore, @siriwatknp, @zanivan, @ZeeshanTamboli
|
|
154
|
+
|
|
3
155
|
## 5.14.0
|
|
4
156
|
|
|
5
157
|
<!-- generated comparing v5.13.7..master -->
|
|
@@ -34,8 +186,8 @@ A big thanks to the 15 contributors who made this release possible. Here are som
|
|
|
34
186
|
|
|
35
187
|
### Docs
|
|
36
188
|
|
|
37
|
-
- [docs] Polish
|
|
38
|
-
- [docs] Reduce
|
|
189
|
+
- [docs] Polish Ukraine banner (#37905) @oliviertassinari
|
|
190
|
+
- [docs] Reduce Ukraine banner size (#34795) @oliviertassinari
|
|
39
191
|
- [docs] Add callouts about controlled vs uncontrolled components in Core docs (#37849) @samuelsycamore
|
|
40
192
|
- [docs] Add missing Portal elements to Tailwind CSS interoperability guide (#37807) @enrique-ramirez
|
|
41
193
|
- [docs] Small pickers migration improvement (#37815) @alexfauquette
|
|
@@ -10006,7 +10158,7 @@ _Nov 14, 2020_
|
|
|
10006
10158
|
A big thanks to the 34 contributors who made this release possible. Here are some highlights ✨:
|
|
10007
10159
|
|
|
10008
10160
|
- 📅 Migrate the date picker to the lab (#22692) @dmtrKovalenko.
|
|
10009
|
-
We have integrated the components with the code infrastructure. Next we will migrate all the GitHub issues from [material-ui-pickers](https://github.com/mui/material-ui-pickers) and archive the repository. This migration will help provide first-class support for the date picker components. The component will stay in the lab as long as necessary to reach the high
|
|
10161
|
+
We have integrated the components with the code infrastructure. Next we will migrate all the GitHub issues from [material-ui-pickers](https://github.com/mui/material-ui-pickers) and archive the repository. This migration will help provide first-class support for the date picker components. The component will stay in the lab as long as necessary to reach the high-quality bar we have for core components. You can find the [new documentation here](https://mui.com/components/pickers/).
|
|
10010
10162
|
|
|
10011
10163
|
While the source code is currently hosted in the [main repository](https://github.com/mui/material-ui), we might move it to the [x repository](https://github.com/mui/mui-x) in the future, depending on what is easier for the commercial date range picker. The date picker will stay open source no matter what.
|
|
10012
10164
|
|
package/Chip/Chip.js
CHANGED
|
@@ -93,8 +93,6 @@ const ChipRoot = styled('div', {
|
|
|
93
93
|
borderRadius: 32 / 2,
|
|
94
94
|
whiteSpace: 'nowrap',
|
|
95
95
|
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
96
|
-
// label will inherit this from root, then `clickable` class overrides this for both
|
|
97
|
-
cursor: 'default',
|
|
98
96
|
// We disable the focus ring for mouse, touch and keyboard users.
|
|
99
97
|
outline: 0,
|
|
100
98
|
textDecoration: 'none',
|
|
@@ -30,7 +30,7 @@ export const body = theme => _extends({
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export const styles = (theme, enableColorScheme = false) => {
|
|
33
|
-
var _theme$components
|
|
33
|
+
var _theme$components;
|
|
34
34
|
const colorSchemeStyles = {};
|
|
35
35
|
if (enableColorScheme && theme.colorSchemes) {
|
|
36
36
|
Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
|
|
@@ -58,7 +58,7 @@ export const styles = (theme, enableColorScheme = false) => {
|
|
|
58
58
|
}
|
|
59
59
|
})
|
|
60
60
|
}, colorSchemeStyles);
|
|
61
|
-
const themeOverrides = (_theme$components = theme.components) == null
|
|
61
|
+
const themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;
|
|
62
62
|
if (themeOverrides) {
|
|
63
63
|
defaultStyles = [defaultStyles, themeOverrides];
|
|
64
64
|
}
|
|
@@ -9,6 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
11
11
|
import { useFormControl } from '../FormControl';
|
|
12
|
+
import Stack from '../Stack';
|
|
12
13
|
import Typography from '../Typography';
|
|
13
14
|
import capitalize from '../utils/capitalize';
|
|
14
15
|
import styled from '../styles/styled';
|
|
@@ -150,12 +151,16 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
150
151
|
ownerState: ownerState,
|
|
151
152
|
ref: ref
|
|
152
153
|
}, other, {
|
|
153
|
-
children: [/*#__PURE__*/React.cloneElement(control, controlProps),
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/_jsxs(Stack, {
|
|
155
|
+
direction: "row",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
children: [label, /*#__PURE__*/_jsxs(AsteriskComponent, {
|
|
158
|
+
ownerState: ownerState,
|
|
159
|
+
"aria-hidden": true,
|
|
160
|
+
className: classes.asterisk,
|
|
161
|
+
children: ["\u2009", '*']
|
|
162
|
+
})]
|
|
163
|
+
}) : label]
|
|
159
164
|
}));
|
|
160
165
|
});
|
|
161
166
|
process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-proptypes */ = {
|
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Diamond Sponsors are those who have pledged \$1,500/month or more to MUI.
|
|
|
131
131
|
via [OpenCollective](https://opencollective.com/mui) or via [Patreon](https://www.patreon.com/oliviertassinari)
|
|
132
132
|
|
|
133
133
|
<p>
|
|
134
|
-
<a href="https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://avatars.githubusercontent.com/u/30204434?s=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
|
|
134
|
+
<a href="https://www.tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://avatars.githubusercontent.com/u/30204434?s=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
|
|
135
135
|
<a href="https://www.text-em-all.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img src="https://avatars.githubusercontent.com/u/1262264?s=192" alt="text-em-all.com" title="Mass Text Messaging & Automated Calling" height="96" width="96" loading="lazy"></a>
|
|
136
136
|
<a href="https://open.spotify.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/spotify/f37ea28/logo/192.png" alt="Spotify" title="Music service to access to millions of songs" loading="lazy" /></a>
|
|
137
137
|
<a href="https://megafamous.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://mui.com/static/sponsors/megafamous.png" alt="megafamous.com" title="The best place to buy Instagram followers & likes." loading="lazy" /></a>
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { SliderValueLabelProps } from './SliderValueLabel.types';
|
|
4
3
|
/**
|
|
5
4
|
* @ignore - internal component.
|
|
6
5
|
*/
|
|
7
6
|
declare function SliderValueLabel(props: SliderValueLabelProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
8
7
|
declare namespace SliderValueLabel {
|
|
9
|
-
var propTypes:
|
|
10
|
-
children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
11
|
-
className: PropTypes.Requireable<string>;
|
|
12
|
-
value: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
-
};
|
|
8
|
+
var propTypes: any;
|
|
14
9
|
}
|
|
15
10
|
export default SliderValueLabel;
|
package/SvgIcon/SvgIcon.js
CHANGED
|
@@ -37,7 +37,7 @@ const SvgIconRoot = styled('svg', {
|
|
|
37
37
|
theme,
|
|
38
38
|
ownerState
|
|
39
39
|
}) => {
|
|
40
|
-
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$
|
|
40
|
+
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;
|
|
41
41
|
return {
|
|
42
42
|
userSelect: 'none',
|
|
43
43
|
width: '1em',
|
|
@@ -47,19 +47,19 @@ const SvgIconRoot = styled('svg', {
|
|
|
47
47
|
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
48
48
|
fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
|
|
49
49
|
flexShrink: 0,
|
|
50
|
-
transition: (_theme$transitions = theme.transitions) == null
|
|
51
|
-
duration: (_theme$transitions2 = theme.transitions) == null
|
|
50
|
+
transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
51
|
+
duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter
|
|
52
52
|
}),
|
|
53
53
|
fontSize: {
|
|
54
54
|
inherit: 'inherit',
|
|
55
|
-
small: ((_theme$typography = theme.typography) == null
|
|
56
|
-
medium: ((_theme$typography2 = theme.typography) == null
|
|
57
|
-
large: ((_theme$typography3 = theme.typography) == null
|
|
55
|
+
small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
|
56
|
+
medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
|
57
|
+
large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
|
|
58
58
|
}[ownerState.fontSize],
|
|
59
59
|
// TODO v5 deprecate, v6 remove for sx
|
|
60
|
-
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null
|
|
61
|
-
action: (_palette2 = (theme.vars || theme).palette) == null
|
|
62
|
-
disabled: (_palette3 = (theme.vars || theme).palette) == null
|
|
60
|
+
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {
|
|
61
|
+
action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,
|
|
62
|
+
disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,
|
|
63
63
|
inherit: undefined
|
|
64
64
|
}[ownerState.color]
|
|
65
65
|
};
|
package/Tabs/Tabs.js
CHANGED
|
@@ -280,10 +280,9 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
280
280
|
}
|
|
281
281
|
const [mounted, setMounted] = React.useState(false);
|
|
282
282
|
const [indicatorStyle, setIndicatorStyle] = React.useState(defaultIndicatorStyle);
|
|
283
|
-
const [
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
});
|
|
283
|
+
const [displayStartScroll, setDisplayStartScroll] = React.useState(false);
|
|
284
|
+
const [displayEndScroll, setDisplayEndScroll] = React.useState(false);
|
|
285
|
+
const [updateScrollObserver, setUpdateScrollObserver] = React.useState(false);
|
|
287
286
|
const [scrollerStyle, setScrollerStyle] = React.useState({
|
|
288
287
|
overflow: 'hidden',
|
|
289
288
|
scrollbarWidth: 0
|
|
@@ -434,7 +433,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
434
433
|
onChange: handleScrollbarSizeChange,
|
|
435
434
|
className: clsx(classes.scrollableX, classes.hideScrollbar)
|
|
436
435
|
}) : null;
|
|
437
|
-
const scrollButtonsActive =
|
|
436
|
+
const scrollButtonsActive = displayStartScroll || displayEndScroll;
|
|
438
437
|
const showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === true);
|
|
439
438
|
conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({
|
|
440
439
|
slots: {
|
|
@@ -446,7 +445,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
446
445
|
orientation: orientation,
|
|
447
446
|
direction: isRtl ? 'right' : 'left',
|
|
448
447
|
onClick: handleStartScrollClick,
|
|
449
|
-
disabled: !
|
|
448
|
+
disabled: !displayStartScroll
|
|
450
449
|
}, TabScrollButtonProps, {
|
|
451
450
|
className: clsx(classes.scrollButtons, TabScrollButtonProps.className)
|
|
452
451
|
})) : null;
|
|
@@ -460,7 +459,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
460
459
|
orientation: orientation,
|
|
461
460
|
direction: isRtl ? 'left' : 'right',
|
|
462
461
|
onClick: handleEndScrollClick,
|
|
463
|
-
disabled: !
|
|
462
|
+
disabled: !displayEndScroll
|
|
464
463
|
}, TabScrollButtonProps, {
|
|
465
464
|
className: clsx(classes.scrollButtons, TabScrollButtonProps.className)
|
|
466
465
|
})) : null;
|
|
@@ -490,30 +489,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
490
489
|
});
|
|
491
490
|
const updateScrollButtonState = useEventCallback(() => {
|
|
492
491
|
if (scrollable && scrollButtons !== false) {
|
|
493
|
-
|
|
494
|
-
scrollTop,
|
|
495
|
-
scrollHeight,
|
|
496
|
-
clientHeight,
|
|
497
|
-
scrollWidth,
|
|
498
|
-
clientWidth
|
|
499
|
-
} = tabsRef.current;
|
|
500
|
-
let showStartScroll;
|
|
501
|
-
let showEndScroll;
|
|
502
|
-
if (vertical) {
|
|
503
|
-
showStartScroll = scrollTop > 1;
|
|
504
|
-
showEndScroll = scrollTop < scrollHeight - clientHeight - 1;
|
|
505
|
-
} else {
|
|
506
|
-
const scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction);
|
|
507
|
-
// use 1 for the potential rounding error with browser zooms.
|
|
508
|
-
showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;
|
|
509
|
-
showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;
|
|
510
|
-
}
|
|
511
|
-
if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {
|
|
512
|
-
setDisplayScroll({
|
|
513
|
-
start: showStartScroll,
|
|
514
|
-
end: showEndScroll
|
|
515
|
-
});
|
|
516
|
-
}
|
|
492
|
+
setUpdateScrollObserver(!updateScrollObserver);
|
|
517
493
|
}
|
|
518
494
|
});
|
|
519
495
|
React.useEffect(() => {
|
|
@@ -526,7 +502,6 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
526
502
|
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
527
503
|
if (tabsRef.current) {
|
|
528
504
|
updateIndicatorState();
|
|
529
|
-
updateScrollButtonState();
|
|
530
505
|
}
|
|
531
506
|
});
|
|
532
507
|
const win = ownerWindow(tabsRef.current);
|
|
@@ -545,21 +520,44 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
545
520
|
resizeObserver.disconnect();
|
|
546
521
|
}
|
|
547
522
|
};
|
|
548
|
-
}, [updateIndicatorState
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
523
|
+
}, [updateIndicatorState]);
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Toggle visibility of start and end scroll buttons
|
|
527
|
+
* Using IntersectionObserver on first and last Tabs.
|
|
528
|
+
*/
|
|
552
529
|
React.useEffect(() => {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
530
|
+
const tabListChildren = Array.from(tabListRef.current.children);
|
|
531
|
+
const length = tabListChildren.length;
|
|
532
|
+
if (typeof IntersectionObserver !== 'undefined' && length > 0 && scrollable && scrollButtons !== false) {
|
|
533
|
+
const firstTab = tabListChildren[0];
|
|
534
|
+
const lastTab = tabListChildren[length - 1];
|
|
535
|
+
const observerOptions = {
|
|
536
|
+
root: tabsRef.current,
|
|
537
|
+
threshold: 0.99
|
|
538
|
+
};
|
|
539
|
+
const handleScrollButtonStart = entries => {
|
|
540
|
+
setDisplayStartScroll(!entries[0].isIntersecting);
|
|
541
|
+
};
|
|
542
|
+
const firstObserver = new IntersectionObserver(handleScrollButtonStart, observerOptions);
|
|
543
|
+
firstObserver.observe(firstTab);
|
|
544
|
+
const handleScrollButtonEnd = entries => {
|
|
545
|
+
setDisplayEndScroll(!entries[0].isIntersecting);
|
|
546
|
+
};
|
|
547
|
+
const lastObserver = new IntersectionObserver(handleScrollButtonEnd, observerOptions);
|
|
548
|
+
lastObserver.observe(lastTab);
|
|
549
|
+
return () => {
|
|
550
|
+
firstObserver.disconnect();
|
|
551
|
+
lastObserver.disconnect();
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
return undefined;
|
|
555
|
+
}, [scrollable, scrollButtons, updateScrollObserver, childrenProp == null ? void 0 : childrenProp.length]);
|
|
557
556
|
React.useEffect(() => {
|
|
558
557
|
setMounted(true);
|
|
559
558
|
}, []);
|
|
560
559
|
React.useEffect(() => {
|
|
561
560
|
updateIndicatorState();
|
|
562
|
-
updateScrollButtonState();
|
|
563
561
|
});
|
|
564
562
|
React.useEffect(() => {
|
|
565
563
|
// Don't animate on the first render.
|
|
@@ -653,7 +651,6 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
653
651
|
[vertical ? `margin${isRtl ? 'Left' : 'Right'}` : 'marginBottom']: visibleScrollbar ? undefined : -scrollerStyle.scrollbarWidth
|
|
654
652
|
},
|
|
655
653
|
ref: tabsRef,
|
|
656
|
-
onScroll: handleTabsScroll,
|
|
657
654
|
children: [/*#__PURE__*/_jsx(FlexContainer, {
|
|
658
655
|
"aria-label": ariaLabel,
|
|
659
656
|
"aria-labelledby": ariaLabelledBy,
|
package/index.js
CHANGED
package/legacy/Chip/Chip.js
CHANGED
|
@@ -67,8 +67,6 @@ var ChipRoot = styled('div', {
|
|
|
67
67
|
borderRadius: 32 / 2,
|
|
68
68
|
whiteSpace: 'nowrap',
|
|
69
69
|
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
70
|
-
// label will inherit this from root, then `clickable` class overrides this for both
|
|
71
|
-
cursor: 'default',
|
|
72
70
|
// We disable the focus ring for mouse, touch and keyboard users.
|
|
73
71
|
outline: 0,
|
|
74
72
|
textDecoration: 'none',
|
|
@@ -35,7 +35,7 @@ export var body = function body(theme) {
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
var _styles = function styles(theme) {
|
|
38
|
-
var _theme$components
|
|
38
|
+
var _theme$components;
|
|
39
39
|
var enableColorScheme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40
40
|
var colorSchemeStyles = {};
|
|
41
41
|
if (enableColorScheme && theme.colorSchemes) {
|
|
@@ -67,7 +67,7 @@ var _styles = function styles(theme) {
|
|
|
67
67
|
}
|
|
68
68
|
})
|
|
69
69
|
}, colorSchemeStyles);
|
|
70
|
-
var themeOverrides = (_theme$components = theme.components) == null
|
|
70
|
+
var themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;
|
|
71
71
|
if (themeOverrides) {
|
|
72
72
|
defaultStyles = [defaultStyles, themeOverrides];
|
|
73
73
|
}
|
|
@@ -9,6 +9,7 @@ import clsx from 'clsx';
|
|
|
9
9
|
import { refType } from '@mui/utils';
|
|
10
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
11
11
|
import { useFormControl } from '../FormControl';
|
|
12
|
+
import Stack from '../Stack';
|
|
12
13
|
import Typography from '../Typography';
|
|
13
14
|
import capitalize from '../utils/capitalize';
|
|
14
15
|
import styled from '../styles/styled';
|
|
@@ -146,12 +147,16 @@ var FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(i
|
|
|
146
147
|
ownerState: ownerState,
|
|
147
148
|
ref: ref
|
|
148
149
|
}, other, {
|
|
149
|
-
children: [/*#__PURE__*/React.cloneElement(control, controlProps),
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/_jsxs(Stack, {
|
|
151
|
+
direction: "row",
|
|
152
|
+
alignItems: "center",
|
|
153
|
+
children: [label, /*#__PURE__*/_jsxs(AsteriskComponent, {
|
|
154
|
+
ownerState: ownerState,
|
|
155
|
+
"aria-hidden": true,
|
|
156
|
+
className: classes.asterisk,
|
|
157
|
+
children: ["\u2009", '*']
|
|
158
|
+
})]
|
|
159
|
+
}) : label]
|
|
155
160
|
}));
|
|
156
161
|
});
|
|
157
162
|
process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-proptypes */ = {
|
|
@@ -29,7 +29,7 @@ var SvgIconRoot = styled('svg', {
|
|
|
29
29
|
return [styles.root, ownerState.color !== 'inherit' && styles["color".concat(capitalize(ownerState.color))], styles["fontSize".concat(capitalize(ownerState.fontSize))]];
|
|
30
30
|
}
|
|
31
31
|
})(function (_ref) {
|
|
32
|
-
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$
|
|
32
|
+
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;
|
|
33
33
|
var theme = _ref.theme,
|
|
34
34
|
ownerState = _ref.ownerState;
|
|
35
35
|
return {
|
|
@@ -41,19 +41,19 @@ var SvgIconRoot = styled('svg', {
|
|
|
41
41
|
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
42
42
|
fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
|
|
43
43
|
flexShrink: 0,
|
|
44
|
-
transition: (_theme$transitions = theme.transitions) == null
|
|
45
|
-
duration: (_theme$transitions2 = theme.transitions) == null
|
|
44
|
+
transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
45
|
+
duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter
|
|
46
46
|
}),
|
|
47
47
|
fontSize: {
|
|
48
48
|
inherit: 'inherit',
|
|
49
|
-
small: ((_theme$typography = theme.typography) == null
|
|
50
|
-
medium: ((_theme$typography2 = theme.typography) == null
|
|
51
|
-
large: ((_theme$typography3 = theme.typography) == null
|
|
49
|
+
small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
|
50
|
+
medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
|
51
|
+
large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
|
|
52
52
|
}[ownerState.fontSize],
|
|
53
53
|
// TODO v5 deprecate, v6 remove for sx
|
|
54
|
-
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null
|
|
55
|
-
action: (_palette2 = (theme.vars || theme).palette) == null
|
|
56
|
-
disabled: (_palette3 = (theme.vars || theme).palette) == null
|
|
54
|
+
color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {
|
|
55
|
+
action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,
|
|
56
|
+
disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,
|
|
57
57
|
inherit: undefined
|
|
58
58
|
}[ownerState.color]
|
|
59
59
|
};
|