Skip to content

Commit

Permalink
AAE-23556 Fix search text input component styles (#9895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-2019 authored and VitoAlbano committed Jul 9, 2024
1 parent a64ffb3 commit 89f300b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
7 changes: 2 additions & 5 deletions lib/core/src/lib/search-text/search-text-input.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,10 @@
(ngModelChange)="inputChange($event)"
[searchAutocomplete]="searchAutocomplete ? searchAutocomplete : null"
(keyup.enter)="searchSubmit($event)">
<button mat-icon-button matSuffix
<mat-icon *ngIf="canShowClearSearch()" matSuffix
data-automation-id="adf-clear-search-button"
class="adf-clear-search-button"
*ngIf="canShowClearSearch()"
(mousedown)="resetSearch()">
<mat-icon>clear</mat-icon>
</button>
(mousedown)="resetSearch()">clear</mat-icon>
</mat-form-field>
</div>
</div>
9 changes: 3 additions & 6 deletions lib/core/src/lib/search-text/search-text-input.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
line-height: normal;
}

&-input-form-field-divider {
#{$mat-line-ripple} {
background-color: var(--adf-theme-primary-50);
}

font-size: var(--theme-subheading-2-font-size);
&-clear-search-button {
font-size: var(--theme-button-font-size);
cursor: pointer;
}
}

Expand Down
9 changes: 4 additions & 5 deletions lib/core/src/lib/search-text/search-text-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
@Input()
placeholder: string = '';


/** Label text to show over the input field */
@Input()
label: string = '';
Expand Down Expand Up @@ -144,11 +143,11 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
animationStates: SearchAnimationDirection = {
ltr: {
active: { value: 'active', params: { 'margin-left': 13 } },
inactive: { value: 'inactive', params: { transform: 'translateX(82%)' } }
inactive: { value: 'inactive', params: { transform: 'translateX(95%)' } }
},
rtl: {
active: { value: 'active', params: { 'margin-right': 13 } },
inactive: { value: 'inactive', params: { transform: 'translateX(-82%)' } }
inactive: { value: 'inactive', params: { transform: 'translateX(-95%)' } }
}
};

Expand Down Expand Up @@ -202,11 +201,11 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
if (this.dir === 'ltr') {
return this.subscriptAnimationState.value === 'inactive'
? { value: 'active', params: { 'margin-left': 13 } }
: { value: 'inactive', params: { transform: 'translateX(82%)' } };
: { value: 'inactive', params: { transform: 'translateX(95%)' } };
} else {
return this.subscriptAnimationState.value === 'inactive'
? { value: 'active', params: { 'margin-right': 13 } }
: { value: 'inactive', params: { transform: 'translateX(-82%)' } };
: { value: 'inactive', params: { transform: 'translateX(-95%)' } };
}
}

Expand Down

0 comments on commit 89f300b

Please sign in to comment.