@sentropic/design-system-vue 0.36.43 → 0.36.45
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/Badge.d.ts +34 -0
- package/dist/Badge.d.ts.map +1 -1
- package/dist/Badge.js +3 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Checkbox.d.ts +11 -0
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +50 -26
- package/dist/Checkbox.js.map +1 -1
- package/dist/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible.js +6 -0
- package/dist/Collapsible.js.map +1 -1
- package/dist/NavActionStack.d.ts +105 -0
- package/dist/NavActionStack.d.ts.map +1 -0
- package/dist/NavActionStack.js +109 -0
- package/dist/NavActionStack.js.map +1 -0
- package/dist/NavItem.d.ts +189 -0
- package/dist/NavItem.d.ts.map +1 -0
- package/dist/NavItem.js +121 -0
- package/dist/NavItem.js.map +1 -0
- package/dist/NavSection.d.ts +109 -0
- package/dist/NavSection.d.ts.map +1 -0
- package/dist/NavSection.js +104 -0
- package/dist/NavSection.js.map +1 -0
- package/dist/Overline.d.ts +40 -0
- package/dist/Overline.d.ts.map +1 -0
- package/dist/Overline.js +20 -0
- package/dist/Overline.js.map +1 -0
- package/dist/Search.d.ts +11 -0
- package/dist/Search.d.ts.map +1 -1
- package/dist/Search.js +2 -1
- package/dist/Search.js.map +1 -1
- package/dist/SelectableRow.d.ts.map +1 -1
- package/dist/SelectableRow.js +14 -2
- package/dist/SelectableRow.js.map +1 -1
- package/dist/StatusDot.d.ts +87 -0
- package/dist/StatusDot.d.ts.map +1 -0
- package/dist/StatusDot.js +52 -0
- package/dist/StatusDot.js.map +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +343 -0
- package/package.json +1 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { type VNode } from "vue";
|
|
2
|
+
import type { StatusDotTone } from "./StatusDot.js";
|
|
3
|
+
import type { ColorSwatchShape } from "./ColorSwatch.js";
|
|
4
|
+
/** Profondeur dans l'arbre de nav → échelle typographique DÉCROISSANTE.
|
|
5
|
+
* L0 = racine (base/600), chaque palier descend en taille ET en graisse pour
|
|
6
|
+
* que la hiérarchie se LISE sans indentation seule. */
|
|
7
|
+
export type NavItemDepth = 0 | 1 | 2 | 3;
|
|
8
|
+
/** Ton sémantique de la rangée. `error` est un VRAI état (un « HTTP 403 »
|
|
9
|
+
* devient rouge sémantique), pas une teinte décorative. */
|
|
10
|
+
export type NavItemStatus = "neutral" | "info" | "success" | "warning" | "error";
|
|
11
|
+
export type NavItemSwatch = {
|
|
12
|
+
/** Couleur arbitraire (hex/rgb/var) → rendue par ColorSwatch. */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Ton sémantique → rendu par StatusDot (un point). Ignoré si `color`. */
|
|
15
|
+
tone?: StatusDotTone;
|
|
16
|
+
/** Forme de la pastille couleur (ColorSwatch). Défaut « square ». */
|
|
17
|
+
shape?: ColorSwatchShape;
|
|
18
|
+
};
|
|
19
|
+
export type NavItemProps = {
|
|
20
|
+
/** Clé de sélection, passée telle quelle à SelectableRow (data-value). */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** Libellé principal (1ʳᵉ ligne). */
|
|
23
|
+
title: string;
|
|
24
|
+
/** 2ᵉ ligne MUETTE, ellipsée indépendamment du titre. */
|
|
25
|
+
caption?: string;
|
|
26
|
+
/** Profondeur (défaut 0) → échelle typo + indentation de la tête. */
|
|
27
|
+
depth?: NavItemDepth;
|
|
28
|
+
/** Pastille de tête : couleur arbitraire (ColorSwatch) ou ton (StatusDot). */
|
|
29
|
+
swatch?: NavItemSwatch;
|
|
30
|
+
/** Bulle de compte en queue (Badge circle/sm, tabular-nums). */
|
|
31
|
+
count?: number;
|
|
32
|
+
/** Ton sémantique de la rangée. */
|
|
33
|
+
status?: NavItemStatus;
|
|
34
|
+
/** Sélection (honorée en standalone ; la liste prime si encadrée). */
|
|
35
|
+
selected?: boolean;
|
|
36
|
+
/** Non-interactif. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Rend la rangée comme un lien (ancre) — anatomie identique. */
|
|
39
|
+
href?: string;
|
|
40
|
+
/** Séparateur token-only rendu APRÈS la rangée. */
|
|
41
|
+
divider?: boolean;
|
|
42
|
+
/** Notifié à chaque bascule de sélection (rangée standalone). */
|
|
43
|
+
onSelect?: (selected: boolean) => void;
|
|
44
|
+
class?: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* NavItem — l'ANATOMIE DE RANGÉE CANONIQUE du système de navigation (vague 2).
|
|
48
|
+
* La brique que tout rail/drawer instancie : tête (pastille/icône) + titre +
|
|
49
|
+
* caption muette + queue (bulle de compte) + sélection + profondeur
|
|
50
|
+
* typographique + séparateur optionnel.
|
|
51
|
+
*
|
|
52
|
+
* Zéro-entropie : NavItem NE RÉIMPLÉMENTE RIEN. Il COMPOSE SelectableRow (qui
|
|
53
|
+
* possède déjà leading/trailing/caption, la sélection, le rôle ARIA dérivé du
|
|
54
|
+
* conteneur et la propagation du roving-tabindex) et réutilise les primitives
|
|
55
|
+
* vague 1 :
|
|
56
|
+
* • ColorSwatch → tête quand `swatch.color` (couleur arbitraire inline)
|
|
57
|
+
* • StatusDot → tête quand `swatch.tone` (point sémantique)
|
|
58
|
+
* • Badge → queue (shape="circle" size="sm", tabular-nums) pour `count`
|
|
59
|
+
* Style PROPRE token-only scopé ; AUCUN hex en dur.
|
|
60
|
+
*
|
|
61
|
+
* Slots : `leading` (prime sur `swatch`), `trailing` (prime sur `count`).
|
|
62
|
+
*/
|
|
63
|
+
export declare const NavItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
64
|
+
value: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
title: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
required: true;
|
|
71
|
+
};
|
|
72
|
+
caption: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
depth: {
|
|
77
|
+
type: () => NavItemDepth;
|
|
78
|
+
default: number;
|
|
79
|
+
};
|
|
80
|
+
swatch: {
|
|
81
|
+
type: () => NavItemSwatch;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
count: {
|
|
85
|
+
type: NumberConstructor;
|
|
86
|
+
default: undefined;
|
|
87
|
+
};
|
|
88
|
+
status: {
|
|
89
|
+
type: () => NavItemStatus;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
selected: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
disabled: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
100
|
+
href: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
default: undefined;
|
|
103
|
+
};
|
|
104
|
+
divider: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: boolean;
|
|
107
|
+
};
|
|
108
|
+
onSelect: {
|
|
109
|
+
type: () => (selected: boolean) => void;
|
|
110
|
+
default: undefined;
|
|
111
|
+
};
|
|
112
|
+
class: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: undefined;
|
|
115
|
+
};
|
|
116
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
117
|
+
[key: string]: any;
|
|
118
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
119
|
+
select: (_selected: boolean) => true;
|
|
120
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
121
|
+
value: {
|
|
122
|
+
type: StringConstructor;
|
|
123
|
+
default: undefined;
|
|
124
|
+
};
|
|
125
|
+
title: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
required: true;
|
|
128
|
+
};
|
|
129
|
+
caption: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: undefined;
|
|
132
|
+
};
|
|
133
|
+
depth: {
|
|
134
|
+
type: () => NavItemDepth;
|
|
135
|
+
default: number;
|
|
136
|
+
};
|
|
137
|
+
swatch: {
|
|
138
|
+
type: () => NavItemSwatch;
|
|
139
|
+
default: undefined;
|
|
140
|
+
};
|
|
141
|
+
count: {
|
|
142
|
+
type: NumberConstructor;
|
|
143
|
+
default: undefined;
|
|
144
|
+
};
|
|
145
|
+
status: {
|
|
146
|
+
type: () => NavItemStatus;
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
149
|
+
selected: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
disabled: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
default: boolean;
|
|
156
|
+
};
|
|
157
|
+
href: {
|
|
158
|
+
type: StringConstructor;
|
|
159
|
+
default: undefined;
|
|
160
|
+
};
|
|
161
|
+
divider: {
|
|
162
|
+
type: BooleanConstructor;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
165
|
+
onSelect: {
|
|
166
|
+
type: () => (selected: boolean) => void;
|
|
167
|
+
default: undefined;
|
|
168
|
+
};
|
|
169
|
+
class: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
default: undefined;
|
|
172
|
+
};
|
|
173
|
+
}>> & Readonly<{
|
|
174
|
+
onSelect?: ((_selected: boolean) => any) | undefined;
|
|
175
|
+
}>, {
|
|
176
|
+
class: string;
|
|
177
|
+
caption: string;
|
|
178
|
+
onSelect: (selected: boolean) => void;
|
|
179
|
+
disabled: boolean;
|
|
180
|
+
href: string;
|
|
181
|
+
status: NavItemStatus;
|
|
182
|
+
value: string;
|
|
183
|
+
count: number;
|
|
184
|
+
divider: boolean;
|
|
185
|
+
selected: boolean;
|
|
186
|
+
depth: NavItemDepth;
|
|
187
|
+
swatch: NavItemSwatch;
|
|
188
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
189
|
+
//# sourceMappingURL=NavItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../src/NavItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAMjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;uDAEuD;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEzC;2DAC2D;AAC3D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjF,MAAM,MAAM,aAAa,GAAG;IAC1B,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,qEAAqE;IACrE,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;cAMS,MAAM,YAAY;;;;cACjB,MAAM,aAAa;;;;;;;;cAEnB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;cAMd,MAAM,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;wBAM5C,OAAO;;;;;;;;;;;;;;;cAfF,MAAM,YAAY;;;;cACjB,MAAM,aAAa;;;;;;;;cAEnB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;cAMd,MAAM,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;;;yBAAhB,OAAO,KAAK,IAAI;;;;;;;;;;4EAqHlE,CAAC"}
|
package/dist/NavItem.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent, h, ref, watch } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
import { SelectableRow } from "./SelectableRow.js";
|
|
4
|
+
import { ColorSwatch } from "./ColorSwatch.js";
|
|
5
|
+
import { StatusDot } from "./StatusDot.js";
|
|
6
|
+
import { Badge } from "./Badge.js";
|
|
7
|
+
const DEPTH_INDENT = ["0rem", "0.75rem", "1.5rem", "2.25rem"];
|
|
8
|
+
/**
|
|
9
|
+
* NavItem — l'ANATOMIE DE RANGÉE CANONIQUE du système de navigation (vague 2).
|
|
10
|
+
* La brique que tout rail/drawer instancie : tête (pastille/icône) + titre +
|
|
11
|
+
* caption muette + queue (bulle de compte) + sélection + profondeur
|
|
12
|
+
* typographique + séparateur optionnel.
|
|
13
|
+
*
|
|
14
|
+
* Zéro-entropie : NavItem NE RÉIMPLÉMENTE RIEN. Il COMPOSE SelectableRow (qui
|
|
15
|
+
* possède déjà leading/trailing/caption, la sélection, le rôle ARIA dérivé du
|
|
16
|
+
* conteneur et la propagation du roving-tabindex) et réutilise les primitives
|
|
17
|
+
* vague 1 :
|
|
18
|
+
* • ColorSwatch → tête quand `swatch.color` (couleur arbitraire inline)
|
|
19
|
+
* • StatusDot → tête quand `swatch.tone` (point sémantique)
|
|
20
|
+
* • Badge → queue (shape="circle" size="sm", tabular-nums) pour `count`
|
|
21
|
+
* Style PROPRE token-only scopé ; AUCUN hex en dur.
|
|
22
|
+
*
|
|
23
|
+
* Slots : `leading` (prime sur `swatch`), `trailing` (prime sur `count`).
|
|
24
|
+
*/
|
|
25
|
+
export const NavItem = defineComponent({
|
|
26
|
+
name: "NavItem",
|
|
27
|
+
props: {
|
|
28
|
+
value: { type: String, default: undefined },
|
|
29
|
+
title: { type: String, required: true },
|
|
30
|
+
caption: { type: String, default: undefined },
|
|
31
|
+
depth: { type: Number, default: 0 },
|
|
32
|
+
swatch: { type: Object, default: undefined },
|
|
33
|
+
count: { type: Number, default: undefined },
|
|
34
|
+
status: { type: String, default: "neutral" },
|
|
35
|
+
selected: { type: Boolean, default: false },
|
|
36
|
+
disabled: { type: Boolean, default: false },
|
|
37
|
+
href: { type: String, default: undefined },
|
|
38
|
+
divider: { type: Boolean, default: false },
|
|
39
|
+
onSelect: {
|
|
40
|
+
type: Function,
|
|
41
|
+
default: undefined,
|
|
42
|
+
},
|
|
43
|
+
class: { type: String, default: undefined },
|
|
44
|
+
},
|
|
45
|
+
emits: {
|
|
46
|
+
select: (_selected) => true,
|
|
47
|
+
},
|
|
48
|
+
setup(props, { slots, attrs, emit }) {
|
|
49
|
+
// Sélection standalone : SelectableRow vue est CONTRÔLÉ (il n'auto-toggle
|
|
50
|
+
// pas), donc NavItem détient l'état interne et le rebascule à la rangée.
|
|
51
|
+
const internalSelected = ref(props.selected);
|
|
52
|
+
watch(() => props.selected, (next) => {
|
|
53
|
+
internalSelected.value = next;
|
|
54
|
+
});
|
|
55
|
+
function handleSelect(next) {
|
|
56
|
+
internalSelected.value = next;
|
|
57
|
+
props.onSelect?.(next);
|
|
58
|
+
emit("select", next);
|
|
59
|
+
}
|
|
60
|
+
return () => {
|
|
61
|
+
// Profondeur bornée [0..3] : une valeur hors-borne ne casse pas la classe.
|
|
62
|
+
const safeDepth = Math.min(Math.max(Math.trunc(Number(props.depth) || 0), 0), 3);
|
|
63
|
+
// Le count alimente un aria-label explicite « N title » (un compte nu est
|
|
64
|
+
// ambigu pour un lecteur d'écran — cf. la doc de Badge).
|
|
65
|
+
const countLabel = props.count != null ? `${props.count} ${props.title}` : undefined;
|
|
66
|
+
const wrapperClasses = classNames("st-navItem", `st-navItem--depth${safeDepth}`, props.status !== "neutral" ? `st-navItem--status-${props.status}` : undefined, props.class);
|
|
67
|
+
// Indentation de profondeur : une var additive sur le wrapper, à fallback
|
|
68
|
+
// littéral par palier (aucun hex). La rangée hérite via la cascade.
|
|
69
|
+
const depthStyle = `--st-navItem-indent: var(--st-component-navItem-depth${safeDepth}-indent, ${DEPTH_INDENT[safeDepth]});`;
|
|
70
|
+
// Tête : leading (slot) prime sur swatch ; ColorSwatch pour une couleur
|
|
71
|
+
// arbitraire, sinon StatusDot pour un ton sémantique.
|
|
72
|
+
const leadingSlot = slots.leading
|
|
73
|
+
? slots.leading
|
|
74
|
+
: props.swatch
|
|
75
|
+
? () => props.swatch.color
|
|
76
|
+
? h(ColorSwatch, {
|
|
77
|
+
color: props.swatch.color,
|
|
78
|
+
shape: props.swatch.shape ?? "square",
|
|
79
|
+
size: 14,
|
|
80
|
+
})
|
|
81
|
+
: h(StatusDot, { tone: props.swatch.tone ?? "neutral", size: 8 })
|
|
82
|
+
: undefined;
|
|
83
|
+
// Queue : trailing (slot) prime sur count. Badge circle/sm aligné sur le
|
|
84
|
+
// status de la rangée, aria-label explicite.
|
|
85
|
+
const trailingSlot = slots.trailing
|
|
86
|
+
? slots.trailing
|
|
87
|
+
: props.count != null
|
|
88
|
+
? () => h(Badge, {
|
|
89
|
+
shape: "circle",
|
|
90
|
+
size: "sm",
|
|
91
|
+
tone: props.status,
|
|
92
|
+
"aria-label": countLabel,
|
|
93
|
+
}, { default: () => props.count })
|
|
94
|
+
: undefined;
|
|
95
|
+
const rowSlots = {
|
|
96
|
+
default: () => h("span", { class: "st-navItem__title" }, props.title),
|
|
97
|
+
};
|
|
98
|
+
if (leadingSlot)
|
|
99
|
+
rowSlots.leading = leadingSlot;
|
|
100
|
+
if (trailingSlot)
|
|
101
|
+
rowSlots.trailing = trailingSlot;
|
|
102
|
+
if (props.caption) {
|
|
103
|
+
rowSlots.caption = () => h("span", { class: "st-navItem__caption" }, props.caption);
|
|
104
|
+
}
|
|
105
|
+
const children = [
|
|
106
|
+
h(SelectableRow, {
|
|
107
|
+
selected: internalSelected.value,
|
|
108
|
+
value: props.value,
|
|
109
|
+
disabled: props.disabled,
|
|
110
|
+
role: props.href ? "link" : undefined,
|
|
111
|
+
onSelect: handleSelect,
|
|
112
|
+
}, rowSlots),
|
|
113
|
+
];
|
|
114
|
+
if (props.divider) {
|
|
115
|
+
children.push(h("hr", { class: "st-navItem__divider", "aria-hidden": "true" }));
|
|
116
|
+
}
|
|
117
|
+
return h("div", { ...attrs, class: wrapperClasses, style: depthStyle }, children);
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=NavItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavItem.js","sourceRoot":"","sources":["../src/NavItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAc,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC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import { type VNode } from "vue";
|
|
2
|
+
/** Niveau de titre porté par l'Overline d'en-tête de section. `h2`/`h3` quand la
|
|
3
|
+
* section est une vraie région titrée d'un rail/drawer ; choisis selon la
|
|
4
|
+
* profondeur du sommaire. */
|
|
5
|
+
export type NavSectionHeadingLevel = "h2" | "h3";
|
|
6
|
+
export type NavSectionProps = {
|
|
7
|
+
/** Libellé de la section, rendu via Overline (small-caps muet). */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Compteur optionnel → Badge circle en queue de l'en-tête. */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** Si true, l'en-tête devient le trigger d'un Collapsible (aria-expanded)
|
|
12
|
+
* qui montre/cache le contenu. Sinon : groupe titré statique. */
|
|
13
|
+
collapsible?: boolean;
|
|
14
|
+
/** État d'ouverture quand `collapsible`. */
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/** Niveau de titre de l'Overline quand la section n'est pas repliable. */
|
|
17
|
+
as?: NavSectionHeadingLevel;
|
|
18
|
+
/** Notifié à chaque bascule d'ouverture (section repliable). */
|
|
19
|
+
onToggle?: (open: boolean) => void;
|
|
20
|
+
class?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* NavSection — EN-TÊTE DE GROUPE d'un rail / drawer (« COMMUNITIES »,
|
|
24
|
+
* « SIGNAUX », « Pastilles », « Zonage / Potentiel », « DOCUMENTATION »).
|
|
25
|
+
* Donne la hiérarchie typographique qui manque à une liste plate + un foyer
|
|
26
|
+
* normé pour l'action locale. ZÉRO-ENTROPIE : on RÉUTILISE les primitives déjà
|
|
27
|
+
* livrées —
|
|
28
|
+
* • Overline → le libellé small-caps muet (rendu en h2/h3 pour la sémantique
|
|
29
|
+
* de titre quand la section n'est PAS repliable) ;
|
|
30
|
+
* • Badge shape="circle" → le compteur de section en queue d'en-tête ;
|
|
31
|
+
* • Collapsible → le disclosure (trigger aria-expanded + région
|
|
32
|
+
* aria-labelledby) quand `collapsible`.
|
|
33
|
+
* On ne réimplémente NI disclosure NI libellé. Style token-only scopé, aucun hex.
|
|
34
|
+
*
|
|
35
|
+
* Slots : `default` (contenu de la section, rendu dans la région) ; `action`
|
|
36
|
+
* (emplacement normé d'une action de section, aligné à droite de l'en-tête,
|
|
37
|
+
* NON rendu quand `collapsible`).
|
|
38
|
+
*/
|
|
39
|
+
export declare const NavSection: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
40
|
+
label: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
required: true;
|
|
43
|
+
};
|
|
44
|
+
count: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
collapsible: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
open: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
as: {
|
|
57
|
+
type: () => NavSectionHeadingLevel;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
onToggle: {
|
|
61
|
+
type: () => (open: boolean) => void;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
class: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle"[], "toggle", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
71
|
+
label: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
count: {
|
|
76
|
+
type: NumberConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
collapsible: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
open: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
as: {
|
|
88
|
+
type: () => NavSectionHeadingLevel;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
onToggle: {
|
|
92
|
+
type: () => (open: boolean) => void;
|
|
93
|
+
default: undefined;
|
|
94
|
+
};
|
|
95
|
+
class: {
|
|
96
|
+
type: StringConstructor;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
}>> & Readonly<{
|
|
100
|
+
onToggle?: ((...args: any[]) => any) | undefined;
|
|
101
|
+
}>, {
|
|
102
|
+
open: boolean;
|
|
103
|
+
class: string;
|
|
104
|
+
onToggle: (open: boolean) => void;
|
|
105
|
+
as: NavSectionHeadingLevel;
|
|
106
|
+
count: number;
|
|
107
|
+
collapsible: boolean;
|
|
108
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
109
|
+
//# sourceMappingURL=NavSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavSection.d.ts","sourceRoot":"","sources":["../src/NavSection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAMjE;;6BAE6B;AAC7B,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;qEACiE;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0EAA0E;IAC1E,EAAE,CAAC,EAAE,sBAAsB,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;cAOG,MAAM,sBAAsB;;;;cAEnB,MAAM,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;cAFtC,MAAM,sBAAsB;;;;cAEnB,MAAM,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI;;;;;;;;;;;;qBAAhB,OAAO,KAAK,IAAI;;;;4EAyG9D,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent, h, ref, watch } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
import { Badge } from "./Badge.js";
|
|
4
|
+
import { Collapsible } from "./Collapsible.js";
|
|
5
|
+
import { Overline } from "./Overline.js";
|
|
6
|
+
let navSectionCounter = 0;
|
|
7
|
+
/**
|
|
8
|
+
* NavSection — EN-TÊTE DE GROUPE d'un rail / drawer (« COMMUNITIES »,
|
|
9
|
+
* « SIGNAUX », « Pastilles », « Zonage / Potentiel », « DOCUMENTATION »).
|
|
10
|
+
* Donne la hiérarchie typographique qui manque à une liste plate + un foyer
|
|
11
|
+
* normé pour l'action locale. ZÉRO-ENTROPIE : on RÉUTILISE les primitives déjà
|
|
12
|
+
* livrées —
|
|
13
|
+
* • Overline → le libellé small-caps muet (rendu en h2/h3 pour la sémantique
|
|
14
|
+
* de titre quand la section n'est PAS repliable) ;
|
|
15
|
+
* • Badge shape="circle" → le compteur de section en queue d'en-tête ;
|
|
16
|
+
* • Collapsible → le disclosure (trigger aria-expanded + région
|
|
17
|
+
* aria-labelledby) quand `collapsible`.
|
|
18
|
+
* On ne réimplémente NI disclosure NI libellé. Style token-only scopé, aucun hex.
|
|
19
|
+
*
|
|
20
|
+
* Slots : `default` (contenu de la section, rendu dans la région) ; `action`
|
|
21
|
+
* (emplacement normé d'une action de section, aligné à droite de l'en-tête,
|
|
22
|
+
* NON rendu quand `collapsible`).
|
|
23
|
+
*/
|
|
24
|
+
export const NavSection = defineComponent({
|
|
25
|
+
name: "NavSection",
|
|
26
|
+
props: {
|
|
27
|
+
label: { type: String, required: true },
|
|
28
|
+
count: { type: Number, default: undefined },
|
|
29
|
+
collapsible: { type: Boolean, default: false },
|
|
30
|
+
open: { type: Boolean, default: true },
|
|
31
|
+
as: { type: String, default: "h3" },
|
|
32
|
+
onToggle: {
|
|
33
|
+
type: Function,
|
|
34
|
+
default: undefined,
|
|
35
|
+
},
|
|
36
|
+
class: { type: String, default: undefined },
|
|
37
|
+
},
|
|
38
|
+
emits: ["toggle"],
|
|
39
|
+
setup(props, { slots, attrs, emit }) {
|
|
40
|
+
const uid = `st-navSection-${(navSectionCounter += 1)}`;
|
|
41
|
+
// `open` est une valeur INITIALE (mirroir de `bind:open` svelte) : la section
|
|
42
|
+
// gère son propre état d'ouverture et le re-synchronise si le prop change.
|
|
43
|
+
const internalOpen = ref(props.open);
|
|
44
|
+
watch(() => props.open, (next) => {
|
|
45
|
+
internalOpen.value = next;
|
|
46
|
+
});
|
|
47
|
+
return () => {
|
|
48
|
+
const hasCount = typeof props.count === "number";
|
|
49
|
+
const rootClasses = classNames("st-navSection", props.collapsible ? "st-navSection--collapsible" : "st-navSection--static", props.class);
|
|
50
|
+
const countBadge = (className) => h(Badge, {
|
|
51
|
+
shape: "circle",
|
|
52
|
+
size: "sm",
|
|
53
|
+
class: className,
|
|
54
|
+
"aria-label": `${props.count} éléments`,
|
|
55
|
+
}, { default: () => props.count });
|
|
56
|
+
if (props.collapsible) {
|
|
57
|
+
// Repliable : l'en-tête EST le trigger du Collapsible. Le compteur passe
|
|
58
|
+
// par son slot `trailing` (entre le titre et le chevron) ; on annonce le
|
|
59
|
+
// tout aux lecteurs d'écran via aria-label. L'action de section n'a pas
|
|
60
|
+
// sa place dans un trigger (un bouton dans un bouton).
|
|
61
|
+
const collapsibleSlots = {
|
|
62
|
+
default: () => slots.default?.(),
|
|
63
|
+
};
|
|
64
|
+
if (hasCount) {
|
|
65
|
+
collapsibleSlots.trailing = () => countBadge();
|
|
66
|
+
}
|
|
67
|
+
return h(Collapsible, {
|
|
68
|
+
...attrs,
|
|
69
|
+
open: internalOpen.value,
|
|
70
|
+
title: props.label,
|
|
71
|
+
"aria-label": hasCount ? `${props.label}, ${props.count}` : props.label,
|
|
72
|
+
class: rootClasses,
|
|
73
|
+
onToggle: (open) => {
|
|
74
|
+
internalOpen.value = open;
|
|
75
|
+
props.onToggle?.(open);
|
|
76
|
+
emit("toggle", open);
|
|
77
|
+
},
|
|
78
|
+
}, collapsibleSlots);
|
|
79
|
+
}
|
|
80
|
+
// Statique : groupe titré par l'Overline (h2/h3). Le contenu est relié au
|
|
81
|
+
// titre via aria-labelledby — la liste devient une vraie région titrée.
|
|
82
|
+
const overlineChildren = [props.label];
|
|
83
|
+
if (hasCount) {
|
|
84
|
+
overlineChildren.push(countBadge("st-navSection__count"));
|
|
85
|
+
}
|
|
86
|
+
const headerChildren = [
|
|
87
|
+
h(Overline, { as: props.as, id: `${uid}-label`, class: "st-navSection__label" }, { default: () => overlineChildren }),
|
|
88
|
+
];
|
|
89
|
+
if (slots.action) {
|
|
90
|
+
headerChildren.push(h("span", { class: "st-navSection__action" }, slots.action()));
|
|
91
|
+
}
|
|
92
|
+
return h("section", {
|
|
93
|
+
...attrs,
|
|
94
|
+
class: rootClasses,
|
|
95
|
+
role: "group",
|
|
96
|
+
"aria-labelledby": `${uid}-label`,
|
|
97
|
+
}, [
|
|
98
|
+
h("div", { class: "st-navSection__header" }, headerChildren),
|
|
99
|
+
h("div", { class: "st-navSection__body" }, slots.default?.()),
|
|
100
|
+
]);
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=NavSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavSection.js","sourceRoot":"","sources":["../src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AAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;aAC9D,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Balise rendue. `span`/`div` = inline/bloc neutre ; `h2`/`h3` quand l'overline
|
|
2
|
+
* sert d'en-tête de région (sémantique de titre). */
|
|
3
|
+
export type OverlineAs = "span" | "div" | "h2" | "h3";
|
|
4
|
+
export type OverlineProps = {
|
|
5
|
+
/** Balise : `span` (défaut) inline, `div` bloc, `h2`/`h3` pour un en-tête de région. */
|
|
6
|
+
as?: OverlineAs;
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Overline — étiquette de section discrète en small-caps (les « DOCUMENTATION »,
|
|
11
|
+
* « COMMUNITIES », « SIGNAUX », « DOCUMENTS SOURCES » des maquettes). Rôle :
|
|
12
|
+
* libellé de groupe de niveau 0, muted, au-dessus d'un bloc. Style token-only :
|
|
13
|
+
* chaque token --st-component-overline-* retombe sur un littéral, de sorte qu'un
|
|
14
|
+
* thème qui n'émet rien rend à l'identique. AUCUN hex en dur.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Overline: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
+
as: {
|
|
18
|
+
type: () => OverlineAs;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
class: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
as: {
|
|
29
|
+
type: () => OverlineAs;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
class: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{}>, {
|
|
37
|
+
class: string;
|
|
38
|
+
as: OverlineAs;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
//# sourceMappingURL=Overline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overline.d.ts","sourceRoot":"","sources":["../src/Overline.ts"],"names":[],"mappings":"AAGA;qDACqD;AACrD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG;IAC1B,wFAAwF;IACxF,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;cAGK,MAAM,UAAU;;;;;;;;;;;cAAhB,MAAM,UAAU;;;;;;;;;;4EAWxC,CAAC"}
|
package/dist/Overline.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
/**
|
|
4
|
+
* Overline — étiquette de section discrète en small-caps (les « DOCUMENTATION »,
|
|
5
|
+
* « COMMUNITIES », « SIGNAUX », « DOCUMENTS SOURCES » des maquettes). Rôle :
|
|
6
|
+
* libellé de groupe de niveau 0, muted, au-dessus d'un bloc. Style token-only :
|
|
7
|
+
* chaque token --st-component-overline-* retombe sur un littéral, de sorte qu'un
|
|
8
|
+
* thème qui n'émet rien rend à l'identique. AUCUN hex en dur.
|
|
9
|
+
*/
|
|
10
|
+
export const Overline = defineComponent({
|
|
11
|
+
name: "Overline",
|
|
12
|
+
props: {
|
|
13
|
+
as: { type: String, default: "span" },
|
|
14
|
+
class: { type: String, default: undefined },
|
|
15
|
+
},
|
|
16
|
+
setup(props, { slots, attrs }) {
|
|
17
|
+
return () => h(props.as ?? "span", { ...attrs, class: classNames("st-overline", props.class) }, slots.default?.());
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=Overline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overline.js","sourceRoot":"","sources":["../src/Overline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAY7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,IAAI,EAAE,MAA0B,EAAE,OAAO,EAAE,MAAM,EAAE;QACzD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;KAC5C;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,OAAO,GAAG,EAAE,CACV,CAAC,CACC,KAAK,CAAC,EAAE,IAAI,MAAM,EAClB,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,EAC3D,KAAK,CAAC,OAAO,EAAE,EAAE,CAClB,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
|
package/dist/Search.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type SearchProps = {
|
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
clearLabel?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
/** Lift the field max-width cap so it fills a narrow drawer/rail (width 100%). */
|
|
12
|
+
fluid?: boolean;
|
|
11
13
|
id?: string;
|
|
12
14
|
class?: string;
|
|
13
15
|
};
|
|
@@ -40,6 +42,10 @@ export declare const Search: import("vue").DefineComponent<import("vue").Extract
|
|
|
40
42
|
type: BooleanConstructor;
|
|
41
43
|
default: boolean;
|
|
42
44
|
};
|
|
45
|
+
fluid: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
43
49
|
id: {
|
|
44
50
|
type: StringConstructor;
|
|
45
51
|
default: undefined;
|
|
@@ -79,6 +85,10 @@ export declare const Search: import("vue").DefineComponent<import("vue").Extract
|
|
|
79
85
|
type: BooleanConstructor;
|
|
80
86
|
default: boolean;
|
|
81
87
|
};
|
|
88
|
+
fluid: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
82
92
|
id: {
|
|
83
93
|
type: StringConstructor;
|
|
84
94
|
default: undefined;
|
|
@@ -102,5 +112,6 @@ export declare const Search: import("vue").DefineComponent<import("vue").Extract
|
|
|
102
112
|
placeholder: string;
|
|
103
113
|
modelValue: string;
|
|
104
114
|
clearLabel: string;
|
|
115
|
+
fluid: boolean;
|
|
105
116
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
106
117
|
//# sourceMappingURL=Search.d.ts.map
|
package/dist/Search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../src/Search.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAA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