@1024pix/epreuves-components 1.1.0 → 1.2.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.
@@ -1,6 +1,6 @@
1
- import { a as _, v, c as a, o as n, x as j, f as l, y as z, G as H, j as E, t as m, _ as h, r as y, C as R, g as f, K as $, z as V, H as x, q as u, F as S, b as k, e as A, d as D } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
- import { a as I, i as N, b as P } from "../i18n-kZiLXTQh.js";
3
- import { B, N as T } from "../NavigationButton.ce-BPCs1QdC.js";
1
+ import { a as C, v as h, c as l, o, x as j, f as r, y as M, K as R, j as z, t as g, _ as b, r as w, C as H, q as u, g as m, L as $, z as D, H as _, F as S, b as k, e as A, d as I } from "../_plugin-vue_export-helper-CXkSGj2f.js";
2
+ import { a as V, i as N, b as P } from "../i18n-CnN3ours.js";
3
+ import { B, N as T } from "../NavigationButton.ce-CJGPfdW7.js";
4
4
  const F = {
5
5
  "pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
6
6
  }, G = {
@@ -14,7 +14,7 @@ const F = {
14
14
  }, K = ["aria-level"], W = ["innerHTML"], J = {
15
15
  key: 1,
16
16
  class: "description"
17
- }, Q = /* @__PURE__ */ _({
17
+ }, Q = /* @__PURE__ */ C({
18
18
  __name: "SlideInfo.ce",
19
19
  props: {
20
20
  description: { type: String },
@@ -22,39 +22,39 @@ const F = {
22
22
  titleLevel: { type: Number },
23
23
  isActive: { type: Boolean }
24
24
  },
25
- setup(t) {
26
- const i = v(() => {
27
- if (!t.description) return !1;
28
- const s = [...t.description.matchAll(/<(\w+)[^>]*>/gm)];
29
- if (!s.length) return !1;
30
- const e = new RegExp(`</${s[0][1]}>`, "gm");
31
- return t.description.match(e);
25
+ setup(n) {
26
+ const i = h(() => {
27
+ if (!n.description) return !1;
28
+ const t = [...n.description.matchAll(/<(\w+)[^>]*>/gm)];
29
+ if (!t.length) return !1;
30
+ const s = new RegExp(`</${t[0][1]}>`, "gm");
31
+ return n.description.match(s);
32
32
  });
33
- return (s, e) => (n(), a("div", {
34
- class: j(["slide-info", { active: s.isActive }])
33
+ return (t, s) => (o(), l("div", {
34
+ class: j(["slide-info", { active: t.isActive }])
35
35
  }, [
36
- l("div", {
36
+ r("div", {
37
37
  role: "heading",
38
- "aria-level": s.titleLevel,
38
+ "aria-level": t.titleLevel,
39
39
  class: "title"
40
40
  }, [
41
- H(s.$slots, "pagination"),
42
- E(" " + m(s.title), 1)
41
+ R(t.$slots, "pagination"),
42
+ z(" " + g(t.title), 1)
43
43
  ], 8, K),
44
- i.value ? (n(), a("div", {
44
+ i.value ? (o(), l("div", {
45
45
  key: 0,
46
46
  class: "description",
47
- innerHTML: s.description
48
- }, null, 8, W)) : s.description ? (n(), a("p", J, m(s.description), 1)) : z("", !0)
47
+ innerHTML: t.description
48
+ }, null, 8, W)) : t.description ? (o(), l("p", J, g(t.description), 1)) : M("", !0)
49
49
  ], 2));
50
50
  }
51
- }), U = ".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}}", M = /* @__PURE__ */ h(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
51
+ }), U = ".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}}", E = /* @__PURE__ */ b(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
52
52
  key: 0,
53
53
  class: "license"
54
54
  }, ie = ["href"], te = {
55
55
  key: 1,
56
56
  class: "text-image-container"
57
- }, se = ["alt", "src", "height"], ne = ["innerHTML"], oe = ["innerHTML"], ae = /* @__PURE__ */ _({
57
+ }, ne = ["alt", "src", "height"], se = ["innerHTML"], oe = ["innerHTML"], ae = /* @__PURE__ */ C({
58
58
  __name: "Slide.ce",
59
59
  props: {
60
60
  slide: { type: Object },
@@ -66,56 +66,56 @@ const F = {
66
66
  type: { type: String },
67
67
  disableAnimation: { type: Boolean }
68
68
  },
69
- setup(t) {
70
- const i = y(t.isActive ? "on" : "off");
71
- R(() => t.isActive, (e) => {
72
- e ? (i.value = "initStart", window.setTimeout(() => {
73
- i.value === "initStart" && (i.value = "on");
74
- }, 20)) : (i.value = "initEnd", window.setTimeout(() => {
75
- i.value === "initEnd" && (i.value = "off");
69
+ setup(n) {
70
+ const i = window.matchMedia("(prefers-reduced-motion: reduce)"), t = n.disableAnimation ?? i.matches, s = w(n.isActive ? "on" : "off");
71
+ H(() => n.isActive, (e) => {
72
+ e ? (s.value = t ? "on" : "initStart", window.setTimeout(() => {
73
+ s.value === "initStart" && (s.value = "on");
74
+ }, 20)) : (s.value = t ? "off" : "initEnd", window.setTimeout(() => {
75
+ s.value === "initEnd" && (s.value = "off");
76
76
  }, 800));
77
77
  });
78
- const s = v(() => t.direction === 1);
79
- return (e, c) => (n(), a("div", {
78
+ const d = h(() => n.direction === 1);
79
+ return (e, y) => (o(), l("div", {
80
80
  role: "group",
81
- class: j(["slide", { active: e.isActive, [i.value]: i.value, "is-next": s.value, "disable-animation": e.disableAnimation }]),
81
+ class: j(["slide", { active: e.isActive, [s.value]: s.value, "is-next": d.value, "disable-animation": u(t) }]),
82
82
  "aria-hidden": !e.isActive,
83
83
  "aria-roledescription": e.$t("pix-carousel.slide"),
84
84
  "aria-label": e.label
85
85
  }, [
86
- e.type === "image" ? (n(), a("div", {
86
+ e.type === "image" ? (o(), l("div", {
87
87
  key: 0,
88
88
  class: "image-container",
89
89
  style: $(`aspect-ratio: ${e.aspectRatio}`)
90
90
  }, [
91
- l("img", {
91
+ r("img", {
92
92
  style: $(`max-width: ${e.slide.displayWidth}px`),
93
93
  alt: e.slide.image.alt,
94
94
  src: e.slide.image.src
95
95
  }, null, 12, Y),
96
- e.slide.license ? (n(), a("p", ee, [
97
- E(m(e.slide.license.attribution) + " / ", 1),
98
- l("a", {
96
+ e.slide.license ? (o(), l("p", ee, [
97
+ z(g(e.slide.license.attribution) + " / ", 1),
98
+ r("a", {
99
99
  href: e.slide.license.url,
100
100
  target: "_blank"
101
- }, m(e.slide.license.name), 9, ie)
102
- ])) : z("", !0)
103
- ], 4)) : e.type === "image-text" ? (n(), a("div", te, [
104
- l("img", {
101
+ }, g(e.slide.license.name), 9, ie)
102
+ ])) : M("", !0)
103
+ ], 4)) : e.type === "image-text" ? (o(), l("div", te, [
104
+ r("img", {
105
105
  alt: e.slide.image.alt,
106
106
  src: e.slide.image.src,
107
107
  height: e.slide.displayHeight
108
- }, null, 8, se),
109
- l("div", {
108
+ }, null, 8, ne),
109
+ r("div", {
110
110
  innerHTML: e.slide.text,
111
111
  class: "text-container"
112
- }, null, 8, ne)
113
- ])) : (n(), a("div", {
112
+ }, null, 8, se)
113
+ ])) : (o(), l("div", {
114
114
  key: 2,
115
115
  innerHTML: e.slide.text,
116
116
  class: "text-container"
117
117
  }, null, 8, oe)),
118
- f(M, {
118
+ m(E, {
119
119
  description: e.slide.description,
120
120
  title: e.slide.title,
121
121
  "is-active": e.isActive,
@@ -124,37 +124,37 @@ const F = {
124
124
  }, null, 8, ["description", "title", "is-active", "title-level"])
125
125
  ], 10, X));
126
126
  }
127
- }), le = ".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}}", re = /* @__PURE__ */ h(ae, [["styles", [le]]]), de = {}, ce = {
127
+ }), le = ".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}}", re = /* @__PURE__ */ b(ae, [["styles", [le]]]), de = {}, ce = {
128
128
  width: "25",
129
129
  height: "24",
130
130
  viewBox: "0 0 25 24",
131
131
  fill: "inherit",
132
132
  xmlns: "http://www.w3.org/2000/svg"
133
133
  };
134
- function pe(t, i) {
135
- return n(), a("svg", ce, [...i[0] || (i[0] = [
136
- l("path", {
134
+ function pe(n, i) {
135
+ return o(), l("svg", ce, [...i[0] || (i[0] = [
136
+ r("path", {
137
137
  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
138
  fill: "inherit"
139
139
  }, null, -1)
140
140
  ])]);
141
141
  }
142
- const ue = /* @__PURE__ */ h(de, [["render", pe]]), fe = {}, me = {
142
+ const ue = /* @__PURE__ */ b(de, [["render", pe]]), fe = {}, me = {
143
143
  width: "25",
144
144
  height: "24",
145
145
  viewBox: "0 0 25 24",
146
146
  fill: "inherit",
147
147
  xmlns: "http://www.w3.org/2000/svg"
148
148
  };
149
- function ge(t, i) {
150
- return n(), a("svg", me, [...i[0] || (i[0] = [
151
- l("path", {
149
+ function ge(n, i) {
150
+ return o(), l("svg", me, [...i[0] || (i[0] = [
151
+ r("path", {
152
152
  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
153
  fill: "inherit"
154
154
  }, null, -1)
155
155
  ])]);
156
156
  }
157
- const ve = /* @__PURE__ */ h(fe, [["render", ge]]), he = ["aria-roledescription"], be = ["id"], xe = { class: "footer" }, ye = { class: "control" }, _e = { class: "slide-info-container" }, we = { class: "pagination" }, Ce = /* @__PURE__ */ _({
157
+ const ve = /* @__PURE__ */ b(fe, [["render", ge]]), he = ["aria-roledescription"], be = ["id"], xe = { class: "footer" }, ye = { class: "control" }, _e = { class: "slide-info-container" }, we = { class: "pagination" }, Ce = /* @__PURE__ */ C({
158
158
  __name: "Carousel.ce",
159
159
  props: {
160
160
  randomSlides: { type: Boolean },
@@ -165,86 +165,86 @@ const ve = /* @__PURE__ */ h(fe, [["render", ge]]), he = ["aria-roledescription"
165
165
  disableLoop: { type: Boolean },
166
166
  aspectRatio: { type: Number }
167
167
  },
168
- setup(t) {
169
- const i = t, s = i.titleLevel ?? 2, e = v(() => i.randomSlides ? [...i.slides].sort(() => Math.round(Math.random()) === 0 ? -1 : 1) : i.slides), c = y(0), w = y(1), C = v(() => i.disableLoop && c.value === 0), L = v(() => i.disableLoop && c.value === i.slides.length - 1);
170
- function b(o) {
171
- w.value = o, c.value = (c.value - o + i.slides.length) % i.slides.length;
168
+ setup(n) {
169
+ const i = n, t = i.titleLevel ?? 2, s = h(() => i.randomSlides ? [...i.slides].sort(() => Math.round(Math.random()) === 0 ? -1 : 1) : i.slides), d = w(0), e = w(1), y = h(() => i.disableLoop && d.value === 0), L = h(() => i.disableLoop && d.value === i.slides.length - 1);
170
+ function x(a) {
171
+ e.value = a, d.value = (d.value - a + i.slides.length) % i.slides.length;
172
172
  }
173
- const g = V();
174
- return (o, r) => (n(), a("section", {
175
- "aria-roledescription": o.$t("pix-carousel.title")
173
+ const v = D();
174
+ return (a, c) => (o(), l("section", {
175
+ "aria-roledescription": a.$t("pix-carousel.title")
176
176
  }, [
177
- l("div", {
177
+ r("div", {
178
178
  "aria-live": "polite",
179
179
  class: "slides",
180
- id: u(g)
180
+ id: u(v)
181
181
  }, [
182
- f(B, {
182
+ m(B, {
183
183
  class: "carousel__nav previous",
184
- disabled: C.value,
185
- "aria-controls": u(g),
186
- onClick: r[0] || (r[0] = (d) => b(1)),
187
- label: o.$t("pix-carousel.previous"),
184
+ disabled: y.value,
185
+ "aria-controls": u(v),
186
+ onClick: c[0] || (c[0] = (p) => x(1)),
187
+ label: a.$t("pix-carousel.previous"),
188
188
  "tooltip-position": "right"
189
189
  }, {
190
- default: x(() => [
191
- f(ue, { "aria-hidden": "true" })
190
+ default: _(() => [
191
+ m(ue, { "aria-hidden": "true" })
192
192
  ]),
193
193
  _: 1
194
194
  }, 8, ["disabled", "aria-controls", "label"]),
195
- (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(re, {
196
- key: p,
197
- slide: d,
198
- direction: w.value,
199
- label: o.$t("pix-carousel.of", { currentSlide: p + 1, slideLength: e.value.length }),
200
- "is-active": c.value === p,
201
- "title-level": u(s),
202
- "aspect-ratio": o.aspectRatio,
203
- type: o.type,
204
- "disable-animation": o.disableAnimation
195
+ (o(!0), l(S, null, k(s.value, (p, f) => (o(), A(re, {
196
+ key: f,
197
+ slide: p,
198
+ direction: e.value,
199
+ label: a.$t("pix-carousel.of", { currentSlide: f + 1, slideLength: s.value.length }),
200
+ "is-active": d.value === f,
201
+ "title-level": u(t),
202
+ "aspect-ratio": a.aspectRatio,
203
+ type: a.type,
204
+ "disable-animation": a.disableAnimation
205
205
  }, null, 8, ["slide", "direction", "label", "is-active", "title-level", "aspect-ratio", "type", "disable-animation"]))), 128)),
206
- f(B, {
206
+ m(B, {
207
207
  class: "carousel__nav next",
208
208
  disabled: L.value,
209
- "aria-controls": u(g),
210
- onClick: r[1] || (r[1] = (d) => b(-1)),
211
- label: o.$t("pix-carousel.next"),
209
+ "aria-controls": u(v),
210
+ onClick: c[1] || (c[1] = (p) => x(-1)),
211
+ label: a.$t("pix-carousel.next"),
212
212
  "tooltip-position": "left"
213
213
  }, {
214
- default: x(() => [
215
- f(ve, { "aria-hidden": "true" })
214
+ default: _(() => [
215
+ m(ve, { "aria-hidden": "true" })
216
216
  ]),
217
217
  _: 1
218
218
  }, 8, ["disabled", "aria-controls", "label"])
219
219
  ], 8, be),
220
- l("div", xe, [
221
- l("div", ye, [
222
- f(T, {
223
- onClick: r[2] || (r[2] = (d) => b(1)),
224
- label: o.$t("pix-carousel.previous"),
225
- "aria-controls": u(g),
220
+ r("div", xe, [
221
+ r("div", ye, [
222
+ m(T, {
223
+ onClick: c[2] || (c[2] = (p) => x(1)),
224
+ label: a.$t("pix-carousel.previous"),
225
+ "aria-controls": u(v),
226
226
  direction: "previous",
227
- disabled: C.value
227
+ disabled: y.value
228
228
  }, null, 8, ["label", "aria-controls", "disabled"]),
229
- f(T, {
230
- onClick: r[3] || (r[3] = (d) => b(-1)),
231
- label: o.$t("pix-carousel.next"),
232
- "aria-controls": u(g),
229
+ m(T, {
230
+ onClick: c[3] || (c[3] = (p) => x(-1)),
231
+ label: a.$t("pix-carousel.next"),
232
+ "aria-controls": u(v),
233
233
  direction: "next",
234
234
  disabled: L.value
235
235
  }, null, 8, ["label", "aria-controls", "disabled"])
236
236
  ]),
237
- l("div", _e, [
238
- (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(M, {
239
- key: p,
240
- description: d.description,
241
- title: d.title,
242
- "title-level": u(s),
243
- "is-active": c.value === p,
237
+ r("div", _e, [
238
+ (o(!0), l(S, null, k(s.value, (p, f) => (o(), A(E, {
239
+ key: f,
240
+ description: p.description,
241
+ title: p.title,
242
+ "title-level": u(t),
243
+ "is-active": d.value === f,
244
244
  "aria-hidden": "true"
245
245
  }, {
246
- pagination: x(() => [
247
- l("span", we, m(p + 1) + " / " + m(e.value.length), 1)
246
+ pagination: _(() => [
247
+ r("span", we, g(f + 1) + " / " + g(s.value.length), 1)
248
248
  ]),
249
249
  _: 2
250
250
  }, 1032, ["description", "title", "title-level", "is-active"]))), 128))
@@ -252,10 +252,10 @@ const ve = /* @__PURE__ */ h(fe, [["render", ge]]), he = ["aria-roledescription"
252
252
  ])
253
253
  ], 8, he));
254
254
  }
255
- }), Le = "*{--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:rect(0,0,0,0);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}}", $e = /* @__PURE__ */ h(Ce, [["styles", [Le]]]);
256
- I(/* @__PURE__ */ Object.assign({ "./locales/en.json": F, "./locales/es.json": G, "./locales/fr.json": O, "./locales/it.json": Z, "./locales/nl.json": q })).catch((t) => console.error(t));
257
- window.customElements.define("pix-carousel", D($e, {
258
- configureApp(t) {
259
- N.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(P, { i18next: N });
255
+ }), Le = "*{--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:rect(0,0,0,0);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}}", $e = /* @__PURE__ */ b(Ce, [["styles", [Le]]]);
256
+ V(/* @__PURE__ */ Object.assign({ "./locales/en.json": F, "./locales/es.json": G, "./locales/fr.json": O, "./locales/it.json": Z, "./locales/nl.json": q })).catch((n) => console.error(n));
257
+ window.customElements.define("pix-carousel", I($e, {
258
+ configureApp(n) {
259
+ N.changeLanguage(document?.documentElement?.lang || navigator.language), n.use(P, { i18next: N });
260
260
  }
261
261
  }));
@@ -1,6 +1,6 @@
1
- import { a as H, r as y, z as k, v as m, h as S, c as a, o as i, f as s, I as A, q as c, t as u, F as f, b, J as E, g, x as C, H as L, y as F, B as P, _ as D, d as q } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
- import { a as G, i as w, b as J } from "../i18n-kZiLXTQh.js";
3
- import { N as j } from "../NavigationButton.ce-BPCs1QdC.js";
1
+ import { a as H, r as y, z as k, v as m, h as S, c as a, o as i, f as s, I as A, q as c, t as u, F as f, b, J as E, g, x as C, H as L, y as F, B as P, _ as D, d as q } from "../_plugin-vue_export-helper-CXkSGj2f.js";
2
+ import { a as G, i as w, b as J } from "../i18n-CnN3ours.js";
3
+ import { N as j } from "../NavigationButton.ce-CJGPfdW7.js";
4
4
  const R = {}, U = {}, K = {
5
5
  "pix-cursor": { confirm: "Valider", next: "Suivant", previous: "Précédent", selectAnOption: "Sélectionnez une option", youHaveChosen: "Vous avez choisi : { choice }" }
6
6
  }, Q = {}, W = {}, X = ["for"], Y = {
@@ -1,5 +1,5 @@
1
- import { a as k, c, o as r, f as t, y as b, t as d, x as C, _ as w, L as R, M as A, r as y, v as h, I as E, j as V, N as M, D as O, F as _, b as S, e as G, q as j, B as P, g as F, d as H } from "../_plugin-vue_export-helper-BihDtAH2.js";
2
- import { i as s, a as Q, b as U } from "../i18n-kZiLXTQh.js";
1
+ import { a as k, c, o as r, f as t, y as b, t as d, x as C, _ as w, M as R, N as A, r as y, v as h, I as E, j as V, O as M, D as O, F as _, b as S, e as G, q as j, B as P, g as F, d as H } from "../_plugin-vue_export-helper-CXkSGj2f.js";
2
+ import { i as s, a as Q, b as U } from "../i18n-CnN3ours.js";
3
3
  const W = {
4
4
  "qcm-deepfake": { options: ["une photo de sa chanteuse préférée", "une chanson de sa chanteuse préférée", "un enregistrement de Caroline qui chante", "une photo de Caroline", "un enregistrement de Caroline qui dit quelques phrases"], iaResultInfo: "Retrouvez ici les résultats du logiciel d'IA générative :", iaResultGenerated: "Résultat généré par le logiciel d’IA générative :", title: "Recréez la vidéo de Caroline", in: "Entrée", out: "Sortie", selectThreeElements: "Sélectionnez 3 éléments pour générer la vidéo :", generateVideo: "Générer la vidéo !", restart: "Recommencer", element_one: "élément", element_other: "éléments", generateVideoInfo_one: "Plus que {{count}} élément", generateVideoInfo_other: "Plus que {{count}} éléments", restartInfo: "Essayez avec de nouveaux éléments", success: { title: "Super !", description: "C'est bien la vidéo de Caroline? Vous avez utilisé les bons éléments." }, fail: { title: "Pas exactement…", description: "Le résultat ne convient pas. Recommencez en changeant les éléments en entrée." }, searchTitle: "Le logiciel d’IA générative crée la vidéo" }
5
5
  }, Z = ["aria-hidden"], J = ["aria-level"], K = ["src"], X = { class: "description" }, Y = ["src"], ee = ["aria-level"], te = /* @__PURE__ */ k({
@@ -136,15 +136,15 @@ const W = {
136
136
  title: s.t("qcm-deepfake.searchTitle")
137
137
  }
138
138
  ], q = h(() => l.value.length !== 3), T = h(() => i.value === "info" ? s.t("qcm-deepfake.generateVideo") : s.t("qcm-deepfake.restart")), D = h(() => i.value === "info" ? s.t("qcm-deepfake.generateVideoInfo", { count: u.length - l.value.length }) : s.t("qcm-deepfake.restartInfo"));
139
- function L() {
140
- return i.value === "info" ? z() : I();
139
+ function z() {
140
+ return i.value === "info" ? B() : I();
141
141
  }
142
142
  function I() {
143
143
  v.value.forEach((n) => {
144
144
  n.isChecked = !1;
145
145
  }), l.value = [], i.value = "info";
146
146
  }
147
- async function z() {
147
+ async function B() {
148
148
  if (q.value) return;
149
149
  const n = l.value.every((o) => $.includes(o.trim()));
150
150
  i.value = "search", await new Promise((o) => setTimeout(o, a.searchDelay)), n ? i.value = "success" : i.value = "fail";
@@ -171,7 +171,7 @@ const W = {
171
171
  ref_key: "optionsNode",
172
172
  ref: v,
173
173
  modelValue: l.value,
174
- "onUpdate:modelValue": o[0] || (o[0] = (B) => l.value = B),
174
+ "onUpdate:modelValue": o[0] || (o[0] = (L) => l.value = L),
175
175
  key: x,
176
176
  class: "left-side__options",
177
177
  option: f,
@@ -181,7 +181,7 @@ const W = {
181
181
  ]),
182
182
  t("div", me, [
183
183
  t("button", {
184
- onClick: P(L, ["prevent"]),
184
+ onClick: P(z, ["prevent"]),
185
185
  class: C(["left-side__button", { generate: i.value === "info" }]),
186
186
  "aria-disabled": q.value,
187
187
  "aria-describedby": "optionsSelectedInfo"
@@ -1,4 +1,4 @@
1
- import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-BihDtAH2.js";
1
+ import { s as Le, n as we, a as ve, i as Re } from "./_plugin-vue_export-helper-CXkSGj2f.js";
2
2
  const d = (o) => typeof o == "string", V = () => {
3
3
  let o, e;
4
4
  const t = new Promise((i, s) => {
package/dist/index.js CHANGED
@@ -9,3 +9,4 @@ import "./components/pix-cursor.ce.js.js";
9
9
  import "./components/complete-phrase.ce.js.js";
10
10
  import "./components/qcm-deepfake.ce.js.js";
11
11
  import "./components/pix-article.ce.js.js";
12
+ import "./components/calcul-impact.ce.js.js";
package/dist/metadata.js CHANGED
@@ -2,28 +2,30 @@ const a = {
2
2
  isInteractive: !0
3
3
  }, s = !0, i = {
4
4
  isInteractive: s
5
- }, n = !0, c = {
6
- isInteractive: n
7
- }, o = !1, _ = {
5
+ }, c = !0, n = {
6
+ isInteractive: c
7
+ }, o = !0, _ = {
8
8
  isInteractive: o
9
9
  }, r = !1, l = {
10
10
  isInteractive: r
11
- }, m = !0, v = {
11
+ }, m = !1, v = {
12
12
  isInteractive: m
13
13
  }, I = !0, p = {
14
14
  isInteractive: I
15
- }, g = !1, d = {
15
+ }, g = !0, u = {
16
16
  isInteractive: g
17
- }, u = !1, j = {
18
- isInteractive: u
19
- }, b = !0, $ = {
17
+ }, b = !1, d = {
20
18
  isInteractive: b
19
+ }, j = !1, $ = {
20
+ isInteractive: j
21
21
  }, x = !0, f = {
22
22
  isInteractive: x
23
- }, q = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.metadata.json": a, "./image-quiz/image-quiz.metadata.json": i, "./image-quiz/image-quizzes.metadata.json": c, "./message-conversation/message-conversation.metadata.json": _, "./pix-article/pix-article.metadata.json": l, "./pix-carousel/pix-carousel.metadata.json": v, "./pix-cursor/pix-cursor.metadata.json": p, "./pix-llm/llm-compare-messages.metadata.json": d, "./pix-llm/llm-messages.metadata.json": j, "./pix-llm/llm-prompt-select.metadata.json": $, "./qcm-deepfake/qcm-deepfake.metadata.json": f }), z = Object.fromEntries(Object.entries(q).map(([t, e]) => [
23
+ }, q = !0, z = {
24
+ isInteractive: q
25
+ }, O = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.metadata.json": a, "./complete-phrase/complete-phrase.metadata.json": i, "./image-quiz/image-quiz.metadata.json": n, "./image-quiz/image-quizzes.metadata.json": _, "./message-conversation/message-conversation.metadata.json": l, "./pix-article/pix-article.metadata.json": v, "./pix-carousel/pix-carousel.metadata.json": p, "./pix-cursor/pix-cursor.metadata.json": u, "./pix-llm/llm-compare-messages.metadata.json": d, "./pix-llm/llm-messages.metadata.json": $, "./pix-llm/llm-prompt-select.metadata.json": f, "./qcm-deepfake/qcm-deepfake.metadata.json": z }), h = Object.fromEntries(Object.entries(O).map(([t, e]) => [
24
26
  t.replace(/^.*\/([^/]+)\.metadata\.json$/, "$1"),
25
27
  e
26
28
  ]));
27
29
  export {
28
- z as metadata
30
+ h as metadata
29
31
  };
package/dist/schema.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import e from "joi";
2
2
  const n = e.object({
3
+ titleLevel: e.number().required()
4
+ }), a = e.object({
3
5
  titleLevel: e.number().required(),
4
6
  listOfProbabilityBarsLists: e.array().items(
5
7
  e.array().items(
@@ -28,18 +30,22 @@ const n = e.object({
28
30
  response: e.string().optional()
29
31
  }).required()
30
32
  ).required()
31
- }).required(), a = e.object({
33
+ }).required(), u = e.object({
32
34
  quizzes: e.array().items(i).required()
33
- }).required(), d = e.object({
35
+ }).required(), c = e.object({
34
36
  title: e.string().required(),
35
37
  messages: e.array().items(
36
38
  e.object({
37
39
  userName: e.string().required(),
38
40
  direction: e.string().valid("incoming", "outgoing").required(),
39
- content: e.string().required()
41
+ content: e.string().required(),
42
+ image: e.object({
43
+ src: e.string().required(),
44
+ alt: e.string().required()
45
+ }).unknown(!0).optional()
40
46
  })
41
47
  ).required()
42
- }).required(), u = e.object({
48
+ }).required(), d = e.object({
43
49
  titleLevel: e.number().required(),
44
50
  title: e.string().required(),
45
51
  author: e.string().required(),
@@ -47,11 +53,11 @@ const n = e.object({
47
53
  paragraphs: e.array().items(e.string().required()),
48
54
  highlightedSentence: e.string().required(),
49
55
  colorOfHighlightSentence: e.string().required()
50
- }), c = e.object({
56
+ }), l = e.object({
51
57
  name: e.string().allow("").required(),
52
58
  attribution: e.string().allow("").required(),
53
59
  url: e.string().allow("").required()
54
- }), l = e.object({
60
+ }), m = e.object({
55
61
  title: e.string().required(),
56
62
  description: e.string().allow("").required(),
57
63
  displayWidth: e.number().min(0).optional(),
@@ -59,12 +65,12 @@ const n = e.object({
59
65
  src: e.string().required(),
60
66
  alt: e.string().required()
61
67
  }).required(),
62
- license: c.optional()
63
- }), m = e.object({
68
+ license: l.optional()
69
+ }), g = e.object({
64
70
  title: e.string().required(),
65
71
  description: e.string().allow("").required(),
66
72
  text: e.string().required()
67
- }), g = e.object({
73
+ }), q = e.object({
68
74
  title: e.string().required(),
69
75
  description: e.string().allow("").required(),
70
76
  displayHeight: e.number().min(0).optional(),
@@ -73,13 +79,13 @@ const n = e.object({
73
79
  src: e.string().required(),
74
80
  alt: e.string().required()
75
81
  }).required()
76
- }), q = e.object({
82
+ }), b = e.object({
77
83
  type: e.string().valid("image", "image-text", "text").required(),
78
84
  slides: e.alternatives().conditional("type", {
79
85
  switch: [
80
- { is: "image", then: e.array().items(l) },
81
- { is: "image-text", then: e.array().items(g) },
82
- { is: "text", then: e.array().items(m) }
86
+ { is: "image", then: e.array().items(m) },
87
+ { is: "image-text", then: e.array().items(q) },
88
+ { is: "text", then: e.array().items(g) }
83
89
  ]
84
90
  }).required(),
85
91
  aspectRatio: e.number().min(0).required(),
@@ -87,7 +93,7 @@ const n = e.object({
87
93
  titleLevel: e.number().integer().min(0).max(6).optional(),
88
94
  disableAnimation: e.boolean().required(),
89
95
  disableLoop: e.boolean().optional()
90
- }).meta({ title: "pix-carousel" }).required(), b = e.object({
96
+ }).meta({ title: "pix-carousel" }).required(), p = e.object({
91
97
  options: e.array().items(e.object({
92
98
  label: e.string().required(),
93
99
  feedback: e.object({
@@ -98,25 +104,25 @@ const n = e.object({
98
104
  }), r = e.object({
99
105
  title: e.string().required(),
100
106
  llmName: e.string().required()
101
- }).required(), p = e.object({
107
+ }).required(), _ = e.object({
102
108
  direction: e.string().valid("inbound").required(),
103
109
  content: e.string().required()
104
- }).required(), _ = e.object({
110
+ }).required(), j = e.object({
105
111
  direction: e.string().valid("outbound").required(),
106
112
  content: e.string().required()
107
- }).required(), j = e.object({
113
+ }).required(), h = e.object({
108
114
  conversation1: r,
109
115
  conversation2: r,
110
116
  userName: e.string().required(),
111
117
  messages: e.array().items(
112
- e.alternatives(_, e.array().items(p).min(2).max(2).required())
118
+ e.alternatives(j, e.array().items(_).min(2).max(2).required())
113
119
  ).required()
114
120
  }).required(), t = e.object({
115
121
  direction: e.string().valid("inbound", "outbound").required(),
116
122
  content: e.string().required()
117
- }), h = e.object({
123
+ }), v = e.object({
118
124
  messages: e.array().items(t.required()).required()
119
- }).required(), v = e.object({
125
+ }).required(), x = e.object({
120
126
  speed: e.number().default(20).min(0).optional(),
121
127
  messages: e.array().items(t).required(),
122
128
  prompts: e.array().items(
@@ -125,16 +131,16 @@ const n = e.object({
125
131
  response: e.string().required()
126
132
  }).required()
127
133
  ).required()
128
- }).required(), x = e.object({
134
+ }).required(), y = e.object({
129
135
  titleLevel: e.number().optional(),
130
136
  successImage: e.string().required(),
131
137
  failImage: e.string().required(),
132
138
  infoImage: e.string().required(),
133
139
  searchImage: e.string().required()
134
- }), y = /* @__PURE__ */ Object.assign({ "./complete-phrase/complete-phrase.schema.js": n, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": a, "./message-conversation/message-conversation.schema.js": d, "./pix-article/pix-article.schema.js": u, "./pix-carousel/pix-carousel.schema.js": q, "./pix-cursor/pix-cursor.schema.js": b, "./pix-llm/llm-compare-messages.schema.js": j, "./pix-llm/llm-messages.schema.js": h, "./pix-llm/llm-prompt-select.schema.js": v, "./qcm-deepfake/qcm-deepfake.schema.js": x }), w = Object.fromEntries(Object.entries(y).map(([s, o]) => [
140
+ }), f = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./complete-phrase/complete-phrase.schema.js": a, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": u, "./message-conversation/message-conversation.schema.js": c, "./pix-article/pix-article.schema.js": d, "./pix-carousel/pix-carousel.schema.js": b, "./pix-cursor/pix-cursor.schema.js": p, "./pix-llm/llm-compare-messages.schema.js": h, "./pix-llm/llm-messages.schema.js": v, "./pix-llm/llm-prompt-select.schema.js": x, "./qcm-deepfake/qcm-deepfake.schema.js": y }), S = Object.fromEntries(Object.entries(f).map(([s, o]) => [
135
141
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
136
142
  o
137
143
  ]));
138
144
  export {
139
- w as schema
145
+ S as schema
140
146
  };