From 15213ba6cea50c9c67725444078fd50087441afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Thu, 25 Jan 2018 17:07:20 +0000 Subject: [PATCH] fix(my-joy-beta): adjust select inputs width in affinity fixes #1090 --- .../__snapshots__/affinity.spec.js.snap | 498 ++++++++++++++++-- .../components/create-instance/affinity.js | 10 +- packages/ui-toolkit/src/form/base/input.js | 9 +- packages/ui-toolkit/src/theme/index.js | 13 +- 4 files changed, 480 insertions(+), 50 deletions(-) diff --git a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap index 2ac126e8..dad59c3a 100644 --- a/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap +++ b/packages/my-joy-beta/src/components/create-instance/__tests__/__snapshots__/affinity.spec.js.snap @@ -44,7 +44,7 @@ exports[`renders without throwing 1`] = ` margin-bottom: 2rem; } -.c8 { +.c12 { margin-right: 0.25rem; } @@ -76,6 +76,51 @@ exports[`renders without throwing 1`] = ` } .c5 { + width: 4.125rem; + position: relative; + padding: 0.75rem; + padding-right: 1.5625rem; + width: auto; + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + color: rgb(216,216,216); + margin: 0 0.375rem; +} + +.c7 { + width: 5.625rem; + position: relative; + padding: 0.75rem; + padding-right: 1.5625rem; + width: auto; + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + color: rgb(216,216,216); + margin: 0 0.375rem; +} + +.c10 { + width: 7.5rem; position: relative; padding: 0.75rem; padding-right: 1.5625rem; @@ -120,7 +165,7 @@ exports[`renders without throwing 1`] = ` -webkit-padding-after: 0; } -.c9 { +.c13 { box-sizing: border-box; width: 18.75rem; height: 3rem; @@ -156,41 +201,41 @@ exports[`renders without throwing 1`] = ` outline: 0; } -.c9::-webkit-input-placeholder { +.c13::-webkit-input-placeholder { color: rgba(73,73,73,0.5); } -.c9::-moz-placeholder { +.c13::-moz-placeholder { color: rgba(73,73,73,0.5); } -.c9:-ms-input-placeholder { +.c13:-ms-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:invalid { +.c13:invalid { box-shadow: none; } -.c9:disabled { +.c13:disabled { background-color: rgb(250,250,250); color: rgb(216,216,216); cursor: not-allowed; } -.c9:disabled::-webkit-input-placeholder { +.c13:disabled::-webkit-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:disabled::-moz-placeholder { +.c13:disabled::-moz-placeholder { color: rgba(73,73,73,0.5); } -.c9:disabled:-ms-input-placeholder { +.c13:disabled:-ms-input-placeholder { color: rgba(73,73,73,0.5); } -.c9:focus { +.c13:focus { border-color: rgb(59,70,204); outline: 0; } @@ -227,7 +272,7 @@ exports[`renders without throwing 1`] = ` right: 0.375rem; } -.c7 { +.c9 { position: relative; display: -webkit-inline-box; display: -webkit-inline-flex; @@ -242,7 +287,7 @@ exports[`renders without throwing 1`] = ` margin-left: 0; } -.c7:after { +.c9:after { content: ''; width: 0.625rem; height: 0.625rem; @@ -256,7 +301,7 @@ exports[`renders without throwing 1`] = ` right: 0.75rem; } -.c7:after { +.c9:after { right: 0.375rem; } @@ -285,6 +330,8 @@ exports[`renders without throwing 1`] = ` appearance: none; min-height: 0; max-width: 22.1875rem; + width: 4.125rem; + max-width: 4.125rem; text-overflow: ellipsis; font-size: 0.9375rem; line-height: normal !important; @@ -335,6 +382,160 @@ exports[`renders without throwing 1`] = ` outline: 0; } +.c8 { + box-sizing: border-box; + width: 18.75rem; + height: 3rem; + min-height: 3rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + padding: 0.8125rem 1.125rem; + border-radius: 0.25rem; + background-color: rgb(255,255,255); + border: 0.0625rem solid rgb(216,216,216); + color: rgba(73,73,73,1); + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + max-width: 22.1875rem; + width: 5.625rem; + max-width: 5.625rem; + text-overflow: ellipsis; + font-size: 0.9375rem; + line-height: normal !important; + font-style: normal; + font-stretch: normal; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + outline: 0; +} + +.c8::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:invalid { + box-shadow: none; +} + +.c8:disabled { + background-color: rgb(250,250,250); + color: rgb(216,216,216); + cursor: not-allowed; +} + +.c8:disabled::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:disabled::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:disabled:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c8:focus { + border-color: rgb(59,70,204); + outline: 0; +} + +.c11 { + box-sizing: border-box; + width: 18.75rem; + height: 3rem; + min-height: 3rem; + margin-bottom: 0.5rem; + margin-top: 0.5rem; + padding: 0.8125rem 1.125rem; + border-radius: 0.25rem; + background-color: rgb(255,255,255); + border: 0.0625rem solid rgb(216,216,216); + color: rgba(73,73,73,1); + border: none; + border-bottom: 0.0625rem solid rgba(73,73,73,1); + border-radius: 0; + background: transparent; + padding: 0; + padding-right: 0.75rem; + display: inline; + height: 1.5rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + min-height: 0; + max-width: 22.1875rem; + width: 7.5rem; + max-width: 7.5rem; + text-overflow: ellipsis; + font-size: 0.9375rem; + line-height: normal !important; + font-style: normal; + font-stretch: normal; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + outline: 0; +} + +.c11::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:invalid { + box-shadow: none; +} + +.c11:disabled { + background-color: rgb(250,250,250); + color: rgb(216,216,216); + cursor: not-allowed; +} + +.c11:disabled::-webkit-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:disabled::-moz-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:disabled:-ms-input-placeholder { + color: rgba(73,73,73,0.5); +} + +.c11:focus { + border-color: rgb(59,70,204); + outline: 0; +} +
@@ -356,12 +557,14 @@ exports[`renders without throwing 1`] = `