@mui/lab 5.0.0-alpha.134 → 5.0.0-alpha.135
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 +173 -4
- package/Masonry/Masonry.js +16 -6
- package/Timeline/Timeline.d.ts +3 -1
- package/Timeline/Timeline.js +4 -4
- package/Timeline/timelineClasses.d.ts +1 -1
- package/Timeline/timelineClasses.js +1 -1
- package/TimelineContent/TimelineContent.js +3 -3
- package/TimelineContent/timelineContentClasses.d.ts +2 -0
- package/TimelineContent/timelineContentClasses.js +1 -1
- package/TimelineItem/TimelineItem.d.ts +1 -1
- package/TimelineItem/TimelineItem.js +7 -6
- package/TimelineItem/timelineItemClasses.d.ts +2 -0
- package/TimelineItem/timelineItemClasses.js +1 -1
- package/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +2 -0
- package/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/index.js +1 -1
- package/internal/convertTimelinePositionToClass.d.ts +1 -0
- package/internal/convertTimelinePositionToClass.js +4 -0
- package/legacy/Masonry/Masonry.js +14 -6
- package/legacy/Timeline/Timeline.js +4 -4
- package/legacy/Timeline/timelineClasses.js +1 -1
- package/legacy/TimelineContent/TimelineContent.js +3 -3
- package/legacy/TimelineContent/timelineContentClasses.js +1 -1
- package/legacy/TimelineItem/TimelineItem.js +13 -14
- package/legacy/TimelineItem/timelineItemClasses.js +1 -1
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internal/convertTimelinePositionToClass.js +4 -0
- package/modern/Masonry/Masonry.js +16 -6
- package/modern/Timeline/Timeline.js +4 -4
- package/modern/Timeline/timelineClasses.js +1 -1
- package/modern/TimelineContent/TimelineContent.js +3 -3
- package/modern/TimelineContent/timelineContentClasses.js +1 -1
- package/modern/TimelineItem/TimelineItem.js +7 -6
- package/modern/TimelineItem/timelineItemClasses.js +1 -1
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/modern/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internal/convertTimelinePositionToClass.js +4 -0
- package/node/Masonry/Masonry.js +15 -5
- package/node/Timeline/Timeline.js +4 -4
- package/node/Timeline/timelineClasses.js +1 -1
- package/node/TimelineContent/TimelineContent.js +3 -3
- package/node/TimelineContent/timelineContentClasses.js +1 -1
- package/node/TimelineItem/TimelineItem.js +6 -5
- package/node/TimelineItem/timelineItemClasses.js +1 -1
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +3 -3
- package/node/TimelineOppositeContent/timelineOppositeContentClasses.js +1 -1
- package/node/index.js +1 -1
- package/node/internal/convertTimelinePositionToClass.js +10 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,176 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.13.7
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.13.6..master -->
|
|
6
|
+
|
|
7
|
+
_Jul 4, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 21 contributors who made this release possible.
|
|
10
|
+
This release focuses primarily on 🐛 bug fixes, 📚 documentation, and ⚙️ infrastructure improvements.
|
|
11
|
+
|
|
12
|
+
### `@mui/material@5.13.7`
|
|
13
|
+
|
|
14
|
+
- [OutlinedInput] Fix form control properties in `ownerState` (#37668) @vonagam
|
|
15
|
+
|
|
16
|
+
### `@mui/system@5.13.7`
|
|
17
|
+
|
|
18
|
+
- [Stack] Fix spacing when there are `<style>` children (#34966) @cmd-johnson
|
|
19
|
+
|
|
20
|
+
### `@mui/icons-material@5.13.7`
|
|
21
|
+
|
|
22
|
+
- [icons] Add Microsoft logo (#37717) @zephyrus21
|
|
23
|
+
|
|
24
|
+
### `@mui/joy@5.0.0-alpha.86`
|
|
25
|
+
|
|
26
|
+
- [Autocomplete][joy] Fix Autocomplete and Modal components to work together (#37515) @saikathalderr
|
|
27
|
+
- [Menu][Joy] Improve UX of `Menu` usage demo (#37797) @sai6855
|
|
28
|
+
|
|
29
|
+
### `@mui/base@5.0.0-beta.6`
|
|
30
|
+
|
|
31
|
+
- [Slider][base][material][joy] Fix not draggable on the edge when `disableSwap={true}` (#35998) @sai6855
|
|
32
|
+
- [Slider][base] Provide slot state to Slider's thumb slot props callback (#37749) @mnajdova
|
|
33
|
+
- [Tabs] Wrap TabsList context creation in useMemo (#37370) @michaldudak
|
|
34
|
+
- [TextareaAutosize] Fix wrong height measurement (#37185) @bigteech
|
|
35
|
+
|
|
36
|
+
### `@mui/lab@5.0.0-alpha.135`
|
|
37
|
+
|
|
38
|
+
- [Timeline] Fix position `alternate-reverse` generated classname (#37678) @ZeeshanTamboli
|
|
39
|
+
|
|
40
|
+
### Docs
|
|
41
|
+
|
|
42
|
+
- [docs][base] Add demo for using the Button as a link (#37317) @AdamSundberg
|
|
43
|
+
- [docs][base] Add Tailwind CSS + plain CSS demo on the Select page (#37725) @mnajdova
|
|
44
|
+
- [docs][base] Make Base UI input demos denser (#37750) @zanivan
|
|
45
|
+
- [docs][base] Make Base UI button demos denser (#37689) @zanivan
|
|
46
|
+
- [docs][base] Add Tailwind CSS & plain CSS demos on the Input page (#37685) @mnajdova
|
|
47
|
+
- [docs][base] Fix horizontal scrolling on the mobile input page (#37688) @zanivan
|
|
48
|
+
- [docs] Improve Base UI index page (#37761) @oliviertassinari
|
|
49
|
+
- [docs] Fix incorrect package URL in README of example material-vite (#37755) @Dlouxgit
|
|
50
|
+
- [docs] Explain how to disable Base Select's portal (#37684) @michaldudak
|
|
51
|
+
- [docs] Shorten overview page URLs (#37660) @oliviertassinari
|
|
52
|
+
- [docs][material] Rename custom tab panel in Tabs demo to prevent confusion with @mui/lab (#37638) @MUK-Dev
|
|
53
|
+
- [docs][tabs] Document how to use routing with Tabs in Base UI (#37369) @michaldudak
|
|
54
|
+
- [docs] Rename product to productId (#37801) @siriwatknp
|
|
55
|
+
- [docs][base] Add Tailwind CSS & plain CSS demo on the Slider page (#37736) @mnajdova
|
|
56
|
+
|
|
57
|
+
### Core
|
|
58
|
+
|
|
59
|
+
- [docs–infra] Prevent displaying multiple ads (#37696) @oliviertassinari
|
|
60
|
+
- [blog] Fix mismatch between plan and link @oliviertassinari
|
|
61
|
+
- [core] Update yarn lockfile (#37802) @michaldudak
|
|
62
|
+
- [core] Add bundle size Toolpad app link to PRs (#36311) @Janpot
|
|
63
|
+
- [core] Fix priority support prompt action flow (#37726) @DanailH
|
|
64
|
+
- [core] Fix typo in priority support @oliviertassinari
|
|
65
|
+
- [core][docs] add Eslint rule to ensure main demo component match file… (#37278) @alexfauquette
|
|
66
|
+
- [docs-infra] Fix truncated TOCs scrollbar (#37770) @oliviertassinari
|
|
67
|
+
- [docs-infra] Adjust demo container to be glued to the toolbar (#37744) @danilo-leal
|
|
68
|
+
- [docs-infra] Fix layout shift ad (#37694) @oliviertassinari
|
|
69
|
+
- [docs-infra] Improve demos toolbar (#37762) @oliviertassinari
|
|
70
|
+
- [docs-infra] Make the GitHub link in the nav bar open in a new tab (#37766) @gateremark
|
|
71
|
+
- [docs-infra] Allow to persist icons in ToC (#37731) @cherniavskii
|
|
72
|
+
- [docs-infra] Improve product mapping (#37729) @oliviertassinari
|
|
73
|
+
- [docs-infra] Add design polish to the comment and anchor buttons (#37734) @danilo-leal
|
|
74
|
+
- [docs-infra] Tweak editable code blocks callout design (#37681) @danilo-leal
|
|
75
|
+
- [docs-infra] Improve the edit page experience (#37695) @oliviertassinari
|
|
76
|
+
- [docs-infra] Support rendering markdown outside of docs (#37691) @oliviertassinari
|
|
77
|
+
- [docs-infra] Polish demo toolbar button designs (#37680) @danilo-leal
|
|
78
|
+
- [docs-infra] Adjust demo component container design (#37659) @danilo-leal
|
|
79
|
+
- [test] Fix test:e2e local run (#37719) @oliviertassinari
|
|
80
|
+
- [test] Remove failing test in dev @oliviertassinari
|
|
81
|
+
- [website] Add no-op service worker to fix stale cache issue (#37607) @cherniavskii
|
|
82
|
+
- [website] Transition the Core page to be Material UI instead (#37583) @danilo-leal
|
|
83
|
+
- [website] Update the pricing page to reflect sales (#37751) @oliviertassinari
|
|
84
|
+
- [website] Match Copyright with the rest of the website @oliviertassinari
|
|
85
|
+
- [website] Support deep linking to pricing FAQ @oliviertassinari
|
|
86
|
+
|
|
87
|
+
All contributors of this release in alphabetical order: @AdamSundberg, @alexfauquette, @bigteech, @cherniavskii, @cmd-johnson, @DanailH, @danilo-leal, @Dlouxgit, @gateremark, @Janpot, @michaldudak, @mnajdova, @MUK-Dev, @oliviertassinari, @sai6855, @saikathalderr, @siriwatknp, @vonagam, @zanivan, @ZeeshanTamboli, @zephyrus21
|
|
88
|
+
|
|
89
|
+
## 5.13.6
|
|
90
|
+
|
|
91
|
+
_Jun 21, 2023_
|
|
92
|
+
|
|
93
|
+
A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
|
|
94
|
+
|
|
95
|
+
- 💫 Added [Slider](https://mui.com/material-ui/react-slider/#material-you-version) component using the new Material You design language (#37520) @DiegoAndai.
|
|
96
|
+
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-next-app-router-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
|
|
97
|
+
|
|
98
|
+
### `@mui/material@5.13.6`
|
|
99
|
+
|
|
100
|
+
- ​<!-- 45 -->[Autocomplete] Fixed autocomplete's existing option selection (#37012) @bencevoros
|
|
101
|
+
- ​<!-- 44 -->[Autocomplete] Add hint demos to Material UI and Joy UI docs (#37496) @sai6855
|
|
102
|
+
- ​<!-- 13 -->[Masonry] Fix ResizeObserver loop limit exceeded error (#37208) @hbjORbj
|
|
103
|
+
- ​<!-- 11 -->[Tooltip][material] Improve warning when Tooltip receives string child (#37530) @DiegoAndai
|
|
104
|
+
- ​<!-- 10 -->[Modal] Add missing members to ModalOwnProps (#37568) @ivp-dev
|
|
105
|
+
- ​<!-- 09 -->[Slider] Arrow keys control does not work with float numbers (#37071) @gitstart
|
|
106
|
+
- ​<!-- 08 -->[SvgIcon] allow `svg` as a child (#37231) @siriwatknp
|
|
107
|
+
- ​<!-- 07 -->[Timeline] Add alternate reverse position (#37311) @abhinavkmrru
|
|
108
|
+
- ​<!-- 06 -->[Tooltip] Fix type of sx prop in `slotProps` (#37550) @SuperKXT
|
|
109
|
+
- ​<!-- 05 -->[TouchRipple] perf: avoid calling `clearTimeout()` (#37512) @romgrk
|
|
110
|
+
|
|
111
|
+
### `@mui/material-next@6.0.0-alpha.90`
|
|
112
|
+
|
|
113
|
+
- ​<!-- 12 -->[Material You] Add Slider component with Material You design (#37520) @DiegoAndai
|
|
114
|
+
|
|
115
|
+
### `@mui/joy@5.0.0-alpha.85`
|
|
116
|
+
|
|
117
|
+
- ​<!-- 37 -->[ButtonGroup][joy] Missing border when spacing is more than zero (#37577) @siriwatknp
|
|
118
|
+
- ​<!-- 36 -->[CardActions][joy] Add `CardActions` component (#37441) @siriwatknp
|
|
119
|
+
- ​<!-- 14 -->[Menu][joy] Fix closing of `Menu` in demos (#36917) @sai6855
|
|
120
|
+
|
|
121
|
+
### `@mui/base@5.0.0-beta.5`
|
|
122
|
+
|
|
123
|
+
- ​<!-- 39 -->[Menu][base] Add the resetHighlight action (#37392) @michaldudak
|
|
124
|
+
- ​<!-- 38 -->[Select][base] Expose the `areOptionsEqual` prop (#37615) @michaldudak
|
|
125
|
+
|
|
126
|
+
### `@mui/utils@5.13.2`
|
|
127
|
+
|
|
128
|
+
- ​<!-- 04 -->[utils] Allow nested imports in @mui/utils to speed up build (#37586) @flaviendelangle
|
|
129
|
+
|
|
130
|
+
### Docs
|
|
131
|
+
|
|
132
|
+
- ​<!-- 43 -->[docs][base] Improve Base UI all components images (#37590) @danilo-leal
|
|
133
|
+
- ​<!-- 42 -->[docs][base] Add pages for coming soon components (#37575) @danilo-leal
|
|
134
|
+
- ​<!-- 41 -->[docs][base] Add a Snackbar introduction demo (#37602) @danilo-leal
|
|
135
|
+
- ​<!-- 40 -->[docs][base] Add page for all Base UI components (#37536) @danilo-leal
|
|
136
|
+
- ​<!-- 33 -->[docs] Fix scrollbar on snackbar page (#37657) @oliviertassinari
|
|
137
|
+
- ​<!-- 32 -->[docs] Switch order of snackbar buttons in demos (#37389) @Primajin
|
|
138
|
+
- ​<!-- 31 -->[docs] Add support for Tailwind CSS and plain CSS demos (#37319) @mnajdova
|
|
139
|
+
- ​<!-- 30 -->[docs] Tree view color fix for dark mode in Gmail example (#37051) @PunitSoniME
|
|
140
|
+
- ​<!-- 29 -->[docs] Inline the Base UI demo (#37603) @oliviertassinari
|
|
141
|
+
- ​<!-- 28 -->[docs] Fix typo in themed components page (#37598) @vinayr
|
|
142
|
+
- ​<!-- 27 -->[docs] Fix render inline code in CSS description generation (#37448) @alexfauquette
|
|
143
|
+
- ​<!-- 26 -->[docs] Add styles to styled argument list (#37558) @DiegoAndai
|
|
144
|
+
- ​<!-- 25 -->[docs] Improve awkward wording in READMEs of example projects (#37110) @DIWAKARKASHYAP
|
|
145
|
+
- ​<!-- 24 -->[docs] Fix small base -> base-ui migration issue (#37594) @oliviertassinari
|
|
146
|
+
- ​<!-- 23 -->[docs] Fix GitHub typo (#37578) @oliviertassinari
|
|
147
|
+
- ​<!-- 22 -->[docs] Improve release guide (#37547) @DiegoAndai
|
|
148
|
+
- ​<!-- 21 -->[docs] Review fixes to the Material UI's "Example projects" page (#37444) @danilo-leal
|
|
149
|
+
- ​<!-- 17 -->[docs][joy] Add a messages template (#37546) @sernstberger
|
|
150
|
+
- ​<!-- 16 -->[docs][joy] Add pages for coming soon Joy UI components (#36920) @danilo-leal
|
|
151
|
+
- ​<!-- 15 -->[docs][joy] Add design and consistency tweaks to the Playground (#37580) @danilo-leal
|
|
152
|
+
- ​<!-- 37 -->[docs] Add and revise Base UI + Create React App examples (#36825) @samuelsycamore
|
|
153
|
+
- ​<!-- 20 -->[docs-infra] Fix demos border radius (#37658) @oliviertassinari
|
|
154
|
+
- ​<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
|
|
155
|
+
- ​<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
|
|
156
|
+
- ​<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
|
|
157
|
+
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-app-router-ts example (#37675) @bablukpik
|
|
158
|
+
- ​<!-- 15 -->[examples] Next.js v13 app router with Material UI (#37315) @smo043
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- ​<!-- 34 -->[core] Update to Node.js v18 for `test-dev` CI (#37604) @ZeeshanTamboli
|
|
163
|
+
- ​<!-- 39 -->[core] Add priority support issue template (#37671) @DanailH
|
|
164
|
+
- ​<!-- 03 -->[website] Update roadmap page (#37587) @cherniavskii
|
|
165
|
+
- ​<!-- 02 -->[website] Add CSP to limit iframes to self @oliviertassinari
|
|
166
|
+
- ​<!-- 01 -->[website] Link mui-x Stack Overflow in footer link (#37509) @richbustos
|
|
167
|
+
|
|
168
|
+
All contributors of this release in alphabetical order: @abhinavkmrru, @alexfauquette, @bencevoros, @cherniavskii, @danilo-leal, @DiegoAndai, @DIWAKARKASHYAP, @flaviendelangle, @gitstart, @hbjORbj, @ivp-dev, @Janpot, @michaldudak, @mnajdova, @oliviertassinari, @Primajin, @PunitSoniME, @richbustos, @romgrk, @sai6855, @sernstberger, @siriwatknp, @SuperKXT, @vinayr, @ZeeshanTamboli
|
|
169
|
+
|
|
3
170
|
## 5.13.5
|
|
4
171
|
|
|
172
|
+
_Jun 12, 2023_
|
|
173
|
+
|
|
5
174
|
A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
6
175
|
|
|
7
176
|
- 💫 Added `ButtonGroup` component in Joy UI (#37407) @siriwatknp.
|
|
@@ -9775,7 +9944,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
|
|
|
9775
9944
|
|
|
9776
9945
|
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.
|
|
9777
9946
|
|
|
9778
|
-
- 📚 Revamp the documentation for [the system](https://mui.com/system/getting-started/
|
|
9947
|
+
- 📚 Revamp the documentation for [the system](https://mui.com/system/getting-started/). The System contains CSS utilities. The documentation now promotes the use of the `sx` prop. It's ideal for adding one-off styles, e.g. padding, but when pushed to its limits, it can be used to implement quickly a complete page.
|
|
9779
9948
|
- 👩🎨 Upgrade emotion to v11 (#23007) @mnajdova.
|
|
9780
9949
|
- And many more 🐛 bug fixes and 📚 improvements.
|
|
9781
9950
|
|
|
@@ -10177,7 +10346,7 @@ Here are some highlights ✨:
|
|
|
10177
10346
|
If you target IE11, you need to use the new bundle (`legacy`). We are treating IE11 as a second class-citizen, which is a continuation of the direction taken in #22873.
|
|
10178
10347
|
|
|
10179
10348
|
- 🚀 Improve the internal benchmark suite (#22923, #23058) @mnajdova.
|
|
10180
|
-
This was a prerequisite step to improve the [system](https://mui.com/system/getting-started/
|
|
10349
|
+
This was a prerequisite step to improve the [system](https://mui.com/system/getting-started/). We needed to be able to measure performance. After #22945, we have measured that the `Box` component is x3 faster in v5-alpha compared to v4.
|
|
10181
10350
|
- ✏️ A new blog post: [Q3 2020 Update](https://mui.com/blog/2020-q3-update/) (#23055) @oliviertassinari.
|
|
10182
10351
|
- 🐙 Migrate more tests to react-testing-library @deiga, @Morteza-Jenabzadeh, @nicholas-l.
|
|
10183
10352
|
- And many more 🐛 bug fixes and 📚 improvements.
|
|
@@ -10518,7 +10687,7 @@ Here are some highlights ✨:
|
|
|
10518
10687
|
|
|
10519
10688
|
The new styling solution saves 2kB gzipped in the bundle compared to JSS, and about 14 kB gzipped if you were already using emotion or styled-components.
|
|
10520
10689
|
|
|
10521
|
-
Last but not least, the change allows us to take advantage dynamic style props. We will use them for dynamic color props, variant props, and new style props (an improved [system](https://mui.com/system/getting-started/
|
|
10690
|
+
Last but not least, the change allows us to take advantage dynamic style props. We will use them for dynamic color props, variant props, and new style props (an improved [system](https://mui.com/system/getting-started/)).
|
|
10522
10691
|
|
|
10523
10692
|
This change has been in our roadmap for more than a year.
|
|
10524
10693
|
We announced it in the [v4 release blog post](https://mui.com/blog/material-ui-v4-is-out/) as a direction v5 would take.
|
|
@@ -11771,7 +11940,7 @@ A big thanks to the 33 contributors who made this release possible. Here are som
|
|
|
11771
11940
|
/>
|
|
11772
11941
|
```
|
|
11773
11942
|
|
|
11774
|
-
- [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/getting-started/
|
|
11943
|
+
- [Typography] Replace the `srOnly` prop so as to not duplicate the capabilities of [System](https://mui.com/system/getting-started/) (#21413) @mnajdova.
|
|
11775
11944
|
|
|
11776
11945
|
```diff
|
|
11777
11946
|
-import Typography from '@material-ui/core/Typography';
|
package/Masonry/Masonry.js
CHANGED
|
@@ -5,7 +5,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
5
5
|
import * as ReactDOM from 'react-dom';
|
|
6
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
7
7
|
import { createUnarySpacing, getValue, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
8
|
-
import { deepmerge, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
|
+
import { deepmerge, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import * as React from 'react';
|
|
@@ -221,19 +221,29 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
|
|
225
|
-
React.useEffect(() => {
|
|
226
|
-
const resizeObserver = observer.current;
|
|
224
|
+
useEnhancedEffect(() => {
|
|
227
225
|
// IE and old browsers are not supported
|
|
228
|
-
if (
|
|
226
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
229
227
|
return undefined;
|
|
230
228
|
}
|
|
229
|
+
let animationFrame;
|
|
230
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
231
|
+
// see https://github.com/mui/material-ui/issues/36909
|
|
232
|
+
animationFrame = window.requestAnimationFrame(handleResize);
|
|
233
|
+
});
|
|
231
234
|
if (masonryRef.current) {
|
|
232
235
|
masonryRef.current.childNodes.forEach(childNode => {
|
|
233
236
|
resizeObserver.observe(childNode);
|
|
234
237
|
});
|
|
235
238
|
}
|
|
236
|
-
return () =>
|
|
239
|
+
return () => {
|
|
240
|
+
if (animationFrame) {
|
|
241
|
+
window.cancelAnimationFrame(animationFrame);
|
|
242
|
+
}
|
|
243
|
+
if (resizeObserver) {
|
|
244
|
+
resizeObserver.disconnect();
|
|
245
|
+
}
|
|
246
|
+
};
|
|
237
247
|
}, [columns, spacing, children]);
|
|
238
248
|
const handleRef = useForkRef(ref, masonryRef);
|
|
239
249
|
|
package/Timeline/Timeline.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface TimelineProps extends StandardProps<React.HTMLAttributes<HTMLUL
|
|
|
8
8
|
* The position where the TimelineContent should appear relative to the time axis.
|
|
9
9
|
* @default 'right'
|
|
10
10
|
*/
|
|
11
|
-
position?: 'left' | 'right' | 'alternate';
|
|
11
|
+
position?: 'left' | 'right' | 'alternate' | 'alternate-reverse';
|
|
12
12
|
/**
|
|
13
13
|
* The content of the component.
|
|
14
14
|
*/
|
|
@@ -25,6 +25,8 @@ export interface TimelineProps extends StandardProps<React.HTMLAttributes<HTMLUL
|
|
|
25
25
|
positionRight?: string;
|
|
26
26
|
/** Styles applied to the root element if `position="alternate"`. */
|
|
27
27
|
positionAlternate?: string;
|
|
28
|
+
/** Styles applied to the root element if `position="alternate-reverse"`. */
|
|
29
|
+
positionAlternateReverse?: string;
|
|
28
30
|
};
|
|
29
31
|
/**
|
|
30
32
|
* className applied to the root element.
|
package/Timeline/Timeline.js
CHANGED
|
@@ -7,11 +7,11 @@ import clsx from 'clsx';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line no-restricted-imports -- importing types
|
|
9
9
|
|
|
10
|
-
import { capitalize } from '@mui/material/utils';
|
|
11
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
12
11
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
13
12
|
import TimelineContext from './TimelineContext';
|
|
14
13
|
import { getTimelineUtilityClass } from './timelineClasses';
|
|
14
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
const useUtilityClasses = ownerState => {
|
|
17
17
|
const {
|
|
@@ -19,7 +19,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
19
|
classes
|
|
20
20
|
} = ownerState;
|
|
21
21
|
const slots = {
|
|
22
|
-
root: ['root', position &&
|
|
22
|
+
root: ['root', position && convertTimelinePositionToClass(position)]
|
|
23
23
|
};
|
|
24
24
|
return composeClasses(slots, getTimelineUtilityClass, classes);
|
|
25
25
|
};
|
|
@@ -30,7 +30,7 @@ const TimelineRoot = styled('ul', {
|
|
|
30
30
|
const {
|
|
31
31
|
ownerState
|
|
32
32
|
} = props;
|
|
33
|
-
return [styles.root, ownerState.position && styles[
|
|
33
|
+
return [styles.root, ownerState.position && styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
34
34
|
}
|
|
35
35
|
})({
|
|
36
36
|
display: 'flex',
|
|
@@ -98,7 +98,7 @@ process.env.NODE_ENV !== "production" ? Timeline.propTypes /* remove-proptypes *
|
|
|
98
98
|
* The position where the TimelineContent should appear relative to the time axis.
|
|
99
99
|
* @default 'right'
|
|
100
100
|
*/
|
|
101
|
-
position: PropTypes.oneOf(['alternate', 'left', 'right']),
|
|
101
|
+
position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
|
|
102
102
|
/**
|
|
103
103
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
104
104
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function getTimelineUtilityClass(slot: string): string;
|
|
2
|
-
declare const timelineClasses: Record<"root" | "positionLeft" | "positionRight" | "positionAlternate", string>;
|
|
2
|
+
declare const timelineClasses: Record<"root" | "positionLeft" | "positionRight" | "positionAlternate" | "positionAlternateReverse", string>;
|
|
3
3
|
export default timelineClasses;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/material/generateUtilityClasses';
|
|
|
3
3
|
export function getTimelineUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTimeline', slot);
|
|
5
5
|
}
|
|
6
|
-
const timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate']);
|
|
6
|
+
const timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
7
|
export default timelineClasses;
|
|
@@ -4,12 +4,12 @@ const _excluded = ["className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import { capitalize } from '@mui/material/utils';
|
|
8
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
9
|
import Typography from '@mui/material/Typography';
|
|
11
10
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
12
11
|
import { getTimelineContentUtilityClass } from './timelineContentClasses';
|
|
12
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -17,7 +17,7 @@ const useUtilityClasses = ownerState => {
|
|
|
17
17
|
classes
|
|
18
18
|
} = ownerState;
|
|
19
19
|
const slots = {
|
|
20
|
-
root: ['root',
|
|
20
|
+
root: ['root', convertTimelinePositionToClass(position)]
|
|
21
21
|
};
|
|
22
22
|
return composeClasses(slots, getTimelineContentUtilityClass, classes);
|
|
23
23
|
};
|
|
@@ -28,7 +28,7 @@ const TimelineContentRoot = styled(Typography, {
|
|
|
28
28
|
const {
|
|
29
29
|
ownerState
|
|
30
30
|
} = props;
|
|
31
|
-
return [styles.root, styles[
|
|
31
|
+
return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
32
32
|
}
|
|
33
33
|
})(({
|
|
34
34
|
ownerState
|
|
@@ -7,6 +7,8 @@ export interface TimelineContentClasses {
|
|
|
7
7
|
positionLeft: string;
|
|
8
8
|
/** Styles applied to the root element if `position="alternate"`. */
|
|
9
9
|
positionAlternate: string;
|
|
10
|
+
/** Styles applied to the root element if `position="alternate-reverse"`. */
|
|
11
|
+
positionAlternateReverse: string;
|
|
10
12
|
}
|
|
11
13
|
export type TimelineContentClassKey = keyof TimelineContentClasses;
|
|
12
14
|
export declare function getTimelineContentUtilityClass(slot: string): string;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/material/generateUtilityClasses';
|
|
|
3
3
|
export function getTimelineContentUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTimelineContent', slot);
|
|
5
5
|
}
|
|
6
|
-
const timelineContentClasses = generateUtilityClasses('MuiTimelineContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate']);
|
|
6
|
+
const timelineContentClasses = generateUtilityClasses('MuiTimelineContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
7
|
export default timelineContentClasses;
|
|
@@ -8,7 +8,7 @@ export interface TimelineItemProps extends StandardProps<React.HTMLAttributes<HT
|
|
|
8
8
|
/**
|
|
9
9
|
* The position where the timeline's item should appear.
|
|
10
10
|
*/
|
|
11
|
-
position?: 'left' | 'right';
|
|
11
|
+
position?: 'left' | 'right' | 'alternate' | 'alternate-reverse';
|
|
12
12
|
/**
|
|
13
13
|
* The content of the component.
|
|
14
14
|
*/
|
|
@@ -4,13 +4,14 @@ const _excluded = ["position", "className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import {
|
|
7
|
+
import { isMuiElement } from '@mui/material/utils';
|
|
8
8
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
9
9
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
10
|
import { timelineContentClasses } from '../TimelineContent';
|
|
11
11
|
import { timelineOppositeContentClasses } from '../TimelineOppositeContent';
|
|
12
12
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
13
13
|
import { getTimelineItemUtilityClass } from './timelineItemClasses';
|
|
14
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const useUtilityClasses = ownerState => {
|
|
16
17
|
const {
|
|
@@ -19,7 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
hasOppositeContent
|
|
20
21
|
} = ownerState;
|
|
21
22
|
const slots = {
|
|
22
|
-
root: ['root',
|
|
23
|
+
root: ['root', convertTimelinePositionToClass(position), !hasOppositeContent && 'missingOppositeContent']
|
|
23
24
|
};
|
|
24
25
|
return composeClasses(slots, getTimelineItemUtilityClass, classes);
|
|
25
26
|
};
|
|
@@ -30,7 +31,7 @@ const TimelineItemRoot = styled('li', {
|
|
|
30
31
|
const {
|
|
31
32
|
ownerState
|
|
32
33
|
} = props;
|
|
33
|
-
return [styles.root, styles[
|
|
34
|
+
return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
34
35
|
}
|
|
35
36
|
})(({
|
|
36
37
|
ownerState
|
|
@@ -41,8 +42,8 @@ const TimelineItemRoot = styled('li', {
|
|
|
41
42
|
minHeight: 70
|
|
42
43
|
}, ownerState.position === 'left' && {
|
|
43
44
|
flexDirection: 'row-reverse'
|
|
44
|
-
}, ownerState.position === 'alternate' && {
|
|
45
|
-
|
|
45
|
+
}, (ownerState.position === 'alternate' || ownerState.position === 'alternate-reverse') && {
|
|
46
|
+
[`&:nth-of-type(${ownerState.position === 'alternate' ? 'even' : 'odd'})`]: {
|
|
46
47
|
flexDirection: 'row-reverse',
|
|
47
48
|
[`& .${timelineContentClasses.root}`]: {
|
|
48
49
|
textAlign: 'right'
|
|
@@ -114,7 +115,7 @@ process.env.NODE_ENV !== "production" ? TimelineItem.propTypes /* remove-proptyp
|
|
|
114
115
|
/**
|
|
115
116
|
* The position where the timeline's item should appear.
|
|
116
117
|
*/
|
|
117
|
-
position: PropTypes.oneOf(['left', 'right']),
|
|
118
|
+
position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
|
|
118
119
|
/**
|
|
119
120
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
120
121
|
*/
|
|
@@ -7,6 +7,8 @@ export interface TimelineItemClasses {
|
|
|
7
7
|
positionRight: string;
|
|
8
8
|
/** Styles applied to the root element if `position="alternate"`. */
|
|
9
9
|
positionAlternate: string;
|
|
10
|
+
/** Styles applied to the root element if `position="alternate-reverse"`. */
|
|
11
|
+
positionAlternateReverse: string;
|
|
10
12
|
/** Styles applied to the root element if TimelineOppositeContent isn't provided. */
|
|
11
13
|
missingOppositeContent: string;
|
|
12
14
|
}
|
|
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/material/generateUtilityClasses';
|
|
|
3
3
|
export function getTimelineItemUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTimelineItem', slot);
|
|
5
5
|
}
|
|
6
|
-
const timelineItemClasses = generateUtilityClasses('MuiTimelineItem', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'missingOppositeContent']);
|
|
6
|
+
const timelineItemClasses = generateUtilityClasses('MuiTimelineItem', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse', 'missingOppositeContent']);
|
|
7
7
|
export default timelineItemClasses;
|
|
@@ -5,11 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
|
-
import { capitalize } from '@mui/material/utils';
|
|
9
8
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
10
9
|
import Typography from '@mui/material/Typography';
|
|
11
10
|
import TimelineContext from '../Timeline/TimelineContext';
|
|
12
11
|
import { getTimelineOppositeContentUtilityClass } from './timelineOppositeContentClasses';
|
|
12
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -17,7 +17,7 @@ const useUtilityClasses = ownerState => {
|
|
|
17
17
|
classes
|
|
18
18
|
} = ownerState;
|
|
19
19
|
const slots = {
|
|
20
|
-
root: ['root',
|
|
20
|
+
root: ['root', convertTimelinePositionToClass(position)]
|
|
21
21
|
};
|
|
22
22
|
return composeClasses(slots, getTimelineOppositeContentUtilityClass, classes);
|
|
23
23
|
};
|
|
@@ -28,7 +28,7 @@ const TimelineOppositeContentRoot = styled(Typography, {
|
|
|
28
28
|
const {
|
|
29
29
|
ownerState
|
|
30
30
|
} = props;
|
|
31
|
-
return [styles.root, styles[
|
|
31
|
+
return [styles.root, styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
32
32
|
}
|
|
33
33
|
})(({
|
|
34
34
|
ownerState
|
|
@@ -7,6 +7,8 @@ export interface TimelineOppositeContentClasses {
|
|
|
7
7
|
positionLeft: string;
|
|
8
8
|
/** Styles applied to the root element if `position="alternate"`. */
|
|
9
9
|
positionAlternate: string;
|
|
10
|
+
/** Styles applied to the root element if `position="alternate-reverse"`. */
|
|
11
|
+
positionAlternateReverse: string;
|
|
10
12
|
}
|
|
11
13
|
export type TimelineOppositeContentClassKey = keyof TimelineOppositeContentClasses;
|
|
12
14
|
export declare function getTimelineOppositeContentUtilityClass(slot: string): string;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/material/generateUtilityClasses';
|
|
|
3
3
|
export function getTimelineOppositeContentUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTimelineOppositeContent', slot);
|
|
5
5
|
}
|
|
6
|
-
const timelineOppositeContentClasses = generateUtilityClasses('MuiTimelineOppositeContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate']);
|
|
6
|
+
const timelineOppositeContentClasses = generateUtilityClasses('MuiTimelineOppositeContent', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
7
|
export default timelineOppositeContentClasses;
|
package/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function convertTimelinePositionToClass(position: string): string;
|
|
@@ -6,7 +6,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { createUnarySpacing, getValue, handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
9
|
-
import { deepmerge, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
9
|
+
import { deepmerge, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
10
10
|
import clsx from 'clsx';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import * as React from 'react';
|
|
@@ -224,20 +224,28 @@ var Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
|
-
|
|
228
|
-
React.useEffect(function () {
|
|
229
|
-
var resizeObserver = observer.current;
|
|
227
|
+
useEnhancedEffect(function () {
|
|
230
228
|
// IE and old browsers are not supported
|
|
231
|
-
if (
|
|
229
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
232
230
|
return undefined;
|
|
233
231
|
}
|
|
232
|
+
var animationFrame;
|
|
233
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
234
|
+
// see https://github.com/mui/material-ui/issues/36909
|
|
235
|
+
animationFrame = window.requestAnimationFrame(handleResize);
|
|
236
|
+
});
|
|
234
237
|
if (masonryRef.current) {
|
|
235
238
|
masonryRef.current.childNodes.forEach(function (childNode) {
|
|
236
239
|
resizeObserver.observe(childNode);
|
|
237
240
|
});
|
|
238
241
|
}
|
|
239
242
|
return function () {
|
|
240
|
-
|
|
243
|
+
if (animationFrame) {
|
|
244
|
+
window.cancelAnimationFrame(animationFrame);
|
|
245
|
+
}
|
|
246
|
+
if (resizeObserver) {
|
|
247
|
+
resizeObserver.disconnect();
|
|
248
|
+
}
|
|
241
249
|
};
|
|
242
250
|
}, [columns, spacing, children]);
|
|
243
251
|
var handleRef = useForkRef(ref, masonryRef);
|
|
@@ -6,17 +6,17 @@ import clsx from 'clsx';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line no-restricted-imports -- importing types
|
|
8
8
|
|
|
9
|
-
import { capitalize } from '@mui/material/utils';
|
|
10
9
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
11
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
12
11
|
import TimelineContext from './TimelineContext';
|
|
13
12
|
import { getTimelineUtilityClass } from './timelineClasses';
|
|
13
|
+
import convertTimelinePositionToClass from '../internal/convertTimelinePositionToClass';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
16
16
|
var position = ownerState.position,
|
|
17
17
|
classes = ownerState.classes;
|
|
18
18
|
var slots = {
|
|
19
|
-
root: ['root', position &&
|
|
19
|
+
root: ['root', position && convertTimelinePositionToClass(position)]
|
|
20
20
|
};
|
|
21
21
|
return composeClasses(slots, getTimelineUtilityClass, classes);
|
|
22
22
|
};
|
|
@@ -25,7 +25,7 @@ var TimelineRoot = styled('ul', {
|
|
|
25
25
|
slot: 'Root',
|
|
26
26
|
overridesResolver: function overridesResolver(props, styles) {
|
|
27
27
|
var ownerState = props.ownerState;
|
|
28
|
-
return [styles.root, ownerState.position && styles[
|
|
28
|
+
return [styles.root, ownerState.position && styles[convertTimelinePositionToClass(ownerState.position)]];
|
|
29
29
|
}
|
|
30
30
|
})({
|
|
31
31
|
display: 'flex',
|
|
@@ -94,7 +94,7 @@ process.env.NODE_ENV !== "production" ? Timeline.propTypes /* remove-proptypes *
|
|
|
94
94
|
* The position where the TimelineContent should appear relative to the time axis.
|
|
95
95
|
* @default 'right'
|
|
96
96
|
*/
|
|
97
|
-
position: PropTypes.oneOf(['alternate', 'left', 'right']),
|
|
97
|
+
position: PropTypes.oneOf(['alternate-reverse', 'alternate', 'left', 'right']),
|
|
98
98
|
/**
|
|
99
99
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
100
100
|
*/
|
|
@@ -3,5 +3,5 @@ import generateUtilityClasses from '@mui/material/generateUtilityClasses';
|
|
|
3
3
|
export function getTimelineUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiTimeline', slot);
|
|
5
5
|
}
|
|
6
|
-
var timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate']);
|
|
6
|
+
var timelineClasses = generateUtilityClasses('MuiTimeline', ['root', 'positionLeft', 'positionRight', 'positionAlternate', 'positionAlternateReverse']);
|
|
7
7
|
export default timelineClasses;
|