@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.
@@ -40229,7 +40229,9 @@ const StyledHeader = styled.th.withConfig({
40229
40229
  `);
40230
40230
  const HeaderContentWrapper = styled.div.withConfig({
40231
40231
  componentId: "sc-1q458rb-1"
40232
- })(["display:flex;align-items:center;justify-content:start;gap:inherit;"]);
40232
+ })(["display:flex;align-items:center;justify-content:start;gap:inherit;", ""], ({
40233
+ $interactive
40234
+ }) => $interactive && "cursor: pointer;");
40233
40235
  const SortIcon = styled(SvgImage).withConfig({
40234
40236
  componentId: "sc-1q458rb-2"
40235
40237
  })(["transition:all 200ms;transform:rotate(", ");"], ({
@@ -40246,6 +40248,7 @@ const TableHeader = ({
40246
40248
  ...delegated
40247
40249
  }) => {
40248
40250
  const isSorted = typeof sortDir === "string";
40251
+ const isInteractive = Boolean(typeof onClick === "function" || isSortable && typeof onSort === "function");
40249
40252
  const onHeaderClick = (e) => {
40250
40253
  if (typeof onClick === "function") {
40251
40254
  onClick(e);
@@ -40254,7 +40257,7 @@ const TableHeader = ({
40254
40257
  onSort();
40255
40258
  }
40256
40259
  };
40257
- return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, children: [
40260
+ return /* @__PURE__ */ jsx(StyledHeader, { $size: size2, ...delegated, children: /* @__PURE__ */ jsxs(HeaderContentWrapper, { onClick: onHeaderClick, $interactive: isInteractive, children: [
40258
40261
  isSorted && isSortable && sortPosition == "start" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" }),
40259
40262
  label,
40260
40263
  isSorted && isSortable && sortPosition == "end" && /* @__PURE__ */ jsx(SortIcon, { $sortDir: sortDir, name: "arrow-down", size: "sm" })