PromoCursed/node_modules/.cache/babel-loader/a31157ab21ae9b281d3a89d00544036a4f5b0157b3c22832483e6fa2e36cf500.json

1 line
8.6 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport CheckOutlined from \"@ant-design/icons/es/icons/CheckOutlined\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport DownOutlined from \"@ant-design/icons/es/icons/DownOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport SearchOutlined from \"@ant-design/icons/es/icons/SearchOutlined\";\nimport { devUseWarning } from '../_util/warning';\nexport default function useIcons(_ref) {\n let {\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n hasFeedback,\n prefixCls,\n showSuffixIcon,\n feedbackIcon,\n showArrow,\n componentName\n } = _ref;\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning(componentName);\n warning.deprecated(!clearIcon, 'clearIcon', 'allowClear={{ clearIcon: React.ReactNode }}');\n }\n // Clear Icon\n const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /*#__PURE__*/React.createElement(CloseCircleFilled, null);\n // Validation Feedback Icon\n const getSuffixIconNode = arrowIcon => {\n if (suffixIcon === null && !hasFeedback && !showArrow) {\n return null;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, showSuffixIcon !== false && arrowIcon, hasFeedback && feedbackIcon);\n };\n // Arrow item icon\n let mergedSuffixIcon = null;\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = getSuffixIconNode(suffixIcon);\n } else if (loading) {\n mergedSuffixIcon = getSuffixIconNode( /*#__PURE__*/React.createElement(LoadingOutlined, {\n spin: true\n }));\n } else {\n const iconCls = `${prefixCls}-suffix`;\n mergedSuffixIcon = _ref2 => {\n let {\n open,\n showSearch\n } = _ref2;\n if (open && showSearch) {\n return getSuffixIconNode( /*#__PURE__*/React.createElement(SearchOutlined, {\n className: iconCls\n }));\n }\n return getSuffixIconNode( /*#__PURE__*/React.createElement(DownOutlined, {\n className: iconCls\n }));\n };\n }\n // Checked item icon\n let mergedItemIcon = null;\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon;\n } else if (multiple) {\n mergedItemIcon = /*#__PURE__*/React.createElement(CheckOutlined, null);\n } else {\n mergedItemIcon = null;\n }\n let mergedRemoveIcon = null;\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon;\n } else {\n mergedRemoveIcon = /*#__PURE__*/React.createElement(CloseOutlined, null);\n }\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon\n };\n}","map":{"version":3,"names":["React","CheckOutlined","CloseCircleFilled","CloseOutlined","DownOutlined","LoadingOutlined","SearchOutlined","devUseWarning","useIcons","_ref","suffixIcon","clearIcon","menuItemSelectedIcon","removeIcon","loading","multiple","hasFeedback","prefixCls","showSuffixIcon","feedbackIcon","showArrow","componentName","process","env","NODE_ENV","warning","deprecated","mergedClearIcon","createElement","getSuffixIconNode","arrowIcon","Fragment","mergedSuffixIcon","undefined","spin","iconCls","_ref2","open","showSearch","className","mergedItemIcon","mergedRemoveIcon","itemIcon"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/select/useIcons.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport CheckOutlined from \"@ant-design/icons/es/icons/CheckOutlined\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport DownOutlined from \"@ant-design/icons/es/icons/DownOutlined\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport SearchOutlined f