@studiolxd/brand 39.0.0 → 40.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.
Files changed (132) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/_shared/brandmessagescontext.js +15 -0
  3. package/dist/_shared/calendargrid.js +42 -42
  4. package/dist/_shared/datepicker.js +41 -41
  5. package/dist/_shared/imagecropdialog.js +54 -54
  6. package/dist/_shared/tokens.js +1 -0
  7. package/dist/_types/messages/BrandMessages.d.ts +26 -0
  8. package/dist/_types/messages/BrandMessagesContext.d.ts +21 -0
  9. package/dist/_types/messages/BrandMessagesProvider.d.ts +46 -0
  10. package/dist/_types/messages/index.d.ts +5 -0
  11. package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
  12. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +27 -5
  13. package/dist/_types/organisms/DataTable/DataTable.d.ts +3 -2
  14. package/dist/accordion.js +26 -26
  15. package/dist/alert.js +26 -26
  16. package/dist/annotation-thread.css +1 -1
  17. package/dist/annotation-thread.js +37 -26
  18. package/dist/app-header.js +8 -8
  19. package/dist/app-launcher.js +34 -34
  20. package/dist/app-shell.js +14 -14
  21. package/dist/assistant-message.js +8 -8
  22. package/dist/async-multi-select-field.js +9 -9
  23. package/dist/async-multi-select.js +40 -40
  24. package/dist/async-select-field.js +9 -9
  25. package/dist/async-select.js +64 -64
  26. package/dist/avatar-upload.js +40 -40
  27. package/dist/avatar.js +5 -5
  28. package/dist/banner.js +9 -9
  29. package/dist/brand.css +2 -1
  30. package/dist/button.js +7 -7
  31. package/dist/calendar-planner.js +16 -16
  32. package/dist/calendar.js +38 -38
  33. package/dist/card.js +28 -28
  34. package/dist/carousel.js +19 -19
  35. package/dist/chart.js +137 -137
  36. package/dist/chat-shell.js +23 -23
  37. package/dist/checkbox-field.js +11 -11
  38. package/dist/checkbox.js +7 -7
  39. package/dist/close-button.js +6 -6
  40. package/dist/code-block.js +15 -15
  41. package/dist/code.js +5 -5
  42. package/dist/collapsible.js +1 -1
  43. package/dist/columns.js +7 -7
  44. package/dist/command-palette.js +14 -14
  45. package/dist/confirm-dialog.js +10 -10
  46. package/dist/connector-auth-shell.js +9 -9
  47. package/dist/consent.js +23 -23
  48. package/dist/container.js +6 -6
  49. package/dist/conversation-list.js +19 -19
  50. package/dist/conversation-thread.js +15 -15
  51. package/dist/copy-button.js +9 -9
  52. package/dist/copyable-value.js +17 -17
  53. package/dist/data-table.js +29 -29
  54. package/dist/date-picker-field.js +9 -9
  55. package/dist/date-time-field.js +12 -12
  56. package/dist/description-list.js +12 -12
  57. package/dist/docs-search.js +1 -1
  58. package/dist/dots-button.js +7 -7
  59. package/dist/dropdown-field.js +13 -13
  60. package/dist/email.js +44 -44
  61. package/dist/error-text.js +4 -4
  62. package/dist/field-row.js +20 -20
  63. package/dist/figure.js +8 -8
  64. package/dist/file-upload-field.js +9 -9
  65. package/dist/file-upload.js +29 -29
  66. package/dist/filter-bar.js +10 -10
  67. package/dist/floating-dock.js +17 -17
  68. package/dist/form-field.js +43 -43
  69. package/dist/form.js +14 -14
  70. package/dist/heading.js +5 -5
  71. package/dist/input-field.js +20 -20
  72. package/dist/input-phone-field.js +9 -9
  73. package/dist/input-phone.js +19 -19
  74. package/dist/input.js +5 -5
  75. package/dist/kbd.js +5 -5
  76. package/dist/label.js +5 -5
  77. package/dist/link.js +7 -7
  78. package/dist/list.js +7 -7
  79. package/dist/menu-button.js +7 -7
  80. package/dist/message-bubble.js +5 -5
  81. package/dist/message-composer.js +13 -13
  82. package/dist/messages.js +12 -0
  83. package/dist/multi-select-field.js +9 -9
  84. package/dist/multi-select.js +52 -52
  85. package/dist/notification-button.js +8 -8
  86. package/dist/notification-panel.js +25 -25
  87. package/dist/number-input-field.js +9 -9
  88. package/dist/number-input.js +11 -11
  89. package/dist/otp-field.js +9 -9
  90. package/dist/otp-input.js +48 -48
  91. package/dist/pagination.js +92 -89
  92. package/dist/paragraph.js +5 -5
  93. package/dist/password-field.js +15 -15
  94. package/dist/prose.js +4 -4
  95. package/dist/public-page-shell.js +11 -11
  96. package/dist/radio-field.js +11 -11
  97. package/dist/radio-group.js +5 -5
  98. package/dist/radio.js +5 -5
  99. package/dist/scroll-area.js +11 -11
  100. package/dist/search-form.js +8 -8
  101. package/dist/select-field.js +9 -9
  102. package/dist/select.js +85 -85
  103. package/dist/separator.js +6 -6
  104. package/dist/sidebar.js +16 -16
  105. package/dist/site-header.js +14 -14
  106. package/dist/site-shell.js +6 -6
  107. package/dist/sparkline.js +9 -9
  108. package/dist/star-rating.js +24 -24
  109. package/dist/stat-tile.js +12 -12
  110. package/dist/steps.js +32 -32
  111. package/dist/switcher-field.js +13 -13
  112. package/dist/switcher.js +8 -8
  113. package/dist/table-of-contents.js +14 -14
  114. package/dist/tag.js +5 -5
  115. package/dist/text.js +7 -7
  116. package/dist/textarea-field.js +11 -11
  117. package/dist/textarea.js +5 -5
  118. package/dist/time-field.js +9 -9
  119. package/dist/time-select.js +17 -17
  120. package/dist/toaster.js +16 -16
  121. package/dist/toggle-group.js +7 -7
  122. package/dist/toggle.js +5 -5
  123. package/dist/tokens.css +2 -1
  124. package/dist/tooltip.js +16 -16
  125. package/dist/tree-view.js +41 -41
  126. package/dist/uptime-bars.js +34 -34
  127. package/dist/user-message.js +8 -8
  128. package/dist/visually-hidden.js +5 -5
  129. package/package.json +5 -1
  130. package/src/tokens/molecules/annotation-thread.css +1 -0
  131. package/src/tokens/scss/molecules/_annotation-thread.scss +1 -0
  132. package/src/tokens/tokens.json +1 -0
package/dist/button.js CHANGED
@@ -1,15 +1,15 @@
1
1
  'use client';
2
2
  import './button.css';
3
3
  import { n as e } from "./_shared/form-size.js";
4
- import { jsx as t } from "react/jsx-runtime";
5
- import { forwardRef as n } from "react";
4
+ import { forwardRef as t } from "react";
5
+ import { jsx as n } from "react/jsx-runtime";
6
6
  import { useRender as r } from "@base-ui/react/use-render";
7
7
  //#region src/stories/atoms/Button/Button.tsx
8
- var i = n(function({ variant: n = "primary", tone: i = "accent", destructive: a = !1, size: o, block: s = !1, iconOnly: c = !1, children: l, type: u = "button", disabled: d, onClick: f, href: p, external: m = !1, render: h, className: g, ..._ }, v) {
8
+ var i = t(function({ variant: t = "primary", tone: i = "accent", destructive: a = !1, size: o, block: s = !1, iconOnly: c = !1, children: l, type: u = "button", disabled: d, onClick: f, href: p, external: m = !1, render: h, className: g, ..._ }, v) {
9
9
  let y = e(o), b = [
10
10
  "button",
11
- `button--${n}`,
12
- n === "text" && i === "ink" ? "button--ink" : "",
11
+ `button--${t}`,
12
+ t === "text" && i === "ink" ? "button--ink" : "",
13
13
  a ? "button--destructive-intent" : "",
14
14
  y === "md" ? "" : `button--${y}`,
15
15
  s === "mobile" ? "button--block-mobile" : s ? "button--block" : "",
@@ -33,7 +33,7 @@ var i = n(function({ variant: n = "primary", tone: i = "accent", destructive: a
33
33
  ..._,
34
34
  children: l
35
35
  }
36
- }) || (p === void 0 ? /* @__PURE__ */ t("button", {
36
+ }) || (p === void 0 ? /* @__PURE__ */ n("button", {
37
37
  ref: v,
38
38
  className: b,
39
39
  type: u,
@@ -41,7 +41,7 @@ var i = n(function({ variant: n = "primary", tone: i = "accent", destructive: a
41
41
  onClick: f,
42
42
  ..._,
43
43
  children: l
44
- }) : /* @__PURE__ */ t("a", {
44
+ }) : /* @__PURE__ */ n("a", {
45
45
  ref: v,
46
46
  className: b,
47
47
  href: d ? void 0 : p,
@@ -4,11 +4,11 @@ import { VisuallyHidden as e } from "./visually-hidden.js";
4
4
  import { Tag as t } from "./tag.js";
5
5
  import { Modal as n } from "./modal.js";
6
6
  import { c as r, i, l as a, n as o, o as s, r as c, s as l, t as u } from "./_shared/calendargrid.js";
7
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
8
- import { useCallback as m, useId as h, useState as g } from "react";
7
+ import { useCallback as d, useId as f, useState as p } from "react";
8
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
9
9
  //#region src/stories/molecules/CalendarPlanner/CalendarPlanner.tsx
10
10
  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 = "Mes anterior", nextMonthLabel: k = "Mes siguiente", gridLabel: A, moreLabel: j = (e) => `+${e} más`, size: M = "md", className: N }) {
11
- let [P, F] = g(() => C ?? w ?? /* @__PURE__ */ new Date()), [I, L] = g(null), R = x ?? !b, z = m(() => L(null), []), B = C ?? P, V = m((e) => {
11
+ let [P, F] = p(() => C ?? w ?? /* @__PURE__ */ new Date()), [I, L] = p(null), R = x ?? !b, z = d(() => L(null), []), B = C ?? P, V = d((e) => {
12
12
  F(e), T?.(e);
13
13
  }, [T]), H = /* @__PURE__ */ new Date(), U = M === "sm" ? "xs" : M === "lg" ? "md" : "sm", W = new Intl.DateTimeFormat(D, {
14
14
  month: "long",
@@ -27,8 +27,8 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
27
27
  month: B,
28
28
  onMonthChange: V,
29
29
  onActivate: S ? (e) => S(e, Z(e)) : void 0
30
- }), $ = `${h()}-planner-title-${B.getFullYear()}-${B.getMonth()}`;
31
- return /* @__PURE__ */ p("div", {
30
+ }), $ = `${f()}-planner-title-${B.getFullYear()}-${B.getMonth()}`;
31
+ return /* @__PURE__ */ g("div", {
32
32
  className: [
33
33
  "calendar-planner",
34
34
  `calendar-planner--${M}`,
@@ -46,7 +46,7 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
46
46
  onNext: () => V(X),
47
47
  chevronSize: U
48
48
  }),
49
- /* @__PURE__ */ p("div", {
49
+ /* @__PURE__ */ g("div", {
50
50
  className: "calendar-planner__grid",
51
51
  role: "grid",
52
52
  "aria-label": A,
@@ -56,7 +56,7 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
56
56
  block: "calendar-planner",
57
57
  rowModifier: "header",
58
58
  weekdays: q
59
- }), J.map((n, r) => /* @__PURE__ */ f("div", {
59
+ }), J.map((n, r) => /* @__PURE__ */ h("div", {
60
60
  role: "row",
61
61
  className: "calendar-planner__row",
62
62
  children: n.map(({ date: n, outside: r }) => {
@@ -69,7 +69,7 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
69
69
  a && "calendar-planner__day-number--today",
70
70
  r && "calendar-planner__day-number--outside"
71
71
  ].filter(Boolean).join(" ");
72
- return /* @__PURE__ */ p("div", {
72
+ return /* @__PURE__ */ g("div", {
73
73
  ref: S ? Q.cellRef(n) : void 0,
74
74
  role: "gridcell",
75
75
  className: [l, S ? "calendar-planner__cell--clickable" : ""].filter(Boolean).join(" "),
@@ -77,18 +77,18 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
77
77
  tabIndex: S ? Q.isTabbable(n) ? 0 : -1 : void 0,
78
78
  onFocus: S ? () => Q.onCellFocus(n) : void 0,
79
79
  onClick: S ? () => S(n, o) : void 0,
80
- children: [/* @__PURE__ */ p("span", {
80
+ children: [/* @__PURE__ */ g("span", {
81
81
  className: u,
82
- children: [/* @__PURE__ */ f(e, { children: G.format(n) }), /* @__PURE__ */ f("span", {
82
+ children: [/* @__PURE__ */ h(e, { children: G.format(n) }), /* @__PURE__ */ h("span", {
83
83
  "aria-hidden": "true",
84
84
  children: n.getDate()
85
85
  })]
86
- }), /* @__PURE__ */ f("div", {
86
+ }), /* @__PURE__ */ h("div", {
87
87
  className: "calendar-planner__cell-body",
88
- children: v ? v(n, o) : /* @__PURE__ */ p(d, { children: [s.map((e) => /* @__PURE__ */ f(t, {
88
+ children: v ? v(n, o) : /* @__PURE__ */ g(m, { children: [s.map((e) => /* @__PURE__ */ h(t, {
89
89
  variant: e.variant ?? "neutral",
90
90
  children: e.label
91
- }, e.id)), c > 0 && /* @__PURE__ */ f("button", {
91
+ }, e.id)), c > 0 && /* @__PURE__ */ h("button", {
92
92
  type: "button",
93
93
  className: "calendar-planner__more",
94
94
  onClick: (e) => {
@@ -104,13 +104,13 @@ function _({ events: _ = [], renderDay: v, maxItemsPerDay: y = 3, onMoreClick: b
104
104
  })
105
105
  }, r))]
106
106
  }),
107
- /* @__PURE__ */ f(n, {
107
+ /* @__PURE__ */ h(n, {
108
108
  open: I !== null,
109
109
  onClose: z,
110
110
  title: I ? K.format(I.date) : void 0,
111
- children: /* @__PURE__ */ f("div", {
111
+ children: /* @__PURE__ */ h("div", {
112
112
  className: "calendar-planner__modal-events",
113
- children: I?.events.map((e) => /* @__PURE__ */ f(t, {
113
+ children: I?.events.map((e) => /* @__PURE__ */ h(t, {
114
114
  variant: e.variant ?? "neutral",
115
115
  children: e.label
116
116
  }, e.id))
package/dist/calendar.js CHANGED
@@ -1,17 +1,17 @@
1
1
  'use client';
2
2
  import './calendar.css';
3
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s as ee, t as s } from "./_shared/calendargrid.js";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- import { useCallback as u, useEffect as te, useId as ne, useRef as d, useState as f } from "react";
3
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s as ee, t as te } from "./_shared/calendargrid.js";
4
+ import { useCallback as s, useEffect as c, useId as ne, useRef as l, useState as u } from "react";
5
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
6
  //#region src/stories/molecules/Calendar/Calendar.tsx
7
7
  var p = 12, m = 4;
8
8
  function h(e) {
9
9
  return Math.floor(e / p) * p;
10
10
  }
11
- function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b, navigable: re = !0, disabledDates: x, minDate: S, maxDate: C, locale: w = "es-ES", previousMonthLabel: ie = "Mes anterior", nextMonthLabel: ae = "Mes siguiente", previousYearsLabel: T = "Años anteriores", nextYearsLabel: E = "Años siguientes", yearGridLabel: oe = "Elegir año", gridLabel: D, size: O = "md", className: k }) {
12
- let [A, se] = f(() => y ?? v ?? (g instanceof Date ? g : /* @__PURE__ */ new Date())), j = y ?? A, M = u((e) => {
13
- se(e), b?.(e);
14
- }, [b]), N = /* @__PURE__ */ new Date(), ce = u((e) => S && e < S || C && e > C ? !0 : Array.isArray(x) ? x.some((t) => n(t, e)) : typeof x == "function" ? x(e) : !1, [
11
+ function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b, navigable: re = !0, disabledDates: x, minDate: S, maxDate: C, locale: w = "es-ES", previousMonthLabel: T = "Mes anterior", nextMonthLabel: ie = "Mes siguiente", previousYearsLabel: ae = "Años anteriores", nextYearsLabel: oe = "Años siguientes", yearGridLabel: se = "Elegir año", gridLabel: E, size: D = "md", className: O }) {
12
+ let [k, A] = u(() => y ?? v ?? (g instanceof Date ? g : /* @__PURE__ */ new Date())), j = y ?? k, M = s((e) => {
13
+ A(e), b?.(e);
14
+ }, [b]), N = /* @__PURE__ */ new Date(), ce = s((e) => S && e < S || C && e > C ? !0 : Array.isArray(x) ? x.some((t) => n(t, e)) : typeof x == "function" ? x(e) : !1, [
15
15
  x,
16
16
  S,
17
17
  C
@@ -21,32 +21,32 @@ function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b,
21
21
  selected: g ?? null,
22
22
  minDate: S,
23
23
  maxDate: C
24
- }), [F, I] = f("days"), [L, R] = f(() => h(j.getFullYear())), [z, B] = f(() => j.getFullYear()), V = d(null), H = d(/* @__PURE__ */ new Map()), U = d(null), W = u(() => {
24
+ }), [F, I] = u("days"), [L, R] = u(() => h(j.getFullYear())), [z, B] = u(() => j.getFullYear()), V = l(null), H = l(/* @__PURE__ */ new Map()), U = l(null), W = s(() => {
25
25
  let e = j.getFullYear();
26
26
  R(h(e)), B(e), U.current = "year", I("years");
27
- }, [j]), G = u(() => {
27
+ }, [j]), G = s(() => {
28
28
  U.current = "title", I("days");
29
- }, []), K = u((e) => {
29
+ }, []), le = s((e) => {
30
30
  M(new Date(e, j.getMonth(), 1)), G();
31
31
  }, [
32
32
  G,
33
33
  j,
34
34
  M
35
35
  ]);
36
- te(() => {
36
+ c(() => {
37
37
  if (!U.current) return;
38
38
  let e = U.current;
39
39
  U.current = null, e === "title" ? V.current?.focus() : H.current.get(z)?.focus();
40
40
  }, [F, z]);
41
- let le = O === "sm" ? "xs" : O === "lg" ? "md" : "sm", ue = new Intl.DateTimeFormat(w, {
41
+ let ue = D === "sm" ? "xs" : D === "lg" ? "md" : "sm", de = new Intl.DateTimeFormat(w, {
42
42
  month: "long",
43
43
  year: "numeric"
44
- }).format(j), de = new Intl.DateTimeFormat(w, { year: "numeric" }), q = (e) => de.format(new Date(e, 0, 1)), fe = Array.from({ length: p }, (e, t) => L + t), pe = `${q(L)}–${q(L + p - 1)}`, me = new Intl.DateTimeFormat(w, {
44
+ }).format(j), fe = new Intl.DateTimeFormat(w, { year: "numeric" }), K = (e) => fe.format(new Date(e, 0, 1)), pe = Array.from({ length: p }, (e, t) => L + t), me = `${K(L)}–${K(L + p - 1)}`, he = new Intl.DateTimeFormat(w, {
45
45
  weekday: "long",
46
46
  day: "numeric",
47
47
  month: "long",
48
48
  year: "numeric"
49
- }), he = o(w, "narrow"), ge = s(i(j)), J = t(j, -1), Y = t(j, 1), _e = S ? !e(J, S) && J < S : !1, ve = C ? !e(Y, C) && Y > C : !1, ye = (e) => (S ? e < S.getFullYear() : !1) || (C ? e > C.getFullYear() : !1), be = S ? L - 1 < S.getFullYear() : !1, xe = C ? L + p > C.getFullYear() : !1, X = F === "years", Z = z >= L && z <= L + p - 1 ? z : L, Se = (e) => {
49
+ }), ge = o(w, "narrow"), _e = te(i(j)), q = t(j, -1), J = t(j, 1), Y = S ? !e(q, S) && q < S : !1, ve = C ? !e(J, C) && J > C : !1, ye = (e) => (S ? e < S.getFullYear() : !1) || (C ? e > C.getFullYear() : !1), be = S ? L - 1 < S.getFullYear() : !1, xe = C ? L + p > C.getFullYear() : !1, X = F === "years", Z = z >= L && z <= L + p - 1 ? z : L, Se = (e) => {
50
50
  (e < L || e > L + p - 1) && R(h(e)), U.current = "year", B(e);
51
51
  }, Ce = (e) => {
52
52
  let t = null;
@@ -82,38 +82,38 @@ function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b,
82
82
  }
83
83
  e.preventDefault(), Se(t);
84
84
  }, Q = ne(), $ = X ? `${Q}-calendar-title-${L}` : `${Q}-calendar-title-${j.getFullYear()}-${j.getMonth()}`;
85
- return /* @__PURE__ */ l("div", {
85
+ return /* @__PURE__ */ f("div", {
86
86
  className: [
87
87
  "calendar",
88
- `calendar--${O}`,
89
- k
88
+ `calendar--${D}`,
89
+ O
90
90
  ].filter(Boolean).join(" "),
91
91
  children: [a({
92
92
  block: "calendar",
93
- title: X ? pe : ue,
93
+ title: X ? me : de,
94
94
  titleId: $,
95
95
  navigable: re,
96
- previousLabel: X ? T : ie,
97
- nextLabel: X ? E : ae,
98
- prevDisabled: X ? be : _e,
96
+ previousLabel: X ? ae : T,
97
+ nextLabel: X ? oe : ie,
98
+ prevDisabled: X ? be : Y,
99
99
  nextDisabled: X ? xe : ve,
100
- onPrev: X ? () => R(L - p) : () => M(J),
101
- onNext: X ? () => R(L + p) : () => M(Y),
102
- chevronSize: le,
100
+ onPrev: X ? () => R(L - p) : () => M(q),
101
+ onNext: X ? () => R(L + p) : () => M(J),
102
+ chevronSize: ue,
103
103
  onTitleClick: X ? G : W,
104
104
  titleExpanded: X,
105
105
  titleRef: V
106
- }), X ? /* @__PURE__ */ c("div", {
106
+ }), X ? /* @__PURE__ */ d("div", {
107
107
  className: "calendar__years",
108
108
  role: "grid",
109
- "aria-label": oe,
109
+ "aria-label": se,
110
110
  onKeyDown: Ce,
111
- children: Array.from({ length: p / m }, (e, t) => /* @__PURE__ */ c("div", {
111
+ children: Array.from({ length: p / m }, (e, t) => /* @__PURE__ */ d("div", {
112
112
  role: "row",
113
113
  className: "calendar__row",
114
- children: fe.slice(t * m, t * m + m).map((e) => {
114
+ children: pe.slice(t * m, t * m + m).map((e) => {
115
115
  let t = ye(e), n = e === N.getFullYear(), r = g instanceof Date ? g.getFullYear() === e : !1;
116
- return /* @__PURE__ */ c("button", {
116
+ return /* @__PURE__ */ d("button", {
117
117
  ref: (t) => {
118
118
  t ? H.current.set(e, t) : H.current.delete(e);
119
119
  },
@@ -130,21 +130,21 @@ function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b,
130
130
  "aria-current": n ? "date" : void 0,
131
131
  tabIndex: e === Z ? 0 : -1,
132
132
  onFocus: () => B(e),
133
- onClick: t ? void 0 : () => K(e),
134
- children: q(e)
133
+ onClick: t ? void 0 : () => le(e),
134
+ children: K(e)
135
135
  }, e);
136
136
  })
137
137
  }, t))
138
- }) : /* @__PURE__ */ l("div", {
138
+ }) : /* @__PURE__ */ f("div", {
139
139
  className: "calendar__grid",
140
140
  role: "grid",
141
- "aria-label": D,
142
- "aria-labelledby": D ? void 0 : $,
141
+ "aria-label": E,
142
+ "aria-labelledby": E ? void 0 : $,
143
143
  onKeyDown: P.onKeyDown,
144
144
  children: [ee({
145
145
  block: "calendar",
146
- weekdays: he
147
- }), ge.map((e, t) => /* @__PURE__ */ c("div", {
146
+ weekdays: ge
147
+ }), _e.map((e, t) => /* @__PURE__ */ d("div", {
148
148
  role: "row",
149
149
  className: "calendar__row",
150
150
  children: e.map(({ date: e, outside: t }) => {
@@ -155,12 +155,12 @@ function g({ value: g, onChange: _, defaultMonth: v, month: y, onMonthChange: b,
155
155
  a && "calendar__day--selected",
156
156
  r && "calendar__day--disabled"
157
157
  ].filter(Boolean).join(" ");
158
- return /* @__PURE__ */ c("button", {
158
+ return /* @__PURE__ */ d("button", {
159
159
  ref: P.cellRef(e),
160
160
  type: "button",
161
161
  role: "gridcell",
162
162
  className: o,
163
- "aria-label": me.format(e),
163
+ "aria-label": he.format(e),
164
164
  "aria-selected": a,
165
165
  "aria-disabled": r ? "true" : void 0,
166
166
  "aria-current": i ? "date" : void 0,
package/dist/card.js CHANGED
@@ -4,11 +4,11 @@ import { VisuallyHidden as e } from "./visually-hidden.js";
4
4
  import { Arrow as t } from "./arrow.js";
5
5
  import { Heading as n } from "./heading.js";
6
6
  import { Paragraph as r } from "./paragraph.js";
7
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { forwardRef as s } from "react";
7
+ import { forwardRef as i } from "react";
8
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
9
9
  import { useRender as c } from "@base-ui/react/use-render";
10
10
  //#region src/stories/molecules/Card/Card.tsx
11
- var l = s(function({ href: r, render: s, external: l = !1, title: u, description: d, ctaLabel: f, color: p = "outline", variant: m = "default", media: h, selectable: g = !1, selected: _ = !1, className: v, children: y, ...b }, x) {
11
+ var l = i(function({ href: r, render: i, external: l = !1, title: u, description: d, ctaLabel: f, color: p = "outline", variant: m = "default", media: h, selectable: g = !1, selected: _ = !1, className: v, children: y, ...b }, x) {
12
12
  let S = [
13
13
  "card",
14
14
  `card--${p}`,
@@ -16,40 +16,40 @@ var l = s(function({ href: r, render: s, external: l = !1, title: u, description
16
16
  g ? "card--selectable" : "",
17
17
  g && _ ? "card--selected" : "",
18
18
  v ?? ""
19
- ].filter(Boolean).join(" "), C = /* @__PURE__ */ o(i, { children: [
20
- u !== void 0 && /* @__PURE__ */ a(n, {
19
+ ].filter(Boolean).join(" "), C = /* @__PURE__ */ s(a, { children: [
20
+ u !== void 0 && /* @__PURE__ */ o(n, {
21
21
  level: 2,
22
22
  size: 8,
23
23
  children: u
24
24
  }),
25
- d && (typeof d == "string" ? /* @__PURE__ */ a("p", { children: d }) : d),
25
+ d && (typeof d == "string" ? /* @__PURE__ */ o("p", { children: d }) : d),
26
26
  y,
27
- f !== void 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(e, { children: f }), /* @__PURE__ */ a(t, { size: "lg" })] })
28
- ] }), w = h && /* @__PURE__ */ a("div", {
27
+ f !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(e, { children: f }), /* @__PURE__ */ o(t, { size: "lg" })] })
28
+ ] }), w = h && /* @__PURE__ */ o("div", {
29
29
  className: "card__media",
30
- children: /* @__PURE__ */ a("img", {
30
+ children: /* @__PURE__ */ o("img", {
31
31
  src: h.src,
32
32
  alt: h.alt
33
33
  })
34
- }), T = m === "default" && !h ? C : /* @__PURE__ */ o(i, { children: [w, /* @__PURE__ */ a("div", {
34
+ }), T = m === "default" && !h ? C : /* @__PURE__ */ s(a, { children: [w, /* @__PURE__ */ o("div", {
35
35
  className: "card__body",
36
36
  children: C
37
37
  })] });
38
38
  return c({
39
- render: s,
39
+ render: i,
40
40
  ref: x,
41
- enabled: s !== void 0,
41
+ enabled: i !== void 0,
42
42
  props: {
43
43
  className: S,
44
44
  ...b,
45
45
  children: T
46
46
  }
47
- }) || (r === void 0 ? /* @__PURE__ */ a("div", {
47
+ }) || (r === void 0 ? /* @__PURE__ */ o("div", {
48
48
  ref: x,
49
49
  className: S,
50
50
  ...b,
51
51
  children: y
52
- }) : /* @__PURE__ */ a("a", {
52
+ }) : /* @__PURE__ */ o("a", {
53
53
  ref: x,
54
54
  href: r,
55
55
  className: S,
@@ -60,23 +60,23 @@ var l = s(function({ href: r, render: s, external: l = !1, title: u, description
60
60
  ...b,
61
61
  children: T
62
62
  }));
63
- }), u = s(function({ className: e, ...t }, n) {
64
- return /* @__PURE__ */ a("div", {
63
+ }), u = i(function({ className: e, ...t }, n) {
64
+ return /* @__PURE__ */ o("div", {
65
65
  ref: n,
66
66
  className: ["card__header", e].filter(Boolean).join(" "),
67
67
  ...t
68
68
  });
69
- }), d = s(function({ level: e = 3, size: t = 4, className: r, children: i, ...o }, s) {
70
- return /* @__PURE__ */ a(n, {
69
+ }), d = i(function({ level: e = 3, size: t = 4, className: r, children: i, ...a }, s) {
70
+ return /* @__PURE__ */ o(n, {
71
71
  ref: s,
72
72
  level: e,
73
73
  size: t,
74
74
  className: ["card__title", r].filter(Boolean).join(" "),
75
- ...o,
75
+ ...a,
76
76
  children: i
77
77
  });
78
- }), f = s(function({ size: e = "small", lines: t, className: n, children: i, ...o }, s) {
79
- return /* @__PURE__ */ a(r, {
78
+ }), f = i(function({ size: e = "small", lines: t, className: n, children: i, ...a }, s) {
79
+ return /* @__PURE__ */ o(r, {
80
80
  ref: s,
81
81
  size: e,
82
82
  className: [
@@ -84,23 +84,23 @@ var l = s(function({ href: r, render: s, external: l = !1, title: u, description
84
84
  t ? `card__description--lines-${t}` : "",
85
85
  n
86
86
  ].filter(Boolean).join(" "),
87
- ...o,
87
+ ...a,
88
88
  children: i
89
89
  });
90
- }), p = s(function({ className: e, ...t }, n) {
91
- return /* @__PURE__ */ a("div", {
90
+ }), p = i(function({ className: e, ...t }, n) {
91
+ return /* @__PURE__ */ o("div", {
92
92
  ref: n,
93
93
  className: ["card__action", e].filter(Boolean).join(" "),
94
94
  ...t
95
95
  });
96
- }), m = s(function({ className: e, ...t }, n) {
97
- return /* @__PURE__ */ a("div", {
96
+ }), m = i(function({ className: e, ...t }, n) {
97
+ return /* @__PURE__ */ o("div", {
98
98
  ref: n,
99
99
  className: ["card__content", e].filter(Boolean).join(" "),
100
100
  ...t
101
101
  });
102
- }), h = s(function({ direction: e = "row", className: t, ...n }, r) {
103
- return /* @__PURE__ */ a("div", {
102
+ }), h = i(function({ direction: e = "row", className: t, ...n }, r) {
103
+ return /* @__PURE__ */ o("div", {
104
104
  ref: r,
105
105
  className: [
106
106
  "card__footer",
package/dist/carousel.js CHANGED
@@ -4,11 +4,11 @@ import { Icon as e } from "./icon.js";
4
4
  import { VisuallyHidden as t } from "./visually-hidden.js";
5
5
  import { Button as n } from "./button.js";
6
6
  import { t as r } from "./_shared/css-properties.js";
7
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { Children as s, useCallback as c, useEffect as l, useRef as u, useState as d } from "react";
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";
9
9
  //#region src/stories/molecules/Carousel/Carousel.tsx
10
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 = u(null), [k, A] = d(0), j = u(0), [M, N] = d(!1), [P, F] = d(!1), I = s.count(f), L = y !== void 0 && !P, R = (e) => Array.from(e.children), z = c((e) => {
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
12
  let t = O.current;
13
13
  if (!t) return;
14
14
  let n = R(t);
@@ -19,7 +19,7 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
19
19
  behavior: i ? "auto" : "smooth"
20
20
  });
21
21
  }, []);
22
- l(() => {
22
+ o(() => {
23
23
  let e = O.current;
24
24
  if (!e) return;
25
25
  let t = () => {
@@ -32,7 +32,7 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
32
32
  }), j.current = r, A(r);
33
33
  };
34
34
  return t(), e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
35
- }, [f]), l(() => {
35
+ }, [f]), o(() => {
36
36
  if (!y || P || M || I < 2 || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
37
37
  let e = window.setInterval(() => z(j.current + 1), y);
38
38
  return () => window.clearInterval(e);
@@ -46,7 +46,7 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
46
46
  let B = (e) => {
47
47
  e.key === "ArrowRight" ? (e.preventDefault(), z(k + 1)) : e.key === "ArrowLeft" && (e.preventDefault(), z(k - 1));
48
48
  };
49
- return /* @__PURE__ */ o("div", {
49
+ return /* @__PURE__ */ d("div", {
50
50
  id: D,
51
51
  ref: r({ "--carousel-slide-size": g }),
52
52
  className: ["carousel", E].filter(Boolean).join(" "),
@@ -58,7 +58,7 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
58
58
  onFocus: () => N(!0),
59
59
  onBlur: () => N(!1),
60
60
  children: [
61
- /* @__PURE__ */ a("div", {
61
+ /* @__PURE__ */ u("div", {
62
62
  ref: O,
63
63
  className: "carousel__track",
64
64
  tabIndex: 0,
@@ -67,44 +67,44 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
67
67
  onKeyDown: B,
68
68
  children: f
69
69
  }),
70
- /* @__PURE__ */ a(t, {
70
+ /* @__PURE__ */ u(t, {
71
71
  as: "div",
72
72
  role: "status",
73
73
  "aria-live": L ? "off" : "polite",
74
74
  "aria-atomic": "true",
75
75
  children: T(k, I)
76
76
  }),
77
- (_ || v || y !== void 0) && /* @__PURE__ */ o("div", {
77
+ (_ || v || y !== void 0) && /* @__PURE__ */ d("div", {
78
78
  className: "carousel__controls",
79
- children: [v && /* @__PURE__ */ a("div", {
79
+ children: [v && /* @__PURE__ */ u("div", {
80
80
  className: "carousel__indicators",
81
- children: Array.from({ length: I }, (e, t) => /* @__PURE__ */ a("button", {
81
+ children: Array.from({ length: I }, (e, t) => /* @__PURE__ */ u("button", {
82
82
  type: "button",
83
83
  className: "carousel__indicator",
84
84
  "aria-label": S(t),
85
85
  "aria-current": t === k ? "true" : void 0,
86
86
  onClick: () => z(t)
87
87
  }, t))
88
- }), (_ || y !== void 0) && /* @__PURE__ */ o("div", {
88
+ }), (_ || y !== void 0) && /* @__PURE__ */ d("div", {
89
89
  className: "carousel__buttons",
90
- children: [y !== void 0 && /* @__PURE__ */ a(n, {
90
+ children: [y !== void 0 && /* @__PURE__ */ u(n, {
91
91
  variant: "ghost",
92
92
  iconOnly: !0,
93
93
  "aria-label": L ? C : w,
94
94
  onClick: () => F((e) => !e),
95
- children: /* @__PURE__ */ a(e, { name: L ? "pause" : "play" })
96
- }), _ && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, {
95
+ children: /* @__PURE__ */ u(e, { name: L ? "pause" : "play" })
96
+ }), _ && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(n, {
97
97
  variant: "ghost",
98
98
  iconOnly: !0,
99
99
  "aria-label": b,
100
100
  onClick: () => z(k - 1),
101
- children: /* @__PURE__ */ a(e, { name: "arrow-left" })
102
- }), /* @__PURE__ */ a(n, {
101
+ children: /* @__PURE__ */ u(e, { name: "arrow-left" })
102
+ }), /* @__PURE__ */ u(n, {
103
103
  variant: "ghost",
104
104
  iconOnly: !0,
105
105
  "aria-label": x,
106
106
  onClick: () => z(k + 1),
107
- children: /* @__PURE__ */ a(e, { name: "arrow" })
107
+ children: /* @__PURE__ */ u(e, { name: "arrow" })
108
108
  })] })]
109
109
  })]
110
110
  })
@@ -112,7 +112,7 @@ function f({ children: f, label: p = "Carrusel", roleDescription: m = "carrusel"
112
112
  });
113
113
  }
114
114
  function p({ roleDescription: e = "diapositiva", className: t, children: n, ...r }) {
115
- return /* @__PURE__ */ a("div", {
115
+ return /* @__PURE__ */ u("div", {
116
116
  className: ["carousel__slide", t].filter(Boolean).join(" "),
117
117
  role: "group",
118
118
  "aria-roledescription": e,