Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/2bab53ac894c568dbe08dc9802f...

1 line
3.4 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n active: PropTypes.bool,\n 'aria-label': PropTypes.string,\n block: PropTypes.bool,\n color: PropTypes.string,\n disabled: PropTypes.bool,\n outline: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n onClick: PropTypes.func,\n size: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n close: PropTypes.bool\n};\nvar defaultProps = {\n color: 'secondary',\n tag: 'button'\n};\n\nvar Button = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Button, _React$Component);\n\n function Button(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Button.prototype;\n\n _proto.onClick = function onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n active = _this$props.active,\n ariaLabel = _this$props['aria-label'],\n block = _this$props.block,\n className = _this$props.className,\n close = _this$props.close,\n cssModule = _this$props.cssModule,\n color = _this$props.color,\n outline = _this$props.outline,\n size = _this$props.size,\n Tag = _this$props.tag,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, [\"active\", \"aria-label\", \"block\", \"className\", \"close\", \"cssModule\", \"color\", \"outline\", \"size\", \"tag\", \"innerRef\"]);\n\n if (close && typeof attributes.children === 'undefined') {\n attributes.children = React.createElement(\"span\", {\n \"aria-hidden\": true\n }, \"\\xD7\");\n }\n\n var btnOutlineColor = \"btn\" + (outline ? '-outline' : '') + \"-\" + color;\n var classes = mapToCssModules(classNames(className, {\n close: close\n }, close || 'btn', close || btnOutlineColor, size ? \"btn-\" + size : false, block ? 'btn-block' : false, {\n active: active,\n disabled: this.props.disabled\n }), cssModule);\n\n if (attributes.href && Tag === 'button') {\n Tag = 'a';\n }\n\n var defaultAriaLabel = close ? 'Close' : null;\n return React.createElement(Tag, _extends({\n type: Tag === 'button' && attributes.onClick ? 'button' : undefined\n }, attributes, {\n className: classes,\n ref: innerRef,\n onClick: this.onClick,\n \"aria-label\": ariaLabel || defaultAriaLabel\n }));\n };\n\n return Button;\n}(React.Component);\n\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\nexport default Button;","map":null,"metadata":{},"sourceType":"module"}