@burdenoff/fe-libs 2026.1021.6 → 2026.1021.7

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.
@@ -1,38 +1,38 @@
1
- import { cn as e } from "../shared-utils.js";
2
- import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
1
+ import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
2
+ import { cn as t } from "../shared-utils.js";
3
3
  import { useState as n } from "react";
4
4
  import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region src/chrome/Sidebar.tsx
6
6
  var o = ({ sections: o, isCollapsed: s = !1, onToggleCollapse: c, header: l, footer: u, className: d, width: f = "280px", collapsedWidth: p = "64px" }) => {
7
- let m = t(), [h, g] = n(new Set(o.filter((e) => e.defaultCollapsed).map((e) => e.title))), _ = (e) => {
7
+ let m = e(), [h, g] = n(new Set(o.filter((e) => e.defaultCollapsed).map((e) => e.title))), _ = (e) => {
8
8
  g((t) => {
9
9
  let n = new Set(t);
10
10
  return n.has(e) ? n.delete(e) : n.add(e), n;
11
11
  });
12
12
  };
13
13
  return /* @__PURE__ */ a("aside", {
14
- className: e("flex flex-col bg-bg-surface border-r border-border-subtle transition-all duration-300", d),
14
+ className: t("flex flex-col bg-bg-surface border-r border-border-subtle transition-all duration-300", d),
15
15
  style: { width: s ? p : f },
16
16
  children: [
17
17
  l && /* @__PURE__ */ i("div", {
18
- className: e("flex items-center border-b border-border-subtle", s ? "justify-center p-4" : "px-card-padding py-4"),
18
+ className: t("flex items-center border-b border-border-subtle", s ? "justify-center p-4" : "px-card-padding py-4"),
19
19
  children: l
20
20
  }),
21
21
  /* @__PURE__ */ i("nav", {
22
22
  className: "scrollbar-slim scrollbar-hover-only flex-1 overflow-y-auto py-section-gap",
23
- children: o.map((t) => {
24
- let n = h.has(t.title);
23
+ children: o.map((e) => {
24
+ let n = h.has(e.title);
25
25
  return /* @__PURE__ */ a("div", {
26
26
  className: "mb-section-gap",
27
27
  children: [!s && /* @__PURE__ */ i("div", {
28
28
  className: "px-card-padding mb-2",
29
- children: t.collapsible ? /* @__PURE__ */ a("button", {
29
+ children: e.collapsible ? /* @__PURE__ */ a("button", {
30
30
  type: "button",
31
- onClick: () => _(t.title),
31
+ onClick: () => _(e.title),
32
32
  className: "flex items-center justify-between w-full text-text-muted text-[11px] font-medium uppercase tracking-wider hover:text-text-secondary transition-colors",
33
33
  "aria-expanded": !n,
34
- children: [/* @__PURE__ */ i("span", { children: t.title }), /* @__PURE__ */ i("svg", {
35
- className: e("w-4 h-4 transition-transform", n && "rotate-180"),
34
+ children: [/* @__PURE__ */ i("span", { children: e.title }), /* @__PURE__ */ i("svg", {
35
+ className: t("w-4 h-4 transition-transform", n && "rotate-180"),
36
36
  fill: "none",
37
37
  stroke: "currentColor",
38
38
  viewBox: "0 0 24 24",
@@ -45,49 +45,49 @@ var o = ({ sections: o, isCollapsed: s = !1, onToggleCollapse: c, header: l, foo
45
45
  })]
46
46
  }) : /* @__PURE__ */ i("div", {
47
47
  className: "text-text-muted text-[11px] font-medium uppercase tracking-wider",
48
- children: t.title
48
+ children: e.title
49
49
  })
50
- }), (!t.collapsible || !n) && /* @__PURE__ */ i("ul", {
50
+ }), (!e.collapsible || !n) && /* @__PURE__ */ i("ul", {
51
51
  className: "space-y-1 px-2",
52
- children: t.items.map((t) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ a("button", {
53
- onClick: t.onClick,
54
- disabled: t.disabled,
55
- className: e("w-full flex items-center gap-3 rounded-button text-sm transition-all duration-200 ease-[var(--motion-easing-out)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border", s ? "justify-center p-3" : "px-3 py-2", {
56
- "bg-[var(--color-accent-soft)] text-text-primary font-medium": t.isActive && !t.disabled,
57
- "text-text-secondary hover:text-text-primary hover:bg-bg-sunken": !t.isActive && !t.disabled,
58
- "text-text-disabled cursor-not-allowed opacity-50": t.disabled
52
+ children: e.items.map((e) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ a("button", {
53
+ onClick: e.onClick,
54
+ disabled: e.disabled,
55
+ className: t("w-full flex items-center gap-3 rounded-button text-sm transition-all duration-200 ease-[var(--motion-easing-out)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border", s ? "justify-center p-3" : "px-3 py-2", {
56
+ "bg-[var(--color-accent-soft)] text-text-primary font-medium": e.isActive && !e.disabled,
57
+ "text-text-secondary hover:text-text-primary hover:bg-bg-sunken": !e.isActive && !e.disabled,
58
+ "text-text-disabled cursor-not-allowed opacity-50": e.disabled
59
59
  }),
60
- "aria-label": s ? t.label : void 0,
61
- "aria-current": t.isActive ? "page" : void 0,
62
- title: s ? t.label : void 0,
60
+ "aria-label": s ? e.label : void 0,
61
+ "aria-current": e.isActive ? "page" : void 0,
62
+ title: s ? e.label : void 0,
63
63
  type: "button",
64
- children: [t.icon && /* @__PURE__ */ i("span", {
64
+ children: [e.icon && /* @__PURE__ */ i("span", {
65
65
  className: "flex items-center flex-shrink-0",
66
- children: t.icon
66
+ children: e.icon
67
67
  }), !s && /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("span", {
68
68
  className: "flex-1 text-left truncate",
69
- children: t.label
70
- }), t.badge !== void 0 && /* @__PURE__ */ i("span", {
71
- className: e("flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-medium tabular-nums", t.isActive ? "bg-action-primary-bg text-action-primary-text" : "bg-status-info-bg-subtle text-status-info-text"),
72
- children: typeof t.badge == "number" && t.badge > 99 ? "99+" : t.badge
69
+ children: e.label
70
+ }), e.badge !== void 0 && /* @__PURE__ */ i("span", {
71
+ className: t("flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-medium tabular-nums", e.isActive ? "bg-action-primary-bg text-action-primary-text" : "bg-status-info-bg-subtle text-status-info-text"),
72
+ children: typeof e.badge == "number" && e.badge > 99 ? "99+" : e.badge
73
73
  })] })]
74
- }) }, t.id))
74
+ }) }, e.id))
75
75
  })]
76
- }, t.title);
76
+ }, e.title);
77
77
  })
78
78
  }),
79
79
  u && /* @__PURE__ */ i("div", {
80
- className: e("border-t border-border-subtle", s ? "flex justify-center p-4" : "px-card-padding py-4"),
80
+ className: t("border-t border-border-subtle", s ? "flex justify-center p-4" : "px-card-padding py-4"),
81
81
  children: u
82
82
  }),
83
83
  c && /* @__PURE__ */ i("button", {
84
84
  onClick: c,
85
- className: e("border-t border-border-subtle p-4 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border", s && "flex justify-center"),
85
+ className: t("border-t border-border-subtle p-4 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border", s && "flex justify-center"),
86
86
  "aria-label": s ? m("nav.expandSidebar", "Expand sidebar") : m("nav.collapseSidebar", "Collapse sidebar"),
87
87
  title: s ? m("nav.expandSidebar", "Expand sidebar") : m("nav.collapseSidebar", "Collapse sidebar"),
88
88
  type: "button",
89
89
  children: /* @__PURE__ */ i("svg", {
90
- className: e("w-5 h-5 transition-transform", s && "rotate-180"),
90
+ className: t("w-5 h-5 transition-transform", s && "rotate-180"),
91
91
  fill: "none",
92
92
  stroke: "currentColor",
93
93
  viewBox: "0 0 24 24",
@@ -1,54 +1,54 @@
1
- import { cn as e } from "../shared-utils.js";
2
- import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
1
+ import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
2
+ import { cn as t } from "../shared-utils.js";
3
3
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
4
  //#region src/chrome/Tabs.tsx
5
5
  var i = ({ items: i, activeTabId: a, onTabChange: o, variant: s = "default", size: c = "md", fullWidth: l = !1, className: u }) => {
6
- let d = t(), f = (e, t) => {
6
+ let d = e(), f = (e, t) => {
7
7
  let n = t;
8
8
  for (e.key === "ArrowLeft" ? (e.preventDefault(), n = t === 0 ? i.length - 1 : t - 1) : e.key === "ArrowRight" ? (e.preventDefault(), n = t === i.length - 1 ? 0 : t + 1) : e.key === "Home" ? (e.preventDefault(), n = 0) : e.key === "End" && (e.preventDefault(), n = i.length - 1); i[n]?.disabled && n !== t;) n = n > t ? n === i.length - 1 ? 0 : n + 1 : n === 0 ? i.length - 1 : n - 1;
9
9
  let r = i[n];
10
10
  r && !r.disabled && o(r.id);
11
- }, p = (t, n) => {
12
- let r = e("relative flex items-center gap-icon-gap transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border rounded-button", {
11
+ }, p = (e, n) => {
12
+ let r = t("relative flex items-center gap-icon-gap transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border rounded-button", {
13
13
  sm: "px-3 py-1.5 text-body-sm",
14
14
  md: "px-4 py-2 text-body-md",
15
15
  lg: "px-6 py-3 text-body-lg"
16
16
  }[c], l && "flex-1 justify-center");
17
- return t.disabled ? e(r, "text-text-disabled cursor-not-allowed opacity-50") : s === "underline" ? e("flex shrink-0 items-center gap-1.5 whitespace-nowrap transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border rounded-t", c === "sm" && "px-3 py-2 text-xs sm:gap-2 sm:px-4 sm:text-sm", c === "md" && "px-3 py-2.5 text-xs sm:gap-2 sm:px-4 sm:text-sm", c === "lg" && "px-4 py-3 text-sm sm:gap-2 sm:px-5 sm:text-body-md", "font-medium border-b-2", l && "flex-1 justify-center", t.disabled && "text-text-disabled cursor-not-allowed opacity-50", !t.disabled && (n ? "border-action-primary-bg text-action-primary-bg" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-default")) : s === "pills" ? e(r, "rounded-button", n ? "bg-action-primary-bg text-action-primary-text font-medium" : "text-text-secondary hover:text-text-primary hover:bg-action-ghost-bg-hover") : e(r, "border border-border-default", n ? "bg-bg-elevated text-text-primary font-medium border-border-strong" : "bg-bg-surface text-text-secondary hover:text-text-primary hover:bg-bg-elevated");
17
+ return e.disabled ? t(r, "text-text-disabled cursor-not-allowed opacity-50") : s === "underline" ? t("flex shrink-0 items-center gap-1.5 whitespace-nowrap transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border rounded-t", c === "sm" && "px-3 py-2 text-xs sm:gap-2 sm:px-4 sm:text-sm", c === "md" && "px-3 py-2.5 text-xs sm:gap-2 sm:px-4 sm:text-sm", c === "lg" && "px-4 py-3 text-sm sm:gap-2 sm:px-5 sm:text-body-md", "font-medium border-b-2", l && "flex-1 justify-center", e.disabled && "text-text-disabled cursor-not-allowed opacity-50", !e.disabled && (n ? "border-action-primary-bg text-action-primary-bg" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-default")) : s === "pills" ? t(r, "rounded-button", n ? "bg-action-primary-bg text-action-primary-text font-medium" : "text-text-secondary hover:text-text-primary hover:bg-action-ghost-bg-hover") : t(r, "border border-border-default", n ? "bg-bg-elevated text-text-primary font-medium border-border-strong" : "bg-bg-surface text-text-secondary hover:text-text-primary hover:bg-bg-elevated");
18
18
  };
19
19
  return /* @__PURE__ */ n("div", {
20
20
  role: "tablist",
21
21
  "aria-label": d("common.tabs", "Tabs"),
22
- className: e(s === "underline" && "flex gap-1 -mb-px overflow-x-auto pb-1 border-b border-border-default", s === "default" && "flex items-center gap-2", s === "pills" && "flex items-center gap-1 p-1 bg-bg-sunken rounded-button", u),
23
- children: i.map((t, i) => {
24
- let c = t.id === a;
22
+ className: t(s === "underline" && "flex gap-1 -mb-px overflow-x-auto pb-1 border-b border-border-default", s === "default" && "flex items-center gap-2", s === "pills" && "flex items-center gap-1 p-1 bg-bg-sunken rounded-button", u),
23
+ children: i.map((e, i) => {
24
+ let c = e.id === a;
25
25
  return /* @__PURE__ */ r("button", {
26
26
  role: "tab",
27
27
  "aria-selected": c,
28
- "aria-disabled": t.disabled,
28
+ "aria-disabled": e.disabled,
29
29
  tabIndex: c ? 0 : -1,
30
30
  onClick: () => {
31
- t.disabled || (t.onClick?.(), o(t.id));
31
+ e.disabled || (e.onClick?.(), o(e.id));
32
32
  },
33
33
  onKeyDown: (e) => f(e, i),
34
- className: p(t, c),
35
- disabled: t.disabled,
34
+ className: p(e, c),
35
+ disabled: e.disabled,
36
36
  type: "button",
37
37
  children: [
38
- t.icon && /* @__PURE__ */ n("span", {
38
+ e.icon && /* @__PURE__ */ n("span", {
39
39
  className: "flex items-center flex-shrink-0",
40
- children: t.icon
40
+ children: e.icon
41
41
  }),
42
42
  /* @__PURE__ */ n("span", {
43
43
  className: "truncate",
44
- children: t.label
44
+ children: e.label
45
45
  }),
46
- t.badge !== void 0 && /* @__PURE__ */ n("span", {
47
- className: e("flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-medium tabular-nums", c && s === "pills" ? "bg-action-primary-text text-action-primary-bg" : "bg-status-info-bg-subtle text-status-info-text"),
48
- children: typeof t.badge == "number" && t.badge > 99 ? "99+" : t.badge
46
+ e.badge !== void 0 && /* @__PURE__ */ n("span", {
47
+ className: t("flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-medium tabular-nums", c && s === "pills" ? "bg-action-primary-text text-action-primary-bg" : "bg-status-info-bg-subtle text-status-info-text"),
48
+ children: typeof e.badge == "number" && e.badge > 99 ? "99+" : e.badge
49
49
  })
50
50
  ]
51
- }, t.id);
51
+ }, e.id);
52
52
  })
53
53
  });
54
54
  };