Skip to content
Snippets Groups Projects
Commit 97825bee authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'Add missing data test ids' (#737) from add-data-test-ids into master

parents b58cb0e5 b3eb7090
Branches
Tags
No related merge requests found
......@@ -32,7 +32,7 @@ type TextInputVariants = VariantProps<typeof textInputVariants>;
imports: [CommonModule, ErrorMessageComponent, ReactiveFormsModule, TechSharedModule],
template: `
<div class="relative">
<label [for]="id" class="text-md mb-2 block font-medium text-text">
<label *ngIf="showLabel" [for]="id" class="text-md mb-2 block font-medium text-text">
{{ inputLabel }}<ng-container *ngIf="required"><i aria-hidden="true">*</i></ng-container>
</label>
<div class="mt-2">
......@@ -84,6 +84,7 @@ export class TextInputComponent {
@Input() required: boolean = false;
@Input() withPrefix: boolean = false;
@Input() withSuffix: boolean = false;
@Input() showLabel: boolean = true;
@Input() set focus(value: boolean) {
if (value && this.inputElement) {
......
......@@ -37,7 +37,6 @@ import { InstantSearchQuery, InstantSearchResult } from './instant-search.model'
template: ` <div class="relative">
<ods-search-field
[placeholder]="placeholder"
[label]="label"
[attr.aria-expanded]="results.length"
[control]="control"
aria-controls="results"
......@@ -70,7 +69,6 @@ import { InstantSearchQuery, InstantSearchResult } from './instant-search.model'
export class InstantSearchComponent implements OnInit, OnDestroy {
static readonly DEBOUNCE_TIME_IN_MILLIS: number = 300;
@Input() label: string = EMPTY_STRING;
@Input() placeholder: string = EMPTY_STRING;
@Input() headerText: string = EMPTY_STRING;
@Input() control: FormControl<string> = new FormControl(EMPTY_STRING);
......
......@@ -11,22 +11,28 @@ import { SearchIconComponent } from '../../icons/search-icon/search-icon.compone
standalone: true,
imports: [CommonModule, TextInputComponent, SearchIconComponent, CloseIconComponent],
template: `<ods-text-input
[label]="label"
label="instant search"
[fieldControl]="control"
[placeholder]="placeholder"
[withPrefix]="true"
[withSuffix]="true"
[showLabel]="false"
(clickEmitter)="inputClicked.emit()"
role="combobox"
>
<ods-search-icon prefix aria-hidden="true" aria-label="Suchfeld" />
<button suffix *ngIf="control.value" (click)="clearInput()" aria-label="Eingabe löschen">
<button
suffix
*ngIf="control.value"
(click)="clearInput()"
aria-label="Eingabe löschen"
data-test-id="clear-instant-search"
>
<ods-close-icon class="fill-primary hover:fill-primary-hover" />
</button>
</ods-text-input>`,
})
export class SearchFieldComponent {
@Input() label: string = EMPTY_STRING;
@Input() placeholder: string = EMPTY_STRING;
@Input() control: FormControl<string> = new FormControl(EMPTY_STRING);
......
......@@ -17,7 +17,7 @@ import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@
data-test-id="item-button"
#button
>
<div class="flex flex-col items-start justify-between text-text">
<div class="flex flex-col items-start justify-between text-start text-text">
<p class="text-base font-medium">{{ title }}</p>
<p class="text-sm">{{ description }}</p>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment