Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/alert/alert.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/alert/alert.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/alert/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/alert/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down Expand Up @@ -64,7 +64,7 @@
TestAvatarTextHostComponent
]
});
return TestBed.compileComponents();

Check warning on line 67 in projects/angular-ui/src/lib/avatar/avatar.component.spec.ts

View workflow job for this annotation

GitHub Actions / build

Unsafe return of an `any` typed value
});

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/avatar/avatar.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/avatar/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/avatar/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/badge/badge.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/badge/badge.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/badge/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/badge/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/bao.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand All @@ -19,7 +19,7 @@
declarations: [BaoBreadcrumbComponent, TestBreadcrumbHostComponent]
});

return TestBed.compileComponents();

Check warning on line 22 in projects/angular-ui/src/lib/breadcrumb/breadcrumb.component.spec.ts

View workflow job for this annotation

GitHub Actions / build

Unsafe return of an `any` typed value
}));

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/breadcrumb/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/breadcrumb/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down Expand Up @@ -28,7 +28,7 @@
]
});

return TestBed.compileComponents();

Check warning on line 31 in projects/angular-ui/src/lib/button/button.component.spec.ts

View workflow job for this annotation

GitHub Actions / build

Unsafe return of an `any` typed value
}));

beforeEach(() => {
Expand Down Expand Up @@ -283,7 +283,7 @@
]
});

return TestBed.compileComponents();

Check warning on line 286 in projects/angular-ui/src/lib/button/button.component.spec.ts

View workflow job for this annotation

GitHub Actions / build

Unsafe return of an `any` typed value
}));

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/button/button.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/button/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/button/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/card/card.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/card/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/card/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/checkbox/checkbox.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/checkbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/checkbox/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/common-components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/common-components/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/core/breakpoints.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/core/colors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/dropdown-menu/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-ui/src/lib/dropdown-menu/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down
15 changes: 10 additions & 5 deletions projects/angular-ui/src/lib/file/file-input.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<label bao-label [required]="required" [for]="inputId">{{ label }}</label>
<label
bao-label
[required]="required"
[for]="inputId"
[id]="inputId + '-label'"
>{{ label }}</label
>
<ng-content select="bao-guiding-text"></ng-content>
<div
baoFileDrop
Expand All @@ -8,20 +14,19 @@
>
<button
bao-button
[id]="inputId + '-button'"
[attr.aria-labelledby]="inputId + '-label'"
type="button"
displayType="utility"
level="secondary"
[disabled]="disabled"
(click)="uploader.click()"
aria-hidden="true"
tabIndex="-1"
>
{{ intl.dropzoneButtonLabel }}
<span>{{ intl.dropzoneButtonLabel }}</span>
</button>
<input
[id]="inputId"
type="file"
class="sr-only"
[disabled]="disabled"
(change)="uploadFile($event.target.files[0])"
#uploader
Expand Down
3 changes: 3 additions & 0 deletions projects/angular-ui/src/lib/file/file-input.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ bao-file-input {
border-width: 1px;
display: inline-flex;
align-items: center;
> input {
display: none;
}
&:focus-within.dropzone-focus {
box-shadow: 0 0 0 0.1875rem $highlight-focus;
background-color: $highlight-light;
Expand Down
15 changes: 10 additions & 5 deletions projects/angular-ui/src/lib/file/file-input.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
* Copyright (c) 2026 Ville de Montreal. All rights reserved.
* Licensed under the MIT license.
* See LICENSE file in the project root for full license information.
*/
Expand Down Expand Up @@ -100,10 +100,15 @@ describe('BaoFileInputComponent', () => {
expect(helperText.length).toBe(1);
expect(dropZone.length).toBe(1);
const innerHelperText = helperText[0].nativeNode.firstElementChild;
const inputElement = dropZone[0].nativeNode.children.item(1);
expect(inputElement.attributes['aria-describedby']).toBeDefined();
expect(inputElement.attributes['aria-describedby'].value).toBe(
innerHelperText.id
const buttonElement = dropZone[0].nativeNode.children.item(0);
const buttonSpan = buttonElement.firstElementChild;

expect(buttonElement.attributes['aria-describedby']).toBeDefined();
expect(buttonSpan.id).toBeDefined();
expect(innerHelperText.id).toBeDefined();

expect(buttonElement.attributes['aria-describedby'].value).toBe(
`${innerHelperText.id} ${buttonSpan.id}`
);
});
it('should display text in french by default', () => {
Expand Down
Loading
Loading