@studiolxd/brand 47.1.0 → 48.0.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/dist/_shared/progressbar.js +19 -18
  3. package/dist/_types/atoms/CopyableValue/CopyableValue.d.ts +4 -4
  4. package/dist/_types/atoms/DescriptionList/DescriptionList.d.ts +5 -4
  5. package/dist/_types/atoms/DotsButton/DotsButton.d.ts +15 -0
  6. package/dist/_types/atoms/ProgressBar/ProgressBar.d.ts +12 -2
  7. package/dist/_types/atoms/Slider/Slider.d.ts +19 -2
  8. package/dist/_types/atoms/Spinner/Spinner.d.ts +15 -1
  9. package/dist/_types/constants/copy-to-clipboard.d.ts +22 -0
  10. package/dist/_types/messages/BrandMessages.d.ts +35 -1
  11. package/dist/_types/messages/index.d.ts +1 -1
  12. package/dist/_types/molecules/CalendarPlanner/CalendarPlanner.d.ts +13 -3
  13. package/dist/_types/molecules/CalendarRoster/CalendarRoster.d.ts +38 -5
  14. package/dist/_types/molecules/Carousel/Carousel.d.ts +65 -13
  15. package/dist/_types/molecules/CodeBlock/CodeBlock.d.ts +20 -6
  16. package/dist/_types/molecules/ContextMenu/ContextMenu.d.ts +5 -1
  17. package/dist/_types/molecules/CopyButton/CopyButton.d.ts +5 -6
  18. package/dist/_types/molecules/LanguageSwitcher/LanguageSwitcher.d.ts +13 -1
  19. package/dist/_types/molecules/NotificationList/NotificationList.d.ts +33 -3
  20. package/dist/_types/molecules/ProjectCard/ProjectCard.d.ts +14 -1
  21. package/dist/_types/molecules/Stepper/Stepper.d.ts +32 -7
  22. package/dist/_types/molecules/TreeView/TreeView.d.ts +11 -2
  23. package/dist/_types/molecules/UptimeBars/UptimeBars.d.ts +20 -2
  24. package/dist/_types/organisms/Chart/Chart.d.ts +46 -8
  25. package/dist/_types/sections/LegalFooter/LegalFooter.d.ts +13 -1
  26. package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +15 -1
  27. package/dist/calendar-planner.js +47 -47
  28. package/dist/calendar-roster.js +28 -25
  29. package/dist/carousel.js +69 -67
  30. package/dist/chart.js +250 -249
  31. package/dist/code-block.js +34 -34
  32. package/dist/context-menu.js +1 -1
  33. package/dist/copy-button.js +35 -34
  34. package/dist/copyable-value.js +43 -42
  35. package/dist/description-list.js +1 -1
  36. package/dist/dots-button.js +18 -17
  37. package/dist/language-switcher.js +43 -41
  38. package/dist/legal-footer.js +21 -18
  39. package/dist/notification-list.js +40 -38
  40. package/dist/progress-bar.js +1 -0
  41. package/dist/project-card.js +31 -30
  42. package/dist/public-page-shell.js +12 -11
  43. package/dist/slider.js +24 -23
  44. package/dist/spinner.js +19 -14
  45. package/dist/stepper.js +35 -38
  46. package/dist/tree-view.js +86 -85
  47. package/dist/uptime-bars.js +54 -53
  48. package/package.json +1 -1
@@ -6,62 +6,62 @@ import { Tag as n } from "./tag.js";
6
6
  import { Modal as r } from "./modal.js";
7
7
  import { c as i, i as a, l as o, n as s, o as c, r as l, s as u, t as d } from "./_shared/calendargrid.js";
8
8
  import { useCallback as f, useId as ee, useState as p } from "react";
9
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ import { Fragment as te, jsx as m, jsxs as h } from "react/jsx-runtime";
10
10
  //#region src/stories/molecules/CalendarPlanner/CalendarPlanner.tsx
11
- function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b, showMoreDialog: x, onDayClick: S, month: C, defaultMonth: w, onMonthChange: T, navigable: E = !0, locale: D = "es-ES", previousMonthLabel: O, nextMonthLabel: k, gridLabel: A, moreLabel: te = (e) => `+${e} más`, size: j = "md", className: M }) {
12
- let [N, P] = p(() => C ?? w ?? /* @__PURE__ */ new Date()), [F, I] = p(null), L = x ?? !b, R = f(() => I(null), []), z = C ?? N, B = f((e) => {
13
- P(e), T?.(e);
14
- }, [T]), V = e("calendar"), H = /* @__PURE__ */ new Date(), U = j === "sm" ? "xs" : j === "lg" ? "md" : "sm", W = new Intl.DateTimeFormat(D, {
11
+ function g({ events: g = [], renderDay: _, maxItemsPerDay: v = 3, onMoreClick: y, showMoreDialog: b, onDayClick: x, month: S, defaultMonth: C, onMonthChange: w, navigable: T = !0, locale: E = "es-ES", previousMonthLabel: D, nextMonthLabel: O, gridLabel: k, moreLabel: ne, size: A = "md", className: j }) {
12
+ let [M, N] = p(() => S ?? C ?? /* @__PURE__ */ new Date()), [P, F] = p(null), I = b ?? !y, L = f(() => F(null), []), R = S ?? M, z = f((e) => {
13
+ N(e), w?.(e);
14
+ }, [w]), B = e("calendar"), V = e("calendarPlanner"), H = /* @__PURE__ */ new Date(), U = A === "sm" ? "xs" : A === "lg" ? "md" : "sm", W = new Intl.DateTimeFormat(E, {
15
15
  month: "long",
16
16
  year: "numeric"
17
- }).format(z), G = new Intl.DateTimeFormat(D, {
17
+ }).format(R), G = new Intl.DateTimeFormat(E, {
18
18
  weekday: "long",
19
19
  day: "numeric",
20
20
  month: "long",
21
21
  year: "numeric"
22
- }), K = new Intl.DateTimeFormat(D, {
22
+ }), K = new Intl.DateTimeFormat(E, {
23
23
  weekday: "long",
24
24
  day: "numeric",
25
25
  month: "long",
26
26
  year: "numeric"
27
- }), q = l(D, "short"), J = d(s(z)), Y = i(z, -1), X = i(z, 1), Z = (e) => _.filter((t) => a(t.date, e)), Q = o({
28
- month: z,
29
- onMonthChange: B,
30
- onActivate: S ? (e) => S(e, Z(e)) : void 0
31
- }), $ = `${ee()}-planner-title-${z.getFullYear()}-${z.getMonth()}`;
32
- return /* @__PURE__ */ g("div", {
27
+ }), q = l(E, "short"), J = d(s(R)), Y = i(R, -1), X = i(R, 1), Z = (e) => g.filter((t) => a(t.date, e)), Q = o({
28
+ month: R,
29
+ onMonthChange: z,
30
+ onActivate: x ? (e) => x(e, Z(e)) : void 0
31
+ }), $ = `${ee()}-planner-title-${R.getFullYear()}-${R.getMonth()}`;
32
+ return /* @__PURE__ */ h("div", {
33
33
  className: [
34
34
  "calendar-planner",
35
- `calendar-planner--${j}`,
36
- M
35
+ `calendar-planner--${A}`,
36
+ j
37
37
  ].filter(Boolean).join(" "),
38
38
  children: [
39
39
  c({
40
40
  block: "calendar-planner",
41
41
  title: W,
42
42
  titleId: $,
43
- navigable: E,
44
- previousLabel: E ? V("previousMonth", O) : void 0,
45
- nextLabel: E ? V("nextMonth", k) : void 0,
46
- onPrev: () => B(Y),
47
- onNext: () => B(X),
43
+ navigable: T,
44
+ previousLabel: T ? B("previousMonth", D) : void 0,
45
+ nextLabel: T ? B("nextMonth", O) : void 0,
46
+ onPrev: () => z(Y),
47
+ onNext: () => z(X),
48
48
  chevronSize: U
49
49
  }),
50
- /* @__PURE__ */ g("div", {
50
+ /* @__PURE__ */ h("div", {
51
51
  className: "calendar-planner__grid",
52
52
  role: "grid",
53
- "aria-label": A,
54
- "aria-labelledby": A ? void 0 : $,
55
- onKeyDown: S ? Q.onKeyDown : void 0,
53
+ "aria-label": k,
54
+ "aria-labelledby": k ? void 0 : $,
55
+ onKeyDown: x ? Q.onKeyDown : void 0,
56
56
  children: [u({
57
57
  block: "calendar-planner",
58
58
  rowModifier: "header",
59
59
  weekdays: q
60
- }), J.map((e, r) => /* @__PURE__ */ h("div", {
60
+ }), J.map((e, r) => /* @__PURE__ */ m("div", {
61
61
  role: "row",
62
62
  className: "calendar-planner__row",
63
63
  children: e.map(({ date: e, outside: r }) => {
64
- let i = a(e, H), o = Z(e), s = o.slice(0, y), c = o.length - s.length, l = [
64
+ let i = a(e, H), o = Z(e), s = o.slice(0, v), c = o.length - s.length, l = [
65
65
  "calendar-planner__cell",
66
66
  r && "calendar-planner__cell--outside",
67
67
  i && "calendar-planner__cell--today"
@@ -70,48 +70,48 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
70
70
  i && "calendar-planner__day-number--today",
71
71
  r && "calendar-planner__day-number--outside"
72
72
  ].filter(Boolean).join(" ");
73
- return /* @__PURE__ */ g("div", {
74
- ref: S ? Q.cellRef(e) : void 0,
73
+ return /* @__PURE__ */ h("div", {
74
+ ref: x ? Q.cellRef(e) : void 0,
75
75
  role: "gridcell",
76
- className: [l, S ? "calendar-planner__cell--clickable" : ""].filter(Boolean).join(" "),
76
+ className: [l, x ? "calendar-planner__cell--clickable" : ""].filter(Boolean).join(" "),
77
77
  "aria-current": i ? "date" : void 0,
78
- tabIndex: S ? Q.isTabbable(e) ? 0 : -1 : void 0,
79
- onFocus: S ? () => Q.onCellFocus(e) : void 0,
80
- onClick: S ? () => S(e, o) : void 0,
81
- children: [/* @__PURE__ */ g("span", {
78
+ tabIndex: x ? Q.isTabbable(e) ? 0 : -1 : void 0,
79
+ onFocus: x ? () => Q.onCellFocus(e) : void 0,
80
+ onClick: x ? () => x(e, o) : void 0,
81
+ children: [/* @__PURE__ */ h("span", {
82
82
  className: u,
83
- children: [/* @__PURE__ */ h(t, { children: G.format(e) }), /* @__PURE__ */ h("span", {
83
+ children: [/* @__PURE__ */ m(t, { children: G.format(e) }), /* @__PURE__ */ m("span", {
84
84
  "aria-hidden": "true",
85
85
  children: e.getDate()
86
86
  })]
87
- }), /* @__PURE__ */ h("div", {
87
+ }), /* @__PURE__ */ m("div", {
88
88
  className: "calendar-planner__cell-body",
89
- children: v ? v(e, o) : /* @__PURE__ */ g(m, { children: [s.map((e) => /* @__PURE__ */ h(n, {
89
+ children: _ ? _(e, o) : /* @__PURE__ */ h(te, { children: [s.map((e) => /* @__PURE__ */ m(n, {
90
90
  variant: e.variant ?? "neutral",
91
91
  children: e.label
92
- }, e.id)), c > 0 && /* @__PURE__ */ h("button", {
92
+ }, e.id)), c > 0 && /* @__PURE__ */ m("button", {
93
93
  type: "button",
94
94
  className: "calendar-planner__more",
95
95
  onClick: (t) => {
96
- t.stopPropagation(), L && I({
96
+ t.stopPropagation(), I && F({
97
97
  date: e,
98
98
  events: o
99
- }), b?.(e, o);
99
+ }), y?.(e, o);
100
100
  },
101
- children: te(c)
101
+ children: V("more", ne)(c)
102
102
  })] })
103
103
  })]
104
104
  }, e.toISOString());
105
105
  })
106
106
  }, r))]
107
107
  }),
108
- /* @__PURE__ */ h(r, {
109
- open: F !== null,
110
- onClose: R,
111
- title: F ? K.format(F.date) : void 0,
112
- children: /* @__PURE__ */ h("div", {
108
+ /* @__PURE__ */ m(r, {
109
+ open: P !== null,
110
+ onClose: L,
111
+ title: P ? K.format(P.date) : void 0,
112
+ children: /* @__PURE__ */ m("div", {
113
113
  className: "calendar-planner__modal-events",
114
- children: F?.events.map((e) => /* @__PURE__ */ h(n, {
114
+ children: P?.events.map((e) => /* @__PURE__ */ m(n, {
115
115
  variant: e.variant ?? "neutral",
116
116
  children: e.label
117
117
  }, e.id))
@@ -121,4 +121,4 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
121
121
  });
122
122
  }
123
123
  //#endregion
124
- export { _ as CalendarPlanner };
124
+ export { g as CalendarPlanner };
@@ -23,48 +23,51 @@ var u = {
23
23
  }, d = [
24
24
  {
25
25
  type: "holiday",
26
- label: "Festivo"
26
+ key: "holiday"
27
27
  },
28
28
  {
29
29
  type: "vacation",
30
- label: "Vacaciones"
30
+ key: "vacation"
31
31
  },
32
32
  {
33
33
  type: "absence",
34
- label: "Ausencia"
34
+ key: "absence"
35
35
  },
36
36
  {
37
37
  type: "recovery",
38
- label: "Recuperación"
38
+ key: "recovery"
39
39
  },
40
40
  {
41
41
  type: "birthday",
42
- label: "Cumpleaños"
42
+ key: "birthday"
43
43
  },
44
44
  {
45
45
  type: "non-working",
46
- label: "No laborable"
46
+ key: "nonWorking"
47
47
  }
48
48
  ];
49
- function f({ rows: f, month: p, onMonthChange: m, hrefBuilder: h, linkComponent: g, renderCell: _, nameLabel: v = "Empleado", birthdayPrefix: y = "🎂 ", showLegend: b = !0, locale: x = "es-ES", legendItems: S = d, legendLabel: C = "Leyenda", previousMonthLabel: w, nextMonthLabel: T, className: E }) {
50
- let D = e("calendar"), O = /* @__PURE__ */ new Date(), k = l(p), A = r(p, -1), j = r(p, 1), M = new Intl.DateTimeFormat(x, {
49
+ function f({ rows: f, month: p, onMonthChange: m, hrefBuilder: h, linkComponent: g, renderCell: _, nameLabel: v, birthdayPrefix: y = "🎂 ", showLegend: b = !0, locale: x = "es-ES", legendItems: S, legendLabel: C, previousMonthLabel: w, nextMonthLabel: T, className: E }) {
50
+ let D = e("calendar"), O = e("calendarRoster"), k = S ?? (b ? d.map(({ type: e, key: t }) => ({
51
+ type: e,
52
+ label: O(t)
53
+ })) : []), A = /* @__PURE__ */ new Date(), j = l(p), M = r(p, -1), N = r(p, 1), P = new Intl.DateTimeFormat(x, {
51
54
  month: "long",
52
55
  year: "numeric"
53
- }).format(p), N = new Intl.DateTimeFormat(x, { weekday: "narrow" }), P = new Intl.DateTimeFormat(x, { weekday: "long" }), F = m ? (e) => (t) => {
56
+ }).format(p), F = new Intl.DateTimeFormat(x, { weekday: "narrow" }), I = new Intl.DateTimeFormat(x, { weekday: "long" }), L = m ? (e) => (t) => {
54
57
  h && t.preventDefault(), m(e);
55
- } : void 0, I = `roster-title-${p.getFullYear()}-${p.getMonth()}`;
58
+ } : void 0, R = `roster-title-${p.getFullYear()}-${p.getMonth()}`;
56
59
  return /* @__PURE__ */ s("div", {
57
60
  className: ["calendar-roster", E].filter(Boolean).join(" "),
58
61
  children: [
59
62
  /* @__PURE__ */ o("div", {
60
63
  className: "calendar-roster__nav",
61
64
  children: /* @__PURE__ */ o(n, {
62
- label: M,
63
- labelId: I,
64
- prevHref: h?.(A),
65
- nextHref: h?.(j),
66
- prevOnClick: F?.(A),
67
- nextOnClick: F?.(j),
65
+ label: P,
66
+ labelId: R,
67
+ prevHref: h?.(M),
68
+ nextHref: h?.(N),
69
+ prevOnClick: L?.(M),
70
+ nextOnClick: L?.(N),
68
71
  prevLabel: D("previousMonth", w),
69
72
  nextLabel: D("nextMonth", T),
70
73
  linkComponent: g
@@ -74,17 +77,17 @@ function f({ rows: f, month: p, onMonthChange: m, hrefBuilder: h, linkComponent:
74
77
  className: "calendar-roster__wrap",
75
78
  children: /* @__PURE__ */ s("table", {
76
79
  className: "calendar-roster__table",
77
- "aria-labelledby": I,
80
+ "aria-labelledby": R,
78
81
  children: [/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ s("tr", { children: [/* @__PURE__ */ o("th", {
79
82
  className: "calendar-roster__th-name",
80
83
  scope: "col",
81
- children: v
82
- }), k.map((e) => {
83
- let t = i(e, O), n = [
84
+ children: O("name", v)
85
+ }), j.map((e) => {
86
+ let t = i(e, A), n = [
84
87
  "calendar-roster__th-day",
85
88
  c(e) && "calendar-roster__th-day--weekend",
86
89
  t && "calendar-roster__th-day--today"
87
- ].filter(Boolean).join(" "), r = String(e.getDate()).padStart(2, "0"), a = N.format(e), l = P.format(e);
90
+ ].filter(Boolean).join(" "), r = String(e.getDate()).padStart(2, "0"), a = F.format(e), l = I.format(e);
88
91
  return /* @__PURE__ */ s("th", {
89
92
  className: n,
90
93
  scope: "col",
@@ -104,8 +107,8 @@ function f({ rows: f, month: p, onMonthChange: m, hrefBuilder: h, linkComponent:
104
107
  className: "calendar-roster__th-name-row",
105
108
  title: e.name,
106
109
  children: e.name
107
- }), k.map((n) => {
108
- let r = n.getDate(), l = e.cells[r] ?? null, d = c(n), f = i(n, O), p = l?.type === "holiday", m = l?.type === "non-working";
110
+ }), j.map((n) => {
111
+ let r = n.getDate(), l = e.cells[r] ?? null, d = c(n), f = i(n, A), p = l?.type === "holiday", m = l?.type === "non-working";
109
112
  return /* @__PURE__ */ o("td", {
110
113
  className: [
111
114
  "calendar-roster__cell",
@@ -128,8 +131,8 @@ function f({ rows: f, month: p, onMonthChange: m, hrefBuilder: h, linkComponent:
128
131
  b && /* @__PURE__ */ o("div", {
129
132
  className: "calendar-roster__legend",
130
133
  role: "group",
131
- "aria-label": C,
132
- children: S.map(({ type: e, label: n }) => /* @__PURE__ */ o("span", {
134
+ "aria-label": O("legend", C),
135
+ children: k.map(({ type: e, label: n }) => /* @__PURE__ */ o("span", {
133
136
  className: "calendar-roster__legend-item",
134
137
  children: e === "non-working" ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("span", { className: "calendar-roster__legend-swatch calendar-roster__legend-swatch--non-working" }), n] }) : /* @__PURE__ */ o(t, {
135
138
  variant: u[e],
package/dist/carousel.js CHANGED
@@ -1,17 +1,18 @@
1
1
  'use client';
2
2
  import './carousel.css';
3
- import { Icon as e } from "./icon.js";
4
- import { VisuallyHidden as t } from "./visually-hidden.js";
5
- import { Button as n } from "./button.js";
6
- import { t as r } from "./_shared/css-properties.js";
7
- import { Children as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
8
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { VisuallyHidden as n } from "./visually-hidden.js";
6
+ import { Button as r } from "./button.js";
7
+ import { t as i } from "./_shared/css-properties.js";
8
+ import { Children as a, useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
9
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
9
10
  //#region src/stories/molecules/Carousel/Carousel.tsx
10
- function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel", trackLabel: h = "Diapositivas", slideSize: g, controls: _ = !0, indicators: v = !1, autoplay: y, prevLabel: b = "Anterior", nextLabel: x = "Siguiente", indicatorLabel: S = (e) => `Ir a la diapositiva ${e + 1}`, pauseLabel: C = "Pausar", playLabel: w = "Reproducir", slideStatusLabel: T = (e, t) => `Diapositiva ${e + 1} de ${t}`, className: E, id: D }) {
11
- let O = s(null), [k, A] = c(0), j = s(0), [M, N] = c(!1), [P, F] = c(!1), I = i.count(f), L = y !== void 0 && !P, R = (e) => Array.from(e.children), z = a((e) => {
12
- let t = O.current;
11
+ function p({ children: p, label: m, roleDescription: h, trackLabel: g, slideSize: _, controls: v = !0, indicators: y = !1, autoplay: b, prevLabel: x, nextLabel: S, indicatorLabel: C, pauseLabel: w, playLabel: T, slideStatusLabel: E, className: D, id: O }) {
12
+ let k = e("carousel"), A = c(null), [j, M] = l(0), N = c(0), [P, F] = l(!1), [I, L] = l(!1), R = a.count(p), z = b !== void 0 && !I, B = (e) => Array.from(e.children), V = o((e) => {
13
+ let t = A.current;
13
14
  if (!t) return;
14
- let n = R(t);
15
+ let n = B(t);
15
16
  if (n.length === 0) return;
16
17
  let r = n[(e + n.length) % n.length], i = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
17
18
  t.scrollTo({
@@ -19,106 +20,107 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
19
20
  behavior: i ? "auto" : "smooth"
20
21
  });
21
22
  }, []);
22
- o(() => {
23
- let e = O.current;
23
+ s(() => {
24
+ let e = A.current;
24
25
  if (!e) return;
25
26
  let t = () => {
26
- let t = R(e);
27
+ let t = B(e);
27
28
  if (t.length === 0) return;
28
29
  let n = t[0].offsetLeft, r = 0, i = Infinity;
29
30
  t.forEach((t, a) => {
30
31
  let o = Math.abs(t.offsetLeft - n - e.scrollLeft);
31
32
  o < i && (i = o, r = a);
32
- }), j.current = r, A(r);
33
+ }), N.current = r, M(r);
33
34
  };
34
35
  return t(), e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
35
- }, [f]), o(() => {
36
- if (!y || P || M || I < 2 || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
37
- let e = window.setInterval(() => z(j.current + 1), y);
36
+ }, [p]), s(() => {
37
+ if (!b || I || P || R < 2 || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
38
+ let e = window.setInterval(() => V(N.current + 1), b);
38
39
  return () => window.clearInterval(e);
39
40
  }, [
40
- y,
41
- P,
42
- M,
41
+ b,
43
42
  I,
44
- z
43
+ P,
44
+ R,
45
+ V
45
46
  ]);
46
- let B = (e) => {
47
- e.key === "ArrowRight" ? (e.preventDefault(), z(k + 1)) : e.key === "ArrowLeft" && (e.preventDefault(), z(k - 1));
47
+ let H = (e) => {
48
+ e.key === "ArrowRight" ? (e.preventDefault(), V(j + 1)) : e.key === "ArrowLeft" && (e.preventDefault(), V(j - 1));
48
49
  };
49
- return /* @__PURE__ */ d("div", {
50
- id: D,
51
- ref: r({ "--carousel-slide-size": g }),
52
- className: ["carousel", E].filter(Boolean).join(" "),
50
+ return /* @__PURE__ */ f("div", {
51
+ id: O,
52
+ ref: i({ "--carousel-slide-size": _ }),
53
+ className: ["carousel", D].filter(Boolean).join(" "),
53
54
  role: "region",
54
- "aria-roledescription": m,
55
- "aria-label": p,
56
- onMouseEnter: () => N(!0),
57
- onMouseLeave: () => N(!1),
58
- onFocus: () => N(!0),
59
- onBlur: () => N(!1),
55
+ "aria-roledescription": k("roleDescription", h),
56
+ "aria-label": k("label", m),
57
+ onMouseEnter: () => F(!0),
58
+ onMouseLeave: () => F(!1),
59
+ onFocus: () => F(!0),
60
+ onBlur: () => F(!1),
60
61
  children: [
61
- /* @__PURE__ */ u("div", {
62
- ref: O,
62
+ /* @__PURE__ */ d("div", {
63
+ ref: A,
63
64
  className: "carousel__track",
64
65
  tabIndex: 0,
65
66
  role: "group",
66
- "aria-label": h,
67
- onKeyDown: B,
68
- children: f
67
+ "aria-label": k("track", g),
68
+ onKeyDown: H,
69
+ children: p
69
70
  }),
70
- /* @__PURE__ */ u(t, {
71
+ /* @__PURE__ */ d(n, {
71
72
  as: "div",
72
73
  role: "status",
73
- "aria-live": L ? "off" : "polite",
74
+ "aria-live": z ? "off" : "polite",
74
75
  "aria-atomic": "true",
75
- children: T(k, I)
76
+ children: k("slideStatus", E)(j, R)
76
77
  }),
77
- (_ || v || y !== void 0) && /* @__PURE__ */ d("div", {
78
+ (v || y || b !== void 0) && /* @__PURE__ */ f("div", {
78
79
  className: "carousel__controls",
79
- children: [v && /* @__PURE__ */ u("div", {
80
+ children: [y && /* @__PURE__ */ d("div", {
80
81
  className: "carousel__indicators",
81
- children: Array.from({ length: I }, (e, t) => /* @__PURE__ */ u("button", {
82
+ children: Array.from({ length: R }, (e, t) => /* @__PURE__ */ d("button", {
82
83
  type: "button",
83
84
  className: "carousel__indicator",
84
- "aria-label": S(t),
85
- "aria-current": t === k ? "true" : void 0,
86
- onClick: () => z(t)
85
+ "aria-label": k("indicator", C)(t),
86
+ "aria-current": t === j ? "true" : void 0,
87
+ onClick: () => V(t)
87
88
  }, t))
88
- }), (_ || y !== void 0) && /* @__PURE__ */ d("div", {
89
+ }), (v || b !== void 0) && /* @__PURE__ */ f("div", {
89
90
  className: "carousel__buttons",
90
- children: [y !== void 0 && /* @__PURE__ */ u(n, {
91
+ children: [b !== void 0 && /* @__PURE__ */ d(r, {
91
92
  variant: "ghost",
92
93
  iconOnly: !0,
93
- "aria-label": L ? C : w,
94
- onClick: () => F((e) => !e),
95
- children: /* @__PURE__ */ u(e, { name: L ? "pause" : "play" })
96
- }), _ && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(n, {
94
+ "aria-label": z ? k("pause", w) : k("play", T),
95
+ onClick: () => L((e) => !e),
96
+ children: /* @__PURE__ */ d(t, { name: z ? "pause" : "play" })
97
+ }), v && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(r, {
97
98
  variant: "ghost",
98
99
  iconOnly: !0,
99
- "aria-label": b,
100
- onClick: () => z(k - 1),
101
- children: /* @__PURE__ */ u(e, { name: "arrow-left" })
102
- }), /* @__PURE__ */ u(n, {
100
+ "aria-label": k("previous", x),
101
+ onClick: () => V(j - 1),
102
+ children: /* @__PURE__ */ d(t, { name: "arrow-left" })
103
+ }), /* @__PURE__ */ d(r, {
103
104
  variant: "ghost",
104
105
  iconOnly: !0,
105
- "aria-label": x,
106
- onClick: () => z(k + 1),
107
- children: /* @__PURE__ */ u(e, { name: "arrow" })
106
+ "aria-label": k("next", S),
107
+ onClick: () => V(j + 1),
108
+ children: /* @__PURE__ */ d(t, { name: "arrow" })
108
109
  })] })]
109
110
  })]
110
111
  })
111
112
  ]
112
113
  });
113
114
  }
114
- function p({ roleDescription: e = "diapositiva", className: t, children: n, ...r }) {
115
- return /* @__PURE__ */ u("div", {
116
- className: ["carousel__slide", t].filter(Boolean).join(" "),
115
+ function m({ roleDescription: t, className: n, children: r, ...i }) {
116
+ let a = e("carousel");
117
+ return /* @__PURE__ */ d("div", {
118
+ className: ["carousel__slide", n].filter(Boolean).join(" "),
117
119
  role: "group",
118
- "aria-roledescription": e,
119
- ...r,
120
- children: n
120
+ "aria-roledescription": a("slideRoleDescription", t),
121
+ ...i,
122
+ children: r
121
123
  });
122
124
  }
123
125
  //#endregion
124
- export { f as Carousel, p as CarouselSlide };
126
+ export { p as Carousel, m as CarouselSlide };