1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
{"ast":null,"code":"import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nimport * as React from 'react';\nimport { generate, getSecondaryColor, isIconDefinition, warning, useInsertStyles } from \"../utils\";\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return _objectSpread({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var svgRef = React.useRef();\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || getSecondaryColor(primaryColor)\n };\n }\n useInsertStyles(svgRef);\n warning(isIconDefinition(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!isIconDefinition(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = _objectSpread(_objectSpread({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return generate(target.icon, \"svg-\".concat(target.name), _objectSpread(_objectSpread({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps), {}, {\n ref: svgRef\n }));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nexport default IconBase;","map":{"version":3,"names":["_objectWithoutProperties","_objectSpread","_excluded","React","generate","getSecondaryColor","isIconDefinition","warning","useInsertStyles","twoToneColorPalette","primaryColor","secondaryColor","calculated","setTwoToneColors","_ref","getTwoToneColors","IconBase","props","icon","className","onClick","style","restProps","svgRef","useRef","colors","concat","target","name","width","height","fill","ref","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/@ant-design/icons/es/components/IconBase.js"],"sourcesContent":["import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nimport * as React from 'react';\nimport { generate, getSecondaryColor, isIconDefinition, warning, useInsertStyles } from \"../utils\";\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return _objectSpread({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var svgRef = React.useRef();\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || getSecondaryColor(primaryColor)\n };\n }\n useInsertStyles(svgRef);\n warning(isIconDefinition(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!isIconDefinition(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = _objectSpread(_objectSpread({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return generate(target.icon, \"svg-\".concat(target.name), _objectSpread(_objectSpread({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps), {}, {\n ref: svgRef\n }));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nexport default IconBase;"],"mappings":"AAAA,OAAOA,wBAAwB,MAAM,oDAAoD;AACzF,OAAOC,aAAa,MAAM,0CAA0C;AACpE,IAAIC,SAAS,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,CAAC;AAC3F,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,OAAO,EAAEC,eAAe,QAAQ,UAAU;AAClG,IAAIC,mBAAmB,GAAG;EACxBC,YAAY,EAAE,MAAM;EACpBC,cAAc,EAAE,SAAS;EACzBC,UAAU,EAAE;AACd,CAAC;AACD,SAASC,gBAAgBA,CAACC,IAAI,EAAE;EAC9B,IAAIJ,YAAY,GAAGI,IAAI,CAACJ,YAAY;IAClCC,cAAc,GAAGG,IAAI,CAACH,cAAc;EACtCF,mBAAmB,CAACC,YAAY,GAAGA,YAAY;EAC/CD,mBAAmB,CAACE,cAAc,GAAGA,cAAc,IAAIN,iBAAiB,CAACK,YAAY,CAAC;EACtFD,mBAAmB,CAACG,UAAU,GAAG,CAAC,CAACD,cAAc;AACnD;AACA,SAASI,gBAAgBA,CAAA,EAAG;EAC1B,OAAOd,aAAa,CAAC,CAAC,CAAC,EAAEQ,mBAAmB,CAAC;AAC/C;AACA,IAAIO,QAAQ,GAAG,SAASA,QAAQA,CAACC,K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