@starterlib/ui 0.9.0 → 0.10.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/README.md +44 -32
- package/assets/icones/catalogue.json +1 -1
- package/fesm2022/starterlib-ui-donnees.mjs +200 -3
- package/fesm2022/starterlib-ui-donnees.mjs.map +1 -1
- package/fesm2022/starterlib-ui-etats.mjs +1158 -0
- package/fesm2022/starterlib-ui-etats.mjs.map +1 -0
- package/fesm2022/starterlib-ui-formulaires.mjs +3 -2
- package/fesm2022/starterlib-ui-formulaires.mjs.map +1 -1
- package/fesm2022/starterlib-ui-indicateurs.mjs +1013 -0
- package/fesm2022/starterlib-ui-indicateurs.mjs.map +1 -0
- package/fesm2022/starterlib-ui-libelles-en.mjs.map +1 -1
- package/fesm2022/starterlib-ui-listes.mjs +5 -2
- package/fesm2022/starterlib-ui-listes.mjs.map +1 -1
- package/fesm2022/starterlib-ui-messagerie.mjs +2 -2
- package/fesm2022/starterlib-ui-messagerie.mjs.map +1 -1
- package/fesm2022/starterlib-ui-mise-en-page.mjs +892 -0
- package/fesm2022/starterlib-ui-mise-en-page.mjs.map +1 -0
- package/fesm2022/starterlib-ui-onglets.mjs.map +1 -1
- package/fesm2022/starterlib-ui-parcours.mjs +222 -4
- package/fesm2022/starterlib-ui-parcours.mjs.map +1 -1
- package/fesm2022/starterlib-ui-saisie.mjs +131 -3
- package/fesm2022/starterlib-ui-saisie.mjs.map +1 -1
- package/fesm2022/starterlib-ui-surfaces.mjs +2 -1
- package/fesm2022/starterlib-ui-surfaces.mjs.map +1 -1
- package/fesm2022/starterlib-ui.mjs +3510 -7105
- package/fesm2022/starterlib-ui.mjs.map +1 -1
- package/package.json +15 -3
- package/types/starterlib-ui-donnees.d.ts +95 -1
- package/types/starterlib-ui-etats.d.ts +486 -0
- package/types/starterlib-ui-formulaires.d.ts +1 -1
- package/types/starterlib-ui-indicateurs.d.ts +463 -0
- package/types/starterlib-ui-listes.d.ts +2 -1
- package/types/starterlib-ui-mise-en-page.d.ts +355 -0
- package/types/starterlib-ui-onglets.d.ts +6 -0
- package/types/starterlib-ui-parcours.d.ts +123 -3
- package/types/starterlib-ui-saisie.d.ts +72 -2
- package/types/starterlib-ui-selection.d.ts +3 -2
- package/types/starterlib-ui.d.ts +52 -1605
|
@@ -0,0 +1,1013 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, InjectionToken, Injector, afterNextRender, booleanAttribute, computed, effect, inject, input, isDevMode, numberAttribute, output, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import { AnnonceLocale, ICONES_DE_TON, NOMS_DICONE_PLEINE, ST_LIBELLES, StIcon, StIconButton, partagerLaValeur } from "@starterlib/ui";
|
|
4
|
+
import { sansCommandesDeDirection } from "@starterlib/util";
|
|
5
|
+
import { DOCUMENT } from "@angular/common";
|
|
6
|
+
function iconeDuTon(ton) {
|
|
7
|
+
return ton === "neutre" ? "cercle" : ICONES_DE_TON[ton];
|
|
8
|
+
}
|
|
9
|
+
function aUnJumeauPlein(nom) {
|
|
10
|
+
return NOMS_DICONE_PLEINE.includes(nom);
|
|
11
|
+
}
|
|
12
|
+
var StStatusPill = class StStatusPill {
|
|
13
|
+
statut = input.required(...ngDevMode ? [{ debugName: "statut" }] : /* istanbul ignore next */ []);
|
|
14
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
15
|
+
icone = input(null, ...ngDevMode ? [{ debugName: "icone" }] : /* istanbul ignore next */ []);
|
|
16
|
+
ton = input("neutre", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
17
|
+
taille = input("md", ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
18
|
+
variante = input("icone", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
|
|
19
|
+
casse = input("capitales", ...ngDevMode ? [{ debugName: "casse" }] : /* istanbul ignore next */ []);
|
|
20
|
+
iconeDessinee = computed(() => {
|
|
21
|
+
const icone = this.icone() ?? iconeDuTon(this.ton());
|
|
22
|
+
if (this.taille() !== "sm" || typeof icone !== "string") return icone;
|
|
23
|
+
return aUnJumeauPlein(icone) ? {
|
|
24
|
+
nom: icone,
|
|
25
|
+
variante: "plein"
|
|
26
|
+
} : icone;
|
|
27
|
+
}, ...ngDevMode ? [{ debugName: "iconeDessinee" }] : /* istanbul ignore next */ []);
|
|
28
|
+
tailleDIcone = computed(() => this.taille() === "sm" ? "14" : "16", ...ngDevMode ? [{ debugName: "tailleDIcone" }] : /* istanbul ignore next */ []);
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
30
|
+
minVersion: "12.0.0",
|
|
31
|
+
version: "22.2.0",
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
type: StStatusPill,
|
|
34
|
+
deps: [],
|
|
35
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
36
|
+
});
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
38
|
+
minVersion: "17.0.0",
|
|
39
|
+
version: "22.2.0",
|
|
40
|
+
type: StStatusPill,
|
|
41
|
+
isStandalone: true,
|
|
42
|
+
selector: "st-status-pill",
|
|
43
|
+
inputs: {
|
|
44
|
+
statut: {
|
|
45
|
+
classPropertyName: "statut",
|
|
46
|
+
publicName: "statut",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: true,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
libelle: {
|
|
52
|
+
classPropertyName: "libelle",
|
|
53
|
+
publicName: "libelle",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: true,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
},
|
|
58
|
+
icone: {
|
|
59
|
+
classPropertyName: "icone",
|
|
60
|
+
publicName: "icone",
|
|
61
|
+
isSignal: true,
|
|
62
|
+
isRequired: false,
|
|
63
|
+
transformFunction: null
|
|
64
|
+
},
|
|
65
|
+
ton: {
|
|
66
|
+
classPropertyName: "ton",
|
|
67
|
+
publicName: "ton",
|
|
68
|
+
isSignal: true,
|
|
69
|
+
isRequired: false,
|
|
70
|
+
transformFunction: null
|
|
71
|
+
},
|
|
72
|
+
taille: {
|
|
73
|
+
classPropertyName: "taille",
|
|
74
|
+
publicName: "taille",
|
|
75
|
+
isSignal: true,
|
|
76
|
+
isRequired: false,
|
|
77
|
+
transformFunction: null
|
|
78
|
+
},
|
|
79
|
+
variante: {
|
|
80
|
+
classPropertyName: "variante",
|
|
81
|
+
publicName: "variante",
|
|
82
|
+
isSignal: true,
|
|
83
|
+
isRequired: false,
|
|
84
|
+
transformFunction: null
|
|
85
|
+
},
|
|
86
|
+
casse: {
|
|
87
|
+
classPropertyName: "casse",
|
|
88
|
+
publicName: "casse",
|
|
89
|
+
isSignal: true,
|
|
90
|
+
isRequired: false,
|
|
91
|
+
transformFunction: null
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
host: {
|
|
95
|
+
properties: {
|
|
96
|
+
"attr.data-ton": "ton()",
|
|
97
|
+
"attr.data-statut": "statut()",
|
|
98
|
+
"attr.data-taille": "taille()",
|
|
99
|
+
"attr.data-variante": "variante()",
|
|
100
|
+
"attr.data-casse": "casse()"
|
|
101
|
+
},
|
|
102
|
+
classAttribute: "st-status-pill"
|
|
103
|
+
},
|
|
104
|
+
ngImport: i0,
|
|
105
|
+
template: "@if (variante() === 'point') {\n <span class=\"st-status-pill__point\"></span>\n} @else {\n <st-icon class=\"st-status-pill__icone\" [icone]=\"iconeDessinee()\" [taille]=\"tailleDIcone()\" />\n}\n<span class=\"st-status-pill__libelle\">{{ libelle() }}</span>\n",
|
|
106
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:inline-flex;gap:var(--st-espacement-1-5);align-items:center;min-block-size:var(--st-cible-min);padding-block:var(--st-espacement-1);padding-inline:var(--st-espacement-3);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine);-webkit-print-color-adjust:exact;print-color-adjust:exact}.st-status-pill__icone,.st-status-pill__point{color:var(--st-couleur-texte-discret)}:host([data-variante=point]){min-block-size:0}.st-status-pill__point{flex:none;inline-size:var(--st-espacement-2);block-size:var(--st-espacement-2);background:currentcolor;border-radius:var(--st-rayon-pleine)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire-discret);background:var(--st-couleur-primaire-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-primaire) 20%,transparent)}:host([data-ton=primaire]) .st-status-pill__icone,:host([data-ton=primaire]) .st-status-pill__point{color:var(--st-couleur-primaire)}:host([data-ton=information]){color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-information) 20%,transparent)}:host([data-ton=information]) .st-status-pill__icone,:host([data-ton=information]) .st-status-pill__point{color:var(--st-couleur-information)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes-discret);background:var(--st-couleur-succes-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-succes) 20%,transparent)}:host([data-ton=succes]) .st-status-pill__icone,:host([data-ton=succes]) .st-status-pill__point{color:var(--st-couleur-succes)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-avertissement) 20%,transparent)}:host([data-ton=avertissement]) .st-status-pill__icone,:host([data-ton=avertissement]) .st-status-pill__point{color:var(--st-couleur-avertissement)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-danger) 20%,transparent)}:host([data-ton=danger]) .st-status-pill__icone,:host([data-ton=danger]) .st-status-pill__point{color:var(--st-couleur-danger)}:host([data-taille=sm]){gap:var(--st-espacement-1);min-block-size:0;padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2)}:host([data-casse=capitales]){text-transform:uppercase}:host([data-casse=phrase]){font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-status-pill__libelle{white-space:normal}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}\n"],
|
|
107
|
+
dependencies: [{
|
|
108
|
+
kind: "component",
|
|
109
|
+
type: StIcon,
|
|
110
|
+
selector: "st-icon",
|
|
111
|
+
inputs: [
|
|
112
|
+
"icone",
|
|
113
|
+
"nom",
|
|
114
|
+
"variante",
|
|
115
|
+
"sprite",
|
|
116
|
+
"nomMetier",
|
|
117
|
+
"taille",
|
|
118
|
+
"ton",
|
|
119
|
+
"etiquette",
|
|
120
|
+
"miroir"
|
|
121
|
+
]
|
|
122
|
+
}],
|
|
123
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
127
|
+
minVersion: "12.0.0",
|
|
128
|
+
version: "22.2.0",
|
|
129
|
+
ngImport: i0,
|
|
130
|
+
type: StStatusPill,
|
|
131
|
+
decorators: [{
|
|
132
|
+
type: Component,
|
|
133
|
+
args: [{
|
|
134
|
+
selector: "st-status-pill",
|
|
135
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
|
+
imports: [StIcon],
|
|
137
|
+
host: {
|
|
138
|
+
class: "st-status-pill",
|
|
139
|
+
"[attr.data-ton]": "ton()",
|
|
140
|
+
"[attr.data-statut]": "statut()",
|
|
141
|
+
"[attr.data-taille]": "taille()",
|
|
142
|
+
"[attr.data-variante]": "variante()",
|
|
143
|
+
"[attr.data-casse]": "casse()"
|
|
144
|
+
},
|
|
145
|
+
template: "@if (variante() === 'point') {\n <span class=\"st-status-pill__point\"></span>\n} @else {\n <st-icon class=\"st-status-pill__icone\" [icone]=\"iconeDessinee()\" [taille]=\"tailleDIcone()\" />\n}\n<span class=\"st-status-pill__libelle\">{{ libelle() }}</span>\n",
|
|
146
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:inline-flex;gap:var(--st-espacement-1-5);align-items:center;min-block-size:var(--st-cible-min);padding-block:var(--st-espacement-1);padding-inline:var(--st-espacement-3);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-texte);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-pleine);-webkit-print-color-adjust:exact;print-color-adjust:exact}.st-status-pill__icone,.st-status-pill__point{color:var(--st-couleur-texte-discret)}:host([data-variante=point]){min-block-size:0}.st-status-pill__point{flex:none;inline-size:var(--st-espacement-2);block-size:var(--st-espacement-2);background:currentcolor;border-radius:var(--st-rayon-pleine)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire-discret);background:var(--st-couleur-primaire-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-primaire) 20%,transparent)}:host([data-ton=primaire]) .st-status-pill__icone,:host([data-ton=primaire]) .st-status-pill__point{color:var(--st-couleur-primaire)}:host([data-ton=information]){color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-information) 20%,transparent)}:host([data-ton=information]) .st-status-pill__icone,:host([data-ton=information]) .st-status-pill__point{color:var(--st-couleur-information)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes-discret);background:var(--st-couleur-succes-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-succes) 20%,transparent)}:host([data-ton=succes]) .st-status-pill__icone,:host([data-ton=succes]) .st-status-pill__point{color:var(--st-couleur-succes)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-avertissement) 20%,transparent)}:host([data-ton=avertissement]) .st-status-pill__icone,:host([data-ton=avertissement]) .st-status-pill__point{color:var(--st-couleur-avertissement)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret);box-shadow:inset 0 0 0 var(--st-epaisseur-fine) color-mix(in srgb,var(--st-couleur-danger) 20%,transparent)}:host([data-ton=danger]) .st-status-pill__icone,:host([data-ton=danger]) .st-status-pill__point{color:var(--st-couleur-danger)}:host([data-taille=sm]){gap:var(--st-espacement-1);min-block-size:0;padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2)}:host([data-casse=capitales]){text-transform:uppercase}:host([data-casse=phrase]){font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-status-pill__libelle{white-space:normal}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}\n"]
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
propDecorators: {
|
|
150
|
+
statut: [{
|
|
151
|
+
type: i0.Input,
|
|
152
|
+
args: [{
|
|
153
|
+
isSignal: true,
|
|
154
|
+
alias: "statut",
|
|
155
|
+
required: true
|
|
156
|
+
}]
|
|
157
|
+
}],
|
|
158
|
+
libelle: [{
|
|
159
|
+
type: i0.Input,
|
|
160
|
+
args: [{
|
|
161
|
+
isSignal: true,
|
|
162
|
+
alias: "libelle",
|
|
163
|
+
required: true
|
|
164
|
+
}]
|
|
165
|
+
}],
|
|
166
|
+
icone: [{
|
|
167
|
+
type: i0.Input,
|
|
168
|
+
args: [{
|
|
169
|
+
isSignal: true,
|
|
170
|
+
alias: "icone",
|
|
171
|
+
required: false
|
|
172
|
+
}]
|
|
173
|
+
}],
|
|
174
|
+
ton: [{
|
|
175
|
+
type: i0.Input,
|
|
176
|
+
args: [{
|
|
177
|
+
isSignal: true,
|
|
178
|
+
alias: "ton",
|
|
179
|
+
required: false
|
|
180
|
+
}]
|
|
181
|
+
}],
|
|
182
|
+
taille: [{
|
|
183
|
+
type: i0.Input,
|
|
184
|
+
args: [{
|
|
185
|
+
isSignal: true,
|
|
186
|
+
alias: "taille",
|
|
187
|
+
required: false
|
|
188
|
+
}]
|
|
189
|
+
}],
|
|
190
|
+
variante: [{
|
|
191
|
+
type: i0.Input,
|
|
192
|
+
args: [{
|
|
193
|
+
isSignal: true,
|
|
194
|
+
alias: "variante",
|
|
195
|
+
required: false
|
|
196
|
+
}]
|
|
197
|
+
}],
|
|
198
|
+
casse: [{
|
|
199
|
+
type: i0.Input,
|
|
200
|
+
args: [{
|
|
201
|
+
isSignal: true,
|
|
202
|
+
alias: "casse",
|
|
203
|
+
required: false
|
|
204
|
+
}]
|
|
205
|
+
}]
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
var StBadgeAncre = class StBadgeAncre {
|
|
209
|
+
position = input("haut-fin", {
|
|
210
|
+
...ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {},
|
|
211
|
+
alias: "stBadgeAncre",
|
|
212
|
+
transform: (valeur) => valeur === "" ? "haut-fin" : valeur
|
|
213
|
+
});
|
|
214
|
+
etiquetteDuCompte = input(null, ...ngDevMode ? [{ debugName: "etiquetteDuCompte" }] : /* istanbul ignore next */ []);
|
|
215
|
+
constructor() {
|
|
216
|
+
const porteur = inject(ElementRef).nativeElement;
|
|
217
|
+
afterNextRender({
|
|
218
|
+
earlyRead: () => porteur.ownerDocument.defaultView?.getComputedStyle(porteur).position,
|
|
219
|
+
write: (position) => {
|
|
220
|
+
if (position === "static") porteur.style.position = "relative";
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
225
|
+
minVersion: "12.0.0",
|
|
226
|
+
version: "22.2.0",
|
|
227
|
+
ngImport: i0,
|
|
228
|
+
type: StBadgeAncre,
|
|
229
|
+
deps: [],
|
|
230
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
231
|
+
});
|
|
232
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
233
|
+
minVersion: "17.1.0",
|
|
234
|
+
version: "22.2.0",
|
|
235
|
+
type: StBadgeAncre,
|
|
236
|
+
isStandalone: true,
|
|
237
|
+
selector: "[stBadgeAncre]",
|
|
238
|
+
inputs: {
|
|
239
|
+
position: {
|
|
240
|
+
classPropertyName: "position",
|
|
241
|
+
publicName: "stBadgeAncre",
|
|
242
|
+
isSignal: true,
|
|
243
|
+
isRequired: false,
|
|
244
|
+
transformFunction: null
|
|
245
|
+
},
|
|
246
|
+
etiquetteDuCompte: {
|
|
247
|
+
classPropertyName: "etiquetteDuCompte",
|
|
248
|
+
publicName: "etiquetteDuCompte",
|
|
249
|
+
isSignal: true,
|
|
250
|
+
isRequired: false,
|
|
251
|
+
transformFunction: null
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
host: { classAttribute: "st-badge-ancre" },
|
|
255
|
+
ngImport: i0
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
259
|
+
minVersion: "12.0.0",
|
|
260
|
+
version: "22.2.0",
|
|
261
|
+
ngImport: i0,
|
|
262
|
+
type: StBadgeAncre,
|
|
263
|
+
decorators: [{
|
|
264
|
+
type: Directive,
|
|
265
|
+
args: [{
|
|
266
|
+
selector: "[stBadgeAncre]",
|
|
267
|
+
host: { class: "st-badge-ancre" }
|
|
268
|
+
}]
|
|
269
|
+
}],
|
|
270
|
+
ctorParameters: () => [],
|
|
271
|
+
propDecorators: {
|
|
272
|
+
position: [{
|
|
273
|
+
type: i0.Input,
|
|
274
|
+
args: [{
|
|
275
|
+
isSignal: true,
|
|
276
|
+
alias: "stBadgeAncre",
|
|
277
|
+
required: false
|
|
278
|
+
}]
|
|
279
|
+
}],
|
|
280
|
+
etiquetteDuCompte: [{
|
|
281
|
+
type: i0.Input,
|
|
282
|
+
args: [{
|
|
283
|
+
isSignal: true,
|
|
284
|
+
alias: "etiquetteDuCompte",
|
|
285
|
+
required: false
|
|
286
|
+
}]
|
|
287
|
+
}]
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
var StBadge = class StBadge {
|
|
291
|
+
ancre = inject(StBadgeAncre, { optional: true });
|
|
292
|
+
valeur = input(null, ...ngDevMode ? [{ debugName: "valeur" }] : /* istanbul ignore next */ []);
|
|
293
|
+
max = input(99, {
|
|
294
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
295
|
+
transform: numberAttribute
|
|
296
|
+
});
|
|
297
|
+
ton = input("danger", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
298
|
+
point = input(false, {
|
|
299
|
+
...ngDevMode ? { debugName: "point" } : /* istanbul ignore next */ {},
|
|
300
|
+
transform: booleanAttribute
|
|
301
|
+
});
|
|
302
|
+
texte = computed(() => {
|
|
303
|
+
if (this.point()) return "";
|
|
304
|
+
const valeur = this.valeur();
|
|
305
|
+
if (valeur === null) return "";
|
|
306
|
+
if (typeof valeur === "string") return valeur;
|
|
307
|
+
return valeur > this.max() ? `${this.max().toString()}+` : valeur.toString();
|
|
308
|
+
}, ...ngDevMode ? [{ debugName: "texte" }] : /* istanbul ignore next */ []);
|
|
309
|
+
vide = computed(() => !this.point() && this.texte() === "", ...ngDevMode ? [{ debugName: "vide" }] : /* istanbul ignore next */ []);
|
|
310
|
+
etiquetteDuCompte = computed(() => {
|
|
311
|
+
const etiquette = this.ancre?.etiquetteDuCompte() ?? null;
|
|
312
|
+
return etiquette === null || etiquette.trim() === "" ? null : etiquette;
|
|
313
|
+
}, ...ngDevMode ? [{ debugName: "etiquetteDuCompte" }] : /* istanbul ignore next */ []);
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
315
|
+
minVersion: "12.0.0",
|
|
316
|
+
version: "22.2.0",
|
|
317
|
+
ngImport: i0,
|
|
318
|
+
type: StBadge,
|
|
319
|
+
deps: [],
|
|
320
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
321
|
+
});
|
|
322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
323
|
+
minVersion: "17.0.0",
|
|
324
|
+
version: "22.2.0",
|
|
325
|
+
type: StBadge,
|
|
326
|
+
isStandalone: true,
|
|
327
|
+
selector: "st-badge",
|
|
328
|
+
inputs: {
|
|
329
|
+
valeur: {
|
|
330
|
+
classPropertyName: "valeur",
|
|
331
|
+
publicName: "valeur",
|
|
332
|
+
isSignal: true,
|
|
333
|
+
isRequired: false,
|
|
334
|
+
transformFunction: null
|
|
335
|
+
},
|
|
336
|
+
max: {
|
|
337
|
+
classPropertyName: "max",
|
|
338
|
+
publicName: "max",
|
|
339
|
+
isSignal: true,
|
|
340
|
+
isRequired: false,
|
|
341
|
+
transformFunction: null
|
|
342
|
+
},
|
|
343
|
+
ton: {
|
|
344
|
+
classPropertyName: "ton",
|
|
345
|
+
publicName: "ton",
|
|
346
|
+
isSignal: true,
|
|
347
|
+
isRequired: false,
|
|
348
|
+
transformFunction: null
|
|
349
|
+
},
|
|
350
|
+
point: {
|
|
351
|
+
classPropertyName: "point",
|
|
352
|
+
publicName: "point",
|
|
353
|
+
isSignal: true,
|
|
354
|
+
isRequired: false,
|
|
355
|
+
transformFunction: null
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
host: {
|
|
359
|
+
properties: {
|
|
360
|
+
"attr.aria-hidden": "etiquetteDuCompte() === null ? \"true\" : null",
|
|
361
|
+
"attr.data-ton": "ton()",
|
|
362
|
+
"attr.data-point": "point() ? \"\" : null",
|
|
363
|
+
"attr.data-vide": "vide() ? \"\" : null",
|
|
364
|
+
"attr.data-ancre": "ancre?.position() ?? null"
|
|
365
|
+
},
|
|
366
|
+
classAttribute: "st-badge"
|
|
367
|
+
},
|
|
368
|
+
ngImport: i0,
|
|
369
|
+
template: "<span class=\"st-badge__chiffre\" aria-hidden=\"true\">{{ texte() }}</span>\n@if (etiquetteDuCompte(); as etiquette) {\n <span class=\"st-vh\">{{ etiquette }}</span>\n}\n",
|
|
370
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{box-sizing:border-box;display:inline-flex;flex:none;align-items:center;justify-content:center;min-inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);padding-inline:var(--st-espacement-1-5);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-grasse);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-sur-danger);white-space:nowrap;background:var(--st-couleur-danger);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos)}:host([data-ancre=haut-fin]),:host([data-ancre=haut-debut]){position:absolute;inset-block-start:var(--st-espacement-1-5)}:host([data-ancre=haut-fin]){inset-inline-end:var(--st-espacement-1-5);translate:50% -50%}:host([data-ancre=haut-fin]:dir(rtl)){translate:-50% -50%}:host([data-ancre=haut-debut]){inset-inline-start:var(--st-espacement-1-5);translate:-50% -50%}:host([data-ancre=haut-debut]:dir(rtl)){translate:50% -50%}:host([data-vide]){visibility:hidden}:host([data-point]){inline-size:var(--st-espacement-2-5);min-inline-size:0;block-size:var(--st-espacement-2-5);padding:0;box-shadow:0 0 0 var(--st-epaisseur-moyenne) var(--st-couleur-surface)}:host([data-point][data-ancre]){translate:none}:host([data-ton=neutre]){color:var(--st-couleur-texte);background:var(--st-couleur-surface-enfoncee)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire);background:var(--st-couleur-primaire)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes);background:var(--st-couleur-succes)}:host([data-ton=information]){color:var(--st-couleur-sur-information);background:var(--st-couleur-information)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement);background:var(--st-couleur-avertissement)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger);background:var(--st-couleur-danger)}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText}:host([data-point]){forced-color-adjust:none;outline:0;background:CanvasText;box-shadow:0 0 0 var(--st-epaisseur-moyenne) Canvas}}\n"],
|
|
371
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
375
|
+
minVersion: "12.0.0",
|
|
376
|
+
version: "22.2.0",
|
|
377
|
+
ngImport: i0,
|
|
378
|
+
type: StBadge,
|
|
379
|
+
decorators: [{
|
|
380
|
+
type: Component,
|
|
381
|
+
args: [{
|
|
382
|
+
selector: "st-badge",
|
|
383
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
384
|
+
host: {
|
|
385
|
+
class: "st-badge",
|
|
386
|
+
"[attr.aria-hidden]": "etiquetteDuCompte() === null ? \"true\" : null",
|
|
387
|
+
"[attr.data-ton]": "ton()",
|
|
388
|
+
"[attr.data-point]": "point() ? \"\" : null",
|
|
389
|
+
"[attr.data-vide]": "vide() ? \"\" : null",
|
|
390
|
+
"[attr.data-ancre]": "ancre?.position() ?? null"
|
|
391
|
+
},
|
|
392
|
+
template: "<span class=\"st-badge__chiffre\" aria-hidden=\"true\">{{ texte() }}</span>\n@if (etiquetteDuCompte(); as etiquette) {\n <span class=\"st-vh\">{{ etiquette }}</span>\n}\n",
|
|
393
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{box-sizing:border-box;display:inline-flex;flex:none;align-items:center;justify-content:center;min-inline-size:var(--st-espacement-5);block-size:var(--st-espacement-5);padding-inline:var(--st-espacement-1-5);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-grasse);letter-spacing:var(--st-interlettrage-capitales);color:var(--st-couleur-sur-danger);white-space:nowrap;background:var(--st-couleur-danger);border-radius:var(--st-rayon-pleine);box-shadow:var(--st-ombre-repos)}:host([data-ancre=haut-fin]),:host([data-ancre=haut-debut]){position:absolute;inset-block-start:var(--st-espacement-1-5)}:host([data-ancre=haut-fin]){inset-inline-end:var(--st-espacement-1-5);translate:50% -50%}:host([data-ancre=haut-fin]:dir(rtl)){translate:-50% -50%}:host([data-ancre=haut-debut]){inset-inline-start:var(--st-espacement-1-5);translate:-50% -50%}:host([data-ancre=haut-debut]:dir(rtl)){translate:50% -50%}:host([data-vide]){visibility:hidden}:host([data-point]){inline-size:var(--st-espacement-2-5);min-inline-size:0;block-size:var(--st-espacement-2-5);padding:0;box-shadow:0 0 0 var(--st-epaisseur-moyenne) var(--st-couleur-surface)}:host([data-point][data-ancre]){translate:none}:host([data-ton=neutre]){color:var(--st-couleur-texte);background:var(--st-couleur-surface-enfoncee)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire);background:var(--st-couleur-primaire)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes);background:var(--st-couleur-succes)}:host([data-ton=information]){color:var(--st-couleur-sur-information);background:var(--st-couleur-information)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement);background:var(--st-couleur-avertissement)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger);background:var(--st-couleur-danger)}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText}:host([data-point]){forced-color-adjust:none;outline:0;background:CanvasText;box-shadow:0 0 0 var(--st-epaisseur-moyenne) Canvas}}\n"]
|
|
394
|
+
}]
|
|
395
|
+
}],
|
|
396
|
+
propDecorators: {
|
|
397
|
+
valeur: [{
|
|
398
|
+
type: i0.Input,
|
|
399
|
+
args: [{
|
|
400
|
+
isSignal: true,
|
|
401
|
+
alias: "valeur",
|
|
402
|
+
required: false
|
|
403
|
+
}]
|
|
404
|
+
}],
|
|
405
|
+
max: [{
|
|
406
|
+
type: i0.Input,
|
|
407
|
+
args: [{
|
|
408
|
+
isSignal: true,
|
|
409
|
+
alias: "max",
|
|
410
|
+
required: false
|
|
411
|
+
}]
|
|
412
|
+
}],
|
|
413
|
+
ton: [{
|
|
414
|
+
type: i0.Input,
|
|
415
|
+
args: [{
|
|
416
|
+
isSignal: true,
|
|
417
|
+
alias: "ton",
|
|
418
|
+
required: false
|
|
419
|
+
}]
|
|
420
|
+
}],
|
|
421
|
+
point: [{
|
|
422
|
+
type: i0.Input,
|
|
423
|
+
args: [{
|
|
424
|
+
isSignal: true,
|
|
425
|
+
alias: "point",
|
|
426
|
+
required: false
|
|
427
|
+
}]
|
|
428
|
+
}]
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
const ST_CROCHETS_DE_GROUPE = new InjectionToken("st.crochets-de-groupe");
|
|
432
|
+
var StTag = class StTag {
|
|
433
|
+
element = inject(ElementRef);
|
|
434
|
+
libelles = inject(ST_LIBELLES);
|
|
435
|
+
groupe = inject(ST_CROCHETS_DE_GROUPE, { optional: true });
|
|
436
|
+
role = partagerLaValeur(this.element.nativeElement, "role", () => this.groupe?.roleDesEtiquettes === "listitem" && this.role.deLAppelant() === null ? "listitem" : null);
|
|
437
|
+
libelle = input.required(...ngDevMode ? [{ debugName: "libelle" }] : /* istanbul ignore next */ []);
|
|
438
|
+
supprimable = input(false, {
|
|
439
|
+
...ngDevMode ? { debugName: "supprimable" } : /* istanbul ignore next */ {},
|
|
440
|
+
transform: booleanAttribute
|
|
441
|
+
});
|
|
442
|
+
ton = input("neutre", ...ngDevMode ? [{ debugName: "ton" }] : /* istanbul ignore next */ []);
|
|
443
|
+
taille = input("md", ...ngDevMode ? [{ debugName: "taille" }] : /* istanbul ignore next */ []);
|
|
444
|
+
variante = input("discrete", ...ngDevMode ? [{ debugName: "variante" }] : /* istanbul ignore next */ []);
|
|
445
|
+
police = input("texte", ...ngDevMode ? [{ debugName: "police" }] : /* istanbul ignore next */ []);
|
|
446
|
+
casse = input("phrase", ...ngDevMode ? [{ debugName: "casse" }] : /* istanbul ignore next */ []);
|
|
447
|
+
point = input(false, {
|
|
448
|
+
...ngDevMode ? { debugName: "point" } : /* istanbul ignore next */ {},
|
|
449
|
+
transform: booleanAttribute
|
|
450
|
+
});
|
|
451
|
+
iconeAvant = input(null, ...ngDevMode ? [{ debugName: "iconeAvant" }] : /* istanbul ignore next */ []);
|
|
452
|
+
supprime = output();
|
|
453
|
+
constructor() {
|
|
454
|
+
inject(DestroyRef).onDestroy(this.role.liberer);
|
|
455
|
+
}
|
|
456
|
+
retirable = computed(() => {
|
|
457
|
+
const retirable = this.supprimable() && this.taille() === "md";
|
|
458
|
+
if (this.supprimable() && !retirable && isDevMode()) console.warn("st-tag : le retrait n existe qu en taille md (cible de 24 px au moins).");
|
|
459
|
+
return retirable;
|
|
460
|
+
}, ...ngDevMode ? [{ debugName: "retirable" }] : /* istanbul ignore next */ []);
|
|
461
|
+
libelleDeSuppression = computed(() => this.libelles().retirerLEtiquette(this.libelleAffiche()), ...ngDevMode ? [{ debugName: "libelleDeSuppression" }] : /* istanbul ignore next */ []);
|
|
462
|
+
libelleAffiche = computed(() => sansCommandesDeDirection(this.libelle()), ...ngDevMode ? [{ debugName: "libelleAffiche" }] : /* istanbul ignore next */ []);
|
|
463
|
+
auRetrait() {
|
|
464
|
+
const voisine = this.voisineRetirable();
|
|
465
|
+
if (this.groupe === null) (voisine ?? this.ancetreFocalisable())?.focus();
|
|
466
|
+
else this.groupe.retraitDemande(this.libelle(), voisine);
|
|
467
|
+
this.supprime.emit();
|
|
468
|
+
}
|
|
469
|
+
auClavier(evenement) {
|
|
470
|
+
evenement.preventDefault();
|
|
471
|
+
this.auRetrait();
|
|
472
|
+
}
|
|
473
|
+
voisineRetirable() {
|
|
474
|
+
const hote = this.element.nativeElement;
|
|
475
|
+
const retraitDe = (voisin) => {
|
|
476
|
+
if (voisin.tagName.toLowerCase() !== "st-tag") return null;
|
|
477
|
+
const bouton = voisin.querySelector(".st-tag__retrait");
|
|
478
|
+
return bouton instanceof HTMLElement ? bouton : null;
|
|
479
|
+
};
|
|
480
|
+
const parcourir = (depart, pas) => {
|
|
481
|
+
for (let voisin = depart; voisin !== null; voisin = pas(voisin)) {
|
|
482
|
+
const bouton = retraitDe(voisin);
|
|
483
|
+
if (bouton !== null) return bouton;
|
|
484
|
+
}
|
|
485
|
+
return null;
|
|
486
|
+
};
|
|
487
|
+
return parcourir(hote.nextElementSibling, (element) => element.nextElementSibling) ?? parcourir(hote.previousElementSibling, (element) => element.previousElementSibling);
|
|
488
|
+
}
|
|
489
|
+
ancetreFocalisable() {
|
|
490
|
+
const ancetre = this.element.nativeElement.parentElement?.closest("[tabindex]");
|
|
491
|
+
return ancetre instanceof HTMLElement ? ancetre : null;
|
|
492
|
+
}
|
|
493
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
494
|
+
minVersion: "12.0.0",
|
|
495
|
+
version: "22.2.0",
|
|
496
|
+
ngImport: i0,
|
|
497
|
+
type: StTag,
|
|
498
|
+
deps: [],
|
|
499
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
500
|
+
});
|
|
501
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
502
|
+
minVersion: "17.0.0",
|
|
503
|
+
version: "22.2.0",
|
|
504
|
+
type: StTag,
|
|
505
|
+
isStandalone: true,
|
|
506
|
+
selector: "st-tag",
|
|
507
|
+
inputs: {
|
|
508
|
+
libelle: {
|
|
509
|
+
classPropertyName: "libelle",
|
|
510
|
+
publicName: "libelle",
|
|
511
|
+
isSignal: true,
|
|
512
|
+
isRequired: true,
|
|
513
|
+
transformFunction: null
|
|
514
|
+
},
|
|
515
|
+
supprimable: {
|
|
516
|
+
classPropertyName: "supprimable",
|
|
517
|
+
publicName: "supprimable",
|
|
518
|
+
isSignal: true,
|
|
519
|
+
isRequired: false,
|
|
520
|
+
transformFunction: null
|
|
521
|
+
},
|
|
522
|
+
ton: {
|
|
523
|
+
classPropertyName: "ton",
|
|
524
|
+
publicName: "ton",
|
|
525
|
+
isSignal: true,
|
|
526
|
+
isRequired: false,
|
|
527
|
+
transformFunction: null
|
|
528
|
+
},
|
|
529
|
+
taille: {
|
|
530
|
+
classPropertyName: "taille",
|
|
531
|
+
publicName: "taille",
|
|
532
|
+
isSignal: true,
|
|
533
|
+
isRequired: false,
|
|
534
|
+
transformFunction: null
|
|
535
|
+
},
|
|
536
|
+
variante: {
|
|
537
|
+
classPropertyName: "variante",
|
|
538
|
+
publicName: "variante",
|
|
539
|
+
isSignal: true,
|
|
540
|
+
isRequired: false,
|
|
541
|
+
transformFunction: null
|
|
542
|
+
},
|
|
543
|
+
police: {
|
|
544
|
+
classPropertyName: "police",
|
|
545
|
+
publicName: "police",
|
|
546
|
+
isSignal: true,
|
|
547
|
+
isRequired: false,
|
|
548
|
+
transformFunction: null
|
|
549
|
+
},
|
|
550
|
+
casse: {
|
|
551
|
+
classPropertyName: "casse",
|
|
552
|
+
publicName: "casse",
|
|
553
|
+
isSignal: true,
|
|
554
|
+
isRequired: false,
|
|
555
|
+
transformFunction: null
|
|
556
|
+
},
|
|
557
|
+
point: {
|
|
558
|
+
classPropertyName: "point",
|
|
559
|
+
publicName: "point",
|
|
560
|
+
isSignal: true,
|
|
561
|
+
isRequired: false,
|
|
562
|
+
transformFunction: null
|
|
563
|
+
},
|
|
564
|
+
iconeAvant: {
|
|
565
|
+
classPropertyName: "iconeAvant",
|
|
566
|
+
publicName: "iconeAvant",
|
|
567
|
+
isSignal: true,
|
|
568
|
+
isRequired: false,
|
|
569
|
+
transformFunction: null
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
outputs: { supprime: "supprime" },
|
|
573
|
+
host: {
|
|
574
|
+
properties: {
|
|
575
|
+
"attr.data-ton": "ton()",
|
|
576
|
+
"attr.data-taille": "taille()",
|
|
577
|
+
"attr.data-variante": "variante()",
|
|
578
|
+
"attr.data-police": "police()",
|
|
579
|
+
"attr.data-casse": "casse()",
|
|
580
|
+
"attr.data-supprimable": "retirable() ? \"\" : null"
|
|
581
|
+
},
|
|
582
|
+
classAttribute: "st-tag"
|
|
583
|
+
},
|
|
584
|
+
ngImport: i0,
|
|
585
|
+
template: "@if (point()) {\n <span class=\"st-tag__point\"></span>\n}\n@if (iconeAvant(); as icone) {\n <st-icon class=\"st-tag__icone\" [icone]=\"icone\" taille=\"14\" />\n}\n<bdi class=\"st-tag__libelle\">{{ libelleAffiche() }}</bdi>\n\n@if (retirable()) {\n <button\n stIconButton\n class=\"st-tag__retrait\"\n type=\"button\"\n icone=\"croix\"\n taille=\"xs\"\n tailleDuGlyphe=\"16\"\n [etiquette]=\"libelleDeSuppression()\"\n (click)=\"auRetrait()\"\n (keydown.delete)=\"auClavier($event)\"\n (keydown.backspace)=\"auClavier($event)\"\n ></button>\n}\n",
|
|
586
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{box-sizing:border-box;display:inline-flex;gap:var(--st-espacement-1-5);align-items:center;padding-block:var(--st-espacement-1);padding-inline:var(--st-espacement-2-5);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);overflow-wrap:anywhere;color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-sm)}:host([data-taille=sm]){gap:var(--st-espacement-1);padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2)}:host([data-police=mono]){font-family:var(--st-police-mono)}:host([data-casse=capitales]){text-transform:uppercase}:host([data-casse=phrase]){font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-tag__point{flex:none;inline-size:var(--st-espacement-1-5);block-size:var(--st-espacement-1-5);background:currentcolor;border-radius:var(--st-rayon-pleine)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire-discret);background:var(--st-couleur-primaire-discret)}:host([data-ton=information]){color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes-discret);background:var(--st-couleur-succes-discret)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret)}:host([data-ton=primaire]) .st-tag__point{color:var(--st-couleur-primaire)}:host([data-ton=information]) .st-tag__point{color:var(--st-couleur-information)}:host([data-ton=succes]) .st-tag__point{color:var(--st-couleur-succes)}:host([data-ton=avertissement]) .st-tag__point{color:var(--st-couleur-avertissement)}:host([data-ton=danger]) .st-tag__point{color:var(--st-couleur-danger)}:host([data-variante=attenuee][data-ton=primaire]){color:var(--st-couleur-sur-primaire-attenue);background:var(--st-couleur-primaire-attenue)}:host([data-variante=pleine]){color:var(--st-couleur-texte-inverse);background:var(--st-couleur-surface-inverse)}:host([data-variante=pleine][data-ton=primaire]){color:var(--st-couleur-sur-primaire);background:var(--st-couleur-primaire)}:host([data-variante=pleine][data-ton=information]){color:var(--st-couleur-sur-information);background:var(--st-couleur-information)}:host([data-variante=pleine][data-ton=succes]){color:var(--st-couleur-sur-succes);background:var(--st-couleur-succes)}:host([data-variante=pleine][data-ton=avertissement]){color:var(--st-couleur-sur-avertissement);background:var(--st-couleur-avertissement)}:host([data-variante=pleine][data-ton=danger]){color:var(--st-couleur-sur-danger);background:var(--st-couleur-danger)}:host([data-variante=pleine]) .st-tag__point{color:inherit}:host([data-supprimable]){padding-block:var(--st-espacement-1);padding-inline-end:var(--st-espacement-1)}.st-tag__retrait{min-inline-size:var(--st-cible-min);min-block-size:var(--st-cible-min);position:relative}.st-tag__retrait:after{position:absolute;top:50%;left:50%;min-width:var(--st-cible-tactile-min);min-height:var(--st-cible-tactile-min);content:\"\";transform:translate(-50%,-50%)}@media(pointer:coarse){.st-tag__retrait{min-inline-size:var(--st-cible-min);min-block-size:var(--st-cible-min)}}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}\n"],
|
|
587
|
+
dependencies: [{
|
|
588
|
+
kind: "component",
|
|
589
|
+
type: StIconButton,
|
|
590
|
+
selector: "button[stIconButton]",
|
|
591
|
+
inputs: [
|
|
592
|
+
"icone",
|
|
593
|
+
"etiquette",
|
|
594
|
+
"variante",
|
|
595
|
+
"taille",
|
|
596
|
+
"tailleDuGlyphe",
|
|
597
|
+
"enfonce",
|
|
598
|
+
"iconeEnfoncee",
|
|
599
|
+
"chargement",
|
|
600
|
+
"indisponible",
|
|
601
|
+
"raisonIndisponible"
|
|
602
|
+
]
|
|
603
|
+
}, {
|
|
604
|
+
kind: "component",
|
|
605
|
+
type: StIcon,
|
|
606
|
+
selector: "st-icon",
|
|
607
|
+
inputs: [
|
|
608
|
+
"icone",
|
|
609
|
+
"nom",
|
|
610
|
+
"variante",
|
|
611
|
+
"sprite",
|
|
612
|
+
"nomMetier",
|
|
613
|
+
"taille",
|
|
614
|
+
"ton",
|
|
615
|
+
"etiquette",
|
|
616
|
+
"miroir"
|
|
617
|
+
]
|
|
618
|
+
}],
|
|
619
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
623
|
+
minVersion: "12.0.0",
|
|
624
|
+
version: "22.2.0",
|
|
625
|
+
ngImport: i0,
|
|
626
|
+
type: StTag,
|
|
627
|
+
decorators: [{
|
|
628
|
+
type: Component,
|
|
629
|
+
args: [{
|
|
630
|
+
selector: "st-tag",
|
|
631
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
632
|
+
imports: [StIconButton, StIcon],
|
|
633
|
+
host: {
|
|
634
|
+
class: "st-tag",
|
|
635
|
+
"[attr.data-ton]": "ton()",
|
|
636
|
+
"[attr.data-taille]": "taille()",
|
|
637
|
+
"[attr.data-variante]": "variante()",
|
|
638
|
+
"[attr.data-police]": "police()",
|
|
639
|
+
"[attr.data-casse]": "casse()",
|
|
640
|
+
"[attr.data-supprimable]": "retirable() ? \"\" : null"
|
|
641
|
+
},
|
|
642
|
+
template: "@if (point()) {\n <span class=\"st-tag__point\"></span>\n}\n@if (iconeAvant(); as icone) {\n <st-icon class=\"st-tag__icone\" [icone]=\"icone\" taille=\"14\" />\n}\n<bdi class=\"st-tag__libelle\">{{ libelleAffiche() }}</bdi>\n\n@if (retirable()) {\n <button\n stIconButton\n class=\"st-tag__retrait\"\n type=\"button\"\n icone=\"croix\"\n taille=\"xs\"\n tailleDuGlyphe=\"16\"\n [etiquette]=\"libelleDeSuppression()\"\n (click)=\"auRetrait()\"\n (keydown.delete)=\"auClavier($event)\"\n (keydown.backspace)=\"auClavier($event)\"\n ></button>\n}\n",
|
|
643
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{box-sizing:border-box;display:inline-flex;gap:var(--st-espacement-1-5);align-items:center;padding-block:var(--st-espacement-1);padding-inline:var(--st-espacement-2-5);font-size:var(--st-taille-2xs);line-height:var(--st-interligne-2xs);font-weight:var(--st-graisse-semi);letter-spacing:var(--st-interlettrage-capitales);overflow-wrap:anywhere;color:var(--st-couleur-texte-discret);background:var(--st-couleur-surface-enfoncee);border-radius:var(--st-rayon-sm)}:host([data-taille=sm]){gap:var(--st-espacement-1);padding-block:var(--st-espacement-demi);padding-inline:var(--st-espacement-2)}:host([data-police=mono]){font-family:var(--st-police-mono)}:host([data-casse=capitales]){text-transform:uppercase}:host([data-casse=phrase]){font-size:var(--st-taille-xs);line-height:var(--st-interligne-xs)}.st-tag__point{flex:none;inline-size:var(--st-espacement-1-5);block-size:var(--st-espacement-1-5);background:currentcolor;border-radius:var(--st-rayon-pleine)}:host([data-ton=primaire]){color:var(--st-couleur-sur-primaire-discret);background:var(--st-couleur-primaire-discret)}:host([data-ton=information]){color:var(--st-couleur-sur-information-discret);background:var(--st-couleur-information-discret)}:host([data-ton=succes]){color:var(--st-couleur-sur-succes-discret);background:var(--st-couleur-succes-discret)}:host([data-ton=avertissement]){color:var(--st-couleur-sur-avertissement-discret);background:var(--st-couleur-avertissement-discret)}:host([data-ton=danger]){color:var(--st-couleur-sur-danger-discret);background:var(--st-couleur-danger-discret)}:host([data-ton=primaire]) .st-tag__point{color:var(--st-couleur-primaire)}:host([data-ton=information]) .st-tag__point{color:var(--st-couleur-information)}:host([data-ton=succes]) .st-tag__point{color:var(--st-couleur-succes)}:host([data-ton=avertissement]) .st-tag__point{color:var(--st-couleur-avertissement)}:host([data-ton=danger]) .st-tag__point{color:var(--st-couleur-danger)}:host([data-variante=attenuee][data-ton=primaire]){color:var(--st-couleur-sur-primaire-attenue);background:var(--st-couleur-primaire-attenue)}:host([data-variante=pleine]){color:var(--st-couleur-texte-inverse);background:var(--st-couleur-surface-inverse)}:host([data-variante=pleine][data-ton=primaire]){color:var(--st-couleur-sur-primaire);background:var(--st-couleur-primaire)}:host([data-variante=pleine][data-ton=information]){color:var(--st-couleur-sur-information);background:var(--st-couleur-information)}:host([data-variante=pleine][data-ton=succes]){color:var(--st-couleur-sur-succes);background:var(--st-couleur-succes)}:host([data-variante=pleine][data-ton=avertissement]){color:var(--st-couleur-sur-avertissement);background:var(--st-couleur-avertissement)}:host([data-variante=pleine][data-ton=danger]){color:var(--st-couleur-sur-danger);background:var(--st-couleur-danger)}:host([data-variante=pleine]) .st-tag__point{color:inherit}:host([data-supprimable]){padding-block:var(--st-espacement-1);padding-inline-end:var(--st-espacement-1)}.st-tag__retrait{min-inline-size:var(--st-cible-min);min-block-size:var(--st-cible-min);position:relative}.st-tag__retrait:after{position:absolute;top:50%;left:50%;min-width:var(--st-cible-tactile-min);min-height:var(--st-cible-tactile-min);content:\"\";transform:translate(-50%,-50%)}@media(pointer:coarse){.st-tag__retrait{min-inline-size:var(--st-cible-min);min-block-size:var(--st-cible-min)}}@media(forced-colors:active){:host{outline:var(--st-epaisseur-fine) solid CanvasText;outline-offset:calc(-1 * var(--st-epaisseur-fine))}}\n"]
|
|
644
|
+
}]
|
|
645
|
+
}],
|
|
646
|
+
ctorParameters: () => [],
|
|
647
|
+
propDecorators: {
|
|
648
|
+
libelle: [{
|
|
649
|
+
type: i0.Input,
|
|
650
|
+
args: [{
|
|
651
|
+
isSignal: true,
|
|
652
|
+
alias: "libelle",
|
|
653
|
+
required: true
|
|
654
|
+
}]
|
|
655
|
+
}],
|
|
656
|
+
supprimable: [{
|
|
657
|
+
type: i0.Input,
|
|
658
|
+
args: [{
|
|
659
|
+
isSignal: true,
|
|
660
|
+
alias: "supprimable",
|
|
661
|
+
required: false
|
|
662
|
+
}]
|
|
663
|
+
}],
|
|
664
|
+
ton: [{
|
|
665
|
+
type: i0.Input,
|
|
666
|
+
args: [{
|
|
667
|
+
isSignal: true,
|
|
668
|
+
alias: "ton",
|
|
669
|
+
required: false
|
|
670
|
+
}]
|
|
671
|
+
}],
|
|
672
|
+
taille: [{
|
|
673
|
+
type: i0.Input,
|
|
674
|
+
args: [{
|
|
675
|
+
isSignal: true,
|
|
676
|
+
alias: "taille",
|
|
677
|
+
required: false
|
|
678
|
+
}]
|
|
679
|
+
}],
|
|
680
|
+
variante: [{
|
|
681
|
+
type: i0.Input,
|
|
682
|
+
args: [{
|
|
683
|
+
isSignal: true,
|
|
684
|
+
alias: "variante",
|
|
685
|
+
required: false
|
|
686
|
+
}]
|
|
687
|
+
}],
|
|
688
|
+
police: [{
|
|
689
|
+
type: i0.Input,
|
|
690
|
+
args: [{
|
|
691
|
+
isSignal: true,
|
|
692
|
+
alias: "police",
|
|
693
|
+
required: false
|
|
694
|
+
}]
|
|
695
|
+
}],
|
|
696
|
+
casse: [{
|
|
697
|
+
type: i0.Input,
|
|
698
|
+
args: [{
|
|
699
|
+
isSignal: true,
|
|
700
|
+
alias: "casse",
|
|
701
|
+
required: false
|
|
702
|
+
}]
|
|
703
|
+
}],
|
|
704
|
+
point: [{
|
|
705
|
+
type: i0.Input,
|
|
706
|
+
args: [{
|
|
707
|
+
isSignal: true,
|
|
708
|
+
alias: "point",
|
|
709
|
+
required: false
|
|
710
|
+
}]
|
|
711
|
+
}],
|
|
712
|
+
iconeAvant: [{
|
|
713
|
+
type: i0.Input,
|
|
714
|
+
args: [{
|
|
715
|
+
isSignal: true,
|
|
716
|
+
alias: "iconeAvant",
|
|
717
|
+
required: false
|
|
718
|
+
}]
|
|
719
|
+
}],
|
|
720
|
+
supprime: [{
|
|
721
|
+
type: i0.Output,
|
|
722
|
+
args: ["supprime"]
|
|
723
|
+
}]
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
var StGroupeDEtiquettes = class StGroupeDEtiquettes {
|
|
727
|
+
libelles = inject(ST_LIBELLES);
|
|
728
|
+
etiquette = input(null, ...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
|
|
729
|
+
annonce = new AnnonceLocale(inject(DestroyRef));
|
|
730
|
+
liste = viewChild.required("liste", ...ngDevMode ? [{ debugName: "liste" }] : /* istanbul ignore next */ []);
|
|
731
|
+
annoncerLeRetrait(libelle) {
|
|
732
|
+
this.annonce.annoncer(this.libelles().etiquetteRetiree(libelle));
|
|
733
|
+
}
|
|
734
|
+
recevoirLeFocus() {
|
|
735
|
+
this.liste().nativeElement.focus();
|
|
736
|
+
}
|
|
737
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
738
|
+
minVersion: "12.0.0",
|
|
739
|
+
version: "22.2.0",
|
|
740
|
+
ngImport: i0,
|
|
741
|
+
type: StGroupeDEtiquettes,
|
|
742
|
+
deps: [],
|
|
743
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
744
|
+
});
|
|
745
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
746
|
+
minVersion: "17.2.0",
|
|
747
|
+
version: "22.2.0",
|
|
748
|
+
type: StGroupeDEtiquettes,
|
|
749
|
+
isStandalone: true,
|
|
750
|
+
selector: "[stGroupeDEtiquettes]",
|
|
751
|
+
inputs: { etiquette: {
|
|
752
|
+
classPropertyName: "etiquette",
|
|
753
|
+
publicName: "etiquette",
|
|
754
|
+
isSignal: true,
|
|
755
|
+
isRequired: false,
|
|
756
|
+
transformFunction: null
|
|
757
|
+
} },
|
|
758
|
+
host: { classAttribute: "st-groupe-d-etiquettes" },
|
|
759
|
+
providers: [{
|
|
760
|
+
provide: ST_CROCHETS_DE_GROUPE,
|
|
761
|
+
useFactory: () => {
|
|
762
|
+
const groupe = inject(StGroupeDEtiquettes);
|
|
763
|
+
return {
|
|
764
|
+
roleDesEtiquettes: "listitem",
|
|
765
|
+
retraitDemande: (libelle, voisine) => {
|
|
766
|
+
if (voisine === null) groupe.recevoirLeFocus();
|
|
767
|
+
else voisine.focus();
|
|
768
|
+
groupe.annoncerLeRetrait(libelle);
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
}],
|
|
773
|
+
viewQueries: [{
|
|
774
|
+
propertyName: "liste",
|
|
775
|
+
first: true,
|
|
776
|
+
predicate: ["liste"],
|
|
777
|
+
descendants: true,
|
|
778
|
+
isSignal: true
|
|
779
|
+
}],
|
|
780
|
+
ngImport: i0,
|
|
781
|
+
template: "<div\n #liste\n class=\"st-groupe-d-etiquettes__liste\"\n role=\"list\"\n tabindex=\"-1\"\n [attr.aria-label]=\"etiquette()\"\n>\n <ng-content />\n</div>\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
782
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-groupe-d-etiquettes__liste{display:flex;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-2);overflow-x:clip}.st-groupe-d-etiquettes__liste:focus{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}\n"],
|
|
783
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
784
|
+
});
|
|
785
|
+
};
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
787
|
+
minVersion: "12.0.0",
|
|
788
|
+
version: "22.2.0",
|
|
789
|
+
ngImport: i0,
|
|
790
|
+
type: StGroupeDEtiquettes,
|
|
791
|
+
decorators: [{
|
|
792
|
+
type: Component,
|
|
793
|
+
args: [{
|
|
794
|
+
selector: "[stGroupeDEtiquettes]",
|
|
795
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
796
|
+
providers: [{
|
|
797
|
+
provide: ST_CROCHETS_DE_GROUPE,
|
|
798
|
+
useFactory: () => {
|
|
799
|
+
const groupe = inject(StGroupeDEtiquettes);
|
|
800
|
+
return {
|
|
801
|
+
roleDesEtiquettes: "listitem",
|
|
802
|
+
retraitDemande: (libelle, voisine) => {
|
|
803
|
+
if (voisine === null) groupe.recevoirLeFocus();
|
|
804
|
+
else voisine.focus();
|
|
805
|
+
groupe.annoncerLeRetrait(libelle);
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
}],
|
|
810
|
+
host: { class: "st-groupe-d-etiquettes" },
|
|
811
|
+
template: "<div\n #liste\n class=\"st-groupe-d-etiquettes__liste\"\n role=\"list\"\n tabindex=\"-1\"\n [attr.aria-label]=\"etiquette()\"\n>\n <ng-content />\n</div>\n<span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n",
|
|
812
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-groupe-d-etiquettes__liste{display:flex;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-2);overflow-x:clip}.st-groupe-d-etiquettes__liste:focus{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}\n"]
|
|
813
|
+
}]
|
|
814
|
+
}],
|
|
815
|
+
propDecorators: {
|
|
816
|
+
etiquette: [{
|
|
817
|
+
type: i0.Input,
|
|
818
|
+
args: [{
|
|
819
|
+
isSignal: true,
|
|
820
|
+
alias: "etiquette",
|
|
821
|
+
required: false
|
|
822
|
+
}]
|
|
823
|
+
}],
|
|
824
|
+
liste: [{
|
|
825
|
+
type: i0.ViewChild,
|
|
826
|
+
args: ["liste", { isSignal: true }]
|
|
827
|
+
}]
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
const ST_CHAMP_A_ETIQUETTES = new InjectionToken("st.champ-a-etiquettes");
|
|
831
|
+
const CROCHETS_DU_GROUPE = {
|
|
832
|
+
roleDesEtiquettes: null,
|
|
833
|
+
retraitDemande: () => void 0
|
|
834
|
+
};
|
|
835
|
+
var StTagGroup = class StTagGroup {
|
|
836
|
+
libelles = inject(ST_LIBELLES);
|
|
837
|
+
document = inject(DOCUMENT);
|
|
838
|
+
injecteur = inject(Injector);
|
|
839
|
+
champ = inject(ST_CHAMP_A_ETIQUETTES, { optional: true });
|
|
840
|
+
etiquette = input.required(...ngDevMode ? [{ debugName: "etiquette" }] : /* istanbul ignore next */ []);
|
|
841
|
+
elements = input([], ...ngDevMode ? [{ debugName: "elements" }] : /* istanbul ignore next */ []);
|
|
842
|
+
supprime = output();
|
|
843
|
+
annonce = new AnnonceLocale(inject(DestroyRef));
|
|
844
|
+
liste = viewChild("liste", ...ngDevMode ? [{ debugName: "liste" }] : /* istanbul ignore next */ []);
|
|
845
|
+
enAttente = null;
|
|
846
|
+
constructor() {
|
|
847
|
+
effect(() => {
|
|
848
|
+
const elements = this.elements();
|
|
849
|
+
const attente = this.enAttente;
|
|
850
|
+
if (attente === null) return;
|
|
851
|
+
if (elements.some((element) => element.valeur === attente.valeur)) return;
|
|
852
|
+
this.enAttente = null;
|
|
853
|
+
untracked(() => {
|
|
854
|
+
this.annoncer(this.libelles().etiquetteRetiree(attente.libelle));
|
|
855
|
+
});
|
|
856
|
+
afterNextRender(() => {
|
|
857
|
+
this.rendreLeFocus(attente);
|
|
858
|
+
}, { injector: this.injecteur });
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
retirer(element, indice) {
|
|
862
|
+
this.enAttente = {
|
|
863
|
+
valeur: element.valeur,
|
|
864
|
+
libelle: element.libelle,
|
|
865
|
+
indice,
|
|
866
|
+
declencheur: this.document.activeElement
|
|
867
|
+
};
|
|
868
|
+
this.supprime.emit(element.valeur);
|
|
869
|
+
}
|
|
870
|
+
annoncer(message) {
|
|
871
|
+
if (this.champ === null) this.annonce.annoncer(message);
|
|
872
|
+
else this.champ.annoncer(message);
|
|
873
|
+
}
|
|
874
|
+
rendreLeFocus(attente) {
|
|
875
|
+
const actif = this.document.activeElement;
|
|
876
|
+
if (!(actif === null || actif === this.document.body || !actif.isConnected) && actif !== attente.declencheur) return;
|
|
877
|
+
const liste = this.liste()?.nativeElement;
|
|
878
|
+
const elements = liste === void 0 ? [] : [...liste.children];
|
|
879
|
+
const retraitDe = (indice) => elements[indice]?.querySelector(".st-tag__retrait") ?? null;
|
|
880
|
+
for (let indice = attente.indice; indice < elements.length; indice += 1) {
|
|
881
|
+
const bouton = retraitDe(indice);
|
|
882
|
+
if (bouton !== null) {
|
|
883
|
+
bouton.focus();
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
for (let indice = Math.min(attente.indice, elements.length) - 1; indice >= 0; indice -= 1) {
|
|
888
|
+
const bouton = retraitDe(indice);
|
|
889
|
+
if (bouton !== null) {
|
|
890
|
+
bouton.focus();
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
if (this.champ !== null) this.champ.recevoirLeFocus();
|
|
895
|
+
else liste?.focus();
|
|
896
|
+
}
|
|
897
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
898
|
+
minVersion: "12.0.0",
|
|
899
|
+
version: "22.2.0",
|
|
900
|
+
ngImport: i0,
|
|
901
|
+
type: StTagGroup,
|
|
902
|
+
deps: [],
|
|
903
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
904
|
+
});
|
|
905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
906
|
+
minVersion: "17.0.0",
|
|
907
|
+
version: "22.2.0",
|
|
908
|
+
type: StTagGroup,
|
|
909
|
+
isStandalone: true,
|
|
910
|
+
selector: "st-tag-group",
|
|
911
|
+
inputs: {
|
|
912
|
+
etiquette: {
|
|
913
|
+
classPropertyName: "etiquette",
|
|
914
|
+
publicName: "etiquette",
|
|
915
|
+
isSignal: true,
|
|
916
|
+
isRequired: true,
|
|
917
|
+
transformFunction: null
|
|
918
|
+
},
|
|
919
|
+
elements: {
|
|
920
|
+
classPropertyName: "elements",
|
|
921
|
+
publicName: "elements",
|
|
922
|
+
isSignal: true,
|
|
923
|
+
isRequired: false,
|
|
924
|
+
transformFunction: null
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
outputs: { supprime: "supprime" },
|
|
928
|
+
host: { classAttribute: "st-tag-group" },
|
|
929
|
+
providers: [{
|
|
930
|
+
provide: ST_CROCHETS_DE_GROUPE,
|
|
931
|
+
useValue: CROCHETS_DU_GROUPE
|
|
932
|
+
}],
|
|
933
|
+
viewQueries: [{
|
|
934
|
+
propertyName: "liste",
|
|
935
|
+
first: true,
|
|
936
|
+
predicate: ["liste"],
|
|
937
|
+
descendants: true,
|
|
938
|
+
isSignal: true
|
|
939
|
+
}],
|
|
940
|
+
ngImport: i0,
|
|
941
|
+
template: "<!-- Dans un champ (`st-tag-input`), une liste vide n'est pas rendue : le focus de repli y va au\n champ. Seule, elle reste, focalisable par script : la derniere etiquette retiree y pose le\n focus. `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (audit UI du\n 2026-09-27, D-1). -->\n@if (champ === null || elements().length > 0) {\n <ul #liste class=\"st-tag-group__liste\" role=\"list\" tabindex=\"-1\" [attr.aria-label]=\"etiquette()\">\n @for (element of elements(); track element.valeur; let indice = $index) {\n <li class=\"st-tag-group__element\">\n <st-tag\n [libelle]=\"element.libelle\"\n [ton]=\"element.ton ?? 'neutre'\"\n [supprimable]=\"element.supprimable ?? false\"\n (supprime)=\"retirer(element, indice)\"\n />\n </li>\n }\n </ul>\n}\n<!-- La region vit dans le GROUPE, hors de la liste : l'etiquette retiree quitte le document avant\n son annonce. Dans un champ, c'est la region du champ qui parle (D81). -->\n@if (champ === null) {\n <span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n}\n",
|
|
942
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-tag-group__liste{display:flex;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-2);padding:0;margin:0;list-style:none;overflow-x:clip}.st-tag-group__liste:focus{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-tag-group__element{display:flex;max-inline-size:100%}\n"],
|
|
943
|
+
dependencies: [{
|
|
944
|
+
kind: "component",
|
|
945
|
+
type: StTag,
|
|
946
|
+
selector: "st-tag",
|
|
947
|
+
inputs: [
|
|
948
|
+
"libelle",
|
|
949
|
+
"supprimable",
|
|
950
|
+
"ton",
|
|
951
|
+
"taille",
|
|
952
|
+
"variante",
|
|
953
|
+
"police",
|
|
954
|
+
"casse",
|
|
955
|
+
"point",
|
|
956
|
+
"iconeAvant"
|
|
957
|
+
],
|
|
958
|
+
outputs: ["supprime"]
|
|
959
|
+
}],
|
|
960
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
961
|
+
});
|
|
962
|
+
};
|
|
963
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
964
|
+
minVersion: "12.0.0",
|
|
965
|
+
version: "22.2.0",
|
|
966
|
+
ngImport: i0,
|
|
967
|
+
type: StTagGroup,
|
|
968
|
+
decorators: [{
|
|
969
|
+
type: Component,
|
|
970
|
+
args: [{
|
|
971
|
+
selector: "st-tag-group",
|
|
972
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
973
|
+
imports: [StTag],
|
|
974
|
+
providers: [{
|
|
975
|
+
provide: ST_CROCHETS_DE_GROUPE,
|
|
976
|
+
useValue: CROCHETS_DU_GROUPE
|
|
977
|
+
}],
|
|
978
|
+
host: { class: "st-tag-group" },
|
|
979
|
+
template: "<!-- Dans un champ (`st-tag-input`), une liste vide n'est pas rendue : le focus de repli y va au\n champ. Seule, elle reste, focalisable par script : la derniere etiquette retiree y pose le\n focus. `role=\"list\"` : sans puces, Safari ne lit plus une liste comme une liste (audit UI du\n 2026-09-27, D-1). -->\n@if (champ === null || elements().length > 0) {\n <ul #liste class=\"st-tag-group__liste\" role=\"list\" tabindex=\"-1\" [attr.aria-label]=\"etiquette()\">\n @for (element of elements(); track element.valeur; let indice = $index) {\n <li class=\"st-tag-group__element\">\n <st-tag\n [libelle]=\"element.libelle\"\n [ton]=\"element.ton ?? 'neutre'\"\n [supprimable]=\"element.supprimable ?? false\"\n (supprime)=\"retirer(element, indice)\"\n />\n </li>\n }\n </ul>\n}\n<!-- La region vit dans le GROUPE, hors de la liste : l'etiquette retiree quitte le document avant\n son annonce. Dans un champ, c'est la region du champ qui parle (D81). -->\n@if (champ === null) {\n <span class=\"st-vh\" aria-live=\"polite\">{{ annonce.texte() }}</span>\n}\n",
|
|
980
|
+
styles: [".st-vh{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host([hidden]){display:none!important}:host{display:block}.st-tag-group__liste{display:flex;flex-wrap:wrap;align-items:center;gap:var(--st-espacement-2);padding:0;margin:0;list-style:none;overflow-x:clip}.st-tag-group__liste:focus{outline:var(--st-focus-epaisseur) solid var(--st-couleur-anneau-focus);outline-offset:var(--st-focus-decalage);box-shadow:0 0 0 var(--st-focus-lisere) var(--st-couleur-lisere-focus)}.st-tag-group__element{display:flex;max-inline-size:100%}\n"]
|
|
981
|
+
}]
|
|
982
|
+
}],
|
|
983
|
+
ctorParameters: () => [],
|
|
984
|
+
propDecorators: {
|
|
985
|
+
etiquette: [{
|
|
986
|
+
type: i0.Input,
|
|
987
|
+
args: [{
|
|
988
|
+
isSignal: true,
|
|
989
|
+
alias: "etiquette",
|
|
990
|
+
required: true
|
|
991
|
+
}]
|
|
992
|
+
}],
|
|
993
|
+
elements: [{
|
|
994
|
+
type: i0.Input,
|
|
995
|
+
args: [{
|
|
996
|
+
isSignal: true,
|
|
997
|
+
alias: "elements",
|
|
998
|
+
required: false
|
|
999
|
+
}]
|
|
1000
|
+
}],
|
|
1001
|
+
supprime: [{
|
|
1002
|
+
type: i0.Output,
|
|
1003
|
+
args: ["supprime"]
|
|
1004
|
+
}],
|
|
1005
|
+
liste: [{
|
|
1006
|
+
type: i0.ViewChild,
|
|
1007
|
+
args: ["liste", { isSignal: true }]
|
|
1008
|
+
}]
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
export { ST_CHAMP_A_ETIQUETTES, StBadge, StBadgeAncre, StGroupeDEtiquettes, StStatusPill, StTag, StTagGroup };
|
|
1012
|
+
|
|
1013
|
+
//# sourceMappingURL=starterlib-ui-indicateurs.mjs.map
|