1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
|
{"ast":null,"code":"\"use client\";\n\nimport React, { forwardRef } from 'react';\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport IconWrapper from './IconWrapper';\nconst InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n style,\n iconClassName\n } = props;\n const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);\n return /*#__PURE__*/React.createElement(IconWrapper, {\n prefixCls: prefixCls,\n className: mergedIconCls,\n style: style,\n ref: ref\n }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: iconClassName\n }));\n});\nconst getCollapsedWidth = () => ({\n width: 0,\n opacity: 0,\n transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n width: node.scrollWidth,\n opacity: 1,\n transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n const {\n prefixCls,\n loading,\n existIcon,\n className,\n style\n } = props;\n const visible = !!loading;\n if (existIcon) {\n return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: style\n });\n }\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n // We do not really use this motionName\n motionName: `${prefixCls}-loading-icon-motion`,\n motionLeave: visible,\n removeOnLeave: true,\n onAppearStart: getCollapsedWidth,\n onAppearActive: getRealWidth,\n onEnterStart: getCollapsedWidth,\n onEnterActive: getRealWidth,\n onLeaveStart: getRealWidth,\n onLeaveActive: getCollapsedWidth\n }, (_ref, ref) => {\n let {\n className: motionCls,\n style: motionStyle\n } = _ref;\n return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: Object.assign(Object.assign({}, style), motionStyle),\n ref: ref,\n iconClassName: motionCls\n });\n });\n};\nexport default LoadingIcon;","map":{"version":3,"names":["React","forwardRef","LoadingOutlined","classNames","CSSMotion","IconWrapper","InnerLoadingIcon","props","ref","prefixCls","className","style","iconClassName","mergedIconCls","createElement","getCollapsedWidth","width","opacity","transform","getRealWidth","node","scrollWidth","LoadingIcon","loading","existIcon","visible","motionName","motionLeave","removeOnLeave","onAppearStart","onAppearActive","onEnterStart","onEnterActive","onLeaveStart","onLeaveActive","_ref","motionCls","motionStyle","Object","assign"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/button/LoadingIcon.js"],"sourcesContent":["\"use client\";\n\nimport React, { forwardRef } from 'react';\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport IconWrapper from './IconWrapper';\nconst InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n style,\n iconClassName\n } = props;\n const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);\n return /*#__PURE__*/React.createElement(IconWrapper, {\n prefixCls: prefixCls,\n className: mergedIconCls,\n style: style,\n ref: ref\n }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: iconClassName\n }));\n});\nconst getCollapsedWidth = () => ({\n width: 0,\n opacity: 0,\n transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n width: node.scrollWidth,\n opacity: 1,\n transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n const {\n prefixCls,\n loading,\n existIcon,\n className,\n style\n } = props;\n const visible = !!loading;\n if (existIcon) {\n return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: style\n });\n }\n return /*#__PU
|