@underverse-ui/underverse 1.0.105 → 1.0.106

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.
package/dist/index.d.cts CHANGED
@@ -2466,6 +2466,7 @@ type DataTableLabels = {
2466
2466
  alignCenter?: string;
2467
2467
  alignRight?: string;
2468
2468
  noData?: string;
2469
+ sortBy?: string;
2469
2470
  };
2470
2471
  /** Public props for the `DataTable` component. */
2471
2472
  interface DataTableProps<T> {
package/dist/index.d.ts CHANGED
@@ -2466,6 +2466,7 @@ type DataTableLabels = {
2466
2466
  alignCenter?: string;
2467
2467
  alignRight?: string;
2468
2468
  noData?: string;
2469
+ sortBy?: string;
2469
2470
  };
2470
2471
  /** Public props for the `DataTable` component. */
2471
2472
  interface DataTableProps<T> {
package/dist/index.js CHANGED
@@ -21461,6 +21461,7 @@ function DataTableHeader({
21461
21461
  enableHeaderAutoFit,
21462
21462
  getStickyHeaderClass,
21463
21463
  getStickyHeaderCellStyle,
21464
+ sortByLabel,
21464
21465
  t
21465
21466
  }) {
21466
21467
  const renderFilterControl = React54.useCallback(
@@ -21537,18 +21538,20 @@ function DataTableHeader({
21537
21538
  const isRightAlign = col.align === "right" || !col.align && headerAlign === "right";
21538
21539
  const isCenterAlign = col.align === "center" || !col.align && headerAlign === "center";
21539
21540
  const columnLabel = getColumnLabel(col.title) || col.key;
21541
+ const sortByText = sortByLabel ?? "Sort by";
21542
+ const sortLabel = `${sortByText} ${columnLabel}`;
21540
21543
  const titleContent = /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-1", children: [
21541
21544
  /* @__PURE__ */ jsx64("span", { className: cn("font-medium whitespace-nowrap select-text", headerTitleClass), children: col.title }),
21542
21545
  col.sortable && /* @__PURE__ */ jsx64(
21543
21546
  Tooltip,
21544
21547
  {
21545
21548
  placement: "top",
21546
- content: /* @__PURE__ */ jsx64("span", { className: "text-xs font-medium", children: `Sort by ${columnLabel}` }),
21549
+ content: /* @__PURE__ */ jsx64("span", { className: "text-xs font-medium", children: sortLabel }),
21547
21550
  children: /* @__PURE__ */ jsx64(
21548
21551
  "button",
21549
21552
  {
21550
21553
  type: "button",
21551
- title: `Sort by ${columnLabel}`,
21554
+ title: sortLabel,
21552
21555
  className: cn(
21553
21556
  "p-1 rounded-lg transition-all duration-200 hover:bg-accent",
21554
21557
  sort?.key === col.key ? "opacity-100 bg-accent" : "opacity-60 hover:opacity-100"
@@ -21561,7 +21564,7 @@ function DataTableHeader({
21561
21564
  return null;
21562
21565
  });
21563
21566
  },
21564
- "aria-label": `Sort by ${columnLabel}`,
21567
+ "aria-label": sortLabel,
21565
21568
  children: /* @__PURE__ */ jsxs53("svg", { viewBox: "0 0 20 20", fill: "none", className: cn("inline-block", sortIconClass), children: [
21566
21569
  /* @__PURE__ */ jsx64(
21567
21570
  "path",
@@ -22668,6 +22671,7 @@ function DataTable({
22668
22671
  enableHeaderAutoFit,
22669
22672
  getStickyHeaderClass,
22670
22673
  getStickyHeaderCellStyle,
22674
+ sortByLabel: labels?.sortBy,
22671
22675
  t
22672
22676
  }
22673
22677
  ) }),