@burdenoff/fe-libs 2026.1116.4 → 2026.1116.5

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,50 +1,47 @@
1
1
  import { cn as e } from "../shared-utils.js";
2
2
  import { Badge as t } from "../ui/badge.js";
3
3
  import { Tooltip as n, TooltipContent as r, TooltipProvider as i, TooltipTrigger as a } from "../ui/tooltip.js";
4
- import { X as o } from "lucide-react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { tagColorStyle as o } from "./tagColor.js";
5
+ import { X as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
7
  // src/tag/TagBadge.tsx
7
- var l = {
8
+ var u = {
8
9
  sm: "text-xs px-1.5 py-0.5",
9
10
  md: "text-sm px-2 py-0.5",
10
11
  lg: "text-base px-2.5 py-1"
11
12
  };
12
- function u({ label: u, icon: d, color: f, description: p, removable: m = !1, onClick: h, onRemove: g, className: _, size: v = "md" }) {
13
- let y = /* @__PURE__ */ c(t, {
13
+ function d({ label: d, icon: f, color: p, description: m, removable: h = !1, onClick: g, onRemove: _, className: v, size: y = "md" }) {
14
+ let b = /* @__PURE__ */ l(t, {
14
15
  variant: "secondary",
15
- className: e("inline-flex items-center gap-1 font-medium transition-colors", l[v], h && "cursor-pointer hover:bg-secondary/80", _),
16
- style: f ? {
17
- backgroundColor: `${f}20`,
18
- color: f,
19
- borderColor: `${f}40`
20
- } : void 0,
21
- onClick: h,
16
+ className: e("inline-flex items-center gap-1 font-medium transition-colors", u[y], g && "cursor-pointer hover:bg-secondary/80", v),
17
+ style: p ? o(p) : void 0,
18
+ onClick: g,
22
19
  children: [
23
- d && /* @__PURE__ */ s("span", {
20
+ f && /* @__PURE__ */ c("span", {
24
21
  className: "flex-shrink-0",
25
- children: d
22
+ children: f
26
23
  }),
27
- /* @__PURE__ */ s("span", {
24
+ /* @__PURE__ */ c("span", {
28
25
  className: "truncate max-w-[150px]",
29
- children: u
26
+ children: d
30
27
  }),
31
- m && g && /* @__PURE__ */ s("button", {
28
+ h && _ && /* @__PURE__ */ c("button", {
32
29
  type: "button",
33
30
  onClick: (e) => {
34
- e.stopPropagation(), g?.();
31
+ e.stopPropagation(), _?.();
35
32
  },
36
33
  className: "flex-shrink-0 ms-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",
37
- "aria-label": `Remove ${u}`,
38
- children: /* @__PURE__ */ s(o, { className: "size-3" })
34
+ "aria-label": `Remove ${d}`,
35
+ children: /* @__PURE__ */ c(s, { className: "size-3" })
39
36
  })
40
37
  ]
41
38
  });
42
- return p ? /* @__PURE__ */ s(i, { children: /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(a, {
39
+ return m ? /* @__PURE__ */ c(i, { children: /* @__PURE__ */ l(n, { children: [/* @__PURE__ */ c(a, {
43
40
  asChild: !0,
44
- children: y
45
- }), /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s("p", {
41
+ children: b
42
+ }), /* @__PURE__ */ c(r, { children: /* @__PURE__ */ c("p", {
46
43
  className: "max-w-xs",
47
- children: p
48
- }) })] }) }) : y;
44
+ children: m
45
+ }) })] }) }) : b;
49
46
  }
50
- export { u as TagBadge };
47
+ export { d as TagBadge };
@@ -1,2 +1,3 @@
1
1
  export { TagBadge, type TagBadgeProps } from './TagBadge';
2
+ export { tagColorStyle } from './tagColor';
2
3
  export { TagsWidget, type TagsWidgetProps, type TagItem } from './TagsWidget';
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+ /**
3
+ * Inline style for a coloured tag: the colour itself for the text, plus a
4
+ * light tint for the background and a stronger one for the border.
5
+ *
6
+ * The tints use `color-mix()`, which accepts any CSS colour: a hex, a named
7
+ * colour, or a design token such as `var(--color-chart-3)`. The old code
8
+ * appended a hex alpha (`${color}20`), which only works for six-digit hex. A
9
+ * stored `var(--color-chart-N)` became `var(--color-chart-N)20`, invalid CSS
10
+ * the browser drops, so the tint and border vanished (BOFF-11867).
11
+ */
12
+ export declare function tagColorStyle(color: string): CSSProperties;
@@ -0,0 +1,8 @@
1
+ function e(e) {
2
+ return {
3
+ backgroundColor: `color-mix(in srgb, ${e} 12%, transparent)`,
4
+ color: e,
5
+ borderColor: `color-mix(in srgb, ${e} 25%, transparent)`
6
+ };
7
+ }
8
+ export { e as tagColorStyle };
package/dist/tag.js CHANGED
@@ -1,3 +1,4 @@
1
1
  import { TagBadge as e } from "./tag/TagBadge.js";
2
- import { TagsWidget as t } from "./tag/TagsWidget.js";
3
- export { e as TagBadge, t as TagsWidget };
2
+ import { tagColorStyle as t } from "./tag/tagColor.js";
3
+ import { TagsWidget as n } from "./tag/TagsWidget.js";
4
+ export { e as TagBadge, n as TagsWidget, t as tagColorStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.1116.4",
3
+ "version": "2026.1116.5",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "repository": {
6
6
  "type": "git",