@lab-anssi/ui-kit 1.12.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.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { default as Alerte } from "./Alerte.svelte";
2
2
  export { default as CentreAide } from "./CentreAide.svelte";
3
3
  export { default as ResumePssi } from "./lab/ResumePssi.svelte";
4
4
  export { default as BriqueHero } from "./lab/vitrines-produits/briques/BriqueHero.svelte";
5
- export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles.svelte";
5
+ export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles/CarrouselTuiles.svelte";
6
6
  export { default as MesServicesCyberBandeau } from "./mes-services-cyber/bandeau/Bandeau.svelte";
7
7
  export { default as LienDiagnosticCyber } from "./mes-services-cyber/lien/LienDiagnosticCyber.svelte";
8
8
  export { default as NavigationPiedDePage } from "./pied-de-page/NavigationPiedDePage.svelte";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { default as Alerte } from "./Alerte.svelte";
2
2
  export { default as CentreAide } from "./CentreAide.svelte";
3
3
  export { default as ResumePssi } from "./lab/ResumePssi.svelte";
4
4
  export { default as BriqueHero } from "./lab/vitrines-produits/briques/BriqueHero.svelte";
5
- export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles.svelte";
5
+ export { default as CarrouselTuiles } from "./lab/vitrines-produits/briques/CarrouselTuiles/CarrouselTuiles.svelte";
6
6
  export { default as MesServicesCyberBandeau } from "./mes-services-cyber/bandeau/Bandeau.svelte";
7
7
  export { default as LienDiagnosticCyber } from "./mes-services-cyber/lien/LienDiagnosticCyber.svelte";
8
8
  export { default as NavigationPiedDePage } from "./pied-de-page/NavigationPiedDePage.svelte";
@@ -45,7 +45,6 @@ section {
45
45
  box-sizing: border-box;
46
46
  text-align: left;
47
47
  color: white;
48
- width: 100vw;
49
48
  }
50
49
  section.sans-marge-haute {
51
50
  padding-top: 0;
@@ -5,8 +5,10 @@
5
5
  }
6
6
  }} />
7
7
 
8
- <script>import Brique from "./Brique.svelte";
9
- import Tuile from "./Tuile.svelte";
8
+ <script>import Brique from "../Brique.svelte";
9
+ import Tuile from "../Tuile.svelte";
10
+ import IconeFlecheGauche from "./IconeFlecheGauche.svelte";
11
+ import IconeFlecheDroite from "./IconeFlecheDroite.svelte";
10
12
  export let tuiles = [];
11
13
  let elementCarrousel;
12
14
  const versDirection = (direction) => {
@@ -35,8 +37,14 @@ const suivant = () => versDirection(1);
35
37
  {/each}
36
38
  </div>
37
39
  <div class="conteneur-actions">
38
- <button class="precedent" on:click={precedent}>Précédent</button>
39
- <button class="suivant" on:click={suivant}>Suivant</button>
40
+ <button class="precedent" on:click={precedent}>
41
+ <span class="icone"><IconeFlecheGauche /></span>
42
+ Précédent
43
+ </button>
44
+ <button class="suivant" on:click={suivant}>
45
+ Suivant
46
+ <span class="icone"><IconeFlecheDroite /></span>
47
+ </button>
40
48
  </div>
41
49
  </Brique>
42
50
  </div>
@@ -106,7 +114,7 @@ const suivant = () => versDirection(1);
106
114
  .conteneur-actions button {
107
115
  background: none;
108
116
  border: none;
109
- color: #000091;
117
+ color: var(--brique-carrousel-bouton-action-texte-couleur);
110
118
  font-size: 18px;
111
119
  font-weight: 400;
112
120
  line-height: 28px;
@@ -114,20 +122,12 @@ const suivant = () => versDirection(1);
114
122
  display: flex;
115
123
  align-items: center;
116
124
  gap: 8px;
117
- font-family: Marianne;
118
125
  }
119
126
 
120
- .conteneur-actions .precedent:before,
121
- .conteneur-actions .suivant:after {
122
- content: url("https://lab-anssi-ui-kit-prod-s3-assets.cellar-c2.services.clever-cloud.com/icones/fleche_gauche_bleue.svg");
127
+ .conteneur-actions .precedent > .icone,
128
+ .conteneur-actions .suivant > .icone {
123
129
  display: flex;
124
- width: 24px;
125
- height: 24px;
126
- line-height: 28px;
127
- }
128
-
129
- .conteneur-actions .suivant:after {
130
- transform: rotate(180deg);
130
+ align-items: center;
131
131
  }
132
132
 
133
133
  .conteneur-actions button:hover {
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import type { Tuiles } from "../../../types.js";
2
+ import type { Tuiles } from "../../../../types.js";
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  tuiles?: Tuiles;
@@ -0,0 +1,41 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.21875 7.33336H13.3334V8.6667H5.21875L8.79475 12.2427L7.85208 13.1854L2.66675 8.00003L7.85208 2.8147L8.79475 3.75736L5.21875 7.33336Z" fill="#042794"/>
3
+ </svg>
4
+
5
+ <style>.visible-tablette {
6
+ display: none !important;
7
+ }
8
+ @media (min-width: 576px) {
9
+ .visible-tablette {
10
+ display: unset !important;
11
+ }
12
+ }
13
+
14
+ @media (min-width: 576px) {
15
+ .invisible-tablette {
16
+ display: none !important;
17
+ }
18
+ }
19
+
20
+ .visible-desktop {
21
+ display: none !important;
22
+ }
23
+ @media (min-width: 932px) {
24
+ .visible-desktop {
25
+ display: unset !important;
26
+ }
27
+ }
28
+
29
+ @media (min-width: 932px) {
30
+ .invisible-desktop {
31
+ display: none !important;
32
+ }
33
+ }
34
+
35
+ svg {
36
+ transform: rotate(180deg);
37
+ }
38
+
39
+ svg path {
40
+ fill: var(--brique-carrousel-bouton-action-texte-couleur);
41
+ }</style>
@@ -0,0 +1,25 @@
1
+ /** @typedef {typeof __propDef.props} IconeFlecheDroiteProps */
2
+ /** @typedef {typeof __propDef.events} IconeFlecheDroiteEvents */
3
+ /** @typedef {typeof __propDef.slots} IconeFlecheDroiteSlots */
4
+ export default class IconeFlecheDroite extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type IconeFlecheDroiteProps = typeof __propDef.props;
11
+ export type IconeFlecheDroiteEvents = typeof __propDef.events;
12
+ export type IconeFlecheDroiteSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ exports?: undefined;
23
+ bindings?: undefined;
24
+ };
25
+ export {};
@@ -0,0 +1,37 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.21875 7.33336H13.3334V8.6667H5.21875L8.79475 12.2427L7.85208 13.1854L2.66675 8.00003L7.85208 2.8147L8.79475 3.75736L5.21875 7.33336Z" fill="#042794"/>
3
+ </svg>
4
+
5
+ <style>.visible-tablette {
6
+ display: none !important;
7
+ }
8
+ @media (min-width: 576px) {
9
+ .visible-tablette {
10
+ display: unset !important;
11
+ }
12
+ }
13
+
14
+ @media (min-width: 576px) {
15
+ .invisible-tablette {
16
+ display: none !important;
17
+ }
18
+ }
19
+
20
+ .visible-desktop {
21
+ display: none !important;
22
+ }
23
+ @media (min-width: 932px) {
24
+ .visible-desktop {
25
+ display: unset !important;
26
+ }
27
+ }
28
+
29
+ @media (min-width: 932px) {
30
+ .invisible-desktop {
31
+ display: none !important;
32
+ }
33
+ }
34
+
35
+ svg path {
36
+ fill: var(--brique-carrousel-bouton-action-texte-couleur);
37
+ }</style>
@@ -0,0 +1,25 @@
1
+ /** @typedef {typeof __propDef.props} IconeFlecheGaucheProps */
2
+ /** @typedef {typeof __propDef.events} IconeFlecheGaucheEvents */
3
+ /** @typedef {typeof __propDef.slots} IconeFlecheGaucheSlots */
4
+ export default class IconeFlecheGauche extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type IconeFlecheGaucheProps = typeof __propDef.props;
11
+ export type IconeFlecheGaucheEvents = typeof __propDef.events;
12
+ export type IconeFlecheGaucheSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ exports?: undefined;
23
+ bindings?: undefined;
24
+ };
25
+ export {};
@@ -31,13 +31,13 @@ export let illustration;
31
31
  <li>{raison}</li>
32
32
  {/each}
33
33
  </ul>
34
- <div class="action">
35
- {#if action}
36
- <a role="button" href={action.lien} target="_blank">
37
- {action.titre}
38
- </a>
39
- {/if}
40
- </div>
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
41
  </div>
42
42
  </div>
43
43
  </Brique>
@@ -75,13 +75,14 @@ export let illustration;
75
75
  .grille-contenu {
76
76
  display: grid;
77
77
  grid-template-columns: 1fr;
78
- grid-template-areas: "illustration" "contenu";
79
- gap: 32px;
78
+ grid-template-areas: "contenu" "illustration" "action";
79
+ row-gap: 32px;
80
80
  }
81
81
  @media (min-width: 932px) {
82
82
  .grille-contenu {
83
83
  grid-template-columns: 1fr 1fr;
84
- grid-template-areas: "illustration contenu";
84
+ grid-template-areas: "illustration contenu" "illustration action";
85
+ row-gap: 0;
85
86
  column-gap: 24px;
86
87
  }
87
88
  }
@@ -109,10 +110,10 @@ export let illustration;
109
110
  line-height: 1.5rem;
110
111
  margin: 0;
111
112
  }
112
- .grille-contenu .contenu .action {
113
- margin-top: 32px;
113
+ .grille-contenu .action {
114
+ grid-area: action;
114
115
  }
115
- .grille-contenu .contenu .action a[role=button] {
116
+ .grille-contenu .action a[role=button] {
116
117
  display: flex;
117
118
  justify-content: center;
118
119
  text-decoration: none;
@@ -129,18 +130,18 @@ export let illustration;
129
130
  border: none;
130
131
  cursor: pointer;
131
132
  }
132
- .grille-contenu .contenu .action a[role=button]:active {
133
+ .grille-contenu .action a[role=button]:active {
133
134
  background-color: var(--brique-contenu-deux-colonnes-action-bouton-background-active);
134
135
  box-shadow: none;
135
136
  border: none;
136
137
  }
137
- .grille-contenu .contenu .action a[role=button]:hover {
138
+ .grille-contenu .action a[role=button]:hover {
138
139
  background-color: var(--brique-contenu-deux-colonnes-action-bouton-background-hover);
139
140
  box-shadow: none;
140
141
  border: none;
141
142
  }
142
143
  @media (min-width: 576px) {
143
- .grille-contenu .contenu .action a[role=button] {
144
+ .grille-contenu .action a[role=button] {
144
145
  max-width: unset;
145
146
  width: fit-content;
146
147
  }
@@ -149,16 +150,20 @@ export let illustration;
149
150
  grid-area: illustration;
150
151
  }
151
152
  .grille-contenu .illustration img {
152
- width: 100%;
153
- max-height: 250px;
153
+ width: 204px;
154
+ height: 157px;
155
+ display: flex;
156
+ margin: 0 auto 0 auto;
154
157
  }
155
158
  @media (min-width: 576px) {
156
159
  .grille-contenu .illustration img {
157
- max-height: none;
160
+ width: 364px;
161
+ height: 282px;
158
162
  }
159
163
  }
160
164
  @media (min-width: 932px) {
161
165
  .grille-contenu .illustration img {
162
- max-height: 330px;
166
+ width: 364px;
167
+ height: 282px;
163
168
  }
164
169
  }</style>
@@ -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;