1 line
16 KiB
JSON
1 line
16 KiB
JSON
{"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 classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { isPresetColor, isPresetStatusColor } from '../_util/colors';\nimport useClosable, { pickClosable } from '../_util/hooks/useClosable';\nimport { replaceElement } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport CheckableTag from './CheckableTag';\nimport useStyle from './style';\nimport PresetCmp from './style/presetCmp';\nimport StatusCmp from './style/statusCmp';\nconst InternalTag = /*#__PURE__*/React.forwardRef((tagProps, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n children,\n icon,\n color,\n onClose,\n bordered = true,\n visible: deprecatedVisible\n } = tagProps,\n props = __rest(tagProps, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"children\", \"icon\", \"color\", \"onClose\", \"bordered\", \"visible\"]);\n const {\n getPrefixCls,\n direction,\n tag: tagContext\n } = React.useContext(ConfigContext);\n const [visible, setVisible] = React.useState(true);\n const domProps = omit(props, ['closeIcon', 'closable']);\n // Warning for deprecated usage\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Tag');\n warning.deprecated(!('visible' in tagProps), 'visible', 'visible && <Tag />');\n }\n React.useEffect(() => {\n if (deprecatedVisible !== undefined) {\n setVisible(deprecatedVisible);\n }\n }, [deprecatedVisible]);\n const isPreset = isPresetColor(color);\n const isStatus = isPresetStatusColor(color);\n const isInternalColor = isPreset || isStatus;\n const tagStyle = Object.assign(Object.assign({\n backgroundColor: color && !isInternalColor ? color : undefined\n }, tagContext === null || tagContext === void 0 ? void 0 : tagContext.style), style);\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n // Style\n const tagClassName = classNames(prefixCls, tagContext === null || tagContext === void 0 ? void 0 : tagContext.className, {\n [`${prefixCls}-${color}`]: isInternalColor,\n [`${prefixCls}-has-color`]: color && !isInternalColor,\n [`${prefixCls}-hidden`]: !visible,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-borderless`]: !bordered\n }, className, rootClassName, hashId, cssVarCls);\n const handleCloseClick = e => {\n e.stopPropagation();\n onClose === null || onClose === void 0 ? void 0 : onClose(e);\n if (e.defaultPrevented) {\n return;\n }\n setVisible(false);\n };\n const [, mergedCloseIcon] = useClosable(pickClosable(tagProps), pickClosable(tagContext), {\n closable: false,\n closeIconRender: iconNode => {\n const replacement = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-icon`,\n onClick: handleCloseClick\n }, iconNode);\n return replaceElement(iconNode, replacement, originProps => ({\n onClick: e => {\n var _a;\n (_a = originProps === null || originProps === void 0 ? void 0 : originProps.onClick) === null || _a === void 0 ? void 0 : _a.call(originProps, e);\n handleCloseClick(e);\n },\n className: classNames(originProps === null || originProps === void 0 ? void 0 : originProps.className, `${prefixCls}-close-icon`)\n }));\n }\n });\n const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';\n const iconNode = icon || null;\n const kids = iconNode ? ( /*#__PURE__*/React.createElement(React.Fragment, null, iconNode, children && /*#__PURE__*/React.createElement(\"span\", null, children))) : children;\n const tagNode = /*#__PURE__*/React.createElement(\"span\", Object.assign({}, domProps, {\n ref: ref,\n className: tagClassName,\n style: tagStyle\n }), kids, mergedCloseIcon, isPreset && /*#__PURE__*/React.createElement(PresetCmp, {\n key: \"preset\",\n prefixCls: prefixCls\n }), isStatus && /*#__PURE__*/React.createElement(StatusCmp, {\n key: \"status\",\n prefixCls: prefixCls\n }));\n return wrapCSSVar(isNeedWave ? /*#__PURE__*/React.createElement(Wave, {\n component: \"Tag\"\n }, tagNode) : tagNode);\n});\nconst Tag = InternalTag;\nif (process.env.NODE_ENV !== 'production') {\n Tag.displayName = 'Tag';\n}\nTag.CheckableTag = CheckableTag;\nexport default Tag;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","omit","isPresetColor","isPresetStatusColor","useClosable","pickClosable","replaceElement","devUseWarning","Wave","ConfigContext","CheckableTag","useStyle","PresetCmp","StatusCmp","InternalTag","forwardRef","tagProps","ref","prefixCls","customizePrefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible","deprecatedVisible","props","getPrefixCls","direction","tag","tagContext","useContext","setVisible","useState","domProps","process","env","NODE_ENV","warning","deprecated","useEffect","undefined","isPreset","isStatus","isInternalColor","tagStyle","assign","backgroundColor","wrapCSSVar","hashId","cssVarCls","tagClassName","handleCloseClick","stopPropagation","defaultPrevented","mergedCloseIcon","closable","closeIconRender","iconNode","replacement","createElement","onClick","originProps","_a","isNeedWave","type","kids","Fragment","tagNode","key","component","Tag","displayName"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/tag/index.js"],"sourcesContent":["\"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 classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { isPresetColor, isPresetStatusColor } from '../_util/colors';\nimport useClosable, { pickClosable } from '../_util/hooks/useClosable';\nimport { replaceElement } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport CheckableTag from './CheckableTag';\nimport useStyle from './style';\nimport PresetCmp from './style/presetCmp';\nimport StatusCmp from './style/statusCmp';\nconst InternalTag = /*#__PURE__*/React.forwardRef((tagProps, ref) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n children,\n icon,\n color,\n onClose,\n bordered = true,\n visible: deprecatedVisible\n } = tagProps,\n props = __rest(tagProps, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"children\", \"icon\", \"color\", \"onClose\", \"bordered\", \"visible\"]);\n const {\n getPrefixCls,\n direction,\n tag: tagContext\n } = React.useContext(ConfigContext);\n const [visible, setVisible] = React.useState(true);\n const domProps = omit(props, ['closeIcon', 'closable']);\n // Warning for deprecated usage\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Tag');\n warning.deprecated(!('visible' in tagProps), 'visible', 'visible && <Tag />');\n }\n React.useEffect(() => {\n if (deprecatedVisible !== undefined) {\n setVisible(deprecatedVisible);\n }\n }, [deprecatedVisible]);\n const isPreset = isPresetColor(color);\n const isStatus = isPresetStatusColor(color);\n const isInternalColor = isPreset || isStatus;\n const tagStyle = Object.assign(Object.assign({\n backgroundColor: color && !isInternalColor ? color : undefined\n }, tagContext === null || tagContext === void 0 ? void 0 : tagContext.style), style);\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n // Style\n const tagClassName = classNames(prefixCls, tagContext === null || tagContext === void 0 ? void 0 : tagContext.className, {\n [`${prefixCls}-${color}`]: isInternalColor,\n [`${prefixCls}-has-color`]: color && !isInternalColor,\n [`${prefixCls}-hidden`]: !visible,\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-borderless`]: !bordered\n }, className, rootClassName, hashId, cssVarCls);\n const handleCloseClick = e => {\n e.stopPropagation();\n onClose === null || onClose === void 0 ? void 0 : onClose(e);\n if (e.defaultPrevented) {\n return;\n }\n setVisible(false);\n };\n const [, mergedCloseIcon] = useClosable(pickClosable(tagProps), pickClosable(tagContext), {\n closable: false,\n closeIconRender: iconNode => {\n const replacement = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-icon`,\n onClick: handleCloseClick\n }, iconNode);\n return replaceElement(iconNode, replacement, originProps => ({\n onClick: e => {\n var _a;\n (_a = originProps === null || originProps === void 0 ? void 0 : originProps.onClick) === null || _a === void 0 ? void 0 : _a.call(originProps, e);\n handleCloseClick(e);\n },\n className: classNames(originProps === null || originProps === void 0 ? void 0 : originProps.className, `${prefixCls}-close-icon`)\n }));\n }\n });\n const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';\n const iconNode = icon || null;\n const kids = iconNode ? ( /*#__PURE__*/React.createElement(React.Fragment, null, iconNode, children && /*#__PURE__*/React.createElement(\"span\", null, children))) : children;\n const tagNode = /*#__PURE__*/React.createElement(\"span\", Object.assign({}, domProps, {\n ref: ref,\n className: tagClassName,\n style: tagStyle\n }), kids, mergedCloseIcon, isPreset && /*#__PURE__*/React.createElement(PresetCmp, {\n key: \"preset\",\n prefixCls: prefixCls\n }), isStatus && /*#__PURE__*/React.createElement(StatusCmp, {\n key: \"status\",\n prefixCls: prefixCls\n }));\n return wrapCSSVar(isNeedWave ? /*#__PURE__*/React.createElement(Wave, {\n component: \"Tag\"\n }, tagNode) : tagNode);\n});\nconst Tag = InternalTag;\nif (process.env.NODE_ENV !== 'production') {\n Tag.displayName = 'Tag';\n}\nTag.CheckableTag = CheckableTag;\nexport default Tag;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,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