Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/3716053f637477aa235d14676e3...

1 line
3.3 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.string, PropTypes.number, PropTypes.shape({\n size: stringOrNumberProp,\n order: stringOrNumberProp,\n offset: stringOrNumberProp\n})]);\nvar propTypes = {\n children: PropTypes.node,\n hidden: PropTypes.bool,\n check: PropTypes.bool,\n size: PropTypes.string,\n for: PropTypes.string,\n tag: tagPropType,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n xs: columnProps,\n sm: columnProps,\n md: columnProps,\n lg: columnProps,\n xl: columnProps,\n widths: PropTypes.array\n};\nvar defaultProps = {\n tag: 'label',\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 Label = function Label(props) {\n var className = props.className,\n cssModule = props.cssModule,\n hidden = props.hidden,\n widths = props.widths,\n Tag = props.tag,\n check = props.check,\n size = props.size,\n htmlFor = props.for,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"hidden\", \"widths\", \"tag\", \"check\", \"size\", \"for\"]);\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 var colClass;\n\n if (isObject(columnProp)) {\n var _classNames;\n\n var colSizeInterfix = isXs ? '-' : \"-\" + colWidth + \"-\";\n 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 colClass = getColumnSizeClass(isXs, colWidth, columnProp);\n colClasses.push(colClass);\n }\n });\n var classes = mapToCssModules(classNames(className, hidden ? 'sr-only' : false, check ? 'form-check-label' : false, size ? \"col-form-label-\" + size : false, colClasses, colClasses.length ? 'col-form-label' : false), cssModule);\n return React.createElement(Tag, _extends({\n htmlFor: htmlFor\n }, attributes, {\n className: classes\n }));\n};\n\nLabel.propTypes = propTypes;\nLabel.defaultProps = defaultProps;\nexport default Label;","map":null,"metadata":{},"sourceType":"module"}