@studiolxd/brand 39.0.0 → 40.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/_shared/brandmessagescontext.js +15 -0
  3. package/dist/_shared/calendargrid.js +42 -42
  4. package/dist/_shared/datepicker.js +41 -41
  5. package/dist/_shared/imagecropdialog.js +54 -54
  6. package/dist/_shared/tokens.js +1 -0
  7. package/dist/_types/messages/BrandMessages.d.ts +26 -0
  8. package/dist/_types/messages/BrandMessagesContext.d.ts +21 -0
  9. package/dist/_types/messages/BrandMessagesProvider.d.ts +46 -0
  10. package/dist/_types/messages/index.d.ts +5 -0
  11. package/dist/_types/molecules/Pagination/Pagination.d.ts +40 -23
  12. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +27 -5
  13. package/dist/_types/organisms/DataTable/DataTable.d.ts +3 -2
  14. package/dist/accordion.js +26 -26
  15. package/dist/alert.js +26 -26
  16. package/dist/annotation-thread.css +1 -1
  17. package/dist/annotation-thread.js +37 -26
  18. package/dist/app-header.js +8 -8
  19. package/dist/app-launcher.js +34 -34
  20. package/dist/app-shell.js +14 -14
  21. package/dist/assistant-message.js +8 -8
  22. package/dist/async-multi-select-field.js +9 -9
  23. package/dist/async-multi-select.js +40 -40
  24. package/dist/async-select-field.js +9 -9
  25. package/dist/async-select.js +64 -64
  26. package/dist/avatar-upload.js +40 -40
  27. package/dist/avatar.js +5 -5
  28. package/dist/banner.js +9 -9
  29. package/dist/brand.css +2 -1
  30. package/dist/button.js +7 -7
  31. package/dist/calendar-planner.js +16 -16
  32. package/dist/calendar.js +38 -38
  33. package/dist/card.js +28 -28
  34. package/dist/carousel.js +19 -19
  35. package/dist/chart.js +137 -137
  36. package/dist/chat-shell.js +23 -23
  37. package/dist/checkbox-field.js +11 -11
  38. package/dist/checkbox.js +7 -7
  39. package/dist/close-button.js +6 -6
  40. package/dist/code-block.js +15 -15
  41. package/dist/code.js +5 -5
  42. package/dist/collapsible.js +1 -1
  43. package/dist/columns.js +7 -7
  44. package/dist/command-palette.js +14 -14
  45. package/dist/confirm-dialog.js +10 -10
  46. package/dist/connector-auth-shell.js +9 -9
  47. package/dist/consent.js +23 -23
  48. package/dist/container.js +6 -6
  49. package/dist/conversation-list.js +19 -19
  50. package/dist/conversation-thread.js +15 -15
  51. package/dist/copy-button.js +9 -9
  52. package/dist/copyable-value.js +17 -17
  53. package/dist/data-table.js +29 -29
  54. package/dist/date-picker-field.js +9 -9
  55. package/dist/date-time-field.js +12 -12
  56. package/dist/description-list.js +12 -12
  57. package/dist/docs-search.js +1 -1
  58. package/dist/dots-button.js +7 -7
  59. package/dist/dropdown-field.js +13 -13
  60. package/dist/email.js +44 -44
  61. package/dist/error-text.js +4 -4
  62. package/dist/field-row.js +20 -20
  63. package/dist/figure.js +8 -8
  64. package/dist/file-upload-field.js +9 -9
  65. package/dist/file-upload.js +29 -29
  66. package/dist/filter-bar.js +10 -10
  67. package/dist/floating-dock.js +17 -17
  68. package/dist/form-field.js +43 -43
  69. package/dist/form.js +14 -14
  70. package/dist/heading.js +5 -5
  71. package/dist/input-field.js +20 -20
  72. package/dist/input-phone-field.js +9 -9
  73. package/dist/input-phone.js +19 -19
  74. package/dist/input.js +5 -5
  75. package/dist/kbd.js +5 -5
  76. package/dist/label.js +5 -5
  77. package/dist/link.js +7 -7
  78. package/dist/list.js +7 -7
  79. package/dist/menu-button.js +7 -7
  80. package/dist/message-bubble.js +5 -5
  81. package/dist/message-composer.js +13 -13
  82. package/dist/messages.js +12 -0
  83. package/dist/multi-select-field.js +9 -9
  84. package/dist/multi-select.js +52 -52
  85. package/dist/notification-button.js +8 -8
  86. package/dist/notification-panel.js +25 -25
  87. package/dist/number-input-field.js +9 -9
  88. package/dist/number-input.js +11 -11
  89. package/dist/otp-field.js +9 -9
  90. package/dist/otp-input.js +48 -48
  91. package/dist/pagination.js +92 -89
  92. package/dist/paragraph.js +5 -5
  93. package/dist/password-field.js +15 -15
  94. package/dist/prose.js +4 -4
  95. package/dist/public-page-shell.js +11 -11
  96. package/dist/radio-field.js +11 -11
  97. package/dist/radio-group.js +5 -5
  98. package/dist/radio.js +5 -5
  99. package/dist/scroll-area.js +11 -11
  100. package/dist/search-form.js +8 -8
  101. package/dist/select-field.js +9 -9
  102. package/dist/select.js +85 -85
  103. package/dist/separator.js +6 -6
  104. package/dist/sidebar.js +16 -16
  105. package/dist/site-header.js +14 -14
  106. package/dist/site-shell.js +6 -6
  107. package/dist/sparkline.js +9 -9
  108. package/dist/star-rating.js +24 -24
  109. package/dist/stat-tile.js +12 -12
  110. package/dist/steps.js +32 -32
  111. package/dist/switcher-field.js +13 -13
  112. package/dist/switcher.js +8 -8
  113. package/dist/table-of-contents.js +14 -14
  114. package/dist/tag.js +5 -5
  115. package/dist/text.js +7 -7
  116. package/dist/textarea-field.js +11 -11
  117. package/dist/textarea.js +5 -5
  118. package/dist/time-field.js +9 -9
  119. package/dist/time-select.js +17 -17
  120. package/dist/toaster.js +16 -16
  121. package/dist/toggle-group.js +7 -7
  122. package/dist/toggle.js +5 -5
  123. package/dist/tokens.css +2 -1
  124. package/dist/tooltip.js +16 -16
  125. package/dist/tree-view.js +41 -41
  126. package/dist/uptime-bars.js +34 -34
  127. package/dist/user-message.js +8 -8
  128. package/dist/visually-hidden.js +5 -5
  129. package/package.json +5 -1
  130. package/src/tokens/molecules/annotation-thread.css +1 -0
  131. package/src/tokens/scss/molecules/_annotation-thread.scss +1 -0
  132. package/src/tokens/tokens.json +1 -0
@@ -1,21 +1,21 @@
1
1
  'use client';
2
2
  import './multi-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 { forwardRef as r, useEffect as i, useId as a, useRef as o, useState as s } from "react";
4
+ import { forwardRef as t, useEffect as n, useId as r, useRef as i, useState as a } from "react";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  import { Popover as c } from "@base-ui/react/popover";
7
7
  //#region src/stories/atoms/MultiSelect/MultiSelect.tsx
8
8
  function l(e, t) {
9
9
  typeof e == "function" ? e(t) : e && (e.current = t);
10
10
  }
11
- var u = 500, d = r(function({ options: r, value: d, defaultValue: f = [], placeholder: p = "Seleccionar…", disabled: m, readOnly: h, size: g = "md", onValueChange: _, id: v, name: y, error: b = !1, onBlur: x, className: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, removeLabel: E = (e) => `Quitar ${e}`, container: D }, O) {
12
- let [k, A] = s(!1), [j, M] = s(f), [N, P] = s(-1), F = o(null), I = o(null), L = a(), R = a(), z = o(""), B = o(0), V = d === void 0 ? j : d, H = (e) => `${R}-opt-${e}`;
11
+ var u = 500, d = t(function({ options: t, value: d, defaultValue: f = [], placeholder: p = "Seleccionar…", disabled: m, readOnly: h, size: g = "md", onValueChange: _, id: v, name: y, error: b = !1, onBlur: x, className: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, removeLabel: E = (e) => `Quitar ${e}`, container: D }, O) {
12
+ let [k, A] = a(!1), [j, M] = a(f), [N, P] = a(-1), F = i(null), I = i(null), L = r(), R = r(), z = i(""), B = i(0), V = d === void 0 ? j : d, H = (e) => `${R}-opt-${e}`;
13
13
  function U(e) {
14
14
  let t = V.includes(e) ? V.filter((t) => t !== e) : [...V, e];
15
15
  d === void 0 && M(t), _?.(t);
16
16
  }
17
17
  function W(e) {
18
- m || h || (A(!0), P(r.length === 0 ? -1 : e));
18
+ m || h || (A(!0), P(t.length === 0 ? -1 : e));
19
19
  }
20
20
  function G() {
21
21
  A(!1), P(-1), z.current = "";
@@ -30,26 +30,26 @@ var u = 500, d = r(function({ options: r, value: d, defaultValue: f = [], placeh
30
30
  }
31
31
  }
32
32
  function q(e) {
33
- if (r.length === 0) return;
34
- let t = Date.now(), n = t - B.current > u ? e : z.current + e;
35
- z.current = n, B.current = t;
36
- let i = n.length === 1 ? N + 1 : Math.max(N, 0), a = n.toLowerCase();
37
- for (let e = 0; e < r.length; e++) {
38
- let t = (i + e) % r.length;
39
- if (r[t].label.toLowerCase().startsWith(a)) {
40
- P(t), k || A(!0);
33
+ if (t.length === 0) return;
34
+ let n = Date.now(), r = n - B.current > u ? e : z.current + e;
35
+ z.current = r, B.current = n;
36
+ let i = r.length === 1 ? N + 1 : Math.max(N, 0), a = r.toLowerCase();
37
+ for (let e = 0; e < t.length; e++) {
38
+ let n = (i + e) % t.length;
39
+ if (t[n].label.toLowerCase().startsWith(a)) {
40
+ P(n), k || A(!0);
41
41
  return;
42
42
  }
43
43
  }
44
44
  }
45
45
  function J(e) {
46
46
  if (m || h) return;
47
- let t = r.length - 1;
48
- if (e.key === "ArrowDown") e.preventDefault(), k ? P((e) => Math.min(e + 1, t)) : W(0);
49
- else if (e.key === "ArrowUp") e.preventDefault(), k ? P((e) => Math.max(e - 1, 0)) : W(t);
50
- else if (e.key === "Home") e.preventDefault(), k ? P(r.length === 0 ? -1 : 0) : W(0);
51
- else if (e.key === "End") e.preventDefault(), k ? P(t) : W(t);
52
- else if (e.key === "Enter" || e.key === " ") e.preventDefault(), k ? N >= 0 && N < r.length && U(r[N].value) : W(0);
47
+ let n = t.length - 1;
48
+ if (e.key === "ArrowDown") e.preventDefault(), k ? P((e) => Math.min(e + 1, n)) : W(0);
49
+ else if (e.key === "ArrowUp") e.preventDefault(), k ? P((e) => Math.max(e - 1, 0)) : W(n);
50
+ else if (e.key === "Home") e.preventDefault(), k ? P(t.length === 0 ? -1 : 0) : W(0);
51
+ else if (e.key === "End") e.preventDefault(), k ? P(n) : W(n);
52
+ else if (e.key === "Enter" || e.key === " ") e.preventDefault(), k ? N >= 0 && N < t.length && U(t[N].value) : W(0);
53
53
  else if (e.key === "Escape") {
54
54
  if (!k) return;
55
55
  e.preventDefault(), G();
@@ -58,7 +58,7 @@ var u = 500, d = r(function({ options: r, value: d, defaultValue: f = [], placeh
58
58
  function Y(e) {
59
59
  m || h || e.target instanceof Element && e.target.closest(".multi-select__pill-remove") || (e.preventDefault(), I.current?.focus(), k ? G() : W(0));
60
60
  }
61
- i(() => {
61
+ n(() => {
62
62
  !k || N < 0 || document.getElementById(H(N))?.scrollIntoView({ block: "nearest" });
63
63
  }, [
64
64
  k,
@@ -72,39 +72,39 @@ var u = 500, d = r(function({ options: r, value: d, defaultValue: f = [], placeh
72
72
  b ? "multi-select--error" : "",
73
73
  S ?? ""
74
74
  ].filter(Boolean).join(" "), Z = ["multi-select__content", g === "md" ? "" : `multi-select__content--${g}`].filter(Boolean).join(" ");
75
- return /* @__PURE__ */ n(c.Root, {
75
+ return /* @__PURE__ */ s(c.Root, {
76
76
  open: k,
77
77
  onOpenChange: K,
78
- children: [/* @__PURE__ */ n("div", {
78
+ children: [/* @__PURE__ */ s("div", {
79
79
  ref: F,
80
80
  className: X,
81
81
  "data-popup-open": k || void 0,
82
82
  onPointerDown: Y,
83
83
  children: [
84
- /* @__PURE__ */ n("div", {
84
+ /* @__PURE__ */ s("div", {
85
85
  className: "multi-select__values",
86
- children: [V.map((i) => {
87
- let a = r.find((e) => e.value === i);
88
- return a ? /* @__PURE__ */ n("span", {
86
+ children: [V.map((n) => {
87
+ let r = t.find((e) => e.value === n);
88
+ return r ? /* @__PURE__ */ s("span", {
89
89
  className: "multi-select__pill",
90
- children: [/* @__PURE__ */ t("span", {
90
+ children: [/* @__PURE__ */ o("span", {
91
91
  className: "multi-select__pill-label",
92
- children: a.label
93
- }), !m && !h && /* @__PURE__ */ t("button", {
92
+ children: r.label
93
+ }), !m && !h && /* @__PURE__ */ o("button", {
94
94
  type: "button",
95
95
  className: "multi-select__pill-remove",
96
- "aria-label": E(a.label),
96
+ "aria-label": E(r.label),
97
97
  tabIndex: -1,
98
98
  onClick: (e) => {
99
- e.stopPropagation(), U(i), I.current?.focus();
99
+ e.stopPropagation(), U(n), I.current?.focus();
100
100
  },
101
- children: /* @__PURE__ */ t(e, {
101
+ children: /* @__PURE__ */ o(e, {
102
102
  name: "close",
103
103
  size: "xs"
104
104
  })
105
105
  })]
106
- }, i) : null;
107
- }), /* @__PURE__ */ t("div", {
106
+ }, n) : null;
107
+ }), /* @__PURE__ */ o("div", {
108
108
  ref: (e) => {
109
109
  I.current = e, l(O, e);
110
110
  },
@@ -124,62 +124,62 @@ var u = 500, d = r(function({ options: r, value: d, defaultValue: f = [], placeh
124
124
  id: v,
125
125
  onKeyDown: J,
126
126
  onBlur: x,
127
- children: V.length === 0 && /* @__PURE__ */ t("span", {
127
+ children: V.length === 0 && /* @__PURE__ */ o("span", {
128
128
  className: "multi-select__placeholder",
129
129
  children: p
130
130
  })
131
131
  })]
132
132
  }),
133
- /* @__PURE__ */ t(e, {
133
+ /* @__PURE__ */ o(e, {
134
134
  name: "chevron",
135
135
  className: "multi-select__icon",
136
136
  size: g === "sm" ? "xs" : g === "lg" ? "md" : "sm"
137
137
  }),
138
- y && V.map((e) => /* @__PURE__ */ t("input", {
138
+ y && V.map((e) => /* @__PURE__ */ o("input", {
139
139
  type: "hidden",
140
140
  name: y,
141
141
  value: e
142
142
  }, e))
143
143
  ]
144
- }), /* @__PURE__ */ t(c.Portal, {
144
+ }), /* @__PURE__ */ o(c.Portal, {
145
145
  container: D,
146
- children: /* @__PURE__ */ t(c.Positioner, {
146
+ children: /* @__PURE__ */ o(c.Positioner, {
147
147
  className: "multi-select__positioner",
148
148
  anchor: F,
149
149
  align: "start",
150
150
  sideOffset: -1,
151
- children: /* @__PURE__ */ t(c.Popup, {
151
+ children: /* @__PURE__ */ o(c.Popup, {
152
152
  className: Z,
153
153
  initialFocus: !1,
154
154
  finalFocus: !1,
155
- children: /* @__PURE__ */ t("div", {
155
+ children: /* @__PURE__ */ o("div", {
156
156
  role: "listbox",
157
157
  "aria-multiselectable": "true",
158
158
  "aria-label": C ?? p,
159
159
  id: L,
160
- children: r.map((e, r) => {
161
- let i = V.includes(e.value), a = N === r;
162
- return /* @__PURE__ */ n("div", {
163
- id: H(r),
160
+ children: t.map((e, t) => {
161
+ let n = V.includes(e.value), r = N === t;
162
+ return /* @__PURE__ */ s("div", {
163
+ id: H(t),
164
164
  role: "option",
165
- "aria-selected": i,
165
+ "aria-selected": n,
166
166
  "aria-label": e["aria-label"] ?? e.label,
167
167
  className: [
168
168
  "multi-select__item",
169
- i ? "multi-select__item--selected" : "",
170
- a ? "multi-select__item--active" : ""
169
+ n ? "multi-select__item--selected" : "",
170
+ r ? "multi-select__item--active" : ""
171
171
  ].filter(Boolean).join(" "),
172
172
  onPointerDown: (e) => {
173
173
  e.preventDefault(), e.stopPropagation();
174
174
  },
175
175
  onClick: () => {
176
- U(e.value), P(r), I.current?.focus();
176
+ U(e.value), P(t), I.current?.focus();
177
177
  },
178
- children: [/* @__PURE__ */ t("span", {
178
+ children: [/* @__PURE__ */ o("span", {
179
179
  className: "multi-select__item-check",
180
180
  "aria-hidden": "true",
181
- children: /* @__PURE__ */ t("span", { className: "multi-select__item-check-mark" })
182
- }), /* @__PURE__ */ t("span", { children: e.label })]
181
+ children: /* @__PURE__ */ o("span", { className: "multi-select__item-check-mark" })
182
+ }), /* @__PURE__ */ o("span", { children: e.label })]
183
183
  }, e.value);
184
184
  })
185
185
  })
@@ -3,12 +3,12 @@ import './notification-button.css';
3
3
  import { Icon as e } from "./icon.js";
4
4
  import { Button as t } from "./button.js";
5
5
  import { NumberBadge as n } from "./number-badge.js";
6
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
7
- import { forwardRef as a } from "react";
6
+ import { forwardRef as r } from "react";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
8
8
  //#region src/stories/molecules/NotificationButton/NotificationButton.tsx
9
- var o = a(function({ count: a = 0, max: o = 99, label: s = "Notificaciones", countLabel: c = (e) => `Notificaciones: ${e} sin leer`, className: l, ...u }, d) {
10
- let f = a > 0 ? c(a) : s;
11
- return /* @__PURE__ */ i(t, {
9
+ var o = r(function({ count: r = 0, max: o = 99, label: s = "Notificaciones", countLabel: c = (e) => `Notificaciones: ${e} sin leer`, className: l, ...u }, d) {
10
+ let f = r > 0 ? c(r) : s;
11
+ return /* @__PURE__ */ a(t, {
12
12
  ref: d,
13
13
  variant: "ghost",
14
14
  iconOnly: !0,
@@ -16,11 +16,11 @@ var o = a(function({ count: a = 0, max: o = 99, label: s = "Notificaciones", cou
16
16
  "aria-label": f,
17
17
  className: ["notification-button", l].filter(Boolean).join(" "),
18
18
  ...u,
19
- children: [/* @__PURE__ */ r(e, {
19
+ children: [/* @__PURE__ */ i(e, {
20
20
  name: "bell",
21
21
  size: "md"
22
- }), a > 0 && /* @__PURE__ */ r(n, {
23
- count: a,
22
+ }), r > 0 && /* @__PURE__ */ i(n, {
23
+ count: r,
24
24
  max: o,
25
25
  variant: "danger",
26
26
  "aria-hidden": "true",
@@ -8,8 +8,8 @@ import { Paragraph as i } from "./paragraph.js";
8
8
  import { Popover as a } from "./popover.js";
9
9
  import { Text as o } from "./text.js";
10
10
  import { NotificationButton as s } from "./notification-button.js";
11
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
12
- import { useCallback as d, useId as f, useRef as p, useState as m } from "react";
11
+ import { useCallback as c, useId as l, useRef as u, useState as d } from "react";
12
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
13
13
  //#region src/stories/molecules/NotificationPanel/NotificationPanel.tsx
14
14
  function h(e) {
15
15
  let t = parseFloat(e);
@@ -20,25 +20,25 @@ function g() {
20
20
  return h(getComputedStyle(e).getPropertyValue("--notification-panel-offset").trim());
21
21
  }
22
22
  function _({ children: e, ...t }) {
23
- return /* @__PURE__ */ l("a", {
23
+ return /* @__PURE__ */ p("a", {
24
24
  ...t,
25
25
  children: e
26
26
  });
27
27
  }
28
28
  var v = "button, a[href]", y = "notification-panel__footer-link";
29
29
  function b({ items: h = [], count: b = 0, max: x, onRead: S, onMarkAllRead: C, allHref: w, preferencesHref: T, renderLink: E = _, label: D, countLabel: O, panelLabel: k = "Notificaciones", unreadLabel: A = "Sin leer", emptyLabel: j = "Estás al día", allLabel: M = "Ver todas las notificaciones", preferencesLabel: N = "Preferencias de notificaciones", markAllReadLabel: P = "Marcar todas como leídas", open: F, defaultOpen: I, onOpenChange: L, className: R }) {
30
- let z = f(), B = p(null), [V, H] = m([]), U = (e) => e.unread && !V.includes(e.id), W = h.some(U), G = (e) => {
30
+ let z = l(), B = u(null), [V, H] = d([]), U = (e) => e.unread && !V.includes(e.id), W = h.some(U), G = (e) => {
31
31
  U(e) && (H((t) => [...t, e.id]), S(e.id));
32
32
  }, K = () => {
33
33
  H(h.map((e) => e.id)), C?.();
34
- }, q = d(() => {
34
+ }, q = c(() => {
35
35
  let e = B.current;
36
36
  return e ? e.querySelector(".notification-panel__item-action") ?? e.querySelector(v) : null;
37
37
  }, []), J = (e, t) => {
38
38
  e || H([]), L?.(e, t);
39
39
  }, Y = `${z}-title`;
40
- return /* @__PURE__ */ l(a, {
41
- trigger: /* @__PURE__ */ l(s, {
40
+ return /* @__PURE__ */ p(a, {
41
+ trigger: /* @__PURE__ */ p(s, {
42
42
  count: b,
43
43
  max: x,
44
44
  label: D,
@@ -52,56 +52,56 @@ function b({ items: h = [], count: b = 0, max: x, onRead: S, onMarkAllRead: C, a
52
52
  onOpenChange: J,
53
53
  initialFocus: q,
54
54
  className: ["notification-panel", R].filter(Boolean).join(" "),
55
- children: /* @__PURE__ */ u("div", {
55
+ children: /* @__PURE__ */ m("div", {
56
56
  className: "notification-panel__body",
57
57
  ref: B,
58
58
  children: [
59
- /* @__PURE__ */ l(t, { children: /* @__PURE__ */ l(r, {
59
+ /* @__PURE__ */ p(t, { children: /* @__PURE__ */ p(r, {
60
60
  level: 2,
61
61
  size: 3,
62
62
  id: Y,
63
63
  children: k
64
64
  }) }),
65
- h.length === 0 ? /* @__PURE__ */ l("div", {
65
+ h.length === 0 ? /* @__PURE__ */ p("div", {
66
66
  className: "notification-panel__empty",
67
- children: /* @__PURE__ */ l(i, {
67
+ children: /* @__PURE__ */ p(i, {
68
68
  size: "small",
69
69
  children: j
70
70
  })
71
- }) : /* @__PURE__ */ l("ul", {
71
+ }) : /* @__PURE__ */ p("ul", {
72
72
  className: "notification-panel__list",
73
73
  "aria-labelledby": Y,
74
74
  children: h.map((n, r) => {
75
75
  let i = U(n), a = `${z}-t-${r}`;
76
- return /* @__PURE__ */ l("li", {
76
+ return /* @__PURE__ */ p("li", {
77
77
  className: "notification-panel__item",
78
- children: /* @__PURE__ */ u("button", {
78
+ children: /* @__PURE__ */ m("button", {
79
79
  type: "button",
80
80
  className: "notification-panel__item-action",
81
81
  "aria-disabled": i ? void 0 : !0,
82
82
  onClick: () => G(n),
83
- children: [/* @__PURE__ */ l("span", {
83
+ children: [/* @__PURE__ */ p("span", {
84
84
  className: "notification-panel__indicator",
85
- children: i && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(e, {
85
+ children: i && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(e, {
86
86
  name: "dot",
87
87
  size: "sm",
88
88
  className: "notification-panel__dot"
89
- }), /* @__PURE__ */ l(t, { children: A })] })
90
- }), /* @__PURE__ */ u("span", {
89
+ }), /* @__PURE__ */ p(t, { children: A })] })
90
+ }), /* @__PURE__ */ m("span", {
91
91
  className: "notification-panel__item-text",
92
92
  children: [
93
- /* @__PURE__ */ l(o, {
93
+ /* @__PURE__ */ p(o, {
94
94
  id: a,
95
95
  tone: i ? "default" : "muted",
96
96
  className: "notification-panel__item-title",
97
97
  children: n.title
98
98
  }),
99
- n.body && /* @__PURE__ */ l(o, {
99
+ n.body && /* @__PURE__ */ p(o, {
100
100
  tone: "muted",
101
101
  className: "notification-panel__item-body",
102
102
  children: n.body
103
103
  }),
104
- /* @__PURE__ */ l(o, {
104
+ /* @__PURE__ */ p(o, {
105
105
  tone: "muted",
106
106
  className: "notification-panel__item-time",
107
107
  children: n.time
@@ -112,9 +112,9 @@ function b({ items: h = [], count: b = 0, max: x, onRead: S, onMarkAllRead: C, a
112
112
  }, n.id);
113
113
  })
114
114
  }),
115
- C && W && /* @__PURE__ */ l("div", {
115
+ C && W && /* @__PURE__ */ p("div", {
116
116
  className: "notification-panel__mark-all",
117
- children: /* @__PURE__ */ l(n, {
117
+ children: /* @__PURE__ */ p(n, {
118
118
  variant: "outline",
119
119
  size: "sm",
120
120
  block: !0,
@@ -122,9 +122,9 @@ function b({ items: h = [], count: b = 0, max: x, onRead: S, onMarkAllRead: C, a
122
122
  children: P
123
123
  })
124
124
  }),
125
- /* @__PURE__ */ l("div", {
125
+ /* @__PURE__ */ p("div", {
126
126
  className: "notification-panel__footer",
127
- children: /* @__PURE__ */ u("div", {
127
+ children: /* @__PURE__ */ m("div", {
128
128
  className: "notification-panel__footer-links",
129
129
  children: [E({
130
130
  href: w,
@@ -5,21 +5,21 @@ import { ErrorText as t } from "./error-text.js";
5
5
  import { Label as n } from "./label.js";
6
6
  import { NumberInput as r } from "./number-input.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/NumberInputField/NumberInputField.tsx
11
- var l = s(function({ id: s, label: l, labelHidden: u, value: d, defaultValue: f, min: p, max: m, step: h = 1, decimal: g, disabled: _, readOnly: v, size: y, error: b = !1, errorMessage: x, helperText: S, className: C, onChange: w, ...T }, E) {
12
- let D = i(u), O = e(y), k = c(), A = s ?? k, j = x ? `${A}-error` : void 0, M = S ? `${A}-helper` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = b || !!x;
13
- return /* @__PURE__ */ o("div", {
11
+ var l = a(function({ id: a, label: l, labelHidden: u, value: d, defaultValue: f, min: p, max: m, step: h = 1, decimal: g, disabled: _, readOnly: v, size: y, error: b = !1, errorMessage: x, helperText: S, className: C, onChange: w, ...T }, E) {
12
+ let D = i(u), O = e(y), k = o(), A = a ?? k, j = x ? `${A}-error` : void 0, M = S ? `${A}-helper` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = b || !!x;
13
+ return /* @__PURE__ */ c("div", {
14
14
  className: ["number-input-field", C].filter(Boolean).join(" "),
15
15
  children: [
16
- /* @__PURE__ */ a(n, {
16
+ /* @__PURE__ */ s(n, {
17
17
  htmlFor: A,
18
18
  hidden: D,
19
19
  size: O,
20
20
  children: l
21
21
  }),
22
- /* @__PURE__ */ a(r, {
22
+ /* @__PURE__ */ s(r, {
23
23
  ref: E,
24
24
  ...T,
25
25
  id: A,
@@ -36,11 +36,11 @@ var l = s(function({ id: s, label: l, labelHidden: u, value: d, defaultValue: f,
36
36
  "aria-describedby": N,
37
37
  onChange: w
38
38
  }),
39
- x && /* @__PURE__ */ a(t, {
39
+ x && /* @__PURE__ */ s(t, {
40
40
  id: j,
41
41
  children: x
42
42
  }),
43
- S && /* @__PURE__ */ a("span", {
43
+ S && /* @__PURE__ */ s("span", {
44
44
  id: M,
45
45
  className: "number-input-field__helper",
46
46
  children: S
@@ -1,14 +1,14 @@
1
1
  'use client';
2
2
  import './number-input.css';
3
3
  import { Icon as e } from "./icon.js";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
- import { forwardRef as r, useCallback as i, useState as a } from "react";
4
+ import { forwardRef as t, useCallback as n, useState as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  //#region src/stories/atoms/NumberInput/NumberInput.tsx
7
- var o = r(function({ value: r, defaultValue: o = 0, min: s, max: c, step: l = 1, decimal: u = !1, disabled: d = !1, readOnly: f = !1, size: p = "md", error: m = !1, id: h, name: g, describedBy: _, ariaLabel: v, decrementLabel: y = "Decrementar", incrementLabel: b = "Incrementar", className: x, onChange: S, onBlur: C, onFocus: w, ...T }, E) {
8
- let D = r !== void 0, [O, k] = a(o), [A, j] = a(!1), [M, N] = a(null), P = D ? r : O, F = M === null ? String(P) : M, I = i((e) => {
7
+ var o = t(function({ value: t, defaultValue: o = 0, min: s, max: c, step: l = 1, decimal: u = !1, disabled: d = !1, readOnly: f = !1, size: p = "md", error: m = !1, id: h, name: g, describedBy: _, ariaLabel: v, decrementLabel: y = "Decrementar", incrementLabel: b = "Incrementar", className: x, onChange: S, onBlur: C, onFocus: w, ...T }, E) {
8
+ let D = t !== void 0, [O, k] = r(o), [A, j] = r(!1), [M, N] = r(null), P = D ? t : O, F = M === null ? String(P) : M, I = n((e) => {
9
9
  let t = e;
10
10
  return s !== void 0 && (t = Math.max(s, t)), c !== void 0 && (t = Math.min(c, t)), t;
11
- }, [s, c]), L = i((e) => {
11
+ }, [s, c]), L = n((e) => {
12
12
  let t = I(e);
13
13
  D || k(t), S?.(t);
14
14
  }, [
@@ -36,22 +36,22 @@ var o = r(function({ value: r, defaultValue: o = 0, min: s, max: c, step: l = 1,
36
36
  A ? "number-input--focused" : "",
37
37
  x ?? ""
38
38
  ].filter(Boolean).join(" "), W = d || f || s !== void 0 && P <= s, G = d || f || c !== void 0 && P >= c;
39
- return /* @__PURE__ */ n("div", {
39
+ return /* @__PURE__ */ a("div", {
40
40
  className: U,
41
41
  children: [
42
- /* @__PURE__ */ t("button", {
42
+ /* @__PURE__ */ i("button", {
43
43
  className: "number-input__btn number-input__btn--decrement",
44
44
  type: "button",
45
45
  onClick: R,
46
46
  disabled: W,
47
47
  "aria-label": y,
48
48
  tabIndex: -1,
49
- children: /* @__PURE__ */ t(e, {
49
+ children: /* @__PURE__ */ i(e, {
50
50
  name: "minus",
51
51
  size: "sm"
52
52
  })
53
53
  }),
54
- /* @__PURE__ */ t("input", {
54
+ /* @__PURE__ */ i("input", {
55
55
  ref: E,
56
56
  className: "number-input__field",
57
57
  type: "text",
@@ -70,14 +70,14 @@ var o = r(function({ value: r, defaultValue: o = 0, min: s, max: c, step: l = 1,
70
70
  onFocus: V,
71
71
  onBlur: H
72
72
  }),
73
- /* @__PURE__ */ t("button", {
73
+ /* @__PURE__ */ i("button", {
74
74
  className: "number-input__btn number-input__btn--increment",
75
75
  type: "button",
76
76
  onClick: z,
77
77
  disabled: G,
78
78
  "aria-label": b,
79
79
  tabIndex: -1,
80
- children: /* @__PURE__ */ t(e, {
80
+ children: /* @__PURE__ */ i(e, {
81
81
  name: "plus",
82
82
  size: "sm"
83
83
  })
package/dist/otp-field.js CHANGED
@@ -5,22 +5,22 @@ import { ErrorText as t } from "./error-text.js";
5
5
  import { OtpInput as n } from "./otp-input.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/OtpField/OtpField.tsx
11
- var l = s(function({ id: s, label: l, labelHidden: u, length: d, value: f, defaultValue: p, name: m, disabled: h, readOnly: g, error: _ = !1, errorMessage: v, helperText: y, size: b, className: x, digitLabel: S, onChange: C, onComplete: w, onBlur: T }, E) {
12
- let D = i(u), O = e(b), k = c(), A = s ?? k, j = v ? `${A}-error` : void 0, M = y ? `${A}-helper` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = _ || !!v;
13
- return /* @__PURE__ */ o("div", {
11
+ var l = a(function({ id: a, label: l, labelHidden: u, length: d, value: f, defaultValue: p, name: m, disabled: h, readOnly: g, error: _ = !1, errorMessage: v, helperText: y, size: b, className: x, digitLabel: S, onChange: C, onComplete: w, onBlur: T }, E) {
12
+ let D = i(u), O = e(b), k = o(), A = a ?? k, j = v ? `${A}-error` : void 0, M = y ? `${A}-helper` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = _ || !!v;
13
+ return /* @__PURE__ */ c("div", {
14
14
  className: ["otp-field", x].filter(Boolean).join(" "),
15
15
  children: [
16
- /* @__PURE__ */ a(r, {
16
+ /* @__PURE__ */ s(r, {
17
17
  id: `${A}-label`,
18
18
  htmlFor: `${A}-0`,
19
19
  hidden: D,
20
20
  size: O,
21
21
  children: l
22
22
  }),
23
- /* @__PURE__ */ a(n, {
23
+ /* @__PURE__ */ s(n, {
24
24
  ref: E,
25
25
  id: A,
26
26
  name: m,
@@ -38,11 +38,11 @@ var l = s(function({ id: s, label: l, labelHidden: u, length: d, value: f, defau
38
38
  onComplete: w,
39
39
  onBlur: T
40
40
  }),
41
- v && /* @__PURE__ */ a(t, {
41
+ v && /* @__PURE__ */ s(t, {
42
42
  id: j,
43
43
  children: v
44
44
  }),
45
- y && /* @__PURE__ */ a("span", {
45
+ y && /* @__PURE__ */ s("span", {
46
46
  id: M,
47
47
  className: "otp-field__helper",
48
48
  children: y