Socket
Socket
Sign inDemoInstall

@material/react-fab

Package Overview
Dependencies
Maintainers
13
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/react-fab - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

39

dist/index.min.js

@@ -1,1 +0,38 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("prop-types"),require("classnames"),require("@material/ripple"));else if("function"==typeof define&&define.amd)define(["react","prop-types","classnames","@material/ripple"],t);else{var n="object"==typeof exports?t(require("react"),require("prop-types"),require("classnames"),require("@material/ripple")):t(e.react,e["prop-types"],e.classnames,e["@material/ripple"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}("undefined"!=typeof self?self:this,function(e,t,n,o){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Fab=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(0),p=o(l),f=n(1),d=o(f),y=n(2),h=o(y),b=n(4),m=o(b),v=t.Fab=function(e){function t(){var e,n,o,r;a(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=o=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),o.state={classList:new Set},o.addIconClassToAllChildren=function(){return p.default.Children.map(o.props.children,function(e){var t=e.props.className+" mdc-fab__icon",n=Object.assign({},e.props,{className:t});return p.default.cloneElement(e,n)})},r=n,i(o,r)}return u(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=(e.children,e.className,e.unbounded,e.mini,e.initRipple),n=r(e,["children","className","unbounded","mini","initRipple"]);return p.default.createElement("button",s({className:this.classes,ref:t},n),this.addIconClassToAllChildren())}},{key:"classes",get:function(){var e=this.state.classList,t=this.props,n=t.mini,o=t.className;return(0,h.default)("mdc-fab",Array.from(e),o,{"mdc-fab--mini":n})}}]),t}(p.default.Component);v.propTypes={mini:d.default.bool,className:d.default.string,children:d.default.oneOfType([d.default.arrayOf(d.default.element),d.default.element]).isRequired,initRipple:d.default.func},v.defaultProps={mini:!1,className:"",initRipple:function(){}},t.default=(0,m.default)(v)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(0),l=o(c),p=n(1),f=o(p),d=n(2),y=o(d),h=n(5),b=function(e){var t=function(t){function n(){var e,t,o,r;a(this,n);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return t=o=i(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(s))),o.foundation_=null,o.state={classList:new Set,style:{}},o.initializeFoundation_=function(e){var t=o.createAdapter_(e);o.foundation_=new h.MDCRippleFoundation(t),o.foundation_.init()},o.createAdapter_=function(e){var t=h.util.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return h.util.supportsCssVariables(window)},isUnbounded:function(){return o.props.unbounded},isSurfaceActive:function(){return e[t](":active")},isSurfaceDisabled:function(){return o.props.disabled},addClass:function(e){return o.setState({classList:o.state.classList.add(e)})},removeClass:function(e){var t=o.state.classList;t.delete(e),o.setState({classList:t})},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,h.util.applyPassive())},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,h.util.applyPassive())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},updateCssVariable:o.updateCssVariable,computeBoundingRect:function(){return e.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}},o.handleMouseDown=function(e){o.props.onMouseDown(e),o.activateRipple(e)},o.handleMouseUp=function(e){o.props.onMouseUp(e),o.deactivateRipple(e)},o.handleTouchStart=function(e){o.props.onTouchStart(e),o.activateRipple(e)},o.handleTouchEnd=function(e){o.props.onTouchEnd(e),o.deactivateRipple(e)},o.handleKeyDown=function(e){o.props.onKeyDown(e),o.activateRipple(e)},o.handleKeyUp=function(e){o.props.onKeyUp(e),o.deactivateRipple(e)},o.activateRipple=function(e){e.persist(),requestAnimationFrame(function(){o.foundation_.activate(e)})},o.deactivateRipple=function(e){o.foundation_.deactivate(e)},o.updateCssVariable=function(e,t){var n=Object.assign({},o.state.style);n[e]=t,o.setState({style:n})},o.getMergedStyles=function(){var e=o.props.style,t=o.state.style;return Object.assign({},t,e)},r=t,i(o,r)}return u(n,t),s(n,[{key:"componentDidMount",value:function(){if(!this.foundation_)throw new Error("You must call initRipple from the element's ref prop to initialize the adapter for withRipple")}},{key:"componentWillUnmount",value:function(){this.foundation_&&this.foundation_.destroy()}},{key:"render",value:function(){var t=this.props,n=(t.unbounded,t.style,t.className,t.onMouseDown,t.onMouseUp,t.onTouchStart,t.onTouchEnd,t.onKeyDown,t.onKeyUp,r(t,["unbounded","style","className","onMouseDown","onMouseUp","onTouchStart","onTouchEnd","onKeyDown","onKeyUp"])),o=Object.assign(n,{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,initRipple:this.initializeFoundation_,className:this.classes,style:this.getMergedStyles()});return l.default.createElement(e,o)}},{key:"classes",get:function(){var e=this.props.className,t=this.state.classList;return(0,y.default)(Array.from(t),e)}}]),n}(c.Component);return e.propTypes=Object.assign({unbounded:f.default.bool,disabled:f.default.bool,style:f.default.object,className:f.default.string,onMouseDown:f.default.func,onMouseUp:f.default.func,onTouchStart:f.default.func,onTouchEnd:f.default.func,onKeyDown:f.default.func,onKeyUp:f.default.func},e.propTypes),e.defaultProps=Object.assign({unbounded:!1,disabled:!1,style:{},className:"",onMouseDown:function(){},onMouseUp:function(){},onTouchStart:function(){},onTouchEnd:function(){},onKeyDown:function(){},onKeyUp:function(){}},e.defaultProps),t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,t};t.default=b},function(e,t){e.exports=o}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("prop-types"),require("classnames"));else if("function"==typeof define&&define.amd)define(["react","prop-types","classnames"],t);else{var n="object"==typeof exports?t(require("react"),require("prop-types"),require("classnames")):t(e.react,e["prop-types"],e.classnames);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}("undefined"!=typeof self?self:this,function(e,t,n){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Fab=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(0),d=i(l),f=n(1),p=i(f),v=n(2),h=i(v),_=n(4),y=i(_),m=t.Fab=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),c(t,[{key:"renderIcon",value:function(){var e=this.props.icon;if(e){var t={className:(0,h.default)("mdc-fab__icon",e.props.className)};return d.default.cloneElement(e,t)}}},{key:"renderTextLabel",value:function(){var e=this.props.textLabel;if(0!==e.length)return d.default.createElement("span",{className:"mdc-fab__label"},e)}},{key:"render",value:function(){var e=this.props,t=(e.className,e.unbounded,e.mini,e.textLabel,e.initRipple),n=r(e,["className","unbounded","mini","textLabel","initRipple"]);return d.default.createElement("button",s({className:this.classes,ref:t},n),this.renderIcon(),this.renderTextLabel())}},{key:"classes",get:function(){var e=this.props,t=e.mini,n=e.textLabel,i=e.className,r=n.length>0;return(0,h.default)("mdc-fab",i,{"mdc-fab--mini":t,"mdc-fab--extended":r})}}]),t}(d.default.Component);m.propTypes={mini:p.default.bool,icon:p.default.element,textLabel:p.default.string,className:p.default.string,initRipple:p.default.func},m.defaultProps={mini:!1,icon:null,textLabel:"",className:"",initRipple:function(){}},t.default=(0,y.default)(m)},function(e,t,n){"use strict";(function(e){var i,r,o,a="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};!function(u,s){if("object"===a(t)&&"object"===a(e))e.exports=s(n(0),n(1),n(2));else{r=[n(0),n(1),n(2)],i=s,void 0!==(o="function"==typeof i?i.apply(t,r):i)&&(e.exports=o)}}("undefined"!=typeof self&&self,function(e,t,n){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),l=n(1),d=i(l),f=n(2),p=i(f),v=n(3),h=i(v),_=n(4),y=function(e){var t=function(t){function n(){var e,t,i,r;o(this,n);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return t=i=u(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(s))),i.foundation_=null,i.isMounted_=!0,i.state={classList:new Set,style:{}},i.initializeFoundation_=function(e){var t=i.createAdapter_(e);i.foundation_=new _.MDCRippleFoundation(t),i.foundation_.init()},i.createAdapter_=function(e){var t=_.util.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return _.util.supportsCssVariables(window)},isUnbounded:function(){return i.props.unbounded},isSurfaceActive:function(){return e[t](":active")},isSurfaceDisabled:function(){return i.props.disabled},addClass:function(e){i.isMounted_&&i.setState({classList:i.state.classList.add(e)})},removeClass:function(e){if(i.isMounted_){var t=i.state.classList;t.delete(e),i.setState({classList:t})}},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,_.util.applyPassive())},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,_.util.applyPassive())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},updateCssVariable:i.updateCssVariable,computeBoundingRect:i.props.computeBoundingRect?function(){return i.props.computeBoundingRect(e)}:function(){return e.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}},i.handleFocus=function(e){i.props.onFocus(e),i.foundation_.handleFocus()},i.handleBlur=function(e){i.props.onBlur(e),i.foundation_.handleBlur()},i.handleMouseDown=function(e){i.props.onMouseDown(e),i.activateRipple(e)},i.handleMouseUp=function(e){i.props.onMouseUp(e),i.deactivateRipple(e)},i.handleTouchStart=function(e){i.props.onTouchStart(e),i.activateRipple(e)},i.handleTouchEnd=function(e){i.props.onTouchEnd(e),i.deactivateRipple(e)},i.handleKeyDown=function(e){i.props.onKeyDown(e),i.activateRipple(e)},i.handleKeyUp=function(e){i.props.onKeyUp(e),i.deactivateRipple(e)},i.activateRipple=function(e){e.persist(),requestAnimationFrame(function(){i.foundation_.activate(e)})},i.deactivateRipple=function(e){i.foundation_.deactivate(e)},i.updateCssVariable=function(e,t){if(i.isMounted_){var n=Object.assign({},i.state.style);n[e]=t,i.setState({style:n})}},i.getMergedStyles=function(){var e=i.props.style,t=i.state.style;return Object.assign({},t,e)},r=t,u(i,r)}return s(n,t),c(n,[{key:"componentDidMount",value:function(){if(!this.foundation_)throw new Error("You must call initRipple from the element's ref prop to initialize the adapter for withRipple")}},{key:"componentWillUnmount",value:function(){this.foundation_&&(this.isMounted_=!1,this.foundation_.destroy())}},{key:"render",value:function(){var t=this.props,n=(t.unbounded,t.style,t.className,t.onMouseDown,t.onMouseUp,t.onTouchStart,t.onTouchEnd,t.onKeyDown,t.onKeyUp,t.onFocus,t.onBlur,r(t,["unbounded","style","className","onMouseDown","onMouseUp","onTouchStart","onTouchEnd","onKeyDown","onKeyUp","onFocus","onBlur"])),i=Object.assign(n,{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleFocus,onBlur:this.handleBlur,initRipple:this.initializeFoundation_,className:this.classes,style:this.getMergedStyles()});return d.default.createElement(e,i)}},{key:"classes",get:function(){var e=this.props.className,t=this.state.classList;return(0,h.default)(Array.from(t),e)}}]),n}(l.Component);return e.propTypes=Object.assign({unbounded:p.default.bool,disabled:p.default.bool,style:p.default.object,className:p.default.string,onMouseDown:p.default.func,onMouseUp:p.default.func,onTouchStart:p.default.func,onTouchEnd:p.default.func,onKeyDown:p.default.func,onKeyUp:p.default.func,onFocus:p.default.func,onBlur:p.default.func},e.propTypes),e.defaultProps=Object.assign({unbounded:!1,disabled:!1,style:{},className:"",onMouseDown:function(){},onMouseUp:function(){},onTouchStart:function(){},onTouchEnd:function(){},onKeyDown:function(){},onKeyUp:function(){},onFocus:function(){},onBlur:function(){}},e.defaultProps),t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,t};t.default=y},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){(function(e){var n,i,r,o="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":a(e)};/*!
Material Components for the Web
Copyright (c) 2018 Google Inc.
License: Apache-2.0
*/
!function(a,u){"object"===o(t)&&"object"===o(e)?e.exports=u():(i=[],n=u,void 0!==(r="function"==typeof n?n.apply(t,i):n)&&(e.exports=r))}(0,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.adapter_=t}return r(e,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),r(e,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),e}();t.a=o},function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;i(this,e),this.root_=t;for(var r=arguments.length,o=Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];this.initialize.apply(this,o),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return o(e,null,[{key:"attachTo",value:function(t){return new e(t,new r.a)}}]),o(e,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(e,t){this.root_.addEventListener(e,t)}},{key:"unlisten",value:function(e,t){this.root_.removeEventListener(e,t)}},{key:"emit",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=void 0;"function"==typeof CustomEvent?i=new CustomEvent(e,{detail:t,bubbles:n}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,n,!1,t)),this.root_.dispatchEvent(i)}}]),e}();t.a=a},function(e,t,n){function i(e){var t=e.document,n=t.createElement("div");n.className="mdc-ripple-surface--test-edge-var-bug",t.body.appendChild(n);var i=e.getComputedStyle(n),r=null!==i&&"solid"===i.borderTopStyle;return n.remove(),r}function r(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=s;if("boolean"==typeof s&&!t)return n;if(e.CSS&&"function"==typeof e.CSS.supports){var r=e.CSS.supports("--css-vars","yes"),o=e.CSS.supports("(--css-vars: yes)")&&e.CSS.supports("color","#00000000");return n=!(!r&&!o||i(e)),t||(s=n),n}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===c||t){var n=!1;try{e.document.addEventListener("test",null,{get passive(){n=!0}})}catch(e){}c=n}return!!c&&{passive:!0}}function a(e){return["webkitMatchesSelector","msMatchesSelector","matches"].filter(function(t){return t in e}).pop()}function u(e,t,n){var i=t.x,r=t.y,o=i+n.left,a=r+n.top,u=void 0,s=void 0;return"touchstart"===e.type?(u=e.changedTouches[0].pageX-o,s=e.changedTouches[0].pageY-a):(u=e.pageX-o,s=e.pageY-a),{x:u,y:s}}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"supportsCssVariables",function(){return r}),n.d(t,"applyPassive",function(){return o}),n.d(t,"getMatchesProperty",function(){return a}),n.d(t,"getNormalizedEventCoords",function(){return u});/**
* @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var s=void 0,c=void 0},function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){function e(){i(this,e)}r(e,[{key:"browserSupportsCssVars",value:function(){}},{key:"isUnbounded",value:function(){}},{key:"isSurfaceActive",value:function(){}},{key:"isSurfaceDisabled",value:function(){}},{key:"addClass",value:function(e){}},{key:"removeClass",value:function(e){}},{key:"containsEventTarget",value:function(e){}},{key:"registerInteractionHandler",value:function(e,t){}},{key:"deregisterInteractionHandler",value:function(e,t){}},{key:"registerDocumentInteractionHandler",value:function(e,t){}},{key:"deregisterDocumentInteractionHandler",value:function(e,t){}},{key:"registerResizeHandler",value:function(e){}},{key:"deregisterResizeHandler",value:function(e){}},{key:"updateCssVariable",value:function(e,t){}},{key:"computeBoundingRect",value:function(){}},{key:"getWindowPageOffset",value:function(){}}])}()},function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"MDCRipple",function(){return d}),n.d(t,"RippleCapableSurface",function(){return f});var u=n(1),s=(n(3),n(5)),c=n(2);n.d(t,"MDCRippleFoundation",function(){return s.a}),n.d(t,"util",function(){return c});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),d=function(e){function t(){var e;i(this,t);for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];var u=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o)));return u.disabled=!1,u.unbounded_,u}return a(t,e),l(t,[{key:"setUnbounded_",value:function(){this.foundation_.setUnbounded(this.unbounded_)}},{key:"activate",value:function(){this.foundation_.activate()}},{key:"deactivate",value:function(){this.foundation_.deactivate()}},{key:"layout",value:function(){this.foundation_.layout()}},{key:"getDefaultFoundation",value:function(){return new s.a(t.createAdapter(this))}},{key:"initialSyncWithDOM",value:function(){this.unbounded="mdcRippleIsUnbounded"in this.root_.dataset}},{key:"unbounded",get:function(){return this.unbounded_},set:function(e){this.unbounded_=Boolean(e),this.setUnbounded_()}}],[{key:"attachTo",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isUnbounded,r=void 0===i?void 0:i,o=new t(e);return void 0!==r&&(o.unbounded=r),o}},{key:"createAdapter",value:function(e){var t=c.getMatchesProperty(HTMLElement.prototype);return{browserSupportsCssVars:function(){return c.supportsCssVariables(window)},isUnbounded:function(){return e.unbounded},isSurfaceActive:function(){return e.root_[t](":active")},isSurfaceDisabled:function(){return e.disabled},addClass:function(t){return e.root_.classList.add(t)},removeClass:function(t){return e.root_.classList.remove(t)},containsEventTarget:function(t){return e.root_.contains(t)},registerInteractionHandler:function(t,n){return e.root_.addEventListener(t,n,c.applyPassive())},deregisterInteractionHandler:function(t,n){return e.root_.removeEventListener(t,n,c.applyPassive())},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,c.applyPassive())},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,c.applyPassive())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},updateCssVariable:function(t,n){return e.root_.style.setProperty(t,n)},computeBoundingRect:function(){return e.root_.getBoundingClientRect()},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}}}}}]),t}(u.a),f=function e(){i(this,e)};f.prototype.root_,f.prototype.unbounded,f.prototype.disabled},function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":o(t))&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=n(0),s=(n(3),n(6)),c=n(2),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),f=["touchstart","pointerdown","mousedown","keydown"],p=["touchend","pointerup","mouseup"],v=[],h=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l(t.defaultAdapter,e)));return n.layoutFrame_=0,n.frame_={width:0,height:0},n.activationState_=n.defaultActivationState_(),n.initialSize_=0,n.maxRadius_=0,n.activateHandler_=function(e){return n.activate_(e)},n.deactivateHandler_=function(e){return n.deactivate_(e)},n.focusHandler_=function(){return n.handleFocus()},n.blurHandler_=function(){return n.handleBlur()},n.resizeHandler_=function(){return n.layout()},n.unboundedCoords_={left:0,top:0},n.fgScale_=0,n.activationTimer_=0,n.fgDeactivationRemovalTimer_=0,n.activationAnimationHasEnded_=!1,n.activationTimerCallback_=function(){n.activationAnimationHasEnded_=!0,n.runDeactivationUXLogicIfReady_()},n.previousActivationEvent_=null,n}return a(t,e),d(t,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.c}},{key:"numbers",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return{browserSupportsCssVars:function(){},isUnbounded:function(){},isSurfaceActive:function(){},isSurfaceDisabled:function(){},addClass:function(){},removeClass:function(){},containsEventTarget:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDocumentInteractionHandler:function(){},deregisterDocumentInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},updateCssVariable:function(){},computeBoundingRect:function(){},getWindowPageOffset:function(){}}}}]),d(t,[{key:"isSupported_",value:function(){return this.adapter_.browserSupportsCssVars()}},{key:"defaultActivationState_",value:function(){return{isActivated:!1,hasDeactivationUXRun:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1,activationEvent:null,isProgrammatic:!1}}},{key:"init",value:function(){var e=this;if(this.isSupported_()){this.registerRootHandlers_();var n=t.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){e.adapter_.addClass(i),e.adapter_.isUnbounded()&&(e.adapter_.addClass(r),e.layoutInternal_())})}}},{key:"destroy",value:function(){var e=this;if(this.isSupported_()){if(this.activationTimer_){clearTimeout(this.activationTimer_),this.activationTimer_=0;var n=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(n)}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_();var i=t.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){e.adapter_.removeClass(r),e.adapter_.removeClass(o),e.removeCssVars_()})}}},{key:"registerRootHandlers_",value:function(){var e=this;f.forEach(function(t){e.adapter_.registerInteractionHandler(t,e.activateHandler_)}),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.registerResizeHandler(this.resizeHandler_)}},{key:"registerDeactivationHandlers_",value:function(e){var t=this;"keydown"===e.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):p.forEach(function(e){t.adapter_.registerDocumentInteractionHandler(e,t.deactivateHandler_)})}},{key:"deregisterRootHandlers_",value:function(){var e=this;f.forEach(function(t){e.adapter_.deregisterInteractionHandler(t,e.activateHandler_)}),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.isUnbounded()&&this.adapter_.deregisterResizeHandler(this.resizeHandler_)}},{key:"deregisterDeactivationHandlers_",value:function(){var e=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),p.forEach(function(t){e.adapter_.deregisterDocumentInteractionHandler(t,e.deactivateHandler_)})}},{key:"removeCssVars_",value:function(){var e=this,n=t.strings;Object.keys(n).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter_.updateCssVariable(n[t],null)})}},{key:"activate_",value:function(e){var t=this;if(!this.adapter_.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&e&&i.type!==e.type)){n.isActivated=!0,n.isProgrammatic=null===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type);if(e&&v.length>0&&v.some(function(e){return t.adapter_.containsEventTarget(e)}))return void this.resetActivationState_();e&&(v.push(e.target),this.registerDeactivationHandlers_(e)),n.wasElementMadeActive=this.checkElementMadeActive_(e),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){v=[],n.wasElementMadeActive||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive_(e),n.wasElementMadeActive&&t.animateActivation_()),n.wasElementMadeActive||(t.activationState_=t.defaultActivationState_())})}}}}},{key:"checkElementMadeActive_",value:function(e){return!e||"keydown"!==e.type||this.adapter_.isSurfaceActive()}},{key:"activate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activate_(e)}},{key:"animateActivation_",value:function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,o=t.cssClasses,a=o.FG_DEACTIVATION,u=o.FG_ACTIVATION,s=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var c="",l="";if(!this.adapter_.isUnbounded()){var d=this.getFgTranslationCoordinates_(),f=d.startPoint,p=d.endPoint;c=f.x+"px, "+f.y+"px",l=p.x+"px, "+p.y+"px"}this.adapter_.updateCssVariable(i,c),this.adapter_.updateCssVariable(r,l),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(u),this.activationTimer_=setTimeout(function(){return e.activationTimerCallback_()},s)}},{key:"getFgTranslationCoordinates_",value:function(){var e=this.activationState_,t=e.activationEvent,n=e.wasActivatedByPointer,i=void 0;return i=n?Object(c.getNormalizedEventCoords)(t,this.adapter_.getWindowPageOffset(),this.adapter_.computeBoundingRect()):{x:this.frame_.width/2,y:this.frame_.height/2},i={x:i.x-this.initialSize_/2,y:i.y-this.initialSize_/2},{startPoint:i,endPoint:{x:this.frame_.width/2-this.initialSize_/2,y:this.frame_.height/2-this.initialSize_/2}}}},{key:"runDeactivationUXLogicIfReady_",value:function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&this.activationAnimationHasEnded_&&(this.rmBoundedActivationClasses_(),this.adapter_.addClass(n),this.fgDeactivationRemovalTimer_=setTimeout(function(){e.adapter_.removeClass(n)},s.b.FG_DEACTIVATION_MS))}},{key:"rmBoundedActivationClasses_",value:function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(e),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()}},{key:"resetActivationState_",value:function(){var e=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return e.previousActivationEvent_=null},t.numbers.TAP_DELAY_MS)}},{key:"deactivate_",value:function(e){var t=this,n=this.activationState_;if(n.isActivated){var i=l({},n);if(n.isProgrammatic){requestAnimationFrame(function(){return t.animateDeactivation_(null,i)}),this.resetActivationState_()}else this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(e,i),t.resetActivationState_()})}}},{key:"deactivate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.deactivate_(e)}},{key:"animateDeactivation_",value:function(e,t){var n=t.wasActivatedByPointer,i=t.wasElementMadeActive;(n||i)&&this.runDeactivationUXLogicIfReady_()}},{key:"layout",value:function(){var e=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){e.layoutInternal_(),e.layoutFrame_=0})}},{key:"layoutInternal_",value:function(){var e=this;this.frame_=this.adapter_.computeBoundingRect();var n=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?n:function(){return Math.sqrt(Math.pow(e.frame_.width,2)+Math.pow(e.frame_.height,2))+t.numbers.PADDING}(),this.initialSize_=n*t.numbers.INITIAL_ORIGIN_SCALE,this.fgScale_=this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()}},{key:"updateLayoutCssVars_",value:function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,r=e.VAR_TOP,o=e.VAR_FG_SCALE;this.adapter_.updateCssVariable(n,this.initialSize_+"px"),this.adapter_.updateCssVariable(o,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(r,this.unboundedCoords_.top+"px"))}},{key:"setUnbounded",value:function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter_.addClass(n):this.adapter_.removeClass(n)}},{key:"handleFocus",value:function(){var e=this;requestAnimationFrame(function(){return e.adapter_.addClass(t.cssClasses.BG_FOCUSED)})}},{key:"handleBlur",value:function(){var e=this;requestAnimationFrame(function(){return e.adapter_.removeClass(t.cssClasses.BG_FOCUSED)})}}]),t}(u.a);t.a=h},function(e,t,n){n.d(t,"a",function(){return i}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return o});/**
* @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var i={ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded",BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation"},r={VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end"},o={PADDING:10,INITIAL_ORIGIN_SCALE:.6,DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,TAP_DELAY_MS:300}}])})}).call(t,n(5)(e))},function(e,t,n){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}])})}).call(t,n(5)(e))},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}])});

6

package.json
{
"name": "@material/react-fab",
"version": "0.3.0",
"version": "0.4.0",
"description": "Material Components React Floating Action Button (FAB)",

@@ -19,4 +19,4 @@ "license": "Apache-2.0",

"dependencies": {
"@material/fab": "^0.36.0",
"@material/react-ripple": "^0.3.0",
"@material/fab": "^0.37.0",
"@material/react-ripple": "^0.4.0",
"classnames": "^2.2.5",

@@ -23,0 +23,0 @@ "prop-types": "^15.6.1",

@@ -13,2 +13,14 @@ # React Floating Action Button

### Styles
with Sass:
```js
import '@material/react-fab/index.scss';
```
with CSS:
```js
import '@material/react-fab/dist/fab.css';
```
### JSX Structure

@@ -19,23 +31,15 @@

```html
<Fab>
<span className="material-icons">favorite</span>
</Fab>
<Fab icon={<span className="material-icons">favorite</span>}/>
<Fab>
<i className="material-icons">favorite</i>
</Fab>
<Fab icon={<i className="material-icons">favorite</i>}/>
<Fab>
<Fab icon={
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24">
...
</svg>
</Fab>
}/>
<Fab>
<img className="material-icons" src="/images/ic_button_24px.svg"/>
</Fab>
<Fab icon={<img className="material-icons" src="/images/ic_button_24px.svg"/>}/>
<Fab>
<MaterialIcon icon="favorite"/>
</Fab>
<Fab icon={<MaterialIcon icon="favorite"/>}/>
```

@@ -49,2 +53,4 @@

mini | n/a | Enables the mini variant.
icon | Element | The icon.
textLabel | String | The label, which makes the FAB extended.

@@ -51,0 +57,0 @@ ## Sass Mixins

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc