@1024pix/epreuves-components 0.9.7 → 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,10 +1,10 @@
1
- import { a as k, r as b, B as M, H as C, c as r, o as t, x, C as _, f as y, i as w, t as h, g as $, F as v, b as N, _ as D, G as B, e as E, d as T } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { L as V } from "../Loading.ce-B_mSjXBH.js";
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-BsBClsn3.js";
3
3
  const F = ["part"], L = {
4
4
  key: 1,
5
5
  class: "message__loader message__content",
6
6
  "aria-hidden": "true"
7
- }, z = ["part"], I = { key: 0 }, j = /* @__PURE__ */ k({
7
+ }, j = ["part"], z = { key: 0 }, I = /* @__PURE__ */ k({
8
8
  __name: "Message.ce",
9
9
  props: {
10
10
  displaySender: { type: Boolean, default: !0 },
@@ -14,7 +14,7 @@ const F = ["part"], L = {
14
14
  loadingDuration: { type: Number }
15
15
  },
16
16
  setup(n, { expose: c }) {
17
- const s = b("hidden"), l = b([]), u = M(() => n.message.content.split(`
17
+ const s = b("hidden"), l = b([]), u = D(() => n.message.content.split(`
18
18
  `));
19
19
  function m(e) {
20
20
  return new Promise((i) => {
@@ -52,14 +52,14 @@ const F = ["part"], L = {
52
52
  class: x(["message__content", { "hidden-state": s.value !== "visible" }]),
53
53
  part: `message ${e.message.direction}`
54
54
  }, [
55
- (t(!0), r(v, null, N(u.value, (o, d) => (t(), r(v, { key: d }, [
56
- d > 0 ? (t(), r("br", I)) : _("", !0),
55
+ (t(!0), r(v, null, M(u.value, (o, d) => (t(), r(v, { key: d }, [
56
+ d > 0 ? (t(), r("br", z)) : _("", !0),
57
57
  w(" " + h(o), 1)
58
58
  ], 64))), 128))
59
- ], 10, z)
59
+ ], 10, j)
60
60
  ], 2));
61
61
  }
62
- }), G = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}", H = /* @__PURE__ */ D(j, [["styles", [G]]]), O = { part: "conversation" }, P = { class: "sr-only" }, R = /* @__PURE__ */ k({
62
+ }), q = ".message{max-width:80%;position:relative}.message--incoming{align-self:start}.message--incoming .message__sender{padding-left:10px}.message--incoming .message__loader{left:10px}.message--incoming .message__content{background-color:#e8e8e8}.message--outgoing{align-self:end}.message--outgoing .message__sender{padding-right:10px;text-align:right}.message--outgoing .message__loader{right:10px}.message--outgoing .message__content{background-color:#d1eaff}.message__sender{color:#444;font-size:.8rem;font-weight:700;margin:0}.message__loader{position:absolute;width:24px}.message__content{border-radius:16px;margin:0;padding:10px 14px}.message__content:not(.hidden-state){animation:fade .3s ease-in-out both}.hidden-state{visibility:hidden}@keyframes fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.message__content:not(.hidden-state){animation:none}.message__loader{display:none}.hidden-state{visibility:visible}}", O = /* @__PURE__ */ N(I, [["styles", [q]]]), P = { part: "conversation" }, R = { class: "sr-only" }, G = /* @__PURE__ */ k({
63
63
  __name: "MessageConversation.ce",
64
64
  props: {
65
65
  title: { default: "Conversation par messages", type: String },
@@ -67,7 +67,7 @@ const F = ["part"], L = {
67
67
  animationSpeed: { default: 20, type: Number }
68
68
  },
69
69
  setup(n, { expose: c }) {
70
- const s = 50 * n.animationSpeed, l = M(
70
+ const s = 50 * n.animationSpeed, l = D(
71
71
  () => n.messages.reduce(
72
72
  (a, e, i) => {
73
73
  const o = m(e);
@@ -82,7 +82,7 @@ const F = ["part"], L = {
82
82
  },
83
83
  []
84
84
  )
85
- ), u = B("messages");
85
+ ), u = E("messages");
86
86
  function m(a) {
87
87
  return a.content.length * n.animationSpeed;
88
88
  }
@@ -91,9 +91,9 @@ const F = ["part"], L = {
91
91
  }
92
92
  return c({
93
93
  reset: g
94
- }), (a, e) => (t(), r("figure", O, [
95
- y("figcaption", P, h(a.title), 1),
96
- (t(!0), r(v, null, N(l.value, ({ message: i, displaySender: o, startAnimation: d, animationDuration: p }, f) => (t(), E(H, {
94
+ }), (a, e) => (t(), r("figure", P, [
95
+ y("figcaption", R, h(a.title), 1),
96
+ (t(!0), r(v, null, M(l.value, ({ message: i, displaySender: o, startAnimation: d, animationDuration: p }, f) => (t(), B(O, {
97
97
  ref_for: !0,
98
98
  ref: "messages",
99
99
  message: i,
@@ -105,5 +105,5 @@ const F = ["part"], L = {
105
105
  }, null, 8, ["message", "start-animation", "animation-duration", "display-sender"]))), 128))
106
106
  ]));
107
107
  }
108
- }), q = "figure{background-color:#fff;border-radius:16px;display:flex;flex-direction:column;gap:8px;margin:0;padding:16px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", J = /* @__PURE__ */ D(R, [["styles", [q]]]);
108
+ }), H = "figure{background-color:#fff;border-radius:16px;display:flex;flex-direction:column;gap:8px;margin:0;padding:16px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", J = /* @__PURE__ */ N(G, [["styles", [H]]]);
109
109
  window.customElements.define("message-conversation", T(J));
@@ -1,20 +1,20 @@
1
- import { a as b, B as _, c as a, o as s, x as N, f as l, C as E, A as M, i as T, t as m, _ as v, r as y, E as z, g as u, I as C, v as R, l as x, y as p, F as L, b as $, e as S, d as D } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { B as k, a as H, i as A, b as I } from "../ButtonTooltip.ce-DJWPmZEW.js";
3
- import { N as B } from "../NavigationButton.ce-CObYL4XH.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 = {
6
+ }, G = {
7
7
  "pix-carousel": { license: "Licencia de imagen", next: "Siguiente", of: "{{ currentSlide }} de {{ slideLength }}", previous: "Anterior", slide: "Diapositiva", title: "Carrusel" }
8
- }, P = {
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
- }, G = {
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"], W = ["innerHTML"], q = {
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, W)) : n.description ? (s(), a("p", q, 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;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: 768px){.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: 768px){.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 = R();
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(k, {
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(k, {
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: 768px){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
- H(/* @__PURE__ */ Object.assign({ "./locales/en.json": V, "./locales/es.json": F, "./locales/fr.json": P, "./locales/it.json": G, "./locales/nl.json": O })).catch((t) => console.error(t));
252
- window.customElements.define("pix-carousel", D(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
- A.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(I, { i18next: A });
259
+ N.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(P, { i18next: N });
255
260
  }
256
261
  }));
@@ -1,7 +1,7 @@
1
- import { a as S, r as y, v as k, B as m, h as A, c as a, o as i, f as s, J as E, y as c, t as u, F as f, b, K as H, g, x as C, l as L, C as F, z as P, _ as D, d as G } from "../_plugin-vue_export-helper-OrrhezDE.js";
2
- import { a as J, i as w, b as K } from "../ButtonTooltip.ce-DJWPmZEW.js";
3
- import { N as j } from "../NavigationButton.ce-CObYL4XH.js";
4
- const R = {}, U = {}, q = {
1
+ import { a as B, r as y, y as k, q as m, h as S, c as a, o as i, f as s, J as E, B as c, t as u, F as f, b, K as H, g, v as C, I as L, x as F, A as P, _ as D, d as q } from "../_plugin-vue_export-helper-CGpZIhKK.js";
2
+ import { a as G, i as w, b as J } from "../i18n-DZYcdfDF.js";
3
+ import { N as j } from "../NavigationButton.ce-RaQYJjPs.js";
4
+ const K = {}, R = {}, U = {
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 = {
7
7
  class: "visible-options",
@@ -12,17 +12,17 @@ const R = {}, U = {}, q = {
12
12
  }, le = {
13
13
  key: 0,
14
14
  class: "confirm"
15
- }, ce = ["innerHTML", "aria-hidden"], de = /* @__PURE__ */ S({
15
+ }, ce = ["innerHTML", "aria-hidden"], de = /* @__PURE__ */ B({
16
16
  __name: "PixCursor.ce",
17
17
  props: {
18
18
  options: { type: Array }
19
19
  },
20
20
  setup(d, { expose: M }) {
21
21
  const p = d, r = y(Math.floor(p.options.length / 2)), o = y(!1), v = k(), h = k(), I = m(() => r.value === p.options.length - 1), N = m(() => r.value === 0), l = m(() => Number(r.value));
22
- function z() {
22
+ function $() {
23
23
  o.value = !0;
24
24
  }
25
- function $() {
25
+ function z() {
26
26
  o.value || (r.value = Math.max(0, l.value - 1));
27
27
  }
28
28
  function O() {
@@ -37,10 +37,10 @@ const R = {}, U = {}, q = {
37
37
  return M({
38
38
  reset: T
39
39
  }), (t, x) => {
40
- const V = A("i18next");
40
+ const V = S("i18next");
41
41
  return i(), a("form", {
42
42
  class: "pix-cursor",
43
- onSubmit: P(z, ["prevent"])
43
+ onSubmit: P($, ["prevent"])
44
44
  }, [
45
45
  s("div", null, [
46
46
  s("label", {
@@ -49,13 +49,13 @@ const R = {}, U = {}, q = {
49
49
  }, u(t.$t("pix-cursor.selectAnOption")), 9, X),
50
50
  s("ul", Y, [
51
51
  (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("li", {
52
- onClick: (B) => _(e),
52
+ onClick: (A) => _(e),
53
53
  key: e
54
54
  }, u(n.label), 9, Z))), 128))
55
55
  ]),
56
56
  s("datalist", { id: c(h) }, [
57
57
  (i(!0), a(f, null, b(t.options, (n, e) => (i(), a("option", {
58
- onClick: (B) => _(e),
58
+ onClick: (A) => _(e),
59
59
  key: e,
60
60
  value: e,
61
61
  label: n.label
@@ -74,7 +74,7 @@ const R = {}, U = {}, q = {
74
74
  ]),
75
75
  s("div", ne, [
76
76
  g(j, {
77
- onClick: $,
77
+ onClick: z,
78
78
  disabled: o.value || N.value,
79
79
  label: t.$t("pix-cursor.previous"),
80
80
  "aria-controls": c(v),
@@ -129,9 +129,9 @@ const R = {}, U = {}, q = {
129
129
  };
130
130
  }
131
131
  }), ue = "[data-v-58e704c5]{--pix-neutral-800: #253858;font-family:Nunito,sans-serif;color:var(--pix-neutral-800)}.pix-cursor[data-v-58e704c5]{display:flex;flex-direction:column;justify-content:center;margin:auto;padding:2rem;gap:1rem;overflow:hidden}.pix-cursor p[data-v-58e704c5]{text-align:center;font-size:1.1rem}.pix-cursor .chosen-option[data-v-58e704c5]{font-weight:700}.pix-cursor .visible-options[data-v-58e704c5]{display:flex;justify-content:space-between;margin:0;padding:0}.pix-cursor .visible-options li[data-v-58e704c5]{cursor:pointer;list-style:none}.pix-cursor input[data-v-58e704c5]{width:100%}.pix-cursor .confirm[data-v-58e704c5]{padding:.75rem 1.5rem;border-radius:8px;cursor:pointer;font-weight:600;font-size:1.25rem;letter-spacing:1.1;width:fit-content;margin:auto;border:none;color:#fff;background:#4075ff;grid-row:1;grid-column:1}.pix-cursor .confirm[data-v-58e704c5]:hover{background:#355ac4;transition:background ease .1s}.pix-cursor .navigation-container[data-v-58e704c5]{display:flex;justify-content:center;align-items:center;gap:1rem}.pix-cursor .navigation-container .chosen-text-container[data-v-58e704c5]{display:grid}.pix-cursor .navigation-container .chosen-text-container p[data-v-58e704c5]{grid-row:1;grid-column:1}.pix-cursor .navigation-container .chosen-text-container p.hidden[data-v-58e704c5]{transform:translate(100vw)}.pix-cursor .footer[data-v-58e704c5]{display:grid;grid-template-columns:auto;align-items:center;justify-content:center}.pix-cursor .feedback[data-v-58e704c5]{padding:1rem 1.2rem;border-left:solid 4px;border-radius:8px;grid-column:1;grid-row:1;text-align:start;margin:0}.pix-cursor .feedback.hidden[data-v-58e704c5]{visibility:hidden;transform:translate(100vw)}.pix-cursor .feedback.good[data-v-58e704c5]{background:#e8f5e9;border-left-color:#4caf51}.pix-cursor .feedback.bad[data-v-58e704c5]{background:#ffebee;border-left-color:#f44337}.pix-cursor .feedback.neutral[data-v-58e704c5]{background:#e8f6ff;border-left-color:#464ee0}.pix-cursor .feedback.close[data-v-58e704c5]{background:#fff8e1;border-left-color:#ffc108}", pe = /* @__PURE__ */ D(de, [["styles", [ue]], ["__scopeId", "data-v-58e704c5"]]);
132
- J(/* @__PURE__ */ Object.assign({ "./locales/en.json": R, "./locales/es.json": U, "./locales/fr.json": q, "./locales/it.json": Q, "./locales/nl.json": W })).catch((d) => console.error(d));
133
- window.customElements.define("pix-cursor", G(pe, {
132
+ G(/* @__PURE__ */ Object.assign({ "./locales/en.json": K, "./locales/es.json": R, "./locales/fr.json": U, "./locales/it.json": Q, "./locales/nl.json": W })).catch((d) => console.error(d));
133
+ window.customElements.define("pix-cursor", q(pe, {
134
134
  configureApp(d) {
135
- w.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(K, { i18next: w });
135
+ w.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(J, { i18next: w });
136
136
  }
137
137
  }));