@lab-anssi/ui-kit 1.8.4 → 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.
@@ -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
+ };