@lab-anssi/ui-kit 1.20.0 → 1.21.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/lab/Bouton.svelte +1 -5
- package/dist/lab/Lien.svelte +2 -7
- package/dist/lab/Tag.svelte +71 -3
- package/dist/lab/Tag.svelte.d.ts +3 -0
- package/dist/lab/apparence-bouton.scss +1 -6
- package/dist/webcomponents/lab-anssi-ui-kit.iife.js +22 -22
- package/dist/webcomponents/lab-anssi-ui-kit.jsx.d.ts +1 -0
- package/package.json +1 -1
package/dist/lab/Bouton.svelte
CHANGED
|
@@ -45,7 +45,7 @@ export let positionIcone = "sans";
|
|
|
45
45
|
font-style: normal;
|
|
46
46
|
font-weight: 500;
|
|
47
47
|
}
|
|
48
|
-
.bouton:focus {
|
|
48
|
+
.bouton:focus-visible {
|
|
49
49
|
outline: 2px solid #0a76f6;
|
|
50
50
|
outline-offset: 2px;
|
|
51
51
|
}
|
|
@@ -115,10 +115,6 @@ export let positionIcone = "sans";
|
|
|
115
115
|
.bouton.tertiaire:active, .bouton.tertiaire-sans-bordure:active {
|
|
116
116
|
background: rgba(0, 0, 0, 0.08);
|
|
117
117
|
}
|
|
118
|
-
.bouton.tertiaire:focus, .bouton.tertiaire-sans-bordure:focus {
|
|
119
|
-
outline: 2px solid #0a76f6;
|
|
120
|
-
outline-offset: 2px;
|
|
121
|
-
}
|
|
122
118
|
.bouton.tertiaire {
|
|
123
119
|
border: 1px solid #ddd;
|
|
124
120
|
}
|
package/dist/lab/Lien.svelte
CHANGED
|
@@ -120,7 +120,7 @@ export let positionIcone = "sans";
|
|
|
120
120
|
background: rgba(0, 0, 0, 0.08);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.lien:focus {
|
|
123
|
+
.lien:focus-visible {
|
|
124
124
|
outline: 2px solid #0a76f6;
|
|
125
125
|
outline-offset: 2px;
|
|
126
126
|
}
|
|
@@ -136,7 +136,7 @@ export let positionIcone = "sans";
|
|
|
136
136
|
font-weight: 500;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.bouton:focus {
|
|
139
|
+
.bouton:focus-visible {
|
|
140
140
|
outline: 2px solid #0a76f6;
|
|
141
141
|
outline-offset: 2px;
|
|
142
142
|
}
|
|
@@ -225,11 +225,6 @@ export let positionIcone = "sans";
|
|
|
225
225
|
background: rgba(0, 0, 0, 0.08);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.bouton.tertiaire:focus, .bouton.tertiaire-sans-bordure:focus {
|
|
229
|
-
outline: 2px solid #0a76f6;
|
|
230
|
-
outline-offset: 2px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
228
|
.bouton.tertiaire {
|
|
234
229
|
border: 1px solid #ddd;
|
|
235
230
|
}
|
package/dist/lab/Tag.svelte
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
couleurTexte: { reflect: false, type: "String", attribute: "couleur-texte" },
|
|
7
7
|
label: { reflect: false, type: "String", attribute: "label" },
|
|
8
8
|
taille: { reflect: false, type: "String", attribute: "taille" },
|
|
9
|
+
type: { reflect: false, type: "String", attribute: "type" },
|
|
9
10
|
},
|
|
10
11
|
}}
|
|
11
12
|
/>
|
|
@@ -14,11 +15,29 @@
|
|
|
14
15
|
export let couleurTexte;
|
|
15
16
|
export let couleurFond;
|
|
16
17
|
export let taille = "sm";
|
|
18
|
+
export let type = "defaut";
|
|
19
|
+
let selectionne = false;
|
|
20
|
+
const bascule = () => {
|
|
21
|
+
selectionne = !selectionne;
|
|
22
|
+
};
|
|
17
23
|
</script>
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
|
|
25
|
+
{#if type === "defaut"}
|
|
26
|
+
<span class="tag {taille}" style:background={couleurFond} style:color={couleurTexte}>
|
|
27
|
+
{label}
|
|
28
|
+
</span>
|
|
29
|
+
{:else}
|
|
30
|
+
<button
|
|
31
|
+
class="tag {taille}"
|
|
32
|
+
aria-pressed={selectionne}
|
|
33
|
+
style:background={couleurFond}
|
|
34
|
+
style:color={couleurTexte}
|
|
35
|
+
on:click={bascule}
|
|
36
|
+
on:click
|
|
37
|
+
>
|
|
38
|
+
{label}
|
|
39
|
+
</button>
|
|
40
|
+
{/if}
|
|
22
41
|
|
|
23
42
|
<style>.tag {
|
|
24
43
|
color: var(--tag-couleur-texte);
|
|
@@ -44,4 +63,53 @@ export let taille = "sm";
|
|
|
44
63
|
line-height: 1.5rem;
|
|
45
64
|
padding: 4px 12px;
|
|
46
65
|
border-radius: 16px;
|
|
66
|
+
}
|
|
67
|
+
.tag:focus-visible {
|
|
68
|
+
outline: 2px solid #0a76f6;
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
button.tag {
|
|
73
|
+
color: var(--tag-selectionnable-couleur-texte);
|
|
74
|
+
background-color: var(--tag-selectionnable-couleur-fond);
|
|
75
|
+
border: none;
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
position: relative;
|
|
78
|
+
overflow: visible;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
button.tag:hover {
|
|
82
|
+
background-color: var(--tag-selectionnable-couleur-fond-survol);
|
|
83
|
+
}
|
|
84
|
+
button.tag:active {
|
|
85
|
+
background-color: var(--tag-selectionnable-couleur-fond-clique);
|
|
86
|
+
}
|
|
87
|
+
button.tag[aria-pressed=true] {
|
|
88
|
+
color: var(--tag-selectionne-couleur-texte);
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
background-image: radial-gradient(circle at 100% 0.25rem, transparent 0.578125rem, var(--tag-selectionne-couleur-fond) 0.625rem);
|
|
91
|
+
}
|
|
92
|
+
button.tag[aria-pressed=true]:hover {
|
|
93
|
+
background-image: radial-gradient(circle at 100% 0.25rem, transparent 0.578125rem, var(--tag-selectionne-couleur-fond-survol) 0.625rem);
|
|
94
|
+
}
|
|
95
|
+
button.tag[aria-pressed=true]:active {
|
|
96
|
+
background-image: radial-gradient(circle at 100% 0.25rem, transparent 0.578125rem, var(--tag-selectionne-couleur-fond-clique) 0.625rem);
|
|
97
|
+
}
|
|
98
|
+
button.tag[aria-pressed=true]::after {
|
|
99
|
+
-webkit-mask-image: url("https://lab-anssi-ui-kit-prod-s3-assets.cellar-c2.services.clever-cloud.com/icones/dsfr/system/checkbox-circle-line.svg");
|
|
100
|
+
mask-image: url("https://lab-anssi-ui-kit-prod-s3-assets.cellar-c2.services.clever-cloud.com/icones/dsfr/system/checkbox-circle-line.svg");
|
|
101
|
+
background-color: var(--tag-selectionnable-couleur-texte);
|
|
102
|
+
--icon-size: 1rem;
|
|
103
|
+
content: "";
|
|
104
|
+
display: inline-block;
|
|
105
|
+
flex: 0 0 auto;
|
|
106
|
+
height: var(--icon-size);
|
|
107
|
+
margin: -0.5rem;
|
|
108
|
+
-webkit-mask-size: 100% 100%;
|
|
109
|
+
mask-size: 100% 100%;
|
|
110
|
+
position: absolute;
|
|
111
|
+
right: 0;
|
|
112
|
+
top: 4px;
|
|
113
|
+
vertical-align: calc((0.75em - var(--icon-size)) * 0.5);
|
|
114
|
+
width: var(--icon-size);
|
|
47
115
|
}</style>
|
package/dist/lab/Tag.svelte.d.ts
CHANGED
|
@@ -5,8 +5,11 @@ declare const __propDef: {
|
|
|
5
5
|
couleurTexte: string | undefined;
|
|
6
6
|
couleurFond: string | undefined;
|
|
7
7
|
taille?: "sm" | "md";
|
|
8
|
+
type?: "defaut" | "selectionnable";
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
11
|
+
click: MouseEvent;
|
|
12
|
+
} & {
|
|
10
13
|
[evt: string]: CustomEvent<any>;
|
|
11
14
|
};
|
|
12
15
|
slots: {};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-weight: 500;
|
|
11
11
|
|
|
12
|
-
&:focus {
|
|
12
|
+
&:focus-visible {
|
|
13
13
|
outline: 2px solid #0a76f6;
|
|
14
14
|
outline-offset: 2px;
|
|
15
15
|
}
|
|
@@ -97,11 +97,6 @@
|
|
|
97
97
|
&:active {
|
|
98
98
|
background: rgb(0, 0, 0, 8%);
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
&:focus {
|
|
102
|
-
outline: 2px solid #0a76f6;
|
|
103
|
-
outline-offset: 2px;
|
|
104
|
-
}
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
&.tertiaire {
|