@lab-anssi/ui-kit 1.11.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,158 @@
1
+ <svelte:options
2
+ customElement={{
3
+ tag: 'lab-anssi-presentation-anssi',
4
+ }} />
5
+
6
+ <script>import Brique from "./Brique.svelte";
7
+ import { srcAsset } from "../../../assets/assets.js";
8
+ </script>
9
+
10
+ <Brique variation="transparent">
11
+ <div class="presentation-anssi">
12
+ <div class="logo-anssi">
13
+ <img src={srcAsset("/illustrations/logo-anssi.svg")} alt="Logo de l'ANSSI" />
14
+ </div>
15
+ <div class="contenu">
16
+ <h2>Qu'est ce que l'ANSSI ?</h2>
17
+ <p>
18
+ Créée en 2009, l’Agence nationale de la sécurité des systèmes d’information (ANSSI) est l’autorité nationale en matière de cybersécurité et de cyberdéfense.
19
+ <br />
20
+ <br />
21
+ <b>
22
+ Son action pour la protection de la Nation face aux cyberattaques se traduit en quatre grandes missions : défendre, connaître, partager, accompagner.
23
+ </b>
24
+ </p>
25
+ </div>
26
+ <div class="encart-action">
27
+ <a class="action" role="button" href="https://cyber.gouv.fr/" target="_blank">En savoir plus</a>
28
+ </div>
29
+ </div>
30
+ </Brique>
31
+
32
+
33
+ <style>.visible-tablette {
34
+ display: none !important;
35
+ }
36
+ @media (min-width: 576px) {
37
+ .visible-tablette {
38
+ display: unset !important;
39
+ }
40
+ }
41
+
42
+ @media (min-width: 576px) {
43
+ .invisible-tablette {
44
+ display: none !important;
45
+ }
46
+ }
47
+
48
+ .visible-desktop {
49
+ display: none !important;
50
+ }
51
+ @media (min-width: 932px) {
52
+ .visible-desktop {
53
+ display: unset !important;
54
+ }
55
+ }
56
+
57
+ @media (min-width: 932px) {
58
+ .invisible-desktop {
59
+ display: none !important;
60
+ }
61
+ }
62
+
63
+ .presentation-anssi {
64
+ color: #3a3a3a;
65
+ display: grid;
66
+ grid-template-columns: 1fr;
67
+ grid-template-areas: "logo-anssi" "contenu" "encart-action";
68
+ row-gap: 24px;
69
+ padding: 16px 16px;
70
+ }
71
+ @media (min-width: 932px) {
72
+ .presentation-anssi {
73
+ grid-template-columns: 1fr 1fr;
74
+ grid-template-areas: "contenu logo-anssi" "encart-action logo-anssi";
75
+ }
76
+ }
77
+ .presentation-anssi .logo-anssi {
78
+ grid-area: logo-anssi;
79
+ display: flex;
80
+ justify-content: center;
81
+ }
82
+ @media (min-width: 932px) {
83
+ .presentation-anssi .logo-anssi {
84
+ align-items: center;
85
+ }
86
+ }
87
+ .presentation-anssi .logo-anssi img {
88
+ max-width: 140px;
89
+ max-height: 140px;
90
+ }
91
+ .presentation-anssi .contenu {
92
+ text-align: center;
93
+ grid-area: contenu;
94
+ display: flex;
95
+ flex-direction: column;
96
+ gap: 8px;
97
+ align-items: center;
98
+ }
99
+ @media (min-width: 932px) {
100
+ .presentation-anssi .contenu {
101
+ text-align: start;
102
+ align-items: start;
103
+ }
104
+ }
105
+ .presentation-anssi .contenu h2 {
106
+ color: var(--brique-presentation-anssi-titre-couleur);
107
+ font-size: 1.75rem;
108
+ font-style: normal;
109
+ font-weight: 700;
110
+ line-height: 2.25rem;
111
+ margin: 0;
112
+ }
113
+ .presentation-anssi .contenu p {
114
+ font-size: 1rem;
115
+ font-style: normal;
116
+ font-weight: 400;
117
+ line-height: 1.5rem;
118
+ margin: 0;
119
+ }
120
+ .presentation-anssi .encart-action {
121
+ grid-area: encart-action;
122
+ width: 100%;
123
+ display: flex;
124
+ justify-content: center;
125
+ }
126
+ @media (min-width: 932px) {
127
+ .presentation-anssi .encart-action {
128
+ justify-content: start;
129
+ }
130
+ }
131
+ .presentation-anssi .encart-action a[role=button] {
132
+ width: 100%;
133
+ text-decoration: none;
134
+ font-family: Marianne, sans-serif;
135
+ padding: 8px 16px;
136
+ text-align: center;
137
+ font-weight: 500;
138
+ font-size: 1rem;
139
+ line-height: 24px;
140
+ border-radius: 4px;
141
+ }
142
+ @media (min-width: 576px) {
143
+ .presentation-anssi .encart-action a[role=button] {
144
+ width: fit-content;
145
+ }
146
+ }
147
+ .presentation-anssi .encart-action a[role=button].action {
148
+ background-color: var(--brique-presentation-anssi-bouton-background);
149
+ color: var(--brique-presentation-anssi-bouton-texte);
150
+ border: 1px solid var(--brique-presentation-anssi-bouton-texte);
151
+ cursor: pointer;
152
+ }
153
+ .presentation-anssi .encart-action a[role=button].action:active {
154
+ background-color: var(--brique-presentation-anssi-bouton-background-active);
155
+ }
156
+ .presentation-anssi .encart-action a[role=button].action:hover {
157
+ background-color: var(--brique-presentation-anssi-bouton-background-hover);
158
+ }</style>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ exports?: {} | undefined;
9
+ bindings?: string | undefined;
10
+ };
11
+ export type PresentationAnssiProps = typeof __propDef.props;
12
+ export type PresentationAnssiEvents = typeof __propDef.events;
13
+ export type PresentationAnssiSlots = typeof __propDef.slots;
14
+ export default class PresentationAnssi extends SvelteComponent<PresentationAnssiProps, PresentationAnssiEvents, PresentationAnssiSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,169 @@
1
+ <svelte:options
2
+ customElement={{
3
+ tag: 'lab-anssi-brique-rejoindre-la-communaute',
4
+ props: {
5
+ titre: { reflect: false, type: 'String', attribute: 'titre' },
6
+ raisons: { reflect: false, type: 'Array', attribute: 'raisons' },
7
+ action: { reflect: false, type: 'Object', attribute: 'action' },
8
+ illustration: { reflect: false, type: 'Object', attribute: 'illustration' }
9
+ }
10
+ }} />
11
+
12
+ <script>import Brique from "./Brique.svelte";
13
+ export let titre;
14
+ export let raisons;
15
+ export let action = void 0;
16
+ export let illustration;
17
+ </script>
18
+
19
+ <Brique variation="primaire">
20
+ <div class="grille-contenu">
21
+ <div class="illustration">
22
+ <img src={illustration.lien} alt={illustration.alt} />
23
+ </div>
24
+ <div class="contenu">
25
+ <h2>{titre}</h2>
26
+ <p>
27
+ En tant que <b>membre de la communauté</b>, vous pourrez :
28
+ </p>
29
+ <ul>
30
+ {#each raisons as raison, idx (idx)}
31
+ <li>{raison}</li>
32
+ {/each}
33
+ </ul>
34
+ </div>
35
+ <div class="action">
36
+ {#if action}
37
+ <a role="button" href={action.lien} target="_blank">
38
+ {action.titre}
39
+ </a>
40
+ {/if}
41
+ </div>
42
+ </div>
43
+ </Brique>
44
+
45
+ <style>.visible-tablette {
46
+ display: none !important;
47
+ }
48
+ @media (min-width: 576px) {
49
+ .visible-tablette {
50
+ display: unset !important;
51
+ }
52
+ }
53
+
54
+ @media (min-width: 576px) {
55
+ .invisible-tablette {
56
+ display: none !important;
57
+ }
58
+ }
59
+
60
+ .visible-desktop {
61
+ display: none !important;
62
+ }
63
+ @media (min-width: 932px) {
64
+ .visible-desktop {
65
+ display: unset !important;
66
+ }
67
+ }
68
+
69
+ @media (min-width: 932px) {
70
+ .invisible-desktop {
71
+ display: none !important;
72
+ }
73
+ }
74
+
75
+ .grille-contenu {
76
+ display: grid;
77
+ grid-template-columns: 1fr;
78
+ grid-template-areas: "contenu" "illustration" "action";
79
+ row-gap: 32px;
80
+ }
81
+ @media (min-width: 932px) {
82
+ .grille-contenu {
83
+ grid-template-columns: 1fr 1fr;
84
+ grid-template-areas: "illustration contenu" "illustration action";
85
+ row-gap: 0;
86
+ column-gap: 24px;
87
+ }
88
+ }
89
+ .grille-contenu .contenu {
90
+ grid-area: contenu;
91
+ display: flex;
92
+ flex-direction: column;
93
+ row-gap: 8px;
94
+ }
95
+ @media (min-width: 932px) {
96
+ .grille-contenu .contenu {
97
+ justify-content: center;
98
+ }
99
+ }
100
+ .grille-contenu .contenu h2 {
101
+ font-size: 1.75rem;
102
+ line-height: 2.25rem;
103
+ font-weight: 700;
104
+ word-break: break-word;
105
+ margin: 0;
106
+ }
107
+ .grille-contenu .contenu p {
108
+ font-size: 1rem;
109
+ font-weight: 400;
110
+ line-height: 1.5rem;
111
+ margin: 0;
112
+ }
113
+ .grille-contenu .action {
114
+ grid-area: action;
115
+ }
116
+ .grille-contenu .action a[role=button] {
117
+ display: flex;
118
+ justify-content: center;
119
+ text-decoration: none;
120
+ font-family: Marianne, sans-serif;
121
+ padding: 8px 16px;
122
+ max-width: 100%;
123
+ text-align: center;
124
+ font-weight: 500;
125
+ font-size: 1rem;
126
+ line-height: 24px;
127
+ border-radius: 4px;
128
+ background-color: var(--brique-contenu-deux-colonnes-action-bouton-background);
129
+ color: var(--brique-contenu-deux-colonnes-action-bouton-texte);
130
+ border: none;
131
+ cursor: pointer;
132
+ }
133
+ .grille-contenu .action a[role=button]:active {
134
+ background-color: var(--brique-contenu-deux-colonnes-action-bouton-background-active);
135
+ box-shadow: none;
136
+ border: none;
137
+ }
138
+ .grille-contenu .action a[role=button]:hover {
139
+ background-color: var(--brique-contenu-deux-colonnes-action-bouton-background-hover);
140
+ box-shadow: none;
141
+ border: none;
142
+ }
143
+ @media (min-width: 576px) {
144
+ .grille-contenu .action a[role=button] {
145
+ max-width: unset;
146
+ width: fit-content;
147
+ }
148
+ }
149
+ .grille-contenu .illustration {
150
+ grid-area: illustration;
151
+ }
152
+ .grille-contenu .illustration img {
153
+ width: 204px;
154
+ height: 157px;
155
+ display: flex;
156
+ margin: 0 auto 0 auto;
157
+ }
158
+ @media (min-width: 576px) {
159
+ .grille-contenu .illustration img {
160
+ width: 364px;
161
+ height: 282px;
162
+ }
163
+ }
164
+ @media (min-width: 932px) {
165
+ .grille-contenu .illustration img {
166
+ width: 364px;
167
+ height: 282px;
168
+ }
169
+ }</style>
@@ -0,0 +1,22 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { Action, Image } from "../../../types";
3
+ declare const __propDef: {
4
+ props: {
5
+ titre: string;
6
+ raisons: string[];
7
+ action?: Action | undefined;
8
+ illustration: Image;
9
+ };
10
+ events: {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {};
14
+ exports?: {} | undefined;
15
+ bindings?: string | undefined;
16
+ };
17
+ export type RejoindreLaCommunauteProps = typeof __propDef.props;
18
+ export type RejoindreLaCommunauteEvents = typeof __propDef.events;
19
+ export type RejoindreLaCommunauteSlots = typeof __propDef.slots;
20
+ export default class RejoindreLaCommunaute extends SvelteComponent<RejoindreLaCommunauteProps, RejoindreLaCommunauteEvents, RejoindreLaCommunauteSlots> {
21
+ }
22
+ export {};
@@ -1,13 +1,17 @@
1
- <svelte:options customElement={{
2
- tag: 'lab-anssi-temoignages',
3
- props: {
4
- titre: { reflect: false, type: 'String', attribute: 'titre' },
5
- temoignages: { reflect: false, type: 'Array', attribute: 'temoignages' },
6
- }
7
- }} />
1
+ <svelte:options
2
+ customElement={{
3
+ tag: "lab-anssi-temoignages",
4
+ props: {
5
+ titre: { reflect: false, type: "String", attribute: "titre" },
6
+ temoignages: { reflect: false, type: "Array", attribute: "temoignages" },
7
+ },
8
+ }}
9
+ />
8
10
 
9
11
  <script>import Brique from "../Brique.svelte";
10
12
  import IconeTemoignage from "./IconeTemoignage.svelte";
13
+ import IconeFlecheGauche from "../CarrouselTuiles/IconeFlecheGauche.svelte";
14
+ import IconeFlecheDroite from "../CarrouselTuiles/IconeFlecheDroite.svelte";
11
15
  export let titre = "Les avis de nos utilisateurs";
12
16
  export let temoignages = [];
13
17
  let elementCarrousel;
@@ -31,16 +35,26 @@ const scrollVers = (direction) => {
31
35
  {#each temoignages as temoignage, idx (idx)}
32
36
  <div class="temoignage">
33
37
  <IconeTemoignage />
34
- <h4{temoignage.citation} »</h4>
38
+ <h4>«&nbsp;{temoignage.citation}&nbsp;»</h4>
35
39
  <h5>{temoignage.auteur}</h5>
36
40
  <h6>{temoignage.source}</h6>
37
41
  </div>
38
42
  {/each}
39
43
  </div>
40
- <div class="conteneur-actions">
41
- <button class="precedent" type="button" on:click={() => scrollVers(Direction.GAUCHE)}>Précédent</button>
42
- <button class="suivant" type="button" on:click={() => scrollVers(Direction.DROITE)}>Suivant</button>
43
- </div>
44
+ {#if temoignages.length > 1}
45
+ <div class="conteneur-actions" class:deux-ou-moins={temoignages.length <= 2}>
46
+ <button class="precedent" type="button" on:click={() => scrollVers(Direction.GAUCHE)}
47
+ >
48
+ <span class="icone"><IconeFlecheGauche /></span>Précédent
49
+ </button
50
+ >
51
+ <button class="suivant" type="button" on:click={() => scrollVers(Direction.DROITE)}
52
+ >Suivant
53
+ <span class="icone"><IconeFlecheDroite /></span>
54
+ </button
55
+ >
56
+ </div>
57
+ {/if}
44
58
  </div>
45
59
  </div>
46
60
  </Brique>
@@ -96,8 +110,9 @@ const scrollVers = (direction) => {
96
110
  gap: 24px;
97
111
  }
98
112
  .brique-temoignages .carrousel-temoignages .conteneur-carrousel {
113
+ --gap-des-elements: 24px;
99
114
  display: flex;
100
- gap: 24px;
115
+ gap: var(--gap-des-elements);
101
116
  overflow-x: auto;
102
117
  scroll-behavior: smooth;
103
118
  scroll-snap-type: x mandatory;
@@ -106,18 +121,10 @@ const scrollVers = (direction) => {
106
121
  -webkit-overflow-scrolling: touch;
107
122
  padding-bottom: 24px;
108
123
  }
109
- @media (min-width: 576px) {
110
- .brique-temoignages .carrousel-temoignages .conteneur-carrousel {
111
- display: flex;
112
- flex-direction: row;
113
- }
114
- }
115
124
  .brique-temoignages .carrousel-temoignages .conteneur-carrousel .temoignage {
116
125
  width: 100%;
117
- box-sizing: border-box;
118
126
  flex-shrink: 0;
119
- scroll-snap-align: center;
120
- padding: 0 8px 0 8px;
127
+ scroll-snap-align: start;
121
128
  color: #161616;
122
129
  font-size: 1.25rem;
123
130
  font-style: normal;
@@ -138,13 +145,15 @@ const scrollVers = (direction) => {
138
145
  border-bottom: none;
139
146
  }
140
147
  }
148
+ @media (min-width: 768px) {
149
+ .brique-temoignages .carrousel-temoignages .conteneur-carrousel .temoignage {
150
+ width: calc(50% - var(--gap-des-elements));
151
+ }
152
+ }
141
153
  @media (min-width: 932px) {
142
154
  .brique-temoignages .carrousel-temoignages .conteneur-carrousel .temoignage {
143
- min-width: 388px;
144
- width: 388px;
145
- scroll-snap-align: start;
146
155
  padding-left: 32px;
147
- padding-right: 0;
156
+ box-sizing: border-box;
148
157
  border-left: 1px solid #dddddd;
149
158
  }
150
159
  }
@@ -182,10 +191,15 @@ const scrollVers = (direction) => {
182
191
  justify-content: center;
183
192
  gap: 24px;
184
193
  }
194
+ @media (min-width: 768px) {
195
+ .brique-temoignages .carrousel-temoignages .conteneur-actions.deux-ou-moins {
196
+ display: none;
197
+ }
198
+ }
185
199
  .brique-temoignages .carrousel-temoignages .conteneur-actions button {
186
200
  background: none;
187
201
  border: none;
188
- color: #000091;
202
+ color: var(--brique-carrousel-bouton-action-texte-couleur);
189
203
  font-size: 1.125rem;
190
204
  font-weight: 400;
191
205
  line-height: 1.75rem;
@@ -193,18 +207,11 @@ const scrollVers = (direction) => {
193
207
  display: flex;
194
208
  align-items: center;
195
209
  gap: 8px;
196
- font-family: Marianne;
197
210
  }
198
- .brique-temoignages .carrousel-temoignages .conteneur-actions .precedent:before,
199
- .brique-temoignages .carrousel-temoignages .conteneur-actions .suivant:after {
200
- content: url("https://lab-anssi-ui-kit-prod-s3-assets.cellar-c2.services.clever-cloud.com/icones/fleche_gauche_bleue.svg");
211
+ .brique-temoignages .carrousel-temoignages .conteneur-actions .precedent > .icone,
212
+ .brique-temoignages .carrousel-temoignages .conteneur-actions .suivant > .icone {
201
213
  display: flex;
202
- width: 24px;
203
- height: 24px;
204
- line-height: 1.75rem;
205
- }
206
- .brique-temoignages .carrousel-temoignages .conteneur-actions .suivant:after {
207
- transform: rotate(180deg);
214
+ align-items: center;
208
215
  }
209
216
  .brique-temoignages .carrousel-temoignages .conteneur-actions button:hover {
210
217
  text-decoration: underline;