@yuno-payments/dashboard-design-system 2.2.0 → 2.2.1-beta.2

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 +31 -1
  3. package/dist/components/atoms/filter/filter-date-range.js +140 -144
  4. package/dist/components/atoms/filter/filter-multi-input.d.ts +11 -0
  5. package/dist/components/atoms/filter/filter-multi-input.js +42 -36
  6. package/dist/components/atoms/filter/filter-translations.d.ts +75 -0
  7. package/dist/components/atoms/filter/filter-translations.js +450 -0
  8. package/dist/components/atoms/filter/filter.d.ts +30 -0
  9. package/dist/components/atoms/filter/filter.js +191 -171
  10. package/dist/components/atoms/filter/index.d.ts +2 -2
  11. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +17 -2
  12. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -151
  13. package/dist/components/atoms/icon/directional-icons.d.ts +12 -0
  14. package/dist/components/atoms/icon/directional-icons.js +38 -0
  15. package/dist/components/atoms/icon/icon.d.ts +6 -0
  16. package/dist/components/atoms/icon/icon.js +27 -21
  17. package/dist/components/atoms/icon/index.d.ts +1 -0
  18. package/dist/components/atoms/index.d.ts +1 -1
  19. package/dist/components/atoms/radio-group/radio-group-option.js +2 -2
  20. package/dist/components/atoms/select/select.js +2 -2
  21. package/dist/components/molecules/dialog-header/dialog-header.d.ts +1 -1
  22. package/dist/components/molecules/pagination/index.d.ts +1 -0
  23. package/dist/components/molecules/pagination/page-numbers.d.ts +3 -1
  24. package/dist/components/molecules/pagination/page-numbers.js +10 -9
  25. package/dist/components/molecules/pagination/pagination-translations.d.ts +33 -0
  26. package/dist/components/molecules/pagination/pagination-translations.js +82 -0
  27. package/dist/components/molecules/pagination/pagination.d.ts +9 -0
  28. package/dist/components/molecules/pagination/pagination.js +46 -38
  29. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.d.ts +3 -1
  30. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +28 -27
  31. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +44 -41
  32. package/dist/components/organisms/data-table/components/data-table-header.js +11 -12
  33. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.d.ts +3 -1
  34. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.js +45 -44
  35. package/dist/components/organisms/data-table/data-table.d.ts +27 -2
  36. package/dist/components/organisms/data-table/data-table.js +146 -134
  37. package/dist/components/organisms/data-table/data-table.types.d.ts +68 -0
  38. package/dist/components/organisms/data-table/data-table.types.js +252 -0
  39. package/dist/components/organisms/data-table/index.d.ts +2 -1
  40. package/dist/components/organisms/data-table/utils/data-table-utils.js +11 -8
  41. package/dist/dashboard-design-system.css +1 -1
  42. package/dist/index.css +1 -1
  43. package/dist/index.d.ts +2 -1
  44. package/dist/index.esm.min.js +9394 -8512
  45. package/dist/index.js +208 -202
  46. package/dist/index.umd.min.js +25 -25
  47. package/dist/lib/utils.d.ts +13 -0
  48. package/dist/lib/utils.js +34 -10
  49. package/dist/vendor/shadcn/pagination.d.ts +19 -3
  50. package/dist/vendor/shadcn/pagination.js +41 -37
  51. package/dist/vendor/shadcn/select.js +33 -33
  52. package/dist/vendor/shadcn/switch.js +1 -1
  53. package/package.json +4 -2
  54. package/registry/components-registry.json +38 -12
@@ -1,10 +1,11 @@
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", {
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", {
8
9
  variants: {
9
10
  size: {
10
11
  xs: "size-3",
@@ -17,34 +18,39 @@ const j = u("inline-flex items-center justify-center shrink-0", {
17
18
  defaultVariants: {
18
19
  size: "md"
19
20
  }
20
- }), g = p(
21
+ }), g = d(
21
22
  ({
22
23
  name: r,
23
- weight: t = "light",
24
+ weight: n = "light",
24
25
  size: e,
25
26
  className: c,
26
27
  color: l,
27
- tooltip: i,
28
+ tooltip: o,
28
29
  tooltipProps: m,
29
- ...a
30
- }, f) => {
30
+ autoMirrorRtl: a,
31
+ ...f
32
+ }, u) => {
31
33
  if (!r)
32
34
  return null;
33
- const o = z?.[r];
34
- if (!o)
35
+ const i = h?.[r];
36
+ if (!i)
35
37
  return console.error("Missing icon", r), null;
36
- const n = /* @__PURE__ */ s.jsx(
37
- o,
38
+ const p = C.has(r), x = a ?? p, s = /* @__PURE__ */ t.jsx(
39
+ i,
38
40
  {
39
- ref: f,
41
+ ref: u,
40
42
  "aria-label": r,
41
- className: x(j({ size: e }), c),
43
+ className: I(
44
+ N({ size: e }),
45
+ x && "rtl:scale-x-[-1]",
46
+ c
47
+ ),
42
48
  color: l || "currentColor",
43
- weight: t,
44
- ...a
49
+ weight: n,
50
+ ...f
45
51
  }
46
52
  );
47
- return i ? /* @__PURE__ */ s.jsx(d, { content: i, ...m, children: n }) : n;
53
+ return o ? /* @__PURE__ */ t.jsx(j, { content: o, ...m, children: s }) : s;
48
54
  }
49
55
  );
50
56
  g.displayName = "Icon";
@@ -1,2 +1,3 @@
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 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 FilterDateRangeLabels, 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" : "flex items-start gap-3",
12
+ className: t ? "flex items-center gap-3 rtl:flex-row-reverse" : "flex items-start gap-3 rtl:flex-row-reverse",
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 ml-auto", children: e.description })
35
+ e.description && /* @__PURE__ */ r.jsx("p", { className: "text-sm text-muted-foreground ms-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: "mr-2 inline-flex items-center", children: s.icon }),
75
+ s.icon && /* @__PURE__ */ e.jsx("span", { className: "me-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: "mr-2 inline-flex items-center", children: l.icon }),
82
+ l.icon && /* @__PURE__ */ e.jsx("span", { className: "me-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 React.HTMLAttributes<HTMLDivElement> {
5
+ export interface DialogHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
6
6
  /**
7
7
  * Dialog title (text or custom element)
8
8
  */
@@ -1,2 +1,3 @@
1
1
  export { Pagination, type PaginationProps } from './pagination';
2
+ export { getPaginationTranslations, type PaginationLanguage, type PaginationTranslations, } from './pagination-translations';
2
3
  export { Pagination as PaginationRoot, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from '../../../vendor/shadcn/pagination';
@@ -3,6 +3,8 @@ 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;
6
8
  }
7
- declare const PageNumbers: ({ currentPage, totalPages, maxVisiblePages, onPageClick, }: PageNumbersProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare const PageNumbers: ({ currentPage, totalPages, maxVisiblePages, onPageClick, morePagesLabel, }: PageNumbersProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export { PageNumbers, type PageNumbersProps };
@@ -1,23 +1,24 @@
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 a } from "./page-numbers.utils.js";
4
- const u = ({
3
+ import { calculateVisiblePages as d } from "./page-numbers.utils.js";
4
+ const b = ({
5
5
  currentPage: n,
6
6
  totalPages: l,
7
7
  maxVisiblePages: o,
8
- onPageClick: c
8
+ onPageClick: c,
9
+ morePagesLabel: m
9
10
  }) => {
10
11
  if (!l)
11
12
  return /* @__PURE__ */ i.jsx(e, { children: /* @__PURE__ */ i.jsx(t, { isActive: !0, children: n }) });
12
- const m = (s, r) => {
13
+ const x = (s, r) => {
13
14
  s.preventDefault(), r !== n && c?.(r);
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(
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(
17
18
  t,
18
19
  {
19
20
  href: "#",
20
- onClick: (j) => m(j, s),
21
+ onClick: (a) => x(a, s),
21
22
  isActive: s === n,
22
23
  children: s
23
24
  }
@@ -25,5 +26,5 @@ const u = ({
25
26
  ) });
26
27
  };
27
28
  export {
28
- u as PageNumbers
29
+ b as PageNumbers
29
30
  };
@@ -0,0 +1,33 @@
1
+ import { SupportedLanguage } from '../../../lib/utils';
2
+ /**
3
+ * Supported languages for pagination translations
4
+ */
5
+ export type PaginationLanguage = SupportedLanguage;
6
+ /**
7
+ * Translation strings for Pagination component
8
+ */
9
+ export interface PaginationTranslations {
10
+ /** Text for "Previous" button */
11
+ previous?: string;
12
+ /** Text for "Next" button */
13
+ next?: string;
14
+ /** Screen reader text for ellipsis ("More pages") */
15
+ morePages?: string;
16
+ /** Aria-label for Previous button */
17
+ goToPreviousPage?: string;
18
+ /** Aria-label for Next button */
19
+ goToNextPage?: string;
20
+ }
21
+ /**
22
+ * All translations by language code
23
+ */
24
+ export declare const PAGINATION_TRANSLATIONS: Record<PaginationLanguage, Required<PaginationTranslations>>;
25
+ /**
26
+ * Default translations (English)
27
+ */
28
+ export declare const DEFAULT_PAGINATION_TRANSLATIONS: Required<PaginationTranslations>;
29
+ /**
30
+ * Get translations for a specific language
31
+ * Falls back to localStorage language, then to English if not found
32
+ */
33
+ export declare function getPaginationTranslations(lang?: PaginationLanguage): Required<PaginationTranslations>;
@@ -0,0 +1,82 @@
1
+ import { getDefaultLanguage as g } from "../../../lib/utils.js";
2
+ const e = {
3
+ previous: "Previous",
4
+ next: "Next",
5
+ morePages: "More pages",
6
+ goToPreviousPage: "Go to previous page",
7
+ goToNextPage: "Go to next page"
8
+ }, r = {
9
+ previous: "Anterior",
10
+ next: "Siguiente",
11
+ morePages: "Más páginas",
12
+ goToPreviousPage: "Ir a página anterior",
13
+ goToNextPage: "Ir a página siguiente"
14
+ }, t = {
15
+ previous: "前へ",
16
+ next: "次へ",
17
+ morePages: "その他のページ",
18
+ goToPreviousPage: "前のページへ",
19
+ goToNextPage: "次のページへ"
20
+ }, s = {
21
+ previous: "السابق",
22
+ next: "التالي",
23
+ morePages: "صفحات أخرى",
24
+ goToPreviousPage: "انتقل إلى الصفحة السابقة",
25
+ goToNextPage: "انتقل إلى الصفحة التالية"
26
+ }, i = {
27
+ previous: "Précédent",
28
+ next: "Suivant",
29
+ morePages: "Plus de pages",
30
+ goToPreviousPage: "Aller à la page précédente",
31
+ goToNextPage: "Aller à la page suivante"
32
+ }, n = {
33
+ previous: "Anterior",
34
+ next: "Próximo",
35
+ morePages: "Mais páginas",
36
+ goToPreviousPage: "Ir para página anterior",
37
+ goToNextPage: "Ir para próxima página"
38
+ }, T = {
39
+ previous: "Önceki",
40
+ next: "Sonraki",
41
+ morePages: "Daha fazla sayfa",
42
+ goToPreviousPage: "Önceki sayfaya git",
43
+ goToNextPage: "Sonraki sayfaya git"
44
+ }, P = {
45
+ previous: "Назад",
46
+ next: "Вперёд",
47
+ morePages: "Ещё страницы",
48
+ goToPreviousPage: "Перейти на предыдущую страницу",
49
+ goToNextPage: "Перейти на следующую страницу"
50
+ }, N = {
51
+ previous: "Zurück",
52
+ next: "Weiter",
53
+ morePages: "Weitere Seiten",
54
+ goToPreviousPage: "Zur vorherigen Seite",
55
+ goToNextPage: "Zur nächsten Seite"
56
+ }, u = {
57
+ previous: "上一页",
58
+ next: "下一页",
59
+ morePages: "更多页面",
60
+ goToPreviousPage: "转到上一页",
61
+ goToNextPage: "转到下一页"
62
+ }, A = {
63
+ en: e,
64
+ es: r,
65
+ ja: t,
66
+ ar: s,
67
+ fr: i,
68
+ pt: n,
69
+ tr: T,
70
+ ru: P,
71
+ de: N,
72
+ zh: u
73
+ }, S = e;
74
+ function v(o) {
75
+ const a = o ?? g();
76
+ return A[a] ?? S;
77
+ }
78
+ export {
79
+ S as DEFAULT_PAGINATION_TRANSLATIONS,
80
+ A as PAGINATION_TRANSLATIONS,
81
+ v as getPaginationTranslations
82
+ };
@@ -1,4 +1,5 @@
1
1
  import { ComponentProps } from 'react';
2
+ import { PaginationLanguage, PaginationTranslations } from './pagination-translations';
2
3
  /**
3
4
  * Props for the Pagination component
4
5
  */
@@ -43,6 +44,14 @@ interface PaginationProps extends ComponentProps<"nav"> {
43
44
  * @default 5
44
45
  */
45
46
  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>;
46
55
  }
47
56
  /**
48
57
  * Pagination component for navigating through multiple pages of content.
@@ -1,58 +1,66 @@
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(
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(
6
7
  ({
7
8
  currentPage: n,
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?.();
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?.();
23
26
  };
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,
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,
27
30
  {
28
31
  href: "#",
29
- onClick: P,
30
- "aria-disabled": a,
31
- className: a ? l : ""
32
+ onClick: v,
33
+ "aria-disabled": s,
34
+ className: s ? c : "",
35
+ label: a.previous,
36
+ ariaLabel: a.goToPreviousPage
32
37
  }
33
38
  ) }),
34
- /* @__PURE__ */ i.jsx(
35
- N,
39
+ /* @__PURE__ */ e.jsx(
40
+ L,
36
41
  {
37
42
  currentPage: n,
38
- totalPages: e,
39
- maxVisiblePages: p,
40
- onPageClick: c
43
+ totalPages: o,
44
+ maxVisiblePages: u,
45
+ onPageClick: d,
46
+ morePagesLabel: a.morePages
41
47
  }
42
48
  ),
43
- o && /* @__PURE__ */ i.jsx(r, { children: /* @__PURE__ */ i.jsx(
44
- k,
49
+ r && /* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
50
+ A,
45
51
  {
46
52
  href: "#",
47
- onClick: C,
48
- "aria-disabled": s,
49
- className: s ? l : ""
53
+ onClick: N,
54
+ "aria-disabled": t,
55
+ className: t ? c : "",
56
+ label: a.next,
57
+ ariaLabel: a.goToNextPage
50
58
  }
51
59
  ) })
52
60
  ] }) });
53
61
  }
54
62
  );
55
- S.displayName = "Pagination";
63
+ I.displayName = "Pagination";
56
64
  export {
57
- S as Pagination
65
+ I as Pagination
58
66
  };
@@ -1,8 +1,10 @@
1
1
  import { Column } from '@tanstack/react-table';
2
+ import { DataTableTranslations } from '../../data-table.types';
2
3
  interface DataTableColumnHeaderMenuProps<TData, TValue> {
3
4
  column: Column<TData, TValue>;
4
5
  isLastVisibleColumn: boolean;
5
6
  onManageColumnsClick: () => void;
7
+ translations: Required<DataTableTranslations>;
6
8
  }
7
- export declare function DataTableColumnHeaderMenu<TData, TValue>({ column, isLastVisibleColumn, onManageColumnsClick, }: DataTableColumnHeaderMenuProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
9
+ export declare function DataTableColumnHeaderMenu<TData, TValue>({ column, isLastVisibleColumn, onManageColumnsClick, translations, }: DataTableColumnHeaderMenuProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -1,75 +1,76 @@
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 g, DropdownMenuItem as i, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
4
- function p({
3
+ import { DropdownMenuContent as c, DropdownMenuItem as r, DropdownMenuSeparator as o } from "../../../../atoms/dropdown-menu/dropdown-menu.js";
4
+ function C({
5
5
  column: s,
6
- isLastVisibleColumn: r,
7
- onManageColumnsClick: a
6
+ isLastVisibleColumn: d,
7
+ onManageColumnsClick: x,
8
+ translations: i
8
9
  }) {
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: [
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: [
11
12
  l && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
12
- /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!1), children: [
13
+ /* @__PURE__ */ e.jsxs(r, { onClick: () => s.toggleSorting(!1), children: [
13
14
  /* @__PURE__ */ e.jsx(n, { name: "ArrowUp", size: "sm" }),
14
- "Ascending"
15
+ i.ascending
15
16
  ] }),
16
- /* @__PURE__ */ e.jsxs(i, { onClick: () => s.toggleSorting(!0), children: [
17
+ /* @__PURE__ */ e.jsxs(r, { onClick: () => s.toggleSorting(!0), children: [
17
18
  /* @__PURE__ */ e.jsx(n, { name: "ArrowDown", size: "sm" }),
18
- "Descending"
19
+ i.descending
19
20
  ] }),
20
- c && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.clearSorting(), children: [
21
+ m && /* @__PURE__ */ e.jsxs(r, { onClick: () => s.clearSorting(), children: [
21
22
  /* @__PURE__ */ e.jsx(n, { name: "X", size: "sm" }),
22
- "Clear sorting"
23
+ i.clearSorting
23
24
  ] }),
24
25
  /* @__PURE__ */ e.jsx(o, {})
25
26
  ] }),
26
- d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
27
+ a && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
27
28
  /* @__PURE__ */ e.jsxs(
28
- i,
29
+ r,
29
30
  {
30
31
  onClick: () => s.pin("left"),
31
32
  disabled: t === "left",
32
33
  children: [
33
34
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
34
- "Pin to the left"
35
+ i.pinToLeft
35
36
  ]
36
37
  }
37
38
  ),
38
39
  /* @__PURE__ */ e.jsxs(
39
- i,
40
+ r,
40
41
  {
41
42
  onClick: () => s.pin("right"),
42
43
  disabled: t === "right",
43
44
  children: [
44
45
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimple", size: "sm" }),
45
- "Pin to the right"
46
+ i.pinToRight
46
47
  ]
47
48
  }
48
49
  ),
49
- t && /* @__PURE__ */ e.jsxs(i, { onClick: () => s.pin(!1), children: [
50
+ t && /* @__PURE__ */ e.jsxs(r, { onClick: () => s.pin(!1), children: [
50
51
  /* @__PURE__ */ e.jsx(n, { name: "PushPinSimpleSlash", size: "sm" }),
51
- "Unpin"
52
+ i.unpin
52
53
  ] }),
53
54
  /* @__PURE__ */ e.jsx(o, {})
54
55
  ] }),
55
- x && /* @__PURE__ */ e.jsxs(
56
- i,
56
+ g && /* @__PURE__ */ e.jsxs(
57
+ r,
57
58
  {
58
59
  onClick: () => s.toggleVisibility(!1),
59
- disabled: r,
60
+ disabled: d,
60
61
  children: [
61
62
  /* @__PURE__ */ e.jsx(n, { name: "EyeSlash", size: "sm" }),
62
- "Hide",
63
- r && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: "(Last column)" })
63
+ i.hide,
64
+ d && /* @__PURE__ */ e.jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: i.lastColumn })
64
65
  ]
65
66
  }
66
67
  ),
67
- /* @__PURE__ */ e.jsxs(i, { onClick: a, children: [
68
+ /* @__PURE__ */ e.jsxs(r, { onClick: x, children: [
68
69
  /* @__PURE__ */ e.jsx(n, { name: "Columns", size: "sm" }),
69
- "Manage columns"
70
+ i.manageColumns
70
71
  ] })
71
72
  ] });
72
73
  }
73
74
  export {
74
- p as DataTableColumnHeaderMenu
75
+ C as DataTableColumnHeaderMenu
75
76
  };