@acronis-platform/ui-react 0.36.0 → 0.43.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 (102) hide show
  1. package/dist/components/ui/card/card.js +92 -0
  2. package/dist/components/ui/card/card.js.map +1 -0
  3. package/dist/components/ui/data-table/data-table-column-header.js +48 -0
  4. package/dist/components/ui/data-table/data-table-column-header.js.map +1 -0
  5. package/dist/components/ui/data-table/data-table-pagination.js +89 -0
  6. package/dist/components/ui/data-table/data-table-pagination.js.map +1 -0
  7. package/dist/components/ui/data-table/data-table-toolbar.js +46 -0
  8. package/dist/components/ui/data-table/data-table-toolbar.js.map +1 -0
  9. package/dist/components/ui/data-table/data-table-view-options.js +40 -0
  10. package/dist/components/ui/data-table/data-table-view-options.js.map +1 -0
  11. package/dist/components/ui/data-table/data-table.js +89 -0
  12. package/dist/components/ui/data-table/data-table.js.map +1 -0
  13. package/dist/components/ui/dialog/dialog.js +140 -0
  14. package/dist/components/ui/dialog/dialog.js.map +1 -0
  15. package/dist/components/ui/dropdown-menu/dropdown-menu.js +159 -0
  16. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -0
  17. package/dist/components/ui/empty/empty.js +78 -0
  18. package/dist/components/ui/empty/empty.js.map +1 -0
  19. package/dist/components/ui/input/input.js +2 -2
  20. package/dist/components/ui/input/input.js.map +1 -1
  21. package/dist/components/ui/input-search/input-search.js +4 -4
  22. package/dist/components/ui/input-search/input-search.js.map +1 -1
  23. package/dist/components/ui/input-text/input-text.js +1 -1
  24. package/dist/components/ui/input-text/input-text.js.map +1 -1
  25. package/dist/components/ui/label/label.js +12 -0
  26. package/dist/components/ui/label/label.js.map +1 -0
  27. package/dist/components/ui/popover/popover.js +48 -0
  28. package/dist/components/ui/popover/popover.js.map +1 -0
  29. package/dist/components/ui/progress/progress.js +30 -0
  30. package/dist/components/ui/progress/progress.js.map +1 -0
  31. package/dist/components/ui/search/search.js +2 -2
  32. package/dist/components/ui/search/search.js.map +1 -1
  33. package/dist/components/ui/separator/separator.js +22 -0
  34. package/dist/components/ui/separator/separator.js.map +1 -0
  35. package/dist/components/ui/spinner/spinner.js +38 -0
  36. package/dist/components/ui/spinner/spinner.js.map +1 -0
  37. package/dist/components/ui/table/table.js +118 -0
  38. package/dist/components/ui/table/table.js.map +1 -0
  39. package/dist/components/ui/tabs/tabs.js +44 -0
  40. package/dist/components/ui/tabs/tabs.js.map +1 -0
  41. package/dist/components/ui/toast/toast.js +83 -0
  42. package/dist/components/ui/toast/toast.js.map +1 -0
  43. package/dist/components/ui/widget-placeholder/widget-placeholder.js +106 -0
  44. package/dist/components/ui/widget-placeholder/widget-placeholder.js.map +1 -0
  45. package/dist/index.js +210 -113
  46. package/dist/index.js.map +1 -1
  47. package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js +104 -0
  48. package/dist/node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
  49. package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js +1900 -0
  50. package/dist/node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
  51. package/dist/react.js +210 -113
  52. package/dist/react.js.map +1 -1
  53. package/dist/src/components/ui/card/card.d.ts +17 -0
  54. package/dist/src/components/ui/card/index.d.ts +1 -0
  55. package/dist/src/components/ui/data-table/data-table-column-header.d.ts +8 -0
  56. package/dist/src/components/ui/data-table/data-table-pagination.d.ts +8 -0
  57. package/dist/src/components/ui/data-table/data-table-toolbar.d.ts +9 -0
  58. package/dist/src/components/ui/data-table/data-table-view-options.d.ts +6 -0
  59. package/dist/src/components/ui/data-table/data-table.d.ts +24 -0
  60. package/dist/src/components/ui/data-table/data-table.docs.d.ts +22 -0
  61. package/dist/src/components/ui/data-table/index.d.ts +5 -0
  62. package/dist/src/components/ui/dialog/dialog.d.ts +39 -0
  63. package/dist/src/components/ui/dialog/dialog.docs.d.ts +24 -0
  64. package/dist/src/components/ui/dialog/index.d.ts +1 -0
  65. package/dist/src/components/ui/dropdown-menu/dropdown-menu.d.ts +39 -0
  66. package/dist/src/components/ui/dropdown-menu/dropdown-menu.docs.d.ts +25 -0
  67. package/dist/src/components/ui/dropdown-menu/index.d.ts +1 -0
  68. package/dist/src/components/ui/empty/empty.d.ts +9 -0
  69. package/dist/src/components/ui/empty/index.d.ts +1 -0
  70. package/dist/src/components/ui/input/index.d.ts +1 -1
  71. package/dist/src/components/ui/input/input.d.ts +3 -3
  72. package/dist/src/components/ui/input-search/input-search.d.ts +2 -2
  73. package/dist/src/components/ui/label/index.d.ts +1 -0
  74. package/dist/src/components/ui/label/label.d.ts +5 -0
  75. package/dist/src/components/ui/label/label.docs.d.ts +10 -0
  76. package/dist/src/components/ui/popover/index.d.ts +1 -0
  77. package/dist/src/components/ui/popover/popover.d.ts +27 -0
  78. package/dist/src/components/ui/popover/popover.docs.d.ts +25 -0
  79. package/dist/src/components/ui/progress/index.d.ts +1 -0
  80. package/dist/src/components/ui/progress/progress.d.ts +9 -0
  81. package/dist/src/components/ui/progress/progress.docs.d.ts +16 -0
  82. package/dist/src/components/ui/search/index.d.ts +1 -1
  83. package/dist/src/components/ui/search/search.d.ts +3 -3
  84. package/dist/src/components/ui/separator/index.d.ts +1 -0
  85. package/dist/src/components/ui/separator/separator.d.ts +3 -0
  86. package/dist/src/components/ui/spinner/index.d.ts +1 -0
  87. package/dist/src/components/ui/spinner/spinner.d.ts +9 -0
  88. package/dist/src/components/ui/table/index.d.ts +1 -0
  89. package/dist/src/components/ui/table/table.d.ts +23 -0
  90. package/dist/src/components/ui/tabs/index.d.ts +1 -0
  91. package/dist/src/components/ui/tabs/tabs.d.ts +6 -0
  92. package/dist/src/components/ui/tabs/tabs.docs.d.ts +25 -0
  93. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  94. package/dist/src/components/ui/toast/index.d.ts +1 -0
  95. package/dist/src/components/ui/toast/toast.d.ts +48 -0
  96. package/dist/src/components/ui/toast/toast.docs.d.ts +12 -0
  97. package/dist/src/components/ui/widget-placeholder/index.d.ts +1 -0
  98. package/dist/src/components/ui/widget-placeholder/widget-placeholder.d.ts +18 -0
  99. package/dist/src/components/ui/widget-placeholder/widget-placeholder.docs.d.ts +14 -0
  100. package/dist/src/index.d.ts +18 -2
  101. package/dist/ui-react.css +1 -1
  102. package/package.json +4 -1
@@ -0,0 +1,92 @@
1
+ import * as o from "react";
2
+ import { mergeProps as t } from "@base-ui/react/merge-props";
3
+ import { useRender as s } from "@base-ui/react/use-render";
4
+ import { cn as p } from "../../../lib/utils.js";
5
+ const m = o.forwardRef(
6
+ ({ className: e, render: a, ...r }, d) => s({
7
+ render: a,
8
+ ref: d,
9
+ defaultTagName: "div",
10
+ props: t(
11
+ {
12
+ className: p(
13
+ "rounded-lg border border-border bg-background text-foreground shadow-xs",
14
+ e
15
+ )
16
+ },
17
+ r
18
+ )
19
+ })
20
+ );
21
+ m.displayName = "Card";
22
+ const f = o.forwardRef(
23
+ ({ className: e, render: a, ...r }, d) => s({
24
+ render: a,
25
+ ref: d,
26
+ defaultTagName: "div",
27
+ props: t(
28
+ { className: p("flex flex-col space-y-1.5 p-6", e) },
29
+ r
30
+ )
31
+ })
32
+ );
33
+ f.displayName = "CardHeader";
34
+ const l = o.forwardRef(
35
+ ({ className: e, render: a, ...r }, d) => s({
36
+ render: a,
37
+ ref: d,
38
+ defaultTagName: "div",
39
+ props: t(
40
+ {
41
+ className: p(
42
+ "text-2xl font-semibold leading-none tracking-tight",
43
+ e
44
+ )
45
+ },
46
+ r
47
+ )
48
+ })
49
+ );
50
+ l.displayName = "CardTitle";
51
+ const i = o.forwardRef(
52
+ ({ className: e, render: a, ...r }, d) => s({
53
+ render: a,
54
+ ref: d,
55
+ defaultTagName: "div",
56
+ props: t(
57
+ { className: p("text-sm text-muted-foreground", e) },
58
+ r
59
+ )
60
+ })
61
+ );
62
+ i.displayName = "CardDescription";
63
+ const n = o.forwardRef(
64
+ ({ className: e, render: a, ...r }, d) => s({
65
+ render: a,
66
+ ref: d,
67
+ defaultTagName: "div",
68
+ props: t({ className: p("p-6 pt-0", e) }, r)
69
+ })
70
+ );
71
+ n.displayName = "CardContent";
72
+ const c = o.forwardRef(
73
+ ({ className: e, render: a, ...r }, d) => s({
74
+ render: a,
75
+ ref: d,
76
+ defaultTagName: "div",
77
+ props: t(
78
+ { className: p("flex items-center p-6 pt-0", e) },
79
+ r
80
+ )
81
+ })
82
+ );
83
+ c.displayName = "CardFooter";
84
+ export {
85
+ m as Card,
86
+ n as CardContent,
87
+ i as CardDescription,
88
+ c as CardFooter,
89
+ f as CardHeader,
90
+ l as CardTitle
91
+ };
92
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sources":["../../../../src/components/ui/card/card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\n\nimport { cn } from '@/lib/utils';\n\n// Initial version ported from `@acronis-platform/shadcn-uikit`'s `card`\n// (packages/ui-legacy/src/components/ui/card.tsx). No \"ready for dev\" Figma node\n// exists yet, so this is a design-pending v1: there is no `--ui-card-*` token\n// tier, so the surface/text/border colors resolve to the shared **semantic**\n// tokens via the bridged Tailwind names in `src/styles/index.css`:\n// • bg-background → --ui-background-surface-primary (legacy `bg-card`)\n// • text-foreground → --ui-text-on-surface-primary (legacy `text-card-foreground`)\n// • border-border → --ui-border-on-surface-border (legacy bare `border`)\n// • text-muted-foreground → --ui-text-on-surface-secondary (description)\n// Geometry (radius, padding, gaps, shadow) is carried over verbatim from legacy.\n// Reconcile against the real design with `/figma-component Card <url> --update`\n// once a mockup lands — at which point an elevated-surface token may replace the\n// primary surface used for the card background.\n\ninterface CardPartProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Replace the rendered `<div>` with another element or component (Base UI\n * composition) — e.g. render `CardTitle` as a heading. The component's props\n * and class names are merged onto it.\n */\n render?: useRender.RenderProp;\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n {\n className: cn(\n 'rounded-lg border border-border bg-background text-foreground shadow-xs',\n className\n ),\n },\n props\n ),\n })\n);\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n { className: cn('flex flex-col space-y-1.5 p-6', className) },\n props\n ),\n })\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n {\n className: cn(\n 'text-2xl font-semibold leading-none tracking-tight',\n className\n ),\n },\n props\n ),\n })\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n { className: cn('text-sm text-muted-foreground', className) },\n props\n ),\n })\n);\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>({ className: cn('p-6 pt-0', className) }, props),\n })\n);\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, CardPartProps>(\n ({ className, render, ...props }, ref) =>\n useRender({\n render,\n ref,\n defaultTagName: 'div',\n props: mergeProps<'div'>(\n { className: cn('flex items-center p-6 pt-0', className) },\n props\n ),\n })\n);\nCardFooter.displayName = 'CardFooter';\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n type CardPartProps,\n};\n"],"names":["Card","React","className","render","props","ref","useRender","mergeProps","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;;;AA6BA,MAAMA,IAAOC,EAAM;AAAA,EACjB,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE;AAAA,MACL;AAAA,QACE,WAAWC;AAAA,UACT;AAAA,UACAN;AAAA,QAAA;AAAA,MACF;AAAA,MAEFE;AAAA,IAAA;AAAA,EACF,CACD;AACL;AACAJ,EAAK,cAAc;AAEnB,MAAMS,IAAaR,EAAM;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE;AAAA,MACL,EAAE,WAAWC,EAAG,iCAAiCN,CAAS,EAAA;AAAA,MAC1DE;AAAA,IAAA;AAAA,EACF,CACD;AACL;AACAK,EAAW,cAAc;AAEzB,MAAMC,IAAYT,EAAM;AAAA,EACtB,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE;AAAA,MACL;AAAA,QACE,WAAWC;AAAA,UACT;AAAA,UACAN;AAAA,QAAA;AAAA,MACF;AAAA,MAEFE;AAAA,IAAA;AAAA,EACF,CACD;AACL;AACAM,EAAU,cAAc;AAExB,MAAMC,IAAkBV,EAAM;AAAA,EAC5B,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE;AAAA,MACL,EAAE,WAAWC,EAAG,iCAAiCN,CAAS,EAAA;AAAA,MAC1DE;AAAA,IAAA;AAAA,EACF,CACD;AACL;AACAO,EAAgB,cAAc;AAE9B,MAAMC,IAAcX,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE,EAAkB,EAAE,WAAWC,EAAG,YAAYN,CAAS,EAAA,GAAKE,CAAK;AAAA,EAAA,CACzE;AACL;AACAQ,EAAY,cAAc;AAE1B,MAAMC,IAAaZ,EAAM;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,EAAA,GAASC,MAChCC,EAAU;AAAA,IACR,QAAAH;AAAA,IACA,KAAAE;AAAA,IACA,gBAAgB;AAAA,IAChB,OAAOE;AAAA,MACL,EAAE,WAAWC,EAAG,8BAA8BN,CAAS,EAAA;AAAA,MACvDE;AAAA,IAAA;AAAA,EACF,CACD;AACL;AACAS,EAAW,cAAc;"}
@@ -0,0 +1,48 @@
1
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { ArrowDownIcon as a, ArrowUpIcon as d, ArrowsDownUpIcon as c, EyeCrossedIcon as l } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { cn as s } from "../../../lib/utils.js";
4
+ import { DropdownMenu as p, DropdownMenuTrigger as g, DropdownMenuContent as m, DropdownMenuItem as n, DropdownMenuSeparator as f } from "../dropdown-menu/dropdown-menu.js";
5
+ import { Button as u } from "../button/button.js";
6
+ function I({
7
+ column: r,
8
+ title: t,
9
+ className: i
10
+ }) {
11
+ return r.getCanSort() ? /* @__PURE__ */ e("div", { className: s("flex items-center gap-2", i), children: /* @__PURE__ */ o(p, { children: [
12
+ /* @__PURE__ */ o(
13
+ g,
14
+ {
15
+ render: /* @__PURE__ */ e(
16
+ u,
17
+ {
18
+ variant: "ghost",
19
+ className: "-ml-2 h-8 gap-2 px-2 data-[popup-open]:bg-accent"
20
+ }
21
+ ),
22
+ children: [
23
+ /* @__PURE__ */ e("span", { children: t }),
24
+ r.getIsSorted() === "desc" ? /* @__PURE__ */ e(a, {}) : r.getIsSorted() === "asc" ? /* @__PURE__ */ e(d, {}) : /* @__PURE__ */ e(c, {})
25
+ ]
26
+ }
27
+ ),
28
+ /* @__PURE__ */ o(m, { align: "start", children: [
29
+ /* @__PURE__ */ o(n, { onClick: () => r.toggleSorting(!1), children: [
30
+ /* @__PURE__ */ e(d, { className: "text-muted-foreground" }),
31
+ "Asc"
32
+ ] }),
33
+ /* @__PURE__ */ o(n, { onClick: () => r.toggleSorting(!0), children: [
34
+ /* @__PURE__ */ e(a, { className: "text-muted-foreground" }),
35
+ "Desc"
36
+ ] }),
37
+ /* @__PURE__ */ e(f, {}),
38
+ /* @__PURE__ */ o(n, { onClick: () => r.toggleVisibility(!1), children: [
39
+ /* @__PURE__ */ e(l, { className: "text-muted-foreground" }),
40
+ "Hide"
41
+ ] })
42
+ ] })
43
+ ] }) }) : /* @__PURE__ */ e("div", { className: s(i), children: t });
44
+ }
45
+ export {
46
+ I as DataTableColumnHeader
47
+ };
48
+ //# sourceMappingURL=data-table-column-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-column-header.js","sources":["../../../../src/components/ui/data-table/data-table-column-header.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { Column } from '@tanstack/react-table';\nimport {\n ArrowDownIcon,\n ArrowsDownUpIcon,\n ArrowUpIcon,\n EyeCrossedIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\nimport { Button } from '../button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu';\n\ninterface DataTableColumnHeaderProps<TData, TValue>\n extends React.HTMLAttributes<HTMLDivElement> {\n column: Column<TData, TValue>;\n title: string;\n}\n\nexport function DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>) {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center gap-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button\n variant=\"ghost\"\n // ui-react's ghost button has 0 horizontal padding, so add a small\n // padding for a comfortable click/hover target and negate it on the\n // left (-ml-2 px-2) so the label still sits flush at the cell's\n // padding edge — aligned with the body cells below.\n className=\"-ml-2 h-8 gap-2 px-2 data-[popup-open]:bg-accent\"\n />\n }\n >\n <span>{title}</span>\n {column.getIsSorted() === 'desc' ? (\n <ArrowDownIcon />\n ) : column.getIsSorted() === 'asc' ? (\n <ArrowUpIcon />\n ) : (\n <ArrowsDownUpIcon />\n )}\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem onClick={() => column.toggleSorting(false)}>\n <ArrowUpIcon className=\"text-muted-foreground\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => column.toggleSorting(true)}>\n <ArrowDownIcon className=\"text-muted-foreground\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={() => column.toggleVisibility(false)}>\n <EyeCrossedIcon className=\"text-muted-foreground\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n"],"names":["DataTableColumnHeader","column","title","className","jsx","cn","DropdownMenu","jsxs","DropdownMenuTrigger","Button","ArrowDownIcon","ArrowUpIcon","ArrowsDownUpIcon","DropdownMenuContent","DropdownMenuItem","DropdownMenuSeparator","EyeC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AA,EAAA,EAAA,CACF,EAAA,CACF,sBA3CQ,OAAA,EAAI,WAAWX,EAAGF,CAAS,GAAI,UAAAD,GAAM;AA6CjD;"}
@@ -0,0 +1,89 @@
1
+ import { jsxs as a, jsx as n } from "react/jsx-runtime";
2
+ import { ChevronFirstIcon as o, ChevronLeftIcon as l, ChevronRightIcon as s, ChevronLastIcon as c } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { InputSelect as d, InputSelectTrigger as g, InputSelectValue as m, InputSelectContent as p, InputSelectItem as h } from "../input-select/input-select.js";
4
+ import { ButtonIcon as i } from "../button-icon/button-icon.js";
5
+ function C({
6
+ table: e,
7
+ pageSizeOptions: r = [10, 20, 30, 40, 50]
8
+ }) {
9
+ return /* @__PURE__ */ a("div", { className: "flex items-center justify-between px-2", children: [
10
+ /* @__PURE__ */ a("div", { className: "flex-1 text-sm text-muted-foreground", children: [
11
+ e.getFilteredSelectedRowModel().rows.length,
12
+ " of",
13
+ " ",
14
+ e.getFilteredRowModel().rows.length,
15
+ " row(s) selected."
16
+ ] }),
17
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-6 lg:gap-8", children: [
18
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
19
+ /* @__PURE__ */ n("p", { className: "text-sm font-medium", children: "Rows per page" }),
20
+ /* @__PURE__ */ a(
21
+ d,
22
+ {
23
+ value: `${e.getState().pagination.pageSize}`,
24
+ onValueChange: (t) => e.setPageSize(Number(t)),
25
+ children: [
26
+ /* @__PURE__ */ n(g, { "aria-label": "Rows per page", className: "h-8 w-[70px]", children: /* @__PURE__ */ n(m, {}) }),
27
+ /* @__PURE__ */ n(p, { children: r.map((t) => /* @__PURE__ */ n(h, { value: `${t}`, children: t }, t)) })
28
+ ]
29
+ }
30
+ )
31
+ ] }),
32
+ /* @__PURE__ */ a("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
33
+ "Page ",
34
+ e.getState().pagination.pageIndex + 1,
35
+ " of",
36
+ " ",
37
+ e.getPageCount()
38
+ ] }),
39
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
40
+ /* @__PURE__ */ n(
41
+ i,
42
+ {
43
+ variant: "secondary",
44
+ "aria-label": "Go to first page",
45
+ className: "hidden lg:inline-flex",
46
+ onClick: () => e.setPageIndex(0),
47
+ disabled: !e.getCanPreviousPage(),
48
+ children: /* @__PURE__ */ n(o, {})
49
+ }
50
+ ),
51
+ /* @__PURE__ */ n(
52
+ i,
53
+ {
54
+ variant: "secondary",
55
+ "aria-label": "Go to previous page",
56
+ onClick: () => e.previousPage(),
57
+ disabled: !e.getCanPreviousPage(),
58
+ children: /* @__PURE__ */ n(l, {})
59
+ }
60
+ ),
61
+ /* @__PURE__ */ n(
62
+ i,
63
+ {
64
+ variant: "secondary",
65
+ "aria-label": "Go to next page",
66
+ onClick: () => e.nextPage(),
67
+ disabled: !e.getCanNextPage(),
68
+ children: /* @__PURE__ */ n(s, {})
69
+ }
70
+ ),
71
+ /* @__PURE__ */ n(
72
+ i,
73
+ {
74
+ variant: "secondary",
75
+ "aria-label": "Go to last page",
76
+ className: "hidden lg:inline-flex",
77
+ onClick: () => e.setPageIndex(e.getPageCount() - 1),
78
+ disabled: !e.getCanNextPage(),
79
+ children: /* @__PURE__ */ n(c, {})
80
+ }
81
+ )
82
+ ] })
83
+ ] })
84
+ ] });
85
+ }
86
+ export {
87
+ C as DataTablePagination
88
+ };
89
+ //# sourceMappingURL=data-table-pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-pagination.js","sources":["../../../../src/components/ui/data-table/data-table-pagination.tsx"],"sourcesContent":["import type { Table } from '@tanstack/react-table';\nimport {\n ChevronFirstIcon,\n ChevronLastIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { ButtonIcon } from '../button-icon';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../select';\n\ninterface DataTablePaginationProps<TData> {\n table: Table<TData>;\n /** Page-size options offered in the rows-per-page select. */\n pageSizeOptions?: number[];\n}\n\nexport function DataTablePagination<TData>({\n table,\n pageSizeOptions = [10, 20, 30, 40, 50],\n}: DataTablePaginationProps<TData>) {\n return (\n <div className=\"flex items-center justify-between px-2\">\n <div className=\"flex-1 text-sm text-muted-foreground\">\n {table.getFilteredSelectedRowModel().rows.length} of{' '}\n {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center gap-6 lg:gap-8\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={`${table.getState().pagination.pageSize}`}\n onValueChange={(value) => table.setPageSize(Number(value))}\n >\n <SelectTrigger aria-label=\"Rows per page\" className=\"h-8 w-[70px]\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {pageSizeOptions.map((pageSize) => (\n <SelectItem key={pageSize} value={`${pageSize}`}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-[100px] items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of{' '}\n {table.getPageCount()}\n </div>\n <div className=\"flex items-center gap-2\">\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to first page\"\n className=\"hidden lg:inline-flex\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n <ChevronFirstIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to previous page\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n <ChevronLeftIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to next page\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n <ChevronRightIcon />\n </ButtonIcon>\n <ButtonIcon\n variant=\"secondary\"\n aria-label=\"Go to last page\"\n className=\"hidden lg:inline-flex\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n <ChevronLastIcon />\n </ButtonIcon>\n </div>\n </div>\n </div>\n );\n}\n"],"names":["DataTablePagination","table","pageSizeOptions","jsxs","jsx","Select","value","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","ButtonIcon","ChevronFirstIcon","ChevronLeftIcon","ChevronRightIcon","ChevronLastIcon"],"mappings":";;;;AAuBO,SAASA,EAA2B;AAAA,EACzC,OAAAC;AAAA,EACA,iBAAAC,IAAkB,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE;AACvC,GAAoC;AAClC,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAU,0CACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,wCACZ,UAAA;AAAA,MAAAF,EAAM,8BAA8B,KAAK;AAAA,MAAO;AAAA,MAAI;AAAA,MACpDA,EAAM,sBAAsB,KAAK;AAAA,MAAO;AAAA,IAAA,GAC3C;AAAA,IACA,gBAAAE,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,MAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,QAAA,gBAAAC,EAAC,KAAA,EAAE,WAAU,uBAAsB,UAAA,iBAAa;AAAA,QAChD,gBAAAD;AAAA,UAACE;AAAAA,UAAA;AAAA,YACC,OAAO,GAAGJ,EAAM,SAAA,EAAW,WAAW,QAAQ;AAAA,YAC9C,eAAe,CAACK,MAAUL,EAAM,YAAY,OAAOK,CAAK,CAAC;AAAA,YAEzD,UAAA;AAAA,cAAA,gBAAAF,EAACG,KAAc,cAAW,iBAAgB,WAAU,gBAClD,UAAA,gBAAAH,EAACI,KAAY,EAAA,CACf;AAAA,cACA,gBAAAJ,EAACK,GAAA,EACE,UAAAP,EAAgB,IAAI,CAACQ,MACpB,gBAAAN,EAACO,GAAA,EAA0B,OAAO,GAAGD,CAAQ,IAC1C,UAAAA,EAAA,GADcA,CAEjB,CACD,EAA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A;AAAA,MACnB,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,46 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ import { TimesIcon as m } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { DataTableViewOptions as c } from "./data-table-view-options.js";
4
+ import { InputText as p } from "../input-text/input-text.js";
5
+ import { Button as u } from "../button/button.js";
6
+ function F({
7
+ table: e,
8
+ searchKey: t,
9
+ searchPlaceholder: n = "Filter…"
10
+ }) {
11
+ var i;
12
+ const s = e.getState().columnFilters.length > 0;
13
+ return /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
14
+ /* @__PURE__ */ l("div", { className: "flex flex-1 items-center gap-2", children: [
15
+ t && /* @__PURE__ */ r(
16
+ p,
17
+ {
18
+ placeholder: n,
19
+ value: ((i = e.getColumn(t)) == null ? void 0 : i.getFilterValue()) ?? "",
20
+ onChange: (a) => {
21
+ var o;
22
+ return (o = e.getColumn(t)) == null ? void 0 : o.setFilterValue(a.target.value);
23
+ },
24
+ className: "h-8 w-[150px] lg:w-[250px]"
25
+ }
26
+ ),
27
+ s && /* @__PURE__ */ l(
28
+ u,
29
+ {
30
+ variant: "ghost",
31
+ onClick: () => e.resetColumnFilters(),
32
+ className: "h-8 gap-2",
33
+ children: [
34
+ "Reset",
35
+ /* @__PURE__ */ r(m, {})
36
+ ]
37
+ }
38
+ )
39
+ ] }),
40
+ /* @__PURE__ */ r(c, { table: e })
41
+ ] });
42
+ }
43
+ export {
44
+ F as DataTableToolbar
45
+ };
46
+ //# sourceMappingURL=data-table-toolbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-toolbar.js","sources":["../../../../src/components/ui/data-table/data-table-toolbar.tsx"],"sourcesContent":["import type { Table } from '@tanstack/react-table';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { Button } from '../button';\nimport { InputText } from '../input-text';\nimport { DataTableViewOptions } from './data-table-view-options';\n\ninterface DataTableToolbarProps<TData> {\n table: Table<TData>;\n /** Column id to wire the search box to (client-side text filter). */\n searchKey?: string;\n searchPlaceholder?: string;\n}\n\nexport function DataTableToolbar<TData>({\n table,\n searchKey,\n searchPlaceholder = 'Filter…',\n}: DataTableToolbarProps<TData>) {\n const isFiltered = table.getState().columnFilters.length > 0;\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex flex-1 items-center gap-2\">\n {searchKey && (\n <InputText\n placeholder={searchPlaceholder}\n value={\n (table.getColumn(searchKey)?.getFilterValue() as string) ?? ''\n }\n onChange={(event) =>\n table.getColumn(searchKey)?.setFilterValue(event.target.value)\n }\n className=\"h-8 w-[150px] lg:w-[250px]\"\n />\n )}\n {isFiltered && (\n <Button\n variant=\"ghost\"\n onClick={() => table.resetColumnFilters()}\n className=\"h-8 gap-2\"\n >\n Reset\n <TimesIcon />\n </Button>\n )}\n </div>\n <DataTableViewOptions table={table} />\n </div>\n );\n}\n"],"names":["DataTableToolbar","table","searchKey","searchPlaceholder","isFiltered","jsxs","jsx","InputText","_a","event","Button","TimesIcon","DataTableViewOptions"],"mappings":";;;;;AAcO,SAASA,EAAwB;AAAA,EACtC,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAAiC;;AAC/B,QAAMC,IAAaH,EAAM,SAAA,EAAW,cAAc,SAAS;AAE3D,SACE,gBAAAI,EAAC,OAAA,EAAI,WAAU,qCACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,kCACZ,UAAA;AAAA,MAAAH,KACC,gBAAAI;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,aAAaJ;AAAA,UACb,SACGK,IAAAP,EAAM,UAAUC,CAAS,MAAzB,gBAAAM,EAA4B,qBAA+B;AAAA,UAE9D,UAAU,CAACC,MAAA;;AACT,oBAAAD,IAAAP,EAAM,UAAUC,CAAS,MAAzB,gBAAAM,EAA4B,eAAeC,EAAM,OAAO;AAAA;AAAA,UAE1D,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAGbL,KACC,gBAAAC;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAMT,EAAM,mBAAA;AAAA,UACrB,WAAU;AAAA,UACX,UAAA;AAAA,YAAA;AAAA,8BAEEU,GAAA,CAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACb,GAEJ;AAAA,IACA,gBAAAL,EAACM,KAAqB,OAAAX,EAAA,CAAc;AAAA,EAAA,GACtC;AAEJ;"}
@@ -0,0 +1,40 @@
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import { CogIcon as t } from "@acronis-platform/icons-react/stroke-mono";
3
+ import { DropdownMenu as a, DropdownMenuTrigger as d, DropdownMenuContent as l, DropdownMenuLabel as p, DropdownMenuSeparator as s, DropdownMenuCheckboxItem as c } from "../dropdown-menu/dropdown-menu.js";
4
+ import { Button as g } from "../button/button.js";
5
+ function w({
6
+ table: r
7
+ }) {
8
+ return /* @__PURE__ */ o(a, { children: [
9
+ /* @__PURE__ */ o(
10
+ d,
11
+ {
12
+ render: /* @__PURE__ */ n(g, { variant: "secondary", className: "ml-auto hidden h-8 gap-2 lg:flex" }),
13
+ children: [
14
+ /* @__PURE__ */ n(t, {}),
15
+ "View"
16
+ ]
17
+ }
18
+ ),
19
+ /* @__PURE__ */ o(l, { align: "end", className: "w-[150px]", children: [
20
+ /* @__PURE__ */ n(p, { children: "Toggle columns" }),
21
+ /* @__PURE__ */ n(s, {}),
22
+ r.getAllColumns().filter(
23
+ (e) => typeof e.accessorFn < "u" && e.getCanHide()
24
+ ).map((e) => /* @__PURE__ */ n(
25
+ c,
26
+ {
27
+ className: "capitalize",
28
+ checked: e.getIsVisible(),
29
+ onCheckedChange: (i) => e.toggleVisibility(!!i),
30
+ children: e.id
31
+ },
32
+ e.id
33
+ ))
34
+ ] })
35
+ ] });
36
+ }
37
+ export {
38
+ w as DataTableViewOptions
39
+ };
40
+ //# sourceMappingURL=data-table-view-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-view-options.js","sources":["../../../../src/components/ui/data-table/data-table-view-options.tsx"],"sourcesContent":["import type { Table } from '@tanstack/react-table';\nimport { CogIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { Button } from '../button';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu';\n\ninterface DataTableViewOptionsProps<TData> {\n table: Table<TData>;\n}\n\nexport function DataTableViewOptions<TData>({\n table,\n}: DataTableViewOptionsProps<TData>) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button variant=\"secondary\" className=\"ml-auto hidden h-8 gap-2 lg:flex\" />\n }\n >\n <CogIcon />\n View\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter(\n (column) =>\n typeof column.accessorFn !== 'undefined' && column.getCanHide()\n )\n .map((column) => (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"names":["DataTableViewOptions","table","DropdownMenu","jsxs","DropdownMenuTrigger","jsx","Button","CogIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value"],"mappings":";;;;AAiBO,SAASA,EAA4B;AAAA,EAC1C,OAAAC;AACF,GAAqC;AACnC,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QACE,gBAAAC,EAACC,GAAA,EAAO,SAAQ,aAAY,WAAU,oCAAmC;AAAA,QAG3E,UAAA;AAAA,UAAA,gBAAAD,EAACE,GAAA,EAAQ;AAAA,UAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAGb,gBAAAJ,EAACK,GAAA,EAAoB,OAAM,OAAM,WAAU,aACzC,UAAA;AAAA,MAAA,gBAAAH,EAACI,KAAkB,UAAA,iBAAA,CAAc;AAAA,wBAChCC,GAAA,EAAsB;AAAA,MACtBT,EACE,gBACA;AAAA,QACC,CAACU,MACC,OAAOA,EAAO,aAAe,OAAeA,EAAO,WAAA;AAAA,MAAW,EAEjE,IAAI,CAACA,MACJ,gBAAAN;AAAA,QAACO;AAAA,QAAA;AAAA,UAEC,WAAU;AAAA,UACV,SAASD,EAAO,aAAA;AAAA,UAChB,iBAAiB,CAACE,MAAUF,EAAO,iBAAiB,CAAC,CAACE,CAAK;AAAA,UAE1D,UAAAF,EAAO;AAAA,QAAA;AAAA,QALHA,EAAO;AAAA,MAAA,CAOf;AAAA,IAAA,EAAA,CACL;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,89 @@
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as t, Fragment as H } from "react";
3
+ import { useReactTable as P, flexRender as h } from "../../../node_modules/.pnpm/@tanstack_react-table@8.21.3_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-table/build/lib/index.js";
4
+ import { cn as p } from "../../../lib/utils.js";
5
+ import { Table as j, TableHeader as A, TableRow as a, TableHead as B, TableBody as L, TableCell as d } from "../table/table.js";
6
+ import { getFilteredRowModel as $, getSortedRowModel as q, getPaginationRowModel as z, getExpandedRowModel as G, getCoreRowModel as J } from "../../../node_modules/.pnpm/@tanstack_table-core@8.21.3/node_modules/@tanstack/table-core/build/lib/index.js";
7
+ function Z({
8
+ columns: b,
9
+ data: C,
10
+ getRowCanExpand: f,
11
+ renderExpandedRow: g,
12
+ striped: v = !1,
13
+ bordered: R = !1,
14
+ highlightCurrentRow: i = !1,
15
+ skeleton: x = !1,
16
+ skeletonRows: S = 5
17
+ }) {
18
+ const [M, w] = t([]), [y, N] = t([]), [T, F] = t({}), [V, _] = t({}), [k, E] = t({}), [I, D] = t(), s = P({
19
+ data: C,
20
+ columns: b,
21
+ getCoreRowModel: J(),
22
+ getExpandedRowModel: G(),
23
+ getPaginationRowModel: z(),
24
+ getRowCanExpand: f,
25
+ onExpandedChange: E,
26
+ onSortingChange: w,
27
+ getSortedRowModel: q(),
28
+ onColumnFiltersChange: N,
29
+ getFilteredRowModel: $(),
30
+ onColumnVisibilityChange: F,
31
+ onRowSelectionChange: _,
32
+ state: { sorting: M, columnFilters: y, columnVisibility: T, rowSelection: V, expanded: k }
33
+ }), n = s.getRowModel().rows;
34
+ return /* @__PURE__ */ e(
35
+ "div",
36
+ {
37
+ className: p(
38
+ "rounded-md border border-[var(--ui-table-global-cell-border-color)]",
39
+ R ? "[&_th:not(:last-child)]:border-r [&_td:not(:last-child)]:border-r [&_th]:border-[var(--ui-table-global-cell-border-color)] [&_td]:border-[var(--ui-table-global-cell-border-color)]" : void 0
40
+ ),
41
+ children: /* @__PURE__ */ u(j, { children: [
42
+ /* @__PURE__ */ e(A, { children: s.getHeaderGroups().map((l) => /* @__PURE__ */ e(a, { children: l.headers.map((o) => /* @__PURE__ */ e(B, { children: o.isPlaceholder ? null : h(
43
+ o.column.columnDef.header,
44
+ o.getContext()
45
+ ) }, o.id)) }, l.id)) }),
46
+ /* @__PURE__ */ e(L, { children: x ? Array.from({ length: S }).map((l, o) => /* @__PURE__ */ e(a, { className: "hover:bg-transparent", children: s.getVisibleLeafColumns().map((r) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e("div", { className: "h-4 w-full animate-pulse rounded bg-[var(--ui-background-surface-secondary)]" }) }, r.id)) }, `skeleton-${o}`)) : n != null && n.length ? n.map((l, o) => {
47
+ const r = l.getIsSelected(), m = i && I === l.id;
48
+ return /* @__PURE__ */ u(H, { children: [
49
+ /* @__PURE__ */ e(
50
+ a,
51
+ {
52
+ selected: r,
53
+ onClick: i ? () => D(l.id) : void 0,
54
+ className: p(
55
+ i && "cursor-pointer",
56
+ v && o % 2 === 1 && !r && !m && "bg-[var(--ui-background-surface-secondary)]",
57
+ m && !r && "bg-[var(--ui-table-global-row-color-active)]"
58
+ ),
59
+ children: l.getVisibleCells().map((c) => /* @__PURE__ */ e(d, { children: h(
60
+ c.column.columnDef.cell,
61
+ c.getContext()
62
+ ) }, c.id))
63
+ }
64
+ ),
65
+ g && l.getIsExpanded() && /* @__PURE__ */ e(a, { className: "hover:bg-transparent", children: /* @__PURE__ */ e(
66
+ d,
67
+ {
68
+ className: "h-auto py-3",
69
+ colSpan: l.getVisibleCells().length,
70
+ children: g(l)
71
+ }
72
+ ) })
73
+ ] }, l.id);
74
+ }) : /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
75
+ d,
76
+ {
77
+ colSpan: b.length,
78
+ className: "h-24 text-center text-[var(--ui-table-data-value-color-disabled)]",
79
+ children: "No results."
80
+ }
81
+ ) }) })
82
+ ] })
83
+ }
84
+ );
85
+ }
86
+ export {
87
+ Z as DataTable
88
+ };
89
+ //# sourceMappingURL=data-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.js","sources":["../../../../src/components/ui/data-table/data-table.tsx"],"sourcesContent":["import { Fragment, type ReactNode, useState } from 'react';\nimport {\n type ColumnDef,\n type ColumnFiltersState,\n type ExpandedState,\n type Row,\n type SortingState,\n type VisibilityState,\n flexRender,\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nimport { cn } from '@/lib/utils';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '../table';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `data-table`\n// (packages/ui-legacy/src/components/ui/data-table/). A TanStack-react-table v8\n// data grid composed over the ui-react Table primitives — sorting, filtering,\n// column visibility, row selection, pagination, and optional row expansion. The\n// presentational flags (`striped`, `bordered`, `skeleton`, `highlightCurrentRow`)\n// are borrowed from the Vue `AvTable`; behavioral features come from TanStack.\n// Pair with DataTableToolbar / DataTablePagination / DataTableColumnHeader, which\n// take the `table` instance returned to column cells via TanStack context.\n// The grid cells/rows/headers are themed by the Table primitives' `--ui-table-*`\n// tier; DataTable's own chrome reuses that tier too — the wrapper border matches\n// the cell borders (`--ui-table-global-cell-border-color`), the empty-state uses\n// the muted table-value color, the current row the active-row color, and stripes\n// the secondary surface.\n\nexport interface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[];\n data: TData[];\n /** Enables row expansion for rows that return true. Pair with `renderExpandedRow`. */\n getRowCanExpand?: (row: Row<TData>) => boolean;\n /**\n * Renders expanded content for an expanded row. Used together with\n * `getRowCanExpand`.\n */\n renderExpandedRow?: (row: Row<TData>) => ReactNode;\n /** Alternating row backgrounds. */\n striped?: boolean;\n /** Vertical borders between columns (rows already have horizontal borders). */\n bordered?: boolean;\n /** Highlight the row the user last clicked (the \"current\" row). */\n highlightCurrentRow?: boolean;\n /** Render placeholder skeleton rows instead of data (loading state). */\n skeleton?: boolean;\n /** Number of skeleton rows to render when `skeleton` is set. */\n skeletonRows?: number;\n}\n\nexport function DataTable<TData, TValue>({\n columns,\n data,\n getRowCanExpand,\n renderExpandedRow,\n striped = false,\n bordered = false,\n highlightCurrentRow = false,\n skeleton = false,\n skeletonRows = 5,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = useState<SortingState>([]);\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({});\n const [rowSelection, setRowSelection] = useState({});\n const [expanded, setExpanded] = useState<ExpandedState>({});\n const [currentRowId, setCurrentRowId] = useState<string>();\n\n const table = useReactTable({\n data,\n columns,\n getCoreRowModel: getCoreRowModel(),\n getExpandedRowModel: getExpandedRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getRowCanExpand,\n onExpandedChange: setExpanded,\n onSortingChange: setSorting,\n getSortedRowModel: getSortedRowModel(),\n onColumnFiltersChange: setColumnFilters,\n getFilteredRowModel: getFilteredRowModel(),\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n state: { sorting, columnFilters, columnVisibility, rowSelection, expanded },\n });\n\n const rows = table.getRowModel().rows;\n // Vertical borders are opt-in; a trailing border on the last cell would\n // double up with the wrapper, so suppress it.\n const borderedClass = bordered\n ? '[&_th:not(:last-child)]:border-r [&_td:not(:last-child)]:border-r [&_th]:border-[var(--ui-table-global-cell-border-color)] [&_td]:border-[var(--ui-table-global-cell-border-color)]'\n : undefined;\n\n return (\n <div\n className={cn(\n 'rounded-md border border-[var(--ui-table-global-cell-border-color)]',\n borderedClass\n )}\n >\n <Table>\n <TableHeader>\n {table.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHead key={header.id}>\n {header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext()\n )}\n </TableHead>\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>\n {skeleton ? (\n Array.from({ length: skeletonRows }).map((_, rowIndex) => (\n <TableRow key={`skeleton-${rowIndex}`} className=\"hover:bg-transparent\">\n {table.getVisibleLeafColumns().map((column) => (\n <TableCell key={column.id}>\n <div className=\"h-4 w-full animate-pulse rounded bg-[var(--ui-background-surface-secondary)]\" />\n </TableCell>\n ))}\n </TableRow>\n ))\n ) : rows?.length ? (\n rows.map((row, rowIndex) => {\n const isSelected = row.getIsSelected();\n const isCurrent = highlightCurrentRow && currentRowId === row.id;\n return (\n <Fragment key={row.id}>\n <TableRow\n selected={isSelected}\n onClick={\n highlightCurrentRow\n ? () => setCurrentRowId(row.id)\n : undefined\n }\n className={cn(\n highlightCurrentRow && 'cursor-pointer',\n striped &&\n rowIndex % 2 === 1 &&\n !isSelected &&\n !isCurrent &&\n 'bg-[var(--ui-background-surface-secondary)]',\n isCurrent &&\n !isSelected &&\n 'bg-[var(--ui-table-global-row-color-active)]'\n )}\n >\n {row.getVisibleCells().map((cell) => (\n <TableCell key={cell.id}>\n {flexRender(\n cell.column.columnDef.cell,\n cell.getContext()\n )}\n </TableCell>\n ))}\n </TableRow>\n {renderExpandedRow && row.getIsExpanded() && (\n <TableRow className=\"hover:bg-transparent\">\n <TableCell\n className=\"h-auto py-3\"\n colSpan={row.getVisibleCells().length}\n >\n {renderExpandedRow(row)}\n </TableCell>\n </TableRow>\n )}\n </Fragment>\n );\n })\n ) : (\n <TableRow>\n <TableCell\n colSpan={columns.length}\n className=\"h-24 text-center text-[var(--ui-table-data-value-color-disabled)]\"\n >\n No results.\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n );\n}\n"],"names":["DataTable","columns","data","getRowCanExpand","renderExpandedRow","striped","bordered","highlightCurrentRow","skeleton","skeletonRows","sorting","setSorting","useState","columnFilters","setColumnFilters","columnVisibility","setColumnVisibility","rowSelection","setRowSelection","expanded","setExpanded","currentRowId","setCurrentRowId","table","useReactTable","getCoreRowModel","getExpandedRowModel","getPaginationRowModel","getSortedRowModel","getFilteredRowModel","rows","jsx","cn","Table","TableHeader","headerGroup","TableRow","header","TableHead","flexRender","TableBody","_","rowIndex","column","TableCell","row","isSelected","isCurrent","Fragment","cell"],"mappings":";;;;;;AA+DO,SAASA,EAAyB;AAAA,EACvC,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,qBAAAC,IAAsB;AAAA,EACtB,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AACjB,GAAkC;AAChC,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAuB,CAAA,CAAE,GAC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AAA,gBAAAL;AAAA,UAACa;AAAA,UAAA;AAAA,YACC,SAAS3C,EAAQ;AAAA,YACjB,WAAU;AAAA,YACX,UAAA;AAAA,UAAA;AAAA,QAAA,GAGH,EAAA,CAEJ;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,140 @@
1
+ import { jsx as t, jsxs as n, Fragment as u } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import { Dialog as r } from "@base-ui/react/dialog";
4
+ import { TimesIcon as x } from "@acronis-platform/icons-react/stroke-mono";
5
+ import { cva as D } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
6
+ import { cn as l } from "../../../lib/utils.js";
7
+ const y = D(
8
+ "fixed left-1/2 top-1/2 z-50 flex w-full -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg bg-muted text-foreground shadow-lg duration-200 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95 data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95",
9
+ {
10
+ variants: {
11
+ size: {
12
+ xs: "max-w-[464px]",
13
+ sm: "max-w-lg",
14
+ md: "max-w-2xl",
15
+ lg: "max-w-[832px]",
16
+ xl: "max-w-[992px]",
17
+ "2xl": "max-w-[1136px]"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ size: "sm"
22
+ }
23
+ }
24
+ ), j = r.Root, F = r.Trigger, H = r.Portal, O = r.Close, d = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t(
25
+ r.Backdrop,
26
+ {
27
+ ref: e,
28
+ className: l(
29
+ "fixed inset-0 z-50 bg-[var(--ui-background-overlay-primary)] duration-200 data-[open]:animate-in data-[open]:fade-in-0 data-[closed]:animate-out data-[closed]:fade-out-0",
30
+ o
31
+ ),
32
+ ...a
33
+ }
34
+ ));
35
+ d.displayName = "DialogOverlay";
36
+ const b = i.forwardRef(
37
+ ({
38
+ className: o,
39
+ children: a,
40
+ size: e,
41
+ portal: m = !0,
42
+ portalContainer: c,
43
+ keepMounted: f,
44
+ ...g
45
+ }, p) => {
46
+ const s = /* @__PURE__ */ n(u, { children: [
47
+ /* @__PURE__ */ t(d, {}),
48
+ /* @__PURE__ */ t(
49
+ r.Popup,
50
+ {
51
+ ref: p,
52
+ className: l(y({ size: e }), o),
53
+ ...g,
54
+ children: a
55
+ }
56
+ )
57
+ ] });
58
+ return m ? /* @__PURE__ */ t(r.Portal, { container: c, keepMounted: f, children: s }) : s;
59
+ }
60
+ );
61
+ b.displayName = "DialogContent";
62
+ const w = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t(
63
+ "div",
64
+ {
65
+ ref: e,
66
+ className: l(
67
+ "flex h-16 items-center gap-4 border-b border-border bg-background px-5 py-4",
68
+ o
69
+ ),
70
+ ...a
71
+ }
72
+ ));
73
+ w.displayName = "DialogHeader";
74
+ const v = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t(
75
+ "div",
76
+ {
77
+ ref: e,
78
+ className: l(
79
+ "flex h-16 items-center justify-end gap-4 border-t border-border bg-background px-6 py-4",
80
+ o
81
+ ),
82
+ ...a
83
+ }
84
+ ));
85
+ v.displayName = "DialogFooter";
86
+ const N = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t("div", { ref: e, className: l("flex-1 overflow-auto p-6", o), ...a }));
87
+ N.displayName = "DialogBody";
88
+ const R = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t(
89
+ r.Title,
90
+ {
91
+ ref: e,
92
+ className: l(
93
+ "flex-1 text-2xl font-normal leading-8 text-foreground",
94
+ o
95
+ ),
96
+ ...a
97
+ }
98
+ ));
99
+ R.displayName = "DialogTitle";
100
+ const h = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ t(
101
+ r.Description,
102
+ {
103
+ ref: e,
104
+ className: l("text-sm text-muted-foreground", o),
105
+ ...a
106
+ }
107
+ ));
108
+ h.displayName = "DialogDescription";
109
+ const C = i.forwardRef(({ className: o, ...a }, e) => /* @__PURE__ */ n(
110
+ r.Close,
111
+ {
112
+ ref: e,
113
+ className: l(
114
+ "rounded p-1 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] disabled:pointer-events-none",
115
+ o
116
+ ),
117
+ ...a,
118
+ children: [
119
+ /* @__PURE__ */ t(x, { size: 24 }),
120
+ /* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
121
+ ]
122
+ }
123
+ ));
124
+ C.displayName = "DialogCloseButton";
125
+ export {
126
+ j as Dialog,
127
+ N as DialogBody,
128
+ O as DialogClose,
129
+ C as DialogCloseButton,
130
+ b as DialogContent,
131
+ h as DialogDescription,
132
+ v as DialogFooter,
133
+ w as DialogHeader,
134
+ d as DialogOverlay,
135
+ H as DialogPortal,
136
+ R as DialogTitle,
137
+ F as DialogTrigger,
138
+ y as dialogContentVariants
139
+ };
140
+ //# sourceMappingURL=dialog.js.map