diff --git a/src/app/common/components/input-field/input-field.component.html b/src/app/common/components/input-field/input-field.component.html index 6f852710..c79d61fe 100644 --- a/src/app/common/components/input-field/input-field.component.html +++ b/src/app/common/components/input-field/input-field.component.html @@ -1,9 +1,33 @@ @if (type === 'date') { - + + } @else if (type === 'password') { + + @if (showPasswordRules) { + +
Choisir un mot de passe
+
+ + +
    +
  • Au moins une lettre minuscule
  • +
  • Au moins une lettre majuscule
  • +
  • Au moins un chiffre
  • +
  • Minimum 8 caractères
  • +
+
+ } +
} @else { - + } - +
diff --git a/src/app/common/components/input-field/input-field.component.scss b/src/app/common/components/input-field/input-field.component.scss index 90dab3ef..2bcf9874 100644 --- a/src/app/common/components/input-field/input-field.component.scss +++ b/src/app/common/components/input-field/input-field.component.scss @@ -1,9 +1,10 @@ p-floatlabel { input, - ::ng-deep p-calendar span input { + ::ng-deep p-calendar span input, + ::ng-deep p-password div input { width: 100%; font-size: 16px; - background-color: var(--background-color-light); + background-color: var(--background-color-white); border: var(--grey-border); border-radius: 8px; transition: border-color 0.3s ease-in-out; @@ -24,4 +25,13 @@ p-floatlabel { color: var(--primary-light-color); } } + + ::ng-deep .p-password:has(.p-password-toggle-mask-icon) .p-password-input { + padding-inline-end: 12px !important; + } +} + +::ng-deep p-password div eyeicon svg.p-icon, +::ng-deep p-password div eyeslashicon svg.p-icon { + color: var(--icon-color); } diff --git a/src/app/common/components/input-field/input-field.component.ts b/src/app/common/components/input-field/input-field.component.ts index 5589ed76..d32da955 100644 --- a/src/app/common/components/input-field/input-field.component.ts +++ b/src/app/common/components/input-field/input-field.component.ts @@ -4,11 +4,13 @@ import { InputTextModule } from 'primeng/inputtext'; import { FloatLabelModule } from 'primeng/floatlabel'; import { FormsModule } from '@angular/forms'; import { CalendarModule } from 'primeng/calendar'; +import { PasswordModule } from 'primeng/password'; +import { DividerModule } from 'primeng/divider'; @Component({ selector: 'app-input-field', standalone: true, - imports: [CommonModule, InputTextModule, FloatLabelModule, CalendarModule, FormsModule], + imports: [CommonModule, InputTextModule, FloatLabelModule, CalendarModule, FormsModule, PasswordModule, DividerModule], templateUrl: './input-field.component.html', styleUrls: ['./input-field.component.scss'], }) @@ -17,5 +19,6 @@ export class InputFieldComponent { @Input() type: string = 'text'; @Input() disabled: boolean = false; @Input() variant: 'in' | 'on' = 'in'; + @Input() showPasswordRules: boolean = false; value: string = ''; } diff --git a/src/app/features/activity/pages/demo/demo.component.html b/src/app/features/activity/pages/demo/demo.component.html index 7eabea62..01b9a21c 100644 --- a/src/app/features/activity/pages/demo/demo.component.html +++ b/src/app/features/activity/pages/demo/demo.component.html @@ -1,3 +1,5 @@ + +

Single Input Demo

diff --git a/src/app/features/activity/pages/demo/demo.component.scss b/src/app/features/activity/pages/demo/demo.component.scss index a391ceed..390a388a 100644 --- a/src/app/features/activity/pages/demo/demo.component.scss +++ b/src/app/features/activity/pages/demo/demo.component.scss @@ -1,3 +1,5 @@ +// TODO : SUPPRIMER CE FICHIER + .input-demo { display: flex; flex-direction: column; @@ -5,6 +7,7 @@ align-items: center; height: 100%; margin: 50px 0; + gap: 25px; h3 { color: var(--primary-light-color); diff --git a/src/app/features/activity/pages/demo/demo.component.ts b/src/app/features/activity/pages/demo/demo.component.ts index b4b0256a..d1ee7e86 100644 --- a/src/app/features/activity/pages/demo/demo.component.ts +++ b/src/app/features/activity/pages/demo/demo.component.ts @@ -1,3 +1,5 @@ +// TODO : SUPPRIMER CE FICHIER + import { Component } from '@angular/core'; import { InputFieldComponent } from 'src/app/common/components/input-field/input-field.component'; diff --git a/src/styles.scss b/src/styles.scss index eca60381..1d7f2168 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -16,6 +16,7 @@ body { --background-color-white: white; --background-color-light: #f8f8f8; --font-color: #505050; + --icon-color: #d9d9d9; --primary-dark-color: #13678a; --primary-light-color: #1385a8;