{"ast":null,"code":"import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Col from './Col';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultProps = {\n column: false,\n visuallyHidden: false\n};\nconst FormLabel = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'label',\n bsPrefix,\n column,\n visuallyHidden,\n className,\n htmlFor,\n ...props\n } = _ref;\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');\n let columnClass = 'col-form-label';\n if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;\n const classes = classNames(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0;\n htmlFor = htmlFor || controlId;\n if (column) return /*#__PURE__*/_jsx(Col, {\n ref: ref,\n as: \"label\",\n className: classes,\n htmlFor: htmlFor,\n ...props\n });\n return /*#__PURE__*/(\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n _jsx(Component, {\n ref: ref,\n className: classes,\n htmlFor: htmlFor,\n ...props\n })\n );\n});\nFormLabel.displayName = 'FormLabel';\nFormLabel.defaultProps = defaultProps;\nexport default FormLabel;","map":{"version":3,"names":["classNames","React","useContext","warning","Col","FormContext","useBootstrapPrefix","jsx","_jsx","defaultProps","column","visuallyHidden","FormLabel","forwardRef","ref","as","Component","bsPrefix","className","htmlFor","props","controlId","columnClass","classes","process","env","NODE_ENV","displayName"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/FormLabel.js"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Col from './Col';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultProps = {\n column: false,\n visuallyHidden: false\n};\nconst FormLabel = /*#__PURE__*/React.forwardRef(({\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'label',\n bsPrefix,\n column,\n visuallyHidden,\n className,\n htmlFor,\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');\n let columnClass = 'col-form-label';\n if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;\n const classes = classNames(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !htmlFor, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0;\n htmlFor = htmlFor || controlId;\n if (column) return /*#__PURE__*/_jsx(Col, {\n ref: ref,\n as: \"label\",\n className: classes,\n htmlFor: htmlFor,\n ...props\n });\n return (\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control\n _jsx(Component, {\n ref: ref,\n className: classes,\n htmlFor: htmlFor,\n ...props\n })\n );\n});\nFormLabel.displayName = 'FormLabel';\nFormLabel.defaultProps = defaultProps;\nexport default FormLabel;"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,OAAO;AAClC,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,GAAG,MAAM,OAAO;AACvB,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,MAAMC,YAAY,GAAG;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