130b9f002b2f4d98ef8437bad7470f91.json
7.23 KB
{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport ReactIcon from './IconBase';\nimport { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';\nimport { normalizeTwoToneColors } from '../utils'; // Initial setting\n// should move it to antd main repo?\n\nsetTwoToneColor('#1890ff');\nvar Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var className = props.className,\n icon = props.icon,\n spin = props.spin,\n rotate = props.rotate,\n tabIndex = props.tabIndex,\n onClick = props.onClick,\n twoToneColor = props.twoToneColor,\n restProps = _objectWithoutProperties(props, [\"className\", \"icon\", \"spin\", \"rotate\", \"tabIndex\", \"onClick\", \"twoToneColor\"]);\n\n var classString = classNames('anticon', _defineProperty({}, \"anticon-\".concat(icon.name), Boolean(icon.name)), {\n 'anticon-spin': !!spin || icon.name === 'loading'\n }, className);\n var iconTabIndex = tabIndex;\n\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1;\n }\n\n var svgStyle = rotate ? {\n msTransform: \"rotate(\".concat(rotate, \"deg)\"),\n transform: \"rotate(\".concat(rotate, \"deg)\")\n } : undefined;\n\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n\n return /*#__PURE__*/React.createElement(\"span\", Object.assign({\n role: \"img\",\n \"aria-label\": icon.name\n }, restProps, {\n ref: ref,\n tabIndex: iconTabIndex,\n onClick: onClick,\n className: classString\n }), /*#__PURE__*/React.createElement(ReactIcon, {\n icon: icon,\n primaryColor: primaryColor,\n secondaryColor: secondaryColor,\n style: svgStyle\n }));\n});\nIcon.displayName = 'AntdIcon';\nIcon.getTwoToneColor = getTwoToneColor;\nIcon.setTwoToneColor = setTwoToneColor;\nexport default Icon;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/icons/es/components/AntdIcon.js"],"names":["_slicedToArray","_defineProperty","_objectWithoutProperties","React","classNames","ReactIcon","getTwoToneColor","setTwoToneColor","normalizeTwoToneColors","Icon","forwardRef","props","ref","className","icon","spin","rotate","tabIndex","onClick","twoToneColor","restProps","classString","concat","name","Boolean","iconTabIndex","undefined","svgStyle","msTransform","transform","_normalizeTwoToneColo","_normalizeTwoToneColo2","primaryColor","secondaryColor","createElement","Object","assign","role","style","displayName"],"mappings":"AAAA,OAAOA,cAAP,MAA2B,0CAA3B;AACA,OAAOC,eAAP,MAA4B,2CAA5B;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,eAAT,EAA0BC,eAA1B,QAAiD,uBAAjD;AACA,SAASC,sBAAT,QAAuC,UAAvC,C,CAAmD;AACnD;;AAEAD,eAAe,CAAC,SAAD,CAAf;AACA,IAAIE,IAAI,GAAG,aAAaN,KAAK,CAACO,UAAN,CAAiB,UAAUC,KAAV,EAAiBC,GAAjB,EAAsB;AAC7D,MAAIC,SAAS,GAAGF,KAAK,CAACE,SAAtB;AAAA,MACIC,IAAI,GAAGH,KAAK,CAACG,IADjB;AAAA,MAEIC,IAAI,GAAGJ,KAAK,CAACI,IAFjB;AAAA,MAGIC,MAAM,GAAGL,KAAK,CAACK,MAHnB;AAAA,MAIIC,QAAQ,GAAGN,KAAK,CAACM,QAJrB;AAAA,MAKIC,OAAO,GAAGP,KAAK,CAACO,OALpB;AAAA,MAMIC,YAAY,GAAGR,KAAK,CAACQ,YANzB;AAAA,MAOIC,SAAS,GAAGlB,wBAAw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AAA,QAAQ,EAAEQ,YAFE;AAGZP,IAAAA,OAAO,EAAEA,OAHG;AAIZL,IAAAA,SAAS,EAAEQ;AAJC,GAHkC,CAA5B,EAQhB,aAAalB,KAAK,CAAC+B,aAAN,CAAoB7B,SAApB,EAA+B;AAC9CS,IAAAA,IAAI,EAAEA,IADwC;AAE9CkB,IAAAA,YAAY,EAAEA,YAFgC;AAG9CC,IAAAA,cAAc,EAAEA,cAH8B;AAI9CK,IAAAA,KAAK,EAAEX;AAJuC,GAA/B,CARG,CAApB;AAcD,CA3CuB,CAAxB;AA4CAlB,IAAI,CAAC8B,WAAL,GAAmB,UAAnB;AACA9B,IAAI,CAACH,eAAL,GAAuBA,eAAvB;AACAG,IAAI,CAACF,eAAL,GAAuBA,eAAvB;AACA,eAAeE,IAAf","sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport ReactIcon from './IconBase';\nimport { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';\nimport { normalizeTwoToneColors } from '../utils'; // Initial setting\n// should move it to antd main repo?\n\nsetTwoToneColor('#1890ff');\nvar Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var className = props.className,\n icon = props.icon,\n spin = props.spin,\n rotate = props.rotate,\n tabIndex = props.tabIndex,\n onClick = props.onClick,\n twoToneColor = props.twoToneColor,\n restProps = _objectWithoutProperties(props, [\"className\", \"icon\", \"spin\", \"rotate\", \"tabIndex\", \"onClick\", \"twoToneColor\"]);\n\n var classString = classNames('anticon', _defineProperty({}, \"anticon-\".concat(icon.name), Boolean(icon.name)), {\n 'anticon-spin': !!spin || icon.name === 'loading'\n }, className);\n var iconTabIndex = tabIndex;\n\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1;\n }\n\n var svgStyle = rotate ? {\n msTransform: \"rotate(\".concat(rotate, \"deg)\"),\n transform: \"rotate(\".concat(rotate, \"deg)\")\n } : undefined;\n\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n\n return /*#__PURE__*/React.createElement(\"span\", Object.assign({\n role: \"img\",\n \"aria-label\": icon.name\n }, restProps, {\n ref: ref,\n tabIndex: iconTabIndex,\n onClick: onClick,\n className: classString\n }), /*#__PURE__*/React.createElement(ReactIcon, {\n icon: icon,\n primaryColor: primaryColor,\n secondaryColor: secondaryColor,\n style: svgStyle\n }));\n});\nIcon.displayName = 'AntdIcon';\nIcon.getTwoToneColor = getTwoToneColor;\nIcon.setTwoToneColor = setTwoToneColor;\nexport default Icon;"]},"metadata":{},"sourceType":"module"}