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/Аришина)/Desktop/promo/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 /*#__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;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,eAAe,MAAM,4CAA4C;AACxE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,WAAW;AACjC,OAAOC,WAAW,MAAM,eAAe;AACvC,MAAMC,gBAAgB,GAAG,aAAaL,UAAU,CAAC,CAACM,KAAK,EAAEC,GAAG,KAAK;EAC/D,MAAM;IACJC,SAAS;IACTC,SAAS;IACTC,KAAK;IACLC;EACF,CAAC,GAAGL,KAAK;EACT,MAAMM,aAAa,GAAGV,UAAU,CAAC,GAAGM,SAAS,eAAe,EAAEC,SAAS,CAAC;EACxE,OAAO,aAAaV,KAAK,CAACc,aAAa,CAACT,WAAW,EAAE;IACnDI,SAAS,EAAEA,SAAS;IACpBC,SAAS,EAAEG,aAAa;IACxBF,KAAK,EAAEA,KAAK;IACZH,GAAG,EAAEA;EACP,CAAC,EAAE,aAAaR,KAAK,CAACc,aAAa,CAACZ,eAAe,EAAE;IACnDQ,SAAS,EAAEE;EACb,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AACF,MAAMG,iBAAiB,GAAGA,CAAA,MAAO;EAC/BC,KAAK,EAAE,CAAC;EACRC,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE;AACb,CAAC,CAAC;AACF,MAAMC,YAAY,GAAGC,IAAI,KAAK;EAC5BJ,KAAK,EAAEI,IAAI,CAACC,WAAW;EACvBJ,OAAO,EAAE,CAAC;EACVC,SAAS,EAAE;AACb,CAAC,CAAC;AACF,MAAMI,WAAW,GAAGf,KAAK,IAAI;EAC3B,MAAM;IACJE,SAAS;IACTc,OAAO;IAC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