-
Notifications
You must be signed in to change notification settings - Fork 93
LF-5028 Refactor <Input /> to use <InputBaseLabel /> and adjust Optional styles #3913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
f251a7c
081ee1a
3f62670
a824c48
74b72b0
0059ef8
760d49d
ec3384f
e539ba7
a0cc6d0
5b26615
382b628
2d24ceb
ee73a0d
dbc1f65
9f300e5
41bc217
6623730
d4b703f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,20 @@ | ||
| @import '@assets/mixin.scss'; | ||
|
|
||
| .container { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No change to the display: flex;
align-items: centerLabel styles + now unnecessary vertical positioning styles were removed. |
||
| display: flex; | ||
| flex-direction: column; | ||
| overflow: visible; | ||
| position: relative; | ||
| min-width: 0; | ||
| } | ||
|
|
||
| .inputWrapper { | ||
| position: relative; | ||
| width: 100%; | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .input { | ||
| width: 100%; | ||
| border: 1px solid var(--grey400); | ||
|
|
@@ -52,14 +67,6 @@ input:focus::placeholder { | |
| flex-grow: 1; | ||
| } | ||
|
|
||
| .container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| overflow: visible; | ||
| position: relative; | ||
| min-width: 0; | ||
| } | ||
|
|
||
| .inputError { | ||
| border-color: var(--error); | ||
| } | ||
|
|
@@ -69,34 +76,23 @@ input:focus::placeholder { | |
| border-color: var(--inputActive); | ||
| } | ||
|
|
||
| .icon { | ||
| position: absolute; | ||
| right: 0; | ||
| top: -8px; | ||
| color: var(--iconDefault); | ||
| } | ||
|
|
||
| .icon > * { | ||
| cursor: pointer; | ||
| } | ||
| .sm { | ||
| margin-left: 8px; | ||
| } | ||
|
|
||
| .searchIcon { | ||
| width: 22px; | ||
| height: 22px; | ||
| position: absolute; | ||
| left: 11px; | ||
| top: 13px; | ||
| } | ||
|
|
||
| .searchClearButton { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .searchClearIcon { | ||
| width: 17px; | ||
| height: 17px; | ||
| position: absolute; | ||
| right: 12px; | ||
| top: 15px; | ||
| } | ||
|
|
||
| .searchBar { | ||
|
|
@@ -105,43 +101,27 @@ input:focus::placeholder { | |
|
|
||
| .visibilityIcon { | ||
| position: absolute; | ||
| right: 0; | ||
| transform: translate(-8px, 32px); | ||
| right: 8px; | ||
| font-size: 22px; | ||
| color: var(--iconDefault); | ||
| cursor: pointer; | ||
| z-index: 1; | ||
| } | ||
|
|
||
| .labelContainer { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| min-height: 20px; | ||
| position: relative; | ||
| } | ||
|
|
||
| .unit { | ||
| font-size: 16px; | ||
| line-height: 20px; | ||
| color: var(--labels); | ||
| font-style: normal; | ||
| font-weight: normal; | ||
| @include fontFamily(); | ||
| position: absolute; | ||
| right: 0; | ||
| transform: translate(-8px, 14px); | ||
| right: 8px; | ||
| } | ||
|
|
||
| .currency { | ||
| font-size: 16px; | ||
| line-height: 20px; | ||
| color: var(--labels); | ||
| font-style: normal; | ||
| font-weight: normal; | ||
| @include fontFamily(); | ||
| position: absolute; | ||
| left: 0; | ||
| transform: translate(8px, 34px); | ||
| left: 8px; | ||
| z-index: 1; // otherwise hidden behind the disabled background color | ||
| } | ||
|
|
||
|
|
@@ -156,12 +136,6 @@ input:focus::placeholder { | |
| justify-content: flex-end; | ||
| } | ||
|
|
||
| /* Wrapper for Input + stepper buttons */ | ||
| .inputWrapper { | ||
| position: relative; | ||
| width: 100%; | ||
| } | ||
|
|
||
| .stepper { | ||
| display: flex; | ||
| flex-flow: column nowrap; | ||
|
|
@@ -199,7 +173,6 @@ input:focus::placeholder { | |
| .clearIcon { | ||
| position: absolute; | ||
| right: 17px; | ||
| top: -5px; | ||
| cursor: pointer; | ||
| z-index: 1; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,32 +16,32 @@ | |
| .labelContainer { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| min-height: 20px; | ||
| position: relative; | ||
| } | ||
| align-items: baseline; | ||
| margin-bottom: 4px; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My preference is to never set a margin on a component (and let the parent / layout component control spacing), but Here I am setting the margin on the entire label section and over-writing the margin of the two interior |
||
|
|
||
| .sm { | ||
| margin-left: 8px; | ||
| h5, | ||
| span { | ||
| margin-bottom: 0; | ||
| } | ||
| } | ||
|
|
||
| .leaf { | ||
| transform: translate(4px, 3px); | ||
| margin-left: 4px; | ||
| } | ||
|
|
||
| .tooltipIconContainer { | ||
| width: 100%; | ||
| .rightContent { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| gap: 4px; | ||
| align-items: center; | ||
| cursor: default; | ||
|
|
||
| .tooltipIcon { | ||
| transform: translateY(3px); | ||
| cursor: pointer; | ||
| } | ||
| } | ||
|
|
||
| .icon { | ||
| position: absolute; | ||
| right: 0; | ||
| top: -8px; | ||
| color: var(--iconDefault); | ||
| } | ||
|
|
||
| .icon > * { | ||
| cursor: pointer; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As usual, changing the wrapping divs has made a messy diff! The changes are these two commits:
.inputWrapperdiv for positioning