@yuno-payments/dashboard-design-system 2.7.13 → 2.8.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 (36) hide show
  1. package/dist/components/atoms/icon/icon-list.d.ts +2 -0
  2. package/dist/components/atoms/icon/icon-list.js +19 -15
  3. package/dist/components/molecules/data-table-cells/data-table-amount-cell.d.ts +30 -0
  4. package/dist/components/molecules/data-table-cells/data-table-amount-cell.js +27 -0
  5. package/dist/components/molecules/data-table-cells/data-table-copy-cell.d.ts +41 -0
  6. package/dist/components/molecules/data-table-cells/data-table-copy-cell.js +83 -0
  7. package/dist/components/molecules/data-table-cells/data-table-country-cell.d.ts +31 -0
  8. package/dist/components/molecules/data-table-cells/data-table-country-cell.js +37 -0
  9. package/dist/components/molecules/data-table-cells/data-table-date-cell.d.ts +29 -0
  10. package/dist/components/molecules/data-table-cells/data-table-date-cell.js +32 -0
  11. package/dist/components/molecules/data-table-cells/data-table-icon-text-cell.d.ts +21 -0
  12. package/dist/components/molecules/data-table-cells/data-table-icon-text-cell.js +75 -0
  13. package/dist/components/molecules/data-table-cells/data-table-percentage-cell.d.ts +28 -0
  14. package/dist/components/molecules/data-table-cells/data-table-percentage-cell.js +27 -0
  15. package/dist/components/molecules/data-table-cells/data-table-status-cell.d.ts +44 -0
  16. package/dist/components/molecules/data-table-cells/data-table-status-cell.js +24 -0
  17. package/dist/components/molecules/data-table-cells/data-table-tags-cell.d.ts +16 -0
  18. package/dist/components/molecules/data-table-cells/data-table-tags-cell.js +39 -0
  19. package/dist/components/molecules/data-table-cells/data-table-text-cell.d.ts +53 -0
  20. package/dist/components/molecules/data-table-cells/data-table-text-cell.js +18 -0
  21. package/dist/components/molecules/data-table-cells/index.d.ts +9 -0
  22. package/dist/components/molecules/index.d.ts +1 -0
  23. package/dist/dashboard-design-system.css +1 -1
  24. package/dist/hooks/index.d.ts +1 -0
  25. package/dist/hooks/use-copy-to-clipboard.d.ts +42 -0
  26. package/dist/hooks/use-copy-to-clipboard.js +26 -0
  27. package/dist/index.css +1 -1
  28. package/dist/index.esm.min.js +8056 -7668
  29. package/dist/index.js +210 -190
  30. package/dist/index.umd.min.js +32 -32
  31. package/dist/node_modules/@phosphor-icons/react/dist/csr/CalendarPlus.es.js +8 -0
  32. package/dist/node_modules/@phosphor-icons/react/dist/csr/FilePlus.es.js +8 -0
  33. package/dist/node_modules/@phosphor-icons/react/dist/defs/CalendarPlus.es.js +36 -0
  34. package/dist/node_modules/@phosphor-icons/react/dist/defs/FilePlus.es.js +30 -0
  35. package/package.json +1 -1
  36. package/registry/components-registry.json +593 -2
@@ -220,6 +220,8 @@ declare const IconList: {
220
220
  Lifebuoy: import('@phosphor-icons/react').Icon;
221
221
  TestTube: import('@phosphor-icons/react').Icon;
222
222
  Tag: import('@phosphor-icons/react').Icon;
223
+ FilePlus: import('@phosphor-icons/react').Icon;
224
+ CalendarPlus: import('@phosphor-icons/react').Icon;
223
225
  };
224
226
  export type IconName = Exclude<keyof typeof IconList, "Icon" | "IconProps" | "IconWeight" | "IconContext">;
225
227
  export { IconList };
@@ -19,8 +19,8 @@ import { FileArchiveIcon as S } from "../../../node_modules/@phosphor-icons/reac
19
19
  import { FilePdfIcon as w } from "../../../node_modules/@phosphor-icons/react/dist/csr/FilePdf.es.js";
20
20
  import { BoundingBoxIcon as g } from "../../../node_modules/@phosphor-icons/react/dist/csr/BoundingBox.es.js";
21
21
  import { TreeStructureIcon as P } from "../../../node_modules/@phosphor-icons/react/dist/csr/TreeStructure.es.js";
22
- import { ShoppingCartIcon as k } from "../../../node_modules/@phosphor-icons/react/dist/csr/ShoppingCart.es.js";
23
- import { CodeIcon as d } from "../../../node_modules/@phosphor-icons/react/dist/csr/Code.es.js";
22
+ import { ShoppingCartIcon as d } from "../../../node_modules/@phosphor-icons/react/dist/csr/ShoppingCart.es.js";
23
+ import { CodeIcon as k } from "../../../node_modules/@phosphor-icons/react/dist/csr/Code.es.js";
24
24
  import { FileTxtIcon as A } from "../../../node_modules/@phosphor-icons/react/dist/csr/FileTxt.es.js";
25
25
  import { FileZipIcon as D } from "../../../node_modules/@phosphor-icons/react/dist/csr/FileZip.es.js";
26
26
  import { TerminalWindowIcon as L } from "../../../node_modules/@phosphor-icons/react/dist/csr/TerminalWindow.es.js";
@@ -127,8 +127,8 @@ import { ShieldWarningIcon as Sr } from "../../../node_modules/@phosphor-icons/r
127
127
  import { UserSwitchIcon as wr } from "../../../node_modules/@phosphor-icons/react/dist/csr/UserSwitch.es.js";
128
128
  import { LightningIcon as gr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Lightning.es.js";
129
129
  import { MapPinIcon as Pr } from "../../../node_modules/@phosphor-icons/react/dist/csr/MapPin.es.js";
130
- import { EraserIcon as kr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Eraser.es.js";
131
- import { VaultIcon as dr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Vault.es.js";
130
+ import { EraserIcon as dr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Eraser.es.js";
131
+ import { VaultIcon as kr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Vault.es.js";
132
132
  import { ClockClockwiseIcon as Ar } from "../../../node_modules/@phosphor-icons/react/dist/csr/ClockClockwise.es.js";
133
133
  import { RepeatIcon as Dr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Repeat.es.js";
134
134
  import { EyeIcon as Lr } from "../../../node_modules/@phosphor-icons/react/dist/csr/Eye.es.js";
@@ -181,8 +181,8 @@ import { SortAscendingIcon as Se } from "../../../node_modules/@phosphor-icons/r
181
181
  import { SortDescendingIcon as we } from "../../../node_modules/@phosphor-icons/react/dist/csr/SortDescending.es.js";
182
182
  import { ArrowClockwiseIcon as ge } from "../../../node_modules/@phosphor-icons/react/dist/csr/ArrowClockwise.es.js";
183
183
  import { SparkleIcon as Pe } from "../../../node_modules/@phosphor-icons/react/dist/csr/Sparkle.es.js";
184
- import { ThumbsUpIcon as ke } from "../../../node_modules/@phosphor-icons/react/dist/csr/ThumbsUp.es.js";
185
- import { ThumbsDownIcon as de } from "../../../node_modules/@phosphor-icons/react/dist/csr/ThumbsDown.es.js";
184
+ import { ThumbsUpIcon as de } from "../../../node_modules/@phosphor-icons/react/dist/csr/ThumbsUp.es.js";
185
+ import { ThumbsDownIcon as ke } from "../../../node_modules/@phosphor-icons/react/dist/csr/ThumbsDown.es.js";
186
186
  import { DotsThreeCircleVerticalIcon as Ae } from "../../../node_modules/@phosphor-icons/react/dist/csr/DotsThreeCircleVertical.es.js";
187
187
  import { BugBeetleIcon as De } from "../../../node_modules/@phosphor-icons/react/dist/csr/BugBeetle.es.js";
188
188
  import { EnvelopeIcon as Le } from "../../../node_modules/@phosphor-icons/react/dist/csr/Envelope.es.js";
@@ -218,7 +218,9 @@ import { NotePencilIcon as ri } from "../../../node_modules/@phosphor-icons/reac
218
218
  import { LifebuoyIcon as ei } from "../../../node_modules/@phosphor-icons/react/dist/csr/Lifebuoy.es.js";
219
219
  import { TestTubeIcon as ii } from "../../../node_modules/@phosphor-icons/react/dist/csr/TestTube.es.js";
220
220
  import { TagIcon as mi } from "../../../node_modules/@phosphor-icons/react/dist/csr/Tag.es.js";
221
- const pn = {
221
+ import { FilePlusIcon as ai } from "../../../node_modules/@phosphor-icons/react/dist/csr/FilePlus.es.js";
222
+ import { CalendarPlusIcon as ti } from "../../../node_modules/@phosphor-icons/react/dist/csr/CalendarPlus.es.js";
223
+ const $n = {
222
224
  AidaLogo: r,
223
225
  Activity: We,
224
226
  FileSearch: He,
@@ -242,8 +244,8 @@ const pn = {
242
244
  FilePdf: w,
243
245
  BoundingBox: g,
244
246
  TreeStructure: P,
245
- ShoppingCart: k,
246
- Code: d,
247
+ ShoppingCart: d,
248
+ Code: k,
247
249
  FileTxt: A,
248
250
  FileZip: D,
249
251
  TerminalWindow: L,
@@ -346,8 +348,8 @@ const pn = {
346
348
  UserSwitch: wr,
347
349
  Lightning: gr,
348
350
  MapPin: Pr,
349
- Eraser: kr,
350
- Vault: dr,
351
+ Eraser: dr,
352
+ Vault: kr,
351
353
  ClockClockwise: Ar,
352
354
  Repeat: Dr,
353
355
  Eye: Lr,
@@ -402,8 +404,8 @@ const pn = {
402
404
  SortDescending: we,
403
405
  ArrowClockwise: ge,
404
406
  Sparkle: Pe,
405
- ThumbsUp: ke,
406
- ThumbsDown: de,
407
+ ThumbsUp: de,
408
+ ThumbsDown: ke,
407
409
  DotsThreeCircleVertical: Ae,
408
410
  BugBeetle: De,
409
411
  Envelope: Le,
@@ -439,8 +441,10 @@ const pn = {
439
441
  NotePencil: ri,
440
442
  Lifebuoy: ei,
441
443
  TestTube: ii,
442
- Tag: mi
444
+ Tag: mi,
445
+ FilePlus: ai,
446
+ CalendarPlus: ti
443
447
  };
444
448
  export {
445
- pn as IconList
449
+ $n as IconList
446
450
  };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Props for the DataTableAmountCell component
3
+ */
4
+ export interface DataTableAmountCellProps {
5
+ /** The numeric amount value */
6
+ value: number | null | undefined;
7
+ /** ISO 4217 currency code @default "USD" */
8
+ currency?: string;
9
+ /** Override locale for formatting */
10
+ locales?: string | string[];
11
+ /** CurrencyField size variant @default "xs" */
12
+ size?: "xs" | "sm" | "base";
13
+ /** Whether to show the currency code @default true */
14
+ showCurrencyCode?: boolean;
15
+ /** Additional CSS classes */
16
+ className?: string;
17
+ }
18
+ /**
19
+ * A table cell for displaying formatted currency amounts.
20
+ * Wraps the CurrencyField atom with sensible defaults for table usage.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <DataTableAmountCell value={1234.56} currency="USD" />
25
+ * <DataTableAmountCell value={500} currency="PEN" locales="es-PE" />
26
+ * <DataTableAmountCell value={0} currency="BRL" locales="pt-BR" />
27
+ * ```
28
+ */
29
+ declare const DataTableAmountCell: import('react').ForwardRefExoticComponent<DataTableAmountCellProps & import('react').RefAttributes<HTMLDivElement>>;
30
+ export { DataTableAmountCell };
@@ -0,0 +1,27 @@
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as n } from "react";
3
+ import { cn as s } from "../../../lib/utils.js";
4
+ import { CurrencyField as f } from "../../atoms/currency-field/currency-field.js";
5
+ const u = n(
6
+ ({
7
+ value: r,
8
+ currency: t = "USD",
9
+ locales: m,
10
+ size: o = "xs",
11
+ showCurrencyCode: l = !0,
12
+ className: a
13
+ }, i) => r == null || Number.isNaN(r) ? null : /* @__PURE__ */ e.jsx("div", { ref: i, className: s("flex", a), children: /* @__PURE__ */ e.jsx(
14
+ f,
15
+ {
16
+ value: r,
17
+ currency: t,
18
+ locales: m,
19
+ size: o,
20
+ showCurrencyCode: l
21
+ }
22
+ ) })
23
+ );
24
+ u.displayName = "DataTableAmountCell";
25
+ export {
26
+ u as DataTableAmountCell
27
+ };
@@ -0,0 +1,41 @@
1
+ import { IconName } from '../../atoms/icon';
2
+ /**
3
+ * Props for the DataTableCopyCell component
4
+ */
5
+ export interface DataTableCopyCellProps {
6
+ /** The text value to display and copy */
7
+ value: string;
8
+ /** Optional navigation link — renders value as an anchor */
9
+ linkTo?: string;
10
+ /** Optional icon before the text (e.g. "Key" for test credentials) */
11
+ startIcon?: IconName;
12
+ /** Tooltip for the start icon */
13
+ startIconTooltip?: string;
14
+ /** Tooltip for the copy button @default "Copy" */
15
+ copyTooltip?: string;
16
+ /** Custom callback on successful copy */
17
+ onCopySuccess?: () => void;
18
+ /** Custom callback on copy error */
19
+ onCopyError?: () => void;
20
+ /** Additional CSS classes */
21
+ className?: string;
22
+ }
23
+ /**
24
+ * A table cell that displays a text value with a copy-to-clipboard button.
25
+ * The copy button appears on hover. Supports optional navigation links
26
+ * and start icons (e.g., test credential indicators).
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * // Simple copy cell
31
+ * <DataTableCopyCell value="pay_abc123def456ghi789" />
32
+ *
33
+ * // With link
34
+ * <DataTableCopyCell value="pay_abc123" linkTo="/payments/details/pay_abc123" />
35
+ *
36
+ * // With start icon
37
+ * <DataTableCopyCell value="pay_test_123" startIcon="Key" startIconTooltip="Test credential" />
38
+ * ```
39
+ */
40
+ declare const DataTableCopyCell: import('react').ForwardRefExoticComponent<DataTableCopyCellProps & import('react').RefAttributes<HTMLDivElement>>;
41
+ export { DataTableCopyCell };
@@ -0,0 +1,83 @@
1
+ import { j as r } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as f } from "react";
3
+ import { cn as y } from "../../../lib/utils.js";
4
+ import { Icon as c } from "../../atoms/icon/icon.js";
5
+ import { TooltipProvider as i, Tooltip as o, TooltipTrigger as n, TooltipContent as l } from "../../../vendor/shadcn/tooltip.js";
6
+ import { useCopyToClipboard as g } from "../../../hooks/use-copy-to-clipboard.js";
7
+ const N = f(
8
+ ({
9
+ value: e,
10
+ linkTo: t,
11
+ startIcon: a,
12
+ startIconTooltip: p,
13
+ copyTooltip: d = "Copy",
14
+ onCopySuccess: m,
15
+ onCopyError: h,
16
+ className: x
17
+ }, j) => {
18
+ const { copyToClipboard: u } = g({
19
+ onSuccess: m,
20
+ onError: h
21
+ });
22
+ if (!e) return null;
23
+ const C = (s) => {
24
+ s.stopPropagation(), u(e);
25
+ };
26
+ return /* @__PURE__ */ r.jsxs(
27
+ "div",
28
+ {
29
+ ref: j,
30
+ className: y("group flex items-center gap-2 w-full", x),
31
+ children: [
32
+ a && /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
33
+ /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "shrink-0 inline-flex", children: /* @__PURE__ */ r.jsx(
34
+ c,
35
+ {
36
+ name: a,
37
+ weight: "fill",
38
+ size: "sm",
39
+ className: "text-primary"
40
+ }
41
+ ) }) }),
42
+ p && /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: p }) })
43
+ ] }) }),
44
+ /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
45
+ /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "truncate text-sm", children: t ? /* @__PURE__ */ r.jsx(
46
+ "a",
47
+ {
48
+ href: t,
49
+ className: "text-primary hover:underline",
50
+ onClick: (s) => s.stopPropagation(),
51
+ children: e
52
+ }
53
+ ) : e }) }),
54
+ /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: e }) })
55
+ ] }) }),
56
+ /* @__PURE__ */ r.jsx(i, { children: /* @__PURE__ */ r.jsxs(o, { children: [
57
+ /* @__PURE__ */ r.jsx(n, { asChild: !0, children: /* @__PURE__ */ r.jsx(
58
+ "button",
59
+ {
60
+ type: "button",
61
+ className: "shrink-0 opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-muted rounded",
62
+ onClick: C,
63
+ children: /* @__PURE__ */ r.jsx(
64
+ c,
65
+ {
66
+ name: "CopySimple",
67
+ size: "sm",
68
+ className: "text-muted-foreground"
69
+ }
70
+ )
71
+ }
72
+ ) }),
73
+ /* @__PURE__ */ r.jsx(l, { children: /* @__PURE__ */ r.jsx("p", { children: d }) })
74
+ ] }) })
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ );
80
+ N.displayName = "DataTableCopyCell";
81
+ export {
82
+ N as DataTableCopyCell
83
+ };
@@ -0,0 +1,31 @@
1
+ export interface DataTableCountryCellProps {
2
+ /** ISO 3166-1 alpha-2 country code (e.g., "US", "CO", "BR") */
3
+ code: string | null | undefined;
4
+ /** Whether to show the flag emoji @default true */
5
+ showFlag?: boolean;
6
+ /** Whether to show the country name instead of just the code @default false */
7
+ showName?: boolean;
8
+ /** Custom function to resolve country name from code */
9
+ getCountryName?: (code: string) => string;
10
+ /** Additional CSS classes */
11
+ className?: string;
12
+ }
13
+ /**
14
+ * A table cell for displaying country codes with flag emojis.
15
+ * Supports showing just the code, or the full country name via
16
+ * a custom resolver function.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * // Code with flag
21
+ * <DataTableCountryCell code="US" />
22
+ *
23
+ * // With country name
24
+ * <DataTableCountryCell code="CO" showName getCountryName={countryNameFromCode} />
25
+ *
26
+ * // Without flag
27
+ * <DataTableCountryCell code="BR" showFlag={false} />
28
+ * ```
29
+ */
30
+ declare const DataTableCountryCell: import('react').ForwardRefExoticComponent<DataTableCountryCellProps & import('react').RefAttributes<HTMLDivElement>>;
31
+ export { DataTableCountryCell };
@@ -0,0 +1,37 @@
1
+ import { j as r } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as m } from "react";
3
+ import { cn as f } from "../../../lib/utils.js";
4
+ import { TooltipProvider as u, Tooltip as x, TooltipTrigger as d, TooltipContent as h } from "../../../vendor/shadcn/tooltip.js";
5
+ const j = (t) => !t || typeof t != "string" ? t : typeof String.fromCodePoint < "u" ? t.toUpperCase().replace(
6
+ /./g,
7
+ (n) => String.fromCodePoint(n.charCodeAt(0) + 127397)
8
+ ) : t, T = m(
9
+ ({ code: t, showFlag: n = !0, showName: o = !1, getCountryName: s, className: a }, i) => {
10
+ if (!t) return null;
11
+ const e = n ? j(t) : null, l = s ? s(t) : null, p = o && l ? l : t.toUpperCase(), c = l ?? t.toUpperCase();
12
+ return /* @__PURE__ */ r.jsx(u, { children: /* @__PURE__ */ r.jsxs(x, { children: [
13
+ /* @__PURE__ */ r.jsx(d, { asChild: !0, children: /* @__PURE__ */ r.jsxs(
14
+ "div",
15
+ {
16
+ ref: i,
17
+ className: f(
18
+ "flex items-center gap-1 truncate text-sm",
19
+ a
20
+ ),
21
+ children: [
22
+ e && /* @__PURE__ */ r.jsx("span", { className: "shrink-0", children: e }),
23
+ /* @__PURE__ */ r.jsx("span", { className: "truncate", children: p })
24
+ ]
25
+ }
26
+ ) }),
27
+ /* @__PURE__ */ r.jsx(h, { children: /* @__PURE__ */ r.jsxs("p", { children: [
28
+ e && `${e} `,
29
+ c
30
+ ] }) })
31
+ ] }) });
32
+ }
33
+ );
34
+ T.displayName = "DataTableCountryCell";
35
+ export {
36
+ T as DataTableCountryCell
37
+ };
@@ -0,0 +1,29 @@
1
+ export interface DataTableDateCellProps {
2
+ /** The date value — ISO string or Date object */
3
+ value: string | Date | null | undefined;
4
+ /** Custom date formatter. If not provided, uses Intl.DateTimeFormat with date and time */
5
+ formatFn?: (date: string | Date) => string;
6
+ /** Content to render when value is falsy @default null */
7
+ emptyState?: React.ReactNode;
8
+ /** Additional CSS classes */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * A table cell for displaying formatted dates with truncation and tooltip.
13
+ * Accepts a custom formatting function or uses a sensible default
14
+ * (Intl.DateTimeFormat with date + time).
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // Simple date
19
+ * <DataTableDateCell value="2024-03-15T14:30:00Z" />
20
+ *
21
+ * // With custom formatter
22
+ * <DataTableDateCell value="2024-03-15T14:30:00Z" formatFn={defaultDateFormat} />
23
+ *
24
+ * // With empty state
25
+ * <DataTableDateCell value={null} emptyState="-" />
26
+ * ```
27
+ */
28
+ declare const DataTableDateCell: import('react').ForwardRefExoticComponent<DataTableDateCellProps & import('react').RefAttributes<HTMLDivElement>>;
29
+ export { DataTableDateCell };
@@ -0,0 +1,32 @@
1
+ import { j as t } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as m } from "react";
3
+ import { cn as s } from "../../../lib/utils.js";
4
+ import { TooltipProvider as l, Tooltip as c, TooltipTrigger as d, TooltipContent as f } from "../../../vendor/shadcn/tooltip.js";
5
+ const p = (r) => {
6
+ try {
7
+ const e = typeof r == "string" ? new Date(r) : r;
8
+ return new Intl.DateTimeFormat("en-US", {
9
+ year: "numeric",
10
+ month: "short",
11
+ day: "numeric",
12
+ hour: "2-digit",
13
+ minute: "2-digit",
14
+ second: "2-digit"
15
+ }).format(e);
16
+ } catch {
17
+ return String(r);
18
+ }
19
+ }, h = m(
20
+ ({ value: r, formatFn: e, emptyState: i = null, className: n }, a) => {
21
+ if (!r) return /* @__PURE__ */ t.jsx(t.Fragment, { children: i });
22
+ const o = (e ?? p)(r);
23
+ return /* @__PURE__ */ t.jsx(l, { children: /* @__PURE__ */ t.jsxs(c, { children: [
24
+ /* @__PURE__ */ t.jsx(d, { asChild: !0, children: /* @__PURE__ */ t.jsx("div", { ref: a, className: s("truncate text-sm", n), children: o }) }),
25
+ /* @__PURE__ */ t.jsx(f, { children: /* @__PURE__ */ t.jsx("p", { children: o }) })
26
+ ] }) });
27
+ }
28
+ );
29
+ h.displayName = "DataTableDateCell";
30
+ export {
31
+ h as DataTableDateCell
32
+ };
@@ -0,0 +1,21 @@
1
+ export interface DataTableIconTextCellItem {
2
+ /** Item name/label */
3
+ name: string;
4
+ /** URL to the icon image */
5
+ icon?: string;
6
+ }
7
+ export interface DataTableIconTextCellProps {
8
+ /** Array of items to display (will be deduplicated by name) */
9
+ items: DataTableIconTextCellItem[];
10
+ /** Maximum number of visible items @default 1 */
11
+ maxVisible?: number;
12
+ /** Additional CSS classes */
13
+ className?: string;
14
+ }
15
+ /**
16
+ * A table cell for displaying items with icons and text, such as payment
17
+ * providers or payment methods. Shows the first item with its icon and name,
18
+ * plus a "+N" badge for additional items. Automatically deduplicates by name.
19
+ */
20
+ declare const DataTableIconTextCell: import('react').ForwardRefExoticComponent<DataTableIconTextCellProps & import('react').RefAttributes<HTMLDivElement>>;
21
+ export { DataTableIconTextCell };
@@ -0,0 +1,75 @@
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as j } from "react";
3
+ import { cn as u } from "../../../lib/utils.js";
4
+ import { TooltipProvider as o, Tooltip as i, TooltipTrigger as d, TooltipContent as m } from "../../../vendor/shadcn/tooltip.js";
5
+ import { Badge as f } from "../../atoms/badge/badge.js";
6
+ const g = j(({ items: n, maxVisible: c = 1, className: x }, h) => {
7
+ if (!n || n.length === 0) return null;
8
+ const t = /* @__PURE__ */ new Set(), s = n.filter((r) => !r.name || t.has(r.name) ? !1 : (t.add(r.name), !0));
9
+ if (s.length === 0) return null;
10
+ const p = s.slice(0, c), a = s.slice(c);
11
+ return /* @__PURE__ */ e.jsxs(
12
+ "div",
13
+ {
14
+ ref: h,
15
+ className: u("flex items-center gap-2", x),
16
+ children: [
17
+ p.map((r) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1.5 min-w-0", children: [
18
+ r.icon && /* @__PURE__ */ e.jsx(
19
+ "img",
20
+ {
21
+ src: r.icon,
22
+ alt: r.name,
23
+ className: "h-4 w-4 shrink-0 object-contain",
24
+ onError: (l) => {
25
+ l.currentTarget.style.display = "none";
26
+ }
27
+ }
28
+ ),
29
+ /* @__PURE__ */ e.jsx(o, { children: /* @__PURE__ */ e.jsxs(i, { children: [
30
+ /* @__PURE__ */ e.jsx(d, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "truncate text-sm", children: r.name }) }),
31
+ /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx("p", { children: r.name }) })
32
+ ] }) })
33
+ ] }, r.name)),
34
+ a.length > 0 && /* @__PURE__ */ e.jsx(o, { delayDuration: 0, children: /* @__PURE__ */ e.jsxs(i, { children: [
35
+ /* @__PURE__ */ e.jsx(d, { className: "shrink-0", children: /* @__PURE__ */ e.jsxs(
36
+ f,
37
+ {
38
+ variant: "outline",
39
+ className: "text-xs cursor-pointer hover:border-primary hover:text-primary",
40
+ children: [
41
+ "+",
42
+ a.length
43
+ ]
44
+ }
45
+ ) }),
46
+ /* @__PURE__ */ e.jsx(m, { className: "p-2", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: a.map((r) => /* @__PURE__ */ e.jsxs(
47
+ "div",
48
+ {
49
+ className: "flex items-center gap-3",
50
+ children: [
51
+ r.icon && /* @__PURE__ */ e.jsx(
52
+ "img",
53
+ {
54
+ src: r.icon,
55
+ alt: r.name,
56
+ className: "h-4 w-4 object-contain",
57
+ onError: (l) => {
58
+ l.currentTarget.style.display = "none";
59
+ }
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: r.name })
63
+ ]
64
+ },
65
+ r.name
66
+ )) }) })
67
+ ] }) })
68
+ ]
69
+ }
70
+ );
71
+ });
72
+ g.displayName = "DataTableIconTextCell";
73
+ export {
74
+ g as DataTableIconTextCell
75
+ };
@@ -0,0 +1,28 @@
1
+ export interface DataTablePercentageCellProps {
2
+ /** The decimal value (0-1 range, e.g. 0.85 for 85%) */
3
+ value: number | null | undefined;
4
+ /** Number of decimal places @default 2 */
5
+ decimals?: number;
6
+ /** Whether to show a progress bar @default false */
7
+ showProgressBar?: boolean;
8
+ /** Additional CSS classes */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * A table cell for displaying percentage values with optional progress bar
13
+ * visualization. Accepts values in 0-1 decimal range.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * // Simple percentage
18
+ * <DataTablePercentageCell value={0.8534} />
19
+ *
20
+ * // With progress bar
21
+ * <DataTablePercentageCell value={0.75} showProgressBar />
22
+ *
23
+ * // No decimals
24
+ * <DataTablePercentageCell value={0.856} decimals={0} />
25
+ * ```
26
+ */
27
+ declare const DataTablePercentageCell: import('react').ForwardRefExoticComponent<DataTablePercentageCellProps & import('react').RefAttributes<HTMLDivElement>>;
28
+ export { DataTablePercentageCell };
@@ -0,0 +1,27 @@
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as m } from "react";
3
+ import { cn as o } from "../../../lib/utils.js";
4
+ const c = m(({ value: t, decimals: r = 2, showProgressBar: l = !1, className: n }, i) => {
5
+ if (t == null) return null;
6
+ const a = t * 100, s = new Intl.NumberFormat("en-US", {
7
+ minimumFractionDigits: 0,
8
+ maximumFractionDigits: r
9
+ }).format(a);
10
+ return /* @__PURE__ */ e.jsxs("div", { ref: i, className: o("flex items-center gap-3", n), children: [
11
+ l && /* @__PURE__ */ e.jsx("div", { className: "h-1.5 flex-1 min-w-[50px] rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ e.jsx(
12
+ "div",
13
+ {
14
+ className: "h-full rounded-full bg-primary transition-all",
15
+ style: { width: `${Math.min(a, 100)}%` }
16
+ }
17
+ ) }),
18
+ /* @__PURE__ */ e.jsxs("span", { className: "text-sm whitespace-nowrap", children: [
19
+ s,
20
+ "%"
21
+ ] })
22
+ ] });
23
+ });
24
+ c.displayName = "DataTablePercentageCell";
25
+ export {
26
+ c as DataTablePercentageCell
27
+ };
@@ -0,0 +1,44 @@
1
+ import { IconName } from '../../atoms/icon';
2
+ /**
3
+ * Configuration entry for mapping a status key to a Badge visual.
4
+ */
5
+ export interface StatusMapEntry {
6
+ /** Display label */
7
+ label: string;
8
+ /** Badge variant */
9
+ variant: "success" | "error" | "warning" | "info" | "alert" | "outline" | "secondary";
10
+ /** Phosphor icon name @default "Info" */
11
+ icon?: IconName;
12
+ }
13
+ /**
14
+ * Props for the DataTableStatusCell component
15
+ */
16
+ export interface DataTableStatusCellProps {
17
+ /** The raw status key (e.g., "APPROVED", "DECLINED") */
18
+ status: string;
19
+ /** Map of status keys to display configuration */
20
+ statusMap?: Record<string, StatusMapEntry>;
21
+ /**
22
+ * Fallback label formatter when status is not in the map.
23
+ * @default Capitalizes first letter, replaces underscores with spaces
24
+ */
25
+ formatLabel?: (status: string) => string;
26
+ /** Additional CSS classes */
27
+ className?: string;
28
+ }
29
+ /**
30
+ * A table cell that displays a status as a colored Badge with an icon.
31
+ * Accepts a status map for consistent status-to-visual mapping across the application.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * const STATUS_MAP = {
36
+ * APPROVED: { label: "Approved", variant: "success", icon: "CheckCircle" },
37
+ * DECLINED: { label: "Declined", variant: "error", icon: "XCircle" },
38
+ * };
39
+ *
40
+ * <DataTableStatusCell status="APPROVED" statusMap={STATUS_MAP} />
41
+ * ```
42
+ */
43
+ declare const DataTableStatusCell: import('react').ForwardRefExoticComponent<DataTableStatusCellProps & import('react').RefAttributes<HTMLDivElement>>;
44
+ export { DataTableStatusCell };
@@ -0,0 +1,24 @@
1
+ import { j as n } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as m } from "react";
3
+ import { cn as i } from "../../../lib/utils.js";
4
+ import { Badge as l } from "../../atoms/badge/badge.js";
5
+ const p = (r) => {
6
+ if (!r) return r;
7
+ const e = r.replace(/[_.]/g, " ").toLowerCase();
8
+ return e.charAt(0).toUpperCase() + e.slice(1);
9
+ }, d = m(({ status: r, statusMap: e, formatLabel: c = p, className: o }, t) => {
10
+ if (!r) return null;
11
+ const a = e?.[r] ?? e?.[r.toUpperCase()];
12
+ return a ? /* @__PURE__ */ n.jsx("div", { ref: t, className: i(o), children: /* @__PURE__ */ n.jsx(
13
+ l,
14
+ {
15
+ startIcon: a.icon ?? "Info",
16
+ variant: a.variant,
17
+ children: a.label
18
+ }
19
+ ) }) : /* @__PURE__ */ n.jsx("div", { ref: t, className: i(o), children: /* @__PURE__ */ n.jsx(l, { startIcon: "Info", variant: "info", children: c(r) }) });
20
+ });
21
+ d.displayName = "DataTableStatusCell";
22
+ export {
23
+ d as DataTableStatusCell
24
+ };
@@ -0,0 +1,16 @@
1
+ export interface DataTableTagsCellProps {
2
+ /** Array of tag labels to display */
3
+ tags: string[];
4
+ /** Maximum number of visible tags before showing "+N" @default 2 */
5
+ maxVisible?: number;
6
+ /** Badge variant for all tags @default "outline" */
7
+ variant?: "outline" | "secondary" | "info" | "success" | "error" | "warning" | "alert";
8
+ /** Additional CSS classes */
9
+ className?: string;
10
+ }
11
+ /**
12
+ * A table cell for displaying a list of tags as Badges with overflow handling.
13
+ * Shows the first N tags and a "+X" badge with tooltip for the rest.
14
+ */
15
+ declare const DataTableTagsCell: import('react').ForwardRefExoticComponent<DataTableTagsCellProps & import('react').RefAttributes<HTMLDivElement>>;
16
+ export { DataTableTagsCell };