diff --git a/src/components/InputField/InputField.vue b/src/components/InputField/InputField.vue new file mode 100644 index 0000000000..3b7fb8e314 --- /dev/null +++ b/src/components/InputField/InputField.vue @@ -0,0 +1,328 @@ + + + + + + + diff --git a/src/components/InputField/index.js b/src/components/InputField/index.js new file mode 100644 index 0000000000..93eed48da1 --- /dev/null +++ b/src/components/InputField/index.js @@ -0,0 +1,25 @@ +/** + * @copyright Copyright (c) 2022 Marco Ambrosini + * + * @author Marco Ambrosini + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import InputField from './InputField.vue' + +export default InputField diff --git a/src/components/TextField/TextField.vue b/src/components/TextField/TextField.vue new file mode 100644 index 0000000000..cea0390c15 --- /dev/null +++ b/src/components/TextField/TextField.vue @@ -0,0 +1,254 @@ + + + +### Description + +General purpose text field component. +Note: the inner html `input` element inherits all the attributes from the +textField component so you can add things like `autocomplete`, `maxlength` +and `minlength`. + +``` + + + +``` + + + + + diff --git a/src/components/TextField/index.js b/src/components/TextField/index.js new file mode 100644 index 0000000000..64c6c4e26c --- /dev/null +++ b/src/components/TextField/index.js @@ -0,0 +1,25 @@ +/** + * @copyright Copyright (c) 2022 Marco Ambrosini + * + * @author Marco Ambrosini + * + * @license AGPL-3.0-or-later + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +import TextField from './TextField.vue' + +export default TextField diff --git a/src/components/index.js b/src/components/index.js index 1dd1c75a29..43dc65bdcf 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -71,3 +71,4 @@ export { default as RichContenteditable } from './RichContenteditable/index.js' export { default as SettingsSection } from './SettingsSection/index.js' export { default as UserBubble } from './UserBubble/index.js' export { default as Button } from './Button/index.js' +export { default as TextField } from './TextField/index.js' diff --git a/styleguide.config.js b/styleguide.config.js index 4742a85f35..fa5778b26a 100644 --- a/styleguide.config.js +++ b/styleguide.config.js @@ -78,6 +78,7 @@ module.exports = { 'src/components/RichContenteditable/!(RichContenteditable).vue', 'src/components/Settings*/*.vue', 'src/components/UserBubble/UserBubbleDiv.vue', + 'src/components/InputField/InputField.vue', ], sections: [ { diff --git a/webpack.dev.js b/webpack.dev.js index 6d758c94f3..42c4c9b782 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -1,12 +1,12 @@ -const { merge } = require('webpack-merge'); -const common = require('./webpack.common.js'); +const { merge } = require('webpack-merge') +const common = require('./webpack.common.js') module.exports = merge(common, { mode: 'development', devServer: { historyApiFallback: true, noInfo: true, - overlay: true + overlay: true, }, devtool: 'source-map', })