1 line
7.6 KiB
JSON
1 line
7.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 StarFilled from \"@ant-design/icons/es/icons/StarFilled\";\nimport classNames from 'classnames';\nimport RcRate from 'rc-rate';\nimport { ConfigContext } from '../config-provider';\nimport Tooltip from '../tooltip';\nimport useStyle from './style';\nconst Rate = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n tooltips,\n character = /*#__PURE__*/React.createElement(StarFilled, null)\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"tooltips\", \"character\"]);\n const characterRender = (node, _ref) => {\n let {\n index\n } = _ref;\n if (!tooltips) {\n return node;\n }\n return /*#__PURE__*/React.createElement(Tooltip, {\n title: tooltips[index]\n }, node);\n };\n const {\n getPrefixCls,\n direction,\n rate\n } = React.useContext(ConfigContext);\n const ratePrefixCls = getPrefixCls('rate', prefixCls);\n // Style\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(ratePrefixCls);\n const mergedStyle = Object.assign(Object.assign({}, rate === null || rate === void 0 ? void 0 : rate.style), style);\n return wrapCSSVar( /*#__PURE__*/React.createElement(RcRate, Object.assign({\n ref: ref,\n character: character,\n characterRender: characterRender\n }, rest, {\n className: classNames(className, rootClassName, hashId, cssVarCls, rate === null || rate === void 0 ? void 0 : rate.className),\n style: mergedStyle,\n prefixCls: ratePrefixCls,\n direction: direction\n })));\n});\nif (process.env.NODE_ENV !== 'production') {\n Rate.displayName = 'Rate';\n}\nexport default Rate;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","StarFilled","classNames","RcRate","ConfigContext","Tooltip","useStyle","Rate","forwardRef","props","ref","prefixCls","className","rootClassName","style","tooltips","character","createElement","rest","characterRender","node","_ref","index","title","getPrefixCls","direction","rate","useContext","ratePrefixCls","wrapCSSVar","hashId","cssVarCls","mergedStyle","assign","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/rate/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 StarFilled from \"@ant-design/icons/es/icons/StarFilled\";\nimport classNames from 'classnames';\nimport RcRate from 'rc-rate';\nimport { ConfigContext } from '../config-provider';\nimport Tooltip from '../tooltip';\nimport useStyle from './style';\nconst Rate = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n tooltips,\n character = /*#__PURE__*/React.createElement(StarFilled, null)\n } = props,\n rest = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"style\", \"tooltips\", \"character\"]);\n const characterRender = (node, _ref) => {\n
|