mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
9.7 KiB
JSON
1 line
9.7 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType, isObject } from './utils';\nvar colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];\nvar stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);\nvar columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({\n size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),\n order: stringOrNumberProp,\n offset: stringOrNumberProp\n})]);\nvar propTypes = {\n tag: tagPropType,\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n widths: PropTypes.array\n};\nvar defaultProps = {\n tag: 'div',\n widths: colWidths\n};\n\nvar getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {\n if (colSize === true || colSize === '') {\n return isXs ? 'col' : \"col-\" + colWidth;\n } else if (colSize === 'auto') {\n return isXs ? 'col-auto' : \"col-\" + colWidth + \"-auto\";\n }\n\n return isXs ? \"col-\" + colSize : \"col-\" + colWidth + \"-\" + colSize;\n};\n\nvar Col = function Col(props) {\n var className = props.className,\n cssModule = props.cssModule,\n widths = props.widths,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"widths\", \"tag\"]);\n\n var colClasses = [];\n widths.forEach(function (colWidth, i) {\n var columnProp = props[colWidth];\n delete attributes[colWidth];\n\n if (!columnProp && columnProp !== '') {\n return;\n }\n\n var isXs = !i;\n\n if (isObject(columnProp)) {\n var _classNames;\n\n var colSizeInterfix = isXs ? '-' : \"-\" + colWidth + \"-\";\n var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);\n colClasses.push(mapToCssModules(classNames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames[\"order\" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames[\"offset\" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames)), cssModule));\n } else {\n var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n\n colClasses.push(_colClass);\n }\n });\n\n if (!colClasses.length) {\n colClasses.push('col');\n }\n\n var classes = mapToCssModules(classNames(className, colClasses), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nCol.propTypes = propTypes;\nCol.defaultProps = defaultProps;\nexport default Col;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/Col.js"],"names":["_extends","_objectWithoutPropertiesLoose","React","PropTypes","classNames","mapToCssModules","tagPropType","isObject","colWidths","stringOrNumberProp","oneOfType","number","string","columnProps","bool","shape","size","order","offset","propTypes","tag","xs","sm","md","lg","xl","className","cssModule","object","widths","array","defaultProps","getColumnSizeClass","isXs","colWidth","colSize","Col","props","Tag","attributes","colClasses","forEach","i","columnProp","_classNames","colSizeInterfix","colClass","push","_colClass","length","classes","createElement"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,EAA0BC,WAA1B,EAAuCC,QAAvC,QAAuD,SAAvD;AACA,IAAIC,SAAS,GAAG,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB;AACA,IAAIC,kBAAkB,GAAGN,SAAS,CAACO,SAAV,CAAoB,CAACP,SAAS,CAACQ,MA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F4B,WAAW,CAAC,UAAUC,eAAV,GAA4BF,UAAU,CAAC1B,KAAxC,CAAX,GAA4D0B,UAAU,CAAC1B,KAAX,IAAoB0B,UAAU,CAAC1B,KAAX,KAAqB,CAA1L,EAA6L2B,WAAW,CAAC,WAAWC,eAAX,GAA6BF,UAAU,CAACzB,MAAzC,CAAX,GAA8DyB,UAAU,CAACzB,MAAX,IAAqByB,UAAU,CAACzB,MAAX,KAAsB,CAAtS,EAAyS0B,WAA3S,EAAX,EAAqUjB,SAArU,CAA/B;AACD,KAND,MAMO;AACL,UAAIqB,SAAS,GAAGhB,kBAAkB,CAACC,IAAD,EAAOC,QAAP,EAAiBS,UAAjB,CAAlC;;AAEAH,MAAAA,UAAU,CAACO,IAAX,CAAgBC,SAAhB;AACD;AACF,GArBD;;AAuBA,MAAI,CAACR,UAAU,CAACS,MAAhB,EAAwB;AACtBT,IAAAA,UAAU,CAACO,IAAX,CAAgB,KAAhB;AACD;;AAED,MAAIG,OAAO,GAAG7C,eAAe,CAACD,UAAU,CAACsB,SAAD,EAAYc,UAAZ,CAAX,EAAoCb,SAApC,CAA7B;AACA,SAAO,aAAazB,KAAK,CAACiD,aAAN,CAAoBb,GAApB,EAAyBtC,QAAQ,CAAC,EAAD,EAAKuC,UAAL,EAAiB;AACpEb,IAAAA,SAAS,EAAEwB;AADyD,GAAjB,CAAjC,CAApB;AAGD,CAvCD;;AAyCAd,GAAG,CAACjB,SAAJ,GAAgBA,SAAhB;AACAiB,GAAG,CAACL,YAAJ,GAAmBA,YAAnB;AACA,eAAeK,GAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType, isObject } from './utils';\nvar colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];\nvar stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]);\nvar columnProps = PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string, PropTypes.shape({\n size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]),\n order: stringOrNumberProp,\n offset: stringOrNumberProp\n})]);\nvar propTypes = {\n tag: tagPropType,\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n widths: PropTypes.array\n};\nvar defaultProps = {\n tag: 'div',\n widths: colWidths\n};\n\nvar getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {\n if (colSize === true || colSize === '') {\n return isXs ? 'col' : \"col-\" + colWidth;\n } else if (colSize === 'auto') {\n return isXs ? 'col-auto' : \"col-\" + colWidth + \"-auto\";\n }\n\n return isXs ? \"col-\" + colSize : \"col-\" + colWidth + \"-\" + colSize;\n};\n\nvar Col = function Col(props) {\n var className = props.className,\n cssModule = props.cssModule,\n widths = props.widths,\n Tag = props.tag,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"widths\", \"tag\"]);\n\n var colClasses = [];\n widths.forEach(function (colWidth, i) {\n var columnProp = props[colWidth];\n delete attributes[colWidth];\n\n if (!columnProp && columnProp !== '') {\n return;\n }\n\n var isXs = !i;\n\n if (isObject(columnProp)) {\n var _classNames;\n\n var colSizeInterfix = isXs ? '-' : \"-\" + colWidth + \"-\";\n var colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);\n colClasses.push(mapToCssModules(classNames((_classNames = {}, _classNames[colClass] = columnProp.size || columnProp.size === '', _classNames[\"order\" + colSizeInterfix + columnProp.order] = columnProp.order || columnProp.order === 0, _classNames[\"offset\" + colSizeInterfix + columnProp.offset] = columnProp.offset || columnProp.offset === 0, _classNames)), cssModule));\n } else {\n var _colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n\n colClasses.push(_colClass);\n }\n });\n\n if (!colClasses.length) {\n colClasses.push('col');\n }\n\n var classes = mapToCssModules(classNames(className, colClasses), cssModule);\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n className: classes\n }));\n};\n\nCol.propTypes = propTypes;\nCol.defaultProps = defaultProps;\nexport default Col;"]},"metadata":{},"sourceType":"module"} |