@engie-group/fluid-design-system-angular
Version:
Fluid Design System Angular
66 lines (65 loc) • 1.95 kB
HTML
<nj-form-item
[]="hasError"
[]="hasSuccess"
[]="hasHint"
[]="isDisabled"
[]="hasCustomIcon"
[]="isFloatingLabel"
[]="iconName"
[]="size"
[]="true"
[]="getAdditionalClass()"
[]="inputId"
(focusout)="handleFocusout($event)"
>
<input
type="text"
readonly
[]="selectedLabel"
[]="inputId"
[]="isDisabled"
tabindex="-1"
aria-hidden="true"
njFormField
/>
<ng-content njFormLabel select="[njFormLabel]"></ng-content>
<ng-content njFormSubscript select="[njFormSubscript]"></ng-content>
<ng-container njFormAdditionalContent>
<div
*ngIf="selectedValue && customLabel?.templateRef"
class="nj-form-item__custom-label"
aria-hidden="true"
njFormField>
<ng-container [ngTemplateOutlet]="customLabel.templateRef"
[]="customLabelContext"></ng-container>
</div>
<p [id]="getInstructionsId()" hidden>{{ listNavigationLabel }}</p>
<button
type="button"
class="nj-form-item__custom-list-button"
aria-haspopup="listbox"
[]="isOpen"
role="combobox"
[]="buttonLabel"
[]="isOpen ? -1 : null"
[]="getDescriptionId()"
(click)="toggleIsOpen()"
></button>
<nj-list-group
class="nj-form-item__list nj-form-item__list--no-animate"
[]="!isOpen"
[@transformList]="isOpen ? 'open': 'void'"
[]="true"
[]="false"
[]="true"
[]="true"
tabindex="-1"
[]="fieldLabel"
(keydown)="handleListKeydown($event)"
>
<ng-content select="[njSelectOptions]"></ng-content>
</nj-list-group>
</ng-container>
</nj-form-item>