@studiolxd/brand 39.0.0 → 40.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 (124) hide show
  1. package/CHANGELOG.md +62 -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/_types/messages/BrandMessages.d.ts +26 -0
  7. package/dist/_types/messages/BrandMessagesContext.d.ts +21 -0
  8. package/dist/_types/messages/BrandMessagesProvider.d.ts +46 -0
  9. package/dist/_types/messages/index.d.ts +5 -0
  10. package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
  11. package/dist/_types/organisms/DataTable/DataTable.d.ts +3 -2
  12. package/dist/accordion.js +26 -26
  13. package/dist/alert.js +26 -26
  14. package/dist/annotation-thread.js +1 -1
  15. package/dist/app-header.js +8 -8
  16. package/dist/app-launcher.js +34 -34
  17. package/dist/app-shell.js +14 -14
  18. package/dist/assistant-message.js +8 -8
  19. package/dist/async-multi-select-field.js +9 -9
  20. package/dist/async-multi-select.js +40 -40
  21. package/dist/async-select-field.js +9 -9
  22. package/dist/async-select.js +64 -64
  23. package/dist/avatar-upload.js +40 -40
  24. package/dist/avatar.js +5 -5
  25. package/dist/banner.js +9 -9
  26. package/dist/button.js +7 -7
  27. package/dist/calendar-planner.js +16 -16
  28. package/dist/calendar.js +38 -38
  29. package/dist/card.js +28 -28
  30. package/dist/carousel.js +19 -19
  31. package/dist/chart.js +137 -137
  32. package/dist/chat-shell.js +23 -23
  33. package/dist/checkbox-field.js +11 -11
  34. package/dist/checkbox.js +7 -7
  35. package/dist/close-button.js +6 -6
  36. package/dist/code-block.js +15 -15
  37. package/dist/code.js +5 -5
  38. package/dist/collapsible.js +1 -1
  39. package/dist/columns.js +7 -7
  40. package/dist/command-palette.js +14 -14
  41. package/dist/confirm-dialog.js +10 -10
  42. package/dist/connector-auth-shell.js +9 -9
  43. package/dist/consent.js +23 -23
  44. package/dist/container.js +6 -6
  45. package/dist/conversation-list.js +19 -19
  46. package/dist/conversation-thread.js +15 -15
  47. package/dist/copy-button.js +9 -9
  48. package/dist/copyable-value.js +17 -17
  49. package/dist/data-table.js +29 -29
  50. package/dist/date-picker-field.js +9 -9
  51. package/dist/date-time-field.js +12 -12
  52. package/dist/description-list.js +12 -12
  53. package/dist/docs-search.js +1 -1
  54. package/dist/dots-button.js +7 -7
  55. package/dist/dropdown-field.js +13 -13
  56. package/dist/email.js +44 -44
  57. package/dist/error-text.js +4 -4
  58. package/dist/field-row.js +20 -20
  59. package/dist/figure.js +8 -8
  60. package/dist/file-upload-field.js +9 -9
  61. package/dist/file-upload.js +29 -29
  62. package/dist/filter-bar.js +10 -10
  63. package/dist/floating-dock.js +17 -17
  64. package/dist/form-field.js +43 -43
  65. package/dist/form.js +14 -14
  66. package/dist/heading.js +5 -5
  67. package/dist/input-field.js +20 -20
  68. package/dist/input-phone-field.js +9 -9
  69. package/dist/input-phone.js +19 -19
  70. package/dist/input.js +5 -5
  71. package/dist/kbd.js +5 -5
  72. package/dist/label.js +5 -5
  73. package/dist/link.js +7 -7
  74. package/dist/list.js +7 -7
  75. package/dist/menu-button.js +7 -7
  76. package/dist/message-bubble.js +5 -5
  77. package/dist/message-composer.js +13 -13
  78. package/dist/messages.js +12 -0
  79. package/dist/multi-select-field.js +9 -9
  80. package/dist/multi-select.js +52 -52
  81. package/dist/notification-button.js +8 -8
  82. package/dist/notification-panel.js +25 -25
  83. package/dist/number-input-field.js +9 -9
  84. package/dist/number-input.js +11 -11
  85. package/dist/otp-field.js +9 -9
  86. package/dist/otp-input.js +48 -48
  87. package/dist/pagination.js +92 -89
  88. package/dist/paragraph.js +5 -5
  89. package/dist/password-field.js +15 -15
  90. package/dist/prose.js +4 -4
  91. package/dist/public-page-shell.js +11 -11
  92. package/dist/radio-field.js +11 -11
  93. package/dist/radio-group.js +5 -5
  94. package/dist/radio.js +5 -5
  95. package/dist/scroll-area.js +11 -11
  96. package/dist/search-form.js +8 -8
  97. package/dist/select-field.js +9 -9
  98. package/dist/select.js +85 -85
  99. package/dist/separator.js +6 -6
  100. package/dist/sidebar.js +16 -16
  101. package/dist/site-header.js +14 -14
  102. package/dist/site-shell.js +6 -6
  103. package/dist/sparkline.js +9 -9
  104. package/dist/star-rating.js +24 -24
  105. package/dist/stat-tile.js +12 -12
  106. package/dist/steps.js +32 -32
  107. package/dist/switcher-field.js +13 -13
  108. package/dist/switcher.js +8 -8
  109. package/dist/table-of-contents.js +14 -14
  110. package/dist/tag.js +5 -5
  111. package/dist/text.js +7 -7
  112. package/dist/textarea-field.js +11 -11
  113. package/dist/textarea.js +5 -5
  114. package/dist/time-field.js +9 -9
  115. package/dist/time-select.js +17 -17
  116. package/dist/toaster.js +16 -16
  117. package/dist/toggle-group.js +7 -7
  118. package/dist/toggle.js +5 -5
  119. package/dist/tooltip.js +16 -16
  120. package/dist/tree-view.js +41 -41
  121. package/dist/uptime-bars.js +34 -34
  122. package/dist/user-message.js +8 -8
  123. package/dist/visually-hidden.js +5 -5
  124. package/package.json +5 -1
@@ -5,21 +5,21 @@ import { n as t } from "./_shared/form-size.js";
5
5
  import { ErrorText as n } from "./error-text.js";
6
6
  import { Label as r } from "./label.js";
7
7
  import { n as i } from "./_shared/field-labels.js";
8
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
9
- import { forwardRef as s, useId as c } from "react";
8
+ import { forwardRef as a, useId as o } from "react";
9
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
10
  //#region src/stories/molecules/AsyncSelectField/AsyncSelectField.tsx
11
- var l = s(function({ id: s, label: l, labelHidden: u, onSearch: d, value: f, onValueChange: p, selectedOption: m, placeholder: h, name: g, disabled: _, readOnly: v, size: y, debounceMs: b, required: x, error: S = !1, errorMessage: C, helperText: w, className: T, emptyMessage: E, loadingLabel: D, clearLabel: O, container: k, onBlur: A }, j) {
12
- let M = i(u), N = t(y), P = c(), F = s ?? P, I = C ? `${F}-error` : void 0, L = w ? `${F}-helper` : void 0, R = [I, L].filter(Boolean).join(" ") || void 0, z = S || !!C;
13
- return /* @__PURE__ */ o("div", {
11
+ var l = a(function({ id: a, label: l, labelHidden: u, onSearch: d, value: f, onValueChange: p, selectedOption: m, placeholder: h, name: g, disabled: _, readOnly: v, size: y, debounceMs: b, required: x, error: S = !1, errorMessage: C, helperText: w, className: T, emptyMessage: E, loadingLabel: D, clearLabel: O, container: k, onBlur: A }, j) {
12
+ let M = i(u), N = t(y), P = o(), F = a ?? P, I = C ? `${F}-error` : void 0, L = w ? `${F}-helper` : void 0, R = [I, L].filter(Boolean).join(" ") || void 0, z = S || !!C;
13
+ return /* @__PURE__ */ c("div", {
14
14
  className: ["async-select-field", T].filter(Boolean).join(" "),
15
15
  children: [
16
- /* @__PURE__ */ a(r, {
16
+ /* @__PURE__ */ s(r, {
17
17
  htmlFor: F,
18
18
  hidden: M,
19
19
  size: N,
20
20
  children: l
21
21
  }),
22
- /* @__PURE__ */ a(e, {
22
+ /* @__PURE__ */ s(e, {
23
23
  ref: j,
24
24
  id: F,
25
25
  name: g,
@@ -41,11 +41,11 @@ var l = s(function({ id: s, label: l, labelHidden: u, onSearch: d, value: f, onV
41
41
  "aria-describedby": R,
42
42
  onBlur: A
43
43
  }),
44
- C && /* @__PURE__ */ a(n, {
44
+ C && /* @__PURE__ */ s(n, {
45
45
  id: I,
46
46
  children: C
47
47
  }),
48
- w && /* @__PURE__ */ a("span", {
48
+ w && /* @__PURE__ */ s("span", {
49
49
  id: L,
50
50
  className: "async-select-field__helper",
51
51
  children: w
@@ -2,159 +2,159 @@
2
2
  import './async-select.css';
3
3
  import { Icon as e } from "./icon.js";
4
4
  import { Spinner as t } from "./spinner.js";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
- import { forwardRef as i, useCallback as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
5
+ import { forwardRef as n, useCallback as r, useEffect as i, useId as a, useRef as o, useState as s } from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  import { Popover as u } from "@base-ui/react/popover";
8
8
  //#region src/stories/atoms/AsyncSelect/AsyncSelect.tsx
9
9
  function ee(e, t) {
10
10
  typeof e == "function" ? e(t) : e && (e.current = t);
11
11
  }
12
- var d = i(function({ onSearch: i, value: d, onValueChange: f, selectedOption: p, placeholder: m = "Buscar…", disabled: h, readOnly: g, size: _ = "md", debounceMs: v = 300, id: y, name: b, error: x = !1, required: te, onBlur: S, className: C, "aria-label": w, "aria-describedby": T, emptyMessage: ne = "Sin resultados", loadingLabel: re = "Buscando…", clearLabel: E = "Limpiar selección", container: D }, ie) {
13
- let [O, k] = l(!1), [A, j] = l(""), [M, N] = l(!1), [P, F] = l([]), [I, L] = l(!1), [R, z] = l(-1), [B, V] = l(null), [H, U] = l(null), W = c(null), G = c(0), K = c(null), q = c(null), J = s(), ae = s(), Y = d === void 0 ? B : d, oe = p === void 0 ? H : p, X = (e) => `${ae}-opt-${e}`, Z = a(async (e) => {
14
- let t = ++G.current;
15
- N(!0), L(!1);
12
+ var d = n(function({ onSearch: n, value: d, onValueChange: f, selectedOption: p, placeholder: m = "Buscar…", disabled: h, readOnly: g, size: _ = "md", debounceMs: v = 300, id: y, name: b, error: x = !1, required: S, onBlur: C, className: w, "aria-label": T, "aria-describedby": E, emptyMessage: D = "Sin resultados", loadingLabel: te = "Buscando…", clearLabel: ne = "Limpiar selección", container: re }, ie) {
13
+ let [O, k] = s(!1), [A, j] = s(""), [M, N] = s(!1), [P, F] = s([]), [ae, I] = s(!1), [L, R] = s(-1), [z, B] = s(null), [V, H] = s(null), U = o(null), W = o(0), G = o(null), K = o(null), q = a(), oe = a(), J = d === void 0 ? z : d, se = p === void 0 ? V : p, Y = (e) => `${oe}-opt-${e}`, X = r(async (e) => {
14
+ let t = ++W.current;
15
+ N(!0), I(!1);
16
16
  try {
17
- let n = await i(e);
18
- if (t !== G.current) return;
19
- F(n), z(-1);
17
+ let r = await n(e);
18
+ if (t !== W.current) return;
19
+ F(r), R(-1);
20
20
  } catch {
21
- if (t !== G.current) return;
22
- F([]), z(-1);
21
+ if (t !== W.current) return;
22
+ F([]), R(-1);
23
23
  } finally {
24
- t === G.current && (N(!1), L(!0));
24
+ t === W.current && (N(!1), I(!0));
25
25
  }
26
- }, [i]);
27
- o(() => () => {
28
- G.current += 1, W.current && clearTimeout(W.current);
26
+ }, [n]);
27
+ i(() => () => {
28
+ W.current += 1, U.current && clearTimeout(U.current);
29
29
  }, []);
30
- function se(e) {
30
+ function ce(e) {
31
31
  let t = e.target.value;
32
- j(t), W.current && clearTimeout(W.current), W.current = setTimeout(() => void Z(t), v);
32
+ j(t), U.current && clearTimeout(U.current), U.current = setTimeout(() => void X(t), v);
33
33
  }
34
- function ce(e) {
35
- h || g || O || (e.preventDefault(), K.current?.focus(), z(-1), j(""), F([]), L(!1), k(!0), Z(""));
34
+ function Z(e) {
35
+ h || g || O || (e.preventDefault(), G.current?.focus(), R(-1), j(""), F([]), I(!1), k(!0), X(""));
36
36
  }
37
37
  function Q(e) {
38
- d === void 0 && (V(e.value), U(e)), f?.(e.value, e), k(!1), z(-1), j("");
38
+ d === void 0 && (B(e.value), H(e)), f?.(e.value, e), k(!1), R(-1), j("");
39
39
  }
40
40
  function $() {
41
- d === void 0 && (V(null), U(null)), f?.(null, null), j(""), F([]), L(!1), K.current?.focus();
41
+ d === void 0 && (B(null), H(null)), f?.(null, null), j(""), F([]), I(!1), G.current?.focus();
42
42
  }
43
43
  function le(e) {
44
44
  e.stopPropagation(), $();
45
45
  }
46
46
  function ue(e) {
47
- e.key === "ArrowDown" ? (e.preventDefault(), O ? z((e) => Math.min(e + 1, P.length - 1)) : (k(!0), Z(A))) : e.key === "ArrowUp" ? (e.preventDefault(), z((e) => Math.max(e - 1, -1))) : e.key === "Enter" && R >= 0 && P[R] ? (e.preventDefault(), Q(P[R])) : e.key === "Escape" ? (k(!1), j(""), z(-1)) : e.key === "Tab" ? (k(!1), z(-1)) : (e.key === "Backspace" || e.key === "Delete") && A === "" && Y && !h && !g ? (e.preventDefault(), $()) : !O && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.preventDefault(), j(e.key), k(!0), F([]), L(!1), W.current && clearTimeout(W.current), W.current = setTimeout(() => void Z(e.key), v));
47
+ e.key === "ArrowDown" ? (e.preventDefault(), O ? R((e) => Math.min(e + 1, P.length - 1)) : (k(!0), X(A))) : e.key === "ArrowUp" ? (e.preventDefault(), R((e) => Math.max(e - 1, -1))) : e.key === "Enter" && L >= 0 && P[L] ? (e.preventDefault(), Q(P[L])) : e.key === "Escape" ? (k(!1), j(""), R(-1)) : e.key === "Tab" ? (k(!1), R(-1)) : (e.key === "Backspace" || e.key === "Delete") && A === "" && J && !h && !g ? (e.preventDefault(), $()) : !O && e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.preventDefault(), j(e.key), k(!0), F([]), I(!1), U.current && clearTimeout(U.current), U.current = setTimeout(() => void X(e.key), v));
48
48
  }
49
49
  function de(e, t) {
50
50
  if (!e) {
51
51
  if (t.reason === "outside-press") {
52
52
  let e = t.event?.target;
53
- if (e instanceof Node && q.current?.contains(e)) return;
53
+ if (e instanceof Node && K.current?.contains(e)) return;
54
54
  }
55
- k(!1), j(""), z(-1);
55
+ k(!1), j(""), R(-1);
56
56
  }
57
57
  }
58
- let fe = O ? A : oe?.label ?? "", pe = [
58
+ let fe = O ? A : se?.label ?? "", pe = [
59
59
  "async-select",
60
60
  _ === "md" ? "" : `async-select--${_}`,
61
61
  h ? "async-select--disabled" : "",
62
62
  x ? "async-select--error" : "",
63
- C ?? ""
63
+ w ?? ""
64
64
  ].filter(Boolean).join(" "), me = ["async-select__content", _ === "md" ? "" : `async-select__content--${_}`].filter(Boolean).join(" ");
65
- return /* @__PURE__ */ r(u.Root, {
65
+ return /* @__PURE__ */ l(u.Root, {
66
66
  open: O,
67
67
  onOpenChange: de,
68
- children: [/* @__PURE__ */ r("div", {
69
- ref: q,
68
+ children: [/* @__PURE__ */ l("div", {
69
+ ref: K,
70
70
  className: pe,
71
71
  "data-popup-open": O || void 0,
72
72
  children: [
73
- /* @__PURE__ */ n("input", {
73
+ /* @__PURE__ */ c("input", {
74
74
  ref: (e) => {
75
- K.current = e, ee(ie, e);
75
+ G.current = e, ee(ie, e);
76
76
  },
77
77
  id: y,
78
78
  type: "text",
79
79
  className: "async-select__input",
80
80
  value: fe,
81
- onChange: se,
82
- onPointerDown: ce,
81
+ onChange: ce,
82
+ onPointerDown: Z,
83
83
  onKeyDown: ue,
84
84
  placeholder: m,
85
85
  disabled: h,
86
86
  readOnly: g,
87
- "aria-label": w,
88
- "aria-describedby": T,
87
+ "aria-label": T,
88
+ "aria-describedby": E,
89
89
  "aria-invalid": x || void 0,
90
- "aria-required": te || void 0,
90
+ "aria-required": S || void 0,
91
91
  "aria-expanded": O,
92
92
  "aria-haspopup": "listbox",
93
- "aria-controls": O ? J : void 0,
94
- "aria-activedescendant": R >= 0 ? X(R) : void 0,
93
+ "aria-controls": O ? q : void 0,
94
+ "aria-activedescendant": L >= 0 ? Y(L) : void 0,
95
95
  autoComplete: "off",
96
96
  role: "combobox",
97
97
  "aria-autocomplete": "list",
98
- onBlur: S
98
+ onBlur: C
99
99
  }),
100
- b && /* @__PURE__ */ n("input", {
100
+ b && /* @__PURE__ */ c("input", {
101
101
  type: "hidden",
102
102
  name: b,
103
- value: Y ?? ""
103
+ value: J ?? ""
104
104
  }),
105
- M && /* @__PURE__ */ n(t, {
105
+ M && /* @__PURE__ */ c(t, {
106
106
  size: "sm",
107
107
  "aria-hidden": !0
108
108
  }),
109
- !M && Y && !h && !g && /* @__PURE__ */ n("button", {
109
+ !M && J && !h && !g && /* @__PURE__ */ c("button", {
110
110
  type: "button",
111
111
  className: "async-select__clear",
112
- "aria-label": E,
112
+ "aria-label": ne,
113
113
  tabIndex: -1,
114
114
  onMouseDown: le,
115
- children: /* @__PURE__ */ n(e, {
115
+ children: /* @__PURE__ */ c(e, {
116
116
  name: "close",
117
117
  size: "xs"
118
118
  })
119
119
  })
120
120
  ]
121
- }), /* @__PURE__ */ n(u.Portal, {
122
- container: D,
123
- children: /* @__PURE__ */ n(u.Positioner, {
121
+ }), /* @__PURE__ */ c(u.Portal, {
122
+ container: re,
123
+ children: /* @__PURE__ */ c(u.Positioner, {
124
124
  className: "async-select__positioner",
125
- anchor: q,
125
+ anchor: K,
126
126
  align: "start",
127
127
  sideOffset: -1,
128
- children: /* @__PURE__ */ n(u.Popup, {
128
+ children: /* @__PURE__ */ c(u.Popup, {
129
129
  className: me,
130
130
  initialFocus: !1,
131
131
  finalFocus: !1,
132
- children: /* @__PURE__ */ r("div", {
132
+ children: /* @__PURE__ */ l("div", {
133
133
  role: "listbox",
134
- "aria-label": w ?? m,
135
- id: J,
134
+ "aria-label": T ?? m,
135
+ id: q,
136
136
  children: [
137
- M && /* @__PURE__ */ n("div", {
137
+ M && /* @__PURE__ */ c("div", {
138
138
  className: "async-select__loading",
139
- children: /* @__PURE__ */ n(t, {
139
+ children: /* @__PURE__ */ c(t, {
140
140
  size: "sm",
141
- label: re
141
+ label: te
142
142
  })
143
143
  }),
144
- !M && I && P.length === 0 && /* @__PURE__ */ n("div", {
144
+ !M && ae && P.length === 0 && /* @__PURE__ */ c("div", {
145
145
  className: "async-select__empty",
146
- children: ne
146
+ children: D
147
147
  }),
148
148
  !M && P.map((e, t) => {
149
- let r = e.value === Y, i = R === t;
150
- return /* @__PURE__ */ n("div", {
151
- id: X(t),
149
+ let n = e.value === J, r = L === t;
150
+ return /* @__PURE__ */ c("div", {
151
+ id: Y(t),
152
152
  role: "option",
153
- "aria-selected": r,
153
+ "aria-selected": n,
154
154
  className: [
155
155
  "async-select__item",
156
- r ? "async-select__item--selected" : "",
157
- i ? "async-select__item--active" : ""
156
+ n ? "async-select__item--selected" : "",
157
+ r ? "async-select__item--active" : ""
158
158
  ].filter(Boolean).join(" "),
159
159
  onPointerDown: (e) => e.preventDefault(),
160
160
  onClick: () => Q(e),
@@ -7,30 +7,30 @@ import { Button as r } from "./button.js";
7
7
  import { Avatar as i } from "./avatar.js";
8
8
  import { ErrorText as ee } from "./error-text.js";
9
9
  import { n as te, t as a } from "./_shared/validate.js";
10
- import { t as o } from "./_shared/env.js";
11
- import { t as ne } from "./_shared/imagecropdialog.js";
12
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
13
- import { useCallback as l, useEffect as u, useId as re, useRef as d, useState as f } from "react";
10
+ import { t as ne } from "./_shared/env.js";
11
+ import { t as re } from "./_shared/imagecropdialog.js";
12
+ import { useCallback as ie, useEffect as o, useId as s, useRef as c, useState as l } from "react";
13
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
14
14
  //#region src/stories/molecules/AvatarUpload/AvatarUpload.tsx
15
- var ie = {
15
+ var ae = {
16
16
  sm: "2xl",
17
17
  md: "3xl",
18
18
  lg: "4xl"
19
- }, p = {
19
+ }, f = {
20
20
  sm: "md",
21
21
  md: "lg",
22
22
  lg: "xl"
23
23
  };
24
- function m(e) {
24
+ function p(e) {
25
25
  return e.split(",").map((e) => e.trim()).filter(Boolean).map((e) => e.startsWith(".") ? e.slice(1) : e.split("/")[1] ?? e).map((e) => e.toUpperCase()).join(", ");
26
26
  }
27
- function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v = "image/jpeg,image/png,image/webp", maxSize: y, outputMimeType: b = "image/jpeg", outputSize: x, disabled: se = !1, busy: S = !1, errorMessage: ce, onChange: le, onSelect: C, onError: w, buttonLabel: T = "Subir", buttonAccessibleLabel: ue, hintLabel: de, formatsLabel: fe, maxSizeHint: pe = (e) => `máx. ${e}`, invalidTypeError: E = (e) => `Formato no admitido. Se aceptan ${e}.`, tooLargeError: D = (e) => `El archivo pesa demasiado. El máximo es ${e}.`, dropActiveMessage: me = "Suelta la imagen sobre el avatar para subirla", dropHintLabel: O = "…o arrastra la imagen hasta el avatar", cropTitle: he = "Recortar imagen", cropDescription: k, cropCancelLabel: A = "Cancelar", cropConfirmLabel: j = "Guardar", cropCloseLabel: M = "Cerrar", cropLoadingLabel: N, cropErrorMessage: P, className: F }) {
28
- let I = n(oe), L = d(null), R = d(null), [z, B] = f(null), [V, H] = f(!1), [ge, U] = f(!1), [_e, W] = f(null), G = re(), K = `${G}-hint`, q = `${G}-error`, J = fe ?? m(v), Y = de ?? [J, y === void 0 ? null : pe(a(y))].filter(Boolean).join(" · "), X = _e ?? ce, Z = se || S, Q = ue ?? T;
29
- o() && !Q.toLowerCase().includes(T.toLowerCase()) && console.warn(`[AvatarUpload] El nombre accesible del botón ("${Q}") no contiene su texto visible ("${T}"). WCAG 2.5.3 (Label in Name) lo exige: quien navega por voz dice lo que ve, y con estos textos no encontraría el control.`), u(() => {
27
+ function m({ src: m, name: oe, alt: h, shape: g = "circle", size: se, accept: _ = "image/jpeg,image/png,image/webp", maxSize: v, outputMimeType: y = "image/jpeg", outputSize: b, disabled: x = !1, busy: S = !1, errorMessage: ce, onChange: le, onSelect: C, onError: w, buttonLabel: T = "Subir", buttonAccessibleLabel: ue, hintLabel: de, formatsLabel: fe, maxSizeHint: pe = (e) => `máx. ${e}`, invalidTypeError: E = (e) => `Formato no admitido. Se aceptan ${e}.`, tooLargeError: D = (e) => `El archivo pesa demasiado. El máximo es ${e}.`, dropActiveMessage: me = "Suelta la imagen sobre el avatar para subirla", dropHintLabel: O = "…o arrastra la imagen hasta el avatar", cropTitle: he = "Recortar imagen", cropDescription: k, cropCancelLabel: A = "Cancelar", cropConfirmLabel: j = "Guardar", cropCloseLabel: M = "Cerrar", cropLoadingLabel: N, cropErrorMessage: P, className: F }) {
28
+ let I = n(se), L = c(null), R = c(null), [z, B] = l(null), [V, H] = l(!1), [ge, U] = l(!1), [_e, W] = l(null), G = s(), K = `${G}-hint`, q = `${G}-error`, J = fe ?? p(_), Y = de ?? [J, v === void 0 ? null : pe(a(v))].filter(Boolean).join(" · "), X = _e ?? ce, Z = x || S, Q = ue ?? T;
29
+ ne() && !Q.toLowerCase().includes(T.toLowerCase()) && console.warn(`[AvatarUpload] El nombre accesible del botón ("${Q}") no contiene su texto visible ("${T}"). WCAG 2.5.3 (Label in Name) lo exige: quien navega por voz dice lo que ve, y con estos textos no encontraría el control.`), o(() => {
30
30
  R.current = z;
31
- }, [z]), u(() => () => {
31
+ }, [z]), o(() => () => {
32
32
  R.current && URL.revokeObjectURL(R.current.url);
33
- }, []), u(() => {
33
+ }, []), o(() => {
34
34
  if (Z) return;
35
35
  let e = 0, t = (e) => Array.from(e.dataTransfer?.types ?? []).includes("Files"), n = (n) => {
36
36
  t(n) && (e += 1, H(!0));
@@ -43,8 +43,8 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
43
43
  window.removeEventListener("dragenter", n), window.removeEventListener("dragleave", r), window.removeEventListener("drop", i), window.removeEventListener("dragend", i), H(!1);
44
44
  };
45
45
  }, [Z]);
46
- let $ = l((e) => {
47
- let t = te(e, v, y, D, E(J));
46
+ let $ = ie((e) => {
47
+ let t = te(e, _, v, D, E(J));
48
48
  if (t) {
49
49
  W(t), w?.(t);
50
50
  return;
@@ -54,8 +54,8 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
54
54
  file: e
55
55
  });
56
56
  }, [
57
+ _,
57
58
  v,
58
- y,
59
59
  D,
60
60
  E,
61
61
  J,
@@ -66,17 +66,17 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
66
66
  }, ye = async (e) => {
67
67
  z && await le(e, z.file);
68
68
  };
69
- return /* @__PURE__ */ c("div", {
69
+ return /* @__PURE__ */ d("div", {
70
70
  className: [
71
71
  "avatar-upload",
72
- _ === "square" ? "avatar-upload--square" : "",
72
+ g === "square" ? "avatar-upload--square" : "",
73
73
  V ? "avatar-upload--armed" : "",
74
74
  ge ? "avatar-upload--over" : "",
75
75
  Z ? "avatar-upload--inert" : "",
76
76
  F ?? ""
77
77
  ].filter(Boolean).join(" "),
78
78
  children: [
79
- /* @__PURE__ */ c("div", {
79
+ /* @__PURE__ */ d("div", {
80
80
  className: "avatar-upload__target",
81
81
  onClick: () => {
82
82
  Z || L.current?.click();
@@ -95,29 +95,29 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
95
95
  let t = e.dataTransfer.files?.[0];
96
96
  t && $(t);
97
97
  },
98
- children: [/* @__PURE__ */ s(i, {
99
- src: h ?? void 0,
100
- name: ae,
101
- ...g === void 0 ? {} : { alt: g },
102
- shape: _,
103
- size: ie[I]
104
- }), /* @__PURE__ */ s("span", {
98
+ children: [/* @__PURE__ */ u(i, {
99
+ src: m ?? void 0,
100
+ name: oe,
101
+ ...h === void 0 ? {} : { alt: h },
102
+ shape: g,
103
+ size: ae[I]
104
+ }), /* @__PURE__ */ u("span", {
105
105
  className: "avatar-upload__overlay",
106
106
  "aria-hidden": "true",
107
- children: /* @__PURE__ */ s(e, {
107
+ children: /* @__PURE__ */ u(e, {
108
108
  name: "upload",
109
- size: p[I]
109
+ size: f[I]
110
110
  })
111
111
  })]
112
112
  }),
113
- /* @__PURE__ */ c("div", {
113
+ /* @__PURE__ */ d("div", {
114
114
  className: "avatar-upload__body",
115
115
  children: [
116
- /* @__PURE__ */ s("input", {
116
+ /* @__PURE__ */ u("input", {
117
117
  ref: L,
118
118
  type: "file",
119
119
  className: "avatar-upload__input",
120
- accept: v,
120
+ accept: _,
121
121
  tabIndex: -1,
122
122
  "aria-hidden": "true",
123
123
  disabled: Z,
@@ -126,7 +126,7 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
126
126
  t && $(t), e.target.value = "";
127
127
  }
128
128
  }),
129
- /* @__PURE__ */ s(r, {
129
+ /* @__PURE__ */ u(r, {
130
130
  variant: "outline",
131
131
  size: I,
132
132
  disabled: Z,
@@ -135,31 +135,31 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
135
135
  "aria-describedby": [Y ? K : null, X ? q : null].filter(Boolean).join(" ") || void 0,
136
136
  children: T
137
137
  }),
138
- Y && /* @__PURE__ */ s(t, {
138
+ Y && /* @__PURE__ */ u(t, {
139
139
  id: K,
140
140
  children: Y
141
141
  }),
142
- O && /* @__PURE__ */ s("span", {
142
+ O && /* @__PURE__ */ u("span", {
143
143
  className: "avatar-upload__hint",
144
144
  children: O
145
145
  }),
146
- X && /* @__PURE__ */ s(ee, {
146
+ X && /* @__PURE__ */ u(ee, {
147
147
  id: q,
148
148
  children: X
149
149
  })
150
150
  ]
151
151
  }),
152
- /* @__PURE__ */ s(t, {
152
+ /* @__PURE__ */ u(t, {
153
153
  role: "status",
154
154
  children: V ? me : ""
155
155
  }),
156
- /* @__PURE__ */ s(ne, {
156
+ /* @__PURE__ */ u(re, {
157
157
  sourceUrl: z?.url ?? null,
158
158
  title: he,
159
159
  description: k,
160
- circularCrop: _ === "circle",
161
- outputMimeType: b,
162
- ...x === void 0 ? {} : { outputSize: x },
160
+ circularCrop: g === "circle",
161
+ outputMimeType: y,
162
+ ...b === void 0 ? {} : { outputSize: b },
163
163
  busy: S,
164
164
  cancelLabel: A,
165
165
  confirmLabel: j,
@@ -173,4 +173,4 @@ function h({ src: h, name: ae, alt: g, shape: _ = "circle", size: oe, accept: v
173
173
  });
174
174
  }
175
175
  //#endregion
176
- export { h as AvatarUpload };
176
+ export { m as AvatarUpload };
package/dist/avatar.js CHANGED
@@ -1,27 +1,27 @@
1
1
  'use client';
2
2
  import './avatar.css';
3
- import { jsx as e } from "react/jsx-runtime";
4
- import { useState as t } from "react";
3
+ import { useState as e } from "react";
4
+ import { jsx as t } from "react/jsx-runtime";
5
5
  //#region src/stories/atoms/Avatar/Avatar.tsx
6
6
  function n(e) {
7
7
  let t = e.trim().split(/\s+/);
8
8
  return t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
9
9
  }
10
10
  function r({ src: r, alt: i, name: a, size: o = "md", shape: s = "circle", className: c }) {
11
- let [l, u] = t(!1), d = [
11
+ let [l, u] = e(!1), d = [
12
12
  "avatar",
13
13
  `avatar--${o}`,
14
14
  s === "square" ? "avatar--square" : "",
15
15
  c
16
16
  ].filter(Boolean).join(" ");
17
- if (r && !l) return /* @__PURE__ */ e("img", {
17
+ if (r && !l) return /* @__PURE__ */ t("img", {
18
18
  src: r,
19
19
  alt: i ?? a ?? "",
20
20
  className: d,
21
21
  onError: () => u(!0)
22
22
  });
23
23
  let f = i ?? a ?? "";
24
- return /* @__PURE__ */ e("span", {
24
+ return /* @__PURE__ */ t("span", {
25
25
  className: `${d} avatar--initials`,
26
26
  ...f ? {
27
27
  role: "img",
package/dist/banner.js CHANGED
@@ -1,33 +1,33 @@
1
1
  'use client';
2
2
  import './banner.css';
3
3
  import { CloseButton as e } from "./close-button.js";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
- import { forwardRef as r } from "react";
4
+ import { forwardRef as t } from "react";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
6
  //#region src/stories/molecules/Banner/Banner.tsx
7
- var i = r(function({ variant: r = "info", children: i, actions: a, onDismiss: o, dismissLabel: s = "Descartar aviso", className: c, role: l, "aria-live": u, ...d }, f) {
7
+ var i = t(function({ variant: t = "info", children: i, actions: a, onDismiss: o, dismissLabel: s = "Descartar aviso", className: c, role: l, "aria-live": u, ...d }, f) {
8
8
  let p = [
9
9
  "banner",
10
- `banner--${r}`,
11
- r === "info" ? "surface-dark" : "",
10
+ `banner--${t}`,
11
+ t === "info" ? "surface-dark" : "",
12
12
  o ? "banner--dismissible" : "",
13
13
  c ?? ""
14
14
  ].filter(Boolean).join(" ");
15
- return /* @__PURE__ */ n("div", {
15
+ return /* @__PURE__ */ r("div", {
16
16
  ref: f,
17
17
  role: l ?? "status",
18
18
  "aria-live": u ?? "polite",
19
19
  className: p,
20
20
  ...d,
21
21
  children: [
22
- /* @__PURE__ */ t("div", {
22
+ /* @__PURE__ */ n("div", {
23
23
  className: "banner__content",
24
24
  children: i
25
25
  }),
26
- a && /* @__PURE__ */ t("div", {
26
+ a && /* @__PURE__ */ n("div", {
27
27
  className: "banner__actions",
28
28
  children: a
29
29
  }),
30
- o && /* @__PURE__ */ t(e, {
30
+ o && /* @__PURE__ */ n(e, {
31
31
  className: "banner__close",
32
32
  label: s,
33
33
  onClick: o
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,