{"version":3,"sources":["card-input/card-input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAS,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,cAAc,GAAG,UAAU,GAAG;IACtC,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;IAC9D,SAAS,CAAC,EAAE;;;;;;iBAA0B;IAEtC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,cAAc,CAAC,CAE1C;IAEF;;OAEG;IAEH,IAAI,MAAC;IAEL,MAAM;IAeN;;OAEG;IACI,KAAK;IAIZ;;OAEG;IACI,IAAI;IAIX;;OAEG;IACI,QAAQ;CAGlB;;IAvDG,iCAAiC;;;AAyDrC,wBAA+D","file":"card-input.d.ts","sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\nimport React from 'react';\nimport { createCn } from 'bem-react-classname';\nimport { withTheme } from '../cn';\n\nimport { Input, InputProps } from '../input/input';\n\nexport type CardInputProps = InputProps & {\n    /** Подсказка в текстовом поле */\n    placeholder?: string;\n};\n\n/**\n * Поле ввода номера карты с маской.\n */\nexport class CardInput extends React.PureComponent<CardInputProps> {\n    protected cn = createCn('card-input');\n\n    static defaultProps: Partial<CardInputProps> = {\n        placeholder: '0000 0000 0000 0000 00',\n    };\n\n    /**\n     * @type {Input}\n     */\n    // TODO [issues/1018] переписать тесты нужно, что бы private был\n    root;\n\n    render() {\n        return (\n            <Input\n                { ...this.props }\n                type=\"tel\"\n                ref={ (root) => {\n                    this.root = root;\n                } }\n                mask=\"1111 1111 1111 1111 11\"\n                formNoValidate={ true }\n                className={ this.cn() }\n            />\n        );\n    }\n\n    /**\n     * Устанавливает фокус на поле ввода.\n     */\n    public focus() {\n        this.root.focus();\n    }\n\n    /**\n     * Убирает фокус с поля ввода.\n     */\n    public blur() {\n        this.root.blur();\n    }\n\n    /**\n     * Скроллит страницу до поля ввода.\n     */\n    public scrollTo() {\n        this.root.scrollTo();\n    }\n}\n\nexport default withTheme<CardInputProps, CardInput>(CardInput);\n"]}