@1024pix/epreuves-components 2.0.0 → 2.1.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,21 +1,29 @@
1
- import { d as L, k as x, c as s, o as n, D as M, f as l, E as T, L as D, A as z, t as v, _ as h, r as C, K as I, G as u, y as m, x as R, J as V, M as w, F as S, a as k, b as A, e as P } from "../_plugin-vue_export-helper-BGEtPlxS.js";
2
- import { a as F, i as N, b as G } from "../i18n-D3E2CT0o.js";
3
- import { B, N as j } from "../NavigationButton.ce-BUeEdL4x.js";
4
- import { u as _, a as O } from "../normalize-props-AlmAfi_u.js";
5
- const W = {
1
+ import { d as S, c as n, o as t, D as M, f as s, E as L, L as R, A as z, t as g, G as l, _ as h, r as $, K as V, k as w, y as m, x as k, J as P, M as _, F as A, a as N, b as T, e as F } from "../_plugin-vue_export-helper-BGEtPlxS.js";
2
+ import { a as G, i as B, b as O } from "../i18n-D3E2CT0o.js";
3
+ import { B as j, N as D } from "../NavigationButton.ce-BUeEdL4x.js";
4
+ import { u as C, a as W } from "../normalize-props-AlmAfi_u.js";
5
+ const Z = {
6
6
  "pix-carousel": { license: "Image license", next: "Next", of: "{{ currentSlide }} of {{ slideLength }}", previous: "Previous", slide: "Slide", title: "Carousel" }
7
- }, Z = {}, J = {
7
+ }, J = {}, K = {
8
8
  "pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
9
- }, K = {
10
- "pix-carousel": { license: "Licence de l’image", of: "{{ currentSlide }} sur {{ slideLength }}", next: "Suivant", previous: "Précédent", slide: "Diapositive", title: "Carrousel" }
11
9
  }, Y = {
12
- "pix-carousel": { license: "Licenza d'immagine", next: "Avanti", of: "{{ currentSlide }} di {{ slideLength }}", previous: "Precedente", slide: "Diapositiva", title: "Galleria" }
10
+ "pix-carousel": { license: "Licence de l’image", of: "{{ currentSlide }} sur {{ slideLength }}", next: "Suivant", previous: "Précédent", slide: "Diapositive", title: "Carrousel" }
13
11
  }, q = {
12
+ "pix-carousel": { license: "Licenza d'immagine", next: "Avanti", of: "{{ currentSlide }} di {{ slideLength }}", previous: "Precedente", slide: "Diapositiva", title: "Galleria" }
13
+ }, Q = {
14
14
  "pix-carousel": { license: "Afbeeldingslicentie", next: "Volgende", of: "{{ currentSlide }} van {{ slideLength }}", previous: "Vorige", slide: "Dia", title: "Carrousel" }
15
- }, Q = ["aria-level"], U = ["innerHTML"], X = {
15
+ };
16
+ function E(e) {
17
+ if (!e) return !1;
18
+ const i = [...e.matchAll(/<(\w+)[^>]*>/gm)];
19
+ if (!i.length) return !1;
20
+ const r = new RegExp(`</?${i[0][1]}/?>`, "gm");
21
+ return e.match(r);
22
+ }
23
+ const U = ["aria-level"], X = ["innerHTML"], ee = {
16
24
  key: 1,
17
25
  class: "description"
18
- }, ee = /* @__PURE__ */ L({
26
+ }, ie = /* @__PURE__ */ S({
19
27
  __name: "SlideInfo.ce",
20
28
  props: {
21
29
  description: { type: String },
@@ -24,41 +32,34 @@ const W = {
24
32
  isActive: { type: Boolean }
25
33
  },
26
34
  setup(e) {
27
- const i = x(() => {
28
- if (!e.description) return !1;
29
- const a = [...e.description.matchAll(/<(\w+)[^>]*>/gm)];
30
- if (!a.length) return !1;
31
- const t = new RegExp(`</?${a[0][1]}/?>`, "gm");
32
- return e.description.match(t);
33
- });
34
- return (a, t) => (n(), s("div", {
35
+ return (i, r) => (t(), n("div", {
35
36
  class: M(["slide-info", { active: e.isActive }])
36
37
  }, [
37
- l("div", {
38
+ s("div", {
38
39
  role: "heading",
39
40
  "aria-level": e.titleLevel,
40
41
  class: "title"
41
42
  }, [
42
- D(a.$slots, "pagination"),
43
- z(" " + v(e.title), 1)
44
- ], 8, Q),
45
- i.value ? (n(), s("div", {
43
+ R(i.$slots, "pagination"),
44
+ z(" " + g(e.title), 1)
45
+ ], 8, U),
46
+ l(E)(e.description) ? (t(), n("div", {
46
47
  key: 0,
47
48
  class: "description",
48
49
  innerHTML: e.description
49
- }, null, 8, U)) : e.description ? (n(), s("p", X, v(e.description), 1)) : T("", !0)
50
+ }, null, 8, X)) : e.description ? (t(), n("p", ee, g(e.description), 1)) : L("", !0)
50
51
  ], 2));
51
52
  }
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{font-size:1.25rem;font-family:Nunito,sans-serif;font-style:normal;font-weight:700;line-height:1.75rem;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__ */ h(ee, [["styles", [ie]]]), te = ["aria-hidden", "aria-roledescription", "aria-label"], ne = {
53
+ }), te = ".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{font-size:1.25rem;font-family:Nunito,sans-serif;font-style:normal;font-weight:700;line-height:1.75rem;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(ie, [["styles", [te]]]), ne = ["aria-hidden", "aria-roledescription", "aria-label"], ae = {
53
54
  key: 0,
54
55
  class: "image-container"
55
- }, se = ["alt", "src"], le = {
56
+ }, le = ["alt", "src"], se = {
56
57
  key: 0,
57
58
  class: "license"
58
- }, ae = ["href"], oe = {
59
+ }, oe = ["href"], re = { class: "img-container" }, de = ["alt", "src", "height"], ce = ["innerHTML"], ue = {
59
60
  key: 1,
60
- class: "text-image-container"
61
- }, re = ["alt", "src", "height"], de = ["innerHTML"], ce = ["innerHTML"], ue = /* @__PURE__ */ L({
61
+ class: "text-container"
62
+ }, pe = ["innerHTML"], me = /* @__PURE__ */ S({
62
63
  __name: "Slide.ce",
63
64
  props: {
64
65
  slide: { type: Object },
@@ -67,93 +68,101 @@ const W = {
67
68
  label: { type: String },
68
69
  direction: { type: Number },
69
70
  type: { type: String },
70
- disableAnimation: { type: Boolean }
71
+ disableAnimation: { type: Boolean },
72
+ imageTextDisplay: { default: "1:2", type: String }
71
73
  },
72
74
  setup(e) {
73
- const i = window.matchMedia("(prefers-reduced-motion: reduce)"), a = e.disableAnimation ?? i.matches, t = C(e.isActive ? "on" : "off");
74
- I(() => e.isActive, (f) => {
75
- f ? (t.value = a ? "on" : "initStart", window.setTimeout(() => {
76
- t.value === "initStart" && (t.value = "on");
77
- }, 20)) : (t.value = a ? "off" : "initEnd", window.setTimeout(() => {
78
- t.value === "initEnd" && (t.value = "off");
75
+ const i = window.matchMedia("(prefers-reduced-motion: reduce)"), r = e.disableAnimation ?? i.matches, a = $(e.isActive ? "on" : "off"), [d, y] = e.imageTextDisplay.split(":").map(Number);
76
+ V(() => e.isActive, (f) => {
77
+ f ? (a.value = r ? "on" : "initStart", window.setTimeout(() => {
78
+ a.value === "initStart" && (a.value = "on");
79
+ }, 20)) : (a.value = r ? "off" : "initEnd", window.setTimeout(() => {
80
+ a.value === "initEnd" && (a.value = "off");
79
81
  }, 800));
80
82
  });
81
- const r = x(() => e.direction === 1);
82
- return (f, y) => (n(), s("div", {
83
+ const b = w(() => e.direction === 1);
84
+ return (f, v) => (t(), n("div", {
83
85
  role: "group",
84
- class: M(["slide", { active: e.isActive, [t.value]: t.value, "is-next": r.value, "disable-animation": u(a) }]),
86
+ class: M(["slide", { active: e.isActive, [a.value]: a.value, "is-next": b.value, "disable-animation": l(r) }]),
85
87
  "aria-hidden": !e.isActive,
86
88
  "aria-roledescription": f.$t("pix-carousel.slide"),
87
89
  "aria-label": e.label
88
90
  }, [
89
- e.type === "image" ? (n(), s("div", ne, [
90
- l("img", {
91
- style: R(`max-width: ${e.slide.displayWidth}px`),
91
+ e.type === "image" ? (t(), n("div", ae, [
92
+ s("img", {
93
+ style: k(`max-width: ${e.slide.displayWidth}px`),
92
94
  alt: e.slide.image.alt,
93
95
  src: e.slide.image.src
94
- }, null, 12, se),
95
- e.slide.license ? (n(), s("p", le, [
96
- z(v(e.slide.license.attribution) + " / ", 1),
97
- l("a", {
96
+ }, null, 12, le),
97
+ e.slide.license ? (t(), n("p", se, [
98
+ z(g(e.slide.license.attribution) + " / ", 1),
99
+ s("a", {
98
100
  href: e.slide.license.url,
99
101
  target: "_blank"
100
- }, v(e.slide.license.name), 9, ae)
101
- ])) : T("", !0)
102
- ])) : e.type === "image-text" ? (n(), s("div", oe, [
103
- l("img", {
104
- alt: e.slide.image.alt,
105
- src: e.slide.image.src,
106
- height: e.slide.displayHeight
107
- }, null, 8, re),
108
- l("div", {
109
- innerHTML: e.slide.text,
110
- class: "text-container"
111
- }, null, 8, de)
112
- ])) : (n(), s("div", {
102
+ }, g(e.slide.license.name), 9, oe)
103
+ ])) : L("", !0)
104
+ ])) : e.type === "image-text" ? (t(), n("div", {
105
+ key: 1,
106
+ class: "text-image-container",
107
+ style: k({ "--image-display": l(d), "--text-display": l(y) })
108
+ }, [
109
+ s("div", re, [
110
+ s("img", {
111
+ alt: e.slide.image.alt,
112
+ src: e.slide.image.src,
113
+ height: e.slide.displayHeight
114
+ }, null, 8, de)
115
+ ]),
116
+ l(E)(e.slide.text) ? (t(), n("div", {
117
+ key: 0,
118
+ class: "text-container",
119
+ innerHTML: e.slide.text
120
+ }, null, 8, ce)) : e.slide.text ? (t(), n("p", ue, g(e.slide.text), 1)) : L("", !0)
121
+ ], 4)) : (t(), n("div", {
113
122
  key: 2,
114
123
  innerHTML: e.slide.text,
115
124
  class: "text-container"
116
- }, null, 8, ce)),
117
- m(E, {
125
+ }, null, 8, pe)),
126
+ m(H, {
118
127
  description: e.slide.description,
119
128
  title: e.slide.title,
120
129
  "is-active": e.isActive,
121
130
  "title-level": e.titleLevel,
122
131
  class: "sr-only"
123
132
  }, null, 8, ["description", "title", "is-active", "title-level"])
124
- ], 10, te));
133
+ ], 10, ne));
125
134
  }
126
- }), pe = ".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:890px;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;width:95%}.text-image-container{padding:16px}}@media(prefers-reduced-motion:reduce){.slide{transition:none}}", me = /* @__PURE__ */ h(ue, [["styles", [pe]]]), fe = {}, ve = {
135
+ }), ge = ".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:890px;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:16px;filter:drop-shadow(0px 8px 12px rgba(0,0,0,.2));border-radius:16px;background:#fff}.text-image-container .img-container{width:calc(var(--image-display) / (var(--image-display) + var(--text-display)) * 100%);display:flex;justify-content:center;align-items:center}.text-image-container .img-container img{max-width:100%;width:auto;height:auto}.text-image-container .text-container{width:calc(var(--text-display) / (var(--image-display) + var(--text-display)) * 100%)}.text-image-container .text-container>*{margin:0}@media only screen and (max-width:576px){.license{font-size:.5rem}.image-container img{border-radius:8px;width:95%}.text-image-container{flex-direction:column}.text-image-container .img-container,.text-image-container .text-container{width:100%}}@media(prefers-reduced-motion:reduce){.slide{transition:none}}", fe = /* @__PURE__ */ h(me, [["styles", [ge]]]), ve = {}, xe = {
127
136
  width: "25",
128
137
  height: "24",
129
138
  viewBox: "0 0 25 24",
130
139
  fill: "inherit",
131
140
  xmlns: "http://www.w3.org/2000/svg"
132
141
  };
133
- function ge(e, i) {
134
- return n(), s("svg", ve, [...i[0] || (i[0] = [
135
- l("path", {
142
+ function he(e, i) {
143
+ return t(), n("svg", xe, [...i[0] || (i[0] = [
144
+ s("path", {
136
145
  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",
137
146
  fill: "inherit"
138
147
  }, null, -1)
139
148
  ])]);
140
149
  }
141
- const xe = /* @__PURE__ */ h(fe, [["render", ge]]), he = {}, be = {
150
+ const ye = /* @__PURE__ */ h(ve, [["render", he]]), be = {}, we = {
142
151
  width: "25",
143
152
  height: "24",
144
153
  viewBox: "0 0 25 24",
145
154
  fill: "inherit",
146
155
  xmlns: "http://www.w3.org/2000/svg"
147
156
  };
148
- function ye(e, i) {
149
- return n(), s("svg", be, [...i[0] || (i[0] = [
150
- l("path", {
157
+ function _e(e, i) {
158
+ return t(), n("svg", we, [...i[0] || (i[0] = [
159
+ s("path", {
151
160
  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",
152
161
  fill: "inherit"
153
162
  }, null, -1)
154
163
  ])]);
155
164
  }
156
- const we = /* @__PURE__ */ h(he, [["render", ye]]), _e = ["aria-roledescription"], Ce = ["id"], Le = { class: "footer" }, $e = { class: "control" }, Se = { class: "slide-info-container" }, ke = { class: "pagination" }, Ae = /* @__PURE__ */ L({
165
+ const Ce = /* @__PURE__ */ h(be, [["render", _e]]), Le = ["aria-roledescription"], $e = ["id"], Se = { class: "footer" }, ke = { class: "control" }, Ae = { class: "slide-info-container" }, Ne = { class: "pagination" }, Te = /* @__PURE__ */ S({
157
166
  __name: "Carousel.ce",
158
167
  props: {
159
168
  randomSlides: { type: Boolean },
@@ -161,109 +170,111 @@ const we = /* @__PURE__ */ h(he, [["render", ye]]), _e = ["aria-roledescription"
161
170
  slides: { type: Array },
162
171
  titleLevel: { type: Number },
163
172
  disableAnimation: { type: Boolean },
164
- disableLoop: { type: Boolean }
173
+ disableLoop: { type: Boolean },
174
+ imageTextDisplay: { type: String }
165
175
  },
166
176
  setup(e) {
167
- const i = e, a = 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);
168
- function b(o) {
169
- f.value = o, r.value = (r.value - o + i.slides.length) % i.slides.length;
177
+ const i = e, r = i.titleLevel ?? 2, a = w(() => i.randomSlides ? [...i.slides].sort(() => Math.round(Math.random()) === 0 ? -1 : 1) : i.slides), d = $(0), y = $(1), b = w(() => i.disableLoop && d.value === 0), f = w(() => i.disableLoop && d.value === i.slides.length - 1);
178
+ function v(o) {
179
+ y.value = o, d.value = (d.value - o + i.slides.length) % i.slides.length;
170
180
  }
171
- const g = V();
172
- return (o, d) => (n(), s("section", {
181
+ const x = P();
182
+ return (o, c) => (t(), n("section", {
173
183
  "aria-roledescription": o.$t("pix-carousel.title")
174
184
  }, [
175
- l("div", {
185
+ s("div", {
176
186
  "aria-live": "polite",
177
187
  class: "slides",
178
- id: u(g)
188
+ id: l(x)
179
189
  }, [
180
- m(B, {
190
+ m(j, {
181
191
  class: "carousel__nav previous",
182
- disabled: y.value,
183
- "aria-controls": u(g),
184
- onClick: d[0] || (d[0] = (c) => b(1)),
192
+ disabled: b.value,
193
+ "aria-controls": l(x),
194
+ onClick: c[0] || (c[0] = (u) => v(1)),
185
195
  label: o.$t("pix-carousel.previous"),
186
196
  "tooltip-position": "right"
187
197
  }, {
188
- default: w(() => [
189
- m(xe, { "aria-hidden": "true" })
198
+ default: _(() => [
199
+ m(ye, { "aria-hidden": "true" })
190
200
  ]),
191
201
  _: 1
192
202
  }, 8, ["disabled", "aria-controls", "label"]),
193
- (n(!0), s(S, null, k(t.value, (c, p) => (n(), A(me, {
203
+ (t(!0), n(A, null, N(a.value, (u, p) => (t(), T(fe, {
194
204
  key: p,
195
- slide: c,
196
- direction: f.value,
197
- label: o.$t("pix-carousel.of", { currentSlide: p + 1, slideLength: t.value.length }),
198
- "is-active": r.value === p,
199
- "title-level": u(a),
205
+ slide: u,
206
+ direction: y.value,
207
+ label: o.$t("pix-carousel.of", { currentSlide: p + 1, slideLength: a.value.length }),
208
+ "is-active": d.value === p,
209
+ "title-level": l(r),
200
210
  type: e.type,
201
- "disable-animation": e.disableAnimation
202
- }, null, 8, ["slide", "direction", "label", "is-active", "title-level", "type", "disable-animation"]))), 128)),
203
- m(B, {
211
+ "disable-animation": e.disableAnimation,
212
+ "image-text-display": e.imageTextDisplay
213
+ }, null, 8, ["slide", "direction", "label", "is-active", "title-level", "type", "disable-animation", "image-text-display"]))), 128)),
214
+ m(j, {
204
215
  class: "carousel__nav next",
205
- disabled: $.value,
206
- "aria-controls": u(g),
207
- onClick: d[1] || (d[1] = (c) => b(-1)),
216
+ disabled: f.value,
217
+ "aria-controls": l(x),
218
+ onClick: c[1] || (c[1] = (u) => v(-1)),
208
219
  label: o.$t("pix-carousel.next"),
209
220
  "tooltip-position": "left"
210
221
  }, {
211
- default: w(() => [
212
- m(we, { "aria-hidden": "true" })
222
+ default: _(() => [
223
+ m(Ce, { "aria-hidden": "true" })
213
224
  ]),
214
225
  _: 1
215
226
  }, 8, ["disabled", "aria-controls", "label"])
216
- ], 8, Ce),
217
- l("div", Le, [
218
- l("div", $e, [
219
- m(j, {
220
- onClick: d[2] || (d[2] = (c) => b(1)),
227
+ ], 8, $e),
228
+ s("div", Se, [
229
+ s("div", ke, [
230
+ m(D, {
231
+ onClick: c[2] || (c[2] = (u) => v(1)),
221
232
  label: o.$t("pix-carousel.previous"),
222
- "aria-controls": u(g),
233
+ "aria-controls": l(x),
223
234
  direction: "previous",
224
- disabled: y.value
235
+ disabled: b.value
225
236
  }, null, 8, ["label", "aria-controls", "disabled"]),
226
- m(j, {
227
- onClick: d[3] || (d[3] = (c) => b(-1)),
237
+ m(D, {
238
+ onClick: c[3] || (c[3] = (u) => v(-1)),
228
239
  label: o.$t("pix-carousel.next"),
229
- "aria-controls": u(g),
240
+ "aria-controls": l(x),
230
241
  direction: "next",
231
- disabled: $.value
242
+ disabled: f.value
232
243
  }, null, 8, ["label", "aria-controls", "disabled"])
233
244
  ]),
234
- l("div", Se, [
235
- (n(!0), s(S, null, k(t.value, (c, p) => (n(), A(E, {
245
+ s("div", Ae, [
246
+ (t(!0), n(A, null, N(a.value, (u, p) => (t(), T(H, {
236
247
  key: p,
237
- description: c.description,
238
- title: c.title,
239
- "title-level": u(a),
240
- "is-active": r.value === p,
248
+ description: u.description,
249
+ title: u.title,
250
+ "title-level": l(r),
251
+ "is-active": d.value === p,
241
252
  "aria-hidden": "true"
242
253
  }, {
243
- pagination: w(() => [
244
- l("span", ke, v(p + 1) + " / " + v(t.value.length), 1)
254
+ pagination: _(() => [
255
+ s("span", Ne, g(p + 1) + " / " + g(a.value.length), 1)
245
256
  ]),
246
257
  _: 2
247
258
  }, 1032, ["description", "title", "title-level", "is-active"]))), 128))
248
259
  ])
249
260
  ])
250
- ], 8, _e));
261
+ ], 8, Le));
251
262
  }
252
- }), Ne = "*{--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{align-items:center;display:flex;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:inline-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;transform:translateY(-.25rem)}.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}}", Be = /* @__PURE__ */ h(Ae, [["styles", [Ne]]]);
253
- F(/* @__PURE__ */ Object.assign({ "./locales/en.json": W, "./locales/es-419.json": Z, "./locales/es.json": J, "./locales/fr.json": K, "./locales/it.json": Y, "./locales/nl.json": q })).catch((e) => console.error(e));
254
- const H = P(Be, {
263
+ }), Be = "*{--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{align-items:center;display:flex;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:inline-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;transform:translateY(-.25rem)}.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}}", je = /* @__PURE__ */ h(Te, [["styles", [Be]]]);
264
+ G(/* @__PURE__ */ Object.assign({ "./locales/en.json": Z, "./locales/es-419.json": J, "./locales/es.json": K, "./locales/fr.json": Y, "./locales/it.json": q, "./locales/nl.json": Q })).catch((e) => console.error(e));
265
+ const I = F(je, {
255
266
  configureApp(e) {
256
- N.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(G, { i18next: N });
267
+ B.changeLanguage(document?.documentElement?.lang || navigator.language), e.use(O, { i18next: B });
257
268
  }
258
269
  });
259
- H.prototype.normalizeProps = (e) => ({
270
+ I.prototype.normalizeProps = (e) => ({
260
271
  ...e,
261
- titleLevel: _(e.titleLevel),
272
+ titleLevel: C(e.titleLevel),
262
273
  slides: e.slides.map((i) => ({
263
274
  ...i,
264
- displayHeight: _(i.displayHeight),
265
- displayWidth: _(i.displayWidth),
266
- license: O(i.license)
275
+ displayHeight: C(i.displayHeight),
276
+ displayWidth: C(i.displayWidth),
277
+ license: W(i.license)
267
278
  }))
268
279
  });
269
- window.customElements.define("pix-carousel", H);
280
+ window.customElements.define("pix-carousel", I);
package/dist/schema.js CHANGED
@@ -22,7 +22,7 @@ const n = e.object({
22
22
  info: e.string().required(),
23
23
  tooltipPosition: e.string().valid("bottom").optional()
24
24
  }).required()).required().min(1)
25
- }), u = e.object({
25
+ }), l = e.object({
26
26
  titleLevel: e.number().optional(),
27
27
  listOfProbabilityBarsLists: e.array().items(
28
28
  e.array().items(
@@ -35,7 +35,7 @@ const n = e.object({
35
35
  userMessage: e.string().required(),
36
36
  llmMessage: e.string().required(),
37
37
  wordsToAdd: e.array().items(e.string()).required()
38
- }), l = e.object({
38
+ }), u = e.object({
39
39
  titleLevel: e.number().optional(),
40
40
  name: e.string().required(),
41
41
  cardList: e.array().items(
@@ -105,7 +105,6 @@ const n = e.object({
105
105
  }), _ = e.object({
106
106
  title: e.string().required(),
107
107
  description: e.string().allow("").required(),
108
- displayHeight: e.number().min(0).optional(),
109
108
  text: e.string().required(),
110
109
  image: e.object({
111
110
  src: e.string().required(),
@@ -123,7 +122,8 @@ const n = e.object({
123
122
  randomSlides: e.boolean().required(),
124
123
  titleLevel: e.number().integer().optional(),
125
124
  disableAnimation: e.boolean().required(),
126
- disableLoop: e.boolean().optional()
125
+ disableLoop: e.boolean().optional(),
126
+ imageTextDisplay: e.string().optional()
127
127
  }).meta({ title: "pix-carousel" }).required(), h = e.object({
128
128
  options: e.array().items(e.object({
129
129
  label: e.string().required(),
@@ -168,7 +168,7 @@ const n = e.object({
168
168
  failImage: e.string().required(),
169
169
  infoImage: e.string().required(),
170
170
  searchImage: e.string().required()
171
- }), S = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": u, "./flip-cards/flip-cards.schema.js": l, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": d, "./message-conversation/message-conversation.schema.js": m, "./pix-article/pix-article.schema.js": g, "./pix-carousel/pix-carousel.schema.js": j, "./pix-cursor/pix-cursor.schema.js": h, "./pix-llm/llm-compare-messages.schema.js": x, "./pix-llm/llm-messages.schema.js": f, "./pix-llm/llm-prompt-select.schema.js": w, "./qcm-deepfake/qcm-deepfake.schema.js": L }), z = Object.fromEntries(Object.entries(S).map(([s, o]) => [
171
+ }), S = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": n, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": l, "./flip-cards/flip-cards.schema.js": u, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": d, "./message-conversation/message-conversation.schema.js": m, "./pix-article/pix-article.schema.js": g, "./pix-carousel/pix-carousel.schema.js": j, "./pix-cursor/pix-cursor.schema.js": h, "./pix-llm/llm-compare-messages.schema.js": x, "./pix-llm/llm-messages.schema.js": f, "./pix-llm/llm-prompt-select.schema.js": w, "./qcm-deepfake/qcm-deepfake.schema.js": L }), z = Object.fromEntries(Object.entries(S).map(([s, o]) => [
172
172
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
173
173
  o
174
174
  ]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",