Skip to content

Commit

Permalink
seatch icon focus state styling
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Feb 5, 2025
1 parent 6d0d821 commit 489db19
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/app/branding/c1-style-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const c1Styles = {
importFieldDependentField: 'tw-pr-24-px tw-pl-[58px]',
importFieldDependentFieldSvg: 'tw-pt-42-px',
importFieldDropDownText: '!tw-font-600 tw-text-12-px',
stepHeaderH3Text: 'tw-text-18-px'
stepHeaderH3Text: 'tw-text-18-px',
searchIconFocus: 'tw-text-search-focused-filled-border'
},
dashboard: {
dashboardErrorResolveBtnText: 'p-button primary-outline'
Expand Down
3 changes: 2 additions & 1 deletion src/app/branding/fyle-style-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const fyleStyles = {
importFieldDependentField: '',
importFieldDependentFieldSvg: 'tw-pt-46-px',
importFieldDropDownText: '!tw-font-400 tw-text-14-px',
stepHeaderH3Text: ''
stepHeaderH3Text: '',
searchIconFocus: 'tw-text-search-focused-search-icon'
},
dashboard: {
dashboardErrorResolveBtnText: 'p-button secondary-sm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
<p class="tw-text-20-px tw-font-500 tw-text-text-primary">{{headerText}}</p>
</div>
<i [ngClass]="{'pi pi-times fyle' : brandingConfig.brandId === 'fyle' && appName!==AppName.QBD_DIRECT, 'pi pi-times fyle qbd' : brandingConfig.brandId === 'fyle' && appName===AppName.QBD_DIRECT, 'pi pi-times co' : brandingConfig.brandId !== 'fyle'}" class="tw-cursor-pointer" style="font-size: 12px" (click)="acceptWarning(false)"></i>
<i [ngClass]="[appName!==AppName.QBD_DIRECT ? brandingStyle.common.configurationBrandingClass : brandingStyle.common.configurationBrandingClass + ' qbd']" class="tw-cursor-pointer pi pi-times" style="font-size: 12px" (click)="acceptWarning(false)"></i>
</div>
</div>
<div class="tw-pl-24-px tw-pr-10-px tw-pt-16-px tw-pb-24-px">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { brandingConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { brandingConfig, brandingKbArticles, brandingStyle } from 'src/app/branding/branding-config';
import { AppName, ConfigurationWarningEvent } from 'src/app/core/models/enum/enum.model';
import { ConfigurationWarningOut } from 'src/app/core/models/misc/configuration-warning.model';
import { WindowService } from 'src/app/core/services/common/window.service';
Expand Down Expand Up @@ -35,6 +35,8 @@ export class ConfigurationConfirmationDialogComponent implements OnInit {

readonly brandingKbArticles = brandingKbArticles;

readonly brandingStyle = brandingStyle;

AppName = AppName;

brandIcon: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h5 *ngIf="formControllerName === 'cccExportType' && brandingConfig.brandId ===
<app-search [form]="form" [isDropdown]="true" [placeholder]="'Search'" [styleClasses]="'tw-w-[100%] tw-h-dropdown-option-height tw-bg-white '" (handleSimpleSearch)="simpleSearch($event)" (searchFocused)="onSearchFocus($event)"></app-search>
</ng-template>
<ng-template pTemplate="filtericon">
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingConfig.brandId === 'fyle' ? 'tw-text-search-focused-search-icon' : 'tw-text-search-focused-filled-border'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingStyle.configuration.searchIconFocus" [isTextColorAllowed]="true"></app-svg-icon>
</ng-template>
</p-dropdown>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h5 class="!tw-text-text-muted tw-text-14-px tw-pt-8-px !tw-font-400 !tw-leading
<div *ngIf="emails.length" class="tw-p-6-px">
<p-iconField iconPosition="left">
<p-inputIcon>
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingConfig.brandId === 'fyle' ? 'tw-text-search-focused-search-icon' : 'tw-text-search-focused-filled-border'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingStyle.configuration.searchIconFocus" [isTextColorAllowed]="true"></app-svg-icon>
</p-inputIcon>
<input type="text" class="!tw-h-32-px !tw-w-288-px !tw-rounded-4-px !tw-pl-40-px !tw-pr-12-px !tw-py-12-px" (keyup)="options.filter($event)" pInputText placeholder="Search by Name / Email" formControlName="search"/>
</p-iconField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { TrackingService } from 'src/app/core/services/integration/tracking.serv
import { IntegrationsToastService } from 'src/app/core/services/common/integrations-toast.service';
import { EmailOption } from 'src/app/core/models/intacct/intacct-configuration/advanced-settings.model';
import { trackingAppMap } from 'src/app/core/models/misc/tracking.model';
import { brandingConfig } from 'src/app/branding/branding-config';
import { brandingConfig, brandingStyle } from 'src/app/branding/branding-config';

@Component({
selector: 'app-email-multi-select-field',
Expand Down Expand Up @@ -56,6 +56,8 @@ export class EmailMultiSelectFieldComponent implements OnInit {

readonly brandingConfig = brandingConfig;

readonly brandingStyle = brandingStyle;

constructor(
@Inject(FormBuilder) private formBuilder: FormBuilder,
private trackingService: TrackingService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</div>
</ng-template>
<ng-template pTemplate="filtericon">
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingConfig.brandId === 'fyle' ? 'tw-text-search-focused-search-icon' : 'tw-text-search-focused-filled-border'" [isTextColorAllowed]="true"></app-svg-icon>
<app-svg-icon [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingStyle.configuration.searchIconFocus" [isTextColorAllowed]="true"></app-svg-icon>
</ng-template>
</p-dropdown>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { DropdownFilterOptions } from 'primeng/dropdown';
import { Subject, debounceTime } from 'rxjs';
import { brandingConfig, brandingContent, brandingFeatureConfig } from 'src/app/branding/branding-config';
import { brandingConfig, brandingContent, brandingFeatureConfig, brandingStyle } from 'src/app/branding/branding-config';
import { DestinationAttribute } from 'src/app/core/models/db/destination-attribute.model';
import { ExtendedGenericMapping } from 'src/app/core/models/db/extended-generic-mapping.model';
import { GenericMapping, MappingClass } from 'src/app/core/models/db/generic-mapping.model';
Expand Down Expand Up @@ -68,6 +68,8 @@ export class GenericMappingTableComponent implements OnInit {

readonly brandingContent = brandingContent.mapping;

readonly brandingStyle = brandingStyle;

optionSearchUpdate = new Subject<{searchTerm: string}>();

@ViewChild('filterInput') filterInput!: ElementRef;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span [formGroup]="form" [class]="'tw-px-12-px custom-search-field ' + styleClasses + 'tw-h-' + height" [ngStyle]="{'border-color': !isDropdown && isSearchFocused ? 'var(--search-focused-filled-border)' : 'var(--search-default-border)'}" [ngClass]="{'tw-py-4-px': isDropdown, 'tw-py-8-px': !isDropdown, 'tw-cursor-pointer': !isSearchFocused}" (click)="onSearch()" (focus)="isSearchFocused = true" (blur)="onBlur()">
<app-svg-icon [isTextColorAllowed]="true" [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingConfig.brandId === 'fyle' ? 'tw-text-search-focused-search-icon ' + (isSearchFocused ? '!tw-pr-8-px': '') : 'tw-text-search-focused-filled-border ' + (isSearchFocused ? '!tw-pr-8-px': '')"></app-svg-icon>
<app-svg-icon [isTextColorAllowed]="true" [svgSource]="'search-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="brandingStyle.configuration.searchIconFocus + (isSearchFocused ? ' !tw-pr-8-px': '')"></app-svg-icon>
<input #search [ngClass]="[isSearchFocused ? 'showInput': 'hideInput !tw-w-0']" [formControlName]="formControllerName" [class]="'tw-text-14-px tw-text-search-default-filled-text tw-w-' + width" type="text" [placeholder]="placeholder" (focus)="onFocus()" (blur)="onBlur()" />
<app-svg-icon *ngIf="form.get(formControllerName)?.value && !isDropdown" (iconClick)="clearSearch()" [svgSource]="'cross-medium'" [c1SvgSource]="'grv-cross-filled-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-cursor-pointer tw-text-icon-muted'"></app-svg-icon>
</span>
4 changes: 3 additions & 1 deletion src/app/shared/components/input/search/search.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { InputText } from 'primeng/inputtext';
import { brandingConfig } from 'src/app/branding/branding-config';
import { brandingConfig, brandingStyle } from 'src/app/branding/branding-config';

@Component({
selector: 'app-search',
Expand Down Expand Up @@ -32,6 +32,8 @@ export class SearchComponent implements OnInit {

readonly brandingConfig = brandingConfig;

readonly brandingStyle = brandingStyle;

@ViewChild('search') search: any;

constructor() { }
Expand Down

0 comments on commit 489db19

Please sign in to comment.