@sentropic/design-system-vue 0.36.42 → 0.36.44
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/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/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/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/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/Timeline.d.ts +52 -0
- package/dist/Timeline.d.ts.map +1 -0
- package/dist/Timeline.js +41 -0
- package/dist/Timeline.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +300 -0
- package/package.json +1 -1
package/dist/Checkbox.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type CheckboxProps = {
|
|
2
2
|
label: string;
|
|
3
3
|
helperText?: string;
|
|
4
|
+
/** Secondary muted description line under the label (e.g. a filter hint). */
|
|
5
|
+
description?: string;
|
|
4
6
|
invalid?: boolean;
|
|
5
7
|
modelValue?: boolean;
|
|
6
8
|
checked?: boolean;
|
|
@@ -18,6 +20,10 @@ export declare const Checkbox: import("vue").DefineComponent<import("vue").Extra
|
|
|
18
20
|
type: StringConstructor;
|
|
19
21
|
default: undefined;
|
|
20
22
|
};
|
|
23
|
+
description: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
21
27
|
invalid: {
|
|
22
28
|
type: BooleanConstructor;
|
|
23
29
|
default: boolean;
|
|
@@ -57,6 +63,10 @@ export declare const Checkbox: import("vue").DefineComponent<import("vue").Extra
|
|
|
57
63
|
type: StringConstructor;
|
|
58
64
|
default: undefined;
|
|
59
65
|
};
|
|
66
|
+
description: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
60
70
|
invalid: {
|
|
61
71
|
type: BooleanConstructor;
|
|
62
72
|
default: boolean;
|
|
@@ -95,6 +105,7 @@ export declare const Checkbox: import("vue").DefineComponent<import("vue").Extra
|
|
|
95
105
|
disabled: boolean;
|
|
96
106
|
value: string;
|
|
97
107
|
helperText: string;
|
|
108
|
+
description: string;
|
|
98
109
|
modelValue: boolean;
|
|
99
110
|
checked: boolean;
|
|
100
111
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/Checkbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAOF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAiFnB,CAAC"}
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { defineComponent, h } from "vue";
|
|
1
|
+
import { defineComponent, h, ref } from "vue";
|
|
2
2
|
import { classNames } from "./classNames.js";
|
|
3
|
+
let _counter = 0;
|
|
4
|
+
function nextId() {
|
|
5
|
+
return `st-checkbox-${++_counter}`;
|
|
6
|
+
}
|
|
3
7
|
export const Checkbox = defineComponent({
|
|
4
8
|
name: "Checkbox",
|
|
5
9
|
props: {
|
|
6
10
|
label: { type: String, required: true },
|
|
7
11
|
helperText: { type: String, default: undefined },
|
|
12
|
+
description: { type: String, default: undefined },
|
|
8
13
|
invalid: { type: Boolean, default: false },
|
|
9
14
|
modelValue: { type: Boolean, default: undefined },
|
|
10
15
|
checked: { type: Boolean, default: undefined },
|
|
@@ -14,32 +19,51 @@ export const Checkbox = defineComponent({
|
|
|
14
19
|
class: { type: String, default: undefined },
|
|
15
20
|
},
|
|
16
21
|
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(props, { emit, attrs }) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
disabled: props.disabled,
|
|
29
|
-
"aria-invalid": props.invalid ? "true" : undefined,
|
|
30
|
-
onChange: (event) => {
|
|
31
|
-
const checked = event.target.checked;
|
|
32
|
-
emit("update:modelValue", checked);
|
|
33
|
-
emit("change", event);
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
h("span", { class: "st-choice__content" }, [
|
|
22
|
+
setup(props, { emit, slots, attrs }) {
|
|
23
|
+
const autoId = ref(nextId());
|
|
24
|
+
return () => {
|
|
25
|
+
const descriptionId = `${autoId.value}-description`;
|
|
26
|
+
// Merge our description id with any consumer-provided aria-describedby so we
|
|
27
|
+
// never clobber an existing one.
|
|
28
|
+
const consumerDescribedBy = attrs["aria-describedby"];
|
|
29
|
+
const describedBy = props.description
|
|
30
|
+
? [consumerDescribedBy, descriptionId].filter(Boolean).join(" ")
|
|
31
|
+
: consumerDescribedBy;
|
|
32
|
+
const contentChildren = [
|
|
37
33
|
h("span", { class: "st-choice__label" }, props.label),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
];
|
|
35
|
+
if (props.description) {
|
|
36
|
+
contentChildren.push(h("span", { class: "st-choice__description", id: descriptionId }, props.description));
|
|
37
|
+
}
|
|
38
|
+
if (props.helperText) {
|
|
39
|
+
contentChildren.push(h("span", { class: "st-choice__help" }, props.helperText));
|
|
40
|
+
}
|
|
41
|
+
const children = [
|
|
42
|
+
h("input", {
|
|
43
|
+
...attrs,
|
|
44
|
+
class: "st-choice__input",
|
|
45
|
+
type: "checkbox",
|
|
46
|
+
name: props.name,
|
|
47
|
+
value: props.value,
|
|
48
|
+
checked: props.modelValue ?? props.checked,
|
|
49
|
+
disabled: props.disabled,
|
|
50
|
+
"aria-invalid": props.invalid ? "true" : undefined,
|
|
51
|
+
"aria-describedby": describedBy,
|
|
52
|
+
onChange: (event) => {
|
|
53
|
+
const checked = event.target.checked;
|
|
54
|
+
emit("update:modelValue", checked);
|
|
55
|
+
emit("change", event);
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
58
|
+
h("span", { class: "st-choice__content" }, contentChildren),
|
|
59
|
+
];
|
|
60
|
+
if (slots.trailing) {
|
|
61
|
+
children.push(h("span", { class: "st-choice__trailing" }, slots.trailing()));
|
|
62
|
+
}
|
|
63
|
+
return h("label", {
|
|
64
|
+
class: classNames("st-choice", "st-choice--checkbox", props.description ? "st-choice--described" : undefined, props.class),
|
|
65
|
+
}, children);
|
|
66
|
+
};
|
|
43
67
|
},
|
|
44
68
|
});
|
|
45
69
|
//# sourceMappingURL=Checkbox.js.map
|
package/dist/Checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../src/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../src/Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAgB7C,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,SAAS,MAAM;IACb,OAAO,eAAe,EAAE,QAAQ,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;IACtC,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QAChD,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QACjD,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1C,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;QACjD,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;QAC9C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3C,IAAI,EAAE,EAAE,IAAI,EAAE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
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
/** Hiérarchie ENCODÉE DANS LE TYPE : une seule action `primary` est légitime
|
|
3
|
+
* dans une pile. `secondary` = action secondaire ; `ghost` = action discrète.
|
|
4
|
+
* La couleur sémantique (danger) n'est PAS un `kind` — elle vit dans
|
|
5
|
+
* `dangerZone`, rendue à part. Le mauvais chemin (4 « primaires » arc-en-ciel)
|
|
6
|
+
* devient ainsi impossible à exprimer proprement. */
|
|
7
|
+
export type NavActionKind = "primary" | "secondary" | "ghost";
|
|
8
|
+
export type NavAction = {
|
|
9
|
+
label: string;
|
|
10
|
+
/** Icône optionnelle (composant), rendue avant le libellé. */
|
|
11
|
+
icon?: Component;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
href?: string;
|
|
14
|
+
kind?: NavActionKind;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Action destructrice, isolée sous un séparateur + un overline « Zone
|
|
18
|
+
* sensible ». Toujours en ton danger, jamais alignée avec les actions
|
|
19
|
+
* normales. Pas de `kind` : c'est une zone, pas une catégorie de couleur. */
|
|
20
|
+
export type NavActionDangerZone = {
|
|
21
|
+
label: string;
|
|
22
|
+
icon?: Component;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
href?: string;
|
|
25
|
+
};
|
|
26
|
+
export type NavActionStackOrientation = "vertical" | "horizontal";
|
|
27
|
+
export type NavActionStackProps = {
|
|
28
|
+
actions?: NavAction[];
|
|
29
|
+
dangerZone?: NavActionDangerZone;
|
|
30
|
+
/** Libellé de l'overline de la zone sensible. Défaut « Zone sensible ». */
|
|
31
|
+
dangerLabel?: string;
|
|
32
|
+
orientation?: NavActionStackOrientation;
|
|
33
|
+
/** Étiquette a11y du groupe d'actions. */
|
|
34
|
+
label?: string;
|
|
35
|
+
class?: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* NavActionStack — empile des actions en ENCODANT la hiérarchie dans le type.
|
|
39
|
+
* Au plus UN `kind:"primary"` (les suivants sont dégradés en secondary +
|
|
40
|
+
* console.warn). La couleur sémantique « danger » n'est pas détournée en
|
|
41
|
+
* catégorie : la `dangerZone` est rendue séparément, sous un Divider + un
|
|
42
|
+
* overline, en ton danger pleine largeur. Réutilise le Button du DS — aucun
|
|
43
|
+
* bouton n'est réimplémenté. Style token-only, aucun hex en dur.
|
|
44
|
+
*/
|
|
45
|
+
export declare const NavActionStack: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
46
|
+
actions: {
|
|
47
|
+
type: () => NavAction[];
|
|
48
|
+
default: () => never[];
|
|
49
|
+
};
|
|
50
|
+
dangerZone: {
|
|
51
|
+
type: () => NavActionDangerZone;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
dangerLabel: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
orientation: {
|
|
59
|
+
type: () => NavActionStackOrientation;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
label: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
class: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
73
|
+
actions: {
|
|
74
|
+
type: () => NavAction[];
|
|
75
|
+
default: () => never[];
|
|
76
|
+
};
|
|
77
|
+
dangerZone: {
|
|
78
|
+
type: () => NavActionDangerZone;
|
|
79
|
+
default: undefined;
|
|
80
|
+
};
|
|
81
|
+
dangerLabel: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
orientation: {
|
|
86
|
+
type: () => NavActionStackOrientation;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
label: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
class: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: undefined;
|
|
96
|
+
};
|
|
97
|
+
}>> & Readonly<{}>, {
|
|
98
|
+
class: string;
|
|
99
|
+
label: string;
|
|
100
|
+
orientation: NavActionStackOrientation;
|
|
101
|
+
actions: NavAction[];
|
|
102
|
+
dangerZone: NavActionDangerZone;
|
|
103
|
+
dangerLabel: string;
|
|
104
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
105
|
+
//# sourceMappingURL=NavActionStack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavActionStack.d.ts","sourceRoot":"","sources":["../src/NavActionStack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAc,MAAM,KAAK,CAAC;AAKjD;;;;qDAIqD;AACrD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;6EAE6E;AAC7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,YAAY,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;cAGG,MAAM,SAAS,EAAE;;;;cACb,MAAM,mBAAmB;;;;;;;;cAGrC,MAAM,yBAAyB;;;;;;;;;;;;;;;cAJvB,MAAM,SAAS,EAAE;;;;cACb,MAAM,mBAAmB;;;;;;;;cAGrC,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;4EA6HnD,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
import { Button } from "./Button.js";
|
|
4
|
+
import { Divider } from "./Divider.js";
|
|
5
|
+
// kind → variant Button : primary→primary, secondary→secondary, ghost→ghost.
|
|
6
|
+
const variantFor = (kind) => kind;
|
|
7
|
+
/**
|
|
8
|
+
* NavActionStack — empile des actions en ENCODANT la hiérarchie dans le type.
|
|
9
|
+
* Au plus UN `kind:"primary"` (les suivants sont dégradés en secondary +
|
|
10
|
+
* console.warn). La couleur sémantique « danger » n'est pas détournée en
|
|
11
|
+
* catégorie : la `dangerZone` est rendue séparément, sous un Divider + un
|
|
12
|
+
* overline, en ton danger pleine largeur. Réutilise le Button du DS — aucun
|
|
13
|
+
* bouton n'est réimplémenté. Style token-only, aucun hex en dur.
|
|
14
|
+
*/
|
|
15
|
+
export const NavActionStack = defineComponent({
|
|
16
|
+
name: "NavActionStack",
|
|
17
|
+
props: {
|
|
18
|
+
actions: { type: Array, default: () => [] },
|
|
19
|
+
dangerZone: { type: Object, default: undefined },
|
|
20
|
+
dangerLabel: { type: String, default: "Zone sensible" },
|
|
21
|
+
orientation: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "vertical",
|
|
24
|
+
},
|
|
25
|
+
label: { type: String, default: "Actions" },
|
|
26
|
+
class: { type: String, default: undefined },
|
|
27
|
+
},
|
|
28
|
+
setup(props, { attrs }) {
|
|
29
|
+
return () => {
|
|
30
|
+
// La règle (un seul primary) appliquée AU RUNTIME en miroir du type : on
|
|
31
|
+
// garde le premier `primary`, on dégrade les suivants en `secondary` et on
|
|
32
|
+
// prévient.
|
|
33
|
+
let primarySeen = false;
|
|
34
|
+
const normalizedActions = props.actions.map((action) => {
|
|
35
|
+
const kind = action.kind ?? "secondary";
|
|
36
|
+
if (kind === "primary") {
|
|
37
|
+
if (primarySeen) {
|
|
38
|
+
console.warn(`[NavActionStack] Plusieurs actions « primary » fournies — « ${action.label} » dégradée en « secondary ». Une pile n'a qu'une action primaire.`);
|
|
39
|
+
return { ...action, kind: "secondary" };
|
|
40
|
+
}
|
|
41
|
+
primarySeen = true;
|
|
42
|
+
}
|
|
43
|
+
return { ...action, kind };
|
|
44
|
+
});
|
|
45
|
+
const renderActionChildren = (action) => {
|
|
46
|
+
const children = [];
|
|
47
|
+
if (action.icon)
|
|
48
|
+
children.push(h(action.icon));
|
|
49
|
+
children.push(action.label);
|
|
50
|
+
return children;
|
|
51
|
+
};
|
|
52
|
+
const actionNodes = normalizedActions.map((action) => {
|
|
53
|
+
if (action.href && !action.disabled) {
|
|
54
|
+
// Action-lien : porte les classes Button (réutilisation du style, pas
|
|
55
|
+
// de réimplémentation de la logique bouton).
|
|
56
|
+
return h("a", {
|
|
57
|
+
key: action.label,
|
|
58
|
+
class: `st-button st-button--${variantFor(action.kind)} st-button--md st-navActionStack__item`,
|
|
59
|
+
href: action.href,
|
|
60
|
+
onClick: action.onClick,
|
|
61
|
+
}, renderActionChildren(action));
|
|
62
|
+
}
|
|
63
|
+
return h(Button, {
|
|
64
|
+
key: action.label,
|
|
65
|
+
variant: variantFor(action.kind),
|
|
66
|
+
disabled: action.disabled,
|
|
67
|
+
onClick: action.onClick,
|
|
68
|
+
class: "st-navActionStack__item",
|
|
69
|
+
}, { default: () => renderActionChildren(action) });
|
|
70
|
+
});
|
|
71
|
+
const children = [
|
|
72
|
+
h("div", { class: "st-navActionStack__actions" }, actionNodes),
|
|
73
|
+
];
|
|
74
|
+
if (props.dangerZone) {
|
|
75
|
+
const dz = props.dangerZone;
|
|
76
|
+
// Zone sensible : SÉPARÉE des actions normales par un Divider, coiffée
|
|
77
|
+
// d'un overline token-only, rendue en ton danger pleine largeur. Jamais
|
|
78
|
+
// alignée avec la pile au-dessus.
|
|
79
|
+
const dangerAction = dz.href
|
|
80
|
+
? h("a", {
|
|
81
|
+
class: "st-button st-button--danger st-button--md st-navActionStack__item st-navActionStack__dangerAction",
|
|
82
|
+
href: dz.href,
|
|
83
|
+
onClick: dz.onClick,
|
|
84
|
+
}, renderActionChildren(dz))
|
|
85
|
+
: h(Button, {
|
|
86
|
+
variant: "danger",
|
|
87
|
+
onClick: dz.onClick,
|
|
88
|
+
class: "st-navActionStack__item st-navActionStack__dangerAction",
|
|
89
|
+
}, { default: () => renderActionChildren(dz) });
|
|
90
|
+
children.push(h("div", {
|
|
91
|
+
class: "st-navActionStack__danger",
|
|
92
|
+
role: "group",
|
|
93
|
+
"aria-label": props.dangerLabel,
|
|
94
|
+
}, [
|
|
95
|
+
h(Divider),
|
|
96
|
+
h("span", { class: "st-navActionStack__dangerLabel" }, props.dangerLabel),
|
|
97
|
+
dangerAction,
|
|
98
|
+
]));
|
|
99
|
+
}
|
|
100
|
+
return h("div", {
|
|
101
|
+
...attrs,
|
|
102
|
+
class: classNames("st-navActionStack", `st-navActionStack--${props.orientation}`, props.class),
|
|
103
|
+
role: "group",
|
|
104
|
+
"aria-label": props.label,
|
|
105
|
+
}, children);
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=NavActionStack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavActionStack.js","sourceRoot":"","sources":["../src/NavActionStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA0CvC,6EAA6E;AAC7E,MAAM,UAAU,GAAG,CAAC,IAAmB,EAAqC,EAAE,CAAC,IAAI,CAAC;AAEpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;IAC5C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,KAA0B,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE;QAChE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAmC,EAAE,OAAO,EAAE,SAAS,EAAE;QAC7E,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE;QACvD,WAAW,EAAE;YACX,IAAI,EAAE,MAAyC;YAC/C,OAAO,EAAE,UAAU;SACpB;QACD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QAC3C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;KAC5C;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACpB,OAAO,GAAG,EAAE;YACV,yEAAyE;YACzE,2EAA2E;YAC3E,YAAY;YACZ,IAAI,WAAW,GAAG,KAAK,CAAC;YACxB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AE,KAAK,CAAC,WAAW;iBAChC,EACD;oBACE,CAAC,CAAC,OAAO,CAAC;oBACV,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,EAAE,KAAK,CAAC,WAAW,CAAC;oBACzE,YAAY;iBACb,CACF,CACF,CAAC;YACJ,CAAC;YAED,OAAO,CAAC,CACN,KAAK,EACL;gBACE,GAAG,KAAK;gBACR,KAAK,EAAE,UAAU,CACf,mBAAmB,EACnB,sBAAsB,KAAK,CAAC,WAAW,EAAE,EACzC,KAAK,CAAC,KAAK,CACZ;gBACD,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,KAAK,CAAC,KAAK;aAC1B,EACD,QAAQ,CACT,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/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,OAAO;;;;cACnC,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAgF1C,CAAC"}
|
package/dist/Search.js
CHANGED
|
@@ -15,6 +15,7 @@ export const Search = defineComponent({
|
|
|
15
15
|
placeholder: { type: String, default: undefined },
|
|
16
16
|
clearLabel: { type: String, default: "Clear search" },
|
|
17
17
|
disabled: { type: Boolean, default: false },
|
|
18
|
+
fluid: { type: Boolean, default: false },
|
|
18
19
|
id: { type: String, default: undefined },
|
|
19
20
|
class: { type: String, default: undefined },
|
|
20
21
|
},
|
|
@@ -25,7 +26,7 @@ export const Search = defineComponent({
|
|
|
25
26
|
const inputId = props.id ?? autoId.value;
|
|
26
27
|
const currentValue = props.modelValue ?? props.value ?? "";
|
|
27
28
|
return h("div", {
|
|
28
|
-
class: classNames("st-search", `st-search--${props.size}`, props.class),
|
|
29
|
+
class: classNames("st-search", `st-search--${props.size}`, props.fluid ? "st-search--fluid" : undefined, props.class),
|
|
29
30
|
}, [
|
|
30
31
|
props.label
|
|
31
32
|
? h("label", { class: "st-field__label", for: inputId }, props.label)
|
package/dist/Search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../src/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../src/Search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAC,EAAE,MAAM,iBAAiB,C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,QAAQ,EAAE,KAAK,CAAC,CAAC;oBACxB,CAAC;iBACF,CAAC;gBACF,YAAY;oBACV,CAAC,CAAC,CAAC,CACC,QAAQ,EACR;wBACE,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,kBAAkB;wBACzB,YAAY,EAAE,KAAK,CAAC,UAAU;wBAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;wBACxB,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;4BAC9B,IAAI,CAAC,OAAO,CAAC,CAAC;wBAChB,CAAC;qBACF,EACD,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAC1D;oBACH,CAAC,CAAC,IAAI;aACT,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export type StatusDotTone = "neutral" | "info" | "success" | "warning" | "error";
|
|
2
|
+
export type StatusDotProps = {
|
|
3
|
+
/** Ton sémantique, mappé sur --st-semantic-feedback-*. Ignoré si `color` est fourni. */
|
|
4
|
+
tone?: StatusDotTone;
|
|
5
|
+
/** Couleur arbitraire (hex, rgb(), var(--token)…), rendue en background inline. Prime sur `tone`. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** Diamètre du point en px (défaut 8). */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Halo animé pour un état « live ». Désactivé sous prefers-reduced-motion. */
|
|
10
|
+
pulse?: boolean;
|
|
11
|
+
/** Si fourni, rend le point + ce texte inline (un StatusIndicator). */
|
|
12
|
+
label?: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* StatusDot — pastille de statut (les points colorés des « COMMUNITIES », la
|
|
17
|
+
* pastille « EN DIRECT » live, les indicateurs verts des docs). Par défaut un
|
|
18
|
+
* simple point coloré via `tone` (mappé sur --st-semantic-feedback-*) ; `color`
|
|
19
|
+
* accepte une couleur arbitraire rendue en `background-color` inline (même logique
|
|
20
|
+
* que ColorSwatch) et prime sur `tone`. Avec `label`, rend point + texte = un
|
|
21
|
+
* « StatusIndicator ». Style token-only, AUCUN hex en dur.
|
|
22
|
+
*
|
|
23
|
+
* a11y : sans label le point est purement décoratif → on expose tout de même un
|
|
24
|
+
* `role="img"` + `aria-label` (le tone, ou la couleur). Avec label, le texte porte
|
|
25
|
+
* l'info → le point passe `aria-hidden` (évite la redondance vocale).
|
|
26
|
+
*/
|
|
27
|
+
export declare const StatusDot: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
28
|
+
tone: {
|
|
29
|
+
type: () => StatusDotTone;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
color: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: undefined;
|
|
35
|
+
};
|
|
36
|
+
size: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
40
|
+
pulse: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
label: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
class: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: undefined;
|
|
51
|
+
};
|
|
52
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
tone: {
|
|
56
|
+
type: () => StatusDotTone;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
color: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: number;
|
|
66
|
+
};
|
|
67
|
+
pulse: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
label: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
class: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{}>, {
|
|
80
|
+
size: number;
|
|
81
|
+
class: string;
|
|
82
|
+
label: string;
|
|
83
|
+
color: string;
|
|
84
|
+
tone: StatusDotTone;
|
|
85
|
+
pulse: boolean;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
//# sourceMappingURL=StatusDot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusDot.d.ts","sourceRoot":"","sources":["../src/StatusDot.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjF,MAAM,MAAM,cAAc,GAAG;IAC3B,wFAAwF;IACxF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS;;cAGM,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAnB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAiD7C,CAAC"}
|