@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,18 +1,18 @@
1
1
  'use client';
2
2
  import './radio-group.css';
3
3
  import { t as e } from "./_shared/radiogroupcontext.js";
4
- import { jsx as t } from "react/jsx-runtime";
5
- import { useCallback as n, useId as r, useState as i } from "react";
4
+ import { useCallback as t, useId as n, useState as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
6
  //#region src/stories/atoms/RadioGroup/RadioGroup.tsx
7
7
  function a({ value: a, defaultValue: o, onValueChange: s, name: c, disabled: l, size: u, error: d, orientation: f = "vertical", children: p, className: m, ...h }) {
8
- let g = r(), [_, v] = i(o), y = a !== void 0, b = y ? a : _, x = n((e) => {
8
+ let g = n(), [_, v] = r(o), y = a !== void 0, b = y ? a : _, x = t((e) => {
9
9
  y || v(e), s?.(e);
10
10
  }, [y, s]), S = [
11
11
  "radio-group",
12
12
  f === "horizontal" ? "radio-group--horizontal" : "",
13
13
  m ?? ""
14
14
  ].filter(Boolean).join(" ");
15
- return /* @__PURE__ */ t(e.Provider, {
15
+ return /* @__PURE__ */ i(e.Provider, {
16
16
  value: {
17
17
  name: c ?? g,
18
18
  value: b,
@@ -21,7 +21,7 @@ function a({ value: a, defaultValue: o, onValueChange: s, name: c, disabled: l,
21
21
  size: u,
22
22
  error: d
23
23
  },
24
- children: /* @__PURE__ */ t("div", {
24
+ children: /* @__PURE__ */ i("div", {
25
25
  role: "radiogroup",
26
26
  className: S,
27
27
  ...h,
package/dist/radio.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import './radio.css';
3
3
  import { n as e } from "./_shared/radiogroupcontext.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
  //#region src/stories/atoms/Radio/Radio.tsx
7
- var r = n(function({ size: n, error: r, className: i, ...a }, o) {
8
- let s = e(), c = n ?? s?.size ?? "md", l = r ?? s?.error ?? !1, u = a.name ?? s?.name, d = a.disabled ?? s?.disabled, f = a.checked ?? (s && a.value !== void 0 ? s.value === a.value : void 0), p = [
7
+ var r = t(function({ size: t, error: r, className: i, ...a }, o) {
8
+ let s = e(), c = t ?? s?.size ?? "md", l = r ?? s?.error ?? !1, u = a.name ?? s?.name, d = a.disabled ?? s?.disabled, f = a.checked ?? (s && a.value !== void 0 ? s.value === a.value : void 0), p = [
9
9
  "radio",
10
10
  c === "md" ? "" : `radio--${c}`,
11
11
  l ? "radio--error" : "",
@@ -14,7 +14,7 @@ var r = n(function({ size: n, error: r, className: i, ...a }, o) {
14
14
  function m(e) {
15
15
  a.onChange?.(e), s && e.target.checked && s.select(e.target.value);
16
16
  }
17
- return /* @__PURE__ */ t("input", {
17
+ return /* @__PURE__ */ n("input", {
18
18
  ref: o,
19
19
  className: p,
20
20
  "aria-invalid": l || void 0,
@@ -1,35 +1,35 @@
1
1
  'use client';
2
2
  import './scroll-area.css';
3
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
4
- import { forwardRef as n } from "react";
3
+ import { forwardRef as e } from "react";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
5
  import { ScrollArea as r } from "@base-ui/react/scroll-area";
6
6
  //#region src/stories/atoms/ScrollArea/ScrollArea.tsx
7
- var i = n(function({ orientation: n = "vertical", label: i, children: a, className: o, ...s }, c) {
8
- let l = n === "vertical" || n === "both", u = n === "horizontal" || n === "both";
9
- return /* @__PURE__ */ t(r.Root, {
7
+ var i = e(function({ orientation: e = "vertical", label: i, children: a, className: o, ...s }, c) {
8
+ let l = e === "vertical" || e === "both", u = e === "horizontal" || e === "both";
9
+ return /* @__PURE__ */ n(r.Root, {
10
10
  ref: c,
11
11
  className: ["scroll-area", o].filter(Boolean).join(" "),
12
12
  ...s,
13
13
  children: [
14
- /* @__PURE__ */ e(r.Viewport, {
14
+ /* @__PURE__ */ t(r.Viewport, {
15
15
  className: "scroll-area__viewport",
16
16
  role: i ? "region" : void 0,
17
17
  "aria-label": i,
18
18
  children: a
19
19
  }),
20
- l && /* @__PURE__ */ e(r.Scrollbar, {
20
+ l && /* @__PURE__ */ t(r.Scrollbar, {
21
21
  keepMounted: !0,
22
22
  orientation: "vertical",
23
23
  className: "scroll-area__scrollbar",
24
- children: /* @__PURE__ */ e(r.Thumb, { className: "scroll-area__thumb" })
24
+ children: /* @__PURE__ */ t(r.Thumb, { className: "scroll-area__thumb" })
25
25
  }),
26
- u && /* @__PURE__ */ e(r.Scrollbar, {
26
+ u && /* @__PURE__ */ t(r.Scrollbar, {
27
27
  keepMounted: !0,
28
28
  orientation: "horizontal",
29
29
  className: "scroll-area__scrollbar",
30
- children: /* @__PURE__ */ e(r.Thumb, { className: "scroll-area__thumb" })
30
+ children: /* @__PURE__ */ t(r.Thumb, { className: "scroll-area__thumb" })
31
31
  }),
32
- l && u && /* @__PURE__ */ e(r.Corner, { className: "scroll-area__corner" })
32
+ l && u && /* @__PURE__ */ t(r.Corner, { className: "scroll-area__corner" })
33
33
  ]
34
34
  });
35
35
  });
@@ -3,11 +3,11 @@ import './search-form.css';
3
3
  import { Icon as e } from "./icon.js";
4
4
  import { n as t } from "./_shared/form-size.js";
5
5
  import { InputField as n } from "./input-field.js";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
- import { forwardRef as a, useId as o } from "react";
6
+ import { forwardRef as r, useId as i } from "react";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  //#region src/stories/molecules/SearchForm/SearchForm.tsx
9
- var s = a(function({ id: a, name: s = "q", value: c, defaultValue: l, onChange: u, onSubmit: d, action: f, method: p = "get", label: m = "Buscar", labelHidden: h = !0, placeholder: g = "Buscar…", submitLabel: _ = "Buscar", size: v, disabled: y }, b) {
10
- let x = t(v === "xl" ? void 0 : v), S = v === "xl" ? "xl" : x, C = S === "xl" ? "lg" : S, w = o(), T = a ?? w;
9
+ var s = r(function({ id: r, name: s = "q", value: c, defaultValue: l, onChange: u, onSubmit: d, action: f, method: p = "get", label: m = "Buscar", labelHidden: h = !0, placeholder: g = "Buscar…", submitLabel: _ = "Buscar", size: v, disabled: y }, b) {
10
+ let x = t(v === "xl" ? void 0 : v), S = v === "xl" ? "xl" : x, C = S === "xl" ? "lg" : S, w = i(), T = r ?? w;
11
11
  function E(e) {
12
12
  let t = String(new FormData(e.currentTarget).get(s) ?? "").trim();
13
13
  if (d) {
@@ -16,14 +16,14 @@ var s = a(function({ id: a, name: s = "q", value: c, defaultValue: l, onChange:
16
16
  }
17
17
  t || e.preventDefault();
18
18
  }
19
- return /* @__PURE__ */ i("form", {
19
+ return /* @__PURE__ */ o("form", {
20
20
  className: ["search-form", S === "md" ? "" : `search-form--${S}`].filter(Boolean).join(" "),
21
21
  role: "search",
22
22
  "aria-label": m,
23
23
  action: f,
24
24
  method: p,
25
25
  onSubmit: E,
26
- children: [/* @__PURE__ */ r(n, {
26
+ children: [/* @__PURE__ */ a(n, {
27
27
  ref: b,
28
28
  className: "search-form__field",
29
29
  id: T,
@@ -39,12 +39,12 @@ var s = a(function({ id: a, name: s = "q", value: c, defaultValue: l, onChange:
39
39
  disabled: y,
40
40
  size: C,
41
41
  onChange: u
42
- }), /* @__PURE__ */ r("button", {
42
+ }), /* @__PURE__ */ a("button", {
43
43
  className: "search-form__submit",
44
44
  type: "submit",
45
45
  disabled: y,
46
46
  "aria-label": _,
47
- children: /* @__PURE__ */ r(e, {
47
+ children: /* @__PURE__ */ a(e, {
48
48
  name: "arrow",
49
49
  className: "search-form__submit-glyph"
50
50
  })
@@ -5,8 +5,8 @@ import { ErrorText as t } from "./error-text.js";
5
5
  import { Label as n } from "./label.js";
6
6
  import { Select as r, isSelectOptionGroup as i } from "./select.js";
7
7
  import { n as a } from "./_shared/field-labels.js";
8
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
- import { forwardRef as c, useId as l } from "react";
8
+ import { forwardRef as o, useId as s } from "react";
9
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
10
  //#region src/stories/molecules/SelectField/SelectField.tsx
11
11
  var u = "__empty__";
12
12
  function d(e, t) {
@@ -21,21 +21,21 @@ function p(e) {
21
21
  value: u
22
22
  } : e;
23
23
  }
24
- var m = c(function({ id: c, label: u, labelHidden: m, options: h, value: g, defaultValue: _, placeholder: v, name: y, disabled: b, required: x, size: S, error: C = !1, errorMessage: w, helperText: T, className: E, onValueChange: D, onBlur: O }, k) {
25
- let A = a(m), j = e(S), M = l(), N = c ?? M, P = w ? `${N}-error` : void 0, F = T ? `${N}-helper` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = C || !!w, R = h.some((e) => i(e) ? e.options.some((e) => e.value === "") : e.value === ""), z = R ? h.map((e) => i(e) ? {
24
+ var m = o(function({ id: o, label: u, labelHidden: m, options: h, value: g, defaultValue: _, placeholder: v, name: y, disabled: b, required: x, size: S, error: C = !1, errorMessage: w, helperText: T, className: E, onValueChange: D, onBlur: O }, k) {
25
+ let A = a(m), j = e(S), M = s(), N = o ?? M, P = w ? `${N}-error` : void 0, F = T ? `${N}-helper` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = C || !!w, R = h.some((e) => i(e) ? e.options.some((e) => e.value === "") : e.value === ""), z = R ? h.map((e) => i(e) ? {
26
26
  ...e,
27
27
  options: e.options.map(p)
28
28
  } : p(e)) : h;
29
- return /* @__PURE__ */ s("div", {
29
+ return /* @__PURE__ */ l("div", {
30
30
  className: ["select-field", E].filter(Boolean).join(" "),
31
31
  children: [
32
- /* @__PURE__ */ o(n, {
32
+ /* @__PURE__ */ c(n, {
33
33
  htmlFor: N,
34
34
  hidden: A,
35
35
  size: j,
36
36
  children: u
37
37
  }),
38
- /* @__PURE__ */ o(r, {
38
+ /* @__PURE__ */ c(r, {
39
39
  ref: k,
40
40
  id: N,
41
41
  name: y,
@@ -51,11 +51,11 @@ var m = c(function({ id: c, label: u, labelHidden: m, options: h, value: g, defa
51
51
  onValueChange: D ? (e) => D(f(e)) : void 0,
52
52
  onBlur: O
53
53
  }),
54
- w && /* @__PURE__ */ o(t, {
54
+ w && /* @__PURE__ */ c(t, {
55
55
  id: P,
56
56
  children: w
57
57
  }),
58
- T && /* @__PURE__ */ o("span", {
58
+ T && /* @__PURE__ */ c("span", {
59
59
  id: F,
60
60
  className: "select-field__helper",
61
61
  children: T
package/dist/select.js CHANGED
@@ -1,145 +1,145 @@
1
1
  'use client';
2
2
  import './select.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, forwardRef as a, isValidElement as o, useContext as s, useMemo as c } from "react";
4
+ import { Children as t, createContext as n, forwardRef as r, isValidElement as i, useContext as a, useMemo as o } from "react";
5
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  import { Select as l } from "@base-ui/react/select";
7
7
  //#region src/stories/atoms/Select/Select.tsx
8
8
  function u(e) {
9
9
  return Array.isArray(e.options);
10
10
  }
11
- var d = i(null);
12
- function f(e, t) {
13
- r.forEach(e, (e) => {
14
- if (!o(e)) return;
15
- let n = e.props ?? {};
16
- if (e.type === v || typeof n.value == "string" && e.type !== p) {
17
- typeof n.value == "string" && t.set(n.value, n.children);
11
+ var d = n(null);
12
+ function f(e, n) {
13
+ t.forEach(e, (e) => {
14
+ if (!i(e)) return;
15
+ let t = e.props ?? {};
16
+ if (e.type === v || typeof t.value == "string" && e.type !== p) {
17
+ typeof t.value == "string" && n.set(t.value, t.children);
18
18
  return;
19
19
  }
20
- n.children != null && f(n.children, t);
20
+ t.children != null && f(t.children, n);
21
21
  });
22
22
  }
23
- function p({ children: e, onValueChange: n, ...r }) {
24
- let i = c(() => {
23
+ function p({ children: e, onValueChange: t, ...n }) {
24
+ let r = o(() => {
25
25
  let t = /* @__PURE__ */ new Map();
26
26
  return f(e, t), t;
27
27
  }, [e]);
28
- return /* @__PURE__ */ t(d.Provider, {
29
- value: i,
30
- children: /* @__PURE__ */ t(l.Root, {
31
- onValueChange: n ? (e) => n(e) : void 0,
32
- ...r,
28
+ return /* @__PURE__ */ s(d.Provider, {
29
+ value: r,
30
+ children: /* @__PURE__ */ s(l.Root, {
31
+ onValueChange: t ? (e) => t(e) : void 0,
32
+ ...n,
33
33
  children: e
34
34
  })
35
35
  });
36
36
  }
37
- var m = a(function({ placeholder: e, children: n, ...r }, i) {
38
- let a = s(d);
39
- return /* @__PURE__ */ t(l.Value, {
40
- ref: i,
41
- ...r,
42
- children: (t) => typeof n == "function" ? n(t) : n ?? (t == null || t === "" ? e ?? null : a?.get(t) ?? t)
37
+ var m = r(function({ placeholder: e, children: t, ...n }, r) {
38
+ let i = a(d);
39
+ return /* @__PURE__ */ s(l.Value, {
40
+ ref: r,
41
+ ...n,
42
+ children: (n) => typeof t == "function" ? t(n) : t ?? (n == null || n === "" ? e ?? null : i?.get(n) ?? n)
43
43
  });
44
- }), h = a(function({ className: e, children: n, ...r }, i) {
45
- let a = ["select__group", e ?? ""].filter(Boolean).join(" ");
46
- return /* @__PURE__ */ t(l.Group, {
47
- ref: i,
48
- className: a,
49
- ...r,
50
- children: n
44
+ }), h = r(function({ className: e, children: t, ...n }, r) {
45
+ let i = ["select__group", e ?? ""].filter(Boolean).join(" ");
46
+ return /* @__PURE__ */ s(l.Group, {
47
+ ref: r,
48
+ className: i,
49
+ ...n,
50
+ children: t
51
51
  });
52
- }), g = a(function({ size: r = "md", className: i, children: a, ...o }, s) {
53
- let c = [
52
+ }), g = r(function({ size: t = "md", className: n, children: r, ...i }, a) {
53
+ let o = [
54
54
  "select",
55
- r === "md" ? "" : `select--${r}`,
56
- i ?? ""
55
+ t === "md" ? "" : `select--${t}`,
56
+ n ?? ""
57
57
  ].filter(Boolean).join(" ");
58
- return /* @__PURE__ */ n(l.Trigger, {
59
- ref: s,
60
- className: c,
61
- ...o,
62
- children: [a, /* @__PURE__ */ t(e, {
58
+ return /* @__PURE__ */ c(l.Trigger, {
59
+ ref: a,
60
+ className: o,
61
+ ...i,
62
+ children: [r, /* @__PURE__ */ s(e, {
63
63
  name: "chevron",
64
64
  className: "select__icon",
65
- size: r === "sm" ? "xs" : r === "lg" ? "md" : "sm"
65
+ size: t === "sm" ? "xs" : t === "lg" ? "md" : "sm"
66
66
  })]
67
67
  });
68
- }), _ = a(function({ size: e = "md", container: n, className: r, children: i, side: a = "bottom", align: o = "start", sideOffset: s = -1, ...c }, u) {
68
+ }), _ = r(function({ size: e = "md", container: t, className: n, children: r, side: i = "bottom", align: a = "start", sideOffset: o = -1, ...c }, u) {
69
69
  let d = [
70
70
  "select__content",
71
71
  e === "md" ? "" : `select__content--${e}`,
72
- r ?? ""
72
+ n ?? ""
73
73
  ].filter(Boolean).join(" ");
74
- return /* @__PURE__ */ t(l.Portal, {
75
- container: n,
76
- children: /* @__PURE__ */ t(l.Positioner, {
74
+ return /* @__PURE__ */ s(l.Portal, {
75
+ container: t,
76
+ children: /* @__PURE__ */ s(l.Positioner, {
77
77
  className: "select__positioner",
78
- side: a,
79
- align: o,
80
- sideOffset: s,
78
+ side: i,
79
+ align: a,
80
+ sideOffset: o,
81
81
  alignItemWithTrigger: !1,
82
- children: /* @__PURE__ */ t(l.Popup, {
82
+ children: /* @__PURE__ */ s(l.Popup, {
83
83
  ref: u,
84
84
  className: d,
85
85
  ...c,
86
- children: i
86
+ children: r
87
87
  })
88
88
  })
89
89
  });
90
- }), v = a(function({ className: e, children: n, ...r }, i) {
91
- let a = ["select__item", e ?? ""].filter(Boolean).join(" ");
92
- return /* @__PURE__ */ t(l.Item, {
93
- ref: i,
94
- className: a,
95
- ...r,
96
- children: /* @__PURE__ */ t(l.ItemText, { children: n })
97
- });
98
- }), y = a(function({ className: e, children: n, ...r }, i) {
99
- let a = ["select__label", e ?? ""].filter(Boolean).join(" ");
100
- return /* @__PURE__ */ t(l.GroupLabel, {
101
- ref: i,
102
- className: a,
103
- ...r,
104
- children: n
90
+ }), v = r(function({ className: e, children: t, ...n }, r) {
91
+ let i = ["select__item", e ?? ""].filter(Boolean).join(" ");
92
+ return /* @__PURE__ */ s(l.Item, {
93
+ ref: r,
94
+ className: i,
95
+ ...n,
96
+ children: /* @__PURE__ */ s(l.ItemText, { children: t })
105
97
  });
106
- }), b = a(function({ className: e, ...n }, r) {
107
- let i = ["select__separator", e ?? ""].filter(Boolean).join(" ");
108
- return /* @__PURE__ */ t(l.Separator, {
98
+ }), y = r(function({ className: e, children: t, ...n }, r) {
99
+ let i = ["select__label", e ?? ""].filter(Boolean).join(" ");
100
+ return /* @__PURE__ */ s(l.GroupLabel, {
109
101
  ref: r,
110
102
  className: i,
111
- ...n
103
+ ...n,
104
+ children: t
105
+ });
106
+ }), b = r(function({ className: e, ...t }, n) {
107
+ let r = ["select__separator", e ?? ""].filter(Boolean).join(" ");
108
+ return /* @__PURE__ */ s(l.Separator, {
109
+ ref: n,
110
+ className: r,
111
+ ...t
112
112
  });
113
113
  });
114
- function x({ value: e, label: n, "aria-label": r }) {
115
- return /* @__PURE__ */ t(v, {
114
+ function x({ value: e, label: t, "aria-label": n }) {
115
+ return /* @__PURE__ */ s(v, {
116
116
  value: e,
117
- "aria-label": r,
118
- children: n
117
+ "aria-label": n,
118
+ children: t
119
119
  }, e);
120
120
  }
121
- var S = a(function({ options: e, value: r, defaultValue: i, placeholder: a = "Seleccionar…", disabled: o, readOnly: s, size: c = "md", onValueChange: l, id: d, name: f, required: v, onBlur: b, "aria-label": S, "aria-describedby": C, "aria-invalid": w, container: T }, E) {
122
- return /* @__PURE__ */ n(p, {
123
- value: r,
124
- defaultValue: i,
125
- disabled: o,
126
- readOnly: s,
121
+ var S = r(function({ options: e, value: t, defaultValue: n, placeholder: r = "Seleccionar…", disabled: i, readOnly: a, size: o = "md", onValueChange: l, id: d, name: f, required: v, onBlur: b, "aria-label": S, "aria-describedby": C, "aria-invalid": w, container: T }, E) {
122
+ return /* @__PURE__ */ c(p, {
123
+ value: t,
124
+ defaultValue: n,
125
+ disabled: i,
126
+ readOnly: a,
127
127
  name: f,
128
128
  required: v,
129
129
  onValueChange: l,
130
- children: [/* @__PURE__ */ t(g, {
130
+ children: [/* @__PURE__ */ s(g, {
131
131
  ref: E,
132
- size: c,
132
+ size: o,
133
133
  id: d,
134
134
  onBlur: b,
135
135
  "aria-label": S,
136
136
  "aria-describedby": C,
137
137
  "aria-invalid": w || void 0,
138
- children: /* @__PURE__ */ t(m, { placeholder: a })
139
- }), /* @__PURE__ */ t(_, {
140
- size: c,
138
+ children: /* @__PURE__ */ s(m, { placeholder: r })
139
+ }), /* @__PURE__ */ s(_, {
140
+ size: o,
141
141
  container: T,
142
- children: e.map((e, r) => u(e) ? /* @__PURE__ */ n(h, { children: [/* @__PURE__ */ t(y, { children: e.label }), e.options.map(x)] }, `group-${r}`) : x(e))
142
+ children: e.map((e, t) => u(e) ? /* @__PURE__ */ c(h, { children: [/* @__PURE__ */ s(y, { children: e.label }), e.options.map(x)] }, `group-${t}`) : x(e))
143
143
  })]
144
144
  });
145
145
  }), C = Object.assign(S, {
package/dist/separator.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import './separator.css';
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { forwardRef as t } from "react";
2
+ import { forwardRef as e } from "react";
3
+ import { jsx as t } from "react/jsx-runtime";
4
4
  //#region src/stories/atoms/Separator/Separator.tsx
5
- var n = t(function({ orientation: t = "horizontal", decorative: n = !0, spacing: r = "md", className: i, ...a }, o) {
6
- return /* @__PURE__ */ e("hr", {
5
+ var n = e(function({ orientation: e = "horizontal", decorative: n = !0, spacing: r = "md", className: i, ...a }, o) {
6
+ return /* @__PURE__ */ t("hr", {
7
7
  ref: o,
8
8
  className: [
9
9
  "separator",
10
- t === "vertical" ? "separator--vertical" : "",
10
+ e === "vertical" ? "separator--vertical" : "",
11
11
  r === "md" ? "" : `separator--${r}`,
12
12
  i ?? ""
13
13
  ].filter(Boolean).join(" "),
14
- ...n ? { role: "none" } : t === "vertical" ? { "aria-orientation": "vertical" } : {},
14
+ ...n ? { role: "none" } : e === "vertical" ? { "aria-orientation": "vertical" } : {},
15
15
  ...a
16
16
  });
17
17
  });
package/dist/sidebar.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import './sidebar.css';
3
3
  import { n as e, t } from "./_shared/sidebarcontext.js";
4
4
  import { t as n } from "./_shared/appshellcontext.js";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
- import { useCallback as a, useContext as o, useEffect as s, useRef as c, useState as l } from "react";
5
+ import { useCallback as r, useContext as i, useEffect as a, useRef as o, useState as s } from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  //#region src/stories/sections/Sidebar/Sidebar.tsx
8
8
  function u(e, t) {
9
9
  let n = document.createElement("div");
@@ -12,8 +12,8 @@ function u(e, t) {
12
12
  return n.remove(), r;
13
13
  }
14
14
  function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral", resizerLabel: h = "Ancho de la barra lateral", resizerValueText: g = (e) => `${e} píxeles`, mode: _ }) {
15
- let v = o(n), y = v ? v.sidebar : _ ?? "open", b = v ? v.isDesktop : !0, x = b && y === "rail", S = !b, C = c(null), w = c(null), [T, E] = l(null);
16
- s(() => {
15
+ let v = i(n), y = v ? v.sidebar : _ ?? "open", b = v ? v.isDesktop : !0, x = b && y === "rail", S = !b, C = o(null), w = o(null), [T, E] = s(null);
16
+ a(() => {
17
17
  let e = C.current;
18
18
  if (!e) return;
19
19
  let t = {
@@ -26,7 +26,7 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
26
26
  }, []);
27
27
  let D = (e) => {
28
28
  !S || !v || e.target.closest("a[href], [aria-haspopup=\"dialog\"]") && v.closeSidebar();
29
- }, O = a((e) => {
29
+ }, O = r((e) => {
30
30
  let t = C.current;
31
31
  if (!t || !v) return;
32
32
  let n = u(t, "--sidebar-min-width"), r = u(t, "--sidebar-max-width");
@@ -45,7 +45,7 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
45
45
  let t = u(C.current, "--sidebar-resize-step-px"), n = C.current.getBoundingClientRect().width;
46
46
  e.key === "ArrowLeft" && (e.preventDefault(), O(n - t)), e.key === "ArrowRight" && (e.preventDefault(), y === "open" ? O(n + t) : v.setSidebar("open")), e.key === "Home" && (e.preventDefault(), v.setSidebar("rail")), e.key === "End" && (e.preventDefault(), O(u(C.current, "--sidebar-max-width")));
47
47
  };
48
- s(() => {
48
+ a(() => {
49
49
  if (!S) return;
50
50
  if (y === "open") {
51
51
  w.current = document.activeElement, C.current?.focus();
@@ -55,9 +55,9 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
55
55
  (e && t instanceof Node && e.contains(t) || t === document.body || t === null) && w.current?.focus?.(), w.current = null;
56
56
  }, [S, y]);
57
57
  let j = Math.round(y === "rail" ? T?.rail ?? 0 : (v?.sidebarWidth || T?.base) ?? 0), M = ["sidebar", S ? "sidebar--drawer" : `sidebar--${y}`].join(" ");
58
- return /* @__PURE__ */ r(t.Provider, {
58
+ return /* @__PURE__ */ c(t.Provider, {
59
59
  value: { rail: x },
60
- children: /* @__PURE__ */ i("aside", {
60
+ children: /* @__PURE__ */ l("aside", {
61
61
  ref: C,
62
62
  id: p,
63
63
  className: M,
@@ -68,23 +68,23 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
68
68
  tabIndex: S ? -1 : void 0,
69
69
  inert: S && y === "closed" ? !0 : void 0,
70
70
  onClick: D,
71
- children: [/* @__PURE__ */ i("div", {
71
+ children: [/* @__PURE__ */ l("div", {
72
72
  className: "sidebar__inner",
73
73
  children: [
74
- e && /* @__PURE__ */ r("div", {
74
+ e && /* @__PURE__ */ c("div", {
75
75
  className: "sidebar__header",
76
76
  children: e
77
77
  }),
78
- /* @__PURE__ */ r("div", {
78
+ /* @__PURE__ */ c("div", {
79
79
  className: "sidebar__panel",
80
80
  children: d
81
81
  }),
82
- f && /* @__PURE__ */ r("div", {
82
+ f && /* @__PURE__ */ c("div", {
83
83
  className: "sidebar__footer",
84
84
  children: f
85
85
  })
86
86
  ]
87
- }), b && v && y !== "closed" && /* @__PURE__ */ r("div", {
87
+ }), b && v && y !== "closed" && /* @__PURE__ */ c("div", {
88
88
  className: "sidebar__resizer",
89
89
  role: "separator",
90
90
  "aria-orientation": "vertical",
@@ -101,19 +101,19 @@ function d({ logo: e, children: d, footer: f, id: p, label: m = "Barra lateral",
101
101
  });
102
102
  }
103
103
  function f({ className: e, ...t }) {
104
- return /* @__PURE__ */ r("div", {
104
+ return /* @__PURE__ */ c("div", {
105
105
  className: ["sidebar__group", e].filter(Boolean).join(" "),
106
106
  ...t
107
107
  });
108
108
  }
109
109
  function p({ className: e, ...t }) {
110
- return /* @__PURE__ */ r("div", {
110
+ return /* @__PURE__ */ c("div", {
111
111
  className: ["sidebar__group-content", e].filter(Boolean).join(" "),
112
112
  ...t
113
113
  });
114
114
  }
115
115
  function m({ className: e, ...t }) {
116
- return /* @__PURE__ */ r("hr", {
116
+ return /* @__PURE__ */ c("hr", {
117
117
  className: ["sidebar__separator", e].filter(Boolean).join(" "),
118
118
  ...t
119
119
  });
@@ -3,20 +3,20 @@ import './site-header.css';
3
3
  import { Container as e } from "./container.js";
4
4
  import { MenuButton as t } from "./menu-button.js";
5
5
  import { t as n } from "./_shared/logo.js";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
- import { useEffect as a, useRef as o, useState as s } from "react";
6
+ import { useEffect as r, useRef as i, useState as a } from "react";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  //#region src/stories/sections/SiteHeader/SiteHeader.tsx
9
9
  function c({ children: e, ...t }) {
10
- return /* @__PURE__ */ r("a", {
10
+ return /* @__PURE__ */ o("a", {
11
11
  ...t,
12
12
  children: e
13
13
  });
14
14
  }
15
- function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", menuLabel: d = "Menú de navegación", menuCloseLabel: f, logoSize: p = "xxl", logo: m = /* @__PURE__ */ r(n, { size: p }), menuButtonSize: h = "lg", renderLogoLink: g = c, width: _ = "xl", open: v, onOpenChange: y, children: b, settings: x, panelId: S = "site-header-panel", actions: C, language: w }) {
16
- let [T, E] = s(!1), D = v !== void 0, O = D ? v : T, k = !!(b || x || w), A = o(null), j = o(null), M = (e) => {
15
+ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", menuLabel: d = "Menú de navegación", menuCloseLabel: f, logoSize: p = "xxl", logo: m = /* @__PURE__ */ o(n, { size: p }), menuButtonSize: h = "lg", renderLogoLink: g = c, width: _ = "xl", open: v, onOpenChange: y, children: b, settings: x, panelId: S = "site-header-panel", actions: C, language: w }) {
16
+ let [T, E] = a(!1), D = v !== void 0, O = D ? v : T, k = !!(b || x || w), A = i(null), j = i(null), M = (e) => {
17
17
  D || E(e), y?.(e);
18
18
  };
19
- return a(() => {
19
+ return r(() => {
20
20
  if (!O) return;
21
21
  let e = (e) => {
22
22
  e.key === "Escape" && (M(!1), j.current?.focus());
@@ -29,10 +29,10 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
29
29
  return document.body.style.overflow = "hidden", () => {
30
30
  document.removeEventListener("keydown", e), document.removeEventListener("pointerdown", t), document.body.style.overflow = n;
31
31
  };
32
- }, [O]), /* @__PURE__ */ r("header", {
32
+ }, [O]), /* @__PURE__ */ o("header", {
33
33
  ref: A,
34
34
  className: "site-header",
35
- children: /* @__PURE__ */ i(e, {
35
+ children: /* @__PURE__ */ s(e, {
36
36
  width: _,
37
37
  innerClassName: "site-header__bar",
38
38
  children: [
@@ -42,12 +42,12 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
42
42
  "aria-label": u,
43
43
  children: m
44
44
  }),
45
- /* @__PURE__ */ i("div", {
45
+ /* @__PURE__ */ s("div", {
46
46
  className: "site-header__controls",
47
- children: [C && /* @__PURE__ */ r("div", {
47
+ children: [C && /* @__PURE__ */ o("div", {
48
48
  className: "site-header__actions",
49
49
  children: C
50
- }), k && /* @__PURE__ */ r(t, {
50
+ }), k && /* @__PURE__ */ o(t, {
51
51
  ref: j,
52
52
  isOpen: O,
53
53
  onClick: () => M(!O),
@@ -57,16 +57,16 @@ function l({ logoHref: l = "/", logoLabel: u = "Studio LXD — ir al inicio", me
57
57
  "aria-controls": S
58
58
  })]
59
59
  }),
60
- k && /* @__PURE__ */ r("div", {
60
+ k && /* @__PURE__ */ o("div", {
61
61
  className: ["site-header__panel", O ? "site-header__panel--open" : ""].filter(Boolean).join(" "),
62
62
  id: S,
63
63
  inert: !O,
64
64
  "aria-hidden": !O,
65
- children: /* @__PURE__ */ i(e, {
65
+ children: /* @__PURE__ */ s(e, {
66
66
  width: _,
67
67
  space: "none",
68
68
  innerClassName: "site-header__panel-inner",
69
- children: [b, (w || x) && /* @__PURE__ */ i("div", {
69
+ children: [b, (w || x) && /* @__PURE__ */ s("div", {
70
70
  className: "site-header__settings",
71
71
  children: [w, x]
72
72
  })]