@yuno-payments/dashboard-design-system 2.8.3 → 2.8.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.
@@ -25,7 +25,7 @@ export interface DataTableCopyCellProps {
25
25
  }
26
26
  /**
27
27
  * A table cell that displays a text value with a copy-to-clipboard button.
28
- * The copy button appears on hover. Supports optional navigation links
28
+ * The copy button is always visible. Supports optional navigation links
29
29
  * and start icons (e.g., test credential indicators).
30
30
  *
31
31
  * @example
@@ -1,38 +1,38 @@
1
- import { j as r } from "../../../_virtual/jsx-runtime.js";
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import { forwardRef as y } from "react";
3
3
  import { cn as g } from "../../../lib/utils.js";
4
- import { Icon as p } from "../../atoms/icon/icon.js";
4
+ import { Icon as d } from "../../atoms/icon/icon.js";
5
5
  import { TooltipProvider as i, Tooltip as o, TooltipTrigger as n, TooltipContent as l } from "../../../vendor/shadcn/tooltip.js";
6
6
  import { useCopyToClipboard as N } from "../../../hooks/use-copy-to-clipboard.js";
7
7
  const b = y(
8
8
  ({
9
- value: e,
9
+ value: r,
10
10
  linkTo: t,
11
11
  startIcon: a,
12
12
  startIconTooltip: c,
13
- copyTooltip: d = "Copy",
13
+ copyTooltip: p = "Copy",
14
14
  onCopySuccess: m,
15
- onCopyError: h,
16
- emptyState: x = "-",
15
+ onCopyError: x,
16
+ emptyState: h = "-",
17
17
  className: j
18
18
  }, C) => {
19
19
  const { copyToClipboard: f } = N({
20
20
  onSuccess: m,
21
- onError: h
21
+ onError: x
22
22
  });
23
- if (!e) return /* @__PURE__ */ r.jsx(r.Fragment, { children: x });
23
+ if (!r) return /* @__PURE__ */ e.jsx(e.Fragment, { children: h });
24
24
  const u = (s) => {
25
- s.stopPropagation(), f(e);
25
+ s.stopPropagation(), f(r);
26
26
  };
27
- return /* @__PURE__ */ r.jsxs(
27
+ return /* @__PURE__ */ e.jsxs(
28
28
  "div",
29
29
  {
30
30
  ref: C,
31
- className: g("group flex items-center gap-2 w-full", j),
31
+ className: g("flex items-center gap-2 w-full", j),
32
32
  children: [
33
- a && /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
34
- /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "shrink-0 inline-flex", children: /* @__PURE__ */ r.jsx(
35
- p,
33
+ a && /* @__PURE__ */ e.jsx(i, { children: /* @__PURE__ */ e.jsxs(o, { children: [
34
+ /* @__PURE__ */ e.jsx(n, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "shrink-0 inline-flex", children: /* @__PURE__ */ e.jsx(
35
+ d,
36
36
  {
37
37
  name: a,
38
38
  weight: "fill",
@@ -40,29 +40,29 @@ const b = y(
40
40
  className: "text-primary"
41
41
  }
42
42
  ) }) }),
43
- c && /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: c }) })
43
+ c && /* @__PURE__ */ e.jsx(l, { children: /* @__PURE__ */ e.jsx("p", { children: c }) })
44
44
  ] }) }),
45
- /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
46
- /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "truncate text-sm", children: t ? /* @__PURE__ */ r.jsx(
45
+ /* @__PURE__ */ e.jsx(i, { children: /* @__PURE__ */ e.jsxs(o, { children: [
46
+ /* @__PURE__ */ e.jsx(n, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "truncate text-sm", children: t ? /* @__PURE__ */ e.jsx(
47
47
  "a",
48
48
  {
49
49
  href: t,
50
50
  className: "text-primary hover:underline",
51
51
  onClick: (s) => s.stopPropagation(),
52
- children: e
52
+ children: r
53
53
  }
54
- ) : e }) }),
55
- /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: e }) })
54
+ ) : r }) }),
55
+ /* @__PURE__ */ e.jsx(l, { children: /* @__PURE__ */ e.jsx("p", { children: r }) })
56
56
  ] }) }),
57
- /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
58
- /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx(
57
+ /* @__PURE__ */ e.jsx(i, { children: /* @__PURE__ */ e.jsxs(o, { children: [
58
+ /* @__PURE__ */ e.jsx(n, { asChild: !0, children: /* @__PURE__ */ e.jsx(
59
59
  "button",
60
60
  {
61
61
  type: "button",
62
- className: "shrink-0 opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-muted rounded",
62
+ className: "shrink-0 p-1 hover:bg-muted rounded",
63
63
  onClick: u,
64
- children: /* @__PURE__ */ r.jsx(
65
- p,
64
+ children: /* @__PURE__ */ e.jsx(
65
+ d,
66
66
  {
67
67
  name: "CopySimple",
68
68
  size: "sm",
@@ -71,7 +71,7 @@ const b = y(
71
71
  )
72
72
  }
73
73
  ) }),
74
- /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: d }) })
74
+ /* @__PURE__ */ e.jsx(l, { children: /* @__PURE__ */ e.jsx("p", { children: p }) })
75
75
  ] }) })
76
76
  ]
77
77
  }
@@ -37,6 +37,7 @@ export interface DataTableListCellProps {
37
37
  /**
38
38
  * Table cell component for displaying a list of items with badges.
39
39
  * Shows first item and remaining count with tooltip.
40
+ * Item icons that fail to load are hidden automatically.
40
41
  *
41
42
  * @example
42
43
  * ```tsx
@@ -1,59 +1,65 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as u } from "react";
2
+ import { forwardRef as g } from "react";
3
3
  import { cn as f } from "../../../../../lib/utils.js";
4
4
  import { TooltipProvider as c, Tooltip as i, TooltipTrigger as o, TooltipContent as m } from "../../../../../vendor/shadcn/tooltip.js";
5
- import { Badge as g } from "../../../../atoms/badge/badge.js";
6
- const N = u(
7
- ({ items: n, maxLength: a = 7, showRemainingCount: x = !0, className: d }, h) => {
5
+ import { Badge as N } from "../../../../atoms/badge/badge.js";
6
+ const T = g(
7
+ ({ items: n, maxLength: a = 7, showRemainingCount: d = !0, className: x }, p) => {
8
8
  if (!n || n.length === 0) return null;
9
- const s = n[0], l = n.slice(1), t = s.name.length > a && a > 0, p = t ? `${s.name.slice(0, a)}...` : s.name;
9
+ const r = n[0], t = n.slice(1), l = r.name.length > a && a > 0, h = l ? `${r.name.slice(0, a)}...` : r.name;
10
10
  return /* @__PURE__ */ e.jsxs(
11
11
  "div",
12
12
  {
13
- ref: h,
14
- className: f("flex items-center gap-2 h-[46px]", d),
13
+ ref: p,
14
+ className: f("flex items-center gap-2 h-[46px]", x),
15
15
  children: [
16
- s.icon && /* @__PURE__ */ e.jsx(
16
+ r.icon && /* @__PURE__ */ e.jsx(
17
17
  "img",
18
18
  {
19
- src: s.icon,
20
- alt: s.name,
21
- className: "h-4 w-4 object-contain"
19
+ src: r.icon,
20
+ alt: r.name,
21
+ className: "h-4 w-4 object-contain",
22
+ onError: (s) => {
23
+ s.currentTarget.style.display = "none";
24
+ }
22
25
  }
23
26
  ),
24
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: t ? /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs(i, { children: [
25
- /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm cursor-help", children: p }) }),
26
- /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx("p", { children: s.name }) })
27
- ] }) }) : /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: s.name }) }),
28
- l.length > 0 && x && /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs(i, { children: [
27
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-1", children: l ? /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs(i, { children: [
28
+ /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm cursor-help", children: h }) }),
29
+ /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx("p", { children: r.name }) })
30
+ ] }) }) : /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: r.name }) }),
31
+ t.length > 0 && d && /* @__PURE__ */ e.jsx(c, { children: /* @__PURE__ */ e.jsxs(i, { children: [
29
32
  /* @__PURE__ */ e.jsx(o, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
30
- g,
33
+ N,
31
34
  {
32
35
  variant: "outline",
33
36
  className: "h-3 px-1 text-[8px] leading-none cursor-pointer hover:border-primary hover:text-primary",
34
37
  children: [
35
38
  "+",
36
- l.length
39
+ t.length
37
40
  ]
38
41
  }
39
42
  ) }),
40
- /* @__PURE__ */ e.jsx(m, { className: "p-2", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: l.map((r, j) => /* @__PURE__ */ e.jsxs(
43
+ /* @__PURE__ */ e.jsx(m, { className: "p-2", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: t.map((s, j) => /* @__PURE__ */ e.jsxs(
41
44
  "div",
42
45
  {
43
46
  className: "flex items-center gap-3",
44
47
  children: [
45
- r.icon && /* @__PURE__ */ e.jsx(
48
+ s.icon && /* @__PURE__ */ e.jsx(
46
49
  "img",
47
50
  {
48
- src: r.icon,
49
- alt: r.name,
50
- className: "h-4 w-4 object-contain"
51
+ src: s.icon,
52
+ alt: s.name,
53
+ className: "h-4 w-4 object-contain",
54
+ onError: (u) => {
55
+ u.currentTarget.style.display = "none";
56
+ }
51
57
  }
52
58
  ),
53
- /* @__PURE__ */ e.jsx("span", { className: "text-sm text-foreground", children: r.name })
59
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm text-foreground", children: s.name })
54
60
  ]
55
61
  },
56
- `${r.name}-${j}`
62
+ `${s.name}-${j}`
57
63
  )) }) })
58
64
  ] }) })
59
65
  ]
@@ -61,7 +67,7 @@ const N = u(
61
67
  );
62
68
  }
63
69
  );
64
- N.displayName = "DataTableListCell";
70
+ T.displayName = "DataTableListCell";
65
71
  export {
66
- N as DataTableListCell
72
+ T as DataTableListCell
67
73
  };