@studiolxd/brand 40.1.0 → 41.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.
package/dist/table.js CHANGED
@@ -1,73 +1,74 @@
1
1
  'use client';
2
2
  import './table.css';
3
- import { Icon as e } from "./icon.js";
4
- import { VisuallyHidden as t } from "./visually-hidden.js";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { VisuallyHidden as n } from "./visually-hidden.js";
6
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
7
  //#region src/stories/molecules/Table/Table.tsx
7
- function i({ children: e, ...t }) {
8
- return /* @__PURE__ */ n("thead", {
8
+ function a({ children: e, ...t }) {
9
+ return /* @__PURE__ */ r("thead", {
9
10
  ...t,
10
11
  children: e
11
12
  });
12
13
  }
13
- function a({ children: e, ...t }) {
14
- return /* @__PURE__ */ n("tfoot", {
14
+ function o({ children: e, ...t }) {
15
+ return /* @__PURE__ */ r("tfoot", {
15
16
  ...t,
16
17
  children: e
17
18
  });
18
19
  }
19
- function o({ children: e, ...t }) {
20
- return /* @__PURE__ */ n("tbody", {
20
+ function s({ children: e, ...t }) {
21
+ return /* @__PURE__ */ r("tbody", {
21
22
  ...t,
22
23
  children: e
23
24
  });
24
25
  }
25
- function s({ sortable: i = !1, sorted: a = !1, onSort: o, actions: s = !1, actionsLabel: c = "Acciones", sortedAscLabel: l = "Ordenado ascendente", sortedDescLabel: u = "Ordenado descendente", sortableLabel: d = "Activar ordenación", sticky: f, nowrap: p = !1, children: m, className: h, scope: g = "col", ..._ }) {
26
- let v = [
26
+ function c({ sortable: a = !1, sorted: o = !1, onSort: s, actions: c = !1, actionsLabel: l, sortedAscLabel: u, sortedDescLabel: d, sortableLabel: f, sticky: p, nowrap: m = !1, children: h, className: g, scope: _ = "col", ...v }) {
27
+ let y = e("table"), b = [
27
28
  "table__header",
28
- i ? "table__header--sortable" : "",
29
- a === "asc" ? "table__header--sorted-asc" : "",
30
- a === "desc" ? "table__header--sorted-desc" : "",
31
- s ? "table__header--actions" : "",
32
- f === "end" ? "table__header--sticky" : "",
33
- p ? "table__header--nowrap" : "",
34
- h
29
+ a ? "table__header--sortable" : "",
30
+ o === "asc" ? "table__header--sorted-asc" : "",
31
+ o === "desc" ? "table__header--sorted-desc" : "",
32
+ c ? "table__header--actions" : "",
33
+ p === "end" ? "table__header--sticky" : "",
34
+ m ? "table__header--nowrap" : "",
35
+ g
35
36
  ].filter(Boolean).join(" ");
36
- return i ? /* @__PURE__ */ r("th", {
37
- ..._,
38
- scope: g,
39
- className: v,
40
- "aria-sort": a === "asc" ? "ascending" : a === "desc" ? "descending" : "none",
41
- children: [/* @__PURE__ */ r("button", {
37
+ return a ? /* @__PURE__ */ i("th", {
38
+ ...v,
39
+ scope: _,
40
+ className: b,
41
+ "aria-sort": o === "asc" ? "ascending" : o === "desc" ? "descending" : "none",
42
+ children: [/* @__PURE__ */ i("button", {
42
43
  type: "button",
43
44
  className: "table__header-content",
44
- onClick: o,
45
- children: [m, /* @__PURE__ */ n(e, {
45
+ onClick: s,
46
+ children: [h, /* @__PURE__ */ r(t, {
46
47
  name: "chevron",
47
48
  size: "xs",
48
49
  className: "table__sort-icon"
49
50
  })]
50
- }), /* @__PURE__ */ n(t, { children: a === "asc" ? l : a === "desc" ? u : d })]
51
- }) : s ? /* @__PURE__ */ n("th", {
52
- ..._,
53
- scope: g,
54
- className: v,
55
- children: /* @__PURE__ */ n(t, { children: m ?? c })
56
- }) : /* @__PURE__ */ n("th", {
57
- ..._,
58
- scope: g,
59
- className: v,
60
- children: m
51
+ }), /* @__PURE__ */ r(n, { children: o === "asc" ? y("sortedAscending", u) : o === "desc" ? y("sortedDescending", d) : y("sortable", f) })]
52
+ }) : c ? /* @__PURE__ */ r("th", {
53
+ ...v,
54
+ scope: _,
55
+ className: b,
56
+ children: /* @__PURE__ */ r(n, { children: h ?? y("actions", l) })
57
+ }) : /* @__PURE__ */ r("th", {
58
+ ...v,
59
+ scope: _,
60
+ className: b,
61
+ children: h
61
62
  });
62
63
  }
63
- function c({ onClick: e, interactive: t = !1, selected: r = !1, label: i, children: a, className: o, ...s }) {
64
- let c = t || !!e, l = c ? r : r || void 0, u = [
64
+ function l({ onClick: e, interactive: t = !1, selected: n = !1, label: i, children: a, className: o, ...s }) {
65
+ let c = t || !!e, l = c ? n : n || void 0, u = [
65
66
  "table__row",
66
67
  c ? "table__row--interactive" : "",
67
- r ? "table__row--selected" : "",
68
+ n ? "table__row--selected" : "",
68
69
  o
69
70
  ].filter(Boolean).join(" ");
70
- return c ? /* @__PURE__ */ n("tr", {
71
+ return c ? /* @__PURE__ */ r("tr", {
71
72
  ...s,
72
73
  className: u,
73
74
  "aria-label": i,
@@ -78,7 +79,7 @@ function c({ onClick: e, interactive: t = !1, selected: r = !1, label: i, childr
78
79
  },
79
80
  tabIndex: 0,
80
81
  children: a
81
- }) : /* @__PURE__ */ n("tr", {
82
+ }) : /* @__PURE__ */ r("tr", {
82
83
  ...s,
83
84
  className: u,
84
85
  "aria-label": i,
@@ -86,37 +87,37 @@ function c({ onClick: e, interactive: t = !1, selected: r = !1, label: i, childr
86
87
  children: a
87
88
  });
88
89
  }
89
- function l({ sticky: e, actions: t = !1, nowrap: r = !1, children: i, className: a, ...o }) {
90
+ function u({ sticky: e, actions: t = !1, nowrap: n = !1, children: i, className: a, ...o }) {
90
91
  let s = [
91
92
  "table__cell",
92
93
  e === "end" ? "table__cell--sticky" : "",
93
94
  t ? "table__cell--actions" : "",
94
- r ? "table__cell--nowrap" : "",
95
+ n ? "table__cell--nowrap" : "",
95
96
  a
96
97
  ].filter(Boolean).join(" ");
97
- return /* @__PURE__ */ n("td", {
98
+ return /* @__PURE__ */ r("td", {
98
99
  ...o,
99
100
  className: s,
100
101
  children: i
101
102
  });
102
103
  }
103
- function u({ caption: e, children: t, size: i = "md", className: a, ...o }) {
104
- return /* @__PURE__ */ n("div", {
104
+ function d({ caption: e, children: t, size: n = "md", className: a, ...o }) {
105
+ return /* @__PURE__ */ r("div", {
105
106
  className: "table__wrapper",
106
- children: /* @__PURE__ */ r("table", {
107
+ children: /* @__PURE__ */ i("table", {
107
108
  className: [
108
109
  "table",
109
- i === "sm" ? "table--sm" : "",
110
+ n === "sm" ? "table--sm" : "",
110
111
  a ?? ""
111
112
  ].filter(Boolean).join(" "),
112
113
  ...o,
113
- children: [e && /* @__PURE__ */ n("caption", {
114
+ children: [e && /* @__PURE__ */ r("caption", {
114
115
  className: "visually-hidden",
115
116
  children: e
116
117
  }), t]
117
118
  })
118
119
  });
119
120
  }
120
- u.Head = i, u.Footer = a, u.Header = s, u.Body = o, u.Row = c, u.Cell = l;
121
+ d.Head = a, d.Footer = o, d.Header = c, d.Body = s, d.Row = l, d.Cell = u;
121
122
  //#endregion
122
- export { u as Table, o as TableBody, l as TableCell, a as TableFooter, i as TableHead, s as TableHeader, c as TableRow };
123
+ export { d as Table, s as TableBody, u as TableCell, o as TableFooter, a as TableHead, c as TableHeader, l as TableRow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiolxd/brand",
3
- "version": "40.1.0",
3
+ "version": "41.0.0",
4
4
  "description": "El sistema de diseño de Studio LXD: componentes React, tokens y documentación de la suite SLXD.",
5
5
  "repository": {
6
6
  "type": "git",