1 line
6.6 KiB
JSON
1 line
6.6 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 { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nconst CheckableTag = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n style,\n className,\n checked,\n onChange,\n onClick\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"style\", \"className\", \"checked\", \"onChange\", \"onClick\"]);\n const {\n getPrefixCls,\n tag\n } = React.useContext(ConfigContext);\n const handleClick = e => {\n onChange === null || onChange === void 0 ? void 0 : onChange(!checked);\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const cls = classNames(prefixCls, `${prefixCls}-checkable`, {\n [`${prefixCls}-checkable-checked`]: checked\n }, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId, cssVarCls);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\", Object.assign({}, restProps, {\n ref: ref,\n style: Object.assign(Object.assign({}, style), tag === null || tag === void 0 ? void 0 : tag.style),\n className: cls,\n onClick: handleClick\n })));\n});\nexport default CheckableTag;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigContext","useStyle","CheckableTag","forwardRef","props","ref","prefixCls","customizePrefixCls","style","className","checked","onChange","onClick","restProps","getPrefixCls","tag","useContext","handleClick","wrapCSSVar","hashId","cssVarCls","cls","createElement","assign"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/tag/CheckableTag.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 { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nconst CheckableTag = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n style,\n className,\n checked,\n onChange,\n onClick\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"style\", \"className\", \"checked\", \"onChange\", \"onClick\"]);\n const {\n getPrefixCls,\n tag\n } = React.useContext(ConfigContext);\n const handleClick = e => {\n onChange === null || onChange === void 0 ? void 0 : onChange(!checked);\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n const prefixCls = getPrefixCls('tag', customizePrefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const cls = classNames(prefixCls, `${prefixCls}-checkable`, {\n [`${prefixCls}-checkable-checked`]: checked\n }, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId, cssVarCls);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"span\",
|