PromoCursed/node_modules/.cache/babel-loader/368711df7ceaca278e4a8f1ff74fc5c2aa6fcc9cfe274e4a6635f0ed2e954277.json
2024-08-20 23:25:37 +04:00

1 line
9.9 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport { genDataNodeKey, getRemovable } from \"../util\";\nvar TabNode = function TabNode(props) {\n var prefixCls = props.prefixCls,\n id = props.id,\n active = props.active,\n _props$tab = props.tab,\n key = _props$tab.key,\n label = _props$tab.label,\n disabled = _props$tab.disabled,\n closeIcon = _props$tab.closeIcon,\n icon = _props$tab.icon,\n closable = props.closable,\n renderWrapper = props.renderWrapper,\n removeAriaLabel = props.removeAriaLabel,\n editable = props.editable,\n onClick = props.onClick,\n onFocus = props.onFocus,\n style = props.style;\n var tabPrefix = \"\".concat(prefixCls, \"-tab\");\n var removable = getRemovable(closable, closeIcon, editable, disabled);\n function onInternalClick(e) {\n if (disabled) {\n return;\n }\n onClick(e);\n }\n function onRemoveTab(event) {\n event.preventDefault();\n event.stopPropagation();\n editable.onEdit('remove', {\n key: key,\n event: event\n });\n }\n var labelNode = React.useMemo(function () {\n return icon && typeof label === 'string' ? /*#__PURE__*/React.createElement(\"span\", null, label) : label;\n }, [label, icon]);\n var node = /*#__PURE__*/React.createElement(\"div\", {\n key: key\n // ref={ref}\n ,\n\n \"data-node-key\": genDataNodeKey(key),\n className: classNames(tabPrefix, _defineProperty(_defineProperty(_defineProperty({}, \"\".concat(tabPrefix, \"-with-remove\"), removable), \"\".concat(tabPrefix, \"-active\"), active), \"\".concat(tabPrefix, \"-disabled\"), disabled)),\n style: style,\n onClick: onInternalClick\n }, /*#__PURE__*/React.createElement(\"div\", {\n role: \"tab\",\n \"aria-selected\": active,\n id: id && \"\".concat(id, \"-tab-\").concat(key),\n className: \"\".concat(tabPrefix, \"-btn\"),\n \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(key),\n \"aria-disabled\": disabled,\n tabIndex: disabled ? null : 0,\n onClick: function onClick(e) {\n e.stopPropagation();\n onInternalClick(e);\n },\n onKeyDown: function onKeyDown(e) {\n if ([KeyCode.SPACE, KeyCode.ENTER].includes(e.which)) {\n e.preventDefault();\n onInternalClick(e);\n }\n },\n onFocus: onFocus\n }, icon && /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(tabPrefix, \"-icon\")\n }, icon), label && labelNode), removable && /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n \"aria-label\": removeAriaLabel || 'remove',\n tabIndex: 0,\n className: \"\".concat(tabPrefix, \"-remove\"),\n onClick: function onClick(e) {\n e.stopPropagation();\n onRemoveTab(e);\n }\n }, closeIcon || editable.removeIcon || '×'));\n return renderWrapper ? renderWrapper(node) : node;\n};\nexport default TabNode;","map":{"version":3,"names":["_defineProperty","classNames","KeyCode","React","genDataNodeKey","getRemovable","TabNode","props","prefixCls","id","active","_props$tab","tab","key","label","disabled","closeIcon","icon","closable","renderWrapper","removeAriaLabel","editable","onClick","onFocus","style","tabPrefix","concat","removable","onInternalClick","e","onRemoveTab","event","preventDefault","stopPropagation","onEdit","labelNode","useMemo","createElement","node","className","role","tabIndex","onKeyDown","SPACE","ENTER","includes","which","type","removeIcon"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-tabs/es/TabNavList/TabNode.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport { genDataNodeKey, getRemovable } from \"../util\";\nvar TabNode = function TabNode(props) {\n var prefixCls = props.prefixCls,\n id = props.id,\n active = props.active,\n _props$tab = props.tab,\n key = _props$tab.key,\n label = _props$tab.label,\n disabled = _props$tab.disabled,\n closeIcon = _props$tab.closeIcon,\n icon = _props$tab.icon,\n closable = props.closable,\n renderWrapper = props.renderWrapper,\n removeAriaLabel = props.removeAriaLabel,\n editable = props.editable,\n onClick = props.onClick,\n onFocus = props.onFocus,\n style = props.style;\n var tabPrefix = \"\".concat(prefixCls, \"-tab\");\n var removable = getRemovable(closable, closeIcon, editable, disabled);\n function onInternalClick(e) {\n if (disabled) {\n return;\n }\n onClick(e);\n }\n function onRemoveTab(event) {\n event.preventDefault();\n event.stopPropagation();\n editable.onEdit('remove', {\n key: key,\n event: event\n });\n }\n var labelNode = React.useMemo(function () {\n return icon && typeof label === 'string' ? /*#__PURE__*/React.createElement(\"span\", null, label) : label;\n }, [label, icon]);\n var node = /*#__PURE__*/React.createElement(\"div\", {\n key: key\n // ref={ref}\n ,\n \"data-node-key\": genDataNodeKey(key),\n className: classNames(tabPrefix, _defineProperty(_defineProperty(_defineProperty({}, \"\".concat(tabPrefix, \"-with-remove\"), removable), \"\".concat(tabPrefix, \"-active\"), active), \"\".concat(tabPrefix, \"-disabled\"), disabled)),\n style: style,\n onClick: onInternalClick\n }, /*#__PURE__*/React.createElement(\"div\", {\n role: \"tab\",\n \"aria-selected\": active,\n id: id && \"\".concat(id, \"-tab-\").concat(key),\n className: \"\".concat(tabPrefix, \"-btn\"),\n \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(key),\n \"aria-disabled\": disabled,\n tabIndex: disabled ? null : 0,\n onClick: function onClick(e) {\n e.stopPropagation();\n onInternalClick(e);\n },\n onKeyDown: function onKeyDown(e) {\n if ([KeyCode.SPACE, KeyCode.ENTER].includes(e.which)) {\n e.preventDefault();\n onInternalClick(e);\n }\n },\n onFocus: onFocus\n }, icon && /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(tabPrefix, \"-icon\")\n }, icon), label && labelNode), removable && /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n \"aria-label\": removeAriaLabel || 'remove',\n tabIndex: 0,\n className: \"\".concat(tabPrefix, \"-remove\"),\n onClick: function onClick(e) {\n e.stopPropagation();\n onRemoveTab(e);\n }\n }, closeIcon || editable.removeIcon || '×'));\n return renderWrapper ? renderWrapper(node) : node;\n};\nexport default TabNode;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,EAAEC,YAAY,QAAQ,SAAS;AACtD,IAAIC,OAAO,GAAG,SAASA,OAAOA,CAACC,KAAK,EAAE;EACpC,IAAIC,SAAS,GAAGD,KAAK,CAACC,SAAS;IAC7BC,EAAE,GAAGF,KAAK,CAACE,EAAE;IACbC,MAAM,GAAGH,KAAK,CAACG,MAAM;IACrBC,UAAU,GAAGJ,KAAK,CAACK,GAAG;IACtBC,GAAG,GAAGF,UAAU,CAACE,GAAG;IACpBC,KAAK,GAAGH,UAAU,CAACG,KAAK;IACxBC,QAAQ,GAAGJ,UAAU,CAACI,QAAQ;IAC9BC,SAAS,GAAGL,UAAU,CAACK,SAAS;IAChCC,IAAI,GAAGN,UAAU,CAACM,IAAI;IACtBC,QAAQ,GAAGX,KAAK,CAACW,QAAQ;IACzBC,aAAa,GAAGZ,KAAK,CAACY,aAAa;IACnCC,eAAe,GAAGb,KAAK,CAACa,eAAe;IACvCC,QAAQ,GAAGd,KAAK,CAACc,QAAQ;IACzBC,OAAO,GAAGf,KAAK,CAACe,OAAO;IACvBC,OAAO,GAAGhB,KAAK,CAACgB,OAAO;IACvBC,KAAK,GAAGjB,KAAK,CAACiB,KAAK;EACrB,IAAIC,SAAS,GAAG,EAAE,CAACC,MAAM,CAAClB,SAAS,EAAE,MAAM,CAAC;EAC5C,IAAImB,SAAS,GAAGtB,YAAY,CAACa,QAAQ,EAAEF,SAAS,EAAEK,QAAQ,EAAEN,QAAQ,CAAC;EACrE,SAASa,eAAeA,CAACC,CAAC,EAA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