@yuno-payments/dashboard-design-system 2.3.4 → 2.3.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.
Files changed (54) hide show
  1. package/dist/components/atoms/checkbox/checkbox.js +16 -16
  2. package/dist/components/atoms/filter/filter-date-range.d.ts +1 -31
  3. package/dist/components/atoms/filter/filter-date-range.js +144 -140
  4. package/dist/components/atoms/filter/filter-multi-input.d.ts +0 -11
  5. package/dist/components/atoms/filter/filter-multi-input.js +36 -42
  6. package/dist/components/atoms/filter/filter.d.ts +0 -30
  7. package/dist/components/atoms/filter/filter.js +171 -191
  8. package/dist/components/atoms/filter/index.d.ts +2 -2
  9. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -17
  10. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +151 -160
  11. package/dist/components/atoms/icon/icon.d.ts +0 -6
  12. package/dist/components/atoms/icon/icon.js +21 -27
  13. package/dist/components/atoms/icon/index.d.ts +0 -1
  14. package/dist/components/atoms/index.d.ts +1 -1
  15. package/dist/components/atoms/radio-group/radio-group-option.js +2 -2
  16. package/dist/components/atoms/select/select.js +2 -2
  17. package/dist/components/molecules/dialog-header/dialog-header.d.ts +1 -1
  18. package/dist/components/molecules/pagination/index.d.ts +0 -1
  19. package/dist/components/molecules/pagination/page-numbers.d.ts +1 -3
  20. package/dist/components/molecules/pagination/page-numbers.js +9 -10
  21. package/dist/components/molecules/pagination/pagination.d.ts +0 -9
  22. package/dist/components/molecules/pagination/pagination.js +38 -46
  23. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.d.ts +1 -3
  24. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +27 -28
  25. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +41 -44
  26. package/dist/components/organisms/data-table/components/data-table-header.js +12 -11
  27. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.d.ts +1 -3
  28. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.js +44 -45
  29. package/dist/components/organisms/data-table/data-table.d.ts +2 -27
  30. package/dist/components/organisms/data-table/data-table.js +134 -146
  31. package/dist/components/organisms/data-table/data-table.types.d.ts +0 -68
  32. package/dist/components/organisms/data-table/index.d.ts +1 -2
  33. package/dist/components/organisms/data-table/utils/data-table-utils.js +8 -11
  34. package/dist/dashboard-design-system.css +1 -1
  35. package/dist/index.css +1 -1
  36. package/dist/index.d.ts +1 -2
  37. package/dist/index.esm.min.js +8512 -9394
  38. package/dist/index.js +202 -208
  39. package/dist/index.umd.min.js +25 -25
  40. package/dist/lib/utils.d.ts +0 -13
  41. package/dist/lib/utils.js +10 -34
  42. package/dist/vendor/shadcn/pagination.d.ts +3 -19
  43. package/dist/vendor/shadcn/pagination.js +37 -41
  44. package/dist/vendor/shadcn/select.js +33 -33
  45. package/dist/vendor/shadcn/switch.js +1 -1
  46. package/package.json +2 -4
  47. package/registry/components-registry.json +12 -38
  48. package/dist/components/atoms/filter/filter-translations.d.ts +0 -75
  49. package/dist/components/atoms/filter/filter-translations.js +0 -450
  50. package/dist/components/atoms/icon/directional-icons.d.ts +0 -12
  51. package/dist/components/atoms/icon/directional-icons.js +0 -38
  52. package/dist/components/molecules/pagination/pagination-translations.d.ts +0 -33
  53. package/dist/components/molecules/pagination/pagination-translations.js +0 -82
  54. package/dist/components/organisms/data-table/data-table.types.js +0 -252
@@ -1,11 +1,10 @@
1
- import { j as t } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as d } from "react";
3
- import { cva as z } from "../../../node_modules/class-variance-authority/dist/index.js";
4
- import { cn as I } from "../../../lib/utils.js";
5
- import { IconList as h } from "./icon-list.js";
6
- import { Tooltip as j } from "../tooltip/tooltip.js";
7
- import { DIRECTIONAL_ICONS as C } from "./directional-icons.js";
8
- const N = z("inline-flex items-center justify-center shrink-0", {
1
+ import { j as s } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as p } from "react";
3
+ import { cva as u } from "../../../node_modules/class-variance-authority/dist/index.js";
4
+ import { cn as x } from "../../../lib/utils.js";
5
+ import { IconList as z } from "./icon-list.js";
6
+ import { Tooltip as d } from "../tooltip/tooltip.js";
7
+ const j = u("inline-flex items-center justify-center shrink-0", {
9
8
  variants: {
10
9
  size: {
11
10
  xs: "size-3",
@@ -18,39 +17,34 @@ const N = z("inline-flex items-center justify-center shrink-0", {
18
17
  defaultVariants: {
19
18
  size: "md"
20
19
  }
21
- }), g = d(
20
+ }), g = p(
22
21
  ({
23
22
  name: r,
24
- weight: n = "light",
23
+ weight: t = "light",
25
24
  size: e,
26
25
  className: c,
27
26
  color: l,
28
- tooltip: o,
27
+ tooltip: i,
29
28
  tooltipProps: m,
30
- autoMirrorRtl: a,
31
- ...f
32
- }, u) => {
29
+ ...a
30
+ }, f) => {
33
31
  if (!r)
34
32
  return null;
35
- const i = h?.[r];
36
- if (!i)
33
+ const o = z?.[r];
34
+ if (!o)
37
35
  return console.error("Missing icon", r), null;
38
- const p = C.has(r), x = a ?? p, s = /* @__PURE__ */ t.jsx(
39
- i,
36
+ const n = /* @__PURE__ */ s.jsx(
37
+ o,
40
38
  {
41
- ref: u,
39
+ ref: f,
42
40
  "aria-label": r,
43
- className: I(
44
- N({ size: e }),
45
- x && "rtl:scale-x-[-1]",
46
- c
47
- ),
41
+ className: x(j({ size: e }), c),
48
42
  color: l || "currentColor",
49
- weight: n,
50
- ...f
43
+ weight: t,
44
+ ...a
51
45
  }
52
46
  );
53
- return o ? /* @__PURE__ */ t.jsx(j, { content: o, ...m, children: s }) : s;
47
+ return i ? /* @__PURE__ */ s.jsx(d, { content: i, ...m, children: n }) : n;
54
48
  }
55
49
  );
56
50
  g.displayName = "Icon";
@@ -1,3 +1,2 @@
1
1
  export { Icon, type IconProps } from './icon';
2
2
  export { IconList, type IconName } from './icon-list';
3
- export { DIRECTIONAL_ICONS } from './directional-icons';
@@ -10,7 +10,7 @@ export { CurrencyField, type CurrencyFieldProps } from './currency-field';
10
10
  export { DatePicker, type DatePickerProps } from './date-picker';
11
11
  export { DateRangePicker, type DateRangePickerProps, } from './date-range-picker';
12
12
  export { TimePicker, type TimePickerProps } from './time-picker';
13
- export { FilterButton, FilterTag, FilterSection, FilterCheckboxOption, FilterRadioOption, FilterContent, FilterDateRange, FilterDateRangeOption, FilterDateRangeValue, FilterMultiInput, type FilterButtonProps, type FilterTagProps, type FilterSectionProps, type FilterCheckboxOptionProps, type FilterRadioOptionProps, type FilterContentProps, type FilterDateRangeProps, type FilterDateRangeOptionProps, type FilterDateRangeLabels, type FilterMultiInputProps, } from './filter';
13
+ export { FilterButton, FilterTag, FilterSection, FilterCheckboxOption, FilterRadioOption, FilterContent, FilterDateRange, FilterDateRangeOption, FilterDateRangeValue, FilterMultiInput, type FilterButtonProps, type FilterTagProps, type FilterSectionProps, type FilterCheckboxOptionProps, type FilterRadioOptionProps, type FilterContentProps, type FilterDateRangeProps, type FilterDateRangeOptionProps, type FilterMultiInputProps, } from './filter';
14
14
  export { FilterDropdown, FilterMenu, FilterMenuItem, type FilterDropdownProps, type FilterConfig, type FilterMenuProps, type FilterMenuItemProps, type FilterDeferredContext, } from './filter-dropdown';
15
15
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, type DropdownMenuProps, type DropdownMenuPortalProps, type DropdownMenuTriggerProps, type DropdownMenuContentProps, type DropdownMenuGroupProps, type DropdownMenuLabelProps, type DropdownMenuItemProps, type DropdownMenuCheckboxItemProps, type DropdownMenuRadioGroupProps, type DropdownMenuRadioItemProps, type DropdownMenuSeparatorProps, type DropdownMenuShortcutProps, type DropdownMenuSubProps, type DropdownMenuSubTriggerProps, type DropdownMenuSubContentProps, } from './dropdown-menu';
16
16
  export { DotsMenu, type DotsMenuProps, type DotsMenuAction, type DotsMenuOptions, } from './dots-menu';
@@ -9,7 +9,7 @@ const o = ({
9
9
  }) => /* @__PURE__ */ r.jsxs(
10
10
  "div",
11
11
  {
12
- className: t ? "flex items-center gap-3 rtl:flex-row-reverse" : "flex items-start gap-3 rtl:flex-row-reverse",
12
+ className: t ? "flex items-center gap-3" : "flex items-start gap-3",
13
13
  children: [
14
14
  /* @__PURE__ */ r.jsx(
15
15
  d,
@@ -32,7 +32,7 @@ const o = ({
32
32
  children: e.label
33
33
  }
34
34
  ),
35
- e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ms-auto", children: e.description })
35
+ e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ml-auto", children: e.description })
36
36
  ] }) : /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1.5 flex-1", children: [
37
37
  /* @__PURE__ */ r.jsx(
38
38
  a,
@@ -72,14 +72,14 @@ const $ = G.forwardRef(
72
72
  j.map((l, C) => /* @__PURE__ */ e.jsxs(V, { children: [
73
73
  l.label && /* @__PURE__ */ e.jsx(E, { children: l.label }),
74
74
  l.options.map((s) => /* @__PURE__ */ e.jsxs(f, { value: s.value, children: [
75
- s.icon && /* @__PURE__ */ e.jsx("span", { className: "me-2 inline-flex items-center", children: s.icon }),
75
+ s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
76
76
  s.label
77
77
  ] }, s.value))
78
78
  ] }, C))
79
79
  ) : w ? (
80
80
  // Render flat options
81
81
  h.map((l) => /* @__PURE__ */ e.jsx(f, { value: l.value, children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
82
- l.icon && /* @__PURE__ */ e.jsx("span", { className: "me-2 inline-flex items-center", children: l.icon }),
82
+ l.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: l.icon }),
83
83
  l.label
84
84
  ] }) }, l.value))
85
85
  ) : null })
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  /**
3
3
  * Props for the DialogHeader component
4
4
  */
5
- export interface DialogHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
5
+ export interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
6
6
  /**
7
7
  * Dialog title (text or custom element)
8
8
  */
@@ -1,3 +1,2 @@
1
1
  export { Pagination, type PaginationProps } from './pagination';
2
- export { getPaginationTranslations, type PaginationLanguage, type PaginationTranslations, } from './pagination-translations';
3
2
  export { Pagination as PaginationRoot, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from '../../../vendor/shadcn/pagination';
@@ -3,8 +3,6 @@ interface PageNumbersProps {
3
3
  totalPages?: number;
4
4
  maxVisiblePages: number;
5
5
  onPageClick?: (page: number) => void;
6
- /** Screen reader label for ellipsis (default: "More pages") */
7
- morePagesLabel?: string;
8
6
  }
9
- declare const PageNumbers: ({ currentPage, totalPages, maxVisiblePages, onPageClick, morePagesLabel, }: PageNumbersProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const PageNumbers: ({ currentPage, totalPages, maxVisiblePages, onPageClick, }: PageNumbersProps) => import("react/jsx-runtime").JSX.Element;
10
8
  export { PageNumbers, type PageNumbersProps };
@@ -1,24 +1,23 @@
1
1
  import { j as i } from "../../../_virtual/jsx-runtime.js";
2
2
  import { PaginationItem as e, PaginationLink as t, PaginationEllipsis as h } from "../../../vendor/shadcn/pagination.js";
3
- import { calculateVisiblePages as d } from "./page-numbers.utils.js";
4
- const b = ({
3
+ import { calculateVisiblePages as a } from "./page-numbers.utils.js";
4
+ const u = ({
5
5
  currentPage: n,
6
6
  totalPages: l,
7
7
  maxVisiblePages: o,
8
- onPageClick: c,
9
- morePagesLabel: m
8
+ onPageClick: c
10
9
  }) => {
11
10
  if (!l)
12
11
  return /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(t, { isActive: !0, children: n }) });
13
- const x = (s, r) => {
12
+ const m = (s, r) => {
14
13
  s.preventDefault(), r !== n && c?.(r);
15
- }, j = d(n, l, o);
16
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: j.map(
17
- (s, r) => s === "ellipsis" ? /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(h, { srLabel: m }) }, `ellipsis-${r}`) : /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(
14
+ }, x = a(n, l, o);
15
+ return /* @__PURE__ */ i.jsx(i.Fragment, { children: x.map(
16
+ (s, r) => s === "ellipsis" ? /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(h, {}) }, `ellipsis-${r}`) : /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(
18
17
  t,
19
18
  {
20
19
  href: "#",
21
- onClick: (a) => x(a, s),
20
+ onClick: (j) => m(j, s),
22
21
  isActive: s === n,
23
22
  children: s
24
23
  }
@@ -26,5 +25,5 @@ const b = ({
26
25
  ) });
27
26
  };
28
27
  export {
29
- b as PageNumbers
28
+ u as PageNumbers
30
29
  };
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from 'react';
2
- import { PaginationLanguage, PaginationTranslations } from './pagination-translations';
3
2
  /**
4
3
  * Props for the Pagination component
5
4
  */
@@ -44,14 +43,6 @@ interface PaginationProps extends ComponentProps<"nav"> {
44
43
  * @default 5
45
44
  */
46
45
  maxVisiblePages?: number;
47
- /**
48
- * Language for translations. Falls back to localStorage "yuno-lang", then "en".
49
- */
50
- lang?: PaginationLanguage;
51
- /**
52
- * Custom translations to override default language strings
53
- */
54
- translations?: Partial<PaginationTranslations>;
55
46
  }
56
47
  /**
57
48
  * Pagination component for navigating through multiple pages of content.
@@ -1,66 +1,58 @@
1
- import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as C, useMemo as D } from "react";
3
- import { PageNumbers as L } from "./page-numbers.js";
4
- import { Pagination as k, PaginationContent as S, PaginationItem as m, PaginationPrevious as y, PaginationNext as A } from "../../../vendor/shadcn/pagination.js";
5
- import { getPaginationTranslations as E } from "./pagination-translations.js";
6
- const c = "pointer-events-none opacity-50", I = C(
1
+ import { j as i } from "../../../_virtual/jsx-runtime.js";
2
+ import { forwardRef as D } from "react";
3
+ import { PageNumbers as N } from "./page-numbers.js";
4
+ import { Pagination as b, PaginationContent as g, PaginationItem as r, PaginationPrevious as v, PaginationNext as k } from "../../../vendor/shadcn/pagination.js";
5
+ const l = "pointer-events-none opacity-50", S = D(
7
6
  ({
8
7
  currentPage: n,
9
- totalPages: o,
10
- onPageClick: d,
11
- onClickNext: x,
12
- onClickPrev: p,
13
- disablePrevious: P = !1,
14
- disableNext: g = !1,
15
- showPreviousNext: r = !0,
16
- maxVisiblePages: u = 5,
17
- lang: l,
18
- translations: f,
19
- className: b,
20
- ...j
21
- }, h) => {
22
- const a = D(() => ({ ...E(l), ...f }), [l, f]), s = n === 1 || P, t = (o ? n >= o : !1) || g, v = (i) => {
23
- i.preventDefault(), !s && p?.();
24
- }, N = (i) => {
25
- i.preventDefault(), !t && x?.();
8
+ totalPages: e,
9
+ onPageClick: c,
10
+ onClickNext: f,
11
+ onClickPrev: d,
12
+ disablePrevious: m = !1,
13
+ disableNext: x = !1,
14
+ showPreviousNext: o = !0,
15
+ maxVisiblePages: p = 5,
16
+ className: j,
17
+ ...h
18
+ }, u) => {
19
+ const a = n === 1 || m, s = (e ? n >= e : !1) || x, P = (t) => {
20
+ t.preventDefault(), !a && d?.();
21
+ }, C = (t) => {
22
+ t.preventDefault(), !s && f?.();
26
23
  };
27
- return /* @__PURE__ */ e.jsx(k, { ref: h, className: b, ...j, children: /* @__PURE__ */ e.jsxs(S, { children: [
28
- r && /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
29
- y,
24
+ return /* @__PURE__ */ i.jsx(b, { ref: u, className: j, ...h, children: /* @__PURE__ */ i.jsxs(g, { children: [
25
+ o && /* @__PURE__ */ i.jsx(r, { children: /* @__PURE__ */ i.jsx(
26
+ v,
30
27
  {
31
28
  href: "#",
32
- onClick: v,
33
- "aria-disabled": s,
34
- className: s ? c : "",
35
- label: a.previous,
36
- ariaLabel: a.goToPreviousPage
29
+ onClick: P,
30
+ "aria-disabled": a,
31
+ className: a ? l : ""
37
32
  }
38
33
  ) }),
39
- /* @__PURE__ */ e.jsx(
40
- L,
34
+ /* @__PURE__ */ i.jsx(
35
+ N,
41
36
  {
42
37
  currentPage: n,
43
- totalPages: o,
44
- maxVisiblePages: u,
45
- onPageClick: d,
46
- morePagesLabel: a.morePages
38
+ totalPages: e,
39
+ maxVisiblePages: p,
40
+ onPageClick: c
47
41
  }
48
42
  ),
49
- r && /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
50
- A,
43
+ o && /* @__PURE__ */ i.jsx(r, { children: /* @__PURE__ */ i.jsx(
44
+ k,
51
45
  {
52
46
  href: "#",
53
- onClick: N,
54
- "aria-disabled": t,
55
- className: t ? c : "",
56
- label: a.next,
57
- ariaLabel: a.goToNextPage
47
+ onClick: C,
48
+ "aria-disabled": s,
49
+ className: s ? l : ""
58
50
  }
59
51
  ) })
60
52
  ] }) });
61
53
  }
62
54
  );
63
- I.displayName = "Pagination";
55
+ S.displayName = "Pagination";
64
56
  export {
65
- I as Pagination
57
+ S as Pagination
66
58
  };
@@ -1,10 +1,8 @@
1
1
  import { Column } from '@tanstack/react-table';
2
- import { DataTableTranslations } from '../../data-table.types';
3
2
  interface DataTableColumnHeaderMenuProps<TData, TValue> {
4
3
  column: Column<TData, TValue>;
5
4
  isLastVisibleColumn: boolean;
6
5
  onManageColumnsClick: () => void;
7
- translations: Required<DataTableTranslations>;
8
6
  }
9
- export declare function DataTableColumnHeaderMenu<TData, TValue>({ column, isLastVisibleColumn, onManageColumnsClick, translations, }: DataTableColumnHeaderMenuProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function DataTableColumnHeaderMenu<TData, TValue>({ column, isLastVisibleColumn, onManageColumnsClick, }: DataTableColumnHeaderMenuProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
10
8
  export {};
@@ -1,76 +1,75 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
2
  import { Icon as n } from "../../../../atoms/icon/icon.js";
3
- import { DropdownMenuContent as c, DropdownMenuItem as r, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
4
- function C({
3
+ import { DropdownMenuContent as g, DropdownMenuItem as i, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
4
+ function p({
5
5
  column: s,
6
- isLastVisibleColumn: d,
7
- onManageColumnsClick: x,
8
- translations: i
6
+ isLastVisibleColumn: r,
7
+ onManageColumnsClick: a
9
8
  }) {
10
- const l = s.getCanSort(), a = s.getCanPin(), g = s.getCanHide(), t = s.getIsPinned(), m = s.getIsSorted();
11
- return /* @__PURE__ */ e.jsxs(c, { align: "start", children: [
9
+ const l = s.getCanSort(), d = s.getCanPin(), x = s.getCanHide(), t = s.getIsPinned(), c = s.getIsSorted();
10
+ return /* @__PURE__ */ e.jsxs(g, { align: "start", children: [
12
11
  l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
13
- /* @__PURE__ */ e.jsxs(r, { onClick: () => s.toggleSorting(!1), children: [
12
+ /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!1), children: [
14
13
  /* @__PURE__ */ e.jsx(n, { name: "ArrowUp", size: "sm" }),
15
- i.ascending
14
+ "Ascending"
16
15
  ] }),
17
- /* @__PURE__ */ e.jsxs(r, { onClick: () => s.toggleSorting(!0), children: [
16
+ /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!0), children: [
18
17
  /* @__PURE__ */ e.jsx(n, { name: "ArrowDown", size: "sm" }),
19
- i.descending
18
+ "Descending"
20
19
  ] }),
21
- m && /* @__PURE__ */ e.jsxs(r, { onClick: () => s.clearSorting(), children: [
20
+ c && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.clearSorting(), children: [
22
21
  /* @__PURE__ */ e.jsx(n, { name: "X", size: "sm" }),
23
- i.clearSorting
22
+ "Clear sorting"
24
23
  ] }),
25
24
  /* @__PURE__ */ e.jsx(o, {})
26
25
  ] }),
27
- a && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
26
+ d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
28
27
  /* @__PURE__ */ e.jsxs(
29
- r,
28
+ i,
30
29
  {
31
30
  onClick: () => s.pin("left"),
32
31
  disabled: t === "left",
33
32
  children: [
34
33
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
35
- i.pinToLeft
34
+ "Pin to the left"
36
35
  ]
37
36
  }
38
37
  ),
39
38
  /* @__PURE__ */ e.jsxs(
40
- r,
39
+ i,
41
40
  {
42
41
  onClick: () => s.pin("right"),
43
42
  disabled: t === "right",
44
43
  children: [
45
44
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
46
- i.pinToRight
45
+ "Pin to the right"
47
46
  ]
48
47
  }
49
48
  ),
50
- t && /* @__PURE__ */ e.jsxs(r, { onClick: () => s.pin(!1), children: [
49
+ t && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.pin(!1), children: [
51
50
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimpleSlash", size: "sm" }),
52
- i.unpin
51
+ "Unpin"
53
52
  ] }),
54
53
  /* @__PURE__ */ e.jsx(o, {})
55
54
  ] }),
56
- g && /* @__PURE__ */ e.jsxs(
57
- r,
55
+ x && /* @__PURE__ */ e.jsxs(
56
+ i,
58
57
  {
59
58
  onClick: () => s.toggleVisibility(!1),
60
- disabled: d,
59
+ disabled: r,
61
60
  children: [
62
61
  /* @__PURE__ */ e.jsx(n, { name: "EyeSlash", size: "sm" }),
63
- i.hide,
64
- d && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: i.lastColumn })
62
+ "Hide",
63
+ r && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "(Last column)" })
65
64
  ]
66
65
  }
67
66
  ),
68
- /* @__PURE__ */ e.jsxs(r, { onClick: x, children: [
67
+ /* @__PURE__ */ e.jsxs(i, { onClick: a, children: [
69
68
  /* @__PURE__ */ e.jsx(n, { name: "Columns", size: "sm" }),
70
- i.manageColumns
69
+ "Manage columns"
71
70
  ] })
72
71
  ] });
73
72
  }
74
73
  export {
75
- C as DataTableColumnHeaderMenu
74
+ p as DataTableColumnHeaderMenu
76
75
  };
@@ -1,38 +1,37 @@
1
1
  import { j as e } from "../../../../../_virtual/jsx-runtime.js";
2
- import { Icon as h } from "../../../../atoms/icon/icon.js";
3
- import { cn as u } from "../../../../../lib/utils.js";
4
- import { useColumnHeader as O } from "../../hooks/use-column-header.js";
5
- import { DataTableColumnHeaderMenu as b } from "./data-table-column-header-menu.js";
2
+ import { Icon as b } from "../../../../atoms/icon/icon.js";
3
+ import { cn as m } from "../../../../../lib/utils.js";
4
+ import { useColumnHeader as D } from "../../hooks/use-column-header.js";
5
+ import { DataTableColumnHeaderMenu as O } from "./data-table-column-header-menu.js";
6
6
  import { DataTableManageColumnsDialog as v } from "../dialogs/data-table-manage-columns-dialog.js";
7
- import { DataTableColumnHeaderContent as A } from "./data-table-column-header-content.js";
8
- import { DEFAULT_DATA_TABLE_TRANSLATIONS as H } from "../../data-table.types.js";
7
+ import { DataTableColumnHeaderContent as H } from "./data-table-column-header-content.js";
9
8
  import { DropdownMenu as I } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
10
- function w({
9
+ function z({
11
10
  column: o,
12
- table: s,
13
- title: a,
14
- className: r,
11
+ table: l,
12
+ title: s,
13
+ className: a,
15
14
  info: n
16
15
  }) {
17
16
  const {
18
- isHovered: p,
19
- setIsHovered: t,
20
- isMenuOpen: i,
21
- setIsMenuOpen: d,
22
- isManageColumnsOpen: c,
17
+ isHovered: u,
18
+ setIsHovered: r,
19
+ isMenuOpen: t,
20
+ setIsMenuOpen: p,
21
+ isManageColumnsOpen: d,
23
22
  setIsManageColumnsOpen: C,
24
- isPinned: x,
25
- canPin: f,
26
- canSort: m,
23
+ isPinned: c,
24
+ canPin: x,
25
+ canSort: i,
27
26
  isSorted: g,
28
- toggleableColumns: j,
29
- visibleColumnsCount: M,
30
- isLastVisibleColumn: D,
31
- handleManageColumnsClick: T
32
- } = O(o, s), l = s.options.meta?.translations ?? H;
33
- return !m && !f ? /* @__PURE__ */ e.jsxs("div", { className: u("flex items-center gap-2", r), children: [
27
+ toggleableColumns: f,
28
+ visibleColumnsCount: j,
29
+ isLastVisibleColumn: M,
30
+ handleManageColumnsClick: h
31
+ } = D(o, l);
32
+ return !i && !x ? /* @__PURE__ */ e.jsxs("div", { className: m("flex items-center gap-2", a), children: [
34
33
  n && /* @__PURE__ */ e.jsx(
35
- h,
34
+ b,
36
35
  {
37
36
  name: "Info",
38
37
  size: "sm",
@@ -40,45 +39,43 @@ function w({
40
39
  tooltip: n
41
40
  }
42
41
  ),
43
- /* @__PURE__ */ e.jsx("span", { children: a })
42
+ /* @__PURE__ */ e.jsx("span", { children: s })
44
43
  ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
45
- /* @__PURE__ */ e.jsx("div", { className: u("flex items-center gap-2", r), children: /* @__PURE__ */ e.jsxs(I, { open: i, onOpenChange: d, children: [
44
+ /* @__PURE__ */ e.jsx("div", { className: m("flex items-center gap-2", a), children: /* @__PURE__ */ e.jsxs(I, { open: t, onOpenChange: p, children: [
46
45
  /* @__PURE__ */ e.jsx(
47
- A,
46
+ H,
48
47
  {
49
- title: a,
48
+ title: s,
50
49
  info: n,
51
- isPinned: x,
52
- canSort: m,
50
+ isPinned: c,
51
+ canSort: i,
53
52
  sortDirection: g,
54
- isHovered: p,
55
- isMenuOpen: i,
56
- onMouseEnter: () => t(!0),
57
- onMouseLeave: () => t(!1)
53
+ isHovered: u,
54
+ isMenuOpen: t,
55
+ onMouseEnter: () => r(!0),
56
+ onMouseLeave: () => r(!1)
58
57
  }
59
58
  ),
60
59
  /* @__PURE__ */ e.jsx(
61
- b,
60
+ O,
62
61
  {
63
62
  column: o,
64
- isLastVisibleColumn: D,
65
- onManageColumnsClick: T,
66
- translations: l
63
+ isLastVisibleColumn: M,
64
+ onManageColumnsClick: h
67
65
  }
68
66
  )
69
67
  ] }) }),
70
68
  /* @__PURE__ */ e.jsx(
71
69
  v,
72
70
  {
73
- isOpen: c,
71
+ isOpen: d,
74
72
  onOpenChange: C,
75
- toggleableColumns: j,
76
- visibleColumnsCount: M,
77
- translations: l
73
+ toggleableColumns: f,
74
+ visibleColumnsCount: j
78
75
  }
79
76
  )
80
77
  ] });
81
78
  }
82
79
  export {
83
- w as DataTableColumnHeader
80
+ z as DataTableColumnHeader
84
81
  };
@@ -1,36 +1,37 @@
1
1
  import { j as a } from "../../../../_virtual/jsx-runtime.js";
2
+ import "react";
2
3
  import { TableHeader as r, TableRow as m } from "../../../../vendor/shadcn/table.js";
3
4
  import { DataTableHeaderCell as o } from "./cells/data-table-header-cell.js";
4
5
  import { DataTableDraggableHeaderCell as d } from "./cells/data-table-draggable-header-cell.js";
5
- function j({
6
- table: i,
7
- enableColumnResizing: l,
8
- enableColumnDragDrop: n = !1
6
+ function b({
7
+ table: l,
8
+ enableColumnResizing: i,
9
+ enableColumnDragDrop: t = !1
9
10
  }) {
10
- return n ? /* @__PURE__ */ a.jsx(r, { children: i.getHeaderGroups().map((s) => /* @__PURE__ */ a.jsx(m, { className: "bg-muted", children: s.headers.map((e, t) => e.column.id === "select" || e.column.id === "actions" || e.column.id === "_spacer" ? /* @__PURE__ */ a.jsx(
11
+ return t ? /* @__PURE__ */ a.jsx(r, { children: l.getHeaderGroups().map((s) => /* @__PURE__ */ a.jsx(m, { className: "bg-muted", children: s.headers.map((e, n) => e.column.id === "select" || e.column.id === "actions" || e.column.id === "_spacer" ? /* @__PURE__ */ a.jsx(
11
12
  o,
12
13
  {
13
14
  header: e,
14
- enableColumnResizing: l ?? !1
15
+ enableColumnResizing: i ?? !1
15
16
  },
16
17
  e.id
17
18
  ) : /* @__PURE__ */ a.jsx(
18
19
  d,
19
20
  {
20
21
  header: e,
21
- index: t,
22
- enableColumnResizing: l ?? !1
22
+ index: n,
23
+ enableColumnResizing: i ?? !1
23
24
  },
24
25
  e.id
25
- )) }, s.id)) }) : /* @__PURE__ */ a.jsx(r, { children: i.getHeaderGroups().map((s) => /* @__PURE__ */ a.jsx(m, { className: "bg-muted", children: s.headers.map((e) => /* @__PURE__ */ a.jsx(
26
+ )) }, s.id)) }) : /* @__PURE__ */ a.jsx(r, { children: l.getHeaderGroups().map((s) => /* @__PURE__ */ a.jsx(m, { className: "bg-muted", children: s.headers.map((e) => /* @__PURE__ */ a.jsx(
26
27
  o,
27
28
  {
28
29
  header: e,
29
- enableColumnResizing: l ?? !1
30
+ enableColumnResizing: i ?? !1
30
31
  },
31
32
  e.id
32
33
  )) }, s.id)) });
33
34
  }
34
35
  export {
35
- j as DataTableHeader
36
+ b as DataTableHeader
36
37
  };
@@ -1,11 +1,9 @@
1
1
  import { Column } from '@tanstack/react-table';
2
- import { DataTableTranslations } from '../../data-table.types';
3
2
  interface DataTableManageColumnsDialogProps<TData> {
4
3
  isOpen: boolean;
5
4
  onOpenChange: (open: boolean) => void;
6
5
  toggleableColumns: Column<TData, unknown>[];
7
6
  visibleColumnsCount: number;
8
- translations: Required<DataTableTranslations>;
9
7
  }
10
- export declare function DataTableManageColumnsDialog<TData>({ isOpen, onOpenChange, toggleableColumns, visibleColumnsCount, translations, }: DataTableManageColumnsDialogProps<TData>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function DataTableManageColumnsDialog<TData>({ isOpen, onOpenChange, toggleableColumns, visibleColumnsCount, }: DataTableManageColumnsDialogProps<TData>): import("react/jsx-runtime").JSX.Element;
11
9
  export {};