-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2131 from ProgrammeVitam/story_13488-design-system
Story #13488: Typography, spacing & misc
- Loading branch information
Showing
32 changed files
with
262 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
ui/ui-frontend/projects/design-system/src/app/components/colors/colors.module.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
ui/ui-frontend/projects/design-system/src/app/components/spacing/spacing.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<h2>{{ 'SPACING.PADDING' | translate }}</h2> | ||
<div class="d-flex flex-column"> | ||
@for (padding of paddings; track padding) { | ||
<strong>p-{{ padding }}</strong> | ||
<div #el class="outer p-{{ padding }}"> | ||
<div class="inner"> | ||
{{ getPadding(el) }} | ||
</div> | ||
</div> | ||
} | ||
</div> | ||
|
||
<h2>{{ 'SPACING.MARGIN' | translate }}</h2> | ||
<div class="d-flex flex-column"> | ||
@for (margin of margins; track margin) { | ||
<strong>m-{{ margin }}</strong> | ||
<div class="outer"> | ||
<div #el class="inner m-{{ margin }}"> | ||
{{ getMargin(el) }} | ||
</div> | ||
</div> | ||
} | ||
</div> |
12 changes: 12 additions & 0 deletions
12
ui/ui-frontend/projects/design-system/src/app/components/spacing/spacing.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.outer { | ||
background-color: var(--vitamui-primary); | ||
} | ||
|
||
.inner { | ||
background-color: var(--vitamui-secondary); | ||
color: white; | ||
} | ||
|
||
.m-auto { | ||
max-width: 50%; | ||
} |
22 changes: 22 additions & 0 deletions
22
ui/ui-frontend/projects/design-system/src/app/components/spacing/spacing.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component } from '@angular/core'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
|
||
@Component({ | ||
selector: 'design-system-spacing', | ||
templateUrl: './spacing.component.html', | ||
styleUrls: ['./spacing.component.scss'], | ||
imports: [TranslateModule], | ||
standalone: true, | ||
}) | ||
export class SpacingComponent { | ||
paddings = [0, 1, 2, 3, 4, 5, 6, 7, 8]; | ||
margins = [0, 1, 2, 3, 4, 5, 6, 7, 8, 'auto']; | ||
|
||
getPadding(element: HTMLElement) { | ||
return getComputedStyle(element).padding; | ||
} | ||
|
||
getMargin(element: HTMLElement) { | ||
return getComputedStyle(element).margin; | ||
} | ||
} |
113 changes: 51 additions & 62 deletions
113
...i-frontend/projects/design-system/src/app/components/typography/typography.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
...i-frontend/projects/design-system/src/app/components/typography/typography.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
div { | ||
background-color: white; | ||
:host > div { | ||
background-color: var(--vitamui-background); | ||
padding: 20px; | ||
} | ||
|
||
.d-flex { | ||
gap: 1rem; | ||
} |
Oops, something went wrong.