-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix] Use fds-textfield in fds-search-input, autocomplete (#843)
* bugfix#826: refacto search-input & create base-textfield * bugfix#826: add missing dependencies * bugfix#826: add missing dependencies * remove @finastra/textfield import * bugfix#843 fix wc:build * bugfix#843 fix wc:build * bugfix#843 fix unit test * bugfix#843 revert unit test * skip some tests * 80% coverage * fix(wc:search-input): Toggle clear button visibility to allocate space for it while hidden Allowing the input not to move when entering text in it Co-authored-by: frigui dorsaf <[email protected]> Co-authored-by: David Boclé <[email protected]>
- Loading branch information
1 parent
12bd0f6
commit 0e32b3d
Showing
24 changed files
with
825 additions
and
871 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
<script type="module" src="node_modules/@finastra/search-input/dist/src/search-input.js"></script> | ||
|
||
Search with Label | ||
<fds-search-input label="Search"></fds-search-input> | ||
<style> | ||
.demo-title { | ||
font: var(--fds-headline-5, #FFFFFF); | ||
color: var(--fds-on-surface, normal normal var(--fds-headline-5-font-weight, 800) var(--fds-headline-5-font-size, 1rem)/var(--fds-headline-5-line-height, 1.375rem) var(--fds-headline-5-font-family, Spartan)); | ||
margin: var(--fds-spacing-2, 8px) var(--fds-spacing-0, 0px); | ||
} | ||
</style> | ||
|
||
Search with Label + loading | ||
<fds-search-input label="Search" loading="true"></fds-search-input> | ||
<div style="display: flex; flex-direction: column; gap: 24px;"> | ||
<div> | ||
<div class="demo-title">Search</div> | ||
<fds-search-input placeholder="Search ..." value="Banking"></fds-search-input> | ||
</div> | ||
|
||
<div> | ||
<div class="demo-title">Search with loader</div> | ||
<fds-search-input value="loading ..." loading disabled></fds-search-input> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,22 @@ | ||
@use "@material/mwc-textfield/mwc-textfield"; | ||
@use "@finastra/textfield/src/styles"; | ||
@use "@finastra/fds-theme" as fds; | ||
|
||
:host { | ||
@include fds.mdc(text-field-fill-color, surface-selected); | ||
@include fds.mdc(text-field-idle-line-color, primary); | ||
@include fds.mdc(text-field-hover-line-color, primary); | ||
@include fds.mdc(text-field-ink-color, on-background); | ||
@include fds.mdc(ripple-color, surface-selected); | ||
} | ||
|
||
.mdc-text-field--with-leading-icon { | ||
padding-right: 4px; | ||
} | ||
|
||
.fds-search-input-clear-button { | ||
align-self: center; | ||
transition: visibility 300ms cubic-bezier(0.075, 0.82, 0.165, 1); | ||
--mdc-icon-button-size: 32px; | ||
--fds-icon-size: 18px; | ||
|
||
&.fds-search-input-clear-button--show { | ||
visibility: visible | ||
} | ||
|
||
&.fds-search-input-clear-button--hide { | ||
visibility: hidden; | ||
} | ||
} | ||
|
||
.mdc-text-field:not(.mdc-text-field--disabled) { | ||
.mdc-text-field__icon--leading { | ||
@include fds.text-color(primary); | ||
.clear-icon { | ||
@include fds.text-color(on-surface-medium); | ||
margin-right: -14px; | ||
align-self: center; | ||
|
||
&.fds-search-input-clear-button--show { | ||
visibility: visible | ||
} | ||
|
||
&.fds-search-input-clear-button--hide { | ||
visibility: hidden; | ||
} | ||
} | ||
|
||
.mdc-text-field__affix--suffix { | ||
@include fds.text-color(on-background); | ||
.circular-loader { | ||
align-self: center; | ||
} | ||
} | ||
|
||
.mdc-text-field__input { | ||
@include fds.typography(subtitle-1); | ||
} |
Oops, something went wrong.