@mui/system 5.7.0 → 5.8.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/Box/Box.spec.d.ts +1 -1
- package/CHANGELOG.md +201 -4
- package/Container/Container.d.ts +13 -0
- package/Container/Container.js +81 -0
- package/Container/ContainerProps.d.ts +40 -0
- package/Container/ContainerProps.js +5 -0
- package/Container/containerClasses.d.ts +22 -0
- package/Container/containerClasses.js +17 -0
- package/Container/createContainer.d.ts +18 -0
- package/Container/createContainer.js +172 -0
- package/Container/index.d.ts +5 -0
- package/Container/index.js +42 -0
- package/Container/package.json +6 -0
- package/createBox.spec.d.ts +1 -1
- package/createTheme/createBreakpoints.d.ts +5 -0
- package/createTheme/createSpacing.d.ts +10 -10
- package/cssVars/createCssVarsProvider.js +9 -5
- package/cssVars/createCssVarsProvider.spec.d.ts +1 -1
- package/cssVars/createGetCssVar.d.ts +5 -5
- package/cssVars/cssVarsParser.d.ts +70 -70
- package/cssVars/getInitColorSchemeScript.d.ts +40 -40
- package/cssVars/index.d.ts +2 -2
- package/cssVars/useCurrentColorScheme.d.ts +53 -53
- package/esm/Container/Container.js +70 -0
- package/esm/Container/ContainerProps.js +1 -0
- package/esm/Container/containerClasses.js +6 -0
- package/esm/Container/createContainer.js +151 -0
- package/esm/Container/index.js +3 -0
- package/esm/cssVars/createCssVarsProvider.js +9 -5
- package/esm/index.js +4 -1
- package/esm/spacing.js +1 -1
- package/esm/style.js +2 -2
- package/index.d.ts +6 -0
- package/index.js +32 -2
- package/index.spec.d.ts +1 -1
- package/legacy/Container/Container.js +70 -0
- package/legacy/Container/ContainerProps.js +1 -0
- package/legacy/Container/containerClasses.js +6 -0
- package/legacy/Container/createContainer.js +148 -0
- package/legacy/Container/index.js +3 -0
- package/legacy/cssVars/createCssVarsProvider.js +11 -5
- package/legacy/index.js +5 -2
- package/legacy/spacing.js +1 -1
- package/legacy/style.js +3 -1
- package/modern/Container/Container.js +70 -0
- package/modern/Container/ContainerProps.js +1 -0
- package/modern/Container/containerClasses.js +6 -0
- package/modern/Container/createContainer.js +151 -0
- package/modern/Container/index.js +3 -0
- package/modern/cssVars/createCssVarsProvider.js +9 -5
- package/modern/index.js +5 -2
- package/modern/spacing.js +1 -1
- package/modern/style.js +2 -2
- package/package.json +5 -5
- package/spacing.js +1 -1
- package/style.js +2 -2
- package/styleFunctionSx/styleFunctionSx.spec.d.ts +1 -1
package/Box/Box.spec.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,202 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.8.2
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.8.1..master -->
|
|
6
|
+
|
|
7
|
+
_May 30, 2022_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🐛 bug fixes and 📚 documentation improvements.
|
|
12
|
+
|
|
13
|
+
### `@mui/system@5.8.2`
|
|
14
|
+
|
|
15
|
+
- ​<!-- 04 -->[system] Add `getColorSchemeSelector` util (#32868) @siriwatknp
|
|
16
|
+
|
|
17
|
+
### `@mui/lab@5.0.0-alpha.84`
|
|
18
|
+
|
|
19
|
+
- ​<!-- 07 -->[Masonry] Place items to the left when there are less objects than specified in `column` prop (#32873) @hbjORbj
|
|
20
|
+
|
|
21
|
+
### `@mui/base@5.0.0-alpha.83`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 24 -->[BadgeUnstyled] Define ownerState and slot props' types (#32750) @michaldudak
|
|
24
|
+
- ​<!-- 06 -->[SliderUnstyled] Define ownerState and slot props' types (#32739) @michaldudak
|
|
25
|
+
- ​<!-- 05 -->[SwitchUnstyled] Define ownerState and slot props' types (#32573) @michaldudak
|
|
26
|
+
- ​<!-- 03 -->[TabsUnstyled] Define ownerState and slot props' types (#32918) @michaldudak
|
|
27
|
+
- ​<!-- 02 -->[TabUnstyled] Define ownerState and slot props' types (#32915) @michaldudak
|
|
28
|
+
|
|
29
|
+
### `@mui/joy@5.0.0-alpha.30`
|
|
30
|
+
|
|
31
|
+
- ​<!-- 13 -->[Joy] use `textColor` prop for Typography and Link (#32938) @siriwatknp
|
|
32
|
+
- ​<!-- 12 -->[Joy] Make variants for more flexible (#32931) @siriwatknp
|
|
33
|
+
- ​<!-- 11 -->[Joy] Improve automatic adjustment (#32923) @siriwatknp
|
|
34
|
+
- ​<!-- 10 -->[Joy] Add `Chip` doc (#32819) @hbjORbj
|
|
35
|
+
- ​<!-- 09 -->[Joy] Add `AspectRatio` demos (#32848) @siriwatknp
|
|
36
|
+
- ​<!-- 08 -->[Joy] Fix wrong urls (#32883) @siriwatknp
|
|
37
|
+
|
|
38
|
+
### Docs
|
|
39
|
+
|
|
40
|
+
- ​<!-- 24 -->[docs] Iterate on the job ad for React engineer in Core (#32900) @mnajdova
|
|
41
|
+
- ​<!-- 23 -->[blog] Fix avatar image resolution (#32890) @oliviertassinari
|
|
42
|
+
- ​<!-- 19 -->[docs] Link the first page of the product (#32943) @oliviertassinari
|
|
43
|
+
- ​<!-- 18 -->[docs] Batch small changes (#32170) @michaldudak
|
|
44
|
+
- ​<!-- 17 -->[docs] Allow function prop to return undefined (#32766) @m4theushw
|
|
45
|
+
- ​<!-- 16 -->[docs] Fix wrong link to Material Icons (#32847) @oliviertassinari
|
|
46
|
+
- ​<!-- 15 -->[docs] Fix ClassNameGenerator content (#32800) @siriwatknp
|
|
47
|
+
- ​<!-- 14 -->[docs] Fix navigation links (#32851) @oliviertassinari
|
|
48
|
+
- ​<!-- 14 -->[docs] Document the `size` prop for InputLabel (#32936) @romelperez
|
|
49
|
+
- ​<!-- 21 -->[docs] Add note about transparent background on the outlined Alert variant (#32810) @aaarichter
|
|
50
|
+
- ​<!-- 01 -->[website] Update the careers's page with the new roles (#32535) @oliviertassinari
|
|
51
|
+
|
|
52
|
+
### Core
|
|
53
|
+
|
|
54
|
+
- ​<!-- 22 -->[core] Improve the incomplete issues workflow (#32878) @mnajdova
|
|
55
|
+
- ​<!-- 21 -->[core] Add CI check that the PR has label (#32886) @mnajdova
|
|
56
|
+
- ​<!-- 20 -->[core] Avoid leaking @babel/runtime (#32874) @oliviertassinari
|
|
57
|
+
|
|
58
|
+
All contributors of this release in alphabetical order: @aaarichter, @hbjORbj, @m4theushw, @michaldudak, @mnajdova, @oliviertassinari, @romelperez, @siriwatknp
|
|
59
|
+
|
|
60
|
+
## 5.8.1
|
|
61
|
+
|
|
62
|
+
<!-- generated comparing v5.8.0..master -->
|
|
63
|
+
|
|
64
|
+
_May 23, 2022_
|
|
65
|
+
|
|
66
|
+
A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
67
|
+
|
|
68
|
+
- 💅 Added CSS variables support for two more Material UI components by @diggis00 and @alisasanib
|
|
69
|
+
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
70
|
+
|
|
71
|
+
### `@mui/material@5.8.1`
|
|
72
|
+
|
|
73
|
+
- ​<!-- 33 -->[Alert] Fix missing `ownerState` on the `action` slot (#32801) @mnajdova
|
|
74
|
+
- ​<!-- 20 -->[Fab] Make the `color` prop type extendable (#31830) @paales
|
|
75
|
+
- ​<!-- 14 -->[ListItemButton] Render as link if href specified (#32403) @o-dubrovskyi
|
|
76
|
+
- ​<!-- 13 -->[Paper] Add support for CSS variables (#32570) @diggis00
|
|
77
|
+
- ​<!-- 11 -->[Radio] Add support for CSS variables (#32599) @alisasanib
|
|
78
|
+
- ​<!-- 10 -->[Slider] Prevent rendering for marks that are out of the min & max bounds (#32436) @abriginets
|
|
79
|
+
- ​<!-- 09 -->[Slider] Slider having marks should be customizable in theme (#32816) @ZeeshanTamboli
|
|
80
|
+
- ​<!-- 03 -->[TouchRipple] Allows call imperative methods without event (#31955) @alexfauquette
|
|
81
|
+
|
|
82
|
+
### `@mui/system@5.8.1`
|
|
83
|
+
|
|
84
|
+
- ​<!-- 07 -->[system] Simplify stylesheet injection logic (#32869) @siriwatknp
|
|
85
|
+
- ​<!-- 06 -->[system] Fix color scheme specificity (#32628) @siriwatknp
|
|
86
|
+
- ​<!-- 05 -->[system] Fix `borderRadius` errors when used inside `CssVarsProvider` (#32817) @mnajdova
|
|
87
|
+
- ​<!-- 04 -->[system] Fix toolbar media query mixin getting merged in wrong order (#32713) @ZeeshanTamboli
|
|
88
|
+
|
|
89
|
+
### `@mui/lab@5.0.0-alpha.83`
|
|
90
|
+
|
|
91
|
+
- ​<!-- 15 -->[lab] Add missing `peerDependencies` (#32623) @nate-summercook
|
|
92
|
+
- ​<!-- 12 -->[pickers] Update @mui/x-date-pickers to be usable with React 18 (#32828) @flaviendelangle
|
|
93
|
+
|
|
94
|
+
### `@mui/base@5.0.0-alpha.82`
|
|
95
|
+
|
|
96
|
+
- ​<!-- 08 -->[SliderUnstyled] Fix `disabledSwap` not being respected in `onChangeCommitted` (#32647) @JeanPetrov
|
|
97
|
+
|
|
98
|
+
### `@mui/joy@5.0.0-alpha.29`
|
|
99
|
+
|
|
100
|
+
- ​<!-- 19 -->[Joy] Show Joy pages on master (#32866) @siriwatknp
|
|
101
|
+
- ​<!-- 18 -->[Joy] Add an overview page (#32836) @danilo-leal
|
|
102
|
+
- ​<!-- 17 -->[Joy] Add doc for the card components (#32825) @siriwatknp
|
|
103
|
+
- ​<!-- 16 -->[Joy] Miscellaneous fixes (#32815) @siriwatknp
|
|
104
|
+
|
|
105
|
+
### Docs
|
|
106
|
+
|
|
107
|
+
- ​<!-- 31 -->[docs] Simplify header DOM structure (#32844) @oliviertassinari
|
|
108
|
+
- ​<!-- 30 -->[docs] Fix CodeSandbox & StackBlitz generation (#32726) @siriwatknp
|
|
109
|
+
- ​<!-- 29 -->[docs] Fix urls to columns pages in pricing table (#32842) @alexfauquette
|
|
110
|
+
- ​<!-- 28 -->[docs] Fix Tailwind CSS integration docs (#32512) @robertwt7
|
|
111
|
+
- ​<!-- 27 -->[docs] Fixed wrong command for the `link-underline-hover` codemod (#32793) @veronikaslc
|
|
112
|
+
- ​<!-- 26 -->[docs] Fixed broken link on the icons page (#32780) @SamuelMaddox
|
|
113
|
+
- ​<!-- 25 -->[docs] Add "back to top" button (#30441) @VibhorJaiswal
|
|
114
|
+
- ​<!-- 24 -->[docs] Fix typo in notifications @mbrookes
|
|
115
|
+
- ​<!-- 32 -->[docs] New WAI-ARIA guidelines location (#32865) @oliviertassinari
|
|
116
|
+
- ​<!-- 23 -->[docs] Mention the ESLint plugin for detecting unused classes in tss-react (#32666) @garronej
|
|
117
|
+
- ​<!-- 22 -->[docs] Update `useAutocomplete` demos to use `Mui-focused` class (#32757) @ZeeshanTamboli
|
|
118
|
+
- ​<!-- 21 -->[examples] Fix `NextLinkComposedProps` gives a TypeScript error (#32655) @ZeeshanTamboli
|
|
119
|
+
- ​<!-- 01 -->[website] Add Pedro to About Us page (#32803) @apedroferreira
|
|
120
|
+
|
|
121
|
+
### Core
|
|
122
|
+
|
|
123
|
+
- ​<!-- 32 -->[core] Upgrade MUI X dependency (#32824) @oliviertassinari
|
|
124
|
+
- ​<!-- 02 -->[typescript] Allow module augmentation for `Mixins` (#32798) @mnajdova
|
|
125
|
+
|
|
126
|
+
All contributors of this release in alphabetical order: @abriginets, @alexfauquette, @alisasanib, @apedroferreira, @danilo-leal, @diggis00, @flaviendelangle, @garronej, @JeanPetrov, @mbrookes, @mnajdova, @nate-summercook, @o-dubrovskyi, @oliviertassinari, @paales, @robertwt7, @SamuelMaddox, @siriwatknp, @veronikaslc, @VibhorJaiswal, @ZeeshanTamboli
|
|
127
|
+
|
|
128
|
+
## 5.8.0
|
|
129
|
+
|
|
130
|
+
<!-- generated comparing v5.7.0..master -->
|
|
131
|
+
|
|
132
|
+
_May 17, 2022_
|
|
133
|
+
|
|
134
|
+
A big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
135
|
+
|
|
136
|
+
- 🚀 [Blog post](https://mui.com/blog/premium-plan-release/) for announcing the release of the Premium plan of MUI X is out thanks to @joserodolfofreitas.
|
|
137
|
+
- Codemod for `jss` to `tss-react` migration is out thanks to @ryancogswell
|
|
138
|
+
- And more 🐛 bug fixes and 📚 documentation improvements.
|
|
139
|
+
|
|
140
|
+
### `@mui/material@5.8.0`
|
|
141
|
+
|
|
142
|
+
- ​<!-- 37 -->[Autocomplete] Fix `getInputProps` TypeScript return type (#32730) @ZeeshanTamboli
|
|
143
|
+
- ​<!-- 36 -->[Autocomplete] Forward props to renderTags() (#32637) @emlai
|
|
144
|
+
- ​<!-- 35 -->[Badge] Fix TypeScript error when adding style overrides for Badge (#32745) @ZeeshanTamboli
|
|
145
|
+
- ​<!-- 09 -->[Menu] Fix context menu open position (#32661) @oliviertassinari
|
|
146
|
+
|
|
147
|
+
### `@mui/system@5.8.0`
|
|
148
|
+
|
|
149
|
+
- ​<!-- 05 -->[system] Add `Container` component and `createContainer` factory (#32263) @mnajdova
|
|
150
|
+
|
|
151
|
+
### `@mui/base@5.0.0-alpha.81`
|
|
152
|
+
|
|
153
|
+
- ​<!-- 15 -->[InputUnstyled] Support callbacks in componentsProps (#32271) @michaldudak
|
|
154
|
+
- ​<!-- 14 -->[InputUnstyled] Define ownerState and slot props' types (#32491) @michaldudak
|
|
155
|
+
- ​<!-- 08 -->[MenuUnstyled] Demos improvements (#32714) @michaldudak
|
|
156
|
+
- ​<!-- 07 -->[OptionUnstyled] Define ownerState and slot props' types (#32717) @michaldudak
|
|
157
|
+
|
|
158
|
+
### `@mui/joy@5.0.0-alpha.28`
|
|
159
|
+
|
|
160
|
+
- ​<!-- 13 -->[Joy] Add Badge doc (#32790) @siriwatknp
|
|
161
|
+
- ​<!-- 12 -->[Joy] Add global variant feature page (#32695) @siriwatknp
|
|
162
|
+
- ​<!-- 11 -->[Joy] Add avatar page (#32711) @siriwatknp
|
|
163
|
+
|
|
164
|
+
### `@mui/codemod@5.8.0`
|
|
165
|
+
|
|
166
|
+
- ​<!-- 33 -->[codemod] Add jss to tss-react codemod (#31802) @ryancogswell
|
|
167
|
+
|
|
168
|
+
### Docs
|
|
169
|
+
|
|
170
|
+
- ​<!-- 34 -->[blog] Add release post for MUI X Premium (#32720) @joserodolfofreitas
|
|
171
|
+
- ​<!-- 29 -->[docs] Fix wrong code snippet for overriding styles in theme with a callback value (#32781) @ZeeshanTamboli
|
|
172
|
+
- ​<!-- 28 -->[docs] Update Crowdin logo (#32782) @andrii-bodnar
|
|
173
|
+
- ​<!-- 27 -->[docs] Improve callouts design (#32709) @danilo-leal
|
|
174
|
+
- ​<!-- 26 -->[docs] Revise the "Understanding MUI packages" article (#32382) @danilo-leal
|
|
175
|
+
- ​<!-- 25 -->[docs] Fix link to the material icons (#32771) @oliviertassinari
|
|
176
|
+
- ​<!-- 24 -->[docs] Add notification for Premium release blog post (#32728) @joserodolfofreitas
|
|
177
|
+
- ​<!-- 23 -->[docs] Base Portal style revisions and final review (#32157) @samuelsycamore
|
|
178
|
+
- ​<!-- 22 -->[docs] Add joy to docs package.json (#32744) @siriwatknp
|
|
179
|
+
- ​<!-- 21 -->[docs] Fix TOC-related styles not being applied when disableAd=true (#32733) @cherniavskii
|
|
180
|
+
- ​<!-- 20 -->[docs] Add TypeScript guide on the polymorphic components (#32168) @mnajdova
|
|
181
|
+
- ​<!-- 19 -->[docs] Fix warning mode pass to React.Fragment (#32729) @siriwatknp
|
|
182
|
+
- ​<!-- 18 -->[docs] Revise Showcase copy for clarity + audit appList (#31946) @samuelsycamore
|
|
183
|
+
- ​<!-- 17 -->[examples] Update remix example's tsconfig with required values (#32723) @michaldudak
|
|
184
|
+
- ​<!-- 16 -->[examples] Update to use React 18's createRoot (#32506) @mnajdova
|
|
185
|
+
- ​<!-- 10 -->[l10n] Fix typos and translations on arSD and arEG locales (#31848) @shadigaafar
|
|
186
|
+
- ​<!-- 04 -->[website] Improve communication about MUI X components that are still wip (#32708) @danilo-leal
|
|
187
|
+
- ​<!-- 03 -->[website] Remove scrollbar on x-axis (#32291) @MrHBS
|
|
188
|
+
- ​<!-- 02 -->[website] Update the pricing page for the MUI X premium plan release (#32458) @joserodolfofreitas
|
|
189
|
+
- ​<!-- 01 -->[website] Update sponsors (#32725) @oliviertassinari
|
|
190
|
+
|
|
191
|
+
### Core
|
|
192
|
+
|
|
193
|
+
- ​<!-- 32 -->[core] Enabled Renovate's lockfile maintenance (#32635) @michaldudak
|
|
194
|
+
- ​<!-- 31 -->[core] Extract `MuiPage` interface to separate file (#32715) @cherniavskii
|
|
195
|
+
- ​<!-- 30 -->[core] Remove unnecessary `spacing` parameter from `createMixins` method (#32690) @ZeeshanTamboli
|
|
196
|
+
- ​<!-- 06 -->[private-classnames] Remove package and move everything to utils (#32758) @mnajdova
|
|
197
|
+
|
|
198
|
+
All contributors of this release in alphabetical order: @andrii-bodnar, @cherniavskii, @danilo-leal, @emlai, @joserodolfofreitas, @michaldudak, @mnajdova, @MrHBS, @oliviertassinari, @ryancogswell, @samuelsycamore, @shadigaafar, @siriwatknp, @ZeeshanTamboli
|
|
199
|
+
|
|
3
200
|
## 5.7.0
|
|
4
201
|
|
|
5
202
|
<!-- generated comparing v5.6.4..master -->
|
|
@@ -851,7 +1048,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
851
1048
|
- [docs] Fix force redirection to a different locale (#30967) @oliviertassinari
|
|
852
1049
|
- [docs] Add live Tailwind CSS demo (#30966) @oliviertassinari
|
|
853
1050
|
- [website] Add banner for promoting priority open roles (#31076) @danilo-leal
|
|
854
|
-
- [website] Open Full-stack Engineer role for studio (#31038) @
|
|
1051
|
+
- [website] Open Full-stack Engineer role for studio (#31038) @prakhargupta1
|
|
855
1052
|
- [website] Minor security improvements (#31062) @oliviertassinari
|
|
856
1053
|
- [website] Improve title of open roles (#30963) @DanailH
|
|
857
1054
|
- [website] Add BIMI avatar (#30444) @oliviertassinari
|
|
@@ -866,7 +1063,7 @@ A big thanks to the 16 contributors who made this release possible. Here are som
|
|
|
866
1063
|
- [test] Test if certain Base members are exported from Material UI (#31067) @michaldudak
|
|
867
1064
|
- [core] Remove dead code (#31064) @oliviertassinari
|
|
868
1065
|
|
|
869
|
-
All contributors of this release in alphabetical order: @agauravdev, @alisasanib, @DanailH, @danilo-leal, @huyenltnguyen, @l10nbot, @liradb2000, @mbrookes, @michaldudak, @mnajdova, @
|
|
1066
|
+
All contributors of this release in alphabetical order: @agauravdev, @alisasanib, @DanailH, @danilo-leal, @huyenltnguyen, @l10nbot, @liradb2000, @mbrookes, @michaldudak, @mnajdova, @prakhargupta1, @oliviertassinari, @ryohey, @samuelsycamore, @siriwatknp, @sydneyjodon-wk
|
|
870
1067
|
|
|
871
1068
|
## 5.4.1
|
|
872
1069
|
|
|
@@ -1576,14 +1773,14 @@ This is an early release to fix `export 'useId' (imported as 'React') was not fo
|
|
|
1576
1773
|
- ​<!-- 9 -->[core] Fix PR run detection in test_bundle_size_monitor (#29879) @eps1lon
|
|
1577
1774
|
- ​<!-- 8 -->[core] Move bundle size monitoring to CircleCI (#29876) @eps1lon
|
|
1578
1775
|
- ​<!-- 7 -->[docs] Add keys to Responsive AppBar demo (#29884) @mbrookes
|
|
1579
|
-
- ​<!-- 6 -->[docs] MUI's 2021 Developer survey (#29765) @
|
|
1776
|
+
- ​<!-- 6 -->[docs] MUI's 2021 Developer survey (#29765) @prakhargupta1
|
|
1580
1777
|
- ​<!-- 5 -->[docs] Smoother image loading UX (#29858) @oliviertassinari
|
|
1581
1778
|
- ​<!-- 4 -->[Select] Fix select display value with React Nodes (#29836) @kegi
|
|
1582
1779
|
- ​<!-- 3 -->[system] Add `experimental_sx` utility (#29833) @mnajdova
|
|
1583
1780
|
- ​<!-- 2 -->[test] Ignore "detected multiple renderers" warning for now (#29854) @eps1lon
|
|
1584
1781
|
- ​<!-- 1 -->[useMediaQuery][utils] Remove usage of React 18 APIs (#29870) @eps1lon
|
|
1585
1782
|
|
|
1586
|
-
All contributors of this release in alphabetical order: @eps1lon, @karakib2k18, @kegi, @mbrookes, @mnajdova, @
|
|
1783
|
+
All contributors of this release in alphabetical order: @eps1lon, @karakib2k18, @kegi, @mbrookes, @mnajdova, @prakhargupta1, @oliviertassinari
|
|
1587
1784
|
|
|
1588
1785
|
## 5.2.0
|
|
1589
1786
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Demos:
|
|
4
|
+
*
|
|
5
|
+
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
|
6
|
+
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
|
7
|
+
*
|
|
8
|
+
* API:
|
|
9
|
+
*
|
|
10
|
+
* - [Container API](https://mui.com/system/api/container/)
|
|
11
|
+
*/
|
|
12
|
+
declare const Container: import("@mui/types").OverridableComponent<import("./ContainerProps").ContainerTypeMap<{}, "div">>;
|
|
13
|
+
export default Container;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _createContainer = _interopRequireDefault(require("./createContainer"));
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* Demos:
|
|
17
|
+
*
|
|
18
|
+
* - [Container (Material UI)](https://mui.com/material-ui/react-container/)
|
|
19
|
+
* - [Container (MUI System)](https://mui.com/system/react-container/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [Container API](https://mui.com/system/api/container/)
|
|
24
|
+
*/
|
|
25
|
+
const Container = (0, _createContainer.default)();
|
|
26
|
+
process.env.NODE_ENV !== "production" ? Container.propTypes
|
|
27
|
+
/* remove-proptypes */
|
|
28
|
+
= {
|
|
29
|
+
// ----------------------------- Warning --------------------------------
|
|
30
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
31
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
32
|
+
// ----------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
children: _propTypes.default.node,
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Override or extend the styles applied to the component.
|
|
41
|
+
*/
|
|
42
|
+
classes: _propTypes.default.object,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The component used for the root node.
|
|
46
|
+
* Either a string to use a HTML element or a component.
|
|
47
|
+
*/
|
|
48
|
+
component: _propTypes.default.elementType,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the left and right padding is removed.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
disableGutters: _propTypes.default.bool,
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Set the max-width to match the min-width of the current breakpoint.
|
|
58
|
+
* This is useful if you'd prefer to design for a fixed set of sizes
|
|
59
|
+
* instead of trying to accommodate a fully fluid viewport.
|
|
60
|
+
* It's fluid by default.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
fixed: _propTypes.default.bool,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Determine the max-width of the container.
|
|
67
|
+
* The container width grows with the size of the screen.
|
|
68
|
+
* Set to `false` to disable `maxWidth`.
|
|
69
|
+
* @default 'lg'
|
|
70
|
+
*/
|
|
71
|
+
maxWidth: _propTypes.default
|
|
72
|
+
/* @typescript-to-proptypes-ignore */
|
|
73
|
+
.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
77
|
+
*/
|
|
78
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
79
|
+
} : void 0;
|
|
80
|
+
var _default = Container;
|
|
81
|
+
exports.default = _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverrideProps } from '@mui/types';
|
|
3
|
+
import { SxProps } from '../styleFunctionSx';
|
|
4
|
+
import { Theme, Breakpoint } from '../createTheme';
|
|
5
|
+
import { ContainerClasses } from './containerClasses';
|
|
6
|
+
export interface ContainerTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
7
|
+
props: P & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Override or extend the styles applied to the component.
|
|
11
|
+
*/
|
|
12
|
+
classes?: Partial<ContainerClasses>;
|
|
13
|
+
/**
|
|
14
|
+
* If `true`, the left and right padding is removed.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
disableGutters?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Set the max-width to match the min-width of the current breakpoint.
|
|
20
|
+
* This is useful if you'd prefer to design for a fixed set of sizes
|
|
21
|
+
* instead of trying to accommodate a fully fluid viewport.
|
|
22
|
+
* It's fluid by default.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
fixed?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Determine the max-width of the container.
|
|
28
|
+
* The container width grows with the size of the screen.
|
|
29
|
+
* Set to `false` to disable `maxWidth`.
|
|
30
|
+
* @default 'lg'
|
|
31
|
+
*/
|
|
32
|
+
maxWidth?: Breakpoint | false;
|
|
33
|
+
/**
|
|
34
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
35
|
+
*/
|
|
36
|
+
sx?: SxProps<Theme>;
|
|
37
|
+
};
|
|
38
|
+
defaultComponent: D;
|
|
39
|
+
}
|
|
40
|
+
export declare type ContainerProps<D extends React.ElementType = ContainerTypeMap['defaultComponent'], P = {}> = OverrideProps<ContainerTypeMap<P, D>, D>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ContainerClasses {
|
|
2
|
+
/** Styles applied to the root element. */
|
|
3
|
+
root: string;
|
|
4
|
+
/** Styles applied to the root element if `disableGutters={true}`. */
|
|
5
|
+
disableGutters: string;
|
|
6
|
+
/** Styles applied to the root element if `fixed={true}`. */
|
|
7
|
+
fixed: string;
|
|
8
|
+
/** Styles applied to the root element if `maxWidth="xs"`. */
|
|
9
|
+
maxWidthXs: string;
|
|
10
|
+
/** Styles applied to the root element if `maxWidth="sm"`. */
|
|
11
|
+
maxWidthSm: string;
|
|
12
|
+
/** Styles applied to the root element if `maxWidth="md"`. */
|
|
13
|
+
maxWidthMd: string;
|
|
14
|
+
/** Styles applied to the root element if `maxWidth="lg"`. */
|
|
15
|
+
maxWidthLg: string;
|
|
16
|
+
/** Styles applied to the root element if `maxWidth="xl"`. */
|
|
17
|
+
maxWidthXl: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type ContainerClassKey = keyof ContainerClasses;
|
|
20
|
+
export declare function getContainerUtilityClass(slot: string): string;
|
|
21
|
+
declare const containerClasses: ContainerClasses;
|
|
22
|
+
export default containerClasses;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
exports.getContainerUtilityClass = getContainerUtilityClass;
|
|
8
|
+
|
|
9
|
+
var _utils = require("@mui/utils");
|
|
10
|
+
|
|
11
|
+
function getContainerUtilityClass(slot) {
|
|
12
|
+
return (0, _utils.unstable_generateUtilityClass)('MuiContainer', slot);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const containerClasses = (0, _utils.unstable_generateUtilityClasses)('MuiContainer', ['root', 'disableGutters', 'fixed', 'maxWidthXs', 'maxWidthSm', 'maxWidthMd', 'maxWidthLg', 'maxWidthXl']);
|
|
16
|
+
var _default = containerClasses;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Interpolation, StyledComponent } from '@mui/styled-engine';
|
|
3
|
+
import { OverridableComponent } from '@mui/types';
|
|
4
|
+
import { ContainerProps, ContainerTypeMap } from './ContainerProps';
|
|
5
|
+
import { Theme as DefaultTheme } from '../createTheme';
|
|
6
|
+
interface StyleFnProps<Theme> extends ContainerProps {
|
|
7
|
+
theme: Theme;
|
|
8
|
+
ownerState: ContainerProps;
|
|
9
|
+
}
|
|
10
|
+
declare type RequiredThemeStructure = Pick<DefaultTheme, 'breakpoints' | 'spacing'>;
|
|
11
|
+
export default function createContainer<Theme extends RequiredThemeStructure = DefaultTheme>(options?: {
|
|
12
|
+
createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
|
|
13
|
+
useThemeProps?: (inProps: ContainerProps) => ContainerProps & {
|
|
14
|
+
component?: React.ElementType;
|
|
15
|
+
};
|
|
16
|
+
componentName?: string;
|
|
17
|
+
}): OverridableComponent<ContainerTypeMap<{}, "div">>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = createContainer;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var React = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
19
|
+
|
|
20
|
+
var _utils = require("@mui/utils");
|
|
21
|
+
|
|
22
|
+
var _useThemeProps = _interopRequireDefault(require("../useThemeProps"));
|
|
23
|
+
|
|
24
|
+
var _styled = _interopRequireDefault(require("../styled"));
|
|
25
|
+
|
|
26
|
+
var _createTheme = _interopRequireDefault(require("../createTheme"));
|
|
27
|
+
|
|
28
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
|
+
|
|
30
|
+
const _excluded = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
36
|
+
const defaultTheme = (0, _createTheme.default)();
|
|
37
|
+
const defaultCreateStyledComponent = (0, _styled.default)('div', {
|
|
38
|
+
name: 'MuiContainer',
|
|
39
|
+
slot: 'Root',
|
|
40
|
+
overridesResolver: (props, styles) => {
|
|
41
|
+
const {
|
|
42
|
+
ownerState
|
|
43
|
+
} = props;
|
|
44
|
+
return [styles.root, styles[`maxWidth${(0, _utils.unstable_capitalize)(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const useThemePropsDefault = inProps => (0, _useThemeProps.default)({
|
|
49
|
+
props: inProps,
|
|
50
|
+
name: 'MuiContainer',
|
|
51
|
+
defaultTheme
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const useUtilityClasses = (ownerState, componentName) => {
|
|
55
|
+
const getContainerUtilityClass = slot => {
|
|
56
|
+
return (0, _utils.unstable_generateUtilityClass)(componentName, slot);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const {
|
|
60
|
+
classes,
|
|
61
|
+
fixed,
|
|
62
|
+
disableGutters,
|
|
63
|
+
maxWidth
|
|
64
|
+
} = ownerState;
|
|
65
|
+
const slots = {
|
|
66
|
+
root: ['root', maxWidth && `maxWidth${(0, _utils.unstable_capitalize)(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']
|
|
67
|
+
};
|
|
68
|
+
return (0, _utils.unstable_composeClasses)(slots, getContainerUtilityClass, classes);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
function createContainer(options = {}) {
|
|
72
|
+
const {
|
|
73
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
74
|
+
createStyledComponent = defaultCreateStyledComponent,
|
|
75
|
+
useThemeProps = useThemePropsDefault,
|
|
76
|
+
componentName = 'MuiContainer'
|
|
77
|
+
} = options;
|
|
78
|
+
const ContainerRoot = createStyledComponent(({
|
|
79
|
+
theme,
|
|
80
|
+
ownerState
|
|
81
|
+
}) => (0, _extends2.default)({
|
|
82
|
+
width: '100%',
|
|
83
|
+
marginLeft: 'auto',
|
|
84
|
+
boxSizing: 'border-box',
|
|
85
|
+
marginRight: 'auto',
|
|
86
|
+
display: 'block'
|
|
87
|
+
}, !ownerState.disableGutters && {
|
|
88
|
+
paddingLeft: theme.spacing(2),
|
|
89
|
+
paddingRight: theme.spacing(2),
|
|
90
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
91
|
+
[theme.breakpoints.up('sm')]: {
|
|
92
|
+
paddingLeft: theme.spacing(3),
|
|
93
|
+
paddingRight: theme.spacing(3)
|
|
94
|
+
}
|
|
95
|
+
}), ({
|
|
96
|
+
theme,
|
|
97
|
+
ownerState
|
|
98
|
+
}) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {
|
|
99
|
+
const breakpoint = breakpointValueKey;
|
|
100
|
+
const value = theme.breakpoints.values[breakpoint];
|
|
101
|
+
|
|
102
|
+
if (value !== 0) {
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
acc[theme.breakpoints.up(breakpoint)] = {
|
|
105
|
+
maxWidth: `${value}${theme.breakpoints.unit}`
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return acc;
|
|
110
|
+
}, {}), ({
|
|
111
|
+
theme,
|
|
112
|
+
ownerState
|
|
113
|
+
}) => (0, _extends2.default)({}, ownerState.maxWidth === 'xs' && {
|
|
114
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
115
|
+
[theme.breakpoints.up('xs')]: {
|
|
116
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
117
|
+
maxWidth: Math.max(theme.breakpoints.values.xs, 444)
|
|
118
|
+
}
|
|
119
|
+
}, ownerState.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
|
|
120
|
+
ownerState.maxWidth !== 'xs' && {
|
|
121
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
122
|
+
[theme.breakpoints.up(ownerState.maxWidth)]: {
|
|
123
|
+
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
124
|
+
maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {
|
|
128
|
+
const props = useThemeProps(inProps);
|
|
129
|
+
const {
|
|
130
|
+
className,
|
|
131
|
+
component = 'div',
|
|
132
|
+
disableGutters = false,
|
|
133
|
+
fixed = false,
|
|
134
|
+
maxWidth = 'lg'
|
|
135
|
+
} = props,
|
|
136
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
137
|
+
const ownerState = (0, _extends2.default)({}, props, {
|
|
138
|
+
component,
|
|
139
|
+
disableGutters,
|
|
140
|
+
fixed,
|
|
141
|
+
maxWidth
|
|
142
|
+
}); // @ts-ignore module augmentation fails if custom breakpoints are used
|
|
143
|
+
|
|
144
|
+
const classes = useUtilityClasses(ownerState, componentName);
|
|
145
|
+
return (
|
|
146
|
+
/*#__PURE__*/
|
|
147
|
+
// @ts-ignore theme is injected by the styled util
|
|
148
|
+
(0, _jsxRuntime.jsx)(ContainerRoot, (0, _extends2.default)({
|
|
149
|
+
as: component // @ts-ignore module augmentation fails if custom breakpoints are used
|
|
150
|
+
,
|
|
151
|
+
ownerState: ownerState,
|
|
152
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
153
|
+
ref: ref
|
|
154
|
+
}, other))
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
process.env.NODE_ENV !== "production" ? Container.propTypes
|
|
158
|
+
/* remove-proptypes */
|
|
159
|
+
= {
|
|
160
|
+
children: _propTypes.default.node,
|
|
161
|
+
classes: _propTypes.default.object,
|
|
162
|
+
className: _propTypes.default.string,
|
|
163
|
+
component: _propTypes.default.elementType,
|
|
164
|
+
disableGutters: _propTypes.default.bool,
|
|
165
|
+
fixed: _propTypes.default.bool,
|
|
166
|
+
maxWidth: _propTypes.default
|
|
167
|
+
/* @typescript-to-proptypes-ignore */
|
|
168
|
+
.oneOfType([_propTypes.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), _propTypes.default.string]),
|
|
169
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
170
|
+
} : void 0;
|
|
171
|
+
return Container;
|
|
172
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {
|
|
9
|
+
containerClasses: true
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "containerClasses", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return _containerClasses.default;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "default", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _Container.default;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
var _Container = _interopRequireDefault(require("./Container"));
|
|
25
|
+
|
|
26
|
+
var _containerClasses = _interopRequireWildcard(require("./containerClasses"));
|
|
27
|
+
|
|
28
|
+
Object.keys(_containerClasses).forEach(function (key) {
|
|
29
|
+
if (key === "default" || key === "__esModule") return;
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
31
|
+
if (key in exports && exports[key] === _containerClasses[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _containerClasses[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|