(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25539,39519],{33897:function(n,e,s){var a=s(15012),t=/^\s+/;n.exports=function(n){return n?n.slice(0,a(n)+1).replace(t,""):n}},15012:function(n){var e=/\s/;n.exports=function(n){for(var s=n.length;s--&&e.test(n.charAt(s)););return s}},89678:function(n,e,s){var a=s(6627),t=s(85365),o=s(67948),i=Math.max,l=Math.min;n.exports=function(n,e,s){var p,c,r,d,u,h,m=0,k=!1,g=!1,f=!0;if("function"!=typeof n)throw TypeError("Expected a function");function v(e){var s=p,a=c;return p=c=void 0,m=e,d=n.apply(a,s)}function y(n){var s=n-h,a=n-m;return void 0===h||s>=e||s<0||g&&a>=r}function b(){var n,s,a,o=t();if(y(o))return C(o);u=setTimeout(b,(n=o-h,s=o-m,a=e-n,g?l(a,r-s):a))}function C(n){return(u=void 0,f&&p)?v(n):(p=c=void 0,d)}function x(){var n,s=t(),a=y(s);if(p=arguments,c=this,h=s,a){if(void 0===u)return m=n=h,u=setTimeout(b,e),k?v(n):d;if(g)return clearTimeout(u),u=setTimeout(b,e),v(h)}return void 0===u&&(u=setTimeout(b,e)),d}return e=o(e)||0,a(s)&&(k=!!s.leading,r=(g="maxWait"in s)?i(o(s.maxWait)||0,e):r,f="trailing"in s?!!s.trailing:f),x.cancel=function(){void 0!==u&&clearTimeout(u),m=0,p=h=c=u=void 0},x.flush=function(){return void 0===u?d:C(t())},x}},6627:function(n){n.exports=function(n){var e=typeof n;return null!=n&&("object"==e||"function"==e)}},85365:function(n,e,s){var a=s(73401);n.exports=function(){return a.Date.now()}},23763:function(n,e,s){var a=s(89678),t=s(6627);n.exports=function(n,e,s){var o=!0,i=!0;if("function"!=typeof n)throw TypeError("Expected a function");return t(s)&&(o="leading"in s?!!s.leading:o,i="trailing"in s?!!s.trailing:i),a(n,e,{leading:o,maxWait:e,trailing:i})}},67948:function(n,e,s){var a=s(33897),t=s(6627),o=s(42848),i=0/0,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,c=/^0o[0-7]+$/i,r=parseInt;n.exports=function(n){if("number"==typeof n)return n;if(o(n))return i;if(t(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=t(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;n=a(n);var s=p.test(n);return s||c.test(n)?r(n.slice(2),s?2:8):l.test(n)?i:+n}},80651:function(n,e,s){"use strict";s.r(e),s.d(e,{default:function(){return u}});var a={};s.r(a),s.d(a,{demoComponents:function(){return c},demos:function(){return p},docs:function(){return l},srcComponents:function(){return r}});var t=s(32970),o=s.n(t);s(92379);var i=s(54300),l={en:{description:"Yeah, v1 has been released! Take advantage of 2 years worth of effort.",location:"/docs/data/material/migration/migration-v0x/migration-v0x.md",rendered:['<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="error-icon" viewBox="0 0 20 20">\n      <path fill-rule="evenodd" d="M2 7.4v5.2a2 2 0 0 0 .586 1.414l3.4 3.4A2 2 0 0 0 7.4 18h5.2a2 2 0 0 0 1.414-.586l3.4-3.4A2 2 0 0 0 18 12.6V7.4a2 2 0 0 0-.586-1.414l-3.4-3.4A2 2 0 0 0 12.6 2H7.4a2 2 0 0 0-1.414.586l-3.4 3.4A2 2 0 0 0 2 7.4Zm11.03-.43a.75.75 0 0 1 0 1.06L11.06 10l1.97 1.97a.75.75 0 1 1-1.06 1.06L10 11.06l-1.97 1.97a.75.75 0 0 1-1.06-1.06L8.94 10 6.97 8.03a.75.75 0 0 1 1.06-1.06L10 8.94l1.97-1.97a.75.75 0 0 1 1.06 0Z" clip-rule="evenodd"/>\n      </symbol>\n      </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="warning-icon" viewBox="0 0 20 20">\n      <path d="M2.33 17a.735.735 0 0 1-.665-.375.631.631 0 0 1-.094-.375.898.898 0 0 1 .115-.396L9.353 3.062a.621.621 0 0 1 .281-.27.85.85 0 0 1 .729 0 .622.622 0 0 1 .281.27l7.667 12.792c.07.125.108.257.114.396a.63.63 0 0 1-.093.375.842.842 0 0 1-.271.27.728.728 0 0 1-.394.105H2.33Zm7.664-2.5c.211 0 .39-.072.536-.214a.714.714 0 0 0 .218-.532.736.736 0 0 0-.214-.535.714.714 0 0 0-.531-.22.736.736 0 0 0-.536.215.714.714 0 0 0-.219.531c0 .212.072.39.215.536.143.146.32.219.531.219Zm0-2.5c.211 0 .39-.072.536-.216a.72.72 0 0 0 .218-.534v-2.5a.728.728 0 0 0-.214-.534.72.72 0 0 0-.531-.216.734.734 0 0 0-.536.216.72.72 0 0 0-.219.534v2.5c0 .212.072.39.215.534a.72.72 0 0 0 .531.216Z"/>\n      </symbol>\n      </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="success-icon" viewBox="0 0 20 20">\n      <path d="m8.938 10.875-1.25-1.23a.718.718 0 0 0-.521-.228.718.718 0 0 0-.521.229.73.73 0 0 0 0 1.062l1.77 1.771c.153.153.327.23.521.23a.718.718 0 0 0 .521-.23l3.896-3.896a.73.73 0 0 0 0-1.062.718.718 0 0 0-.52-.23.718.718 0 0 0-.521.23l-3.376 3.354ZM10 18a7.796 7.796 0 0 1-3.104-.625 8.065 8.065 0 0 1-2.552-1.719 8.064 8.064 0 0 1-1.719-2.552A7.797 7.797 0 0 1 2 10c0-1.111.208-2.15.625-3.115a8.064 8.064 0 0 1 4.27-4.26A7.797 7.797 0 0 1 10 2c1.111 0 2.15.208 3.115.625a8.096 8.096 0 0 1 4.26 4.26C17.792 7.851 18 8.89 18 10a7.797 7.797 0 0 1-.625 3.104 8.066 8.066 0 0 1-4.26 4.271A7.774 7.774 0 0 1 10 18Z"/>\n      </symbol>\n      </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="info-icon" viewBox="0 0 20 20">\n      <path d="M9.996 14c.21 0 .39-.072.535-.216a.72.72 0 0 0 .219-.534v-3.5a.728.728 0 0 0-.214-.534.72.72 0 0 0-.532-.216.734.734 0 0 0-.535.216.72.72 0 0 0-.219.534v3.5c0 .213.071.39.214.534a.72.72 0 0 0 .532.216Zm0-6.5c.21 0 .39-.071.535-.214a.714.714 0 0 0 .219-.532.736.736 0 0 0-.214-.535.714.714 0 0 0-.532-.219.736.736 0 0 0-.535.214.714.714 0 0 0-.219.532c0 .21.071.39.214.535.143.146.32.219.532.219Zm.01 10.5a7.81 7.81 0 0 1-3.11-.625 8.065 8.065 0 0 1-2.552-1.719 8.066 8.066 0 0 1-1.719-2.551A7.818 7.818 0 0 1 2 9.99c0-1.104.208-2.14.625-3.105a8.066 8.066 0 0 1 4.27-4.26A7.818 7.818 0 0 1 10.009 2a7.75 7.75 0 0 1 3.106.625 8.083 8.083 0 0 1 4.26 4.265A7.77 7.77 0 0 1 18 9.994a7.81 7.81 0 0 1-.625 3.11 8.066 8.066 0 0 1-1.719 2.552 8.083 8.083 0 0 1-2.546 1.719 7.77 7.77 0 0 1-3.104.625Z"/>\n      </symbol>\n      </svg>','\n      <svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="copied-icon" viewBox="0 0 24 24">\n        <path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.24 11.28L9.69 11.2c-.38-.39-.38-1.01 0-1.4.39-.39 1.02-.39 1.41 0l1.36 1.37 4.42-4.46c.39-.39 1.02-.39 1.41 0 .38.39.38 1.01 0 1.4l-5.13 5.17c-.37.4-1.01.4-1.4 0zM3 6c-.55 0-1 .45-1 1v13c0 1.1.9 2 2 2h13c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1-.45-1-1V7c0-.55-.45-1-1-1z" />\n      </symbol>\n      </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="copy-icon" viewBox="0 0 24 24">\n      <path d="M15 20H5V7c0-.55-.45-1-1-1s-1 .45-1 1v13c0 1.1.9 2 2 2h10c.55 0 1-.45 1-1s-.45-1-1-1zm5-4V4c0-1.1-.9-2-2-2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2zm-2 0H9V4h9v12z" />\n      +</symbol>\n      </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n        <symbol id="anchor-link-icon" viewBox="0 0 12 6">\n          <path d="M8.9176 0.083252H7.1676C6.84677 0.083252 6.58427 0.345752 6.58427 0.666585C6.58427 0.987419 6.84677 1.24992 7.1676 1.24992H8.9176C9.8801 1.24992 10.6676 2.03742 10.6676 2.99992C10.6676 3.96242 9.8801 4.74992 8.9176 4.74992H7.1676C6.84677 4.74992 6.58427 5.01242 6.58427 5.33325C6.58427 5.65409 6.84677 5.91659 7.1676 5.91659H8.9176C10.5276 5.91659 11.8343 4.60992 11.8343 2.99992C11.8343 1.38992 10.5276 0.083252 8.9176 0.083252ZM3.6676 2.99992C3.6676 3.32075 3.9301 3.58325 4.25094 3.58325H7.75094C8.07177 3.58325 8.33427 3.32075 8.33427 2.99992C8.33427 2.67909 8.07177 2.41659 7.75094 2.41659H4.25094C3.9301 2.41659 3.6676 2.67909 3.6676 2.99992ZM4.83427 4.74992H3.08427C2.12177 4.74992 1.33427 3.96242 1.33427 2.99992C1.33427 2.03742 2.12177 1.24992 3.08427 1.24992H4.83427C5.1551 1.24992 5.4176 0.987419 5.4176 0.666585C5.4176 0.345752 5.1551 0.083252 4.83427 0.083252H3.08427C1.47427 0.083252 0.167603 1.38992 0.167603 2.99992C0.167603 4.60992 1.47427 5.91659 3.08427 5.91659H4.83427C5.1551 5.91659 5.4176 5.65409 5.4176 5.33325C5.4176 5.01242 5.1551 4.74992 4.83427 4.74992Z" />\n        </symbol>\n    </svg>','<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">\n      <symbol id="comment-link-icon" viewBox="0 0 24 24">\n      <path d="M22.8481 4C22.8481 2.9 21.9481 2 20.8481 2H4.84814C3.74814 2 2.84814 2.9 2.84814 4V16C2.84814 17.1 3.74814 18 4.84814 18H18.8481L22.8481 22V4ZM16.8481 11H13.8481V14C13.8481 14.55 13.3981 15 12.8481 15C12.2981 15 11.8481 14.55 11.8481 14V11H8.84814C8.29814 11 7.84814 10.55 7.84814 10C7.84814 9.45 8.29814 9 8.84814 9H11.8481V6C11.8481 5.45 12.2981 5 12.8481 5C13.3981 5 13.8481 5.45 13.8481 6V9H16.8481C17.3981 9 17.8481 9.45 17.8481 10C17.8481 10.55 17.3981 11 16.8481 11Z" />\n      </symbol>\n      </svg>','<h1>Migration from v0.x to v1</h1><p class="description">Yeah, v1 has been released! Take advantage of 2 years worth of effort.</p>\n\n<h2 id="faq"><a href="#faq" class="title-link-to-anchor">FAQ<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="faq"><svg><use xlink:href="#comment-link-icon" /></svg></button></h2><h3 id="woah-the-api-is-way-different-does-that-mean-1-0-is-completely-different-ill-have-to-learn-the-basics-all-over-again-and-migrating-will-be-practically-impossible"><a href="#woah-the-api-is-way-different-does-that-mean-1-0-is-completely-different-ill-have-to-learn-the-basics-all-over-again-and-migrating-will-be-practically-impossible" class="title-link-to-anchor">Woah - the API is way different! Does that mean 1.0 is completely different, I&#39;ll have to learn the basics all over again, and migrating will be practically impossible?<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="woah-the-api-is-way-different-does-that-mean-1-0-is-completely-different-ill-have-to-learn-the-basics-all-over-again-and-migrating-will-be-practically-impossible"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>I&#39;m glad you asked! The answer is no. The core concepts haven&#39;t changed.\nYou will notice that the API provides more flexibility, but this has a cost –\nlower-level components that abstract less complexity.</p>\n<h3 id="what-motivated-such-a-large-change"><a href="#what-motivated-such-a-large-change" class="title-link-to-anchor">What motivated such a large change?<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="what-motivated-such-a-large-change"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>Material\xa0UI was started <a href="https://github.com/mui/material-ui/commit/28b768913b75752ecf9b6bb32766e27c241dbc46">4 years ago</a>.\nThe ecosystem has evolved a lot since then, we have also learned a lot.\n<a href="https://github.com/nathanmarks/">@nathanmarks</a> started an ambitious task, rebuilding Material\xa0UI from the <strong>ground-up</strong>\ntaking advantage of this knowledge to address long-standing issues. To name some of the major changes:</p>\n<ul>\n<li>New styling solution using CSS-in-JS (better <a href="/material-ui/customization/how-to-customize/">customization</a> power, better performance)</li>\n<li>New theme handling (nesting, self-supporting, etc.)</li>\n<li>Blazing fast documentation thanks to <a href="https://github.com/vercel/next.js">Next.js</a></li>\n<li>Way better <a href="/material-ui/guides/testing/">test coverage</a> (99%+, run on all the major browsers, <a href="https://app.argos-ci.com/mui/material-ui/builds">visual regression tests</a>)</li>\n<li>Full <a href="/material-ui/guides/server-rendering/">server-side rendering</a> support</li>\n<li>Wide range of <a href="/material-ui/getting-started/supported-platforms/">supported browsers</a></li>\n</ul>\n<h3 id="where-should-i-start-in-a-migration"><a href="#where-should-i-start-in-a-migration" class="title-link-to-anchor">Where should I start in a migration?<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="where-should-i-start-in-a-migration"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><ol>\n<li>Start by installing the v1.x version of Material\xa0UI along side the v0.x version.</li>\n</ol>\n<p>With yarn:</p>\n<div class="MuiCode-root"><pre><code class="language-bash"><span class="token function">yarn</span> <span class="token function">add</span> material-ui\n<span class="token function">yarn</span> <span class="token function">add</span> @material-ui/core\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<p>Or with npm:</p>\n<div class="MuiCode-root"><pre><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> material-ui\n<span class="token function">npm</span> <span class="token function">install</span> @material-ui/core\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<p>then</p>\n<div class="MuiCode-root"><pre><code class="language-js"><span class="token keyword">import</span> FlatButton <span class="token keyword">from</span> <span class="token string">\'material-ui/FlatButton\'</span><span class="token punctuation">;</span> <span class="token comment">// v0.x</span>\n<span class="token keyword">import</span> Button <span class="token keyword">from</span> <span class="token string">\'@material-ui/core/Button\'</span><span class="token punctuation">;</span> <span class="token comment">// v1.x</span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<ol start="2">\n<li>Run <a href="https://github.com/mui/material-ui/tree/master/packages/mui-codemod">the migration helper</a> on your project.</li>\n<li><code>MuiThemeProvider</code> is optional for v1.x., but if you have a custom theme, you are free to use v0.x and v1.x versions of the component at the same time, like this:</li>\n</ol>\n<div class="MuiCode-root"><pre><code class="language-jsx"><span class="token keyword">import</span> <span class="token operator">*</span> <span class="token keyword">as</span> React <span class="token keyword">from</span> <span class="token string">\'react\'</span><span class="token punctuation">;</span>\n<span class="token keyword">import</span> <span class="token punctuation">{</span> MuiThemeProvider<span class="token punctuation">,</span> createMuiTheme <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">\'@material-ui/core/styles\'</span><span class="token punctuation">;</span> <span class="token comment">// v1.x</span>\n<span class="token keyword">import</span> <span class="token punctuation">{</span> MuiThemeProvider <span class="token keyword">as</span> V0MuiThemeProvider <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">\'material-ui\'</span><span class="token punctuation">;</span>\n<span class="token keyword">import</span> getMuiTheme <span class="token keyword">from</span> <span class="token string">\'material-ui/styles/getMuiTheme\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">const</span> theme <span class="token operator">=</span> <span class="token function">createMuiTheme</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n  <span class="token comment">/* theme for v1.x */</span>\n<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token keyword">const</span> themeV0 <span class="token operator">=</span> <span class="token function">getMuiTheme</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n  <span class="token comment">/* theme for v0.x */</span>\n<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n<span class="token keyword">function</span> <span class="token function">App</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n  <span class="token keyword">return</span> <span class="token punctuation">(</span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">MuiThemeProvider</span></span> <span class="token attr-name">theme</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>theme<span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n      <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">V0MuiThemeProvider</span></span> <span class="token attr-name">muiTheme</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>themeV0<span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token punctuation">{</span><span class="token comment">/*Components*/</span><span class="token punctuation">}</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">V0MuiThemeProvider</span></span><span class="token punctuation">></span></span>\n    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span><span class="token class-name">MuiThemeProvider</span></span><span class="token punctuation">></span></span>\n  <span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token punctuation">}</span>\n\n<span class="token keyword">export</span> <span class="token keyword">default</span> App<span class="token punctuation">;</span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<ol start="4">\n<li>After that, you are free to migrate one component instance at the time.</li>\n</ol>\n<h2 id="components"><a href="#components" class="title-link-to-anchor">Components<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="components"><svg><use xlink:href="#comment-link-icon" /></svg></button></h2><h3 id="autocomplete"><a href="#autocomplete" class="title-link-to-anchor">Autocomplete<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="autocomplete"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>Material\xa0UI doesn&#39;t provide a high-level API for solving this problem.\nYou&#39;re encouraged you to explore <a href="/material-ui/react-autocomplete/">the solutions the React community has built</a>.</p>\n<p>In the future, we will look into providing a simple component to solve the simple use cases: <a href="https://github.com/mui/material-ui/issues/9997">#9997</a>.</p>\n<h3 id="svg-icon"><a href="#svg-icon" class="title-link-to-anchor">Svg Icon<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="svg-icon"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>Run <a href="https://github.com/mui/material-ui/tree/master/packages/mui-codemod">the migration helper</a> on your project.</p>\n<p>This will apply a change such as the following:</p>\n<div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import AddIcon from \'material-ui/svg-icons/Add\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import AddIcon from \'@mui/icons-material/Add\';\n</span></span>\n<span class="token unchanged"><span class="token prefix unchanged"> </span><span class="token line">&lt;AddIcon /></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="flat-button"><a href="#flat-button" class="title-link-to-anchor">Flat Button<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="flat-button"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import FlatButton from \'material-ui/FlatButton\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import Button from \'@material-ui/core/Button\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;FlatButton />\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;Button /></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="raised-button"><a href="#raised-button" class="title-link-to-anchor">Raised Button<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="raised-button"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>RaisedButton upgrade path:</p>\n<div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import RaisedButton from \'material-ui/RaisedButton\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import Button from \'@material-ui/core/Button\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;RaisedButton />\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;Button variant="contained" /></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="subheader"><a href="#subheader" class="title-link-to-anchor">Subheader<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="subheader"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import Subheader from \'material-ui/Subheader\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import ListSubheader from \'@material-ui/core/ListSubheader\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;Subheader>Sub Heading&lt;/Subheader>\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;ListSubheader>Sub Heading&lt;/ListSubheader></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="toggle"><a href="#toggle" class="title-link-to-anchor">Toggle<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="toggle"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import Toggle from \'material-ui/Toggle\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import Switch from \'@material-ui/core/Switch\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;Toggle\n</span><span class="token prefix deleted">-</span><span class="token line">  toggled={this.state.checkedA}\n</span><span class="token prefix deleted">-</span><span class="token line">  onToggle={this.handleToggle}\n</span><span class="token prefix deleted">-</span><span class="token line">/>\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;Switch\n</span><span class="token prefix inserted">+</span><span class="token line">  checked={this.state.checkedA}\n</span><span class="token prefix inserted">+</span><span class="token line">  onChange={this.handleSwitch}\n</span><span class="token prefix inserted">+</span><span class="token line">/></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="menu-item"><a href="#menu-item" class="title-link-to-anchor">Menu Item<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="menu-item"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import MenuItem from \'material-ui/MenuItem\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import MenuItem from \'@material-ui/core/MenuItem\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;MenuItem primaryText="Profile" />\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;MenuItem>Profile&lt;/MenuItem></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="font-icon"><a href="#font-icon" class="title-link-to-anchor">Font Icon<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="font-icon"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import FontIcon from \'material-ui/FontIcon\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import Icon from \'@material-ui/core/Icon\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;FontIcon>home&lt;/FontIcon>\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;Icon>home&lt;/Icon></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="circular-progress"><a href="#circular-progress" class="title-link-to-anchor">Circular Progress<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="circular-progress"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import CircularProgress from \'material-ui/CircularProgress\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import CircularProgress from \'@material-ui/core/CircularProgress\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;CircularProgress mode="indeterminate" />\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;CircularProgress variant="indeterminate" /></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="drop-down-menu"><a href="#drop-down-menu" class="title-link-to-anchor">Drop Down Menu<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="drop-down-menu"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><div class="MuiCode-root"><pre><code class="language-diff"><span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">import DropDownMenu from \'material-ui/DropDownMenu\';\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">import Select from \'@material-ui/core/Select\';\n</span></span>\n<span class="token deleted-sign deleted"><span class="token prefix deleted">-</span><span class="token line">&lt;DropDownMenu>&lt;/DropDownMenu>\n</span></span><span class="token inserted-sign inserted"><span class="token prefix inserted">+</span><span class="token line">&lt;Select value={this.state.value}>&lt;/Select></span></span>\n</code></pre><button data-ga-event-category="code" data-ga-event-action="copy-click" aria-label="Copy the code" class="MuiCode-copy"><span class="MuiCode-copy-label">Copy</span><span class="MuiCode-copied-label">Copied</span><span class="MuiCode-copyKeypress"><span>(or</span> $keyC<span>)</span></span></button></div>\n<h3 id="to-be-continued"><a href="#to-be-continued" class="title-link-to-anchor">To be continued…<span class="anchor-icon"><svg><use xlink:href="#anchor-link-icon" /></svg></span></a><button title="Post a comment" class="comment-link" data-feedback-hash="to-be-continued"><svg><use xlink:href="#comment-link-icon" /></svg></button></h3><p>Have you successfully migrated your app, and wish to help the community?\nThere is an open issue in order to finish this migration guide <a href="https://github.com/mui/material-ui/issues/7195">#7195</a>. Any pull request is welcomed \uD83D\uDE0A.</p>\n'],toc:[{text:"FAQ",level:2,hash:"faq",children:[{text:"Woah - the API is way different! Does that mean 1.0 is completely different, I&#39;ll have to learn the basics all over again, and migrating will be practically impossible?",level:3,hash:"woah-the-api-is-way-different-does-that-mean-1-0-is-completely-different-ill-have-to-learn-the-basics-all-over-again-and-migrating-will-be-practically-impossible"},{text:"What motivated such a large change?",level:3,hash:"what-motivated-such-a-large-change"},{text:"Where should I start in a migration?",level:3,hash:"where-should-i-start-in-a-migration"}]},{text:"Components",level:2,hash:"components",children:[{text:"Autocomplete",level:3,hash:"autocomplete"},{text:"Svg Icon",level:3,hash:"svg-icon"},{text:"Flat Button",level:3,hash:"flat-button"},{text:"Raised Button",level:3,hash:"raised-button"},{text:"Subheader",level:3,hash:"subheader"},{text:"Toggle",level:3,hash:"toggle"},{text:"Menu Item",level:3,hash:"menu-item"},{text:"Font Icon",level:3,hash:"font-icon"},{text:"Circular Progress",level:3,hash:"circular-progress"},{text:"Drop Down Menu",level:3,hash:"drop-down-menu"},{text:"To be continued…",level:3,hash:"to-be-continued"}]}],title:"Migration from v0.x to v1",headers:{components:[]}}},p={};p.scope={process:{},import:{}};var c={},r={},d=s(651);function u(){return(0,d.jsx)(i.Z,o()({},a))}},54300:function(n,e,s){"use strict";s.d(e,{Z:function(){return b}});var a,t=s(32970),o=s.n(t),i=s(92379),l=s(39519),p=s.n(l),c=s(72523),r=s(56991),d=s(92359),u=s(79267),h=s(3281),m=s(72270),k=s(10193),g=s(11516),f=s(2689),v=s(651);function y(n){var e=n.mode,s=(0,d.tv)().setMode;return i.useEffect(function(){s(e)},[e,s]),null}function b(n){var e=(0,r.Z)(),s=(0,c.useRouter)(),t=(0,m.ln)(s.asPath).canonicalAs,l=n.disableAd,p=void 0!==l&&l,b=n.disableToc,C=n.disableCssVarsProvider,x=n.demos,w=void 0===x?{}:x,M=n.docs,T=n.demoComponents,P=n.srcComponents,I=M[(0,g.fO)()]||M.en,A=t.startsWith("/joy-ui/")&&!(void 0!==C&&C),B=A?d.lL:i.Fragment,S=A?f.BrandingProvider:i.Fragment,H=o()({},A&&{mode:e.palette.mode});return(0,v.jsxs)(k.Z,{cardOptions:{description:I.headers.cardDescription,title:I.headers.cardTitle},description:I.description,disableAd:p,disableToc:void 0!==b&&b,location:I.location,title:I.title,toc:I.toc,children:[p?null:a||(a=(0,v.jsx)(f.BrandingProvider,{children:(0,v.jsx)(u.hw,{children:(0,v.jsx)(u.Ad,{})})})),(0,v.jsxs)(B,{children:[A&&(0,v.jsx)(y,{mode:e.palette.mode}),I.rendered.map(function(n,s){return(0,v.jsx)(h.Z,{demoComponents:T,demos:w,disableAd:p,localizedDoc:I,renderedMarkdownOrDemo:n,srcComponents:P,theme:e,WrapperComponent:S,wrapperProps:H},"demos-section-".concat(s))})]})]})}y.propTypes={mode:p().oneOf(["light","dark"])}},63454:function(n,e,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/material-ui/migration/migration-v0x",function(){return s(80651)}])},84835:function(n,e,s){"use strict";var a=s(11596);function t(){}function o(){}o.resetWarningCache=t,n.exports=function(){function n(n,e,s,t,o,i){if(i!==a){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return n}n.isRequired=n;var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:t};return s.PropTypes=s,s}},39519:function(n,e,s){n.exports=s(84835)()},11596:function(n){"use strict";n.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(n){n.O(0,[49774,21134,97146,18987,1406,17376,74866,15686,73119,73579,23075,7066,49277,99974,45769,44383,44846,90417,80295,8418,84294,31011,95490,73833,3281,92888,40179],function(){return n(n.s=63454)}),_N_E=n.O()}]);