PromoCursed/node_modules/.cache/babel-loader/81f9d3ccd320ae1e3ee0ed73e727360e84fe39311d240707ab696e571e6da873.json

1 line
14 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport { Notice } from 'rc-notification';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport useStyle from './style';\nimport PurePanelStyle from './style/pure-panel';\nexport const TypeIcon = {\n info: /*#__PURE__*/React.createElement(InfoCircleFilled, null),\n success: /*#__PURE__*/React.createElement(CheckCircleFilled, null),\n error: /*#__PURE__*/React.createElement(CloseCircleFilled, null),\n warning: /*#__PURE__*/React.createElement(ExclamationCircleFilled, null),\n loading: /*#__PURE__*/React.createElement(LoadingOutlined, null)\n};\nexport function getCloseIcon(prefixCls, closeIcon) {\n if (closeIcon === null || closeIcon === false) {\n return null;\n }\n return closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n });\n}\nconst typeToIcon = {\n success: CheckCircleFilled,\n info: InfoCircleFilled,\n error: CloseCircleFilled,\n warning: ExclamationCircleFilled\n};\nexport const PureContent = props => {\n const {\n prefixCls,\n icon,\n type,\n message,\n description,\n btn,\n role = 'alert'\n } = props;\n let iconNode = null;\n if (icon) {\n iconNode = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-icon`\n }, icon);\n } else if (type) {\n iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {\n className: classNames(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)\n });\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames({\n [`${prefixCls}-with-icon`]: iconNode\n }),\n role: role\n }, iconNode, /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-message`\n }, message), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-description`\n }, description), btn && /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-btn`\n }, btn));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n icon,\n type,\n message,\n description,\n btn,\n closable = true,\n closeIcon,\n className: notificationClassName\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"icon\", \"type\", \"message\", \"description\", \"btn\", \"closable\", \"closeIcon\", \"className\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('notification');\n const noticePrefixCls = `${prefixCls}-notice`;\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${noticePrefixCls}-pure-panel`, hashId, className, cssVarCls, rootCls)\n }, /*#__PURE__*/React.createElement(PurePanelStyle, {\n prefi