-
Notifications
You must be signed in to change notification settings - Fork 20
/
Icon.js.map
1 lines (1 loc) · 16.5 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","ref","title","description","size","color","horizontal","vertical","rotate","spin","style","children","ariaLabelledby","anySpin","childrenWithProps","map","child","childElement","props","scaledSize","inStack","width","role","labelledById","describedById","Error","viewBox","rest","id","displayName","propTypes","isRequired","className","defaultProps","idCounter","Icon","path","pathStyle","transform","push","height","fill","pathElement","transformElement","length","join","transformOrigin","spinElement","spinSec","inverse","animation","Math","abs"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EA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C5DwC,GAAW7B,IAAYd,GAAcC,GAezC,GAdIyC,EAAU,IAAKC,GAAWA,GAC1BxC,IACFsC,EACE,qBAAGrC,MAAO,CACNwC,UAAW,QAAOD,EAAU,WAAa,IAAE,WAAWE,KAAKC,IAAIJ,GAAQ,aACvEF,gBAAiB,WAElBH,IACErC,GAAcC,GAAuB,IAAXC,IAC3B,wBAAMa,MAAM,KAAKmB,OAAO,KAAKC,KAAK,kBAKtCrB,EACF,OAAO2B,EAGT,IAEIzB,EAFAC,EAAe,mBAAmBK,EAClCJ,EAAgB,oBAAoBI,EAExC,GAAI1B,EACFU,EAAiBT,EACVoB,EAAY,IAAIC,EACnBD,OAGJ,GADAD,EAAO,eACHnB,EACF,MAAM,IAAIsB,MAAM,oDAGpB,OACE,yBACExB,IAAKA,EACLyB,QAAQ,YACRhB,MAAOA,EACPY,KAAMA,EAAI,kBACOV,GACbe,GACHzB,GAAS,yBAAO0B,GAAIL,GAAerB,GACnCC,GAAe,wBAAMyB,GAAIJ,GAAgBrB,IACxCiB,GAAWX,IACXwC,EACI,6BAAQ,kGACR,6BAAQ,0FAEbF,MAKPZ,EAAKN,YAAc,OAEnBM,EAAKL,UAAY,CACfM,KAAM,SAAiBL,WACvB3B,KAAM,YAAoB,CACxB,SACA,WAEFC,MAAO,SACPC,WAAY,OACZC,SAAU,OACVC,OAAQ,SACRC,KAAM,YAAoB,CACxB,OACA,WAEFC,MAAO,SACPU,QAAS,OACTY,UAAW,UAIbG,EAAKF,aAAe,CAClB7B,KAAM,KACNC,MAAO,eACPC,YAAY,EACZC,UAAU,EACVC,OAAQ,EACRC,MAAM,GAGO","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 { FunctionComponent, 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\nlet id = 0;\r\n\r\nconst Stack: FunctionComponent<StackProps> = React.forwardRef<SVGSVGElement, StackProps>(({\r\n title = null,\r\n description = null,\r\n size = null,\r\n color = 'currentColor',\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}, ref) => {\r\n id++;\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 let ariaLabelledby;\r\n let labelledById = `stack_labelledby_${id}`;\r\n let describedById = `stack_describedby_${id}`;\r\n let role;\r\n if (title) {\r\n ariaLabelledby = description\r\n ? `${labelledById} ${describedById}`\r\n : labelledById;\r\n } else {\r\n role = 'presentation';\r\n if (description) {\r\n throw new Error(\"title attribute required when description is set\");\r\n }\r\n }\r\n return (\r\n <svg\r\n ref={ref}\r\n viewBox=\"0 0 24 24\"\r\n style={style}\r\n role={role}\r\n aria-labelledby={ariaLabelledby}\r\n {...rest}>\r\n {title && <title id={labelledById}>{title}</title>}\r\n {description && <desc id={describedById}>{description}</desc>}\r\n {anySpin && (\r\n <style>\r\n {\"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }\"}\r\n {\"@keyframes spin-inverse { from { transform: rotate(0deg) } 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 { FunctionComponent, 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\nlet idCounter = 0;\r\n\r\nexport const Icon: FunctionComponent<IconProps> = React.forwardRef<SVGSVGElement, IconProps>(({\r\n path,\r\n id = ++idCounter,\r\n title = null,\r\n description = null,\r\n size = null,\r\n color = 'currentColor',\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}, ref) => {\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 : {}) as any} />\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 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 if (spin) {\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 let ariaLabelledby;\r\n let labelledById = `icon_labelledby_${id}`;\r\n let describedById = `icon_describedby_${id}`;\r\n let role;\r\n if (title) {\r\n ariaLabelledby = description\r\n ? `${labelledById} ${describedById}`\r\n : labelledById;\r\n } else {\r\n role = 'presentation';\r\n if (description) {\r\n throw new Error(\"title attribute required when description is set\");\r\n }\r\n }\r\n return (\r\n <svg\r\n ref={ref}\r\n viewBox=\"0 0 24 24\"\r\n style={style}\r\n role={role}\r\n aria-labelledby={ariaLabelledby}\r\n {...rest}>\r\n {title && <title id={labelledById}>{title}</title>}\r\n {description && <desc id={describedById}>{description}</desc>}\r\n {!inStack && spin && (\r\n inverse\r\n ? <style>{\"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }\"}</style>\r\n : <style>{\"@keyframes spin { from { transform: rotate(0deg) } 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: 'currentColor',\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":""}