Skip to content
Snippets Groups Projects
Commit 425cfc21 authored by Mathieu Ponton's avatar Mathieu Ponton
Browse files

Merge branch '577-fix-checkboxes' into 'dev'

fix (styles): correct padding for checkboxes in the carto

See merge request !861
parents 58c74bf0 8f74c580
No related branches found
No related tags found
2 merge requests!907V3.2.0,!861fix (styles): correct padding for checkboxes in the carto
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
.collapse-header { .collapse-header {
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
border: 0px solid transparent; border: 0 solid transparent;
align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background-color: $white; background-color: $white;
padding: 0; padding: 0;
text-align: left; text-align: left;
min-height: 40px;
// SIZES // SIZES
&.small { &.small {
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
} }
&:focus-visible { &:focus-visible {
outline-offset: 0px; outline-offset: 0;
outline: 2px solid $blue-focus; outline: 2px solid $blue-focus;
} }
} }
...@@ -19,3 +19,4 @@ export class CollapseHeaderComponent { ...@@ -19,3 +19,4 @@ export class CollapseHeaderComponent {
expanded = false; expanded = false;
size: 'small' | 'medium' = 'small'; size: 'small' | 'medium' = 'small';
} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
[label]="module.name" [label]="module.name"
[for]="module.id" [for]="module.id"
[checked]="searchService.getIndex(checkedModules, module.id, categories[0].id) > -1" [checked]="searchService.getIndex(checkedModules, module.id, categories[0].id) > -1"
[size]="'medium'" [size]="'small'"
(action)="onCheckboxChange($event, categories[0].id, module.id, module.name)" (action)="onCheckboxChange($event, categories[0].id, module.id, module.name)"
/> />
</div> </div>
...@@ -28,15 +28,17 @@ ...@@ -28,15 +28,17 @@
<div *ngIf="categories.length > 1" class="modalContent multipleCollapse"> <div *ngIf="categories.length > 1" class="modalContent multipleCollapse">
<app-collapse *ngFor="let c of categories"> <app-collapse *ngFor="let c of categories">
<app-collapse-header> <app-collapse-header>
<div class="collapseHeader"> <div class="collapseHeader">
<app-checkbox <app-checkbox
[size]="'medium'" [size]="'small'"
[id]="c.id" [id]="c.id"
[checked]="getCategoryCheckboxStatus(c) === 'checked'" [checked]="getCategoryCheckboxStatus(c) === 'checked'"
[indeterminate]="getCategoryCheckboxStatus(c) === 'halfChecked'" [indeterminate]="getCategoryCheckboxStatus(c) === 'halfChecked'"
(action)="handleCategoryCheckBox($event, c); $event.stopPropagation()" (action)="handleCategoryCheckBox($event, c); $event.stopPropagation()"
/> [ngStyle]="{'padding': '4px 4px'}"
<span [attr.aria-label]="">{{ c.name }}</span> ></app-checkbox>
<span [attr.aria-label]="" id="categoryName">{{ c.name }}</span>
<!-- label only for screen reader to avoid selecting all the elements when clicking the label --> <!-- label only for screen reader to avoid selecting all the elements when clicking the label -->
<label class="visually-hidden" for="{{ c.id }}">{{ c.name }}. Cocher pour tout sélectionner</label> <label class="visually-hidden" for="{{ c.id }}">{{ c.name }}. Cocher pour tout sélectionner</label>
</div> </div>
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
[ariaLabel]="'Effacer et fermer'" [ariaLabel]="'Effacer et fermer'"
(action)="clearFilters()" (action)="clearFilters()"
/> />
<app-button [variant]="'primary'" [label]="'Appliquer'" (action)="emitModules(checkedModules)" /> <app-button [variant]="'primary'" [label]="'Appliquer'" (action)="emitModules(checkedModules)"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
z-index: $modal-z-index; z-index: $modal-z-index;
margin-top: 132px; margin-top: 132px;
.filterModalContainer { .filterModalContainer {
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.35); box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.35);
background-color: $white; background-color: $white;
border-radius: 8px; border-radius: 8px;
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
.moreFiltersHeader { .moreFiltersHeader {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 16px 16px 0px 40px; padding: 16px 16px 0 40px;
h3 { h3 {
@include font-bold-18; @include font-bold-18;
width: 100%; width: 100%;
...@@ -76,6 +76,11 @@ ...@@ -76,6 +76,11 @@
align-items: center; align-items: center;
gap: 8px; gap: 8px;
padding: 4px 8px; padding: 4px 8px;
#categoryName {
padding: 0 0;
}
} }
.collapseContent { .collapseContent {
display: flex; display: flex;
...@@ -84,6 +89,7 @@ ...@@ -84,6 +89,7 @@
padding-block: 16px; padding-block: 16px;
padding-left: 24px; padding-left: 24px;
border-top: 1px solid $grey-4; border-top: 1px solid $grey-4;
} }
} }
} }
...@@ -94,3 +100,4 @@ ...@@ -94,3 +100,4 @@
padding-block: 16px; padding-block: 16px;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment