mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
11 KiB
JSON
1 line
11 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 } from './utils';\nimport CustomFileInput from './CustomFileInput';\nvar propTypes = {\n className: PropTypes.string,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n type: PropTypes.string.isRequired,\n label: PropTypes.node,\n inline: PropTypes.bool,\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n bsSize: PropTypes.string,\n htmlFor: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.array, PropTypes.func]),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])\n};\n\nfunction CustomInput(props) {\n var className = props.className,\n label = props.label,\n inline = props.inline,\n valid = props.valid,\n invalid = props.invalid,\n cssModule = props.cssModule,\n children = props.children,\n bsSize = props.bsSize,\n innerRef = props.innerRef,\n htmlFor = props.htmlFor,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"label\", \"inline\", \"valid\", \"invalid\", \"cssModule\", \"children\", \"bsSize\", \"innerRef\", \"htmlFor\"]);\n\n var type = attributes.type;\n var customClass = mapToCssModules(classNames(className, \"custom-\" + type, bsSize ? \"custom-\" + type + \"-\" + bsSize : false), cssModule);\n var validationClassNames = mapToCssModules(classNames(invalid && \"is-invalid\", valid && \"is-valid\"), cssModule);\n var labelHtmlFor = htmlFor || attributes.id;\n\n if (type === \"select\") {\n var _type = attributes.type,\n _rest = _objectWithoutPropertiesLoose(attributes, [\"type\"]);\n\n return /*#__PURE__*/React.createElement(\"select\", _extends({}, _rest, {\n ref: innerRef,\n className: classNames(validationClassNames, customClass),\n \"aria-invalid\": invalid\n }), children);\n }\n\n if (type === \"file\") {\n return /*#__PURE__*/React.createElement(CustomFileInput, props);\n }\n\n if (type !== \"checkbox\" && type !== \"radio\" && type !== \"switch\") {\n return /*#__PURE__*/React.createElement(\"input\", _extends({}, attributes, {\n ref: innerRef,\n \"aria-invalid\": invalid,\n className: classNames(validationClassNames, customClass)\n }));\n }\n\n var wrapperClasses = classNames(customClass, mapToCssModules(classNames(\"custom-control\", {\n \"custom-control-inline\": inline\n }), cssModule));\n\n var hidden = attributes.hidden,\n rest = _objectWithoutPropertiesLoose(attributes, [\"hidden\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: wrapperClasses,\n hidden: hidden || false\n }, /*#__PURE__*/React.createElement(\"input\", _extends({}, rest, {\n type: type === \"switch\" ? \"checkbox\" : type,\n ref: innerRef,\n \"aria-invalid\": invalid,\n className: classNames(validationClassNames, mapToCssModules(\"custom-control-input\", cssModule))\n })), /*#__PURE__*/React.createElement(\"label\", {\n className: mapToCssModules(\"custom-control-label\", cssModule),\n htmlFor: labelHtmlFor\n }, label), children);\n}\n\nCustomInput.propTypes = propTypes;\nexport default CustomInput;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/CustomInput.js"],"names":["_extends","_objectWithoutPropertiesLoose","React","PropTypes","classNames","mapToCssModules","CustomFileInput","propTypes","className","string","id","oneOfType","number","isRequired","type","label","node","inline","bool","valid","invalid","bsSize","htmlFor","cssModule","object","children","array","func","innerRef","CustomInput","props","attributes","customClass","validationClassNames","labelHtmlFor","_type","_rest","createElement","ref","wrapperClasses","hidden","rest"],"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,QAAgC,SAAhC;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,IAAIC,SAA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B,SAAzB,CAAtC;AAJyC,GAAX,CAArC,CAHI,EAQf,aAAarB,KAAK,CAACmC,aAAN,CAAoB,OAApB,EAA6B;AAC7C7B,IAAAA,SAAS,EAAEH,eAAe,CAAC,sBAAD,EAAyBkB,SAAzB,CADmB;AAE7CD,IAAAA,OAAO,EAAEY;AAFoC,GAA7B,EAGfnB,KAHe,CARE,EAWTU,QAXS,CAApB;AAYD;;AAEDI,WAAW,CAACtB,SAAZ,GAAwBA,SAAxB;AACA,eAAesB,WAAf","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 } from './utils';\nimport CustomFileInput from './CustomFileInput';\nvar propTypes = {\n className: PropTypes.string,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n type: PropTypes.string.isRequired,\n label: PropTypes.node,\n inline: PropTypes.bool,\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n bsSize: PropTypes.string,\n htmlFor: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.array, PropTypes.func]),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])\n};\n\nfunction CustomInput(props) {\n var className = props.className,\n label = props.label,\n inline = props.inline,\n valid = props.valid,\n invalid = props.invalid,\n cssModule = props.cssModule,\n children = props.children,\n bsSize = props.bsSize,\n innerRef = props.innerRef,\n htmlFor = props.htmlFor,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"label\", \"inline\", \"valid\", \"invalid\", \"cssModule\", \"children\", \"bsSize\", \"innerRef\", \"htmlFor\"]);\n\n var type = attributes.type;\n var customClass = mapToCssModules(classNames(className, \"custom-\" + type, bsSize ? \"custom-\" + type + \"-\" + bsSize : false), cssModule);\n var validationClassNames = mapToCssModules(classNames(invalid && \"is-invalid\", valid && \"is-valid\"), cssModule);\n var labelHtmlFor = htmlFor || attributes.id;\n\n if (type === \"select\") {\n var _type = attributes.type,\n _rest = _objectWithoutPropertiesLoose(attributes, [\"type\"]);\n\n return /*#__PURE__*/React.createElement(\"select\", _extends({}, _rest, {\n ref: innerRef,\n className: classNames(validationClassNames, customClass),\n \"aria-invalid\": invalid\n }), children);\n }\n\n if (type === \"file\") {\n return /*#__PURE__*/React.createElement(CustomFileInput, props);\n }\n\n if (type !== \"checkbox\" && type !== \"radio\" && type !== \"switch\") {\n return /*#__PURE__*/React.createElement(\"input\", _extends({}, attributes, {\n ref: innerRef,\n \"aria-invalid\": invalid,\n className: classNames(validationClassNames, customClass)\n }));\n }\n\n var wrapperClasses = classNames(customClass, mapToCssModules(classNames(\"custom-control\", {\n \"custom-control-inline\": inline\n }), cssModule));\n\n var hidden = attributes.hidden,\n rest = _objectWithoutPropertiesLoose(attributes, [\"hidden\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: wrapperClasses,\n hidden: hidden || false\n }, /*#__PURE__*/React.createElement(\"input\", _extends({}, rest, {\n type: type === \"switch\" ? \"checkbox\" : type,\n ref: innerRef,\n \"aria-invalid\": invalid,\n className: classNames(validationClassNames, mapToCssModules(\"custom-control-input\", cssModule))\n })), /*#__PURE__*/React.createElement(\"label\", {\n className: mapToCssModules(\"custom-control-label\", cssModule),\n htmlFor: labelHtmlFor\n }, label), children);\n}\n\nCustomInput.propTypes = propTypes;\nexport default CustomInput;"]},"metadata":{},"sourceType":"module"} |