@1024pix/epreuves-components 1.4.4 → 1.5.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/LLMMessage.ce-CcaSmq0J.js +96 -0
- package/dist/Loading.ce-kO02LfAR.js +14 -0
- package/dist/NavigationButton.ce-BUeEdL4x.js +98 -0
- package/dist/{_plugin-vue_export-helper-CwwQJ1m6.js → _plugin-vue_export-helper-BGEtPlxS.js} +1373 -1355
- package/dist/components/calcul-impact.ce.js.js +91 -85
- package/dist/components/capacity-calculation.ce.js.js +117 -111
- package/dist/components/clickable-image.ce.js.js +83 -59
- package/dist/components/complete-phrase.ce.js.js +62 -56
- package/dist/components/flip-cards.ce.js.js +43 -46
- package/dist/components/image-quiz.ce.js.js +6 -4
- package/dist/components/image-quizzes.ce.js.js +18 -14
- package/dist/components/llm-compare-messages.ce.js.js +17 -17
- package/dist/components/llm-messages.ce.js.js +17 -17
- package/dist/components/llm-prompt-select.ce.js.js +37 -32
- package/dist/components/message-conversation.ce.js.js +61 -52
- package/dist/components/pix-article.ce.js.js +26 -20
- package/dist/components/pix-carousel.ce.js.js +133 -121
- package/dist/components/pix-cursor.ce.js.js +62 -62
- package/dist/components/qcm-deepfake.ce.js.js +97 -91
- package/dist/{i18n-gncqQJ0G.js → i18n-D3E2CT0o.js} +44 -40
- package/dist/image-quiz.ce-Qe3SbGDF.js +141 -0
- package/dist/index.js +1 -1
- package/dist/normalize-props-AlmAfi_u.js +13 -0
- package/dist/schema.js +8 -8
- package/dist/{shadow-dom-MxYtPVXS.js → shadow-dom-Bqt3ZRMI.js} +1 -1
- package/package.json +1 -1
- package/dist/ImageQuiz.ce-BLOWdEiw.js +0 -123
- package/dist/LLMMessage.ce-DnZ8kE2i.js +0 -89
- package/dist/Loading.ce-FI776zdC.js +0 -14
- package/dist/NavigationButton.ce-gp04deGY.js +0 -98
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { B, N as M } from "../NavigationButton.ce-
|
|
4
|
-
|
|
1
|
+
import { d as L, k as x, c as a, o as n, D as T, f as s, E, L as D, A as z, t as g, _ as h, r as C, K as I, G as u, y as m, x as S, J as V, M as w, F as k, a as A, b as N, e as P } from "../_plugin-vue_export-helper-BGEtPlxS.js";
|
|
2
|
+
import { a as F, i as B, b as G } from "../i18n-D3E2CT0o.js";
|
|
3
|
+
import { B as j, N as M } from "../NavigationButton.ce-BUeEdL4x.js";
|
|
4
|
+
import { u as _, a as O } from "../normalize-props-AlmAfi_u.js";
|
|
5
|
+
const W = {
|
|
5
6
|
"pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
|
|
6
|
-
},
|
|
7
|
+
}, Z = {}, J = {
|
|
7
8
|
"pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
|
|
8
|
-
},
|
|
9
|
+
}, K = {
|
|
9
10
|
"pix-carousel": { license: "Licence de l’image", of: "{{ currentSlide }} sur {{ slideLength }}", next: "Suivant", previous: "Précédent", slide: "Diapositive", title: "Carrousel" }
|
|
10
|
-
},
|
|
11
|
+
}, q = {
|
|
11
12
|
"pix-carousel": { license: "Licenza d'immagine", next: "Avanti", of: "{{ currentSlide }} di {{ slideLength }}", previous: "Precedente", slide: "Diapositiva", title: "Galleria" }
|
|
12
|
-
},
|
|
13
|
+
}, Q = {
|
|
13
14
|
"pix-carousel": { license: "Afbeeldingslicentie", next: "Volgende", of: "{{ currentSlide }} van {{ slideLength }}", previous: "Vorige", slide: "Dia", title: "Carrousel" }
|
|
14
|
-
},
|
|
15
|
+
}, U = ["aria-level"], X = ["innerHTML"], Y = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "description"
|
|
17
|
-
},
|
|
18
|
+
}, ee = /* @__PURE__ */ L({
|
|
18
19
|
__name: "SlideInfo.ce",
|
|
19
20
|
props: {
|
|
20
21
|
description: { type: String },
|
|
@@ -22,39 +23,39 @@ const F = {
|
|
|
22
23
|
titleLevel: { type: Number },
|
|
23
24
|
isActive: { type: Boolean }
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const i =
|
|
27
|
-
if (!
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
const
|
|
31
|
-
return
|
|
26
|
+
setup(e) {
|
|
27
|
+
const i = x(() => {
|
|
28
|
+
if (!e.description) return !1;
|
|
29
|
+
const l = [...e.description.matchAll(/<(\w+)[^>]*>/gm)];
|
|
30
|
+
if (!l.length) return !1;
|
|
31
|
+
const t = new RegExp(`</${l[0][1]}>`, "gm");
|
|
32
|
+
return e.description.match(t);
|
|
32
33
|
});
|
|
33
|
-
return (
|
|
34
|
-
class: T(["slide-info", { active:
|
|
34
|
+
return (l, t) => (n(), a("div", {
|
|
35
|
+
class: T(["slide-info", { active: e.isActive }])
|
|
35
36
|
}, [
|
|
36
|
-
|
|
37
|
+
s("div", {
|
|
37
38
|
role: "heading",
|
|
38
|
-
"aria-level":
|
|
39
|
+
"aria-level": e.titleLevel,
|
|
39
40
|
class: "title"
|
|
40
41
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
], 8,
|
|
44
|
-
i.value ? (
|
|
42
|
+
D(l.$slots, "pagination"),
|
|
43
|
+
z(" " + g(e.title), 1)
|
|
44
|
+
], 8, U),
|
|
45
|
+
i.value ? (n(), a("div", {
|
|
45
46
|
key: 0,
|
|
46
47
|
class: "description",
|
|
47
|
-
innerHTML:
|
|
48
|
-
}, null, 8,
|
|
48
|
+
innerHTML: e.description
|
|
49
|
+
}, null, 8, X)) : e.description ? (n(), a("p", Y, g(e.description), 1)) : E("", !0)
|
|
49
50
|
], 2));
|
|
50
51
|
}
|
|
51
|
-
}),
|
|
52
|
+
}), ie = ".slide-info{transform:translate(100vw);grid-column:1;grid-row:1;height:fit-content;border-left:1px solid transparent;padding-left:16px;padding-top:4px}.slide-info p{margin-top:8px;margin-bottom:0}.slide-info.active{border-left-color:gray;transform:translate(0)}.slide-info .title{display:flex;align-items:center;font-size:1.25rem;font-family:Nunito,sans-serif;font-style:normal;font-weight:700;line-height:1.75rem;gap:8px;min-height:24px}.slide-info .description{font-size:.875rem}.slide-info .description ul li,.slide-info .description ol li{margin-left:1rem}@media only screen and (max-width:576px){.slide-info.active{border:none;padding-left:0}}", H = /* @__PURE__ */ h(ee, [["styles", [ie]]]), te = ["aria-hidden", "aria-roledescription", "aria-label"], ne = ["alt", "src"], ae = {
|
|
52
53
|
key: 0,
|
|
53
54
|
class: "license"
|
|
54
|
-
},
|
|
55
|
+
}, se = ["href"], le = {
|
|
55
56
|
key: 1,
|
|
56
57
|
class: "text-image-container"
|
|
57
|
-
},
|
|
58
|
+
}, oe = ["alt", "src", "height"], re = ["innerHTML"], de = ["innerHTML"], ce = /* @__PURE__ */ L({
|
|
58
59
|
__name: "Slide.ce",
|
|
59
60
|
props: {
|
|
60
61
|
slide: { type: Object },
|
|
@@ -66,95 +67,95 @@ const F = {
|
|
|
66
67
|
type: { type: String },
|
|
67
68
|
disableAnimation: { type: Boolean }
|
|
68
69
|
},
|
|
69
|
-
setup(
|
|
70
|
-
const i = window.matchMedia("(prefers-reduced-motion: reduce)"),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, 20)) : (
|
|
75
|
-
|
|
70
|
+
setup(e) {
|
|
71
|
+
const i = window.matchMedia("(prefers-reduced-motion: reduce)"), l = e.disableAnimation ?? i.matches, t = C(e.isActive ? "on" : "off");
|
|
72
|
+
I(() => e.isActive, (f) => {
|
|
73
|
+
f ? (t.value = l ? "on" : "initStart", window.setTimeout(() => {
|
|
74
|
+
t.value === "initStart" && (t.value = "on");
|
|
75
|
+
}, 20)) : (t.value = l ? "off" : "initEnd", window.setTimeout(() => {
|
|
76
|
+
t.value === "initEnd" && (t.value = "off");
|
|
76
77
|
}, 800));
|
|
77
78
|
});
|
|
78
|
-
const
|
|
79
|
-
return (
|
|
79
|
+
const r = x(() => e.direction === 1);
|
|
80
|
+
return (f, y) => (n(), a("div", {
|
|
80
81
|
role: "group",
|
|
81
|
-
class: T(["slide", { active: e.isActive, [
|
|
82
|
+
class: T(["slide", { active: e.isActive, [t.value]: t.value, "is-next": r.value, "disable-animation": u(l) }]),
|
|
82
83
|
"aria-hidden": !e.isActive,
|
|
83
|
-
"aria-roledescription":
|
|
84
|
+
"aria-roledescription": f.$t("pix-carousel.slide"),
|
|
84
85
|
"aria-label": e.label
|
|
85
86
|
}, [
|
|
86
|
-
e.type === "image" ? (
|
|
87
|
+
e.type === "image" ? (n(), a("div", {
|
|
87
88
|
key: 0,
|
|
88
89
|
class: "image-container",
|
|
89
|
-
style:
|
|
90
|
+
style: S(`aspect-ratio: ${e.aspectRatio}`)
|
|
90
91
|
}, [
|
|
91
|
-
|
|
92
|
-
style:
|
|
92
|
+
s("img", {
|
|
93
|
+
style: S(`max-width: ${e.slide.displayWidth}px`),
|
|
93
94
|
alt: e.slide.image.alt,
|
|
94
95
|
src: e.slide.image.src
|
|
95
|
-
}, null, 12,
|
|
96
|
-
e.slide.license ? (
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
}, null, 12, ne),
|
|
97
|
+
e.slide.license ? (n(), a("p", ae, [
|
|
98
|
+
z(g(e.slide.license.attribution) + " / ", 1),
|
|
99
|
+
s("a", {
|
|
99
100
|
href: e.slide.license.url,
|
|
100
101
|
target: "_blank"
|
|
101
|
-
}, g(e.slide.license.name), 9,
|
|
102
|
+
}, g(e.slide.license.name), 9, se)
|
|
102
103
|
])) : E("", !0)
|
|
103
|
-
], 4)) : e.type === "image-text" ? (
|
|
104
|
-
|
|
104
|
+
], 4)) : e.type === "image-text" ? (n(), a("div", le, [
|
|
105
|
+
s("img", {
|
|
105
106
|
alt: e.slide.image.alt,
|
|
106
107
|
src: e.slide.image.src,
|
|
107
108
|
height: e.slide.displayHeight
|
|
108
|
-
}, null, 8,
|
|
109
|
-
|
|
109
|
+
}, null, 8, oe),
|
|
110
|
+
s("div", {
|
|
110
111
|
innerHTML: e.slide.text,
|
|
111
112
|
class: "text-container"
|
|
112
|
-
}, null, 8,
|
|
113
|
-
])) : (
|
|
113
|
+
}, null, 8, re)
|
|
114
|
+
])) : (n(), a("div", {
|
|
114
115
|
key: 2,
|
|
115
116
|
innerHTML: e.slide.text,
|
|
116
117
|
class: "text-container"
|
|
117
|
-
}, null, 8,
|
|
118
|
-
m(
|
|
118
|
+
}, null, 8, de)),
|
|
119
|
+
m(H, {
|
|
119
120
|
description: e.slide.description,
|
|
120
121
|
title: e.slide.title,
|
|
121
122
|
"is-active": e.isActive,
|
|
122
123
|
"title-level": e.titleLevel,
|
|
123
124
|
class: "sr-only"
|
|
124
125
|
}, null, 8, ["description", "title", "is-active", "title-level"])
|
|
125
|
-
], 10,
|
|
126
|
+
], 10, te));
|
|
126
127
|
}
|
|
127
|
-
}),
|
|
128
|
+
}), ue = ".slide{transition:transform ease-in-out .8s;height:100%}.slide.off,.slide.initStart{transition:none;transform:translate(100vw)}.slide.initStart.is-next,.slide.initEnd{transform:translate(-100vw)}.slide.initEnd.is-next{transform:translate(100vw)}.slide.on{transform:translate(0)}.slide.disable-animation{transition:none}.image-container{position:relative;display:flex;justify-content:center;align-items:center;margin:auto;max-width:920px;border-radius:8px}.image-container--is-not-image{justify-content:left}.image-container img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0px 8px 12px rgba(0,0,0,.2));border-radius:16px}.license{position:absolute;font-size:.8rem;bottom:0;margin:0;padding:2px 8px;max-width:50%;border-top-left-radius:8px;border-top-right-radius:8px;text-align:center;background:#ffffffe6}.text-container{margin:auto;width:fit-content}.text-image-container{display:flex;gap:12px;padding:0 16px}@media only screen and (max-width:576px){.license{font-size:.5rem}.image-container img{border-radius:8px}.text-image-container{padding:16px}}@media(prefers-reduced-motion:reduce){.slide{transition:none}}", pe = /* @__PURE__ */ h(ce, [["styles", [ue]]]), me = {}, fe = {
|
|
128
129
|
width: "25",
|
|
129
130
|
height: "24",
|
|
130
131
|
viewBox: "0 0 25 24",
|
|
131
132
|
fill: "inherit",
|
|
132
133
|
xmlns: "http://www.w3.org/2000/svg"
|
|
133
134
|
};
|
|
134
|
-
function
|
|
135
|
-
return
|
|
136
|
-
|
|
135
|
+
function ge(e, i) {
|
|
136
|
+
return n(), a("svg", fe, [...i[0] || (i[0] = [
|
|
137
|
+
s("path", {
|
|
137
138
|
d: "M11.6579 11.9996L15.4624 15.8039C15.6735 16.0152 15.7791 16.2804 15.7791 16.5996C15.7791 16.9188 15.6735 17.184 15.4624 17.3954C15.251 17.6065 14.9858 17.7121 14.6666 17.7121C14.3474 17.7121 14.0822 17.6065 13.8709 17.3954L9.27685 12.8014C9.16502 12.6894 9.08327 12.565 9.0316 12.4284C8.97994 12.2919 8.9541 12.1489 8.9541 11.9996C8.9541 11.8503 8.97994 11.7074 9.0316 11.5709C9.08327 11.4342 9.16502 11.3099 9.27685 11.1979L13.8709 6.60386C14.0822 6.39269 14.3474 6.28711 14.6666 6.28711C14.9858 6.28711 15.251 6.39269 15.4624 6.60386C15.6735 6.81519 15.7791 7.08044 15.7791 7.39961C15.7791 7.71878 15.6735 7.98403 15.4624 8.19536L11.6579 11.9996Z",
|
|
138
139
|
fill: "inherit"
|
|
139
140
|
}, null, -1)
|
|
140
141
|
])]);
|
|
141
142
|
}
|
|
142
|
-
const
|
|
143
|
+
const ve = /* @__PURE__ */ h(me, [["render", ge]]), xe = {}, he = {
|
|
143
144
|
width: "25",
|
|
144
145
|
height: "24",
|
|
145
146
|
viewBox: "0 0 25 24",
|
|
146
147
|
fill: "inherit",
|
|
147
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
148
149
|
};
|
|
149
|
-
function
|
|
150
|
-
return
|
|
151
|
-
|
|
150
|
+
function be(e, i) {
|
|
151
|
+
return n(), a("svg", he, [...i[0] || (i[0] = [
|
|
152
|
+
s("path", {
|
|
152
153
|
d: "M13.0754 11.9996L9.27085 8.19536C9.05969 7.98403 8.9541 7.71878 8.9541 7.39961C8.9541 7.08044 9.05969 6.81519 9.27085 6.60386C9.48219 6.39269 9.74743 6.28711 10.0666 6.28711C10.3858 6.28711 10.651 6.39269 10.8624 6.60386L15.4564 11.1979C15.5682 11.3099 15.6499 11.4342 15.7016 11.5709C15.7533 11.7074 15.7791 11.8503 15.7791 11.9996C15.7791 12.1489 15.7533 12.2919 15.7016 12.4284C15.6499 12.565 15.5682 12.6894 15.4564 12.8014L10.8624 17.3954C10.651 17.6065 10.3858 17.7121 10.0666 17.7121C9.74743 17.7121 9.48219 17.6065 9.27085 17.3954C9.05969 17.184 8.9541 16.9188 8.9541 16.5996C8.9541 16.2804 9.05969 16.0152 9.27085 15.8039L13.0754 11.9996Z",
|
|
153
154
|
fill: "inherit"
|
|
154
155
|
}, null, -1)
|
|
155
156
|
])]);
|
|
156
157
|
}
|
|
157
|
-
const
|
|
158
|
+
const ye = /* @__PURE__ */ h(xe, [["render", be]]), we = ["aria-roledescription"], _e = ["id"], Ce = { class: "footer" }, Le = { class: "control" }, $e = { class: "slide-info-container" }, Se = { class: "pagination" }, ke = /* @__PURE__ */ L({
|
|
158
159
|
__name: "Carousel.ce",
|
|
159
160
|
props: {
|
|
160
161
|
randomSlides: { type: Boolean },
|
|
@@ -165,97 +166,108 @@ const ve = /* @__PURE__ */ b(fe, [["render", ge]]), he = ["aria-roledescription"
|
|
|
165
166
|
disableLoop: { type: Boolean },
|
|
166
167
|
aspectRatio: { type: Number }
|
|
167
168
|
},
|
|
168
|
-
setup(
|
|
169
|
-
const i =
|
|
170
|
-
function
|
|
171
|
-
|
|
169
|
+
setup(e) {
|
|
170
|
+
const i = e, l = i.titleLevel ?? 2, t = x(() => i.randomSlides ? [...i.slides].sort(() => Math.round(Math.random()) === 0 ? -1 : 1) : i.slides), r = C(0), f = C(1), y = x(() => i.disableLoop && r.value === 0), $ = x(() => i.disableLoop && r.value === i.slides.length - 1);
|
|
171
|
+
function b(o) {
|
|
172
|
+
f.value = o, r.value = (r.value - o + i.slides.length) % i.slides.length;
|
|
172
173
|
}
|
|
173
|
-
const v =
|
|
174
|
-
return (
|
|
175
|
-
"aria-roledescription":
|
|
174
|
+
const v = V();
|
|
175
|
+
return (o, d) => (n(), a("section", {
|
|
176
|
+
"aria-roledescription": o.$t("pix-carousel.title")
|
|
176
177
|
}, [
|
|
177
|
-
|
|
178
|
+
s("div", {
|
|
178
179
|
"aria-live": "polite",
|
|
179
180
|
class: "slides",
|
|
180
181
|
id: u(v)
|
|
181
182
|
}, [
|
|
182
|
-
m(
|
|
183
|
+
m(j, {
|
|
183
184
|
class: "carousel__nav previous",
|
|
184
185
|
disabled: y.value,
|
|
185
186
|
"aria-controls": u(v),
|
|
186
|
-
onClick:
|
|
187
|
-
label:
|
|
187
|
+
onClick: d[0] || (d[0] = (c) => b(1)),
|
|
188
|
+
label: o.$t("pix-carousel.previous"),
|
|
188
189
|
"tooltip-position": "right"
|
|
189
190
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
m(
|
|
191
|
+
default: w(() => [
|
|
192
|
+
m(ve, { "aria-hidden": "true" })
|
|
192
193
|
]),
|
|
193
194
|
_: 1
|
|
194
195
|
}, 8, ["disabled", "aria-controls", "label"]),
|
|
195
|
-
(
|
|
196
|
-
key:
|
|
197
|
-
slide:
|
|
198
|
-
direction:
|
|
199
|
-
label:
|
|
200
|
-
"is-active":
|
|
201
|
-
"title-level": u(
|
|
202
|
-
"aspect-ratio":
|
|
203
|
-
type:
|
|
204
|
-
"disable-animation":
|
|
196
|
+
(n(!0), a(k, null, A(t.value, (c, p) => (n(), N(pe, {
|
|
197
|
+
key: p,
|
|
198
|
+
slide: c,
|
|
199
|
+
direction: f.value,
|
|
200
|
+
label: o.$t("pix-carousel.of", { currentSlide: p + 1, slideLength: t.value.length }),
|
|
201
|
+
"is-active": r.value === p,
|
|
202
|
+
"title-level": u(l),
|
|
203
|
+
"aspect-ratio": e.aspectRatio,
|
|
204
|
+
type: e.type,
|
|
205
|
+
"disable-animation": e.disableAnimation
|
|
205
206
|
}, null, 8, ["slide", "direction", "label", "is-active", "title-level", "aspect-ratio", "type", "disable-animation"]))), 128)),
|
|
206
|
-
m(
|
|
207
|
+
m(j, {
|
|
207
208
|
class: "carousel__nav next",
|
|
208
|
-
disabled:
|
|
209
|
+
disabled: $.value,
|
|
209
210
|
"aria-controls": u(v),
|
|
210
|
-
onClick:
|
|
211
|
-
label:
|
|
211
|
+
onClick: d[1] || (d[1] = (c) => b(-1)),
|
|
212
|
+
label: o.$t("pix-carousel.next"),
|
|
212
213
|
"tooltip-position": "left"
|
|
213
214
|
}, {
|
|
214
|
-
default:
|
|
215
|
-
m(
|
|
215
|
+
default: w(() => [
|
|
216
|
+
m(ye, { "aria-hidden": "true" })
|
|
216
217
|
]),
|
|
217
218
|
_: 1
|
|
218
219
|
}, 8, ["disabled", "aria-controls", "label"])
|
|
219
|
-
], 8,
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
], 8, _e),
|
|
221
|
+
s("div", Ce, [
|
|
222
|
+
s("div", Le, [
|
|
222
223
|
m(M, {
|
|
223
|
-
onClick:
|
|
224
|
-
label:
|
|
224
|
+
onClick: d[2] || (d[2] = (c) => b(1)),
|
|
225
|
+
label: o.$t("pix-carousel.previous"),
|
|
225
226
|
"aria-controls": u(v),
|
|
226
227
|
direction: "previous",
|
|
227
228
|
disabled: y.value
|
|
228
229
|
}, null, 8, ["label", "aria-controls", "disabled"]),
|
|
229
230
|
m(M, {
|
|
230
|
-
onClick:
|
|
231
|
-
label:
|
|
231
|
+
onClick: d[3] || (d[3] = (c) => b(-1)),
|
|
232
|
+
label: o.$t("pix-carousel.next"),
|
|
232
233
|
"aria-controls": u(v),
|
|
233
234
|
direction: "next",
|
|
234
|
-
disabled:
|
|
235
|
+
disabled: $.value
|
|
235
236
|
}, null, 8, ["label", "aria-controls", "disabled"])
|
|
236
237
|
]),
|
|
237
|
-
|
|
238
|
-
(
|
|
239
|
-
key:
|
|
240
|
-
description:
|
|
241
|
-
title:
|
|
242
|
-
"title-level": u(
|
|
243
|
-
"is-active":
|
|
238
|
+
s("div", $e, [
|
|
239
|
+
(n(!0), a(k, null, A(t.value, (c, p) => (n(), N(H, {
|
|
240
|
+
key: p,
|
|
241
|
+
description: c.description,
|
|
242
|
+
title: c.title,
|
|
243
|
+
"title-level": u(l),
|
|
244
|
+
"is-active": r.value === p,
|
|
244
245
|
"aria-hidden": "true"
|
|
245
246
|
}, {
|
|
246
|
-
pagination:
|
|
247
|
-
|
|
247
|
+
pagination: w(() => [
|
|
248
|
+
s("span", Se, g(p + 1) + " / " + g(t.value.length), 1)
|
|
248
249
|
]),
|
|
249
250
|
_: 2
|
|
250
251
|
}, 1032, ["description", "title", "title-level", "is-active"]))), 128))
|
|
251
252
|
])
|
|
252
253
|
])
|
|
253
|
-
], 8,
|
|
254
|
+
], 8, we));
|
|
254
255
|
}
|
|
255
|
-
}),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
configureApp(
|
|
259
|
-
|
|
256
|
+
}), Ae = "*{--pix-neutral-0: white;--pix-neutral-100: #cdd1d9;--pix-neutral-800: #253858;--pix-primary-100: #cec3f4;--pix-primary-300: #957ee8;--pix-primary-700: #452d9d;--pix-primary-900: #291a5d;font-family:Roboto,sans-serif;color:var(--pix-neutral-800)}section{display:flex;flex-direction:column;gap:12px;overflow:hidden;padding-top:12px}section .slides{display:grid;grid-template-columns:32px auto 32px;gap:16px;width:100%}section .slides .slide{grid-row:1;grid-column:2}section .slides .carousel__nav{height:80%;margin:auto 0;background:var(--pix-primary-100);fill:var(--pix-neutral-800);border:none;cursor:pointer;z-index:9;padding:0}section .slides .carousel__nav:hover{background:var(--pix-primary-300);fill:var(--pix-neutral-0)}section .slides .carousel__nav:active,section .slides .carousel__nav:focus,section .slides .carousel__nav:focus-visible{background:var(--pix-primary-700);fill:var(--pix-neutral-0)}section .slides .carousel__nav:focus,section .slides .carousel__nav:focus-visible{outline-offset:-4px;outline:1px solid var(--pix-neutral-0)}section .slides .carousel__nav.previous{border-top-right-radius:1rem;border-bottom-right-radius:1rem}section .slides .carousel__nav.next{border-top-left-radius:1rem;border-bottom-left-radius:1rem}section .slides .carousel__nav.disabled,section .slides .carousel__nav.disabled:hover{background:transparent;cursor:not-allowed;fill:var(--pix-neutral-100)}.footer{padding:16px 56px;display:flex;align-items:start;gap:16px}.footer .footer-separator{border-left:1px solid;width:1px}.footer .control{display:flex;gap:8px;align-items:center}.footer .tooltip-container button.disabled{fill:var(--pix-neutral-100)}.footer .slide-info-container{display:grid;grid-template-columns:1fr}.footer .slide-info-container .pagination{display:flex;align-items:center;font-size:.75rem;font-family:Roboto,sans-serif;font-weight:400;color:var(--pix-primary-900);border-radius:50px;padding:3px 12px;background-color:var(--pix-primary-100);height:18px;text-wrap:nowrap}.footer .info{display:grid;overflow:hidden}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media only screen and (max-width:576px){section .slides{grid-template-columns:0 100% 0;gap:0}section .slides .carousel__nav{display:none}.footer{flex-direction:column;padding:16px}.footer .footer-separator{display:none}}", Ne = /* @__PURE__ */ h(ke, [["styles", [Ae]]]);
|
|
257
|
+
F(/* @__PURE__ */ Object.assign({ "./locales/en.json": W, "./locales/es-419.json": Z, "./locales/es.json": J, "./locales/fr.json": K, "./locales/it.json": q, "./locales/nl.json": Q })).catch((e) => console.error(e));
|
|
258
|
+
const R = P(Ne, {
|
|
259
|
+
configureApp(e) {
|
|
260
|
+
B.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(G, { i18next: B });
|
|
260
261
|
}
|
|
261
|
-
})
|
|
262
|
+
});
|
|
263
|
+
R.prototype.normalizeProps = (e) => ({
|
|
264
|
+
...e,
|
|
265
|
+
titleLevel: _(e.titleLevel),
|
|
266
|
+
slides: e.slides.map((i) => ({
|
|
267
|
+
...i,
|
|
268
|
+
displayHeight: _(i.displayHeight),
|
|
269
|
+
displayWidth: _(i.displayWidth),
|
|
270
|
+
license: O(i.license)
|
|
271
|
+
}))
|
|
272
|
+
});
|
|
273
|
+
window.customElements.define("pix-carousel", R);
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as q, i as w, b as
|
|
3
|
-
import { N as
|
|
4
|
-
const
|
|
1
|
+
import { d as S, r as k, J as y, k as m, z as A, c as a, o as i, f as s, l as B, G as d, t as u, F as f, a as b, N as H, y as g, D as C, M as L, E as D, q as F, _ as P, e as G } from "../_plugin-vue_export-helper-BGEtPlxS.js";
|
|
2
|
+
import { a as q, i as w, b as J } from "../i18n-D3E2CT0o.js";
|
|
3
|
+
import { N as j } from "../NavigationButton.ce-BUeEdL4x.js";
|
|
4
|
+
const R = {}, U = {}, K = {}, Q = {
|
|
5
5
|
"pix-cursor": { confirm: "Valider", next: "Suivant", previous: "Précédent", selectAnOption: "Sélectionnez une option", youHaveChosen: "Vous avez choisi : { choice }" }
|
|
6
|
-
},
|
|
6
|
+
}, W = {}, X = {}, Y = ["for"], Z = {
|
|
7
7
|
class: "visible-options",
|
|
8
8
|
"aria-hidden": "true"
|
|
9
|
-
},
|
|
9
|
+
}, ee = ["onClick"], oe = ["id"], te = ["onClick", "value", "label"], ne = ["id", "list", "max", "disabled"], ae = { class: "navigation-container" }, ie = { class: "chosen-text-container" }, re = ["aria-hidden"], se = { class: "chosen-option" }, le = {
|
|
10
10
|
class: "footer",
|
|
11
11
|
"aria-live": "polite"
|
|
12
|
-
},
|
|
12
|
+
}, ce = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "confirm"
|
|
15
|
-
},
|
|
15
|
+
}, de = ["innerHTML", "aria-hidden"], ue = /* @__PURE__ */ S({
|
|
16
16
|
__name: "PixCursor.ce",
|
|
17
17
|
props: {
|
|
18
18
|
options: { type: Array }
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const p =
|
|
20
|
+
setup(n, { expose: M }) {
|
|
21
|
+
const p = n, r = k(Math.floor(p.options.length / 2)), o = k(!1), v = y(), x = y(), N = m(() => r.value === p.options.length - 1), I = m(() => r.value === 0), c = m(() => Number(r.value));
|
|
22
22
|
function z() {
|
|
23
23
|
o.value = !0;
|
|
24
24
|
}
|
|
25
25
|
function $() {
|
|
26
|
-
o.value || (r.value = Math.max(0,
|
|
26
|
+
o.value || (r.value = Math.max(0, c.value - 1));
|
|
27
27
|
}
|
|
28
28
|
function O() {
|
|
29
|
-
o.value || (r.value = Math.min(p.options.length - 1,
|
|
29
|
+
o.value || (r.value = Math.min(p.options.length - 1, c.value + 1));
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
o.value || (r.value =
|
|
31
|
+
function _(l) {
|
|
32
|
+
o.value || (r.value = l);
|
|
33
33
|
}
|
|
34
34
|
function T() {
|
|
35
35
|
o.value = !1, r.value = Math.floor(p.options.length / 2);
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return M({
|
|
38
38
|
reset: T
|
|
39
|
-
}), (
|
|
39
|
+
}), (l, h) => {
|
|
40
40
|
const V = A("i18next");
|
|
41
41
|
return i(), a("form", {
|
|
42
42
|
class: "pix-cursor",
|
|
@@ -45,67 +45,67 @@ const U = {}, J = {}, K = {
|
|
|
45
45
|
s("div", null, [
|
|
46
46
|
s("label", {
|
|
47
47
|
class: "sr-only",
|
|
48
|
-
for:
|
|
49
|
-
}, u(
|
|
50
|
-
s("ul",
|
|
51
|
-
(i(!0), a(f, null, b(
|
|
52
|
-
onClick: (E) =>
|
|
48
|
+
for: d(v)
|
|
49
|
+
}, u(l.$t("pix-cursor.selectAnOption")), 9, Y),
|
|
50
|
+
s("ul", Z, [
|
|
51
|
+
(i(!0), a(f, null, b(n.options, (t, e) => (i(), a("li", {
|
|
52
|
+
onClick: (E) => _(e),
|
|
53
53
|
key: e
|
|
54
|
-
}, u(
|
|
54
|
+
}, u(t.label), 9, ee))), 128))
|
|
55
55
|
]),
|
|
56
|
-
s("datalist", { id:
|
|
57
|
-
(i(!0), a(f, null, b(
|
|
58
|
-
onClick: (E) =>
|
|
56
|
+
s("datalist", { id: d(x) }, [
|
|
57
|
+
(i(!0), a(f, null, b(n.options, (t, e) => (i(), a("option", {
|
|
58
|
+
onClick: (E) => _(e),
|
|
59
59
|
key: e,
|
|
60
60
|
value: e,
|
|
61
|
-
label:
|
|
62
|
-
}, u(
|
|
63
|
-
], 8,
|
|
61
|
+
label: t.label
|
|
62
|
+
}, u(t.label), 9, te))), 128))
|
|
63
|
+
], 8, oe),
|
|
64
64
|
B(s("input", {
|
|
65
|
-
"onUpdate:modelValue":
|
|
66
|
-
id:
|
|
65
|
+
"onUpdate:modelValue": h[0] || (h[0] = (t) => r.value = t),
|
|
66
|
+
id: d(v),
|
|
67
67
|
type: "range",
|
|
68
|
-
list:
|
|
68
|
+
list: d(x),
|
|
69
69
|
min: "0",
|
|
70
|
-
max:
|
|
70
|
+
max: n.options.length - 1,
|
|
71
71
|
disabled: o.value
|
|
72
|
-
}, null, 8,
|
|
72
|
+
}, null, 8, ne), [
|
|
73
73
|
[H, r.value]
|
|
74
74
|
]),
|
|
75
|
-
s("div",
|
|
76
|
-
g(
|
|
75
|
+
s("div", ae, [
|
|
76
|
+
g(j, {
|
|
77
77
|
onClick: $,
|
|
78
|
-
disabled: o.value ||
|
|
79
|
-
label:
|
|
80
|
-
"aria-controls":
|
|
78
|
+
disabled: o.value || I.value,
|
|
79
|
+
label: l.$t("pix-cursor.previous"),
|
|
80
|
+
"aria-controls": d(v),
|
|
81
81
|
"aria-disabled": o.value,
|
|
82
82
|
"tooltip-position": "bottom",
|
|
83
83
|
direction: "previous",
|
|
84
84
|
type: "button"
|
|
85
85
|
}, null, 8, ["disabled", "label", "aria-controls", "aria-disabled"]),
|
|
86
|
-
s("div",
|
|
87
|
-
(i(!0), a(f, null, b(
|
|
86
|
+
s("div", ie, [
|
|
87
|
+
(i(!0), a(f, null, b(n.options, (t, e) => (i(), a("p", {
|
|
88
88
|
key: e,
|
|
89
89
|
class: C({
|
|
90
|
-
hidden: e !==
|
|
90
|
+
hidden: e !== c.value
|
|
91
91
|
}),
|
|
92
|
-
"aria-hidden": e !==
|
|
92
|
+
"aria-hidden": e !== c.value
|
|
93
93
|
}, [
|
|
94
94
|
g(V, {
|
|
95
|
-
translation:
|
|
95
|
+
translation: l.$t("pix-cursor.youHaveChosen")
|
|
96
96
|
}, {
|
|
97
97
|
choice: L(() => [
|
|
98
|
-
s("span",
|
|
98
|
+
s("span", se, u(t.label), 1)
|
|
99
99
|
]),
|
|
100
100
|
_: 2
|
|
101
101
|
}, 1032, ["translation"])
|
|
102
|
-
], 10,
|
|
102
|
+
], 10, re))), 128))
|
|
103
103
|
]),
|
|
104
|
-
g(
|
|
104
|
+
g(j, {
|
|
105
105
|
onClick: O,
|
|
106
|
-
disabled: o.value ||
|
|
107
|
-
label:
|
|
108
|
-
"aria-controls":
|
|
106
|
+
disabled: o.value || N.value,
|
|
107
|
+
label: l.$t("pix-cursor.next"),
|
|
108
|
+
"aria-controls": d(v),
|
|
109
109
|
"aria-disabled": o.value,
|
|
110
110
|
"tooltip-position": "bottom",
|
|
111
111
|
direction: "next",
|
|
@@ -113,25 +113,25 @@ const U = {}, J = {}, K = {
|
|
|
113
113
|
}, null, 8, ["disabled", "label", "aria-controls", "aria-disabled"])
|
|
114
114
|
])
|
|
115
115
|
]),
|
|
116
|
-
s("div",
|
|
117
|
-
o.value ? D("", !0) : (i(), a("button",
|
|
118
|
-
(i(!0), a(f, null, b(
|
|
119
|
-
innerHTML:
|
|
116
|
+
s("div", le, [
|
|
117
|
+
o.value ? D("", !0) : (i(), a("button", ce, u(l.$t("pix-cursor.confirm")), 1)),
|
|
118
|
+
(i(!0), a(f, null, b(n.options, (t, e) => (i(), a("p", {
|
|
119
|
+
innerHTML: t.feedback.text,
|
|
120
120
|
key: e,
|
|
121
121
|
class: C(["feedback", {
|
|
122
|
-
[
|
|
123
|
-
hidden: !o.value ||
|
|
122
|
+
[t.feedback.type]: !0,
|
|
123
|
+
hidden: !o.value || c.value !== e
|
|
124
124
|
}]),
|
|
125
|
-
"aria-hidden":
|
|
126
|
-
}, null, 10,
|
|
125
|
+
"aria-hidden": c.value !== e
|
|
126
|
+
}, null, 10, de))), 128))
|
|
127
127
|
])
|
|
128
128
|
], 32);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
132
|
-
q(/* @__PURE__ */ Object.assign({ "./locales/en.json": U, "./locales/es.json":
|
|
133
|
-
window.customElements.define("pix-cursor", G(
|
|
134
|
-
configureApp(
|
|
135
|
-
w.changeLanguage(document?.documentElement?.lang || navigator.language),
|
|
131
|
+
}), pe = "[data-v-58e704c5]{--pix-neutral-800: #253858;font-family:Nunito,sans-serif;color:var(--pix-neutral-800)}.pix-cursor[data-v-58e704c5]{display:flex;flex-direction:column;justify-content:center;margin:auto;padding:2rem;gap:1rem;overflow:hidden}.pix-cursor p[data-v-58e704c5]{text-align:center;font-size:1.1rem}.pix-cursor .chosen-option[data-v-58e704c5]{font-weight:700}.pix-cursor .visible-options[data-v-58e704c5]{display:flex;justify-content:space-between;margin:0;padding:0}.pix-cursor .visible-options li[data-v-58e704c5]{cursor:pointer;list-style:none}.pix-cursor input[data-v-58e704c5]{width:100%}.pix-cursor .confirm[data-v-58e704c5]{padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;font-size:1.25rem;letter-spacing:1.1;width:fit-content;margin:auto;border:none;color:#fff;background:#4075ff;grid-row:1;grid-column:1}.pix-cursor .confirm[data-v-58e704c5]:hover{background:#355ac4;transition:background ease .1s}.pix-cursor .navigation-container[data-v-58e704c5]{display:flex;justify-content:center;align-items:center;gap:1rem}.pix-cursor .navigation-container .chosen-text-container[data-v-58e704c5]{display:grid}.pix-cursor .navigation-container .chosen-text-container p[data-v-58e704c5]{grid-row:1;grid-column:1}.pix-cursor .navigation-container .chosen-text-container p.hidden[data-v-58e704c5]{transform:translate(100vw)}.pix-cursor .footer[data-v-58e704c5]{display:grid;grid-template-columns:auto;align-items:center;justify-content:center}.pix-cursor .feedback[data-v-58e704c5]{padding:1rem 1.2rem;border-left:solid 4px;border-radius:8px;grid-column:1;grid-row:1;text-align:start;margin:0}.pix-cursor .feedback.hidden[data-v-58e704c5]{visibility:hidden;transform:translate(100vw)}.pix-cursor .feedback.good[data-v-58e704c5]{background:#e8f5e9;border-left-color:#4caf51}.pix-cursor .feedback.bad[data-v-58e704c5]{background:#ffebee;border-left-color:#f44337}.pix-cursor .feedback.neutral[data-v-58e704c5]{background:#e8f6ff;border-left-color:#464ee0}.pix-cursor .feedback.close[data-v-58e704c5]{background:#fff8e1;border-left-color:#ffc108}", ve = /* @__PURE__ */ P(ue, [["styles", [pe]], ["__scopeId", "data-v-58e704c5"]]);
|
|
132
|
+
q(/* @__PURE__ */ Object.assign({ "./locales/en.json": R, "./locales/es-419.json": U, "./locales/es.json": K, "./locales/fr.json": Q, "./locales/it.json": W, "./locales/nl.json": X })).catch((n) => console.error(n));
|
|
133
|
+
window.customElements.define("pix-cursor", G(ve, {
|
|
134
|
+
configureApp(n) {
|
|
135
|
+
w.changeLanguage(document?.documentElement?.lang || navigator.language), n.use(J, { i18next: w });
|
|
136
136
|
}
|
|
137
137
|
}));
|