Skip to content

Commit

Permalink
Merge pull request #389 from funidata/DS-315-select-tests-and-minor-n…
Browse files Browse the repository at this point in the history
…ew-feats

[Select, Multiselect]: Add filter help text features and update tests
  • Loading branch information
RiinaKuu authored Jun 20, 2024
2 parents 3cc36ee + cd06eee commit ba98ca0
Show file tree
Hide file tree
Showing 277 changed files with 2,462 additions and 1,307 deletions.
3 changes: 1 addition & 2 deletions ngx-fudis/projects/dev/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": []
"outDir": "../../out-tsc/app"
},
"files": ["src/main.ts", "src/polyfills.ts", "src/app/transloco-loader.ts"],
"include": ["src/**/*.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<input
#inputRef
type="text"
aria-required="true"
class="fudis-form-input fudis-select-autocomplete"
class="fudis-select-autocomplete fudis-form-input"
role="combobox"
[attr.value]="selectedLabel || null"
[attr.aria-controls]="id + '-dropdown'"
Expand All @@ -11,19 +10,18 @@
(focus)="_inputFocus($event)"
(blur)="_inputBlur($event)"
(click)="_inputClick($event)"
(keyup)="!disabled && !control.disabled && _keyUp($event)"
(keypress)="!disabled && !control.disabled && _keyPress()"
(keydown)="!disabled && !control.disabled && _keyDown($event)"
(keyup)="!disabled && _keyUp($event)"
(keypress)="!disabled && _keyPress()"
(keydown)="!disabled && _keyDown($event)"
[attr.id]="id"
autocomplete="off"
[attr.aria-autocomplete]="'list'"
[attr.aria-expanded]="dropdownOpen"
[attr.aria-disabled]="control.disabled || disabled"
[attr.aria-disabled]="disabled || null"
[attr.placeholder]="placeholder"
[attr.required]="required ? true : null"
[attr.required]="required || null"
[attr.aria-required]="required || null"
[attr.aria-labelledby]="id + '-label'"
[attr.aria-describedby]="id + '_guidance'"
[attr.aria-invalid]="
(control.touched && control.invalid) || (control.touched && invalidState) ? true : null
"
[attr.aria-invalid]="invalidState || null"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

.fudis-select-autocomplete {
@include typography.text-field-input;
@include borders.border("1px", "solid", "gray-dark");
@include borders.border-radius("2px");

box-sizing: border-box;
display: flex;
align-items: baseline;
align-items: center;
justify-content: flex-start;
padding: spacing.$spacing-xxs spacing.$spacing-lg spacing.$spacing-xxs spacing.$spacing-sm;
width: 100%;
Expand All @@ -28,4 +27,14 @@
&:focus-visible {
@include focus.focus-form-field;
}

&:not([aria-invalid="true"], [aria-disabled="true"]) {
@include borders.border("1px", "solid", "gray-dark");
}

&[aria-disabled="true"] {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
Loading

0 comments on commit ba98ca0

Please sign in to comment.