You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.1 KiB
1 line
5.1 KiB
{"ast":null,"code":"import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Feedback from './Feedback';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormControl = /*#__PURE__*/React.forwardRef((_ref, ref) => {\n let {\n bsPrefix,\n type,\n size,\n htmlSize,\n id,\n className,\n isValid = false,\n isInvalid = false,\n plaintext,\n readOnly,\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 = 'input',\n ...props\n } = _ref;\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');\n let classes;\n if (plaintext) {\n classes = {\n [`${bsPrefix}-plaintext`]: true\n };\n } else {\n classes = {\n [bsPrefix]: true,\n [`${bsPrefix}-${size}`]: size\n };\n }\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !id, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n type: type,\n size: htmlSize,\n ref: ref,\n readOnly: readOnly,\n id: id || controlId,\n className: classNames(className, classes, isValid && `is-valid`, isInvalid && `is-invalid`, type === 'color' && `${bsPrefix}-color`)\n });\n});\nFormControl.displayName = 'FormControl';\nexport default Object.assign(FormControl, {\n Feedback\n});","map":{"version":3,"names":["classNames","React","useContext","warning","Feedback","FormContext","useBootstrapPrefix","jsx","_jsx","FormControl","forwardRef","ref","bsPrefix","type","size","htmlSize","id","className","isValid","isInvalid","plaintext","readOnly","as","Component","props","controlId","classes","process","env","NODE_ENV","displayName","Object","assign"],"sources":["C:/Cours/SAE/SAE-3.01/Scripted/Scripted/website/node_modules/react-bootstrap/esm/FormControl.js"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport warning from 'warning';\nimport Feedback from './Feedback';\nimport FormContext from './FormContext';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FormControl = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n type,\n size,\n htmlSize,\n id,\n className,\n isValid = false,\n isInvalid = false,\n plaintext,\n readOnly,\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 = 'input',\n ...props\n}, ref) => {\n const {\n controlId\n } = useContext(FormContext);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');\n let classes;\n\n if (plaintext) {\n classes = {\n [`${bsPrefix}-plaintext`]: true\n };\n } else {\n classes = {\n [bsPrefix]: true,\n [`${bsPrefix}-${size}`]: size\n };\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || !id, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;\n return /*#__PURE__*/_jsx(Component, { ...props,\n type: type,\n size: htmlSize,\n ref: ref,\n readOnly: readOnly,\n id: id || controlId,\n className: classNames(className, classes, isValid && `is-valid`, isInvalid && `is-invalid`, type === 'color' && `${bsPrefix}-color`)\n });\n});\nFormControl.displayName = 'FormControl';\nexport default Object.assign(FormControl, {\n Feedback\n});"],"mappings":"AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,OAAO;AAClC,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,WAAW,MAAM,eAAe;AACvC,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,MAAMC,WAAW,GAAG,aAAaR,KAAK,CAACS,UAAU,CAAC,OAc/CC,GAAG,KAAK;EAAA,IAdwC;IACjDC,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