mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-26 10:25:14 +00:00
1 line
16 KiB
JSON
1 line
16 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport { useFormControl } from '../FormControl';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `labelPlacement=\"start\"`. */\n labelPlacementStart: {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n },\n\n /* Styles applied to the root element if `labelPlacement=\"top\"`. */\n labelPlacementTop: {\n flexDirection: 'column-reverse',\n marginLeft: 16\n },\n\n /* Styles applied to the root element if `labelPlacement=\"bottom\"`. */\n labelPlacementBottom: {\n flexDirection: 'column',\n marginLeft: 16\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the label's Typography component. */\n label: {\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n }\n };\n};\n/**\n * Drop in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\n\nvar FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(props, ref) {\n var checked = props.checked,\n classes = props.classes,\n className = props.className,\n control = props.control,\n disabledProp = props.disabled,\n inputRef = props.inputRef,\n label = props.label,\n _props$labelPlacement = props.labelPlacement,\n labelPlacement = _props$labelPlacement === void 0 ? 'end' : _props$labelPlacement,\n name = props.name,\n onChange = props.onChange,\n value = props.value,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"className\", \"control\", \"disabled\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"value\"]);\n\n var muiFormControl = useFormControl();\n var disabled = disabledProp;\n\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n\n var controlProps = {\n disabled: disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(function (key) {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n return /*#__PURE__*/React.createElement(\"label\", _extends({\n className: clsx(classes.root, className, labelPlacement !== 'end' && classes[\"labelPlacement\".concat(capitalize(labelPlacement))], disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.cloneElement(control, controlProps), /*#__PURE__*/React.createElement(Typography, {\n component: \"span\",\n className: clsx(classes.label, disabled && classes.disabled)\n }, label));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n\n /**\n * If `true`, the control will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The text to be used in an enclosing label element.\n */\n label: PropTypes.node,\n\n /**\n * The position of the label.\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControlLabel'\n})(FormControlLabel);","map":{"version":3,"sources":["/app/node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js"],"names":["_extends","_objectWithoutProperties","React","PropTypes","clsx","refType","useFormControl","withStyles","Typography","capitalize","styles","theme","root","display","alignItems","cursor","verticalAlign","WebkitTapHighlightColor","marginLeft","marginRight","labelPlacementStart","flexDirection","labelPlacementTop","labelPlacementBottom","disabled","label","color","palette","text","FormControlLabel","forwardRef","props","ref","checked","classes","className","control","disabledProp","inputRef","_props$labelPlacement","labelPlacement","name","onChange","value","other","muiFormControl","controlProps","forEach","key","createElement","concat","cloneElement","component","process","env","NODE_ENV","propTypes","bool","object","string","element","isRequired","node","oneOf","func","any"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,wBAAP,MAAqC,oDAArC;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,cAAT,QAA+B,gBAA/B;AACA,OAAOC,UAAP,MAAuB,sBAAvB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AACA,OAAO,IAAIC,MAAM,GAAG,SAASA,MAAT,CAAgBC,KAAhB,EAAuB;AACzC,SAAO;AACL;AACAC,IAAAA,IAAI,EAAE;AACJC,MAAAA,OAAO,EAAE,aADL;AAEJC,MAAAA,UAAU,EAAE,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AAAA,QAAQ,EAAErB,SAAS,CAACsD,IA9B+C;;AAgCnE;AACF;AACA;AACEnB,EAAAA,QAAQ,EAAEjC,OAnCyD;;AAqCnE;AACF;AACA;AACEoB,EAAAA,KAAK,EAAEtB,SAAS,CAAC2D,IAxCkD;;AA0CnE;AACF;AACA;AACEtB,EAAAA,cAAc,EAAErC,SAAS,CAAC4D,KAAV,CAAgB,CAAC,QAAD,EAAW,KAAX,EAAkB,OAAlB,EAA2B,KAA3B,CAAhB,CA7CmD;;AA+CnE;AACF;AACA;AACEtB,EAAAA,IAAI,EAAEtC,SAAS,CAACwD,MAlDmD;;AAoDnE;AACF;AACA;AACA;AACA;AACA;AACEjB,EAAAA,QAAQ,EAAEvC,SAAS,CAAC6D,IA1D+C;;AA4DnE;AACF;AACA;AACErB,EAAAA,KAAK,EAAExC,SAAS,CAAC8D;AA/DkD,CAArE,GAgEI,KAAK,CAhET;AAiEA,eAAe1D,UAAU,CAACG,MAAD,EAAS;AAChC+B,EAAAA,IAAI,EAAE;AAD0B,CAAT,CAAV,CAEZZ,gBAFY,CAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport { useFormControl } from '../FormControl';\nimport withStyles from '../styles/withStyles';\nimport Typography from '../Typography';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `labelPlacement=\"start\"`. */\n labelPlacementStart: {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n },\n\n /* Styles applied to the root element if `labelPlacement=\"top\"`. */\n labelPlacementTop: {\n flexDirection: 'column-reverse',\n marginLeft: 16\n },\n\n /* Styles applied to the root element if `labelPlacement=\"bottom\"`. */\n labelPlacementBottom: {\n flexDirection: 'column',\n marginLeft: 16\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the label's Typography component. */\n label: {\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n }\n };\n};\n/**\n * Drop in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\n\nvar FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(props, ref) {\n var checked = props.checked,\n classes = props.classes,\n className = props.className,\n control = props.control,\n disabledProp = props.disabled,\n inputRef = props.inputRef,\n label = props.label,\n _props$labelPlacement = props.labelPlacement,\n labelPlacement = _props$labelPlacement === void 0 ? 'end' : _props$labelPlacement,\n name = props.name,\n onChange = props.onChange,\n value = props.value,\n other = _objectWithoutProperties(props, [\"checked\", \"classes\", \"className\", \"control\", \"disabled\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"value\"]);\n\n var muiFormControl = useFormControl();\n var disabled = disabledProp;\n\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n\n var controlProps = {\n disabled: disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(function (key) {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n return /*#__PURE__*/React.createElement(\"label\", _extends({\n className: clsx(classes.root, className, labelPlacement !== 'end' && classes[\"labelPlacement\".concat(capitalize(labelPlacement))], disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/React.cloneElement(control, controlProps), /*#__PURE__*/React.createElement(Typography, {\n component: \"span\",\n className: clsx(classes.label, disabled && classes.disabled)\n }, label));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n\n /**\n * If `true`, the control will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The text to be used in an enclosing label element.\n */\n label: PropTypes.node,\n\n /**\n * The position of the label.\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControlLabel'\n})(FormControlLabel);"]},"metadata":{},"sourceType":"module"} |