660cb55a8ae2928d57a99f9d716a06fc.json
5.32 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport TabContext from '../TabContext';\nexport default function TabPanelList(_ref) {\n var id = _ref.id,\n activeKey = _ref.activeKey,\n animated = _ref.animated,\n tabPosition = _ref.tabPosition,\n rtl = _ref.rtl,\n destroyInactiveTabPane = _ref.destroyInactiveTabPane;\n\n var _React$useContext = React.useContext(TabContext),\n prefixCls = _React$useContext.prefixCls,\n tabs = _React$useContext.tabs;\n\n var tabPaneAnimated = animated.tabPane;\n var activeIndex = tabs.findIndex(function (tab) {\n return tab.key === activeKey;\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content-holder\"))\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content\"), \"\".concat(prefixCls, \"-content-\").concat(tabPosition), _defineProperty({}, \"\".concat(prefixCls, \"-content-animated\"), tabPaneAnimated)),\n style: activeIndex && tabPaneAnimated ? _defineProperty({}, rtl ? 'marginRight' : 'marginLeft', \"-\".concat(activeIndex, \"00%\")) : null\n }, tabs.map(function (tab) {\n return /*#__PURE__*/React.cloneElement(tab.node, {\n key: tab.key,\n prefixCls: prefixCls,\n tabKey: tab.key,\n id: id,\n animated: tabPaneAnimated,\n active: tab.key === activeKey,\n destroyInactiveTabPane: destroyInactiveTabPane\n });\n })));\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-tabs/es/TabPanelList/index.js"],"names":["_defineProperty","React","classNames","TabContext","TabPanelList","_ref","id","activeKey","animated","tabPosition","rtl","destroyInactiveTabPane","_React$useContext","useContext","prefixCls","tabs","tabPaneAnimated","tabPane","activeIndex","findIndex","tab","key","createElement","className","concat","style","map","cloneElement","node","tabKey","active"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAO,K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gDE,eAAhD,CAAzG,CADoB;AAEzCS,IAAAA,KAAK,EAAEP,WAAW,IAAIF,eAAf,GAAiChB,eAAe,CAAC,EAAD,EAAKU,GAAG,GAAG,aAAH,GAAmB,YAA3B,EAAyC,IAAIc,MAAJ,CAAWN,WAAX,EAAwB,KAAxB,CAAzC,CAAhD,GAA2H;AAFzF,GAA3B,EAGbH,IAAI,CAACW,GAAL,CAAS,UAAUN,GAAV,EAAe;AACzB,WAAO,aAAanB,KAAK,CAAC0B,YAAN,CAAmBP,GAAG,CAACQ,IAAvB,EAA6B;AAC/CP,MAAAA,GAAG,EAAED,GAAG,CAACC,GADsC;AAE/CP,MAAAA,SAAS,EAAEA,SAFoC;AAG/Ce,MAAAA,MAAM,EAAET,GAAG,CAACC,GAHmC;AAI/Cf,MAAAA,EAAE,EAAEA,EAJ2C;AAK/CE,MAAAA,QAAQ,EAAEQ,eALqC;AAM/Cc,MAAAA,MAAM,EAAEV,GAAG,CAACC,GAAJ,KAAYd,SAN2B;AAO/CI,MAAAA,sBAAsB,EAAEA;AAPuB,KAA7B,CAApB;AASD,GAVE,CAHa,CAFI,CAApB;AAgBD","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport TabContext from '../TabContext';\nexport default function TabPanelList(_ref) {\n var id = _ref.id,\n activeKey = _ref.activeKey,\n animated = _ref.animated,\n tabPosition = _ref.tabPosition,\n rtl = _ref.rtl,\n destroyInactiveTabPane = _ref.destroyInactiveTabPane;\n\n var _React$useContext = React.useContext(TabContext),\n prefixCls = _React$useContext.prefixCls,\n tabs = _React$useContext.tabs;\n\n var tabPaneAnimated = animated.tabPane;\n var activeIndex = tabs.findIndex(function (tab) {\n return tab.key === activeKey;\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content-holder\"))\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content\"), \"\".concat(prefixCls, \"-content-\").concat(tabPosition), _defineProperty({}, \"\".concat(prefixCls, \"-content-animated\"), tabPaneAnimated)),\n style: activeIndex && tabPaneAnimated ? _defineProperty({}, rtl ? 'marginRight' : 'marginLeft', \"-\".concat(activeIndex, \"00%\")) : null\n }, tabs.map(function (tab) {\n return /*#__PURE__*/React.cloneElement(tab.node, {\n key: tab.key,\n prefixCls: prefixCls,\n tabKey: tab.key,\n id: id,\n animated: tabPaneAnimated,\n active: tab.key === activeKey,\n destroyInactiveTabPane: destroyInactiveTabPane\n });\n })));\n}"]},"metadata":{},"sourceType":"module"}