@clickhouse/click-ui 0.0.232 → 0.0.234

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.
@@ -41397,7 +41397,9 @@ const StyledHeader = pt.th.withConfig({
41397
41397
  `);
41398
41398
  const HeaderContentWrapper = pt.div.withConfig({
41399
41399
  componentId: "sc-1q458rb-1"
41400
- })(["display:flex;align-items:center;justify-content:start;gap:inherit;"]);
41400
+ })(["display:flex;align-items:center;justify-content:start;gap:inherit;", ""], ({
41401
+ $interactive
41402
+ }) => $interactive && "cursor: pointer;");
41401
41403
  const SortIcon = pt(SvgImage).withConfig({
41402
41404
  componentId: "sc-1q458rb-2"
41403
41405
  })(["transition:all 200ms;transform:rotate(", ");"], ({
@@ -41414,6 +41416,7 @@ const TableHeader = ({
41414
41416
  ...delegated
41415
41417
  }) => {
41416
41418
  const isSorted = typeof sortDir === "string";
41419
+ const isInteractive = Boolean(typeof onClick === "function" || isSortable && typeof onSort === "function");
41417
41420
  const onHeaderClick = (e) => {
41418
41421
  if (typeof onClick === "function") {
41419
41422
  onClick(e);
@@ -41422,7 +41425,7 @@ const TableHeader = ({
41422
41425
  onSort();
41423
41426
  }
41424
41427
  };
41425
- return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, children: [
41428
+ return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, $interactive: isInteractive, children: [
41426
41429
  isSorted && isSortable && sortPosition == "start" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" }),
41427
41430
  label,
41428
41431
  isSorted && isSortable && sortPosition == "end" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" })