@lab-anssi/ui-kit 1.8.3 → 1.9.0
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/generateurImagesPlaceholders.d.ts +1 -1
- package/dist/generateurImagesPlaceholders.js +2 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/lab/vitrines-produits/briques/Brique.svelte +15 -1
- package/dist/lab/vitrines-produits/briques/Brique.svelte.d.ts +3 -1
- package/dist/lab/vitrines-produits/briques/BriqueHero.svelte +8 -8
- package/dist/lab/vitrines-produits/briques/BriqueHero.svelte.d.ts +2 -2
- package/dist/lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte +76 -0
- package/dist/lab/vitrines-produits/briques/BriqueTitreMultimedia.svelte.d.ts +20 -0
- package/dist/lab/vitrines-produits/briques/CarrouselTuiles.svelte +13 -31
- package/dist/lab/vitrines-produits/briques/LecteurVideo.svelte +57 -0
- package/dist/lab/vitrines-produits/briques/LecteurVideo.svelte.d.ts +21 -0
- package/dist/lab/vitrines-produits/briques/Tuile.svelte +77 -29
- package/dist/lab/vitrines-produits/briques/Tuile.svelte.d.ts +1 -1
- package/dist/lab/vitrines-produits/briques/marelle/Etape.svelte +159 -0
- package/dist/lab/vitrines-produits/briques/marelle/Etape.svelte.d.ts +20 -0
- package/dist/lab/vitrines-produits/briques/marelle/Marelle.svelte +121 -0
- package/dist/lab/vitrines-produits/briques/marelle/Marelle.svelte.d.ts +21 -0
- package/dist/types.d.ts +15 -0
- package/dist/webcomponents/lab-anssi-ui-kit.iife.js +32 -31
- package/dist/webcomponents/lab-anssi-ui-kit.jsx.d.ts +11 -2
- package/package.json +4 -3
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script>export let index;
|
|
2
|
+
export let etapeMarelle;
|
|
3
|
+
const estPair = (index + 1) % 2 === 0;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class={`marelle-etape ${estPair ? 'pair' : 'impair'}`}>
|
|
7
|
+
<div class="illustration">
|
|
8
|
+
<img src={etapeMarelle.illustration.lien} alt={etapeMarelle.illustration.alt} />
|
|
9
|
+
</div>
|
|
10
|
+
<div class="numero-etape">
|
|
11
|
+
<div class="encart-rond">
|
|
12
|
+
<span>{index + 1}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="contenu">
|
|
16
|
+
<h4>{etapeMarelle.titre}</h4>
|
|
17
|
+
<p>{etapeMarelle.description}</p>
|
|
18
|
+
{#if etapeMarelle.lien}
|
|
19
|
+
<a href={etapeMarelle.lien.href} target={etapeMarelle.lien.target}>{etapeMarelle.lien.texte}</a>
|
|
20
|
+
{/if}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<style>.visible-tablette {
|
|
25
|
+
display: none !important;
|
|
26
|
+
}
|
|
27
|
+
@media (min-width: 576px) {
|
|
28
|
+
.visible-tablette {
|
|
29
|
+
display: unset !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (min-width: 576px) {
|
|
34
|
+
.invisible-tablette {
|
|
35
|
+
display: none !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.visible-desktop {
|
|
40
|
+
display: none !important;
|
|
41
|
+
}
|
|
42
|
+
@media (min-width: 932px) {
|
|
43
|
+
.visible-desktop {
|
|
44
|
+
display: unset !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 932px) {
|
|
49
|
+
.invisible-desktop {
|
|
50
|
+
display: none !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.marelle-etape {
|
|
55
|
+
display: grid;
|
|
56
|
+
row-gap: 32px;
|
|
57
|
+
grid-template-areas: "numero-etape" "contenu" "illustration";
|
|
58
|
+
}
|
|
59
|
+
@media (min-width: 932px) {
|
|
60
|
+
.marelle-etape {
|
|
61
|
+
grid-template-areas: "contenu numero-etape illustration";
|
|
62
|
+
grid-template-columns: 1fr 136px 1fr;
|
|
63
|
+
column-gap: 24px;
|
|
64
|
+
row-gap: 24px;
|
|
65
|
+
}
|
|
66
|
+
.marelle-etape.pair {
|
|
67
|
+
grid-template-areas: "illustration numero-etape contenu";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
.marelle-etape.pair .numero-etape {
|
|
71
|
+
justify-content: center;
|
|
72
|
+
}
|
|
73
|
+
@media (min-width: 932px) {
|
|
74
|
+
.marelle-etape.pair .numero-etape {
|
|
75
|
+
justify-content: end;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.marelle-etape.impair .numero-etape {
|
|
79
|
+
justify-content: center;
|
|
80
|
+
}
|
|
81
|
+
@media (min-width: 932px) {
|
|
82
|
+
.marelle-etape.impair .numero-etape {
|
|
83
|
+
justify-content: start;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.marelle-etape .contenu {
|
|
87
|
+
grid-area: contenu;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
gap: 8px;
|
|
92
|
+
}
|
|
93
|
+
.marelle-etape .numero-etape {
|
|
94
|
+
grid-area: numero-etape;
|
|
95
|
+
text-align: center;
|
|
96
|
+
z-index: 1;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
}
|
|
100
|
+
.marelle-etape .numero-etape .encart-rond {
|
|
101
|
+
width: 72px;
|
|
102
|
+
height: 72px;
|
|
103
|
+
background: var(--brique-marelle-etapes-numero-etape-couleur);
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
}
|
|
109
|
+
.marelle-etape .numero-etape .encart-rond span {
|
|
110
|
+
color: #FFFFFF;
|
|
111
|
+
font-size: 2rem;
|
|
112
|
+
font-weight: bold;
|
|
113
|
+
}
|
|
114
|
+
@media (min-width: 932px) {
|
|
115
|
+
.marelle-etape .numero-etape .encart-rond span {
|
|
116
|
+
font-size: 2.5rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.illustration img {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.marelle-etape > div > h4 {
|
|
125
|
+
margin: 0;
|
|
126
|
+
font-size: 1.25rem;
|
|
127
|
+
line-height: 28px;
|
|
128
|
+
}
|
|
129
|
+
@media (min-width: 932px) {
|
|
130
|
+
.marelle-etape > div > h4 {
|
|
131
|
+
font-size: 1.375rem;
|
|
132
|
+
line-height: 28px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.marelle-etape > div > p {
|
|
137
|
+
margin: 0 0 8px 0;
|
|
138
|
+
font-size: 1rem;
|
|
139
|
+
line-height: 24px;
|
|
140
|
+
}
|
|
141
|
+
@media (min-width: 932px) {
|
|
142
|
+
.marelle-etape > div > p {
|
|
143
|
+
font-size: 1rem;
|
|
144
|
+
line-height: 24px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.marelle-etape > div > p > b {
|
|
149
|
+
color: var(--brique-marelle-etapes-lien-couleur);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.marelle-etape > div > a {
|
|
153
|
+
color: var(--brique-marelle-etapes-lien-couleur);
|
|
154
|
+
display: inline-flex;
|
|
155
|
+
border: none;
|
|
156
|
+
text-decoration: underline;
|
|
157
|
+
text-underline-offset: 4px;
|
|
158
|
+
text-decoration-thickness: 1px;
|
|
159
|
+
}</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { EtapeMarelle } from "../../../../types";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
index: number;
|
|
6
|
+
etapeMarelle: EtapeMarelle;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type EtapeProps = typeof __propDef.props;
|
|
16
|
+
export type EtapeEvents = typeof __propDef.events;
|
|
17
|
+
export type EtapeSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Etape extends SvelteComponent<EtapeProps, EtapeEvents, EtapeSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<svelte:options customElement={{
|
|
2
|
+
tag: 'lab-anssi-marelle',
|
|
3
|
+
props: {
|
|
4
|
+
titre: { reflect: false, type: 'String', attribute: 'titre' },
|
|
5
|
+
etapesmarelle: { reflect: false, type: 'Array', attribute: 'etapesmarelle' },
|
|
6
|
+
action: { reflect: false, type: 'Object', attribute: 'action' }
|
|
7
|
+
}
|
|
8
|
+
}} />
|
|
9
|
+
|
|
10
|
+
<script>import Brique from "../Brique.svelte";
|
|
11
|
+
import Etape from "./Etape.svelte";
|
|
12
|
+
export let titre = "";
|
|
13
|
+
export let etapesmarelle = [];
|
|
14
|
+
export let action;
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Brique variation="secondaire">
|
|
18
|
+
<div class="brique-marelle">
|
|
19
|
+
<div class="titre">{titre}</div>
|
|
20
|
+
<section class="marelle-etapes">
|
|
21
|
+
{#each etapesmarelle as etapeMarelle, index}
|
|
22
|
+
<Etape index={index} etapeMarelle={etapeMarelle} />
|
|
23
|
+
{/each}
|
|
24
|
+
</section>
|
|
25
|
+
{#if action}
|
|
26
|
+
<div class="bouton-action">
|
|
27
|
+
<a role="button" class="action" href={action.lien} target="_blank">{action.titre}</a>
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
</div>
|
|
31
|
+
</Brique>
|
|
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
|
+
.brique-marelle {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 48px;
|
|
67
|
+
}
|
|
68
|
+
.brique-marelle .titre {
|
|
69
|
+
color: var(--brique-marelle-titre-couleur);
|
|
70
|
+
text-align: center;
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
font-size: 1.75rem;
|
|
73
|
+
line-height: 36px;
|
|
74
|
+
}
|
|
75
|
+
@media (min-width: 932px) {
|
|
76
|
+
.brique-marelle .titre {
|
|
77
|
+
font-size: 2rem;
|
|
78
|
+
line-height: 40px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.brique-marelle .marelle-etapes {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: 48px;
|
|
85
|
+
color: #161616;
|
|
86
|
+
}
|
|
87
|
+
@media (min-width: 932px) {
|
|
88
|
+
.brique-marelle .marelle-etapes {
|
|
89
|
+
gap: 32px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.brique-marelle .bouton-action {
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
}
|
|
96
|
+
.brique-marelle .bouton-action a[role=button] {
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
font-family: Marianne, sans-serif;
|
|
99
|
+
padding: 8px 16px;
|
|
100
|
+
text-align: center;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
font-size: 1rem;
|
|
103
|
+
line-height: 24px;
|
|
104
|
+
border-radius: 4px;
|
|
105
|
+
}
|
|
106
|
+
.brique-marelle .bouton-action a[role=button].action {
|
|
107
|
+
background-color: var(--brique-marelle-bouton-background);
|
|
108
|
+
color: var(--brique-marelle-bouton-texte);
|
|
109
|
+
border: none;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
.brique-marelle .bouton-action a[role=button].action:active {
|
|
113
|
+
background-color: var(--brique-marelle-bouton-background-active);
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
border: none;
|
|
116
|
+
}
|
|
117
|
+
.brique-marelle .bouton-action a[role=button].action:hover {
|
|
118
|
+
background-color: var(--brique-marelle-bouton-background-hover);
|
|
119
|
+
box-shadow: none;
|
|
120
|
+
border: none;
|
|
121
|
+
}</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { Action, EtapeMarelle } from "../../../../types";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
titre?: string;
|
|
6
|
+
etapesmarelle?: EtapeMarelle[];
|
|
7
|
+
action: Action;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
exports?: {} | undefined;
|
|
14
|
+
bindings?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type MarelleProps = typeof __propDef.props;
|
|
17
|
+
export type MarelleEvents = typeof __propDef.events;
|
|
18
|
+
export type MarelleSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Marelle extends SvelteComponent<MarelleProps, MarelleEvents, MarelleSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ export type Image = {
|
|
|
2
2
|
lien: string;
|
|
3
3
|
alt: string;
|
|
4
4
|
};
|
|
5
|
+
export type Video = {
|
|
6
|
+
source: string;
|
|
7
|
+
sourcesoustitres?: string;
|
|
8
|
+
imagedecouverture?: string;
|
|
9
|
+
};
|
|
5
10
|
export type Action = {
|
|
6
11
|
titre: string;
|
|
7
12
|
lien: string;
|
|
@@ -11,3 +16,13 @@ export type Tuiles = {
|
|
|
11
16
|
illustration: Image;
|
|
12
17
|
contenu: string;
|
|
13
18
|
}[];
|
|
19
|
+
export type EtapeMarelle = {
|
|
20
|
+
titre: string;
|
|
21
|
+
description: string;
|
|
22
|
+
lien?: {
|
|
23
|
+
href: string;
|
|
24
|
+
texte: string;
|
|
25
|
+
target: string;
|
|
26
|
+
};
|
|
27
|
+
illustration: Image;
|
|
28
|
+
};
|