forked from Templarian/MaterialDesign-React
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Icon.js.map
1 lines (1 loc) · 14.6 KB
/
Icon.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///./src/Stack.tsx","webpack:///./src/Icon.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","Stack","_a","_b","size","_c","color","_d","horizontal","_e","vertical","_f","rotate","_g","spin","_h","style","children","rest","__rest","anySpin","childrenWithProps","external_react_","map","child","childElement","props","scaledSize","inStack","width","__assign","viewBox","displayName","propTypes","external_prop_types_","isRequired","className","defaultProps","src_Stack","Icon","path","_j","Icon_rest","pathStyle","transform","push","height","fill","pathElement","Icon_assign","transformElement","length","join","transformOrigin","spinElement","spinSec","inverse","animation","Math","abs","__webpack_exports__"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cA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9BF,EACEhC,EAAA,mBAAGN,MAAO,CACNyC,UAAW,QAAOD,EAAU,WAAa,IAAE,WAAWE,KAAKC,IAAIJ,GAAQ,aACvEF,gBAAiB,WAElBH,IACE1C,GAAcE,GAAuB,IAAXE,IAC3BU,EAAA,sBAAMO,MAAM,KAAKiB,OAAO,KAAKC,KAAK,iBAK1C,OAAInB,EACK0B,EAGPhC,EAAA,oBAAA2B,EAAA,CACElB,QAAQ,YACRf,MAAOA,GACHE,IACFU,GAAWd,IACXN,GAAcE,EACVY,EAAA,2BAAQ,iEACRA,EAAA,2BAAQ,yDAEbgC,IAKPf,EAAKP,YAAc,OAEnBO,EAAKN,UAAY,CACfO,KAAMN,EAAA,OAAiBC,WACvB/B,KAAM8B,EAAA,UAAoB,CACxBA,EAAA,OACAA,EAAA,SAEF5B,MAAO4B,EAAA,OACP1B,WAAY0B,EAAA,KACZxB,SAAUwB,EAAA,KACVtB,OAAQsB,EAAA,OACRpB,KAAMoB,EAAA,UAAoB,CACxBA,EAAA,KACAA,EAAA,SAEFlB,MAAOkB,EAAA,OACPN,QAASM,EAAA,KACTE,UAAWF,EAAA,QAIbK,EAAKF,aAAe,CAClBjC,KAAM,KACNE,MAAO,KACPE,YAAY,EACZE,UAAU,EACVE,OAAQ,EACRE,MAAM,GAGO8C,EAAA","file":"Icon.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","import * as React from \"react\";\r\nimport { SFC, ValidationMap, ReactElement, CSSProperties } from \"react\";\r\nimport * as PropTypes from \"prop-types\";\r\nimport { StackProps } from './StackProps';\r\nimport { IconProps } from './IconProps';\r\n\r\nconst Stack: SFC<StackProps> = ({\r\n size = null,\r\n color = null,\r\n horizontal = null,\r\n vertical = null,\r\n rotate = null,\r\n spin = null,\r\n style = {} as CSSProperties,\r\n children,\r\n ...rest\r\n}) => {\r\n let anySpin = spin === null ? false : spin;\r\n const childrenWithProps = React.Children.map(children, (child) => {\r\n const childElement = child as ReactElement<IconProps>;\r\n if (anySpin !== true) {\r\n anySpin = (spin === null ? childElement.props.spin : spin) === true;\r\n }\r\n let scaledSize = childElement.props.size;\r\n if (typeof size === 'number' && typeof childElement.props.size === 'number') {\r\n scaledSize = childElement.props.size / size;\r\n }\r\n const props: Partial<IconProps> = {\r\n size: scaledSize,\r\n color: color === null ? childElement.props.color : color,\r\n horizontal: horizontal === null ? childElement.props.horizontal : horizontal,\r\n vertical: vertical === null ? childElement.props.vertical : vertical,\r\n rotate: rotate === null ? childElement.props.rotate : rotate,\r\n spin: spin === null ? childElement.props.spin : spin,\r\n inStack: true\r\n };\r\n return React.cloneElement(childElement, props);\r\n });\r\n if (size !== null) {\r\n style.width = typeof size === \"string\"\r\n ? size\r\n : `${size * 1.5}rem`;\r\n }\r\n return (\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n style={style}\r\n {...rest}>\r\n {anySpin && (\r\n <style>\r\n {\"@keyframes spin { to { transform: rotate(360deg) } }\"}\r\n {\"@keyframes spin-inverse { to { transform: rotate(-360deg) } }\"}\r\n </style>\r\n )}\r\n {childrenWithProps}\r\n </svg>\r\n );\r\n};\r\n\r\nStack.displayName = 'Stack';\r\n\r\nStack.propTypes = {\r\n size: PropTypes.oneOfType([\r\n PropTypes.number,\r\n PropTypes.string\r\n ]),\r\n color: PropTypes.string,\r\n horizontal: PropTypes.bool,\r\n vertical: PropTypes.bool,\r\n rotate: PropTypes.number,\r\n spin: PropTypes.oneOfType([\r\n PropTypes.bool,\r\n PropTypes.number\r\n ]),\r\n children: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.node),\r\n PropTypes.node\r\n ]).isRequired,\r\n className: PropTypes.string,\r\n style: PropTypes.object\r\n} as ValidationMap<StackProps>;\r\n\r\nStack.defaultProps = {\r\n size: null,\r\n color: null,\r\n horizontal: null,\r\n vertical: null,\r\n rotate: null,\r\n spin: null\r\n};\r\n\r\nexport default Stack;\r\n","import * as React from \"react\";\r\nimport { SFC, ValidationMap, CSSProperties } from \"react\";\r\nimport * as PropTypes from \"prop-types\";\r\nimport { IconProps } from './IconProps';\r\n\r\nexport { default as Stack } from './Stack';\r\n\r\nexport const Icon: SFC<IconProps> = ({\r\n path,\r\n size = null,\r\n color = null,\r\n horizontal = false,\r\n vertical = false,\r\n rotate = 0,\r\n spin = false,\r\n style = {} as CSSProperties,\r\n inStack = false,\r\n ...rest\r\n}) => {\r\n const pathStyle: any = {};\r\n const transform = [];\r\n if (size !== null) {\r\n if (inStack) {\r\n transform.push(`scale(${size})`);\r\n } else {\r\n style.width = typeof size === \"string\"\r\n ? size\r\n : `${size * 1.5}rem`;\r\n style.height = style.width;\r\n }\r\n }\r\n if (horizontal) {\r\n transform.push(\"scaleX(-1)\");\r\n }\r\n if (vertical) {\r\n transform.push(\"scaleY(-1)\");\r\n }\r\n if (rotate !== 0) {\r\n transform.push(`rotate(${rotate}deg)`);\r\n }\r\n if (color !== null) {\r\n pathStyle.fill = color;\r\n }\r\n let pathElement = (\r\n <path\r\n d={path}\r\n style={pathStyle}\r\n {...(inStack ? rest : {})} />\r\n );\r\n let transformElement = pathElement;\r\n if (transform.length > 0) {\r\n style.transform = transform.join(' ');\r\n style.transformOrigin = 'center';\r\n if (inStack) {\r\n transformElement = (\r\n <g style={style}>\r\n {pathElement}\r\n <rect width=\"24\" height=\"24\" fill=\"transparent\" />\r\n </g>\r\n )\r\n }\r\n }\r\n let spinElement = transformElement;\r\n if (spin) {\r\n const spinSec = spin === true || typeof spin !== 'number' ? 2 : spin;\r\n let inverse = !inStack && (horizontal || vertical);\r\n if (spinSec < 0) { inverse = !inverse }\r\n spinElement = (\r\n <g style={{\r\n animation: `spin${inverse ? '-inverse' : ''} linear ${Math.abs(spinSec)}s infinite`,\r\n transformOrigin: 'center'\r\n }}>\r\n {transformElement}\r\n {!(horizontal || vertical || rotate !== 0) && (\r\n <rect width=\"24\" height=\"24\" fill=\"transparent\" />\r\n )}\r\n </g>\r\n )\r\n }\r\n if (inStack) {\r\n return spinElement;\r\n }\r\n return (\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n style={style}\r\n {...rest}>\r\n {!inStack && spin && (\r\n horizontal || vertical\r\n ? <style>{\"@keyframes spin-inverse { to { transform: rotate(-360deg) } }\"}</style>\r\n : <style>{\"@keyframes spin { to { transform: rotate(360deg) } }\"}</style>\r\n )}\r\n {spinElement}\r\n </svg>\r\n );\r\n};\r\n\r\nIcon.displayName = 'Icon';\r\n\r\nIcon.propTypes = {\r\n path: PropTypes.string.isRequired,\r\n size: PropTypes.oneOfType([\r\n PropTypes.number,\r\n PropTypes.string\r\n ]),\r\n color: PropTypes.string,\r\n horizontal: PropTypes.bool,\r\n vertical: PropTypes.bool,\r\n rotate: PropTypes.number,\r\n spin: PropTypes.oneOfType([\r\n PropTypes.bool,\r\n PropTypes.number\r\n ]),\r\n style: PropTypes.object,\r\n inStack: PropTypes.bool,\r\n className: PropTypes.string\r\n} as ValidationMap<IconProps>;\r\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/28249\r\n\r\nIcon.defaultProps = {\r\n size: null,\r\n color: null,\r\n horizontal: false,\r\n vertical: false,\r\n rotate: 0,\r\n spin: false\r\n};\r\n\r\nexport default Icon;\r\n"],"sourceRoot":""}