From f337e3515a7246caaed2b8dae103838b5843ab52 Mon Sep 17 00:00:00 2001 From: julientaq <julientaq@gmail.com> Date: Wed, 17 Jan 2018 15:56:40 +0100 Subject: [PATCH] updated file and text-field, removed the author prop from the radio. --- package-lock.json | 3 +- packages/ui/src/atoms/File.local.scss | 8 ++-- packages/ui/src/atoms/Radio.js | 2 - packages/ui/src/atoms/TextField.local.scss | 54 +++++++++++++++++----- yarn.lock | 28 +++++++++++ 5 files changed, 76 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 036caaf88..91fcd8a24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,8 @@ { "name": "pubsweet-monorepo", - "requires": true, + "version": "0.0.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "@babel/code-frame": { "version": "7.0.0-beta.31", diff --git a/packages/ui/src/atoms/File.local.scss b/packages/ui/src/atoms/File.local.scss index 0bef1ebf1..0bb001ba7 100644 --- a/packages/ui/src/atoms/File.local.scss +++ b/packages/ui/src/atoms/File.local.scss @@ -73,12 +73,12 @@ .name { color: #aaa; - font-size: 0.9em; + font-size: 1em; font-style: italic; - margin: 5px; - max-width: 15ch; - overflow-wrap: break-all; /* to divide into lines */ + margin: 0.7em; text-align: center; + width: 20ch; + word-break: break-all; /* to divide into lines */ } &:hover { diff --git a/packages/ui/src/atoms/Radio.js b/packages/ui/src/atoms/Radio.js index 8756a16d9..963f6dace 100644 --- a/packages/ui/src/atoms/Radio.js +++ b/packages/ui/src/atoms/Radio.js @@ -6,7 +6,6 @@ const Radio = ({ className, color = 'black', inline, - author, name, value, label, @@ -19,7 +18,6 @@ const Radio = ({ className={classnames( classes.root, { - [classes.author]: author, [classes.inline]: inline, [classes.checked]: checked, }, diff --git a/packages/ui/src/atoms/TextField.local.scss b/packages/ui/src/atoms/TextField.local.scss index b857af22d..93e5f8d5f 100644 --- a/packages/ui/src/atoms/TextField.local.scss +++ b/packages/ui/src/atoms/TextField.local.scss @@ -1,35 +1,65 @@ .root { + --font-local: var(--font-reviewer); + align-items: center; display: flex; + font-size: 1em; + line-height: 1.8; } -.text { +.root .text { margin-right: 10px; } -.input { +input { + --color-back: var(--color-primary); + + border: none; + border-left: 1px solid darkgrey; + caret-color: var(--color-primary); flex: 1; + font-family: var(--font-local); font-size: inherit; - padding: 0.5em; -} - -.root input { - border: 0 none; - border-bottom: 1px dashed #aaa; - font-family: "Vollkorn", serif; - padding: 0; + max-width: 100%; + padding: 0 0.5em; &:hover, &:focus { - border-bottom: 1px dashed var(--color-primary); + background: linear-gradient( + to right, + transparent 0%, + transparent 2px, + white 2px, + white 4px + ), + linear-gradient(white 0%, white 90%, var(--color-back) 95%, white 100%); + background-position: 0 0, 0.2em 0; + background-repeat: repeat-X, repeat-Y; + background-size: 7px 100%, 100% 1.8em; border-color: transparent; box-shadow: none; outline-style: none; } + + &:focus { + --color-back: #aaa; + } +} + +.author { + --font-local: var(--font-author); + + font-size: 1.1em; + line-height: 1.8; } .root input::placeholder { - color: #777; + color: #999; font-family: var(--font-interface); + font-size: 1em; font-style: italic; } + +.root .author::placeholder { + font-size: 0.9em; +} diff --git a/yarn.lock b/yarn.lock index 4135b4521..7427d2029 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,6 +55,25 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@pubsweet/db-manager@^0.0.12": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@pubsweet/db-manager/-/db-manager-0.0.12.tgz#e05c2f2d6a664a33dcf70050e28f8b82a3a17564" + dependencies: + "@pubsweet/logger" "^0.1.2" + fs-extra "^4.0.2" + isomorphic-fetch "^2.2.1" + joi "^13.1.0" + pouchdb "^6.3.4" + pubsweet-server "^1.0.4" + +"@pubsweet/logger@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@pubsweet/logger/-/logger-0.1.2.tgz#a7e27d346967beefd88eef51ea324922eb939d91" + dependencies: + config "^1.26.2" + joi "^13.1.0" + lodash "^4.17.4" + "@pubsweet/starter@git+https://gitlab.coko.foundation/pubsweet/pubsweet-starter.git": version "1.0.0-alpha.1" resolved "git+https://gitlab.coko.foundation/pubsweet/pubsweet-starter.git#2a2a5c197a90befc2c60a6cf226b699353a6daae" @@ -8546,6 +8565,15 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" +pubsweet-component-form-group@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/pubsweet-component-form-group/-/pubsweet-component-form-group-0.1.6.tgz#020fcb45967abafeb113bed3deefc39cb34e7f60" + dependencies: + joi-browser "^13.0.1" + prop-types "^15.5.10" + pubsweet-server "^1.0.4" + react-bootstrap "^0.31.3" + pubsweet-component-posts-manager@0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/pubsweet-component-posts-manager/-/pubsweet-component-posts-manager-0.6.5.tgz#d35ac7f74bf198d652ff81e9a790ea006ec3719c" -- GitLab