@1024pix/epreuves-components 0.10.0 → 0.10.1

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,5 +1,5 @@
1
1
  import { _ as b, c as n, o as t, f as s, a as m, q as d, v as g, e as r, x as l, g as u, t as p } from "./_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as f } from "./Loading.ce-BRzyhDRe.js";
2
+ import { L as f } from "./Loading.ce-BsBClsn3.js";
3
3
  const h = {}, C = {
4
4
  height: "1rem",
5
5
  width: "auto",
@@ -5,7 +5,7 @@ const n = ".loader{width:8px;aspect-ratio:1;border-radius:50%;animation:l5 1s in
5
5
  };
6
6
  function c(l, e) {
7
7
  return r(), a("div", d, e[0] || (e[0] = [
8
- s("p", { class: "sr-only" }, "Chargement...", -1)
8
+ s("p", { class: "sr-only" }, " Chargement... ", -1)
9
9
  ]));
10
10
  }
11
11
  const p = /* @__PURE__ */ o(t, [["render", c], ["styles", [n]]]);
@@ -1,6 +1,6 @@
1
1
  import { a as w, c as i, o as a, f as e, t as s, G as C, _ as x, r as p, g, F as f, b as v, v as P, e as B, d as A } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
2
  import { a as M, i as h, b as z } from "../i18n-DZYcdfDF.js";
3
- import { L as y } from "../LLMMessage.ce-DBgXmxn9.js";
3
+ import { L as y } from "../LLMMessage.ce-DUUayymi.js";
4
4
  const N = {
5
5
  "complete-phrase": { iaSuggestions: "🧠 Suggestions de l'IA", explanation: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le mot {{name}} a une probabilité de {{percent}}%", clickHereButton: "Cliquez ici pour voir ce que l'IA va compléter", successfullyCompletedSentence: "🎉 Phrase complétée avec succès !" }
6
6
  }, I = { class: "probability-bar" }, T = { "aria-hidden": "true" }, q = { class: "sr-only" }, E = /* @__PURE__ */ w({
@@ -1,5 +1,5 @@
1
1
  import { a as m, c as r, o as a, f as e, t as n, F as t, b as p, g as i, _ as c, d as g } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as l } from "../LLMMessage.ce-DBgXmxn9.js";
2
+ import { L as l } from "../LLMMessage.ce-DUUayymi.js";
3
3
  import { p as u } from "../shadow-dom-BdDj1I6f.js";
4
4
  const f = {
5
5
  class: "header",
@@ -1,5 +1,5 @@
1
1
  import { a as m, k as i, l as p, c as o, o as e, F as d, b as g, e as u, _ as f, d as h } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as _ } from "../LLMMessage.ce-DBgXmxn9.js";
2
+ import { L as _ } from "../LLMMessage.ce-DUUayymi.js";
3
3
  import { p as x } from "../shadow-dom-BdDj1I6f.js";
4
4
  const b = {
5
5
  class: "llm-messages",
@@ -1,5 +1,5 @@
1
1
  import { a as k, r as b, q as D, E as C, c as r, o as t, v as x, x as _, f as y, j as w, t as h, g as $, F as v, b as M, _ as N, D as E, e as B, d as T } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { L as V } from "../Loading.ce-BRzyhDRe.js";
2
+ import { L as V } from "../Loading.ce-BsBClsn3.js";
3
3
  const F = ["part"], L = {
4
4
  key: 1,
5
5
  class: "message__loader message__content",
@@ -1,20 +1,20 @@
1
- import { a as b, q as _, c as a, o as s, v as N, f as l, x as E, H as M, j as T, t as m, _ as v, r as y, C as z, g as u, G as C, y as H, I as x, B as p, F as L, b as $, e as S, d as R } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
- import { a as D, i as k, b as I } from "../i18n-DZYcdfDF.js";
3
- import { B as A, N as B } from "../NavigationButton.ce-RaQYJjPs.js";
4
- const V = {
1
+ import { a as _, q as v, c as a, o as n, v as j, f as l, x as E, H, j as M, t as m, _ as h, r as y, C as R, g as f, G as $, y as I, I as x, B as u, F as S, b as k, e as A, d as V } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { a as D, i as N, b as P } from "../i18n-DZYcdfDF.js";
3
+ import { B, N as T } from "../NavigationButton.ce-RaQYJjPs.js";
4
+ const F = {
5
5
  "pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
6
- }, F = {
7
- "pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
8
6
  }, G = {
7
+ "pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
8
+ }, O = {
9
9
  "pix-carousel": { license: "Licence de l’image", of: "{{ currentSlide }} sur {{ slideLength }}", next: "Suivant", previous: "Précédent", slide: "Diapositive", title: "Carrousel" }
10
- }, P = {
10
+ }, Z = {
11
11
  "pix-carousel": { license: "Licenza d'immagine", next: "Avanti", of: "{{ currentSlide }} di {{ slideLength }}", previous: "Precedente", slide: "Diapositiva", title: "Galleria" }
12
- }, O = {
12
+ }, q = {
13
13
  "pix-carousel": { license: "Afbeeldingslicentie", next: "Volgende", of: "{{ currentSlide }} van {{ slideLength }}", previous: "Vorige", slide: "Dia", title: "Carrousel" }
14
- }, Z = ["aria-level"], q = ["innerHTML"], W = {
14
+ }, W = ["aria-level"], J = ["innerHTML"], K = {
15
15
  key: 1,
16
16
  class: "description"
17
- }, J = /* @__PURE__ */ b({
17
+ }, Q = /* @__PURE__ */ _({
18
18
  __name: "SlideInfo.ce",
19
19
  props: {
20
20
  description: { type: String },
@@ -23,38 +23,38 @@ const V = {
23
23
  isActive: { type: Boolean }
24
24
  },
25
25
  setup(t) {
26
- const i = _(() => {
26
+ const i = v(() => {
27
27
  if (!t.description) return !1;
28
- const n = [...t.description.matchAll(/<(\w+)[^>]*>/gm)];
29
- if (!n.length) return !1;
30
- const e = new RegExp(`</${n[0][1]}>`, "gm");
28
+ const s = [...t.description.matchAll(/<(\w+)[^>]*>/gm)];
29
+ if (!s.length) return !1;
30
+ const e = new RegExp(`</${s[0][1]}>`, "gm");
31
31
  return t.description.match(e);
32
32
  });
33
- return (n, e) => (s(), a("div", {
34
- class: N(["slide-info", { active: n.isActive }])
33
+ return (s, e) => (n(), a("div", {
34
+ class: j(["slide-info", { active: s.isActive }])
35
35
  }, [
36
36
  l("div", {
37
37
  role: "heading",
38
- "aria-level": n.titleLevel,
38
+ "aria-level": s.titleLevel,
39
39
  class: "title"
40
40
  }, [
41
- M(n.$slots, "pagination"),
42
- T(" " + m(n.title), 1)
43
- ], 8, Z),
44
- i.value ? (s(), a("div", {
41
+ H(s.$slots, "pagination"),
42
+ M(" " + m(s.title), 1)
43
+ ], 8, W),
44
+ i.value ? (n(), a("div", {
45
45
  key: 0,
46
46
  class: "description",
47
- innerHTML: n.description
48
- }, null, 8, q)) : n.description ? (s(), a("p", W, m(n.description), 1)) : E("", !0)
47
+ innerHTML: s.description
48
+ }, null, 8, J)) : s.description ? (n(), a("p", K, m(s.description), 1)) : E("", !0)
49
49
  ], 2));
50
50
  }
51
- }), K = ".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}}", j = /* @__PURE__ */ v(J, [["styles", [K]]]), Q = ["aria-hidden", "aria-roledescription", "aria-label"], U = ["alt", "src"], X = {
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}}", z = /* @__PURE__ */ h(Q, [["styles", [U]]]), X = ["aria-hidden", "aria-roledescription", "aria-label"], Y = ["alt", "src"], ee = {
52
52
  key: 0,
53
53
  class: "license"
54
- }, Y = ["href"], ee = {
54
+ }, ie = ["href"], te = {
55
55
  key: 1,
56
56
  class: "text-image-container"
57
- }, ie = ["alt", "src", "height"], te = ["innerHTML"], ne = ["innerHTML"], se = /* @__PURE__ */ b({
57
+ }, se = ["alt", "src", "height"], ne = ["innerHTML"], oe = ["innerHTML"], ae = /* @__PURE__ */ _({
58
58
  __name: "Slide.ce",
59
59
  props: {
60
60
  slide: { type: Object },
@@ -68,93 +68,93 @@ const V = {
68
68
  },
69
69
  setup(t) {
70
70
  const i = y(t.isActive ? "on" : "off");
71
- z(() => t.isActive, (e) => {
71
+ R(() => t.isActive, (e) => {
72
72
  e ? (i.value = "initStart", window.setTimeout(() => {
73
73
  i.value === "initStart" && (i.value = "on");
74
74
  }, 20)) : (i.value = "initEnd", window.setTimeout(() => {
75
75
  i.value === "initEnd" && (i.value = "off");
76
76
  }, 800));
77
77
  });
78
- const n = _(() => t.direction === 1);
79
- return (e, f) => (s(), a("div", {
78
+ const s = v(() => t.direction === 1);
79
+ return (e, c) => (n(), a("div", {
80
80
  role: "group",
81
- class: N(["slide", { active: e.isActive, [i.value]: i.value, "is-next": n.value, "disable-animation": e.disableAnimation }]),
81
+ class: j(["slide", { active: e.isActive, [i.value]: i.value, "is-next": s.value, "disable-animation": e.disableAnimation }]),
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" ? (s(), a("div", {
86
+ e.type === "image" ? (n(), a("div", {
87
87
  key: 0,
88
88
  class: "image-container",
89
- style: C(`aspect-ratio: ${e.aspectRatio}`)
89
+ style: $(`aspect-ratio: ${e.aspectRatio}`)
90
90
  }, [
91
91
  l("img", {
92
- style: C(`max-width: ${e.slide.displayWidth}px`),
92
+ style: $(`max-width: ${e.slide.displayWidth}px`),
93
93
  alt: e.slide.image.alt,
94
94
  src: e.slide.image.src
95
- }, null, 12, U),
96
- e.slide.license ? (s(), a("p", X, [
97
- T(m(e.slide.license.attribution) + " / ", 1),
95
+ }, null, 12, Y),
96
+ e.slide.license ? (n(), a("p", ee, [
97
+ M(m(e.slide.license.attribution) + " / ", 1),
98
98
  l("a", {
99
99
  href: e.slide.license.url,
100
100
  target: "_blank"
101
- }, m(e.slide.license.name), 9, Y)
101
+ }, m(e.slide.license.name), 9, ie)
102
102
  ])) : E("", !0)
103
- ], 4)) : e.type === "image-text" ? (s(), a("div", ee, [
103
+ ], 4)) : e.type === "image-text" ? (n(), a("div", te, [
104
104
  l("img", {
105
105
  alt: e.slide.image.alt,
106
106
  src: e.slide.image.src,
107
107
  height: e.slide.displayHeight
108
- }, null, 8, ie),
108
+ }, null, 8, se),
109
109
  l("div", {
110
110
  innerHTML: e.slide.text,
111
111
  class: "text-container"
112
- }, null, 8, te)
113
- ])) : (s(), a("div", {
112
+ }, null, 8, ne)
113
+ ])) : (n(), a("div", {
114
114
  key: 2,
115
115
  innerHTML: e.slide.text,
116
116
  class: "text-container"
117
- }, null, 8, ne)),
118
- u(j, {
117
+ }, null, 8, oe)),
118
+ f(z, {
119
119
  description: e.slide.description,
120
120
  title: e.slide.title,
121
121
  "is-active": e.isActive,
122
122
  "title-level": e.titleLevel,
123
123
  class: "sr-only"
124
124
  }, null, 8, ["description", "title", "is-active", "title-level"])
125
- ], 10, Q));
125
+ ], 10, X));
126
126
  }
127
- }), oe = ".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}}", ae = /* @__PURE__ */ v(se, [["styles", [oe]]]), le = {}, re = {
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 = {
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 de(t, i) {
135
- return s(), a("svg", re, i[0] || (i[0] = [
134
+ function pe(t, i) {
135
+ return n(), a("svg", ce, i[0] || (i[0] = [
136
136
  l("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 ce = /* @__PURE__ */ v(le, [["render", de]]), pe = {}, ue = {
142
+ const ue = /* @__PURE__ */ h(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 me(t, i) {
150
- return s(), a("svg", ue, i[0] || (i[0] = [
149
+ function ge(t, i) {
150
+ return n(), a("svg", me, i[0] || (i[0] = [
151
151
  l("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 fe = /* @__PURE__ */ v(pe, [["render", me]]), ge = ["aria-roledescription"], ve = ["id"], he = { class: "footer" }, xe = { class: "control" }, ye = { class: "slide-info-container" }, be = { class: "tagination" }, _e = /* @__PURE__ */ b({
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__ */ _({
158
158
  __name: "Carousel.ce",
159
159
  props: {
160
160
  randomSlides: { type: Boolean },
@@ -162,95 +162,100 @@ const fe = /* @__PURE__ */ v(pe, [["render", me]]), ge = ["aria-roledescription"
162
162
  slides: { type: Array },
163
163
  titleLevel: { type: Number },
164
164
  disableAnimation: { type: Boolean },
165
+ disableLoop: { type: Boolean },
165
166
  aspectRatio: { type: Number }
166
167
  },
167
168
  setup(t) {
168
- const i = t, n = i.titleLevel ?? 2, e = _(() => i.randomSlides ? [...i.slides].sort(() => Math.round(Math.random()) === 0 ? -1 : 1) : i.slides), f = y(0), w = y(1);
169
- function h(o) {
170
- w.value = o, f.value = (f.value - o + i.slides.length) % i.slides.length;
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;
171
172
  }
172
- const g = H();
173
- return (o, r) => (s(), a("section", {
173
+ const g = I();
174
+ return (o, r) => (n(), a("section", {
174
175
  "aria-roledescription": o.$t("pix-carousel.title")
175
176
  }, [
176
177
  l("div", {
177
178
  "aria-live": "polite",
178
179
  class: "slides",
179
- id: p(g)
180
+ id: u(g)
180
181
  }, [
181
- u(A, {
182
+ f(B, {
182
183
  class: "carousel__nav previous",
183
- "aria-controls": p(g),
184
- onClick: r[0] || (r[0] = (d) => h(1)),
184
+ disabled: C.value,
185
+ "aria-controls": u(g),
186
+ onClick: r[0] || (r[0] = (d) => b(1)),
185
187
  label: o.$t("pix-carousel.previous"),
186
188
  "tooltip-position": "right"
187
189
  }, {
188
190
  default: x(() => [
189
- u(ce, { "aria-hidden": "true" })
191
+ f(ue, { "aria-hidden": "true" })
190
192
  ]),
191
193
  _: 1
192
- }, 8, ["aria-controls", "label"]),
193
- (s(!0), a(L, null, $(e.value, (d, c) => (s(), S(ae, {
194
- key: c,
194
+ }, 8, ["disabled", "aria-controls", "label"]),
195
+ (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(re, {
196
+ key: p,
195
197
  slide: d,
196
198
  direction: w.value,
197
- label: o.$t("pix-carousel.of", { currentSlide: c + 1, slideLength: e.value.length }),
198
- "is-active": f.value === c,
199
- "title-level": p(n),
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),
200
202
  "aspect-ratio": o.aspectRatio,
201
203
  type: o.type,
202
204
  "disable-animation": o.disableAnimation
203
205
  }, null, 8, ["slide", "direction", "label", "is-active", "title-level", "aspect-ratio", "type", "disable-animation"]))), 128)),
204
- u(A, {
206
+ f(B, {
205
207
  class: "carousel__nav next",
206
- "aria-controls": p(g),
207
- onClick: r[1] || (r[1] = (d) => h(-1)),
208
+ disabled: L.value,
209
+ "aria-controls": u(g),
210
+ onClick: r[1] || (r[1] = (d) => b(-1)),
208
211
  label: o.$t("pix-carousel.next"),
209
212
  "tooltip-position": "left"
210
213
  }, {
211
214
  default: x(() => [
212
- u(fe, { "aria-hidden": "true" })
215
+ f(ve, { "aria-hidden": "true" })
213
216
  ]),
214
217
  _: 1
215
- }, 8, ["aria-controls", "label"])
216
- ], 8, ve),
217
- l("div", he, [
218
- l("div", xe, [
219
- u(B, {
220
- onClick: r[2] || (r[2] = (d) => h(1)),
218
+ }, 8, ["disabled", "aria-controls", "label"])
219
+ ], 8, be),
220
+ l("div", xe, [
221
+ l("div", ye, [
222
+ f(T, {
223
+ onClick: r[2] || (r[2] = (d) => b(1)),
221
224
  label: o.$t("pix-carousel.previous"),
222
- "aria-controls": p(g),
223
- direction: "previous"
224
- }, null, 8, ["label", "aria-controls"]),
225
- u(B, {
226
- onClick: r[3] || (r[3] = (d) => h(-1)),
225
+ "aria-controls": u(g),
226
+ direction: "previous",
227
+ disabled: C.value
228
+ }, null, 8, ["label", "aria-controls", "disabled"]),
229
+ f(T, {
230
+ onClick: r[3] || (r[3] = (d) => b(-1)),
227
231
  label: o.$t("pix-carousel.next"),
228
- "aria-controls": p(g),
229
- direction: "next"
230
- }, null, 8, ["label", "aria-controls"])
232
+ "aria-controls": u(g),
233
+ direction: "next",
234
+ disabled: L.value
235
+ }, null, 8, ["label", "aria-controls", "disabled"])
231
236
  ]),
232
- l("div", ye, [
233
- (s(!0), a(L, null, $(e.value, (d, c) => (s(), S(j, {
234
- key: c,
237
+ l("div", _e, [
238
+ (n(!0), a(S, null, k(e.value, (d, p) => (n(), A(z, {
239
+ key: p,
235
240
  description: d.description,
236
241
  title: d.title,
237
- "title-level": p(n),
238
- "is-active": f.value === c,
242
+ "title-level": u(s),
243
+ "is-active": c.value === p,
239
244
  "aria-hidden": "true"
240
245
  }, {
241
246
  pagination: x(() => [
242
- l("span", be, m(c + 1) + " / " + m(e.value.length), 1)
247
+ l("span", we, m(p + 1) + " / " + m(e.value.length), 1)
243
248
  ]),
244
249
  _: 2
245
250
  }, 1032, ["description", "title", "title-level", "is-active"]))), 128))
246
251
  ])
247
252
  ])
248
- ], 8, ge));
253
+ ], 8, he));
249
254
  }
250
- }), we = "*{--pix-neutral-0: white;--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}.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 .slide-info-container{display:grid;grid-template-columns:1fr}.footer .slide-info-container .tagination{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}}", Ce = /* @__PURE__ */ v(_e, [["styles", [we]]]);
251
- D(/* @__PURE__ */ Object.assign({ "./locales/en.json": V, "./locales/es.json": F, "./locales/fr.json": G, "./locales/it.json": P, "./locales/nl.json": O })).catch((t) => console.error(t));
252
- window.customElements.define("pix-carousel", R(Ce, {
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
+ D(/* @__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", V($e, {
253
258
  configureApp(t) {
254
- k.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(I, { i18next: k });
259
+ N.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(P, { i18next: N });
255
260
  }
256
261
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",