@studiolxd/brand 38.17.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 (141) hide show
  1. package/CHANGELOG.md +141 -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 +4 -0
  7. package/dist/_types/atoms/StarRating/StarRating.d.ts +87 -30
  8. package/dist/_types/messages/BrandMessages.d.ts +26 -0
  9. package/dist/_types/messages/BrandMessagesContext.d.ts +21 -0
  10. package/dist/_types/messages/BrandMessagesProvider.d.ts +46 -0
  11. package/dist/_types/messages/index.d.ts +5 -0
  12. package/dist/_types/molecules/Card/Card.d.ts +12 -1
  13. package/dist/_types/molecules/ConfirmDialog/ConfirmDialog.d.ts +42 -2
  14. package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
  15. package/dist/_types/organisms/DataTable/DataTable.d.ts +3 -2
  16. package/dist/accordion.js +26 -26
  17. package/dist/alert.js +26 -26
  18. package/dist/annotation-thread.js +1 -1
  19. package/dist/app-header.js +8 -8
  20. package/dist/app-launcher.js +34 -34
  21. package/dist/app-shell.js +14 -14
  22. package/dist/assistant-message.js +8 -8
  23. package/dist/async-multi-select-field.js +9 -9
  24. package/dist/async-multi-select.js +40 -40
  25. package/dist/async-select-field.js +9 -9
  26. package/dist/async-select.js +64 -64
  27. package/dist/avatar-upload.js +40 -40
  28. package/dist/avatar.js +5 -5
  29. package/dist/banner.js +9 -9
  30. package/dist/brand.css +11 -2
  31. package/dist/button.js +7 -7
  32. package/dist/calendar-planner.js +16 -16
  33. package/dist/calendar.js +38 -38
  34. package/dist/card.js +28 -29
  35. package/dist/carousel.js +19 -19
  36. package/dist/chart.js +137 -137
  37. package/dist/chat-shell.js +23 -23
  38. package/dist/checkbox-field.js +11 -11
  39. package/dist/checkbox.js +7 -7
  40. package/dist/close-button.js +6 -6
  41. package/dist/code-block.js +15 -15
  42. package/dist/code.js +5 -5
  43. package/dist/collapsible.js +1 -1
  44. package/dist/columns.js +7 -7
  45. package/dist/command-palette.js +14 -14
  46. package/dist/confirm-dialog.css +1 -1
  47. package/dist/confirm-dialog.js +65 -42
  48. package/dist/connector-auth-shell.js +9 -9
  49. package/dist/consent.js +23 -23
  50. package/dist/container.js +6 -6
  51. package/dist/conversation-list.js +19 -19
  52. package/dist/conversation-thread.js +15 -15
  53. package/dist/copy-button.js +9 -9
  54. package/dist/copyable-value.js +17 -17
  55. package/dist/data-table.js +29 -29
  56. package/dist/date-picker-field.js +9 -9
  57. package/dist/date-time-field.js +12 -12
  58. package/dist/description-list.js +12 -12
  59. package/dist/docs-search.js +1 -1
  60. package/dist/dots-button.js +7 -7
  61. package/dist/dropdown-field.js +13 -13
  62. package/dist/email.js +44 -44
  63. package/dist/error-text.js +4 -4
  64. package/dist/field-row.js +20 -20
  65. package/dist/figure.js +8 -8
  66. package/dist/file-upload-field.js +9 -9
  67. package/dist/file-upload.js +29 -29
  68. package/dist/filter-bar.js +10 -10
  69. package/dist/floating-dock.js +17 -17
  70. package/dist/form-field.js +43 -43
  71. package/dist/form.js +14 -14
  72. package/dist/heading.js +5 -5
  73. package/dist/input-field.js +20 -20
  74. package/dist/input-phone-field.js +9 -9
  75. package/dist/input-phone.js +19 -19
  76. package/dist/input.js +5 -5
  77. package/dist/kbd.js +5 -5
  78. package/dist/label.js +5 -5
  79. package/dist/link.js +7 -7
  80. package/dist/list.js +7 -7
  81. package/dist/menu-button.js +7 -7
  82. package/dist/message-bubble.js +5 -5
  83. package/dist/message-composer.js +13 -13
  84. package/dist/messages.js +12 -0
  85. package/dist/multi-select-field.js +9 -9
  86. package/dist/multi-select.js +52 -52
  87. package/dist/notification-button.js +8 -8
  88. package/dist/notification-panel.js +25 -25
  89. package/dist/number-input-field.js +9 -9
  90. package/dist/number-input.js +11 -11
  91. package/dist/otp-field.js +9 -9
  92. package/dist/otp-input.js +48 -48
  93. package/dist/pagination.js +92 -89
  94. package/dist/paragraph.js +5 -5
  95. package/dist/password-field.js +15 -15
  96. package/dist/prose.js +4 -4
  97. package/dist/public-page-shell.js +11 -11
  98. package/dist/radio-field.js +11 -11
  99. package/dist/radio-group.js +5 -5
  100. package/dist/radio.js +5 -5
  101. package/dist/scroll-area.js +11 -11
  102. package/dist/search-form.js +8 -8
  103. package/dist/select-field.js +9 -9
  104. package/dist/select.js +85 -85
  105. package/dist/separator.js +6 -6
  106. package/dist/sidebar.js +16 -16
  107. package/dist/site-header.js +14 -14
  108. package/dist/site-shell.js +6 -6
  109. package/dist/sparkline.js +9 -9
  110. package/dist/star-rating.css +1 -1
  111. package/dist/star-rating.js +55 -41
  112. package/dist/stat-tile.js +12 -12
  113. package/dist/steps.js +32 -32
  114. package/dist/switcher-field.js +13 -13
  115. package/dist/switcher.js +8 -8
  116. package/dist/table-of-contents.js +14 -14
  117. package/dist/tag.js +5 -5
  118. package/dist/text.js +7 -7
  119. package/dist/textarea-field.js +11 -11
  120. package/dist/textarea.js +5 -5
  121. package/dist/time-field.js +9 -9
  122. package/dist/time-select.js +17 -17
  123. package/dist/toaster.js +16 -16
  124. package/dist/toggle-group.js +7 -7
  125. package/dist/toggle.js +5 -5
  126. package/dist/tokens.css +11 -2
  127. package/dist/tooltip.js +16 -16
  128. package/dist/tree-view.js +41 -41
  129. package/dist/uptime-bars.js +34 -34
  130. package/dist/user-message.js +8 -8
  131. package/dist/visually-hidden.js +5 -5
  132. package/package.json +5 -1
  133. package/src/tokens/components/description-list.css +1 -1
  134. package/src/tokens/components/star-rating.css +5 -0
  135. package/src/tokens/molecules/confirm-dialog.css +1 -0
  136. package/src/tokens/scss/components/_description-list.scss +1 -1
  137. package/src/tokens/scss/components/_star-rating.scss +3 -0
  138. package/src/tokens/scss/molecules/_confirm-dialog.scss +1 -0
  139. package/src/tokens/surface-invert.css +2 -0
  140. package/src/tokens/surface-public.css +1 -0
  141. package/src/tokens/tokens.json +4 -0
@@ -1,6 +1,32 @@
1
1
  import type { ComponentType, ReactNode } from 'react';
2
2
  import type { SelectOption } from '../../atoms/Select/Select';
3
3
  import './Pagination.css';
4
+ /**
5
+ * Los textos que el paginador emite por su cuenta. Los nombres calcan el
6
+ * espacio `pagination` del catálogo de la suite, así que montarlo es mapear
7
+ * clave a clave y no traducir de nuevo.
8
+ *
9
+ * Todas obligatorias: es el proveedor quien garantiza que ninguna falte, y
10
+ * quien las pinta ya no tiene un castellano por defecto donde caer.
11
+ */
12
+ export interface PaginationMessages {
13
+ /** `aria-label` del `<nav>`. */
14
+ label: string;
15
+ /** `aria-label` del `role="group"` que envuelve los controles de página. */
16
+ pagesGroup: string;
17
+ /** `aria-label` del control «anterior». */
18
+ previous: string;
19
+ /** `aria-label` del control «siguiente». */
20
+ next: string;
21
+ /** `aria-label` de cada botón/enlace de página, con su número. */
22
+ goToPage: (page: number) => string;
23
+ /** `aria-label` del selector de registros por página. */
24
+ perPage: string;
25
+ /** Sumario de `showTotal`, con el número de registros. */
26
+ total: (total: number) => string;
27
+ /** Rótulo de la opción «sin paginar» del selector de registros por página. */
28
+ allOption: string;
29
+ }
4
30
  export interface PaginationProps {
5
31
  /**
6
32
  * Con páginas numeradas (`pages`, por defecto) o solo anterior/siguiente
@@ -36,7 +62,10 @@ export interface PaginationProps {
36
62
  hrefBuilder?: (page: number) => string;
37
63
  /** Si se pasa, aparece el selector de registros por página */
38
64
  onPageSizeChange?: (size: string) => void;
39
- /** Opciones del selector. Default: 10, 20, 50, 100, Todos */
65
+ /**
66
+ * Opciones del selector. Sin ellas, 10/20/50/100 y la opción «sin paginar»,
67
+ * cuyo rótulo sale de `pagination.allOption` (las cifras no se traducen).
68
+ */
40
69
  pageSizeOptions?: SelectOption[];
41
70
  /**
42
71
  * Ranura a continuación del selector de registros por página, dentro del
@@ -55,37 +84,25 @@ export interface PaginationProps {
55
84
  linkComponent?: ComponentType<any>;
56
85
  /** Tamaño del componente. Default: "md" */
57
86
  size?: 'sm' | 'md' | 'lg';
58
- /** aria-label del <nav>. Default: «Paginación» (castellano). Una app multiidioma debe pasarlo traducido. */
59
- ariaLabel?: string;
60
87
  /**
61
- * aria-label de cada botón/enlace de página. Default: `Página ${page}` (castellano).
62
- * Una app multiidioma debe pasarla traducida.
88
+ * `aria-label` del `<nav>`. Sin default: cuando no se pasa, sale de
89
+ * `pagination.label` del `BrandMessagesProvider`.
63
90
  */
91
+ ariaLabel?: string;
92
+ /** `aria-label` de cada botón/enlace de página. Sin default: `pagination.goToPage`. */
64
93
  pageLabel?: (page: number) => string;
65
- /**
66
- * aria-label del botón "anterior". Default: "Página anterior" (castellano).
67
- * Una app multiidioma debe pasarla traducida.
68
- */
94
+ /** `aria-label` del botón «anterior». Sin default: `pagination.previous`. */
69
95
  previousLabel?: string;
70
- /**
71
- * aria-label del botón "siguiente". Default: "Página siguiente" (castellano).
72
- * Una app multiidioma debe pasarla traducida.
73
- */
96
+ /** `aria-label` del botón «siguiente». Sin default: `pagination.next`. */
74
97
  nextLabel?: string;
75
98
  /**
76
- * aria-label del `role="group"` que envuelve los controles de página.
77
- * Default: "Páginas" (castellano). Una app multiidioma debe pasarla traducida.
99
+ * `aria-label` del `role="group"` que envuelve los controles de página.
100
+ * Sin default: `pagination.pagesGroup`.
78
101
  */
79
102
  pagesGroupLabel?: string;
80
- /**
81
- * aria-label del selector de registros por página.
82
- * Default: "Registros por página" (castellano). Una app multiidioma debe pasarla traducida.
83
- */
103
+ /** `aria-label` del selector de registros por página. Sin default: `pagination.perPage`. */
84
104
  pageSizeLabel?: string;
85
- /**
86
- * Texto del sumario que muestra `showTotal`. Default: `${total} resultados` (castellano).
87
- * Una app multiidioma debe pasarla traducida.
88
- */
105
+ /** Texto del sumario que muestra `showTotal`. Sin default: `pagination.total`. */
89
106
  totalLabel?: (total: number) => string;
90
107
  className?: string;
91
108
  }
@@ -94,7 +94,8 @@ export interface DataTableProps<TData, TValue> {
94
94
  * paginación (en cliente o en servidor) sobre el `Table` y el `Pagination` del
95
95
  * DS. El comportamiento lo aporta TanStack Table.
96
96
  *
97
- * Los textos accesibles llegan por props (el DS no habla de i18n): sin ellos
98
- * caen a los castellanos por defecto de `Table` y `Pagination`.
97
+ * Los textos accesibles llegan por props (el DS no habla de i18n): los de
98
+ * `Table` caen a sus castellanos por defecto, y los de `Pagination` —que ya no
99
+ * tiene ninguno— al `BrandMessagesProvider` que la aplicación monta en su raíz.
99
100
  */
100
101
  export declare function DataTable<TData, TValue>({ columns, data, ariaLabel, ariaLabelledBy, searchColumnId, search, searchPlaceholder, searchClearLabel, toolbar, footerActions, pageSize, emptyMessage, isLoading, pagination, headerLabels, paginationLabels, className, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
package/dist/accordion.js CHANGED
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
  import './accordion.css';
3
3
  import { Icon as e } from "./icon.js";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
- import { Children as r, createContext as i, useContext as a } from "react";
4
+ import { Children as t, createContext as n, useContext as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { Accordion as o } from "@base-ui/react/accordion";
7
7
  //#region src/stories/atoms/Accordion/AccordionContext.ts
8
- var s = i(null);
8
+ var s = n(null);
9
9
  function c() {
10
- return a(s);
10
+ return r(s);
11
11
  }
12
12
  //#endregion
13
13
  //#region src/stories/atoms/Accordion/Accordion.tsx
@@ -15,10 +15,10 @@ var l = (e) => String(e).padStart(2, "0");
15
15
  function u(e) {
16
16
  if (e !== void 0) return Array.isArray(e) ? e : e === "" ? [] : [e];
17
17
  }
18
- function d({ className: e, children: n, id: i, disabled: a, numbered: c = !1, formatIndex: d = l, ...f }) {
18
+ function d({ className: e, children: n, id: r, disabled: a, numbered: c = !1, formatIndex: d = l, ...f }) {
19
19
  let p = f.type === "multiple", m = f.type === "single" ? f.collapsible ?? !0 : !0, h = f.value;
20
- return /* @__PURE__ */ t(o.Root, {
21
- id: i,
20
+ return /* @__PURE__ */ i(o.Root, {
21
+ id: r,
22
22
  disabled: a,
23
23
  multiple: p,
24
24
  value: u(h),
@@ -36,52 +36,52 @@ function d({ className: e, children: n, id: i, disabled: a, numbered: c = !1, fo
36
36
  c ? "accordion--numbered" : "",
37
37
  e
38
38
  ].filter(Boolean).join(" "),
39
- children: c ? r.map(n, (e, n) => /* @__PURE__ */ t(s.Provider, {
39
+ children: c ? t.map(n, (e, t) => /* @__PURE__ */ i(s.Provider, {
40
40
  value: {
41
- index: n + 1,
41
+ index: t + 1,
42
42
  formatIndex: d
43
43
  },
44
44
  children: e
45
45
  })) : n
46
46
  });
47
47
  }
48
- function f({ className: e, children: n, ...r }) {
49
- return /* @__PURE__ */ t(o.Item, {
48
+ function f({ className: e, children: t, ...n }) {
49
+ return /* @__PURE__ */ i(o.Item, {
50
50
  className: ["accordion__item", e].filter(Boolean).join(" "),
51
- ...r,
52
- children: n
51
+ ...n,
52
+ children: t
53
53
  });
54
54
  }
55
- function p({ className: r, chevronSize: i = "sm", children: a }) {
55
+ function p({ className: t, chevronSize: n = "sm", children: r }) {
56
56
  let s = c();
57
- return /* @__PURE__ */ t(o.Header, {
57
+ return /* @__PURE__ */ i(o.Header, {
58
58
  className: "accordion__header",
59
- children: /* @__PURE__ */ n(o.Trigger, {
60
- className: ["accordion__trigger", r].filter(Boolean).join(" "),
59
+ children: /* @__PURE__ */ a(o.Trigger, {
60
+ className: ["accordion__trigger", t].filter(Boolean).join(" "),
61
61
  children: [
62
- s && /* @__PURE__ */ t("span", {
62
+ s && /* @__PURE__ */ i("span", {
63
63
  className: "accordion__index",
64
64
  children: s.formatIndex(s.index)
65
65
  }),
66
- /* @__PURE__ */ t("span", {
66
+ /* @__PURE__ */ i("span", {
67
67
  className: "accordion__trigger-text",
68
- children: a
68
+ children: r
69
69
  }),
70
- /* @__PURE__ */ t(e, {
70
+ /* @__PURE__ */ i(e, {
71
71
  name: "chevron",
72
72
  className: "accordion__chevron",
73
- size: i
73
+ size: n
74
74
  })
75
75
  ]
76
76
  })
77
77
  });
78
78
  }
79
- function m({ className: e, children: n }) {
80
- return /* @__PURE__ */ t(o.Panel, {
79
+ function m({ className: e, children: t }) {
80
+ return /* @__PURE__ */ i(o.Panel, {
81
81
  className: ["accordion__content", e].filter(Boolean).join(" "),
82
- children: /* @__PURE__ */ t("div", {
82
+ children: /* @__PURE__ */ i("div", {
83
83
  className: "accordion__content-inner",
84
- children: n
84
+ children: t
85
85
  })
86
86
  });
87
87
  }
package/dist/alert.js CHANGED
@@ -1,45 +1,45 @@
1
1
  'use client';
2
2
  import './alert.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, useState as i } from "react";
4
+ import { forwardRef as t, useState as n } from "react";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  //#region src/stories/molecules/Alert/Alert.tsx
7
7
  var a = {
8
8
  default: "status",
9
9
  success: "status",
10
10
  error: "alert",
11
11
  warning: "alert"
12
- }, o = r(function({ className: e, children: n, ...r }, i) {
13
- return /* @__PURE__ */ t("p", {
12
+ }, o = t(function({ className: e, children: t, ...n }, i) {
13
+ return /* @__PURE__ */ r("p", {
14
14
  ref: i,
15
15
  className: ["alert__title", e ?? ""].filter(Boolean).join(" "),
16
- ...r,
17
- children: n
16
+ ...n,
17
+ children: t
18
18
  });
19
- }), s = r(function({ className: e, children: n, ...r }, i) {
20
- return /* @__PURE__ */ t("div", {
19
+ }), s = t(function({ className: e, children: t, ...n }, i) {
20
+ return /* @__PURE__ */ r("div", {
21
21
  ref: i,
22
22
  className: ["alert__description", e ?? ""].filter(Boolean).join(" "),
23
- ...r,
24
- children: n
23
+ ...n,
24
+ children: t
25
25
  });
26
- }), c = r(function({ className: e, children: n, ...r }, i) {
27
- return /* @__PURE__ */ t("div", {
26
+ }), c = t(function({ className: e, children: t, ...n }, i) {
27
+ return /* @__PURE__ */ r("div", {
28
28
  ref: i,
29
29
  className: ["alert__actions", e ?? ""].filter(Boolean).join(" "),
30
- ...r,
31
- children: n
30
+ ...n,
31
+ children: t
32
32
  });
33
- }), l = r(function({ variant: r = "default", title: o, description: s, actions: c, dismissible: l = !1, onDismiss: u, finalFocus: d, closeLabel: f = "Cerrar", className: p, children: m, role: h, ...g }, _) {
34
- let [v, y] = i(!1);
33
+ }), l = t(function({ variant: t = "default", title: o, description: s, actions: c, dismissible: l = !1, onDismiss: u, finalFocus: d, closeLabel: f = "Cerrar", className: p, children: m, role: h, ...g }, _) {
34
+ let [v, y] = n(!1);
35
35
  if (v) return null;
36
36
  let b = [
37
37
  "alert",
38
- r === "default" ? "" : `alert--${r}`,
39
- r === "success" || r === "error" ? "surface-dark" : "",
38
+ t === "default" ? "" : `alert--${t}`,
39
+ t === "success" || t === "error" ? "surface-dark" : "",
40
40
  l ? "alert--dismissible" : "",
41
41
  p ?? ""
42
- ].filter(Boolean).join(" "), x = r === "default" ? " surface-invert" : "";
42
+ ].filter(Boolean).join(" "), x = t === "default" ? " surface-invert" : "";
43
43
  function S() {
44
44
  if (typeof document > "u") return;
45
45
  let e = d?.current;
@@ -53,29 +53,29 @@ var a = {
53
53
  function C() {
54
54
  S(), u ? u() : y(!0);
55
55
  }
56
- return /* @__PURE__ */ n("div", {
56
+ return /* @__PURE__ */ i("div", {
57
57
  ref: _,
58
- role: h ?? a[r],
58
+ role: h ?? a[t],
59
59
  className: b,
60
60
  ...g,
61
- children: [/* @__PURE__ */ n("div", {
61
+ children: [/* @__PURE__ */ i("div", {
62
62
  className: `alert__content${x}`,
63
63
  children: [
64
- o && /* @__PURE__ */ t("p", {
64
+ o && /* @__PURE__ */ r("p", {
65
65
  className: "alert__title",
66
66
  children: o
67
67
  }),
68
- s && /* @__PURE__ */ t("div", {
68
+ s && /* @__PURE__ */ r("div", {
69
69
  className: "alert__description",
70
70
  children: s
71
71
  }),
72
72
  m,
73
- c && /* @__PURE__ */ t("div", {
73
+ c && /* @__PURE__ */ r("div", {
74
74
  className: "alert__actions",
75
75
  children: c
76
76
  })
77
77
  ]
78
- }), l && /* @__PURE__ */ t(e, {
78
+ }), l && /* @__PURE__ */ r(e, {
79
79
  className: `alert__close${x}`,
80
80
  label: f,
81
81
  onClick: C
@@ -1,7 +1,7 @@
1
1
  import './annotation-thread.css';
2
2
  import { Tag as e } from "./tag.js";
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
3
  import "react";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
5
  //#region src/stories/organisms/AnnotationThread/AnnotationThread.tsx
6
6
  var r = {
7
7
  day: "numeric",
@@ -2,15 +2,15 @@
2
2
  import './app-header.css';
3
3
  import { MenuButton as e } from "./menu-button.js";
4
4
  import { t } from "./_shared/appshellcontext.js";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
- import { useContext as i, useState as a } from "react";
5
+ import { useContext as n, useState as r } from "react";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  //#region src/stories/sections/AppHeader/AppHeader.tsx
8
8
  function o({ start: o, notifications: s, end: c, menuLabel: l = "Menú de navegación", menuCloseLabel: u, sidebarId: d }) {
9
- let f = i(t), [p, m] = a(!1), h = f ? f.sidebar === "open" : p;
10
- return /* @__PURE__ */ r("header", {
9
+ let f = n(t), [p, m] = r(!1), h = f ? f.sidebar === "open" : p;
10
+ return /* @__PURE__ */ a("header", {
11
11
  className: "app-header",
12
12
  children: [
13
- /* @__PURE__ */ n(e, {
13
+ /* @__PURE__ */ i(e, {
14
14
  isOpen: h,
15
15
  onClick: f ? f.toggleSidebar : () => m((e) => !e),
16
16
  label: l,
@@ -18,15 +18,15 @@ function o({ start: o, notifications: s, end: c, menuLabel: l = "Menú de navega
18
18
  "aria-controls": d,
19
19
  "aria-expanded": h
20
20
  }),
21
- /* @__PURE__ */ n("div", {
21
+ /* @__PURE__ */ i("div", {
22
22
  className: "app-header__start",
23
23
  children: o
24
24
  }),
25
- s && /* @__PURE__ */ n("div", {
25
+ s && /* @__PURE__ */ i("div", {
26
26
  className: "app-header__notifications",
27
27
  children: s
28
28
  }),
29
- c && /* @__PURE__ */ n("div", {
29
+ c && /* @__PURE__ */ i("div", {
30
30
  className: "app-header__end",
31
31
  children: c
32
32
  })
@@ -3,19 +3,19 @@ import './app-launcher.css';
3
3
  import { Icon as e } from "./icon.js";
4
4
  import { Tag as t } from "./tag.js";
5
5
  import { Modal as n } from "./modal.js";
6
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
7
- import { useState as o } from "react";
6
+ import { useState as r } from "react";
7
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  import { Popover as s } from "@base-ui/react/popover";
9
9
  //#region src/stories/molecules/AppLauncher/AppLauncher.tsx
10
10
  function c({ app: e, isCurrent: n, newLabel: r }) {
11
- return /* @__PURE__ */ a("a", {
11
+ return /* @__PURE__ */ o("a", {
12
12
  href: e.url,
13
13
  className: `app-launcher__tile${n ? " app-launcher__tile--active" : ""}`,
14
14
  "aria-current": n ? "page" : void 0,
15
- children: [/* @__PURE__ */ i("span", {
15
+ children: [/* @__PURE__ */ a("span", {
16
16
  className: "app-launcher__tile-name",
17
17
  children: e.name
18
- }), e.isNew && /* @__PURE__ */ i(t, {
18
+ }), e.isNew && /* @__PURE__ */ a(t, {
19
19
  variant: "info",
20
20
  className: "app-launcher__tile-badge",
21
21
  children: r
@@ -23,46 +23,46 @@ function c({ app: e, isCurrent: n, newLabel: r }) {
23
23
  });
24
24
  }
25
25
  function l({ apps: e, currentAppId: t, newLabel: n }) {
26
- return /* @__PURE__ */ i("ul", {
26
+ return /* @__PURE__ */ a("ul", {
27
27
  className: "app-launcher__grid",
28
28
  role: "list",
29
- children: e.map((e) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(c, {
29
+ children: e.map((e) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(c, {
30
30
  app: e,
31
31
  isCurrent: e.id === t,
32
32
  newLabel: n
33
33
  }) }, e.id))
34
34
  });
35
35
  }
36
- function u({ apps: t, labels: n, currentAppId: r, open: o, defaultOpen: c, onOpenChange: u }) {
37
- return /* @__PURE__ */ a(s.Root, {
38
- open: o,
36
+ function u({ apps: t, labels: n, currentAppId: r, open: i, defaultOpen: c, onOpenChange: u }) {
37
+ return /* @__PURE__ */ o(s.Root, {
38
+ open: i,
39
39
  defaultOpen: c,
40
40
  onOpenChange: (e) => u?.(e),
41
- children: [/* @__PURE__ */ i(s.Trigger, { render: n.trigger ? /* @__PURE__ */ a("button", {
41
+ children: [/* @__PURE__ */ a(s.Trigger, { render: n.trigger ? /* @__PURE__ */ o("button", {
42
42
  type: "button",
43
43
  className: "app-launcher__trigger app-launcher__trigger--label",
44
- children: [/* @__PURE__ */ i(e, {
44
+ children: [/* @__PURE__ */ a(e, {
45
45
  name: "grid",
46
46
  size: "md"
47
- }), /* @__PURE__ */ i("span", {
47
+ }), /* @__PURE__ */ a("span", {
48
48
  className: "app-launcher__trigger-label",
49
49
  children: n.trigger
50
50
  })]
51
- }) : /* @__PURE__ */ i("button", {
51
+ }) : /* @__PURE__ */ a("button", {
52
52
  type: "button",
53
53
  className: "app-launcher__trigger",
54
54
  "aria-label": n.open,
55
- children: /* @__PURE__ */ i(e, {
55
+ children: /* @__PURE__ */ a(e, {
56
56
  name: "grid",
57
57
  size: "md"
58
58
  })
59
- }) }), /* @__PURE__ */ i(s.Portal, { children: /* @__PURE__ */ i(s.Positioner, {
59
+ }) }), /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Positioner, {
60
60
  className: "app-launcher__positioner",
61
61
  sideOffset: 4,
62
62
  align: "end",
63
- children: /* @__PURE__ */ i(s.Popup, {
63
+ children: /* @__PURE__ */ a(s.Popup, {
64
64
  className: "app-launcher__content",
65
- children: /* @__PURE__ */ i(l, {
65
+ children: /* @__PURE__ */ a(l, {
66
66
  apps: t,
67
67
  currentAppId: r,
68
68
  newLabel: n.new
@@ -72,48 +72,48 @@ function u({ apps: t, labels: n, currentAppId: r, open: o, defaultOpen: c, onOpe
72
72
  });
73
73
  }
74
74
  function d(e, t, n) {
75
- let [r, i] = o(t ?? !1);
76
- return [e ?? r, (t) => {
77
- e === void 0 && i(t), n?.(t);
75
+ let [i, a] = r(t ?? !1);
76
+ return [e ?? i, (t) => {
77
+ e === void 0 && a(t), n?.(t);
78
78
  }];
79
79
  }
80
- function f({ apps: t, labels: o, currentAppId: s, open: c, defaultOpen: u, onOpenChange: f }) {
80
+ function f({ apps: t, labels: r, currentAppId: s, open: c, defaultOpen: u, onOpenChange: f }) {
81
81
  let [p, m] = d(c, u, f);
82
- return /* @__PURE__ */ a(r, { children: [o.trigger ? /* @__PURE__ */ a("button", {
82
+ return /* @__PURE__ */ o(i, { children: [r.trigger ? /* @__PURE__ */ o("button", {
83
83
  type: "button",
84
84
  className: "app-launcher__trigger app-launcher__trigger--label",
85
85
  "aria-haspopup": "dialog",
86
86
  onClick: () => m(!0),
87
- children: [/* @__PURE__ */ i(e, {
87
+ children: [/* @__PURE__ */ a(e, {
88
88
  name: "grid",
89
89
  size: "md"
90
- }), /* @__PURE__ */ i("span", {
90
+ }), /* @__PURE__ */ a("span", {
91
91
  className: "app-launcher__trigger-label",
92
- children: o.trigger
92
+ children: r.trigger
93
93
  })]
94
- }) : /* @__PURE__ */ i("button", {
94
+ }) : /* @__PURE__ */ a("button", {
95
95
  type: "button",
96
96
  className: "app-launcher__trigger",
97
- "aria-label": o.open,
97
+ "aria-label": r.open,
98
98
  "aria-haspopup": "dialog",
99
99
  onClick: () => m(!0),
100
- children: /* @__PURE__ */ i(e, {
100
+ children: /* @__PURE__ */ a(e, {
101
101
  name: "grid",
102
102
  size: "md"
103
103
  })
104
- }), /* @__PURE__ */ i(n, {
104
+ }), /* @__PURE__ */ a(n, {
105
105
  open: p,
106
106
  onClose: () => m(!1),
107
- title: o.title ?? "Aplicaciones",
108
- children: /* @__PURE__ */ i(l, {
107
+ title: r.title ?? "Aplicaciones",
108
+ children: /* @__PURE__ */ a(l, {
109
109
  apps: t,
110
110
  currentAppId: s,
111
- newLabel: o.new
111
+ newLabel: r.new
112
112
  })
113
113
  })] });
114
114
  }
115
115
  function p({ presentation: e = "modal", ...t }) {
116
- return i(e === "popover" ? u : f, { ...t });
116
+ return a(e === "popover" ? u : f, { ...t });
117
117
  }
118
118
  //#endregion
119
119
  export { p as AppLauncher };
package/dist/app-shell.js CHANGED
@@ -4,24 +4,24 @@ import { SkipLink as e } from "./skip-link.js";
4
4
  import { TooltipProvider as t } from "./tooltip.js";
5
5
  import { t as n } from "./_shared/css-properties.js";
6
6
  import { n as r, t as i } from "./_shared/appshellcontext.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
- import { useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
7
+ import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  //#region src/stories/sections/AppShell/AppShell.tsx
10
10
  var d = "(min-width: 1024px)";
11
11
  function f() {
12
- let [e, t] = u(() => typeof window > "u" ? !0 : window.matchMedia(d).matches);
13
- return c(() => {
12
+ let [e, t] = c(() => typeof window > "u" ? !0 : window.matchMedia(d).matches);
13
+ return o(() => {
14
14
  let e = window.matchMedia(d), n = () => t(e.matches);
15
15
  return n(), e.addEventListener("change", n), () => e.removeEventListener("change", n);
16
16
  }, []), e;
17
17
  }
18
18
  function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sidebarState: h, onSidebarChange: g, defaultSidebarWidth: _, onSidebarWidthChange: v, skipLabel: y = "Saltar al contenido principal" }) {
19
- let b = f(), [x, S] = u(m), [C, w] = u(!1), [T, E] = u(_), D = b ? h ?? x : C ? "open" : "closed", O = s((e) => {
19
+ let b = f(), [x, S] = c(m), [C, w] = c(!1), [T, E] = c(_), D = b ? h ?? x : C ? "open" : "closed", O = a((e) => {
20
20
  b ? (S(e), g?.(e)) : w(e === "open");
21
- }, [b, g]), k = s(() => O(D === "open" ? "closed" : "open"), [O, D]), A = s(() => O("closed"), [O]), j = s((e) => {
21
+ }, [b, g]), k = a(() => O(D === "open" ? "closed" : "open"), [O, D]), A = a(() => O("closed"), [O]), j = a((e) => {
22
22
  E(e), v?.(e);
23
23
  }, [v]);
24
- c(() => {
24
+ o(() => {
25
25
  if (b || !C) return;
26
26
  let e = (e) => {
27
27
  e.key === "Escape" && w(!1);
@@ -32,7 +32,7 @@ function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sid
32
32
  document.removeEventListener("keydown", e), document.body.style.overflow = t;
33
33
  };
34
34
  }, [b, C]);
35
- let M = l(() => ({
35
+ let M = s(() => ({
36
36
  sidebar: D,
37
37
  setSidebar: O,
38
38
  sidebarWidth: T ?? 0,
@@ -49,25 +49,25 @@ function p({ header: r, sidebar: d, children: p, defaultSidebar: m = "open", sid
49
49
  A,
50
50
  b
51
51
  ]), N = n({ "--app-shell-sidebar-width": T ? `${T}px` : void 0 }), P = !b && C;
52
- return /* @__PURE__ */ a(i.Provider, {
52
+ return /* @__PURE__ */ l(i.Provider, {
53
53
  value: M,
54
- children: /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(e, {
54
+ children: /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l(e, {
55
55
  href: "#main-content",
56
56
  children: y
57
- }), /* @__PURE__ */ o("div", {
57
+ }), /* @__PURE__ */ u("div", {
58
58
  ref: N,
59
59
  className: "app-shell",
60
60
  "data-sidebar": D,
61
- children: [r, /* @__PURE__ */ o("div", {
61
+ children: [r, /* @__PURE__ */ u("div", {
62
62
  className: "app-shell__body",
63
63
  children: [
64
64
  d,
65
- P && /* @__PURE__ */ a("div", {
65
+ P && /* @__PURE__ */ l("div", {
66
66
  className: "app-shell__backdrop",
67
67
  onClick: A,
68
68
  "aria-hidden": "true"
69
69
  }),
70
- /* @__PURE__ */ a("main", {
70
+ /* @__PURE__ */ l("main", {
71
71
  id: "main-content",
72
72
  tabIndex: -1,
73
73
  className: "app-shell__content",
@@ -2,25 +2,25 @@ import './assistant-message.css';
2
2
  import { MessageBubble as e } from "./message-bubble.js";
3
3
  import { TypingIndicator as t } from "./typing-indicator.js";
4
4
  import { t as n } from "./_shared/messagetimestamp.js";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
- import { forwardRef as a } from "react";
5
+ import { forwardRef as r } from "react";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  //#region src/stories/molecules/AssistantMessage/AssistantMessage.tsx
8
- var o = a(function({ children: a, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingLabel: d, className: f, ...p }, m) {
8
+ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingLabel: d, className: f, ...p }, m) {
9
9
  let h = n(s, c, l);
10
- return /* @__PURE__ */ i("div", {
10
+ return /* @__PURE__ */ a("div", {
11
11
  ref: m,
12
12
  className: `assistant-message${f ? ` ${f}` : ""}`,
13
13
  ...p,
14
14
  children: [
15
- o && /* @__PURE__ */ r("span", {
15
+ o && /* @__PURE__ */ i("span", {
16
16
  className: "assistant-message__model",
17
17
  children: o
18
18
  }),
19
- /* @__PURE__ */ r(e, {
19
+ /* @__PURE__ */ i(e, {
20
20
  role: "assistant",
21
- children: u ? /* @__PURE__ */ r(t, { label: d }) : a
21
+ children: u ? /* @__PURE__ */ i(t, { label: d }) : r
22
22
  }),
23
- h && !u && /* @__PURE__ */ r("time", {
23
+ h && !u && /* @__PURE__ */ i("time", {
24
24
  className: "assistant-message__timestamp",
25
25
  dateTime: h.dateTime,
26
26
  children: h.label