644c3c1f8c0c73edde6950e16db7b2b2.json
6.94 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\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};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigConsumer } from '../config-provider';\nimport UnreachableException from '../_util/unreachableException';\n\nvar ButtonGroup = function ButtonGroup(props) {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {\n var _classNames;\n\n var getPrefixCls = _ref.getPrefixCls,\n direction = _ref.direction;\n\n var customizePrefixCls = props.prefixCls,\n size = props.size,\n className = props.className,\n others = __rest(props, [\"prefixCls\", \"size\", \"className\"]);\n\n var prefixCls = getPrefixCls('btn-group', customizePrefixCls); // large => lg\n // small => sm\n\n var sizeCls = '';\n\n switch (size) {\n case 'large':\n sizeCls = 'lg';\n break;\n\n case 'small':\n sizeCls = 'sm';\n break;\n\n case 'middle':\n case undefined:\n break;\n\n default:\n // eslint-disable-next-line no-console\n console.warn(new UnreachableException(size));\n }\n\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(sizeCls), sizeCls), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n className: classes\n }));\n });\n};\n\nexport default ButtonGroup;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/button/button-group.js"],"names":["_extends","_defineProperty","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","ConfigConsumer","UnreachableException","ButtonGroup","props","createElement","_ref","_classNames","getPrefixCls","direction","customizePrefixCls","prefixCls","size","className","others","sizeCls","undefined","console","warn","classes","concat"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EAAoED,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;AACrE;;AAED,MAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EAAqE,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE,EAAwE;AAC3I,QAAIT,CAAC,CAACO,OAAF,CAAUL,CAAC,CAACO,CAAD,CAAX,IAAkB,CAAlB,IAAuBN,MAAM,CAACC,SAAP,CAAiBO,oBAAjB,CAAsCL,IAAtC,CAA2CP,CAA3C,EAA8CG,CAAC,CAACO,CAAD,CAA/C,CAA3B,EAAgFR,CAAC,CAACC,CAAC,CAACO,CAAD,CAAF,CAAD,GAAUV,CAAC,CAACG,CAAC,CAACO,CAAD,CAAF,CAAX;AACjF;AACD,SAAOR,CAAP;AACD,CAXD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yDA,OAAzD,CAAjC,EAAoG/B,eAAe,CAACuB,WAAD,EAAc,GAAGa,MAAH,CAAUT,SAAV,EAAqB,MAArB,CAAd,EAA4CF,SAAS,KAAK,KAA1D,CAAnH,EAAqLF,WAAlM,GAAgNM,SAAhN,CAAxB;AACA,WAAO,aAAad,KAAK,CAACM,aAAN,CAAoB,KAApB,EAA2BtB,QAAQ,CAAC,EAAD,EAAK+B,MAAL,EAAa;AAClED,MAAAA,SAAS,EAAEM;AADuD,KAAb,CAAnC,CAApB;AAGD,GAtCmB,CAApB;AAuCD,CAxCD;;AA0CA,eAAehB,WAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\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};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { ConfigConsumer } from '../config-provider';\nimport UnreachableException from '../_util/unreachableException';\n\nvar ButtonGroup = function ButtonGroup(props) {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (_ref) {\n var _classNames;\n\n var getPrefixCls = _ref.getPrefixCls,\n direction = _ref.direction;\n\n var customizePrefixCls = props.prefixCls,\n size = props.size,\n className = props.className,\n others = __rest(props, [\"prefixCls\", \"size\", \"className\"]);\n\n var prefixCls = getPrefixCls('btn-group', customizePrefixCls); // large => lg\n // small => sm\n\n var sizeCls = '';\n\n switch (size) {\n case 'large':\n sizeCls = 'lg';\n break;\n\n case 'small':\n sizeCls = 'sm';\n break;\n\n case 'middle':\n case undefined:\n break;\n\n default:\n // eslint-disable-next-line no-console\n console.warn(new UnreachableException(size));\n }\n\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(sizeCls), sizeCls), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n className: classes\n }));\n });\n};\n\nexport default ButtonGroup;"]},"metadata":{},"sourceType":"module"}