Changed: Convert password input to standard using pass font

pull/496/head
Qstick 6 years ago
parent e0108352c8
commit 713f643b1d

@ -17,7 +17,7 @@
} }
.searchInput { .searchInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
height: 46px; height: 46px;
border-radius: 0; border-radius: 0;

@ -64,7 +64,7 @@
} }
.searchInput { .searchInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
border-radius: 0; border-radius: 0;
} }

@ -3,7 +3,7 @@
} }
.numberInput { .numberInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
margin-right: 3px; margin-right: 3px;
} }

@ -0,0 +1,5 @@
.input {
composes: input from 'Components/Form/TextInput.css';
font-family: $passwordFamily;
}

@ -1,13 +1,22 @@
import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import TextInput from './TextInput'; import TextInput from './TextInput';
import styles from './PasswordInput.css';
function PasswordInput(props) { function PasswordInput(props) {
return ( return (
<TextInput <TextInput
type="password"
{...props} {...props}
/> />
); );
} }
PasswordInput.propTypes = {
className: PropTypes.string.isRequired
};
PasswordInput.defaultProps = {
className: styles.input
};
export default PasswordInput; export default PasswordInput;

@ -1,4 +1,4 @@
.text { .input {
composes: input from 'Components/Form/Input.css'; composes: input from 'Components/Form/Input.css';
} }

@ -24,6 +24,10 @@ class TextInput extends Component {
componentWillUnmount() { componentWillUnmount() {
window.removeEventListener('mouseup', this.onDocumentMouseUp); window.removeEventListener('mouseup', this.onDocumentMouseUp);
if (this._selectionTimeout) {
this._selectionTimeout = clearTimeout(this._selectionTimeout);
}
} }
// //
@ -171,7 +175,7 @@ TextInput.propTypes = {
}; };
TextInput.defaultProps = { TextInput.defaultProps = {
className: styles.text, className: styles.input,
type: 'text', type: 'text',
readOnly: false, readOnly: false,
autoFocus: false, autoFocus: false,

@ -25,3 +25,15 @@
font-family: 'Ubuntu Mono'; font-family: 'Ubuntu Mono';
src: url('UbuntuMono-Regular.eot?#iefix') format('embedded-opentype'), url('UbuntuMono-Regular.woff') format('woff'), url('UbuntuMono-Regular.ttf') format('truetype'); src: url('UbuntuMono-Regular.eot?#iefix') format('embedded-opentype'), url('UbuntuMono-Regular.woff') format('woff'), url('UbuntuMono-Regular.ttf') format('truetype');
} }
/*
* text-security-disc
*/
@font-face {
font-weight: normal;
font-style: normal;
font-family: 'text-security-disc';
src: url('text-security-disc.woff') format('woff'), url('text-security-disc.ttf') format('truetype');
}

@ -7,7 +7,7 @@
} }
.filterInput { .filterInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
flex: 0 0 auto; flex: 0 0 auto;
margin-bottom: 20px; margin-bottom: 20px;

@ -7,7 +7,7 @@
} }
.filterInput { .filterInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
flex: 0 0 auto; flex: 0 0 auto;
margin-bottom: 20px; margin-bottom: 20px;

@ -1,5 +1,5 @@
.namingInput { .namingInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
font-family: $monoSpaceFontFamily; font-family: $monoSpaceFontFamily;
} }

@ -27,7 +27,7 @@
} }
.nameInput { .nameInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
margin-top: 4px; margin-top: 4px;
margin-right: 10px; margin-right: 10px;

@ -60,7 +60,7 @@
} }
.sizeInput { .sizeInput {
composes: text from 'Components/Form/TextInput.css'; composes: input from 'Components/Form/TextInput.css';
display: inline-block; display: inline-block;
margin-left: 5px; margin-left: 5px;

@ -2,6 +2,7 @@ module.exports = {
// Families // Families
defaultFontFamily: 'Roboto, "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif', defaultFontFamily: 'Roboto, "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif',
monoSpaceFontFamily: '"Ubuntu Mono", Menlo, Monaco, Consolas, "Courier New", monospace;', monoSpaceFontFamily: '"Ubuntu Mono", Menlo, Monaco, Consolas, "Courier New", monospace;',
passwordFamily: 'text-security-disc',
// Sizes // Sizes
extraSmallFontSize: '11px', extraSmallFontSize: '11px',

Loading…
Cancel
Save