1 line
6.9 KiB
JSON
1 line
6.9 KiB
JSON
|
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"title\", \"eventKey\", \"children\"];\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport * as React from 'react';\nimport { MenuContext } from \"./context/MenuContext\";\nimport { useFullPath, useMeasure } from \"./context/PathContext\";\nimport { parseChildren } from \"./utils/commonUtil\";\nvar InternalMenuItemGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var className = props.className,\n title = props.title,\n eventKey = props.eventKey,\n children = props.children,\n restProps = _objectWithoutProperties(props, _excluded);\n var _React$useContext = React.useContext(MenuContext),\n prefixCls = _React$useContext.prefixCls;\n var groupPrefixCls = \"\".concat(prefixCls, \"-item-group\");\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n ref: ref,\n role: \"presentation\"\n }, restProps, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n className: classNames(groupPrefixCls, className)\n }), /*#__PURE__*/React.createElement(\"div\", {\n role: \"presentation\",\n className: \"\".concat(groupPrefixCls, \"-title\"),\n title: typeof title === 'string' ? title : undefined\n }, title), /*#__PURE__*/React.createElement(\"ul\", {\n role: \"group\",\n className: \"\".concat(groupPrefixCls, \"-list\")\n }, children));\n});\nvar MenuItemGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var eventKey = props.eventKey,\n children = props.children;\n var connectedKeyPath = useFullPath(eventKey);\n var childList = parseChildren(children, connectedKeyPath);\n var measure = useMeasure();\n if (measure) {\n return childList;\n }\n return /*#__PURE__*/React.createElement(InternalMenuItemGroup, _extends({\n ref: ref\n }, omit(props, ['warnKey'])), childList);\n});\nif (process.env.NODE_ENV !== 'production') {\n MenuItemGroup.displayName = 'MenuItemGroup';\n}\nexport default MenuItemGroup;","map":{"version":3,"names":["_extends","_objectWithoutProperties","_excluded","classNames","omit","React","MenuContext","useFullPath","useMeasure","parseChildren","InternalMenuItemGroup","forwardRef","props","ref","className","title","eventKey","children","restProps","_React$useContext","useContext","prefixCls","groupPrefixCls","concat","createElement","role","onClick","e","stopPropagation","undefined","MenuItemGroup","connectedKeyPath","childList","measure","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-menu/es/MenuItemGroup.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"title\", \"eventKey\", \"children\"];\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport * as React from 'react';\nimport { MenuContext } from \"./context/MenuContext\";\nimport { useFullPath, useMeasure } from \"./context/PathContext\";\nimport { parseChildren } from \"./utils/commonUtil\";\nvar InternalMenuItemGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var className = props.className,\n title = props.title,\n eventKey = props.eventKey,\n children = props.children,\n restProps = _objectWithoutProperties(props, _excluded);\n var _React$useContext = React.useContext(MenuContext),\n prefixCls = _React$useContext.prefixCls;\n var groupPrefixCls = \"\".concat(prefixCls, \"-item-group\");\n return /*#__PURE__*/React.createElement(\"li\", _extends({\n ref: ref,\n role: \"presentation\"\n }, restProps, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n className: classNames(groupPrefixCls, className)\n }), /*#__PURE__*/React.createElement(\"div\", {\n role: \"presentation\",\
|