@sentropic/design-system-vue 0.6.0 → 0.7.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/dist/Avatar.d.ts +85 -0
- package/dist/Avatar.d.ts.map +1 -0
- package/dist/Avatar.js +36 -0
- package/dist/Avatar.js.map +1 -0
- package/dist/AvatarGroup.d.ts +53 -0
- package/dist/AvatarGroup.d.ts.map +1 -0
- package/dist/AvatarGroup.js +37 -0
- package/dist/AvatarGroup.js.map +1 -0
- package/dist/BarChart.d.ts +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/ButtonGroup.d.ts +75 -0
- package/dist/ButtonGroup.d.ts.map +1 -0
- package/dist/ButtonGroup.js +36 -0
- package/dist/ButtonGroup.js.map +1 -0
- package/dist/CheckboxGroup.d.ts +111 -0
- package/dist/CheckboxGroup.d.ts.map +1 -0
- package/dist/CheckboxGroup.js +59 -0
- package/dist/CheckboxGroup.js.map +1 -0
- package/dist/Collapsible.d.ts +61 -0
- package/dist/Collapsible.d.ts.map +1 -0
- package/dist/Collapsible.js +72 -0
- package/dist/Collapsible.js.map +1 -0
- package/dist/Container.d.ts +1 -1
- package/dist/DataTable.d.ts +1 -1
- package/dist/Flex.d.ts +1 -1
- package/dist/Footer.d.ts +1 -1
- package/dist/Header.d.ts +1 -1
- package/dist/Hidden.d.ts +1 -1
- package/dist/IconButton.d.ts +1 -1
- package/dist/Inline.d.ts +1 -1
- package/dist/RadioGroup.d.ts +109 -0
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.js +58 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/Row.d.ts +1 -1
- package/dist/Stack.d.ts +1 -1
- package/dist/Stepper.d.ts +89 -0
- package/dist/Stepper.d.ts.map +1 -0
- package/dist/Stepper.js +91 -0
- package/dist/Stepper.js.map +1 -0
- package/dist/Typography.d.ts +85 -0
- package/dist/Typography.d.ts.map +1 -0
- package/dist/Typography.js +36 -0
- package/dist/Typography.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +667 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent, h, ref } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
let collapsibleCounter = 0;
|
|
4
|
+
function ChevronDownIcon() {
|
|
5
|
+
return h("svg", {
|
|
6
|
+
width: 18,
|
|
7
|
+
height: 18,
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
fill: "none",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
"stroke-width": 2.25,
|
|
12
|
+
"stroke-linecap": "round",
|
|
13
|
+
"stroke-linejoin": "round",
|
|
14
|
+
focusable: "false",
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
}, [h("path", { d: "m6 9 6 6 6-6" })]);
|
|
17
|
+
}
|
|
18
|
+
export const Collapsible = defineComponent({
|
|
19
|
+
name: "Collapsible",
|
|
20
|
+
props: {
|
|
21
|
+
open: { type: Boolean, default: undefined },
|
|
22
|
+
title: { type: String, required: true },
|
|
23
|
+
disabled: { type: Boolean, default: false },
|
|
24
|
+
onToggle: {
|
|
25
|
+
type: Function,
|
|
26
|
+
default: undefined,
|
|
27
|
+
},
|
|
28
|
+
class: { type: String, default: undefined },
|
|
29
|
+
},
|
|
30
|
+
emits: ["toggle"],
|
|
31
|
+
setup(props, { slots, attrs, emit }) {
|
|
32
|
+
const uid = `st-collapsible-${(collapsibleCounter += 1)}`;
|
|
33
|
+
const internalOpen = ref(props.open ?? false);
|
|
34
|
+
return () => {
|
|
35
|
+
const isControlled = props.open !== undefined;
|
|
36
|
+
const open = isControlled ? props.open : internalOpen.value;
|
|
37
|
+
const classes = classNames("st-collapsible", open && "st-collapsible--open", props.class);
|
|
38
|
+
const toggle = () => {
|
|
39
|
+
if (props.disabled)
|
|
40
|
+
return;
|
|
41
|
+
const next = !open;
|
|
42
|
+
if (!isControlled)
|
|
43
|
+
internalOpen.value = next;
|
|
44
|
+
props.onToggle?.(next);
|
|
45
|
+
emit("toggle", next);
|
|
46
|
+
};
|
|
47
|
+
return h("div", { ...attrs, class: classes }, [
|
|
48
|
+
h("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
class: "st-collapsible__trigger",
|
|
51
|
+
"aria-expanded": open ? "true" : "false",
|
|
52
|
+
"aria-controls": `${uid}-region`,
|
|
53
|
+
id: `${uid}-trigger`,
|
|
54
|
+
disabled: props.disabled,
|
|
55
|
+
onClick: toggle,
|
|
56
|
+
}, [
|
|
57
|
+
h("span", { class: "st-collapsible__title" }, props.title),
|
|
58
|
+
h("span", { class: "st-collapsible__icon", "aria-hidden": "true" }, [ChevronDownIcon()]),
|
|
59
|
+
]),
|
|
60
|
+
open
|
|
61
|
+
? h("div", {
|
|
62
|
+
class: "st-collapsible__region",
|
|
63
|
+
role: "region",
|
|
64
|
+
id: `${uid}-region`,
|
|
65
|
+
"aria-labelledby": `${uid}-trigger`,
|
|
66
|
+
}, slots.default?.())
|
|
67
|
+
: null,
|
|
68
|
+
]);
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=Collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.js","sourceRoot":"","sources":["../src/Collapsible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAW7C,IAAI,kBAAkB,GAAG,CAAC,CAAC;AAE3B,SAAS,eAAe;IACtB,OAAO,CAAC,CACN,KAAK,EACL;QACE,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,MAAM;QACZ,MAAM,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AAC,IAAI;aACT,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/dist/Container.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare const Container: import("vue").DefineComponent<import("vue").Extr
|
|
|
45
45
|
}>> & Readonly<{}>, {
|
|
46
46
|
class: string;
|
|
47
47
|
size: ContainerSize;
|
|
48
|
-
as: string;
|
|
49
48
|
padding: boolean;
|
|
49
|
+
as: string;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
51
|
//# sourceMappingURL=Container.d.ts.map
|
package/dist/DataTable.d.ts
CHANGED
|
@@ -262,8 +262,8 @@ export declare const DataTable: import("vue").DefineComponent<import("vue").Extr
|
|
|
262
262
|
}>> & Readonly<{}>, {
|
|
263
263
|
class: string;
|
|
264
264
|
caption: VNodeChild;
|
|
265
|
-
page: number;
|
|
266
265
|
size: DataTableSize;
|
|
266
|
+
page: number;
|
|
267
267
|
emptyLabel: string;
|
|
268
268
|
selectable: DataTableSelectMode;
|
|
269
269
|
selectedIds: string[];
|
package/dist/Flex.d.ts
CHANGED
|
@@ -87,11 +87,11 @@ export declare const Flex: import("vue").DefineComponent<import("vue").ExtractPr
|
|
|
87
87
|
}>> & Readonly<{}>, {
|
|
88
88
|
class: string;
|
|
89
89
|
inline: boolean;
|
|
90
|
-
as: string;
|
|
91
90
|
wrap: boolean;
|
|
92
91
|
justify: FlexJustify;
|
|
93
92
|
direction: FlexDirection;
|
|
94
93
|
gap: number;
|
|
94
|
+
as: string;
|
|
95
95
|
align: FlexAlign;
|
|
96
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
97
97
|
//# sourceMappingURL=Flex.d.ts.map
|
package/dist/Footer.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export declare const Footer: import("vue").DefineComponent<import("vue").Extract
|
|
|
59
59
|
};
|
|
60
60
|
}>> & Readonly<{}>, {
|
|
61
61
|
class: string;
|
|
62
|
-
columns: FooterColumn[];
|
|
63
62
|
brand: undefined;
|
|
63
|
+
columns: FooterColumn[];
|
|
64
64
|
links: FooterLink[];
|
|
65
65
|
copyright: undefined;
|
|
66
66
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/Header.d.ts
CHANGED
|
@@ -80,10 +80,10 @@ export declare const Header: import("vue").DefineComponent<import("vue").Extract
|
|
|
80
80
|
}>> & Readonly<{}>, {
|
|
81
81
|
class: string;
|
|
82
82
|
title: undefined;
|
|
83
|
-
sticky: boolean;
|
|
84
83
|
brand: undefined;
|
|
85
84
|
navigation: HeaderNavItem[];
|
|
86
85
|
navItems: HeaderNavItem[];
|
|
87
86
|
account: HeaderAccount;
|
|
87
|
+
sticky: boolean;
|
|
88
88
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
89
89
|
//# sourceMappingURL=Header.d.ts.map
|
package/dist/Hidden.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export declare const Hidden: import("vue").DefineComponent<import("vue").Extract
|
|
|
45
45
|
};
|
|
46
46
|
}>> & Readonly<{}>, {
|
|
47
47
|
class: string;
|
|
48
|
-
as: string;
|
|
49
48
|
above: HiddenBreakpoint;
|
|
50
49
|
below: HiddenBreakpoint;
|
|
50
|
+
as: string;
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
52
|
//# sourceMappingURL=Hidden.d.ts.map
|
package/dist/IconButton.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare const IconButton: import("vue").DefineComponent<import("vue").Ext
|
|
|
55
55
|
type: "button" | "reset" | "submit";
|
|
56
56
|
class: string;
|
|
57
57
|
disabled: boolean;
|
|
58
|
-
variant: IconButtonVariant;
|
|
59
58
|
size: IconButtonSize;
|
|
59
|
+
variant: IconButtonVariant;
|
|
60
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
61
|
//# sourceMappingURL=IconButton.d.ts.map
|
package/dist/Inline.d.ts
CHANGED
|
@@ -62,10 +62,10 @@ export declare const Inline: import("vue").DefineComponent<import("vue").Extract
|
|
|
62
62
|
};
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
64
|
class: string;
|
|
65
|
-
as: string;
|
|
66
65
|
wrap: boolean;
|
|
67
66
|
justify: FlexJustify;
|
|
68
67
|
gap: number;
|
|
68
|
+
as: string;
|
|
69
69
|
align: FlexAlign;
|
|
70
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
71
71
|
//# sourceMappingURL=Inline.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
export interface RadioGroupOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
}
|
|
8
|
+
export type RadioGroupProps = {
|
|
9
|
+
legend: string;
|
|
10
|
+
/** Valeur sélectionnée (contrôlée). */
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
orientation?: "vertical" | "horizontal";
|
|
14
|
+
/** Nom partagé garantissant l'exclusivité radio. Requis. */
|
|
15
|
+
name: string;
|
|
16
|
+
options?: RadioGroupOption[];
|
|
17
|
+
helperText?: string;
|
|
18
|
+
/** Désactive le groupe entier. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
class?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const RadioGroup: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
23
|
+
legend: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
value: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
onChange: {
|
|
32
|
+
type: PropType<(value: string) => void>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
orientation: {
|
|
36
|
+
type: () => "vertical" | "horizontal";
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
name: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
options: {
|
|
44
|
+
type: PropType<RadioGroupOption[]>;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
helperText: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
51
|
+
disabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
class: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
|
+
legend: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
value: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
onChange: {
|
|
71
|
+
type: PropType<(value: string) => void>;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
orientation: {
|
|
75
|
+
type: () => "vertical" | "horizontal";
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
name: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
required: true;
|
|
81
|
+
};
|
|
82
|
+
options: {
|
|
83
|
+
type: PropType<RadioGroupOption[]>;
|
|
84
|
+
default: () => never[];
|
|
85
|
+
};
|
|
86
|
+
helperText: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
90
|
+
disabled: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
94
|
+
class: {
|
|
95
|
+
type: StringConstructor;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
}>> & Readonly<{
|
|
99
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
}>, {
|
|
101
|
+
class: string;
|
|
102
|
+
onChange: (value: string) => void;
|
|
103
|
+
disabled: boolean;
|
|
104
|
+
orientation: "horizontal" | "vertical";
|
|
105
|
+
value: string;
|
|
106
|
+
helperText: string;
|
|
107
|
+
options: RadioGroupOption[];
|
|
108
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
109
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAIpC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;cAMC,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;;;;cAInC,MAAM,UAAU,GAAG,YAAY;;;;;;;;cAKhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;cATzB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;;;;cAInC,MAAM,UAAU,GAAG,YAAY;;;;;;;;cAKhC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;sBATR,MAAM,KAAK,IAAI;;;;;;4EAyDtD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
import { Radio } from "./Radio.js";
|
|
4
|
+
export const RadioGroup = defineComponent({
|
|
5
|
+
name: "RadioGroup",
|
|
6
|
+
props: {
|
|
7
|
+
legend: { type: String, required: true },
|
|
8
|
+
value: { type: String, default: undefined },
|
|
9
|
+
onChange: {
|
|
10
|
+
type: Function,
|
|
11
|
+
default: undefined,
|
|
12
|
+
},
|
|
13
|
+
orientation: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "vertical",
|
|
16
|
+
},
|
|
17
|
+
name: { type: String, required: true },
|
|
18
|
+
options: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => [],
|
|
21
|
+
},
|
|
22
|
+
helperText: { type: String, default: undefined },
|
|
23
|
+
disabled: { type: Boolean, default: false },
|
|
24
|
+
class: { type: String, default: undefined },
|
|
25
|
+
},
|
|
26
|
+
emits: ["change"],
|
|
27
|
+
setup(props, { slots, attrs, emit }) {
|
|
28
|
+
function select(optionValue) {
|
|
29
|
+
if (optionValue === props.value)
|
|
30
|
+
return;
|
|
31
|
+
props.onChange?.(optionValue);
|
|
32
|
+
emit("change", optionValue);
|
|
33
|
+
}
|
|
34
|
+
return () => {
|
|
35
|
+
const classes = classNames("st-radioGroup", `st-radioGroup--${props.orientation}`, props.class);
|
|
36
|
+
return h("fieldset", { ...attrs, class: classes, disabled: props.disabled }, [
|
|
37
|
+
h("legend", { class: "st-radioGroup__legend" }, props.legend),
|
|
38
|
+
props.helperText
|
|
39
|
+
? h("p", { class: "st-radioGroup__help" }, props.helperText)
|
|
40
|
+
: null,
|
|
41
|
+
h("div", { class: "st-radioGroup__options" }, [
|
|
42
|
+
...props.options.map((option) => h(Radio, {
|
|
43
|
+
key: option.value,
|
|
44
|
+
label: option.label,
|
|
45
|
+
helperText: option.helperText,
|
|
46
|
+
name: props.name,
|
|
47
|
+
value: option.value,
|
|
48
|
+
checked: props.value === option.value,
|
|
49
|
+
disabled: option.disabled,
|
|
50
|
+
onChange: () => select(option.value),
|
|
51
|
+
})),
|
|
52
|
+
slots.default?.(),
|
|
53
|
+
]),
|
|
54
|
+
]);
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../src/RadioGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAwBnC,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC;IACxC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE;QACL,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QA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ACd,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,KAAK,CAAC,UAAU,CAAC;oBAC5D,CAAC,CAAC,IAAI;gBACR,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE;oBAC5C,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC9B,CAAC,CAAC,KAAK,EAAE;wBACP,GAAG,EAAE,MAAM,CAAC,KAAK;wBACjB,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,UAAU,EAAE,MAAM,CAAC,UAAU;wBAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;wBAChB,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,OAAO,EAAE,KAAK,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;wBACrC,QAAQ,EAAE,MAAM,CAAC,QAAQ;wBACzB,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;qBACrC,CAAC,CACH;oBACD,KAAK,CAAC,OAAO,EAAE,EAAE;iBAClB,CAAC;aACH,CACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/dist/Row.d.ts
CHANGED
|
@@ -62,9 +62,9 @@ export declare const Row: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
62
62
|
};
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
64
|
class: string;
|
|
65
|
-
as: string;
|
|
66
65
|
wrap: boolean;
|
|
67
66
|
justify: FlexJustify;
|
|
67
|
+
as: string;
|
|
68
68
|
align: FlexAlign;
|
|
69
69
|
gutter: number;
|
|
70
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/Stack.d.ts
CHANGED
|
@@ -53,9 +53,9 @@ export declare const Stack: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
53
53
|
};
|
|
54
54
|
}>> & Readonly<{}>, {
|
|
55
55
|
class: string;
|
|
56
|
-
as: string;
|
|
57
56
|
justify: FlexJustify;
|
|
58
57
|
gap: number;
|
|
58
|
+
as: string;
|
|
59
59
|
align: FlexAlign;
|
|
60
60
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
61
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
export interface StepperStep {
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export type StepperOrientation = "horizontal" | "vertical";
|
|
7
|
+
export type StepperProps = {
|
|
8
|
+
steps: StepperStep[];
|
|
9
|
+
/** Index de l'étape courante (0-based). */
|
|
10
|
+
current?: number;
|
|
11
|
+
orientation?: StepperOrientation;
|
|
12
|
+
/** Autorise la navigation au clic sur les étapes. */
|
|
13
|
+
clickable?: boolean;
|
|
14
|
+
onStepClick?: (index: number) => void;
|
|
15
|
+
/** Étiquette a11y de la liste d'étapes. */
|
|
16
|
+
label?: string;
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const Stepper: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
|
+
steps: {
|
|
21
|
+
type: PropType<StepperStep[]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
current: {
|
|
25
|
+
type: NumberConstructor;
|
|
26
|
+
default: number;
|
|
27
|
+
};
|
|
28
|
+
orientation: {
|
|
29
|
+
type: () => StepperOrientation;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
clickable: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
onStepClick: {
|
|
37
|
+
type: PropType<(index: number) => void>;
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
label: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
class: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: undefined;
|
|
47
|
+
};
|
|
48
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "stepClick"[], "stepClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
steps: {
|
|
52
|
+
type: PropType<StepperStep[]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
current: {
|
|
56
|
+
type: NumberConstructor;
|
|
57
|
+
default: number;
|
|
58
|
+
};
|
|
59
|
+
orientation: {
|
|
60
|
+
type: () => StepperOrientation;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
clickable: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
onStepClick: {
|
|
68
|
+
type: PropType<(index: number) => void>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
label: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
class: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{
|
|
80
|
+
onStepClick?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
}>, {
|
|
82
|
+
class: string;
|
|
83
|
+
label: string;
|
|
84
|
+
orientation: StepperOrientation;
|
|
85
|
+
current: number;
|
|
86
|
+
clickable: boolean;
|
|
87
|
+
onStepClick: (index: number) => void;
|
|
88
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../src/Stepper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAGpC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAqBF,eAAO,MAAM,OAAO;;cAGQ,QAAQ,CAAC,WAAW,EAAE,CAAC;;;;;;;;cAG7B,MAAM,kBAAkB;;;;;;;;cAKtB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;;;;;;;;;;;;;;;cAR7B,QAAQ,CAAC,WAAW,EAAE,CAAC;;;;;;;;cAG7B,MAAM,kBAAkB;;;;;;;;cAKtB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;;;;;;;;;;;;;;;;;;;yBAAhB,MAAM,KAAK,IAAI;4EAwFtD,CAAC"}
|
package/dist/Stepper.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineComponent, h } from "vue";
|
|
2
|
+
import { classNames } from "./classNames.js";
|
|
3
|
+
function CheckIcon() {
|
|
4
|
+
return h("svg", {
|
|
5
|
+
width: 14,
|
|
6
|
+
height: 14,
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "none",
|
|
9
|
+
stroke: "currentColor",
|
|
10
|
+
"stroke-width": 2.5,
|
|
11
|
+
"stroke-linecap": "round",
|
|
12
|
+
"stroke-linejoin": "round",
|
|
13
|
+
focusable: "false",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
}, [h("path", { d: "M20 6 9 17l-5-5" })]);
|
|
16
|
+
}
|
|
17
|
+
export const Stepper = defineComponent({
|
|
18
|
+
name: "Stepper",
|
|
19
|
+
props: {
|
|
20
|
+
steps: { type: Array, required: true },
|
|
21
|
+
current: { type: Number, default: 0 },
|
|
22
|
+
orientation: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "horizontal",
|
|
25
|
+
},
|
|
26
|
+
clickable: { type: Boolean, default: false },
|
|
27
|
+
onStepClick: {
|
|
28
|
+
type: Function,
|
|
29
|
+
default: undefined,
|
|
30
|
+
},
|
|
31
|
+
label: { type: String, default: "Progression" },
|
|
32
|
+
class: { type: String, default: undefined },
|
|
33
|
+
},
|
|
34
|
+
emits: ["stepClick"],
|
|
35
|
+
setup(props, { attrs, emit }) {
|
|
36
|
+
function stateOf(index) {
|
|
37
|
+
if (index < props.current)
|
|
38
|
+
return "complete";
|
|
39
|
+
if (index === props.current)
|
|
40
|
+
return "current";
|
|
41
|
+
return "upcoming";
|
|
42
|
+
}
|
|
43
|
+
function handleClick(index) {
|
|
44
|
+
if (!props.clickable)
|
|
45
|
+
return;
|
|
46
|
+
props.onStepClick?.(index);
|
|
47
|
+
emit("stepClick", index);
|
|
48
|
+
}
|
|
49
|
+
return () => {
|
|
50
|
+
const classes = classNames("st-stepper", `st-stepper--${props.orientation}`, props.class);
|
|
51
|
+
return h("ol", { ...attrs, class: classes, "aria-label": props.label }, props.steps.map((step, index) => {
|
|
52
|
+
const state = stateOf(index);
|
|
53
|
+
const isLast = index === props.steps.length - 1;
|
|
54
|
+
return h("li", {
|
|
55
|
+
key: index,
|
|
56
|
+
class: classNames("st-stepper__step", `st-stepper__step--${state}`),
|
|
57
|
+
"aria-current": state === "current" ? "step" : undefined,
|
|
58
|
+
}, [
|
|
59
|
+
h("span", { class: "st-stepper__indicator" }, [
|
|
60
|
+
props.clickable
|
|
61
|
+
? h("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
class: "st-stepper__circle st-stepper__circle--button",
|
|
64
|
+
onClick: () => handleClick(index),
|
|
65
|
+
"aria-label": step.label,
|
|
66
|
+
}, [
|
|
67
|
+
state === "complete"
|
|
68
|
+
? CheckIcon()
|
|
69
|
+
: h("span", { class: "st-stepper__index" }, index + 1),
|
|
70
|
+
])
|
|
71
|
+
: h("span", { class: "st-stepper__circle" }, [
|
|
72
|
+
state === "complete"
|
|
73
|
+
? CheckIcon()
|
|
74
|
+
: h("span", { class: "st-stepper__index" }, index + 1),
|
|
75
|
+
]),
|
|
76
|
+
!isLast
|
|
77
|
+
? h("span", { class: "st-stepper__connector" })
|
|
78
|
+
: null,
|
|
79
|
+
]),
|
|
80
|
+
h("span", { class: "st-stepper__text" }, [
|
|
81
|
+
h("span", { class: "st-stepper__label" }, step.label),
|
|
82
|
+
step.description
|
|
83
|
+
? h("span", { class: "st-stepper__description" }, step.description)
|
|
84
|
+
: null,
|
|
85
|
+
]),
|
|
86
|
+
]);
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=Stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.js","sourceRoot":"","sources":["../src/Stepper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAsB7C,SAAS,SAAS;IAChB,OAAO,CAAC,CACN,KAAK,EACL;QACE,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,WAAW;Q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C,MAAM,EACN,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,GAAG,CAAC,CACV;6BACN,CACF;4BACH,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE;gCACzC,KAAK,KAAK,UAAU;oCAClB,CAAC,CAAC,SAAS,EAAE;oCACb,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC;6BACzD,CAAC;wBACN,CAAC,MAAM;4BACL,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;4BAC/C,CAAC,CAAC,IAAI;qBACT,CAAC;oBACF,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE;wBACvC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC;wBACrD,IAAI,CAAC,WAAW;4BACd,CAAC,CAAC,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,yBAAyB,EAAE,EACpC,IAAI,CAAC,WAAW,CACjB;4BACH,CAAC,CAAC,IAAI;qBACT,CAAC;iBACH,CACF,CAAC;YACJ,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export type TypographyVariant = "display" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "body" | "body-sm" | "caption" | "overline";
|
|
2
|
+
export type TypographyWeight = "regular" | "medium" | "semibold" | "bold";
|
|
3
|
+
export type TypographyTone = "primary" | "secondary" | "muted" | "inverse" | "link";
|
|
4
|
+
export type TypographyAlign = "start" | "center" | "end" | "justify";
|
|
5
|
+
export type TypographyProps = {
|
|
6
|
+
variant?: TypographyVariant;
|
|
7
|
+
/** Surcharge la balise déduite de la variante. */
|
|
8
|
+
as?: string;
|
|
9
|
+
weight?: TypographyWeight;
|
|
10
|
+
tone?: TypographyTone;
|
|
11
|
+
align?: TypographyAlign;
|
|
12
|
+
/** Tronque sur une ligne avec ellipsis. */
|
|
13
|
+
truncate?: boolean;
|
|
14
|
+
class?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const Typography: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
+
variant: {
|
|
18
|
+
type: () => TypographyVariant;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
as: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
weight: {
|
|
26
|
+
type: () => TypographyWeight;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
tone: {
|
|
30
|
+
type: () => TypographyTone;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
33
|
+
align: {
|
|
34
|
+
type: () => TypographyAlign;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
truncate: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
class: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
+
variant: {
|
|
49
|
+
type: () => TypographyVariant;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
as: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
56
|
+
weight: {
|
|
57
|
+
type: () => TypographyWeight;
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
tone: {
|
|
61
|
+
type: () => TypographyTone;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
align: {
|
|
65
|
+
type: () => TypographyAlign;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
truncate: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
class: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
}>> & Readonly<{}>, {
|
|
77
|
+
class: string;
|
|
78
|
+
tone: TypographyTone;
|
|
79
|
+
weight: TypographyWeight;
|
|
80
|
+
variant: TypographyVariant;
|
|
81
|
+
as: string;
|
|
82
|
+
align: TypographyAlign;
|
|
83
|
+
truncate: boolean;
|
|
84
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
85
|
+
//# sourceMappingURL=Typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../src/Typography.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACpF,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAiBrE,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU;;cAGQ,MAAM,iBAAiB;;;;;;;;cAExB,MAAM,gBAAgB;;;;cACxB,MAAM,cAAc;;;;cACnB,MAAM,eAAe;;;;;;;;;;;;;;;cAJnB,MAAM,iBAAiB;;;;;;;;cAExB,MAAM,gBAAgB;;;;cACxB,MAAM,cAAc;;;;cACnB,MAAM,eAAe;;;;;;;;;;;;;;;;;;;4EAmBhD,CAAC"}
|