@mui/utils 6.0.0-alpha.1 → 6.0.0-alpha.5
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 +207 -2
- package/getDisplayName/getDisplayName.d.ts +0 -1
- package/getDisplayName/getDisplayName.js +1 -10
- package/getDisplayName/index.d.ts +0 -1
- package/getDisplayName/index.js +1 -2
- package/index.js +1 -1
- package/integerPropType/integerPropType.js +1 -8
- package/modern/getDisplayName/getDisplayName.js +1 -10
- package/modern/getDisplayName/index.js +1 -2
- package/modern/index.js +1 -1
- package/modern/integerPropType/integerPropType.js +1 -8
- package/node/getDisplayName/getDisplayName.js +1 -10
- package/node/getDisplayName/index.js +2 -15
- package/node/index.js +1 -1
- package/node/integerPropType/integerPropType.js +1 -8
- package/package.json +1 -1
- package/legacy/ClassNameGenerator/ClassNameGenerator.js +0 -19
- package/legacy/ClassNameGenerator/index.js +0 -1
- package/legacy/HTMLElementType/HTMLElementType.js +0 -14
- package/legacy/HTMLElementType/index.js +0 -1
- package/legacy/capitalize/capitalize.js +0 -11
- package/legacy/capitalize/index.js +0 -1
- package/legacy/chainPropTypes/chainPropTypes.js +0 -10
- package/legacy/chainPropTypes/index.js +0 -1
- package/legacy/clamp/clamp.js +0 -6
- package/legacy/clamp/index.js +0 -1
- package/legacy/composeClasses/composeClasses.js +0 -22
- package/legacy/composeClasses/index.js +0 -1
- package/legacy/createChainedFunction/createChainedFunction.js +0 -23
- package/legacy/createChainedFunction/index.js +0 -1
- package/legacy/debounce/debounce.js +0 -22
- package/legacy/debounce/index.js +0 -2
- package/legacy/deepmerge/deepmerge.js +0 -43
- package/legacy/deepmerge/index.js +0 -2
- package/legacy/deprecatedPropType/deprecatedPropType.js +0 -15
- package/legacy/deprecatedPropType/index.js +0 -1
- package/legacy/elementAcceptingRef/elementAcceptingRef.js +0 -41
- package/legacy/elementAcceptingRef/index.js +0 -1
- package/legacy/elementTypeAcceptingRef/elementTypeAcceptingRef.js +0 -39
- package/legacy/elementTypeAcceptingRef/index.js +0 -1
- package/legacy/exactProp/exactProp.js +0 -23
- package/legacy/exactProp/index.js +0 -1
- package/legacy/formatMuiErrorMessage/formatMuiErrorMessage.js +0 -19
- package/legacy/formatMuiErrorMessage/index.js +0 -1
- package/legacy/generateUtilityClass/generateUtilityClass.js +0 -23
- package/legacy/generateUtilityClass/index.js +0 -2
- package/legacy/generateUtilityClasses/generateUtilityClasses.js +0 -9
- package/legacy/generateUtilityClasses/index.js +0 -1
- package/legacy/getDisplayName/getDisplayName.js +0 -49
- package/legacy/getDisplayName/index.js +0 -2
- package/legacy/getScrollbarSize/getScrollbarSize.js +0 -7
- package/legacy/getScrollbarSize/index.js +0 -1
- package/legacy/getValidReactChildren/getValidReactChildren.js +0 -13
- package/legacy/getValidReactChildren/index.js +0 -1
- package/legacy/index.js +0 -51
- package/legacy/integerPropType/index.js +0 -2
- package/legacy/integerPropType/integerPropType.js +0 -55
- package/legacy/isMuiElement/index.js +0 -1
- package/legacy/isMuiElement/isMuiElement.js +0 -8
- package/legacy/ownerDocument/index.js +0 -1
- package/legacy/ownerDocument/ownerDocument.js +0 -3
- package/legacy/ownerWindow/index.js +0 -1
- package/legacy/ownerWindow/ownerWindow.js +0 -5
- package/legacy/ponyfillGlobal/index.js +0 -1
- package/legacy/ponyfillGlobal/ponyfillGlobal.js +0 -3
- package/legacy/refType/index.js +0 -1
- package/legacy/refType/refType.js +0 -3
- package/legacy/requirePropFactory/index.js +0 -1
- package/legacy/requirePropFactory/requirePropFactory.js +0 -31
- package/legacy/resolveProps/index.js +0 -1
- package/legacy/resolveProps/resolveProps.js +0 -34
- package/legacy/scrollLeft/index.js +0 -1
- package/legacy/scrollLeft/scrollLeft.js +0 -70
- package/legacy/setRef/index.js +0 -1
- package/legacy/setRef/setRef.js +0 -20
- package/legacy/unsupportedProp/index.js +0 -1
- package/legacy/unsupportedProp/unsupportedProp.js +0 -10
- package/legacy/useControlled/index.js +0 -1
- package/legacy/useControlled/useControlled.js +0 -38
- package/legacy/useEnhancedEffect/index.js +0 -1
- package/legacy/useEnhancedEffect/useEnhancedEffect.js +0 -13
- package/legacy/useEventCallback/index.js +0 -1
- package/legacy/useEventCallback/useEventCallback.js +0 -23
- package/legacy/useForkRef/index.js +0 -1
- package/legacy/useForkRef/useForkRef.js +0 -27
- package/legacy/useId/index.js +0 -1
- package/legacy/useId/useId.js +0 -38
- package/legacy/useIsFocusVisible/index.js +0 -2
- package/legacy/useIsFocusVisible/useIsFocusVisible.js +0 -160
- package/legacy/useLazyRef/index.js +0 -1
- package/legacy/useLazyRef/useLazyRef.js +0 -19
- package/legacy/useLocalStorageState/index.js +0 -1
- package/legacy/useLocalStorageState/useLocalStorageState.js +0 -121
- package/legacy/useOnMount/index.js +0 -1
- package/legacy/useOnMount/useOnMount.js +0 -13
- package/legacy/usePreviousProps/index.js +0 -1
- package/legacy/usePreviousProps/usePreviousProps.js +0 -11
- package/legacy/useTimeout/index.js +0 -2
- package/legacy/useTimeout/useTimeout.js +0 -47
- package/legacy/visuallyHidden/index.js +0 -1
- package/legacy/visuallyHidden/visuallyHidden.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,210 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## v6.0.0-alpha.5
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v6.0.0-alpha.4..next -->
|
|
6
|
+
|
|
7
|
+
_May 1, 2024_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
### `@mui/material@6.0.0-alpha.5`
|
|
12
|
+
|
|
13
|
+
- [FormControlLabel] Deprecate `componentsProps` (#41767) @sai6855
|
|
14
|
+
- [PaginationItem] Deprecate components prop (#41777) @sai6855
|
|
15
|
+
- [SvgIcon] Convert to support CSS extraction (#41779) @aarongarciah
|
|
16
|
+
|
|
17
|
+
### `@mui/base@5.0.0-beta.43`
|
|
18
|
+
|
|
19
|
+
- [TextareaAutosize] Fix resizing instability (#41638) @ZeeshanTamboli
|
|
20
|
+
|
|
21
|
+
### Docs
|
|
22
|
+
|
|
23
|
+
- Fix small SEO issues @oliviertassinari
|
|
24
|
+
- [material-ui] Fix minor spelling error in the "About the lab" page (#42073) @ryanhartwig
|
|
25
|
+
- [material-ui] Update Figma plugin name (#41967) @danilo-leal
|
|
26
|
+
- [material-ui][templates] Fix input props attributes in Landing Page template (#42013) @5-tom
|
|
27
|
+
- [system] Update typo on the sx prop page (#42035) @bricker
|
|
28
|
+
|
|
29
|
+
### Core
|
|
30
|
+
|
|
31
|
+
- [docs-infra] Clean up branding theme file and improve font-face readibility (#42023) @danilo-leal
|
|
32
|
+
- [docs-infra] Simplify docs demo (#42016) @oliviertassinari
|
|
33
|
+
- [website] Add content about the Sync plugin in the Material UI page (#40515) @danilo-leal
|
|
34
|
+
- [website] Sync career roles (#42058) @oliviertassinari
|
|
35
|
+
- [website] Add Nadja on the about page (#42021) @mnajdova
|
|
36
|
+
- [website] Fix code block design by changing the `MarkdownElement` import (#42022) @danilo-leal
|
|
37
|
+
- [wesbite] Remove duplicate MarkdownElement component (#42028) @danilo-leal
|
|
38
|
+
|
|
39
|
+
All contributors of this release in alphabetical order: @5-tom, @aarongarciah, @bricker, @danilo-leal, @mnajdova, @oliviertassinari, @ryanhartwig, @sai6855, @ZeeshanTamboli
|
|
40
|
+
|
|
41
|
+
## v6.0.0-alpha.4
|
|
42
|
+
|
|
43
|
+
<!-- generated comparing v6.0.0-alpha.3..next -->
|
|
44
|
+
|
|
45
|
+
_Apr 24, 2024_
|
|
46
|
+
|
|
47
|
+
A big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
48
|
+
|
|
49
|
+
- 🔥 Converted 3 more Material UI components to use Pigment CSS.
|
|
50
|
+
- ℹ️ Pigment CSS now lives in [its own repository](https://github.com/mui/pigment-css)! From now on, all future development will happen there.
|
|
51
|
+
|
|
52
|
+
### `@mui/material@6.0.0-alpha.4`
|
|
53
|
+
|
|
54
|
+
- [Checkbox] Convert to support CSS extraction (#41957) @lhilgert9
|
|
55
|
+
- [IconButton] Convert to support CSS extraction (#41850) @gijsbotje
|
|
56
|
+
- [Radio] Convert to support CSS extraction (#41840) @lhilgert9
|
|
57
|
+
- [Typography] Fix ownerState prop placement (#41903) @sai6855
|
|
58
|
+
- Generate typography tokens (#41703) @siriwatknp
|
|
59
|
+
- Move typography CSS variables to `font` (#42003) @siriwatknp
|
|
60
|
+
- Fix getOverlayAlpha type (#41995) @oliviertassinari
|
|
61
|
+
- Support CSS Extraction using codemod (#41935) @siriwatknp
|
|
62
|
+
|
|
63
|
+
### `@mui/icons-material@6.0.0-alpha.4`
|
|
64
|
+
|
|
65
|
+
- ​<!-- 08 -->[icons] Update the icons package (#41937) @danilo-leal
|
|
66
|
+
|
|
67
|
+
### Docs
|
|
68
|
+
|
|
69
|
+
- [material-ui] Remove react-swipeable-views from demos as it's no longer maintained (#41912) @soler1212
|
|
70
|
+
- [material-ui] Add dark theme thumbnails for templates (#41947) @zanivan
|
|
71
|
+
- [material-ui] Remove links and interdependencies from free templates (#41941) @zanivan
|
|
72
|
+
- [material-ui] Add missing backticks to HTML tag in the installation page (#41972) @Miguelrom
|
|
73
|
+
- Fix 301 Toolpad links @oliviertassinari
|
|
74
|
+
- Fix 301 image redirections @oliviertassinari
|
|
75
|
+
|
|
76
|
+
### Core
|
|
77
|
+
|
|
78
|
+
- pnpm docs:zipRules && vale sync @oliviertassinari
|
|
79
|
+
- Remove @pigment-css/\* packages (#41965) @mnajdova
|
|
80
|
+
- [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
|
|
81
|
+
- [code-infra] Move the HighlightedCode component to @mui/docs (#41859) @Janpot
|
|
82
|
+
- [code-infra] Make Babel config path configurable in API docs builder (#41999) @michaldudak
|
|
83
|
+
- [docs-infra] Fix flex-shrink pro-plan (#41990) @oliviertassinari
|
|
84
|
+
- [docs-infra] Allow more value uses of MUI (#41706) @oliviertassinari
|
|
85
|
+
- [docs-infra] Move CPU to shared config (#41901) @oliviertassinari
|
|
86
|
+
- [docs-infra] Improve Twitter OG:image (#41860) @oliviertassinari
|
|
87
|
+
- [docs-infra] Adapt docs infra to Base UI docs needs (#41963) @michaldudak
|
|
88
|
+
- [docs-infra] Add demo container design refinements (#41948) @danilo-leal
|
|
89
|
+
- [docs-infra] Use the `getLayout` on the material demo pages (#41936) @alexfauquette
|
|
90
|
+
- [test] Update browser versions in karma config (#42008) @ZeeshanTamboli
|
|
91
|
+
- [website] Remove customer support agent role from website (#41969) @rluzists1
|
|
92
|
+
- [website] Fix grid usage and add stray improvements (#41930) @danilo-leal
|
|
93
|
+
|
|
94
|
+
All contributors of this release in alphabetical order: @alexfauquette, @danilo-leal, @gijsbotje, @Janpot, @lhilgert9, @michaldudak, @Miguelrom, @mnajdova, @oliviertassinari, @rluzists1, @sai6855, @siriwatknp, @soler1212, @zanivan, @ZeeshanTamboli
|
|
95
|
+
|
|
96
|
+
## v6.0.0-alpha.3
|
|
97
|
+
|
|
98
|
+
<!-- generated comparing v6.0.0-alpha.2..next -->
|
|
99
|
+
|
|
100
|
+
_Apr 17, 2024_
|
|
101
|
+
|
|
102
|
+
A big thanks to the 24 contributors who made this release possible. Here are some highlights ✨:
|
|
103
|
+
|
|
104
|
+
- 🔥 Converted 5 more Material UI components to use Pigment CSS.
|
|
105
|
+
- 🚀 Added container queries utility to the `@mui/system` package (#41674) @siriwatknp.
|
|
106
|
+
|
|
107
|
+
### `@mui/material@6.0.0-alpha.3`
|
|
108
|
+
|
|
109
|
+
- Convert `LinearProgress` to support Pigment CSS (#41816) @siriwatknp
|
|
110
|
+
- [Dialog] Prevent onClick on the root element from being overwritten (#41881) @ryanburr
|
|
111
|
+
- [FloatingActionButton] Convert to support CSS extraction (#41851) @gijsbotje
|
|
112
|
+
- Convert `CircularProgress` to support Pigment CSS (#41776) @siriwatknp
|
|
113
|
+
- [PaginationItem] Convert to support CSS extraction (#41848) @gijsbotje
|
|
114
|
+
- [StepConnector] deprecate composed classes (#41740) @sai6855
|
|
115
|
+
- [StepLabel] Deprecate `StepIconComponent`, `StepIconProps` (#41835) @sai6855
|
|
116
|
+
- [ToggleButton] Convert to support CSS extraction (#41782) @lhilgert9
|
|
117
|
+
- [ToggleButtonGroup] Deprecate composed classes (#41288) @sai6855
|
|
118
|
+
- [Typography] Fix Typography inherit variant styles (#41308) @kealjones-wk
|
|
119
|
+
|
|
120
|
+
### `@mui/system@6.0.0-alpha.3`
|
|
121
|
+
|
|
122
|
+
- Add container queries utility (#41674) @siriwatknp
|
|
123
|
+
|
|
124
|
+
### `@mui/codemod@6.0.0-alpha.3`
|
|
125
|
+
|
|
126
|
+
- Add styled v6 transformation (#41743) @siriwatknp
|
|
127
|
+
|
|
128
|
+
### `@mui/joy@5.0.0-beta.36`
|
|
129
|
+
|
|
130
|
+
- [Button] Disable text highlighting (#41902) @mithun522
|
|
131
|
+
|
|
132
|
+
### `@pigment-css/react@0.0.7`
|
|
133
|
+
|
|
134
|
+
- Patch WyW's WeakRef usage (#41909) @DiegoAndai
|
|
135
|
+
- Implement sx transform for system components (#41861) @brijeshb42
|
|
136
|
+
|
|
137
|
+
### Docs
|
|
138
|
+
|
|
139
|
+
- [material-ui] Add Connect-related content (#40848) @danilo-leal
|
|
140
|
+
- [material-ui] Fix credit comment typo (#41872) @aarongarciah
|
|
141
|
+
- [material-ui] Remove Data Grid v7 beta callout (#41839) @cherniavskii
|
|
142
|
+
- [material-ui] Add stray design tweaks to free templates (#41696) @zanivan
|
|
143
|
+
- [material-ui] Simplify components styling on templates (#41845) @zanivan
|
|
144
|
+
- [material-ui][Button] Add `onChange` event handler to file upload example (#41863) @aarongarciah
|
|
145
|
+
- [material-ui] Fix import statement in migration guide (#41852) @sai6855
|
|
146
|
+
- Fix 301 redirection @oliviertassinari
|
|
147
|
+
- Fix format git diff regression (#41882) @oliviertassinari
|
|
148
|
+
- Fix small SEO issues @oliviertassinari
|
|
149
|
+
- [pigment-css] Fix README typos (#41870) @MohammadShehadeh
|
|
150
|
+
|
|
151
|
+
### Core
|
|
152
|
+
|
|
153
|
+
- Begin removing IE 11-related code (#41709) @iammminzzy
|
|
154
|
+
- [blog] Add post to introduce the Connect plugin (#41763) @danilo-leal
|
|
155
|
+
- [code-infra] Fix require.context with aliases (#41682) @Janpot
|
|
156
|
+
- [code-infra] Allow customizing hooks imports in API docs generator (#41828) @michaldudak
|
|
157
|
+
- [codemod] Add utils for `*Component` and `*Props` props deprecations (#41685) @DiegoAndai
|
|
158
|
+
- Replace bundle size reporter filter (#38979) @Janpot
|
|
159
|
+
- [docs-infra] Make the whole header clickable (#39603) @MoazMirza-13
|
|
160
|
+
- [docs-infra] Improve demo container and related components design (#41827) @danilo-leal
|
|
161
|
+
- [docs-infra] Use edge function for card generation (#41188) (#41836) @alexfauquette
|
|
162
|
+
- [docs-infra] Fix code block layout shift (#41917) @oliviertassinari
|
|
163
|
+
- [docs-infra] Fine-tune the OG card image design (#41862) @danilo-leal
|
|
164
|
+
- [docs-infra] Fix markdown version for material (#41908) @alexfauquette
|
|
165
|
+
- [docs-infra] Support multiple tabs in demos (#40901) @bharatkashyap
|
|
166
|
+
|
|
167
|
+
All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @bharatkashyap, @brijeshb42, @cherniavskii, @danilo-leal, @DiegoAndai, @EyaOuenniche, @gijsbotje, @iammminzzy, @Janpot, @kealjones-wk, @lhilgert9, @magnimarels, @michaldudak, @mithun522, @mnajdova, @MoazMirza-13, @MohammadShehadeh, @oliviertassinari, @ryanburr, @sai6855, @siriwatknp, @zanivan
|
|
168
|
+
|
|
169
|
+
## v6.0.0-alpha.2
|
|
170
|
+
|
|
171
|
+
<!-- generated comparing v6.0.0-alpha.1..next -->
|
|
172
|
+
|
|
173
|
+
_Apr 9, 2024_
|
|
174
|
+
|
|
175
|
+
A big thanks to the 5 contributors who made this release possible.
|
|
176
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
177
|
+
|
|
178
|
+
### `@mui/material@6.0.0-alpha.2`
|
|
179
|
+
|
|
180
|
+
- ​<!-- 03 -->[typescript][Select] Fix `muiName` property TypeScript error (#41726) @EyaOuenniche
|
|
181
|
+
- ​<!-- 04 -->[l10n] Fix typo in is-IS locale (#41810) @magnimarels
|
|
182
|
+
|
|
183
|
+
### `@pigment-css/react@0.0.6`
|
|
184
|
+
|
|
185
|
+
- ​<!-- 12 -->[core] Remove `muiName` during eval phase (#41811) @brijeshb42
|
|
186
|
+
|
|
187
|
+
### `@pigment-css/nextjs-plugin@0.0.6`
|
|
188
|
+
|
|
189
|
+
- ​<!-- 02 -->[nextjs] Handle file references passed through imports (#41817) @brijeshb42
|
|
190
|
+
- ​<!-- 01 -->[nextjs] Allow usage of url() CSS function (#41758) @brijeshb42
|
|
191
|
+
|
|
192
|
+
### Docs
|
|
193
|
+
|
|
194
|
+
- ​<!-- 11 -->[docs] Fix 301 links @oliviertassinari
|
|
195
|
+
- ​<!-- 06 -->[pigment-css][docs] Fix README typo (#41808) @aarongarciah
|
|
196
|
+
- ​<!-- 05 -->[pigment-css][docs] Fix output on dynamic styles example (#41805) @aarongarciah
|
|
197
|
+
- ​<!-- 07 -->[material-ui][docs] Fix Material 3 message typo (#41821) @aarongarciah
|
|
198
|
+
- ​<!-- 08 -->[material-ui][docs] Add stray design tweaks to free templates (#41696) @zanivan
|
|
199
|
+
|
|
200
|
+
### Core
|
|
201
|
+
|
|
202
|
+
- ​<!-- 13 -->[core] Remove unused files (#41818) @mnajdova
|
|
203
|
+
- ​<!-- 10 -->[docs-infra] Fix analytics about inline ads (#41474) (#41819) @alexfauquette
|
|
204
|
+
- ​<!-- 08 -->[docs-infra] Fix drawer performances (#41807) @alexfauquette
|
|
205
|
+
|
|
206
|
+
All contributors of this release in alphabetical order: @aarongarciah, @alexfauquette, @brijeshb42, @EyaOuenniche, @oliviertassinari
|
|
207
|
+
|
|
3
208
|
## v6.0.0-alpha.1
|
|
4
209
|
|
|
5
210
|
<!-- generated comparing v6.0.0-alpha.0..next -->
|
|
@@ -8128,7 +8333,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
8128
8333
|
|
|
8129
8334
|
<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>
|
|
8130
8335
|
|
|
8131
|
-
You can follow our progress with unstyled components at https://github.com/mui/
|
|
8336
|
+
You can follow our progress with unstyled components at https://github.com/mui/base-ui/issues/10.
|
|
8132
8337
|
|
|
8133
8338
|
- 🎉 We have added an example of how to use MUI with [Remix](https://remix.run/) (#29952) @mnajdova
|
|
8134
8339
|
|
|
@@ -9598,7 +9803,7 @@ A big thanks to the 17 contributors who made this release possible. Here are som
|
|
|
9598
9803
|
|
|
9599
9804
|
<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>
|
|
9600
9805
|
|
|
9601
|
-
You can follow our progress at https://github.com/mui/
|
|
9806
|
+
You can follow our progress at https://github.com/mui/base-ui/issues/10.
|
|
9602
9807
|
|
|
9603
9808
|
- 💄 We have updated the default `info` `success` `warning` color to be more accessible (#26817) @siriwatknp.
|
|
9604
9809
|
You can find the new [default values](https://mui.com/material-ui/customization/palette/#default-values) in the documentation.
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { ForwardRef, Memo } from 'react-is';
|
|
2
|
-
|
|
3
|
-
// Simplified polyfill for IE11 support
|
|
4
|
-
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
|
5
|
-
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
6
|
-
export function getFunctionName(fn) {
|
|
7
|
-
const match = `${fn}`.match(fnNameMatchRegex);
|
|
8
|
-
const name = match && match[1];
|
|
9
|
-
return name || '';
|
|
10
|
-
}
|
|
11
2
|
function getFunctionComponentName(Component, fallback = '') {
|
|
12
|
-
return Component.displayName || Component.name ||
|
|
3
|
+
return Component.displayName || Component.name || fallback;
|
|
13
4
|
}
|
|
14
5
|
function getWrappedName(outerType, innerType, wrapperName) {
|
|
15
6
|
const functionName = getFunctionComponentName(innerType);
|
package/getDisplayName/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default } from './getDisplayName';
|
|
2
|
-
export * from './getDisplayName';
|
|
1
|
+
export { default } from './getDisplayName';
|
package/index.js
CHANGED
|
@@ -21,16 +21,9 @@ export function getTypeByValue(value) {
|
|
|
21
21
|
return valueType;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
// IE 11 support
|
|
26
|
-
function ponyfillIsInteger(x) {
|
|
27
|
-
// eslint-disable-next-line no-restricted-globals
|
|
28
|
-
return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;
|
|
29
|
-
}
|
|
30
|
-
const isInteger = Number.isInteger || ponyfillIsInteger;
|
|
31
24
|
function requiredInteger(props, propName, componentName, location) {
|
|
32
25
|
const propValue = props[propName];
|
|
33
|
-
if (propValue == null || !isInteger(propValue)) {
|
|
26
|
+
if (propValue == null || !Number.isInteger(propValue)) {
|
|
34
27
|
const propType = getTypeByValue(propValue);
|
|
35
28
|
return new RangeError(`Invalid ${location} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
|
|
36
29
|
}
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { ForwardRef, Memo } from 'react-is';
|
|
2
|
-
|
|
3
|
-
// Simplified polyfill for IE11 support
|
|
4
|
-
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
|
5
|
-
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
6
|
-
export function getFunctionName(fn) {
|
|
7
|
-
const match = `${fn}`.match(fnNameMatchRegex);
|
|
8
|
-
const name = match && match[1];
|
|
9
|
-
return name || '';
|
|
10
|
-
}
|
|
11
2
|
function getFunctionComponentName(Component, fallback = '') {
|
|
12
|
-
return Component.displayName || Component.name ||
|
|
3
|
+
return Component.displayName || Component.name || fallback;
|
|
13
4
|
}
|
|
14
5
|
function getWrappedName(outerType, innerType, wrapperName) {
|
|
15
6
|
const functionName = getFunctionComponentName(innerType);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default } from './getDisplayName';
|
|
2
|
-
export * from './getDisplayName';
|
|
1
|
+
export { default } from './getDisplayName';
|
package/modern/index.js
CHANGED
|
@@ -21,16 +21,9 @@ export function getTypeByValue(value) {
|
|
|
21
21
|
return valueType;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
// IE 11 support
|
|
26
|
-
function ponyfillIsInteger(x) {
|
|
27
|
-
// eslint-disable-next-line no-restricted-globals
|
|
28
|
-
return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;
|
|
29
|
-
}
|
|
30
|
-
const isInteger = Number.isInteger || ponyfillIsInteger;
|
|
31
24
|
function requiredInteger(props, propName, componentName, location) {
|
|
32
25
|
const propValue = props[propName];
|
|
33
|
-
if (propValue == null || !isInteger(propValue)) {
|
|
26
|
+
if (propValue == null || !Number.isInteger(propValue)) {
|
|
34
27
|
const propType = getTypeByValue(propValue);
|
|
35
28
|
return new RangeError(`Invalid ${location} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
|
|
36
29
|
}
|
|
@@ -4,18 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = getDisplayName;
|
|
7
|
-
exports.getFunctionName = getFunctionName;
|
|
8
7
|
var _reactIs = require("react-is");
|
|
9
|
-
// Simplified polyfill for IE11 support
|
|
10
|
-
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
|
11
|
-
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
12
|
-
function getFunctionName(fn) {
|
|
13
|
-
const match = `${fn}`.match(fnNameMatchRegex);
|
|
14
|
-
const name = match && match[1];
|
|
15
|
-
return name || '';
|
|
16
|
-
}
|
|
17
8
|
function getFunctionComponentName(Component, fallback = '') {
|
|
18
|
-
return Component.displayName || Component.name ||
|
|
9
|
+
return Component.displayName || Component.name || fallback;
|
|
19
10
|
}
|
|
20
11
|
function getWrappedName(outerType, innerType, wrapperName) {
|
|
21
12
|
const functionName = getFunctionComponentName(innerType);
|
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
var _exportNames = {};
|
|
7
7
|
Object.defineProperty(exports, "default", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function () {
|
|
10
10
|
return _getDisplayName.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
var _getDisplayName =
|
|
14
|
-
Object.keys(_getDisplayName).forEach(function (key) {
|
|
15
|
-
if (key === "default" || key === "__esModule") return;
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] === _getDisplayName[key]) return;
|
|
18
|
-
Object.defineProperty(exports, key, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _getDisplayName[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
26
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
var _getDisplayName = _interopRequireDefault(require("./getDisplayName"));
|
package/node/index.js
CHANGED
|
@@ -28,16 +28,9 @@ function getTypeByValue(value) {
|
|
|
28
28
|
return valueType;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
// IE 11 support
|
|
33
|
-
function ponyfillIsInteger(x) {
|
|
34
|
-
// eslint-disable-next-line no-restricted-globals
|
|
35
|
-
return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;
|
|
36
|
-
}
|
|
37
|
-
const isInteger = Number.isInteger || ponyfillIsInteger;
|
|
38
31
|
function requiredInteger(props, propName, componentName, location) {
|
|
39
32
|
const propValue = props[propName];
|
|
40
|
-
if (propValue == null || !isInteger(propValue)) {
|
|
33
|
+
if (propValue == null || !Number.isInteger(propValue)) {
|
|
41
34
|
const propType = getTypeByValue(propValue);
|
|
42
35
|
return new RangeError(`Invalid ${location} \`${propName}\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`integer\`.`);
|
|
43
36
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var defaultGenerator = function defaultGenerator(componentName) {
|
|
2
|
-
return componentName;
|
|
3
|
-
};
|
|
4
|
-
var createClassNameGenerator = function createClassNameGenerator() {
|
|
5
|
-
var _generate = defaultGenerator;
|
|
6
|
-
return {
|
|
7
|
-
configure: function configure(generator) {
|
|
8
|
-
_generate = generator;
|
|
9
|
-
},
|
|
10
|
-
generate: function generate(componentName) {
|
|
11
|
-
return _generate(componentName);
|
|
12
|
-
},
|
|
13
|
-
reset: function reset() {
|
|
14
|
-
_generate = defaultGenerator;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
var ClassNameGenerator = createClassNameGenerator();
|
|
19
|
-
export default ClassNameGenerator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ClassNameGenerator';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
2
|
-
if (process.env.NODE_ENV === 'production') {
|
|
3
|
-
return null;
|
|
4
|
-
}
|
|
5
|
-
var propValue = props[propName];
|
|
6
|
-
var safePropName = propFullName || propName;
|
|
7
|
-
if (propValue == null) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
if (propValue && propValue.nodeType !== 1) {
|
|
11
|
-
return new Error("Invalid ".concat(location, " `").concat(safePropName, "` supplied to `").concat(componentName, "`. ") + "Expected an HTMLElement.");
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './HTMLElementType';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import _formatMuiErrorMessage from "@mui/utils/formatMuiErrorMessage";
|
|
2
|
-
// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.
|
|
3
|
-
//
|
|
4
|
-
// A strict capitalization should uppercase the first letter of each word in the sentence.
|
|
5
|
-
// We only handle the first word.
|
|
6
|
-
export default function capitalize(string) {
|
|
7
|
-
if (typeof string !== 'string') {
|
|
8
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : _formatMuiErrorMessage(7));
|
|
9
|
-
}
|
|
10
|
-
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './capitalize';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function chainPropTypes(propType1, propType2) {
|
|
2
|
-
if (process.env.NODE_ENV === 'production') {
|
|
3
|
-
return function () {
|
|
4
|
-
return null;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
return function validate() {
|
|
8
|
-
return propType1.apply(void 0, arguments) || propType2.apply(void 0, arguments);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './chainPropTypes';
|
package/legacy/clamp/clamp.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
function clamp(val) {
|
|
2
|
-
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MIN_SAFE_INTEGER;
|
|
3
|
-
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Number.MAX_SAFE_INTEGER;
|
|
4
|
-
return Math.max(min, Math.min(val, max));
|
|
5
|
-
}
|
|
6
|
-
export default clamp;
|
package/legacy/clamp/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './clamp';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export default function composeClasses(slots, getUtilityClass) {
|
|
2
|
-
var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
3
|
-
var output = {};
|
|
4
|
-
Object.keys(slots).forEach(
|
|
5
|
-
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
6
|
-
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
7
|
-
function (slot) {
|
|
8
|
-
output[slot] = slots[slot].reduce(function (acc, key) {
|
|
9
|
-
if (key) {
|
|
10
|
-
var utilityClass = getUtilityClass(key);
|
|
11
|
-
if (utilityClass !== '') {
|
|
12
|
-
acc.push(utilityClass);
|
|
13
|
-
}
|
|
14
|
-
if (classes && classes[key]) {
|
|
15
|
-
acc.push(classes[key]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return acc;
|
|
19
|
-
}, []).join(' ');
|
|
20
|
-
});
|
|
21
|
-
return output;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './composeClasses';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Safe chained function.
|
|
3
|
-
*
|
|
4
|
-
* Will only create a new function if needed,
|
|
5
|
-
* otherwise will pass back existing functions or null.
|
|
6
|
-
*/
|
|
7
|
-
export default function createChainedFunction() {
|
|
8
|
-
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9
|
-
funcs[_key] = arguments[_key];
|
|
10
|
-
}
|
|
11
|
-
return funcs.reduce(function (acc, func) {
|
|
12
|
-
if (func == null) {
|
|
13
|
-
return acc;
|
|
14
|
-
}
|
|
15
|
-
return function chainedFunction() {
|
|
16
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
17
|
-
args[_key2] = arguments[_key2];
|
|
18
|
-
}
|
|
19
|
-
acc.apply(this, args);
|
|
20
|
-
func.apply(this, args);
|
|
21
|
-
};
|
|
22
|
-
}, function () {});
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './createChainedFunction';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Corresponds to 10 frames at 60 Hz.
|
|
2
|
-
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
|
3
|
-
export default function debounce(func) {
|
|
4
|
-
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;
|
|
5
|
-
var timeout;
|
|
6
|
-
function debounced() {
|
|
7
|
-
var _this = this;
|
|
8
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9
|
-
args[_key] = arguments[_key];
|
|
10
|
-
}
|
|
11
|
-
var later = function later() {
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
func.apply(_this, args);
|
|
14
|
-
};
|
|
15
|
-
clearTimeout(timeout);
|
|
16
|
-
timeout = setTimeout(later, wait);
|
|
17
|
-
}
|
|
18
|
-
debounced.clear = function () {
|
|
19
|
-
clearTimeout(timeout);
|
|
20
|
-
};
|
|
21
|
-
return debounced;
|
|
22
|
-
}
|
package/legacy/debounce/index.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
|
-
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
|
|
4
|
-
export function isPlainObject(item) {
|
|
5
|
-
if (_typeof(item) !== 'object' || item === null) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
var prototype = Object.getPrototypeOf(item);
|
|
9
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
|
|
10
|
-
}
|
|
11
|
-
function deepClone(source) {
|
|
12
|
-
if (!isPlainObject(source)) {
|
|
13
|
-
return source;
|
|
14
|
-
}
|
|
15
|
-
var output = {};
|
|
16
|
-
Object.keys(source).forEach(function (key) {
|
|
17
|
-
output[key] = deepClone(source[key]);
|
|
18
|
-
});
|
|
19
|
-
return output;
|
|
20
|
-
}
|
|
21
|
-
export default function deepmerge(target, source) {
|
|
22
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
23
|
-
clone: true
|
|
24
|
-
};
|
|
25
|
-
var output = options.clone ? _extends({}, target) : target;
|
|
26
|
-
if (isPlainObject(target) && isPlainObject(source)) {
|
|
27
|
-
Object.keys(source).forEach(function (key) {
|
|
28
|
-
// Avoid prototype pollution
|
|
29
|
-
if (key === '__proto__') {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (isPlainObject(source[key]) && key in target && isPlainObject(target[key])) {
|
|
33
|
-
// Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.
|
|
34
|
-
output[key] = deepmerge(target[key], source[key], options);
|
|
35
|
-
} else if (options.clone) {
|
|
36
|
-
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
37
|
-
} else {
|
|
38
|
-
output[key] = source[key];
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return output;
|
|
43
|
-
}
|