diff --git a/CHANGELOG.md b/CHANGELOG.md index 956b9f2..90b2339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2.1.3-next] - 2021-06-08 +## [2.1.5-next] - 2021-06-08 +### Fixed +- Fixed an issue with the Hide component having the wrong arguments + +## [2.1.4-next] - 2021-06-08 ### Changed - Update material-ui peer-dep to alpha.36 diff --git a/dist/index.js b/dist/index.js index df724a7..5047133 100644 --- a/dist/index.js +++ b/dist/index.js @@ -18,4 +18,4 @@ object-assign * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present * @website https://github.com/cssinjs/jss * @license MIT - */Re();function je(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const i=p({},t);return Object.keys(n).forEach(e=>{n[e]&&(i[e]=`${t[e]} ${n[e]}`)}),i}var Ee={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};var Be=r.createContext(null);var Ae="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const Ie=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var _e=Date.now(),Ne="fnValues"+_e,Te="fnStyle"+ ++_e,Me=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[Te]=t,r},onProcessStyle:function(e,t){if(Ne in t||Te in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Ne]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Te];o&&(i.style=o(e)||{});var s=i[Ne];if(s)for(var a in s)i.prop(a,s[a](e),r)}}},qe="@global",De=function(){function e(e,t,n){for(var r in this.type="global",this.at=qe,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new oe(p({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Le=function(){function e(e,t,n){this.type="global",this.at=qe,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,p({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ue=/\s*,\s*/g;function $e(e,t){for(var n=e.split(Ue),r="",i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1){var i=Vt[e];if(!Array.isArray(i))return mt+Rt(i)in t&>+i;if(!r)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o(o+=1,o);return(e,o)=>{const a=o.options.name;if(a&&0===a.indexOf("Mui")&&!o.options.link&&!t){if(-1!==Ie.indexOf(e.key))return"Mui-"+e.key;const t=`${i}${a}-${e.key}`;return o.options.theme[Ae]&&""===r?`${t}-${s()}`:t}return`${i}${n}${s()}`}}(),jss:ln,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},fn=r.createContext(cn);let dn=-1e9;function pn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function hn(e,t,n={clone:!0}){const r=n.clone?p({},e):e;return pn(e)&&pn(t)&&Object.keys(t).forEach(i=>{"__proto__"!==i&&(pn(t[i])&&i in e&&pn(e[i])?r[i]=hn(e[i],t[i],n):r[i]=t[i])}),r}function yn(e){if("string"!=typeof e)throw new Error(function(e){let t="https://material-ui.com/production-error/?code="+e;for(let e=1;e{let i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},s=n.components[r].variants||[],a=p({},i);return Object.keys(o).forEach(e=>{a[e]=hn(a[e]||{},o[e])}),s.forEach(e=>{const t=function(e){const{variant:t}=e,n=d(e,["variant"]);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?vn(r)?e[t]:yn(e[t]):`${vn(r)?t:yn(t)}${yn(e[t].toString())}`}),r}(e.props);a[t]=hn(a[t]||{},e.style)}),a},options:{}}}var gn={};function bn({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:i},o){if(n.disableGeneration)return;let s=Ee.get(n.sheetsManager,r,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(n.sheetsManager,r,t,s));const a=p({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});a.generateId=a.serverGenerateClassName||a.generateClassName;const u=n.sheetsRegistry;if(0===s.refs){let e;n.sheetsCache&&(e=Ee.get(n.sheetsCache,r,t));const o=r.create(t,i);e||(e=n.jss.createStyleSheet(o,p({link:!1},a)),e.attach(),n.sheetsCache&&Ee.set(n.sheetsCache,r,t,e)),u&&u.add(e),s.staticSheet=e,s.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var s=e(i);s&&(n||(n={}),n[r]=s)}}return n}(o)}if(s.dynamicStyles){const t=n.jss.createStyleSheet(s.dynamicStyles,p({link:!0},a));t.update(o),t.attach(),e.dynamicSheet=t,e.classes=je({baseClasses:s.staticSheet.classes,newClasses:t.classes}),u&&u.add(t)}else e.classes=s.staticSheet.classes;s.refs+=1}var xn=function(){return Object(f.useMediaQuery)((function(e){return e.breakpoints.down("md")}),{noSsr:!0})},wn=function(e){var t=e.mdUp,n=void 0!==t&&t,r=e.mdDown,i=void 0!==r&&r,o=e.children,s=xn();return n&&s||i&&!s?null:o};function Sn(){return(Sn=Object.assign||function(e){for(var t=1;t{const t=r.useContext(Be)||s,i=p({},r.useContext(fn),a),l=r.useRef(),c=r.useRef();!function(e,t){const n=r.useRef([]);let i;const o=r.useMemo(()=>({}),t);n.current!==o&&(n.current=o,i=e()),r.useEffect(()=>()=>{i&&i()},[o])}(()=>{const r={name:n,state:{},stylesCreator:u,stylesOptions:i,theme:t};return bn(r,e),c.current=!1,l.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const i=Ee.get(n.sheetsManager,r,t);i.refs-=1;const o=n.sheetsRegistry;0===i.refs&&(Ee.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(i.staticSheet),o&&o.remove(i.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}(r)}},[t,u]),r.useEffect(()=>{c.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(l.current,e),c.current=!0});return function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,i=!0),i&&(e.cacheClasses.value=je({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(l.current,e.classes,o)}}((function(e){return{root:{display:"block",width:"100%",marginLeft:"auto",marginRight:"auto"},cardContent:{paddingBottom:8,paddingRight:8},cardContentIconAppBar:{paddingLeft:16,paddingTop:16},cardContentIconAppBarMobile:{paddingLeft:16,paddingTop:24},cardContentIconNoAppBar:{paddingLeft:16,paddingTop:24},cardContentNoIconAppBar:{paddingLeft:24,paddingTop:8},cardContentNoIconNoAppBar:{paddingLeft:16,paddingTop:24},avatar:{height:40,width:40},flex:{flexGrow:1},buttons:{whiteSpace:"nowrap",alignSelf:"flex-end",paddingLeft:"90px !important"},label:{alignSelf:"center"}}}),{name:"MuiBanner"}),kn=i.a.forwardRef((function(e,t){var n=e.open,o=e.label,s=e.icon,a=e.iconProps,u=e.appBar,l=e.showDismissButton,d=e.dismissButtonLabel,p=e.dismissButtonProps,h=e.buttonOnClick,y=e.buttonLabel,v=e.buttonComponent,m=e.buttonProps,g=e.paperProps,b=e.cardProps,x=e.onClose,w=Pn(),S=xn(),P=Boolean(l||y),k=Object(r.useMemo)((function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:w.flex}),i.a.createElement(f.Grid,{item:!0,className:w.buttons},l&&i.a.createElement(f.Button,Sn({variant:"text",onClick:x},p),d),!!y&&i.a.createElement(f.Button,Sn({variant:"text",onClick:h,component:v},m),y)))}),[l,x,p,d,h,y,v,m]),O={};return u&&(O={component:f.Container,maxWidth:"lg"}),i.a.createElement(f.Collapse,{in:n,ref:t},i.a.createElement(f.Paper,Sn({elevation:0,className:w.root},g),i.a.createElement(f.Card,Sn({elevation:0},O,b),i.a.createElement(f.CardContent,{className:c()(w.cardContent,s&&u&&!S&&w.cardContentIconAppBar,s&&u&&S&&w.cardContentIconAppBarMobile,s&&!u&&w.cardContentIconNoAppBar,!s&&u&&w.cardContentNoIconAppBar,!s&&!u&&w.cardContentNoIconNoAppBar)},i.a.createElement(f.Grid,{container:!0,wrap:"nowrap",spacing:u?3:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-start"},s&&i.a.createElement(f.Grid,{item:!0},i.a.createElement(f.Avatar,Sn({className:w.avatar,sx:{bgcolor:"primary.main"}},a),s)),i.a.createElement(f.Grid,{item:!0,className:w.label},i.a.createElement(f.Typography,{variant:"body2"},o)),i.a.createElement(wn,{mdDown:!0},u&&P&&k))),!u&&P&&i.a.createElement(wn,{mdDown:!0},i.a.createElement(f.CardActions,null,k)),P&&i.a.createElement(wn,{mdUp:!0},i.a.createElement(f.CardActions,null,k)),i.a.createElement(wn,{mdDown:!0},i.a.createElement("div",null))),i.a.createElement(f.Divider,null)))}));kn.propTypes={open:u.a.bool.isRequired,label:u.a.string.isRequired,buttonLabel:u.a.string,buttonOnClick:u.a.func,buttonComponent:u.a.any,buttonProps:u.a.object,showDismissButton:u.a.bool,dismissButtonLabel:u.a.string,dismissButtonProps:u.a.object,onClose:u.a.func,icon:u.a.element,iconProps:u.a.object,appBar:u.a.bool,paperProps:u.a.object,cardProps:u.a.object},kn.defaultProps={open:!0,buttonOnClick:function(){},showDismissButton:!0,dismissButtonLabel:"Dismiss",dismissButtonProps:{},appBar:!1,buttonComponent:f.ButtonBase,buttonProps:{},iconProps:{},paperProps:{},cardProps:{}},kn.displayName="MuiBanner";var On=kn;function Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(){return(Rn=Object.assign||function(e){for(var t=1;t{n[e]&&(i[e]=`${t[e]} ${n[e]}`)}),i}var Ee={set:(e,t,n,r)=>{let i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};var Be=r.createContext(null);var Ae="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const Ie=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var _e=Date.now(),Ne="fnValues"+_e,Te="fnStyle"+ ++_e,Me=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[Te]=t,r},onProcessStyle:function(e,t){if(Ne in t||Te in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Ne]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Te];o&&(i.style=o(e)||{});var s=i[Ne];if(s)for(var a in s)i.prop(a,s[a](e),r)}}},qe="@global",De=function(){function e(e,t,n){for(var r in this.type="global",this.at=qe,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new oe(p({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Le=function(){function e(e,t,n){this.type="global",this.at=qe,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr("@global ".length);this.rule=n.jss.createRule(r,t,p({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ue=/\s*,\s*/g;function $e(e,t){for(var n=e.split(Ue),r="",i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1){var i=Vt[e];if(!Array.isArray(i))return mt+Rt(i)in t&>+i;if(!r)return!1;for(var o=0;ot?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o(o+=1,o);return(e,o)=>{const a=o.options.name;if(a&&0===a.indexOf("Mui")&&!o.options.link&&!t){if(-1!==Ie.indexOf(e.key))return"Mui-"+e.key;const t=`${i}${a}-${e.key}`;return o.options.theme[Ae]&&""===r?`${t}-${s()}`:t}return`${i}${n}${s()}`}}(),jss:ln,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},fn=r.createContext(cn);let dn=-1e9;function pn(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function hn(e,t,n={clone:!0}){const r=n.clone?p({},e):e;return pn(e)&&pn(t)&&Object.keys(t).forEach(i=>{"__proto__"!==i&&(pn(t[i])&&i in e&&pn(e[i])?r[i]=hn(e[i],t[i],n):r[i]=t[i])}),r}function yn(e){if("string"!=typeof e)throw new Error(function(e){let t="https://material-ui.com/production-error/?code="+e;for(let e=1;e{let i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return i;const o=n.components[r].styleOverrides||{},s=n.components[r].variants||[],a=p({},i);return Object.keys(o).forEach(e=>{a[e]=hn(a[e]||{},o[e])}),s.forEach(e=>{const t=function(e){const{variant:t}=e,n=d(e,["variant"]);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?vn(r)?e[t]:yn(e[t]):`${vn(r)?t:yn(t)}${yn(e[t].toString())}`}),r}(e.props);a[t]=hn(a[t]||{},e.style)}),a},options:{}}}var gn={};function bn({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:i},o){if(n.disableGeneration)return;let s=Ee.get(n.sheetsManager,r,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(n.sheetsManager,r,t,s));const a=p({},r.options,n,{theme:t,flip:"boolean"==typeof n.flip?n.flip:"rtl"===t.direction});a.generateId=a.serverGenerateClassName||a.generateClassName;const u=n.sheetsRegistry;if(0===s.refs){let e;n.sheetsCache&&(e=Ee.get(n.sheetsCache,r,t));const o=r.create(t,i);e||(e=n.jss.createStyleSheet(o,p({link:!1},a)),e.attach(),n.sheetsCache&&Ee.set(n.sheetsCache,r,t,e)),u&&u.add(e),s.staticSheet=e,s.dynamicStyles=function e(t){var n=null;for(var r in t){var i=t[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var s=e(i);s&&(n||(n={}),n[r]=s)}}return n}(o)}if(s.dynamicStyles){const t=n.jss.createStyleSheet(s.dynamicStyles,p({link:!0},a));t.update(o),t.attach(),e.dynamicSheet=t,e.classes=je({baseClasses:s.staticSheet.classes,newClasses:t.classes}),u&&u.add(t)}else e.classes=s.staticSheet.classes;s.refs+=1}var xn=function(){return Object(f.useMediaQuery)((function(e){return e.breakpoints.down("md")}),{noSsr:!0})},wn=function(e){var t=e.mdUp,n=void 0!==t&&t,r=e.mdDown,i=void 0!==r&&r,o=e.children,s=xn();return n&&!s||i&&s?null:o};function Sn(){return(Sn=Object.assign||function(e){for(var t=1;t{const t=r.useContext(Be)||s,i=p({},r.useContext(fn),a),l=r.useRef(),c=r.useRef();!function(e,t){const n=r.useRef([]);let i;const o=r.useMemo(()=>({}),t);n.current!==o&&(n.current=o,i=e()),r.useEffect(()=>()=>{i&&i()},[o])}(()=>{const r={name:n,state:{},stylesCreator:u,stylesOptions:i,theme:t};return bn(r,e),c.current=!1,l.current=r,()=>{!function({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const i=Ee.get(n.sheetsManager,r,t);i.refs-=1;const o=n.sheetsRegistry;0===i.refs&&(Ee.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(i.staticSheet),o&&o.remove(i.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}(r)}},[t,u]),r.useEffect(()=>{c.current&&function({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}(l.current,e),c.current=!0});return function({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let i=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,i=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,i=!0),i&&(e.cacheClasses.value=je({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}(l.current,e.classes,o)}}((function(e){return{root:{display:"block",width:"100%",marginLeft:"auto",marginRight:"auto"},cardContent:{paddingBottom:8,paddingRight:8},cardContentIconAppBar:{paddingLeft:16,paddingTop:16},cardContentIconAppBarMobile:{paddingLeft:16,paddingTop:24},cardContentIconNoAppBar:{paddingLeft:16,paddingTop:24},cardContentNoIconAppBar:{paddingLeft:24,paddingTop:8},cardContentNoIconNoAppBar:{paddingLeft:16,paddingTop:24},avatar:{height:40,width:40},flex:{flexGrow:1},buttons:{whiteSpace:"nowrap",alignSelf:"flex-end",paddingLeft:"90px !important"},label:{alignSelf:"center"}}}),{name:"MuiBanner"}),kn=i.a.forwardRef((function(e,t){var n=e.open,o=e.label,s=e.icon,a=e.iconProps,u=e.appBar,l=e.showDismissButton,d=e.dismissButtonLabel,p=e.dismissButtonProps,h=e.buttonOnClick,y=e.buttonLabel,v=e.buttonComponent,m=e.buttonProps,g=e.paperProps,b=e.cardProps,x=e.onClose,w=Pn(),S=xn(),P=Boolean(l||y),k=Object(r.useMemo)((function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{className:w.flex}),i.a.createElement(f.Grid,{item:!0,className:w.buttons},l&&i.a.createElement(f.Button,Sn({variant:"text",onClick:x},p),d),!!y&&i.a.createElement(f.Button,Sn({variant:"text",onClick:h,component:v},m),y)))}),[l,x,p,d,h,y,v,m]),O={};return u&&(O={component:f.Container,maxWidth:"lg"}),i.a.createElement(f.Collapse,{in:n,ref:t},i.a.createElement(f.Paper,Sn({elevation:0,className:w.root},g),i.a.createElement(f.Card,Sn({elevation:0},O,b),i.a.createElement(f.CardContent,{className:c()(w.cardContent,s&&u&&!S&&w.cardContentIconAppBar,s&&u&&S&&w.cardContentIconAppBarMobile,s&&!u&&w.cardContentIconNoAppBar,!s&&u&&w.cardContentNoIconAppBar,!s&&!u&&w.cardContentNoIconNoAppBar)},i.a.createElement(f.Grid,{container:!0,wrap:"nowrap",spacing:u?3:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-start"},s&&i.a.createElement(f.Grid,{item:!0},i.a.createElement(f.Avatar,Sn({className:w.avatar,sx:{bgcolor:"primary.main"}},a),s)),i.a.createElement(f.Grid,{item:!0,className:w.label},i.a.createElement(f.Typography,{variant:"body2"},o)),i.a.createElement(wn,{mdDown:!0},u&&P&&k))),!u&&P&&i.a.createElement(wn,{mdDown:!0},i.a.createElement(f.CardActions,null,k)),P&&i.a.createElement(wn,{mdUp:!0},i.a.createElement(f.CardActions,null,k)),i.a.createElement(wn,{mdDown:!0},i.a.createElement("div",null))),i.a.createElement(f.Divider,null)))}));kn.propTypes={open:u.a.bool.isRequired,label:u.a.string.isRequired,buttonLabel:u.a.string,buttonOnClick:u.a.func,buttonComponent:u.a.any,buttonProps:u.a.object,showDismissButton:u.a.bool,dismissButtonLabel:u.a.string,dismissButtonProps:u.a.object,onClose:u.a.func,icon:u.a.element,iconProps:u.a.object,appBar:u.a.bool,paperProps:u.a.object,cardProps:u.a.object},kn.defaultProps={open:!0,buttonOnClick:function(){},showDismissButton:!0,dismissButtonLabel:"Dismiss",dismissButtonProps:{},appBar:!1,buttonComponent:f.ButtonBase,buttonProps:{},iconProps:{},paperProps:{},cardProps:{}},kn.displayName="MuiBanner";var On=kn;function Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(){return(Rn=Object.assign||function(e){for(var t=1;t useMediaQuery((theme) => theme.breakpoints.down export const Hide = ({ mdUp = false, mdDown = false, children }) => { const isMobile = useIsMobile(); - if (mdUp && isMobile) { + if (mdUp && !isMobile) { return null; } - if (mdDown && !isMobile) { + if (mdDown && isMobile) { return null; }